vendor: 4,246 bytes, lines 1-164
1/** 2 * @licstart The following is the entire license notice for the 3 * JavaScript code in this page 4 * 5 * Copyright 2024 Mozilla Foundation 6 * 7 * Licensed under the Apache License, Version 2.0 (the "License"); 8 * you may not use this file except in compliance with the License. 9 * You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, software 14 * distributed under the License is distributed on an "AS IS" BASIS, 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 * See the License for the specific language governing permissions and 17 * limitations under the License. 18 * 19 * @licend The above is the entire license notice for the 20 * JavaScript code in this page 21 */ 22 23/******/ // The require scope 24/******/ var __webpack_require__ = {}; 25/******/ 26/************************************************************************/ 27/******/ /* webpack/runtime/define property getters */ 28/******/ (() => { 29/******/ // define getter functions for harmony exports 30/******/ __webpack_require__.d = (exports, definition) => { 31/******/ for(var key in definition) { 32/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { 33/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); 34/******/ } 35/******/ } 36/******/ }; 37/******/ })(); 38/******/ 39/******/ /* webpack/runtime/hasOwnProperty shorthand */ 40/******/ (() => { 41/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) 42/******/ })(); 43/******/ 44/************************************************************************/ 45var __webpack_exports__ = globalThis.pdfjsWorker = {}; 46 47// EXPORTS 48__webpack_require__.d(__webpack_exports__, { 49 WorkerMessageHandler: () => (/* reexport */ WorkerMessageHandler) 50}); 51 52;// ./src/shared/util.js 53const isNodeJS = typeof process === "object" && process + "" === "[object process]" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== "browser"); 54const IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0]; 55const FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0]; 56const MAX_IMAGE_SIZE_TO_CACHE = 10e6; 57const LINE_FACTOR = 1.35; 58const LINE_DESCENT_FACTOR = 0.35; 59const BASELINE_FACTOR = LINE_DESCENT_FACTOR / LINE_FACTOR; 60const RenderingIntentFlag = { 61 ANY: 0x01, 62 DISPLAY: 0x02, 63 PRINT: 0x04, 64 SAVE: 0x08, 65 ANNOTATIONS_FORMS: 0x10, 66 ANNOTATIONS_STORAGE: 0x20, 67 ANNOTATIONS_DISABLE: 0x40, 68 IS_EDITING: 0x80, 69 OPLIST: 0x100 70}; 71const AnnotationMode = { 72 DISABLE: 0, 73 ENABLE: 1, 74 ENABLE_FORMS: 2, 75 ENABLE_STORAGE: 3 76}; 77const AnnotationEditorPrefix = "pdfjs_internal_editor_"; 78const AnnotationEditorType = { 79 DISABLE: -1, 80 NONE: 0, 81 FREETEXT: 3, 82 HIGHLIGHT: 9, 83 STAMP: 13, 84 INK: 15 85}; 86const AnnotationEditorParamsType = { 87 RESIZE: 1, 88 CREATE: 2, 89 FREETEXT_SIZE: 11, 90 FREETEXT_COLOR: 12, 91 FREETEXT_OPACITY: 13, 92 INK_COLOR: 21, 93 INK_THICKNESS: 22, 94 INK_OPACITY: 23, 95 HIGHLIGHT_COLOR: 31, 96 HIGHLIGHT_DEFAULT_COLOR: 32, 97 HIGHLIGHT_THICKNESS: 33, 98 HIGHLIGHT_FREE: 34, 99 HIGHLIGHT_SHOW_ALL: 35 100}; 101const PermissionFlag = { 102 PRINT: 0x04, 103 MODIFY_CONTENTS: 0x08, 104 COPY: 0x10, 105 MODIFY_ANNOTATIONS: 0x20, 106 FILL_INTERACTIVE_FORMS: 0x100, 107 COPY_FOR_ACCESSIBILITY: 0x200, 108 ASSEMBLE: 0x400, 109 PRINT_HIGH_QUALITY: 0x800 110}; 111const TextRenderingMode = { 112 FILL: 0, 113 STROKE: 1, 114 FILL_STROKE: 2, 115 INVISIBLE: 3, 116 FILL_ADD_TO_PATH: 4, 117 STROKE_ADD_TO_PATH: 5, 118 FILL_STROKE_ADD_TO_PATH: 6, 119 ADD_TO_PATH: 7, 120 FILL_STROKE_MASK: 3, 121 ADD_TO_PATH_FLAG: 4 122}; 123const ImageKind = { 124 GRAYSCALE_1BPP: 1, 125 RGB_24BPP: 2, 126 RGBA_32BPP: 3 127}; 128const AnnotationType = { 129 TEXT: 1, 130 LINK: 2, 131 FREETEXT: 3, 132 LINE: 4, 133 SQUARE: 5, 134 CIRCLE: 6, 135 POLYGON: 7, 136 POLYLINE: 8, 137 HIGHLIGHT: 9, 138 UNDERLINE: 10, 139 SQUIGGLY: 11, 140 STRIKEOUT: 12, 141 STAMP: 13, 142 CARET: 14, 143 INK: 15, 144 POPUP: 16, 145 FILEATTACHMENT: 17, 146 SOUND: 18, 147 MOVIE: 19, 148 WIDGET: 20, 149 SCREEN: 21, 150 PRINTERMARK: 22, 151 TRAPNET: 23, 152 WATERMARK: 24, 153 THREED: 25, 154 REDACT: 26 155}; 156const AnnotationReplyType = { 157 GROUP: "Group", 158 REPLY: "R" 159}; 160const AnnotationFlag = { 161 INVISIBLE: 0x01, 162 HIDDEN: 0x02, 163 PRINT: 0x04, 164 NOZOOM: 0x08,
165 NOROTATE: 0x10, 166 NOVIEW: 0x20, 167 READONLY: 0x40, 168 LOCKED: 0x80, 169 TOGGLENOVIEW: 0x100, 170 LOCKEDCONTENTS: 0x200 171}; 172const AnnotationFieldFlag = { 173 READONLY: 0x0000001, 174 REQUIRED: 0x0000002, 175 NOEXPORT: 0x0000004, 176 MULTILINE: 0x0001000, 177 PASSWORD: 0x0002000, 178 NOTOGGLETOOFF: 0x0004000, 179 RADIO: 0x0008000, 180 PUSHBUTTON: 0x0010000, 181 COMBO: 0x0020000, 182 EDIT: 0x0040000, 183 SORT: 0x0080000, 184 FILESELECT: 0x0100000, 185 MULTISELECT: 0x0200000, 186 DONOTSPELLCHECK: 0x0400000, 187 DONOTSCROLL: 0x0800000, 188 COMB: 0x1000000, 189 RICHTEXT: 0x2000000, 190 RADIOSINUNISON: 0x2000000, 191 COMMITONSELCHANGE: 0x4000000 192}; 193const AnnotationBorderStyleType = { 194 SOLID: 1, 195 DASHED: 2, 196 BEVELED: 3, 197 INSET: 4, 198 UNDERLINE: 5 199}; 200const AnnotationActionEventType = { 201 E: "Mouse Enter", 202 X: "Mouse Exit", 203 D: "Mouse Down", 204 U: "Mouse Up", 205 Fo: "Focus", 206 Bl: "Blur", 207 PO: "PageOpen", 208 PC: "PageClose", 209 PV: "PageVisible", 210 PI: "PageInvisible", 211 K: "Keystroke", 212 F: "Format", 213 V: "Validate", 214 C: "Calculate" 215}; 216const DocumentActionEventType = { 217 WC: "WillClose", 218 WS: "WillSave", 219 DS: "DidSave", 220 WP: "WillPrint", 221 DP: "DidPrint" 222}; 223const PageActionEventType = { 224 O: "PageOpen", 225 C: "PageClose" 226}; 227const VerbosityLevel = { 228 ERRORS: 0, 229 WARNINGS: 1, 230 INFOS: 5 231}; 232const OPS = { 233 dependency: 1, 234 setLineWidth: 2, 235 setLineCap: 3, 236 setLineJoin: 4, 237 setMiterLimit: 5, 238 setDash: 6, 239 setRenderingIntent: 7, 240 setFlatness: 8, 241 setGState: 9, 242 save: 10, 243 restore: 11, 244 transform: 12, 245 moveTo: 13, 246 lineTo: 14, 247 curveTo: 15, 248 curveTo2: 16,
vendor: 5,342 bytes, lines 249-472
249 curveTo3: 17, 250 closePath: 18, 251 rectangle: 19, 252 stroke: 20, 253 closeStroke: 21, 254 fill: 22, 255 eoFill: 23, 256 fillStroke: 24, 257 eoFillStroke: 25, 258 closeFillStroke: 26, 259 closeEOFillStroke: 27, 260 endPath: 28, 261 clip: 29, 262 eoClip: 30, 263 beginText: 31, 264 endText: 32, 265 setCharSpacing: 33, 266 setWordSpacing: 34, 267 setHScale: 35, 268 setLeading: 36, 269 setFont: 37, 270 setTextRenderingMode: 38, 271 setTextRise: 39, 272 moveText: 40, 273 setLeadingMoveText: 41, 274 setTextMatrix: 42, 275 nextLine: 43, 276 showText: 44, 277 showSpacedText: 45, 278 nextLineShowText: 46, 279 nextLineSetSpacingShowText: 47, 280 setCharWidth: 48, 281 setCharWidthAndBounds: 49, 282 setStrokeColorSpace: 50, 283 setFillColorSpace: 51, 284 setStrokeColor: 52, 285 setStrokeColorN: 53, 286 setFillColor: 54, 287 setFillColorN: 55, 288 setStrokeGray: 56, 289 setFillGray: 57, 290 setStrokeRGBColor: 58, 291 setFillRGBColor: 59, 292 setStrokeCMYKColor: 60, 293 setFillCMYKColor: 61, 294 shadingFill: 62, 295 beginInlineImage: 63, 296 beginImageData: 64, 297 endInlineImage: 65, 298 paintXObject: 66, 299 markPoint: 67, 300 markPointProps: 68, 301 beginMarkedContent: 69, 302 beginMarkedContentProps: 70, 303 endMarkedContent: 71, 304 beginCompat: 72, 305 endCompat: 73, 306 paintFormXObjectBegin: 74, 307 paintFormXObjectEnd: 75, 308 beginGroup: 76, 309 endGroup: 77, 310 beginAnnotation: 80, 311 endAnnotation: 81, 312 paintImageMaskXObject: 83, 313 paintImageMaskXObjectGroup: 84, 314 paintImageXObject: 85, 315 paintInlineImageXObject: 86, 316 paintInlineImageXObjectGroup: 87, 317 paintImageXObjectRepeat: 88, 318 paintImageMaskXObjectRepeat: 89, 319 paintSolidColorImageMask: 90, 320 constructPath: 91, 321 setStrokeTransparent: 92, 322 setFillTransparent: 93 323}; 324const PasswordResponses = { 325 NEED_PASSWORD: 1, 326 INCORRECT_PASSWORD: 2 327}; 328let verbosity = VerbosityLevel.WARNINGS; 329function setVerbosityLevel(level) { 330 if (Number.isInteger(level)) { 331 verbosity = level; 332 } 333} 334function getVerbosityLevel() { 335 return verbosity; 336} 337function info(msg) { 338 if (verbosity >= VerbosityLevel.INFOS) { 339 console.log(`Info: ${msg}`); 340 } 341} 342function warn(msg) { 343 if (verbosity >= VerbosityLevel.WARNINGS) { 344 console.log(`Warning: ${msg}`); 345 } 346} 347function unreachable(msg) { 348 throw new Error(msg); 349} 350function assert(cond, msg) { 351 if (!cond) { 352 unreachable(msg); 353 } 354} 355function _isValidProtocol(url) { 356 switch (url?.protocol) { 357 case "http:": 358 case "https:": 359 case "ftp:": 360 case "mailto:": 361 case "tel:": 362 return true; 363 default: 364 return false; 365 } 366} 367function createValidAbsoluteUrl(url, baseUrl = null, options = null) { 368 if (!url) { 369 return null; 370 } 371 try { 372 if (options && typeof url === "string") { 373 if (options.addDefaultProtocol && url.startsWith("www.")) { 374 const dots = url.match(/\./g); 375 if (dots?.length >= 2) { 376 url = `http://${url}`; 377 } 378 } 379 if (options.tryConvertEncoding) { 380 try { 381 url = stringToUTF8String(url); 382 } catch {} 383 } 384 } 385 const absoluteUrl = baseUrl ? new URL(url, baseUrl) : new URL(url); 386 if (_isValidProtocol(absoluteUrl)) { 387 return absoluteUrl; 388 } 389 } catch {} 390 return null; 391} 392function shadow(obj, prop, value, nonSerializable = false) { 393 Object.defineProperty(obj, prop, { 394 value, 395 enumerable: !nonSerializable, 396 configurable: true, 397 writable: false 398 }); 399 return value; 400} 401const BaseException = function BaseExceptionClosure() { 402 function BaseException(message, name) { 403 this.message = message; 404 this.name = name; 405 } 406 BaseException.prototype = new Error(); 407 BaseException.constructor = BaseException; 408 return BaseException; 409}(); 410class PasswordException extends BaseException { 411 constructor(msg, code) { 412 super(msg, "PasswordException"); 413 this.code = code; 414 } 415} 416class UnknownErrorException extends BaseException { 417 constructor(msg, details) { 418 super(msg, "UnknownErrorException"); 419 this.details = details; 420 } 421} 422class InvalidPDFException extends BaseException { 423 constructor(msg) { 424 super(msg, "InvalidPDFException"); 425 } 426} 427class MissingPDFException extends BaseException { 428 constructor(msg) { 429 super(msg, "MissingPDFException"); 430 } 431} 432class UnexpectedResponseException extends BaseException { 433 constructor(msg, status) { 434 super(msg, "UnexpectedResponseException"); 435 this.status = status; 436 } 437} 438class FormatError extends BaseException { 439 constructor(msg) { 440 super(msg, "FormatError"); 441 } 442} 443class AbortException extends BaseException { 444 constructor(msg) { 445 super(msg, "AbortException"); 446 } 447} 448function bytesToString(bytes) { 449 if (typeof bytes !== "object" || bytes?.length === undefined) { 450 unreachable("Invalid argument for bytesToString"); 451 } 452 const length = bytes.length; 453 const MAX_ARGUMENT_COUNT = 8192; 454 if (length < MAX_ARGUMENT_COUNT) { 455 return String.fromCharCode.apply(null, bytes); 456 } 457 const strBuf = []; 458 for (let i = 0; i < length; i += MAX_ARGUMENT_COUNT) { 459 const chunkEnd = Math.min(i + MAX_ARGUMENT_COUNT, length); 460 const chunk = bytes.subarray(i, chunkEnd); 461 strBuf.push(String.fromCharCode.apply(null, chunk)); 462 } 463 return strBuf.join(""); 464} 465function stringToBytes(str) { 466 if (typeof str !== "string") { 467 unreachable("Invalid argument for stringToBytes"); 468 } 469 const length = str.length; 470 const bytes = new Uint8Array(length); 471 for (let i = 0; i < length; ++i) { 472 bytes[i] = str.charCodeAt(i) & 0xff;
473 } 474 return bytes; 475} 476function string32(value) { 477 return String.fromCharCode(value >> 24 & 0xff, value >> 16 & 0xff, value >> 8 & 0xff, value & 0xff); 478} 479function objectSize(obj) { 480 return Object.keys(obj).length; 481} 482function objectFromMap(map) { 483 const obj = Object.create(null); 484 for (const [key, value] of map) { 485 obj[key] = value; 486 } 487 return obj; 488} 489function isLittleEndian() { 490 const buffer8 = new Uint8Array(4); 491 buffer8[0] = 1; 492 const view32 = new Uint32Array(buffer8.buffer, 0, 1); 493 return view32[0] === 1; 494} 495function isEvalSupported() { 496 try { 497 new Function(""); 498 return true; 499 } catch { 500 return false; 501 } 502} 503class FeatureTest { 504 static get isLittleEndian() { 505 return shadow(this, "isLittleEndian", isLittleEndian()); 506 } 507 static get isEvalSupported() { 508 return shadow(this, "isEvalSupported", isEvalSupported()); 509 } 510 static get isOffscreenCanvasSupported() { 511 return shadow(this, "isOffscreenCanvasSupported", typeof OffscreenCanvas !== "undefined"); 512 } 513 static get platform() { 514 if (typeof navigator !== "undefined" && typeof navigator?.platform === "string") { 515 return shadow(this, "platform", { 516 isMac: navigator.platform.includes("Mac"), 517 isWindows: navigator.platform.includes("Win"), 518 isFirefox: typeof navigator?.userAgent === "string" && navigator.userAgent.includes("Firefox") 519 }); 520 } 521 return shadow(this, "platform", { 522 isMac: false, 523 isWindows: false, 524 isFirefox: false 525 }); 526 } 527 static get isCSSRoundSupported() { 528 return shadow(this, "isCSSRoundSupported", globalThis.CSS?.supports?.("width: round(1.5px, 1px)")); 529 } 530} 531const hexNumbers = Array.from(Array(256).keys(), n => n.toString(16).padStart(2, "0")); 532class Util { 533 static makeHexColor(r, g, b) { 534 return `#${hexNumbers[r]}${hexNumbers[g]}${hexNumbers[b]}`; 535 } 536 static scaleMinMax(transform, minMax) { 537 let temp; 538 if (transform[0]) { 539 if (transform[0] < 0) { 540 temp = minMax[0]; 541 minMax[0] = minMax[2]; 542 minMax[2] = temp; 543 } 544 minMax[0] *= transform[0]; 545 minMax[2] *= transform[0]; 546 if (transform[3] < 0) { 547 temp = minMax[1]; 548 minMax[1] = minMax[3]; 549 minMax[3] = temp; 550 } 551 minMax[1] *= transform[3]; 552 minMax[3] *= transform[3]; 553 } else { 554 temp = minMax[0]; 555 minMax[0] = minMax[1]; 556 minMax[1] = temp; 557 temp = minMax[2]; 558 minMax[2] = minMax[3]; 559 minMax[3] = temp; 560 if (transform[1] < 0) { 561 temp = minMax[1]; 562 minMax[1] = minMax[3]; 563 minMax[3] = temp; 564 } 565 minMax[1] *= transform[1]; 566 minMax[3] *= transform[1]; 567 if (transform[2] < 0) { 568 temp = minMax[0]; 569 minMax[0] = minMax[2]; 570 minMax[2] = temp; 571 } 572 minMax[0] *= transform[2]; 573 minMax[2] *= transform[2]; 574 } 575 minMax[0] += transform[4]; 576 minMax[1] += transform[5]; 577 minMax[2] += transform[4]; 578 minMax[3] += transform[5]; 579 } 580 static transform(m1, m2) { 581 return [m1[0] * m2[0] + m1[2] * m2[1], m1[1] * m2[0] + m1[3] * m2[1], m1[0] * m2[2] + m1[2] * m2[3], m1[1] * m2[2] + m1[3] * m2[3], m1[0] * m2[4] + m1[2] * m2[5] + m1[4], m1[1] * m2[4] + m1[3] * m2[5] + m1[5]]; 582 } 583 static applyTransform(p, m) { 584 const xt = p[0] * m[0] + p[1] * m[2] + m[4]; 585 const yt = p[0] * m[1] + p[1] * m[3] + m[5]; 586 return [xt, yt]; 587 } 588 static applyInverseTransform(p, m) { 589 const d = m[0] * m[3] - m[1] * m[2]; 590 const xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d; 591 const yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d; 592 return [xt, yt]; 593 } 594 static getAxialAlignedBoundingBox(r, m) { 595 const p1 = this.applyTransform(r, m); 596 const p2 = this.applyTransform(r.slice(2, 4), m); 597 const p3 = this.applyTransform([r[0], r[3]], m); 598 const p4 = this.applyTransform([r[2], r[1]], m); 599 return [Math.min(p1[0], p2[0], p3[0], p4[0]), Math.min(p1[1], p2[1], p3[1], p4[1]), Math.max(p1[0], p2[0], p3[0], p4[0]), Math.max(p1[1], p2[1], p3[1], p4[1])]; 600 } 601 static inverseTransform(m) { 602 const d = m[0] * m[3] - m[1] * m[2]; 603 return [m[3] / d, -m[1] / d, -m[2] / d, m[0] / d, (m[2] * m[5] - m[4] * m[3]) / d, (m[4] * m[1] - m[5] * m[0]) / d]; 604 } 605 static singularValueDecompose2dScale(m) { 606 const transpose = [m[0], m[2], m[1], m[3]]; 607 const a = m[0] * transpose[0] + m[1] * transpose[2]; 608 const b = m[0] * transpose[1] + m[1] * transpose[3]; 609 const c = m[2] * transpose[0] + m[3] * transpose[2]; 610 const d = m[2] * transpose[1] + m[3] * transpose[3]; 611 const first = (a + d) / 2; 612 const second = Math.sqrt((a + d) ** 2 - 4 * (a * d - c * b)) / 2; 613 const sx = first + second || 1; 614 const sy = first - second || 1; 615 return [Math.sqrt(sx), Math.sqrt(sy)]; 616 } 617 static normalizeRect(rect) { 618 const r = rect.slice(0); 619 if (rect[0] > rect[2]) { 620 r[0] = rect[2]; 621 r[2] = rect[0]; 622 } 623 if (rect[1] > rect[3]) { 624 r[1] = rect[3]; 625 r[3] = rect[1]; 626 } 627 return r; 628 } 629 static intersect(rect1, rect2) { 630 const xLow = Math.max(Math.min(rect1[0], rect1[2]), Math.min(rect2[0], rect2[2])); 631 const xHigh = Math.min(Math.max(rect1[0], rect1[2]), Math.max(rect2[0], rect2[2])); 632 if (xLow > xHigh) { 633 return null; 634 } 635 const yLow = Math.max(Math.min(rect1[1], rect1[3]), Math.min(rect2[1], rect2[3])); 636 const yHigh = Math.min(Math.max(rect1[1], rect1[3]), Math.max(rect2[1], rect2[3])); 637 if (yLow > yHigh) { 638 return null; 639 } 640 return [xLow, yLow, xHigh, yHigh]; 641 } 642 static #getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, t, minMax) { 643 if (t <= 0 || t >= 1) { 644 return; 645 } 646 const mt = 1 - t; 647 const tt = t * t; 648 const ttt = tt * t; 649 const x = mt * (mt * (mt * x0 + 3 * t * x1) + 3 * tt * x2) + ttt * x3; 650 const y = mt * (mt * (mt * y0 + 3 * t * y1) + 3 * tt * y2) + ttt * y3; 651 minMax[0] = Math.min(minMax[0], x); 652 minMax[1] = Math.min(minMax[1], y); 653 minMax[2] = Math.max(minMax[2], x); 654 minMax[3] = Math.max(minMax[3], y); 655 } 656 static #getExtremum(x0, x1, x2, x3, y0, y1, y2, y3, a, b, c, minMax) { 657 if (Math.abs(a) < 1e-12) { 658 if (Math.abs(b) >= 1e-12) { 659 this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, -c / b, minMax); 660 } 661 return; 662 } 663 const delta = b ** 2 - 4 * c * a; 664 if (delta < 0) { 665 return; 666 } 667 const sqrtDelta = Math.sqrt(delta); 668 const a2 = 2 * a; 669 this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, (-b + sqrtDelta) / a2, minMax); 670 this.#getExtremumOnCurve(x0, x1, x2, x3, y0, y1, y2, y3, (-b - sqrtDelta) / a2, minMax); 671 } 672 static bezierBoundingBox(x0, y0, x1, y1, x2, y2, x3, y3, minMax) { 673 if (minMax) { 674 minMax[0] = Math.min(minMax[0], x0, x3); 675 minMax[1] = Math.min(minMax[1], y0, y3); 676 minMax[2] = Math.max(minMax[2], x0, x3); 677 minMax[3] = Math.max(minMax[3], y0, y3); 678 } else { 679 minMax = [Math.min(x0, x3), Math.min(y0, y3), Math.max(x0, x3), Math.max(y0, y3)]; 680 } 681 this.#getExtremum(x0, x1, x2, x3, y0, y1, y2, y3, 3 * (-x0 + 3 * (x1 - x2) + x3), 6 * (x0 - 2 * x1 + x2), 3 * (x1 - x0), minMax); 682 this.#getExtremum(x0, x1, x2, x3, y0, y1, y2, y3, 3 * (-y0 + 3 * (y1 - y2) + y3), 6 * (y0 - 2 * y1 + y2), 3 * (y1 - y0), minMax); 683 return minMax; 684 } 685} 686const PDFStringTranslateTable = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2d8, 0x2c7, 0x2c6, 0x2d9, 0x2dd, 0x2db, 0x2da, 0x2dc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014, 0x2013, 0x192, 0x2044, 0x2039, 0x203a, 0x2212, 0x2030, 0x201e, 0x201c, 0x201d, 0x2018, 0x2019, 0x201a, 0x2122, 0xfb01, 0xfb02, 0x141, 0x152, 0x160, 0x178, 0x17d, 0x131, 0x142, 0x153, 0x161, 0x17e, 0, 0x20ac]; 687function stringToPDFString(str) { 688 if (str[0] >= "\xEF") { 689 let encoding; 690 if (str[0] === "\xFE" && str[1] === "\xFF") { 691 encoding = "utf-16be"; 692 if (str.length % 2 === 1) { 693 str = str.slice(0, -1); 694 } 695 } else if (str[0] === "\xFF" && str[1] === "\xFE") { 696 encoding = "utf-16le"; 697 if (str.length % 2 === 1) { 698 str = str.slice(0, -1); 699 } 700 } else if (str[0] === "\xEF" && str[1] === "\xBB" && str[2] === "\xBF") { 701 encoding = "utf-8"; 702 } 703 if (encoding) {
vendor: 4,120 bytes, lines 704-842
704 try { 705 const decoder = new TextDecoder(encoding, { 706 fatal: true 707 }); 708 const buffer = stringToBytes(str); 709 const decoded = decoder.decode(buffer); 710 if (!decoded.includes("\x1b")) { 711 return decoded; 712 } 713 return decoded.replaceAll(/\x1b[^\x1b]*(?:\x1b|$)/g, ""); 714 } catch (ex) { 715 warn(`stringToPDFString: "${ex}".`); 716 } 717 } 718 } 719 const strBuf = []; 720 for (let i = 0, ii = str.length; i < ii; i++) { 721 const charCode = str.charCodeAt(i); 722 if (charCode === 0x1b) { 723 while (++i < ii && str.charCodeAt(i) !== 0x1b) {} 724 continue; 725 } 726 const code = PDFStringTranslateTable[charCode]; 727 strBuf.push(code ? String.fromCharCode(code) : str.charAt(i)); 728 } 729 return strBuf.join(""); 730} 731function stringToUTF8String(str) { 732 return decodeURIComponent(escape(str)); 733} 734function utf8StringToString(str) { 735 return unescape(encodeURIComponent(str)); 736} 737function isArrayEqual(arr1, arr2) { 738 if (arr1.length !== arr2.length) { 739 return false; 740 } 741 for (let i = 0, ii = arr1.length; i < ii; i++) { 742 if (arr1[i] !== arr2[i]) { 743 return false; 744 } 745 } 746 return true; 747} 748function getModificationDate(date = new Date()) { 749 const buffer = [date.getUTCFullYear().toString(), (date.getUTCMonth() + 1).toString().padStart(2, "0"), date.getUTCDate().toString().padStart(2, "0"), date.getUTCHours().toString().padStart(2, "0"), date.getUTCMinutes().toString().padStart(2, "0"), date.getUTCSeconds().toString().padStart(2, "0")]; 750 return buffer.join(""); 751} 752let NormalizeRegex = null; 753let NormalizationMap = null; 754function normalizeUnicode(str) { 755 if (!NormalizeRegex) { 756 NormalizeRegex = /([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu; 757 NormalizationMap = new Map([["ſt", "ſt"]]); 758 } 759 return str.replaceAll(NormalizeRegex, (_, p1, p2) => p1 ? p1.normalize("NFKC") : NormalizationMap.get(p2)); 760} 761function getUuid() { 762 if (typeof crypto !== "undefined" && typeof crypto?.randomUUID === "function") { 763 return crypto.randomUUID(); 764 } 765 const buf = new Uint8Array(32); 766 if (typeof crypto !== "undefined" && typeof crypto?.getRandomValues === "function") { 767 crypto.getRandomValues(buf); 768 } else { 769 for (let i = 0; i < 32; i++) { 770 buf[i] = Math.floor(Math.random() * 255); 771 } 772 } 773 return bytesToString(buf); 774} 775const AnnotationPrefix = "pdfjs_internal_id_"; 776const FontRenderOps = { 777 BEZIER_CURVE_TO: 0, 778 MOVE_TO: 1, 779 LINE_TO: 2, 780 QUADRATIC_CURVE_TO: 3, 781 RESTORE: 4, 782 SAVE: 5, 783 SCALE: 6, 784 TRANSFORM: 7, 785 TRANSLATE: 8 786}; 787function toHexUtil(arr) { 788 if (Uint8Array.prototype.toHex) { 789 return arr.toHex(); 790 } 791 return Array.from(arr, num => hexNumbers[num]).join(""); 792} 793function toBase64Util(arr) { 794 if (Uint8Array.prototype.toBase64) { 795 return arr.toBase64(); 796 } 797 return btoa(bytesToString(arr)); 798} 799function fromBase64Util(str) { 800 if (Uint8Array.fromBase64) { 801 return Uint8Array.fromBase64(str); 802 } 803 return stringToBytes(atob(str)); 804} 805 806;// ./src/core/primitives.js 807 808const CIRCULAR_REF = Symbol("CIRCULAR_REF"); 809const EOF = Symbol("EOF"); 810let CmdCache = Object.create(null); 811let NameCache = Object.create(null); 812let RefCache = Object.create(null); 813function clearPrimitiveCaches() { 814 CmdCache = Object.create(null); 815 NameCache = Object.create(null); 816 RefCache = Object.create(null); 817} 818class Name { 819 constructor(name) { 820 this.name = name; 821 } 822 static get(name) { 823 return NameCache[name] ||= new Name(name); 824 } 825} 826class Cmd { 827 constructor(cmd) { 828 this.cmd = cmd; 829 } 830 static get(cmd) { 831 return CmdCache[cmd] ||= new Cmd(cmd); 832 } 833} 834const nonSerializable = function nonSerializableClosure() { 835 return nonSerializable; 836}; 837class Dict { 838 constructor(xref = null) { 839 this._map = Object.create(null); 840 this.xref = xref; 841 this.objId = null; 842 this.suppressEncryption = false;
vendor: 4,097 bytes, lines 843-1000
843 this.__nonSerializable__ = nonSerializable; 844 } 845 assignXref(newXref) { 846 this.xref = newXref; 847 } 848 get size() { 849 return Object.keys(this._map).length; 850 } 851 get(key1, key2, key3) { 852 let value = this._map[key1]; 853 if (value === undefined && key2 !== undefined) { 854 value = this._map[key2]; 855 if (value === undefined && key3 !== undefined) { 856 value = this._map[key3]; 857 } 858 } 859 if (value instanceof Ref && this.xref) { 860 return this.xref.fetch(value, this.suppressEncryption); 861 } 862 return value; 863 } 864 async getAsync(key1, key2, key3) { 865 let value = this._map[key1]; 866 if (value === undefined && key2 !== undefined) { 867 value = this._map[key2]; 868 if (value === undefined && key3 !== undefined) { 869 value = this._map[key3]; 870 } 871 } 872 if (value instanceof Ref && this.xref) { 873 return this.xref.fetchAsync(value, this.suppressEncryption); 874 } 875 return value; 876 } 877 getArray(key1, key2, key3) { 878 let value = this._map[key1]; 879 if (value === undefined && key2 !== undefined) { 880 value = this._map[key2]; 881 if (value === undefined && key3 !== undefined) { 882 value = this._map[key3]; 883 } 884 } 885 if (value instanceof Ref && this.xref) { 886 value = this.xref.fetch(value, this.suppressEncryption); 887 } 888 if (Array.isArray(value)) { 889 value = value.slice(); 890 for (let i = 0, ii = value.length; i < ii; i++) { 891 if (value[i] instanceof Ref && this.xref) { 892 value[i] = this.xref.fetch(value[i], this.suppressEncryption); 893 } 894 } 895 } 896 return value; 897 } 898 getRaw(key) { 899 return this._map[key]; 900 } 901 getKeys() { 902 return Object.keys(this._map); 903 } 904 getRawValues() { 905 return Object.values(this._map); 906 } 907 set(key, value) { 908 this._map[key] = value; 909 } 910 has(key) { 911 return this._map[key] !== undefined; 912 } 913 forEach(callback) { 914 for (const key in this._map) { 915 callback(key, this.get(key)); 916 } 917 } 918 static get empty() { 919 const emptyDict = new Dict(null); 920 emptyDict.set = (key, value) => { 921 unreachable("Should not call `set` on the empty dictionary."); 922 }; 923 return shadow(this, "empty", emptyDict); 924 } 925 static merge({ 926 xref, 927 dictArray, 928 mergeSubDicts = false 929 }) { 930 const mergedDict = new Dict(xref), 931 properties = new Map(); 932 for (const dict of dictArray) { 933 if (!(dict instanceof Dict)) { 934 continue; 935 } 936 for (const [key, value] of Object.entries(dict._map)) { 937 let property = properties.get(key); 938 if (property === undefined) { 939 property = []; 940 properties.set(key, property); 941 } else if (!mergeSubDicts || !(value instanceof Dict)) { 942 continue; 943 } 944 property.push(value); 945 } 946 } 947 for (const [name, values] of properties) { 948 if (values.length === 1 || !(values[0] instanceof Dict)) { 949 mergedDict._map[name] = values[0]; 950 continue; 951 } 952 const subDict = new Dict(xref); 953 for (const dict of values) { 954 for (const [key, value] of Object.entries(dict._map)) { 955 if (subDict._map[key] === undefined) { 956 subDict._map[key] = value; 957 } 958 } 959 } 960 if (subDict.size > 0) { 961 mergedDict._map[name] = subDict; 962 } 963 } 964 properties.clear(); 965 return mergedDict.size > 0 ? mergedDict : Dict.empty; 966 } 967 clone() { 968 const dict = new Dict(this.xref); 969 for (const key of this.getKeys()) { 970 dict.set(key, this.getRaw(key)); 971 } 972 return dict; 973 } 974 delete(key) { 975 delete this._map[key]; 976 } 977} 978class Ref { 979 constructor(num, gen) { 980 this.num = num; 981 this.gen = gen; 982 } 983 toString() { 984 if (this.gen === 0) { 985 return `${this.num}R`; 986 } 987 return `${this.num}R${this.gen}`; 988 } 989 static fromString(str) { 990 const ref = RefCache[str]; 991 if (ref) { 992 return ref; 993 } 994 const m = /^(\d+)R(\d*)$/.exec(str); 995 if (!m || m[1] === "0") { 996 return null; 997 } 998 return RefCache[str] = new Ref(parseInt(m[1]), !m[2] ? 0 : parseInt(m[2])); 999 } 1000 static get(num, gen) {
vendor: 17,004 bytes, lines 1001-1658
1001 const key = gen === 0 ? `${num}R` : `${num}R${gen}`; 1002 return RefCache[key] ||= new Ref(num, gen); 1003 } 1004} 1005class RefSet { 1006 constructor(parent = null) { 1007 this._set = new Set(parent?._set); 1008 } 1009 has(ref) { 1010 return this._set.has(ref.toString()); 1011 } 1012 put(ref) { 1013 this._set.add(ref.toString()); 1014 } 1015 remove(ref) { 1016 this._set.delete(ref.toString()); 1017 } 1018 [Symbol.iterator]() { 1019 return this._set.values(); 1020 } 1021 clear() { 1022 this._set.clear(); 1023 } 1024} 1025class RefSetCache { 1026 constructor() { 1027 this._map = new Map(); 1028 } 1029 get size() { 1030 return this._map.size; 1031 } 1032 get(ref) { 1033 return this._map.get(ref.toString()); 1034 } 1035 has(ref) { 1036 return this._map.has(ref.toString()); 1037 } 1038 put(ref, obj) { 1039 this._map.set(ref.toString(), obj); 1040 } 1041 putAlias(ref, aliasRef) { 1042 this._map.set(ref.toString(), this.get(aliasRef)); 1043 } 1044 [Symbol.iterator]() { 1045 return this._map.values(); 1046 } 1047 clear() { 1048 this._map.clear(); 1049 } 1050 *items() { 1051 for (const [ref, value] of this._map) { 1052 yield [Ref.fromString(ref), value]; 1053 } 1054 } 1055} 1056function isName(v, name) { 1057 return v instanceof Name && (name === undefined || v.name === name); 1058} 1059function isCmd(v, cmd) { 1060 return v instanceof Cmd && (cmd === undefined || v.cmd === cmd); 1061} 1062function isDict(v, type) { 1063 return v instanceof Dict && (type === undefined || isName(v.get("Type"), type)); 1064} 1065function isRefsEqual(v1, v2) { 1066 return v1.num === v2.num && v1.gen === v2.gen; 1067} 1068 1069;// ./src/core/base_stream.js 1070 1071class BaseStream { 1072 get length() { 1073 unreachable("Abstract getter `length` accessed"); 1074 } 1075 get isEmpty() { 1076 unreachable("Abstract getter `isEmpty` accessed"); 1077 } 1078 get isDataLoaded() { 1079 return shadow(this, "isDataLoaded", true); 1080 } 1081 getByte() { 1082 unreachable("Abstract method `getByte` called"); 1083 } 1084 getBytes(length) { 1085 unreachable("Abstract method `getBytes` called"); 1086 } 1087 async getImageData(length, decoderOptions) { 1088 return this.getBytes(length, decoderOptions); 1089 } 1090 async asyncGetBytes() { 1091 unreachable("Abstract method `asyncGetBytes` called"); 1092 } 1093 get isAsync() { 1094 return false; 1095 } 1096 get canAsyncDecodeImageFromBuffer() { 1097 return false; 1098 } 1099 async getTransferableImage() { 1100 return null; 1101 } 1102 peekByte() { 1103 const peekedByte = this.getByte(); 1104 if (peekedByte !== -1) { 1105 this.pos--; 1106 } 1107 return peekedByte; 1108 } 1109 peekBytes(length) { 1110 const bytes = this.getBytes(length); 1111 this.pos -= bytes.length; 1112 return bytes; 1113 } 1114 getUint16() { 1115 const b0 = this.getByte(); 1116 const b1 = this.getByte(); 1117 if (b0 === -1 || b1 === -1) { 1118 return -1; 1119 } 1120 return (b0 << 8) + b1; 1121 } 1122 getInt32() { 1123 const b0 = this.getByte(); 1124 const b1 = this.getByte(); 1125 const b2 = this.getByte(); 1126 const b3 = this.getByte(); 1127 return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3; 1128 } 1129 getByteRange(begin, end) { 1130 unreachable("Abstract method `getByteRange` called"); 1131 } 1132 getString(length) { 1133 return bytesToString(this.getBytes(length)); 1134 } 1135 skip(n) { 1136 this.pos += n || 1; 1137 } 1138 reset() { 1139 unreachable("Abstract method `reset` called"); 1140 } 1141 moveStart() { 1142 unreachable("Abstract method `moveStart` called"); 1143 } 1144 makeSubStream(start, length, dict = null) { 1145 unreachable("Abstract method `makeSubStream` called"); 1146 } 1147 getBaseStreams() { 1148 return null; 1149 } 1150} 1151 1152;// ./src/core/core_utils.js 1153 1154 1155 1156const PDF_VERSION_REGEXP = /^[1-9]\.\d$/; 1157function getLookupTableFactory(initializer) { 1158 let lookup; 1159 return function () { 1160 if (initializer) { 1161 lookup = Object.create(null); 1162 initializer(lookup); 1163 initializer = null; 1164 } 1165 return lookup; 1166 }; 1167} 1168class MissingDataException extends BaseException { 1169 constructor(begin, end) { 1170 super(`Missing data [${begin}, ${end})`, "MissingDataException"); 1171 this.begin = begin; 1172 this.end = end; 1173 } 1174} 1175class ParserEOFException extends BaseException { 1176 constructor(msg) { 1177 super(msg, "ParserEOFException"); 1178 } 1179} 1180class XRefEntryException extends BaseException { 1181 constructor(msg) { 1182 super(msg, "XRefEntryException"); 1183 } 1184} 1185class XRefParseException extends BaseException { 1186 constructor(msg) { 1187 super(msg, "XRefParseException"); 1188 } 1189} 1190function arrayBuffersToBytes(arr) { 1191 const length = arr.length; 1192 if (length === 0) { 1193 return new Uint8Array(0); 1194 } 1195 if (length === 1) { 1196 return new Uint8Array(arr[0]); 1197 } 1198 let dataLength = 0; 1199 for (let i = 0; i < length; i++) { 1200 dataLength += arr[i].byteLength; 1201 } 1202 const data = new Uint8Array(dataLength); 1203 let pos = 0; 1204 for (let i = 0; i < length; i++) { 1205 const item = new Uint8Array(arr[i]); 1206 data.set(item, pos); 1207 pos += item.byteLength; 1208 } 1209 return data; 1210} 1211function getInheritableProperty({ 1212 dict, 1213 key, 1214 getArray = false, 1215 stopWhenFound = true 1216}) { 1217 let values; 1218 const visited = new RefSet(); 1219 while (dict instanceof Dict && !(dict.objId && visited.has(dict.objId))) { 1220 if (dict.objId) { 1221 visited.put(dict.objId); 1222 } 1223 const value = getArray ? dict.getArray(key) : dict.get(key); 1224 if (value !== undefined) { 1225 if (stopWhenFound) { 1226 return value; 1227 } 1228 (values ||= []).push(value); 1229 } 1230 dict = dict.get("Parent"); 1231 } 1232 return values; 1233} 1234const ROMAN_NUMBER_MAP = ["", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM", "", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC", "", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"]; 1235function toRomanNumerals(number, lowerCase = false) { 1236 assert(Number.isInteger(number) && number > 0, "The number should be a positive integer."); 1237 const romanBuf = []; 1238 let pos; 1239 while (number >= 1000) { 1240 number -= 1000; 1241 romanBuf.push("M"); 1242 } 1243 pos = number / 100 | 0; 1244 number %= 100; 1245 romanBuf.push(ROMAN_NUMBER_MAP[pos]); 1246 pos = number / 10 | 0; 1247 number %= 10; 1248 romanBuf.push(ROMAN_NUMBER_MAP[10 + pos]); 1249 romanBuf.push(ROMAN_NUMBER_MAP[20 + number]); 1250 const romanStr = romanBuf.join(""); 1251 return lowerCase ? romanStr.toLowerCase() : romanStr; 1252} 1253function log2(x) { 1254 if (x <= 0) { 1255 return 0; 1256 } 1257 return Math.ceil(Math.log2(x)); 1258} 1259function readInt8(data, offset) { 1260 return data[offset] << 24 >> 24; 1261} 1262function readUint16(data, offset) { 1263 return data[offset] << 8 | data[offset + 1]; 1264} 1265function readUint32(data, offset) { 1266 return (data[offset] << 24 | data[offset + 1] << 16 | data[offset + 2] << 8 | data[offset + 3]) >>> 0; 1267} 1268function isWhiteSpace(ch) { 1269 return ch === 0x20 || ch === 0x09 || ch === 0x0d || ch === 0x0a; 1270} 1271function isBooleanArray(arr, len) { 1272 return Array.isArray(arr) && (len === null || arr.length === len) && arr.every(x => typeof x === "boolean"); 1273} 1274function isNumberArray(arr, len) { 1275 if (Array.isArray(arr)) { 1276 return (len === null || arr.length === len) && arr.every(x => typeof x === "number"); 1277 } 1278 return ArrayBuffer.isView(arr) && (arr.length === 0 || typeof arr[0] === "number") && (len === null || arr.length === len); 1279} 1280function lookupMatrix(arr, fallback) { 1281 return isNumberArray(arr, 6) ? arr : fallback; 1282} 1283function lookupRect(arr, fallback) { 1284 return isNumberArray(arr, 4) ? arr : fallback; 1285} 1286function lookupNormalRect(arr, fallback) { 1287 return isNumberArray(arr, 4) ? Util.normalizeRect(arr) : fallback; 1288} 1289function parseXFAPath(path) { 1290 const positionPattern = /(.+)\[(\d+)\]$/; 1291 return path.split(".").map(component => { 1292 const m = component.match(positionPattern); 1293 if (m) { 1294 return { 1295 name: m[1], 1296 pos: parseInt(m[2], 10) 1297 }; 1298 } 1299 return { 1300 name: component, 1301 pos: 0 1302 }; 1303 }); 1304} 1305function escapePDFName(str) { 1306 const buffer = []; 1307 let start = 0; 1308 for (let i = 0, ii = str.length; i < ii; i++) { 1309 const char = str.charCodeAt(i); 1310 if (char < 0x21 || char > 0x7e || char === 0x23 || char === 0x28 || char === 0x29 || char === 0x3c || char === 0x3e || char === 0x5b || char === 0x5d || char === 0x7b || char === 0x7d || char === 0x2f || char === 0x25) { 1311 if (start < i) { 1312 buffer.push(str.substring(start, i)); 1313 } 1314 buffer.push(`#${char.toString(16)}`); 1315 start = i + 1; 1316 } 1317 } 1318 if (buffer.length === 0) { 1319 return str; 1320 } 1321 if (start < str.length) { 1322 buffer.push(str.substring(start, str.length)); 1323 } 1324 return buffer.join(""); 1325} 1326function escapeString(str) { 1327 return str.replaceAll(/([()\\\n\r])/g, match => { 1328 if (match === "\n") { 1329 return "\\n"; 1330 } else if (match === "\r") { 1331 return "\\r"; 1332 } 1333 return `\\${match}`; 1334 }); 1335} 1336function _collectJS(entry, xref, list, parents) { 1337 if (!entry) { 1338 return; 1339 } 1340 let parent = null; 1341 if (entry instanceof Ref) { 1342 if (parents.has(entry)) { 1343 return; 1344 } 1345 parent = entry; 1346 parents.put(parent); 1347 entry = xref.fetch(entry); 1348 } 1349 if (Array.isArray(entry)) { 1350 for (const element of entry) { 1351 _collectJS(element, xref, list, parents); 1352 } 1353 } else if (entry instanceof Dict) { 1354 if (isName(entry.get("S"), "JavaScript")) { 1355 const js = entry.get("JS"); 1356 let code; 1357 if (js instanceof BaseStream) { 1358 code = js.getString(); 1359 } else if (typeof js === "string") { 1360 code = js; 1361 } 1362 code &&= stringToPDFString(code).replaceAll("\x00", ""); 1363 if (code) { 1364 list.push(code); 1365 } 1366 } 1367 _collectJS(entry.getRaw("Next"), xref, list, parents); 1368 } 1369 if (parent) { 1370 parents.remove(parent); 1371 } 1372} 1373function collectActions(xref, dict, eventType) { 1374 const actions = Object.create(null); 1375 const additionalActionsDicts = getInheritableProperty({ 1376 dict, 1377 key: "AA", 1378 stopWhenFound: false 1379 }); 1380 if (additionalActionsDicts) { 1381 for (let i = additionalActionsDicts.length - 1; i >= 0; i--) { 1382 const additionalActions = additionalActionsDicts[i]; 1383 if (!(additionalActions instanceof Dict)) { 1384 continue; 1385 } 1386 for (const key of additionalActions.getKeys()) { 1387 const action = eventType[key]; 1388 if (!action) { 1389 continue; 1390 } 1391 const actionDict = additionalActions.getRaw(key); 1392 const parents = new RefSet(); 1393 const list = []; 1394 _collectJS(actionDict, xref, list, parents); 1395 if (list.length > 0) { 1396 actions[action] = list; 1397 } 1398 } 1399 } 1400 } 1401 if (dict.has("A")) { 1402 const actionDict = dict.get("A"); 1403 const parents = new RefSet(); 1404 const list = []; 1405 _collectJS(actionDict, xref, list, parents); 1406 if (list.length > 0) { 1407 actions.Action = list; 1408 } 1409 } 1410 return objectSize(actions) > 0 ? actions : null; 1411} 1412const XMLEntities = { 1413 0x3c: "<", 1414 0x3e: ">", 1415 0x26: "&", 1416 0x22: """, 1417 0x27: "'" 1418}; 1419function* codePointIter(str) { 1420 for (let i = 0, ii = str.length; i < ii; i++) { 1421 const char = str.codePointAt(i); 1422 if (char > 0xd7ff && (char < 0xe000 || char > 0xfffd)) { 1423 i++; 1424 } 1425 yield char; 1426 } 1427} 1428function encodeToXmlString(str) { 1429 const buffer = []; 1430 let start = 0; 1431 for (let i = 0, ii = str.length; i < ii; i++) { 1432 const char = str.codePointAt(i); 1433 if (0x20 <= char && char <= 0x7e) { 1434 const entity = XMLEntities[char]; 1435 if (entity) { 1436 if (start < i) { 1437 buffer.push(str.substring(start, i)); 1438 } 1439 buffer.push(entity); 1440 start = i + 1; 1441 } 1442 } else { 1443 if (start < i) { 1444 buffer.push(str.substring(start, i)); 1445 } 1446 buffer.push(`&#x${char.toString(16).toUpperCase()};`); 1447 if (char > 0xd7ff && (char < 0xe000 || char > 0xfffd)) { 1448 i++; 1449 } 1450 start = i + 1; 1451 } 1452 } 1453 if (buffer.length === 0) { 1454 return str; 1455 } 1456 if (start < str.length) { 1457 buffer.push(str.substring(start, str.length)); 1458 } 1459 return buffer.join(""); 1460} 1461function validateFontName(fontFamily, mustWarn = false) { 1462 const m = /^("|').*("|')$/.exec(fontFamily); 1463 if (m && m[1] === m[2]) { 1464 const re = new RegExp(`[^\\\\]${m[1]}`); 1465 if (re.test(fontFamily.slice(1, -1))) { 1466 if (mustWarn) { 1467 warn(`FontFamily contains unescaped ${m[1]}: ${fontFamily}.`); 1468 } 1469 return false; 1470 } 1471 } else { 1472 for (const ident of fontFamily.split(/[ \t]+/)) { 1473 if (/^(\d|(-(\d|-)))/.test(ident) || !/^[\w-\\]+$/.test(ident)) { 1474 if (mustWarn) { 1475 warn(`FontFamily contains invalid <custom-ident>: ${fontFamily}.`); 1476 } 1477 return false; 1478 } 1479 } 1480 } 1481 return true; 1482} 1483function validateCSSFont(cssFontInfo) { 1484 const DEFAULT_CSS_FONT_OBLIQUE = "14"; 1485 const DEFAULT_CSS_FONT_WEIGHT = "400"; 1486 const CSS_FONT_WEIGHT_VALUES = new Set(["100", "200", "300", "400", "500", "600", "700", "800", "900", "1000", "normal", "bold", "bolder", "lighter"]); 1487 const { 1488 fontFamily, 1489 fontWeight, 1490 italicAngle 1491 } = cssFontInfo; 1492 if (!validateFontName(fontFamily, true)) { 1493 return false; 1494 } 1495 const weight = fontWeight ? fontWeight.toString() : ""; 1496 cssFontInfo.fontWeight = CSS_FONT_WEIGHT_VALUES.has(weight) ? weight : DEFAULT_CSS_FONT_WEIGHT; 1497 const angle = parseFloat(italicAngle); 1498 cssFontInfo.italicAngle = isNaN(angle) || angle < -90 || angle > 90 ? DEFAULT_CSS_FONT_OBLIQUE : italicAngle.toString(); 1499 return true; 1500} 1501function recoverJsURL(str) { 1502 const URL_OPEN_METHODS = ["app.launchURL", "window.open", "xfa.host.gotoURL"]; 1503 const regex = new RegExp("^\\s*(" + URL_OPEN_METHODS.join("|").replaceAll(".", "\\.") + ")\\((?:'|\")([^'\"]*)(?:'|\")(?:,\\s*(\\w+)\\)|\\))", "i"); 1504 const jsUrl = regex.exec(str); 1505 if (jsUrl?.[2]) { 1506 const url = jsUrl[2]; 1507 let newWindow = false; 1508 if (jsUrl[3] === "true" && jsUrl[1] === "app.launchURL") { 1509 newWindow = true; 1510 } 1511 return { 1512 url, 1513 newWindow 1514 }; 1515 } 1516 return null; 1517} 1518function numberToString(value) { 1519 if (Number.isInteger(value)) { 1520 return value.toString(); 1521 } 1522 const roundedValue = Math.round(value * 100); 1523 if (roundedValue % 100 === 0) { 1524 return (roundedValue / 100).toString(); 1525 } 1526 if (roundedValue % 10 === 0) { 1527 return value.toFixed(1); 1528 } 1529 return value.toFixed(2); 1530} 1531function getNewAnnotationsMap(annotationStorage) { 1532 if (!annotationStorage) { 1533 return null; 1534 } 1535 const newAnnotationsByPage = new Map(); 1536 for (const [key, value] of annotationStorage) { 1537 if (!key.startsWith(AnnotationEditorPrefix)) { 1538 continue; 1539 } 1540 let annotations = newAnnotationsByPage.get(value.pageIndex); 1541 if (!annotations) { 1542 annotations = []; 1543 newAnnotationsByPage.set(value.pageIndex, annotations); 1544 } 1545 annotations.push(value); 1546 } 1547 return newAnnotationsByPage.size > 0 ? newAnnotationsByPage : null; 1548} 1549function stringToAsciiOrUTF16BE(str) { 1550 return isAscii(str) ? str : stringToUTF16String(str, true); 1551} 1552function isAscii(str) { 1553 return /^[\x00-\x7F]*$/.test(str); 1554} 1555function stringToUTF16HexString(str) { 1556 const buf = []; 1557 for (let i = 0, ii = str.length; i < ii; i++) { 1558 const char = str.charCodeAt(i); 1559 buf.push(hexNumbers[char >> 8 & 0xff], hexNumbers[char & 0xff]); 1560 } 1561 return buf.join(""); 1562} 1563function stringToUTF16String(str, bigEndian = false) { 1564 const buf = []; 1565 if (bigEndian) { 1566 buf.push("\xFE\xFF"); 1567 } 1568 for (let i = 0, ii = str.length; i < ii; i++) { 1569 const char = str.charCodeAt(i); 1570 buf.push(String.fromCharCode(char >> 8 & 0xff), String.fromCharCode(char & 0xff)); 1571 } 1572 return buf.join(""); 1573} 1574function getRotationMatrix(rotation, width, height) { 1575 switch (rotation) { 1576 case 90: 1577 return [0, 1, -1, 0, width, 0]; 1578 case 180: 1579 return [-1, 0, 0, -1, width, height]; 1580 case 270: 1581 return [0, -1, 1, 0, 0, height]; 1582 default: 1583 throw new Error("Invalid rotation"); 1584 } 1585} 1586function getSizeInBytes(x) { 1587 return Math.ceil(Math.ceil(Math.log2(1 + x)) / 8); 1588} 1589 1590;// ./src/core/stream.js 1591 1592 1593class Stream extends BaseStream { 1594 constructor(arrayBuffer, start, length, dict) { 1595 super(); 1596 this.bytes = arrayBuffer instanceof Uint8Array ? arrayBuffer : new Uint8Array(arrayBuffer); 1597 this.start = start || 0; 1598 this.pos = this.start; 1599 this.end = start + length || this.bytes.length; 1600 this.dict = dict; 1601 } 1602 get length() { 1603 return this.end - this.start; 1604 } 1605 get isEmpty() { 1606 return this.length === 0; 1607 } 1608 getByte() { 1609 if (this.pos >= this.end) { 1610 return -1; 1611 } 1612 return this.bytes[this.pos++]; 1613 } 1614 getBytes(length) { 1615 const bytes = this.bytes; 1616 const pos = this.pos; 1617 const strEnd = this.end; 1618 if (!length) { 1619 return bytes.subarray(pos, strEnd); 1620 } 1621 let end = pos + length; 1622 if (end > strEnd) { 1623 end = strEnd; 1624 } 1625 this.pos = end; 1626 return bytes.subarray(pos, end); 1627 } 1628 getByteRange(begin, end) { 1629 if (begin < 0) { 1630 begin = 0; 1631 } 1632 if (end > this.end) { 1633 end = this.end; 1634 } 1635 return this.bytes.subarray(begin, end); 1636 } 1637 reset() { 1638 this.pos = this.start; 1639 } 1640 moveStart() { 1641 this.start = this.pos; 1642 } 1643 makeSubStream(start, length, dict = null) { 1644 return new Stream(this.bytes.buffer, start, length, dict); 1645 } 1646} 1647class StringStream extends Stream { 1648 constructor(str) { 1649 super(stringToBytes(str)); 1650 } 1651} 1652class NullStream extends Stream { 1653 constructor() { 1654 super(new Uint8Array(0)); 1655 } 1656} 1657 1658;// ./src/core/chunked_stream.js
vendor: 9,426 bytes, lines 1658-1972
1658 1659 1660 1661 1662class ChunkedStream extends Stream { 1663 constructor(length, chunkSize, manager) { 1664 super(new Uint8Array(length), 0, length, null); 1665 this.chunkSize = chunkSize; 1666 this._loadedChunks = new Set(); 1667 this.numChunks = Math.ceil(length / chunkSize); 1668 this.manager = manager; 1669 this.progressiveDataLength = 0; 1670 this.lastSuccessfulEnsureByteChunk = -1; 1671 } 1672 getMissingChunks() { 1673 const chunks = []; 1674 for (let chunk = 0, n = this.numChunks; chunk < n; ++chunk) { 1675 if (!this._loadedChunks.has(chunk)) { 1676 chunks.push(chunk); 1677 } 1678 } 1679 return chunks; 1680 } 1681 get numChunksLoaded() { 1682 return this._loadedChunks.size; 1683 } 1684 get isDataLoaded() { 1685 return this.numChunksLoaded === this.numChunks; 1686 } 1687 onReceiveData(begin, chunk) { 1688 const chunkSize = this.chunkSize; 1689 if (begin % chunkSize !== 0) { 1690 throw new Error(`Bad begin offset: ${begin}`); 1691 } 1692 const end = begin + chunk.byteLength; 1693 if (end % chunkSize !== 0 && end !== this.bytes.length) { 1694 throw new Error(`Bad end offset: ${end}`); 1695 } 1696 this.bytes.set(new Uint8Array(chunk), begin); 1697 const beginChunk = Math.floor(begin / chunkSize); 1698 const endChunk = Math.floor((end - 1) / chunkSize) + 1; 1699 for (let curChunk = beginChunk; curChunk < endChunk; ++curChunk) { 1700 this._loadedChunks.add(curChunk); 1701 } 1702 } 1703 onReceiveProgressiveData(data) { 1704 let position = this.progressiveDataLength; 1705 const beginChunk = Math.floor(position / this.chunkSize); 1706 this.bytes.set(new Uint8Array(data), position); 1707 position += data.byteLength; 1708 this.progressiveDataLength = position; 1709 const endChunk = position >= this.end ? this.numChunks : Math.floor(position / this.chunkSize); 1710 for (let curChunk = beginChunk; curChunk < endChunk; ++curChunk) { 1711 this._loadedChunks.add(curChunk); 1712 } 1713 } 1714 ensureByte(pos) { 1715 if (pos < this.progressiveDataLength) { 1716 return; 1717 } 1718 const chunk = Math.floor(pos / this.chunkSize); 1719 if (chunk > this.numChunks) { 1720 return; 1721 } 1722 if (chunk === this.lastSuccessfulEnsureByteChunk) { 1723 return; 1724 } 1725 if (!this._loadedChunks.has(chunk)) { 1726 throw new MissingDataException(pos, pos + 1); 1727 } 1728 this.lastSuccessfulEnsureByteChunk = chunk; 1729 } 1730 ensureRange(begin, end) { 1731 if (begin >= end) { 1732 return; 1733 } 1734 if (end <= this.progressiveDataLength) { 1735 return; 1736 } 1737 const beginChunk = Math.floor(begin / this.chunkSize); 1738 if (beginChunk > this.numChunks) { 1739 return; 1740 } 1741 const endChunk = Math.min(Math.floor((end - 1) / this.chunkSize) + 1, this.numChunks); 1742 for (let chunk = beginChunk; chunk < endChunk; ++chunk) { 1743 if (!this._loadedChunks.has(chunk)) { 1744 throw new MissingDataException(begin, end); 1745 } 1746 } 1747 } 1748 nextEmptyChunk(beginChunk) { 1749 const numChunks = this.numChunks; 1750 for (let i = 0; i < numChunks; ++i) { 1751 const chunk = (beginChunk + i) % numChunks; 1752 if (!this._loadedChunks.has(chunk)) { 1753 return chunk; 1754 } 1755 } 1756 return null; 1757 } 1758 hasChunk(chunk) { 1759 return this._loadedChunks.has(chunk); 1760 } 1761 getByte() { 1762 const pos = this.pos; 1763 if (pos >= this.end) { 1764 return -1; 1765 } 1766 if (pos >= this.progressiveDataLength) { 1767 this.ensureByte(pos); 1768 } 1769 return this.bytes[this.pos++]; 1770 } 1771 getBytes(length) { 1772 const bytes = this.bytes; 1773 const pos = this.pos; 1774 const strEnd = this.end; 1775 if (!length) { 1776 if (strEnd > this.progressiveDataLength) { 1777 this.ensureRange(pos, strEnd); 1778 } 1779 return bytes.subarray(pos, strEnd); 1780 } 1781 let end = pos + length; 1782 if (end > strEnd) { 1783 end = strEnd; 1784 } 1785 if (end > this.progressiveDataLength) { 1786 this.ensureRange(pos, end); 1787 } 1788 this.pos = end; 1789 return bytes.subarray(pos, end); 1790 } 1791 getByteRange(begin, end) { 1792 if (begin < 0) { 1793 begin = 0; 1794 } 1795 if (end > this.end) { 1796 end = this.end; 1797 } 1798 if (end > this.progressiveDataLength) { 1799 this.ensureRange(begin, end); 1800 } 1801 return this.bytes.subarray(begin, end); 1802 } 1803 makeSubStream(start, length, dict = null) { 1804 if (length) { 1805 if (start + length > this.progressiveDataLength) { 1806 this.ensureRange(start, start + length); 1807 } 1808 } else if (start >= this.progressiveDataLength) { 1809 this.ensureByte(start); 1810 } 1811 function ChunkedStreamSubstream() {} 1812 ChunkedStreamSubstream.prototype = Object.create(this); 1813 ChunkedStreamSubstream.prototype.getMissingChunks = function () { 1814 const chunkSize = this.chunkSize; 1815 const beginChunk = Math.floor(this.start / chunkSize); 1816 const endChunk = Math.floor((this.end - 1) / chunkSize) + 1; 1817 const missingChunks = []; 1818 for (let chunk = beginChunk; chunk < endChunk; ++chunk) { 1819 if (!this._loadedChunks.has(chunk)) { 1820 missingChunks.push(chunk); 1821 } 1822 } 1823 return missingChunks; 1824 }; 1825 Object.defineProperty(ChunkedStreamSubstream.prototype, "isDataLoaded", { 1826 get() { 1827 if (this.numChunksLoaded === this.numChunks) { 1828 return true; 1829 } 1830 return this.getMissingChunks().length === 0; 1831 }, 1832 configurable: true 1833 }); 1834 const subStream = new ChunkedStreamSubstream(); 1835 subStream.pos = subStream.start = start; 1836 subStream.end = start + length || this.end; 1837 subStream.dict = dict; 1838 return subStream; 1839 } 1840 getBaseStreams() { 1841 return [this]; 1842 } 1843} 1844class ChunkedStreamManager { 1845 constructor(pdfNetworkStream, args) { 1846 this.length = args.length; 1847 this.chunkSize = args.rangeChunkSize; 1848 this.stream = new ChunkedStream(this.length, this.chunkSize, this); 1849 this.pdfNetworkStream = pdfNetworkStream; 1850 this.disableAutoFetch = args.disableAutoFetch; 1851 this.msgHandler = args.msgHandler; 1852 this.currRequestId = 0; 1853 this._chunksNeededByRequest = new Map(); 1854 this._requestsByChunk = new Map(); 1855 this._promisesByRequest = new Map(); 1856 this.progressiveDataLength = 0; 1857 this.aborted = false; 1858 this._loadedStreamCapability = Promise.withResolvers(); 1859 } 1860 sendRequest(begin, end) { 1861 const rangeReader = this.pdfNetworkStream.getRangeReader(begin, end); 1862 if (!rangeReader.isStreamingSupported) { 1863 rangeReader.onProgress = this.onProgress.bind(this); 1864 } 1865 let chunks = [], 1866 loaded = 0; 1867 return new Promise((resolve, reject) => { 1868 const readChunk = ({ 1869 value, 1870 done 1871 }) => { 1872 try { 1873 if (done) { 1874 const chunkData = arrayBuffersToBytes(chunks); 1875 chunks = null; 1876 resolve(chunkData); 1877 return; 1878 } 1879 loaded += value.byteLength; 1880 if (rangeReader.isStreamingSupported) { 1881 this.onProgress({ 1882 loaded 1883 }); 1884 } 1885 chunks.push(value); 1886 rangeReader.read().then(readChunk, reject); 1887 } catch (e) { 1888 reject(e); 1889 } 1890 }; 1891 rangeReader.read().then(readChunk, reject); 1892 }).then(data => { 1893 if (this.aborted) { 1894 return; 1895 } 1896 this.onReceiveData({ 1897 chunk: data, 1898 begin 1899 }); 1900 }); 1901 } 1902 requestAllChunks(noFetch = false) { 1903 if (!noFetch) { 1904 const missingChunks = this.stream.getMissingChunks(); 1905 this._requestChunks(missingChunks); 1906 } 1907 return this._loadedStreamCapability.promise; 1908 } 1909 _requestChunks(chunks) { 1910 const requestId = this.currRequestId++; 1911 const chunksNeeded = new Set(); 1912 this._chunksNeededByRequest.set(requestId, chunksNeeded); 1913 for (const chunk of chunks) { 1914 if (!this.stream.hasChunk(chunk)) { 1915 chunksNeeded.add(chunk); 1916 } 1917 } 1918 if (chunksNeeded.size === 0) { 1919 return Promise.resolve(); 1920 } 1921 const capability = Promise.withResolvers(); 1922 this._promisesByRequest.set(requestId, capability); 1923 const chunksToRequest = []; 1924 for (const chunk of chunksNeeded) { 1925 let requestIds = this._requestsByChunk.get(chunk); 1926 if (!requestIds) { 1927 requestIds = []; 1928 this._requestsByChunk.set(chunk, requestIds); 1929 chunksToRequest.push(chunk); 1930 } 1931 requestIds.push(requestId); 1932 } 1933 if (chunksToRequest.length > 0) { 1934 const groupedChunksToRequest = this.groupChunks(chunksToRequest); 1935 for (const groupedChunk of groupedChunksToRequest) { 1936 const begin = groupedChunk.beginChunk * this.chunkSize; 1937 const end = Math.min(groupedChunk.endChunk * this.chunkSize, this.length); 1938 this.sendRequest(begin, end).catch(capability.reject); 1939 } 1940 } 1941 return capability.promise.catch(reason => { 1942 if (this.aborted) { 1943 return; 1944 } 1945 throw reason; 1946 }); 1947 } 1948 getStream() { 1949 return this.stream; 1950 } 1951 requestRange(begin, end) { 1952 end = Math.min(end, this.length); 1953 const beginChunk = this.getBeginChunk(begin); 1954 const endChunk = this.getEndChunk(end); 1955 const chunks = []; 1956 for (let chunk = beginChunk; chunk < endChunk; ++chunk) { 1957 chunks.push(chunk); 1958 } 1959 return this._requestChunks(chunks); 1960 } 1961 requestRanges(ranges = []) { 1962 const chunksToRequest = []; 1963 for (const range of ranges) { 1964 const beginChunk = this.getBeginChunk(range.begin); 1965 const endChunk = this.getEndChunk(range.end); 1966 for (let chunk = beginChunk; chunk < endChunk; ++chunk) { 1967 if (!chunksToRequest.includes(chunk)) { 1968 chunksToRequest.push(chunk); 1969 } 1970 } 1971 } 1972 chunksToRequest.sort(
vendor: 7,843 bytes, lines 1972-2216
1972function (a, b) { 1973 return a - b; 1974 }); 1975 return this._requestChunks(chunksToRequest); 1976 } 1977 groupChunks(chunks) { 1978 const groupedChunks = []; 1979 let beginChunk = -1; 1980 let prevChunk = -1; 1981 for (let i = 0, ii = chunks.length; i < ii; ++i) { 1982 const chunk = chunks[i]; 1983 if (beginChunk < 0) { 1984 beginChunk = chunk; 1985 } 1986 if (prevChunk >= 0 && prevChunk + 1 !== chunk) { 1987 groupedChunks.push({ 1988 beginChunk, 1989 endChunk: prevChunk + 1 1990 }); 1991 beginChunk = chunk; 1992 } 1993 if (i + 1 === chunks.length) { 1994 groupedChunks.push({ 1995 beginChunk, 1996 endChunk: chunk + 1 1997 }); 1998 } 1999 prevChunk = chunk; 2000 } 2001 return groupedChunks; 2002 } 2003 onProgress(args) { 2004 this.msgHandler.send("DocProgress", { 2005 loaded: this.stream.numChunksLoaded * this.chunkSize + args.loaded, 2006 total: this.length 2007 }); 2008 } 2009 onReceiveData(args) { 2010 const chunk = args.chunk; 2011 const isProgressive = args.begin === undefined; 2012 const begin = isProgressive ? this.progressiveDataLength : args.begin; 2013 const end = begin + chunk.byteLength; 2014 const beginChunk = Math.floor(begin / this.chunkSize); 2015 const endChunk = end < this.length ? Math.floor(end / this.chunkSize) : Math.ceil(end / this.chunkSize); 2016 if (isProgressive) { 2017 this.stream.onReceiveProgressiveData(chunk); 2018 this.progressiveDataLength = end; 2019 } else { 2020 this.stream.onReceiveData(begin, chunk); 2021 } 2022 if (this.stream.isDataLoaded) { 2023 this._loadedStreamCapability.resolve(this.stream); 2024 } 2025 const loadedRequests = []; 2026 for (let curChunk = beginChunk; curChunk < endChunk; ++curChunk) { 2027 const requestIds = this._requestsByChunk.get(curChunk); 2028 if (!requestIds) { 2029 continue; 2030 } 2031 this._requestsByChunk.delete(curChunk); 2032 for (const requestId of requestIds) { 2033 const chunksNeeded = this._chunksNeededByRequest.get(requestId); 2034 if (chunksNeeded.has(curChunk)) { 2035 chunksNeeded.delete(curChunk); 2036 } 2037 if (chunksNeeded.size > 0) { 2038 continue; 2039 } 2040 loadedRequests.push(requestId); 2041 } 2042 } 2043 if (!this.disableAutoFetch && this._requestsByChunk.size === 0) { 2044 let nextEmptyChunk; 2045 if (this.stream.numChunksLoaded === 1) { 2046 const lastChunk = this.stream.numChunks - 1; 2047 if (!this.stream.hasChunk(lastChunk)) { 2048 nextEmptyChunk = lastChunk; 2049 } 2050 } else { 2051 nextEmptyChunk = this.stream.nextEmptyChunk(endChunk); 2052 } 2053 if (Number.isInteger(nextEmptyChunk)) { 2054 this._requestChunks([nextEmptyChunk]); 2055 } 2056 } 2057 for (const requestId of loadedRequests) { 2058 const capability = this._promisesByRequest.get(requestId); 2059 this._promisesByRequest.delete(requestId); 2060 capability.resolve(); 2061 } 2062 this.msgHandler.send("DocProgress", { 2063 loaded: this.stream.numChunksLoaded * this.chunkSize, 2064 total: this.length 2065 }); 2066 } 2067 onError(err) { 2068 this._loadedStreamCapability.reject(err); 2069 } 2070 getBeginChunk(begin) { 2071 return Math.floor(begin / this.chunkSize); 2072 } 2073 getEndChunk(end) { 2074 return Math.floor((end - 1) / this.chunkSize) + 1; 2075 } 2076 abort(reason) { 2077 this.aborted = true; 2078 this.pdfNetworkStream?.cancelAllRequests(reason); 2079 for (const capability of this._promisesByRequest.values()) { 2080 capability.reject(reason); 2081 } 2082 } 2083} 2084 2085;// ./src/core/colorspace.js 2086 2087 2088 2089 2090function resizeRgbImage(src, dest, w1, h1, w2, h2, alpha01) { 2091 const COMPONENTS = 3; 2092 alpha01 = alpha01 !== 1 ? 0 : alpha01; 2093 const xRatio = w1 / w2; 2094 const yRatio = h1 / h2; 2095 let newIndex = 0, 2096 oldIndex; 2097 const xScaled = new Uint16Array(w2); 2098 const w1Scanline = w1 * COMPONENTS; 2099 for (let i = 0; i < w2; i++) { 2100 xScaled[i] = Math.floor(i * xRatio) * COMPONENTS; 2101 } 2102 for (let i = 0; i < h2; i++) { 2103 const py = Math.floor(i * yRatio) * w1Scanline; 2104 for (let j = 0; j < w2; j++) { 2105 oldIndex = py + xScaled[j]; 2106 dest[newIndex++] = src[oldIndex++]; 2107 dest[newIndex++] = src[oldIndex++]; 2108 dest[newIndex++] = src[oldIndex++]; 2109 newIndex += alpha01; 2110 } 2111 } 2112} 2113function resizeRgbaImage(src, dest, w1, h1, w2, h2, alpha01) { 2114 const xRatio = w1 / w2; 2115 const yRatio = h1 / h2; 2116 let newIndex = 0; 2117 const xScaled = new Uint16Array(w2); 2118 if (alpha01 === 1) { 2119 for (let i = 0; i < w2; i++) { 2120 xScaled[i] = Math.floor(i * xRatio); 2121 } 2122 const src32 = new Uint32Array(src.buffer); 2123 const dest32 = new Uint32Array(dest.buffer); 2124 const rgbMask = FeatureTest.isLittleEndian ? 0x00ffffff : 0xffffff00; 2125 for (let i = 0; i < h2; i++) { 2126 const buf = src32.subarray(Math.floor(i * yRatio) * w1); 2127 for (let j = 0; j < w2; j++) { 2128 dest32[newIndex++] |= buf[xScaled[j]] & rgbMask; 2129 } 2130 } 2131 } else { 2132 const COMPONENTS = 4; 2133 const w1Scanline = w1 * COMPONENTS; 2134 for (let i = 0; i < w2; i++) { 2135 xScaled[i] = Math.floor(i * xRatio) * COMPONENTS; 2136 } 2137 for (let i = 0; i < h2; i++) { 2138 const buf = src.subarray(Math.floor(i * yRatio) * w1Scanline); 2139 for (let j = 0; j < w2; j++) { 2140 const oldIndex = xScaled[j]; 2141 dest[newIndex++] = buf[oldIndex]; 2142 dest[newIndex++] = buf[oldIndex + 1]; 2143 dest[newIndex++] = buf[oldIndex + 2]; 2144 } 2145 } 2146 } 2147} 2148function copyRgbaImage(src, dest, alpha01) { 2149 if (alpha01 === 1) { 2150 const src32 = new Uint32Array(src.buffer); 2151 const dest32 = new Uint32Array(dest.buffer); 2152 const rgbMask = FeatureTest.isLittleEndian ? 0x00ffffff : 0xffffff00; 2153 for (let i = 0, ii = src32.length; i < ii; i++) { 2154 dest32[i] |= src32[i] & rgbMask; 2155 } 2156 } else { 2157 let j = 0; 2158 for (let i = 0, ii = src.length; i < ii; i += 4) { 2159 dest[j++] = src[i]; 2160 dest[j++] = src[i + 1]; 2161 dest[j++] = src[i + 2]; 2162 } 2163 } 2164} 2165class ColorSpace { 2166 constructor(name, numComps) { 2167 this.name = name; 2168 this.numComps = numComps; 2169 } 2170 getRgb(src, srcOffset) { 2171 const rgb = new Uint8ClampedArray(3); 2172 this.getRgbItem(src, srcOffset, rgb, 0); 2173 return rgb; 2174 } 2175 getRgbItem(src, srcOffset, dest, destOffset) { 2176 unreachable("Should not call ColorSpace.getRgbItem"); 2177 } 2178 getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { 2179 unreachable("Should not call ColorSpace.getRgbBuffer"); 2180 } 2181 getOutputLength(inputLength, alpha01) { 2182 unreachable("Should not call ColorSpace.getOutputLength"); 2183 } 2184 isPassthrough(bits) { 2185 return false; 2186 } 2187 isDefaultDecode(decodeMap, bpc) { 2188 return ColorSpace.isDefaultDecode(decodeMap, this.numComps); 2189 } 2190 fillRgb(dest, originalWidth, originalHeight, width, height, actualHeight, bpc, comps, alpha01) { 2191 const count = originalWidth * originalHeight; 2192 let rgbBuf = null; 2193 const numComponentColors = 1 << bpc; 2194 const needsResizing = originalHeight !== height || originalWidth !== width; 2195 if (this.isPassthrough(bpc)) { 2196 rgbBuf = comps; 2197 } else if (this.numComps === 1 && count > numComponentColors && this.name !== "DeviceGray" && this.name !== "DeviceRGB") { 2198 const allColors = bpc <= 8 ? new Uint8Array(numComponentColors) : new Uint16Array(numComponentColors); 2199 for (let i = 0; i < numComponentColors; i++) { 2200 allColors[i] = i; 2201 } 2202 const colorMap = new Uint8ClampedArray(numComponentColors * 3); 2203 this.getRgbBuffer(allColors, 0, numComponentColors, colorMap, 0, bpc, 0); 2204 if (!needsResizing) { 2205 let destPos = 0; 2206 for (let i = 0; i < count; ++i) { 2207 const key = comps[i] * 3; 2208 dest[destPos++] = colorMap[key]; 2209 dest[destPos++] = colorMap[key + 1]; 2210 dest[destPos++] = colorMap[key + 2]; 2211 destPos += alpha01; 2212 } 2213 } else { 2214 rgbBuf = new Uint8Array(count * 3); 2215 let rgbPos = 0; 2216 for (let i = 0; i < count; ++i) {
vendor: 7,108 bytes, lines 2217-2421
2217 const key = comps[i] * 3; 2218 rgbBuf[rgbPos++] = colorMap[key]; 2219 rgbBuf[rgbPos++] = colorMap[key + 1]; 2220 rgbBuf[rgbPos++] = colorMap[key + 2]; 2221 } 2222 } 2223 } else if (!needsResizing) { 2224 this.getRgbBuffer(comps, 0, width * actualHeight, dest, 0, bpc, alpha01); 2225 } else { 2226 rgbBuf = new Uint8ClampedArray(count * 3); 2227 this.getRgbBuffer(comps, 0, count, rgbBuf, 0, bpc, 0); 2228 } 2229 if (rgbBuf) { 2230 if (needsResizing) { 2231 resizeRgbImage(rgbBuf, dest, originalWidth, originalHeight, width, height, alpha01); 2232 } else { 2233 let destPos = 0, 2234 rgbPos = 0; 2235 for (let i = 0, ii = width * actualHeight; i < ii; i++) { 2236 dest[destPos++] = rgbBuf[rgbPos++]; 2237 dest[destPos++] = rgbBuf[rgbPos++]; 2238 dest[destPos++] = rgbBuf[rgbPos++]; 2239 destPos += alpha01; 2240 } 2241 } 2242 } 2243 } 2244 get usesZeroToOneRange() { 2245 return shadow(this, "usesZeroToOneRange", true); 2246 } 2247 static _cache(cacheKey, xref, localColorSpaceCache, parsedColorSpace) { 2248 if (!localColorSpaceCache) { 2249 throw new Error('ColorSpace._cache - expected "localColorSpaceCache" argument.'); 2250 } 2251 if (!parsedColorSpace) { 2252 throw new Error('ColorSpace._cache - expected "parsedColorSpace" argument.'); 2253 } 2254 let csName, csRef; 2255 if (cacheKey instanceof Ref) { 2256 csRef = cacheKey; 2257 cacheKey = xref.fetch(cacheKey); 2258 } 2259 if (cacheKey instanceof Name) { 2260 csName = cacheKey.name; 2261 } 2262 if (csName || csRef) { 2263 localColorSpaceCache.set(csName, csRef, parsedColorSpace); 2264 } 2265 } 2266 static getCached(cacheKey, xref, localColorSpaceCache) { 2267 if (!localColorSpaceCache) { 2268 throw new Error('ColorSpace.getCached - expected "localColorSpaceCache" argument.'); 2269 } 2270 if (cacheKey instanceof Ref) { 2271 const localColorSpace = localColorSpaceCache.getByRef(cacheKey); 2272 if (localColorSpace) { 2273 return localColorSpace; 2274 } 2275 try { 2276 cacheKey = xref.fetch(cacheKey); 2277 } catch (ex) { 2278 if (ex instanceof MissingDataException) { 2279 throw ex; 2280 } 2281 } 2282 } 2283 if (cacheKey instanceof Name) { 2284 const localColorSpace = localColorSpaceCache.getByName(cacheKey.name); 2285 if (localColorSpace) { 2286 return localColorSpace; 2287 } 2288 } 2289 return null; 2290 } 2291 static async parseAsync({ 2292 cs, 2293 xref, 2294 resources = null, 2295 pdfFunctionFactory, 2296 localColorSpaceCache 2297 }) { 2298 const parsedColorSpace = this._parse(cs, xref, resources, pdfFunctionFactory); 2299 this._cache(cs, xref, localColorSpaceCache, parsedColorSpace); 2300 return parsedColorSpace; 2301 } 2302 static parse({ 2303 cs, 2304 xref, 2305 resources = null, 2306 pdfFunctionFactory, 2307 localColorSpaceCache 2308 }) { 2309 const cachedColorSpace = this.getCached(cs, xref, localColorSpaceCache); 2310 if (cachedColorSpace) { 2311 return cachedColorSpace; 2312 } 2313 const parsedColorSpace = this._parse(cs, xref, resources, pdfFunctionFactory); 2314 this._cache(cs, xref, localColorSpaceCache, parsedColorSpace); 2315 return parsedColorSpace; 2316 } 2317 static _parse(cs, xref, resources = null, pdfFunctionFactory) { 2318 cs = xref.fetchIfRef(cs); 2319 if (cs instanceof Name) { 2320 switch (cs.name) { 2321 case "G": 2322 case "DeviceGray": 2323 return this.singletons.gray; 2324 case "RGB": 2325 case "DeviceRGB": 2326 return this.singletons.rgb; 2327 case "DeviceRGBA": 2328 return this.singletons.rgba; 2329 case "CMYK": 2330 case "DeviceCMYK": 2331 return this.singletons.cmyk; 2332 case "Pattern": 2333 return new PatternCS(null); 2334 default: 2335 if (resources instanceof Dict) { 2336 const colorSpaces = resources.get("ColorSpace"); 2337 if (colorSpaces instanceof Dict) { 2338 const resourcesCS = colorSpaces.get(cs.name); 2339 if (resourcesCS) { 2340 if (resourcesCS instanceof Name) { 2341 return this._parse(resourcesCS, xref, resources, pdfFunctionFactory); 2342 } 2343 cs = resourcesCS; 2344 break; 2345 } 2346 } 2347 } 2348 warn(`Unrecognized ColorSpace: ${cs.name}`); 2349 return this.singletons.gray; 2350 } 2351 } 2352 if (Array.isArray(cs)) { 2353 const mode = xref.fetchIfRef(cs[0]).name; 2354 let params, numComps, baseCS, whitePoint, blackPoint, gamma; 2355 switch (mode) { 2356 case "G": 2357 case "DeviceGray": 2358 return this.singletons.gray; 2359 case "RGB": 2360 case "DeviceRGB": 2361 return this.singletons.rgb; 2362 case "CMYK": 2363 case "DeviceCMYK": 2364 return this.singletons.cmyk; 2365 case "CalGray": 2366 params = xref.fetchIfRef(cs[1]); 2367 whitePoint = params.getArray("WhitePoint"); 2368 blackPoint = params.getArray("BlackPoint"); 2369 gamma = params.get("Gamma"); 2370 return new CalGrayCS(whitePoint, blackPoint, gamma); 2371 case "CalRGB": 2372 params = xref.fetchIfRef(cs[1]); 2373 whitePoint = params.getArray("WhitePoint"); 2374 blackPoint = params.getArray("BlackPoint"); 2375 gamma = params.getArray("Gamma"); 2376 const matrix = params.getArray("Matrix"); 2377 return new CalRGBCS(whitePoint, blackPoint, gamma, matrix); 2378 case "ICCBased": 2379 const stream = xref.fetchIfRef(cs[1]); 2380 const dict = stream.dict; 2381 numComps = dict.get("N"); 2382 const alt = dict.get("Alternate"); 2383 if (alt) { 2384 const altCS = this._parse(alt, xref, resources, pdfFunctionFactory); 2385 if (altCS.numComps === numComps) { 2386 return altCS; 2387 } 2388 warn("ICCBased color space: Ignoring incorrect /Alternate entry."); 2389 } 2390 if (numComps === 1) { 2391 return this.singletons.gray; 2392 } else if (numComps === 3) { 2393 return this.singletons.rgb; 2394 } else if (numComps === 4) { 2395 return this.singletons.cmyk; 2396 } 2397 break; 2398 case "Pattern": 2399 baseCS = cs[1] || null; 2400 if (baseCS) { 2401 baseCS = this._parse(baseCS, xref, resources, pdfFunctionFactory); 2402 } 2403 return new PatternCS(baseCS); 2404 case "I": 2405 case "Indexed": 2406 baseCS = this._parse(cs[1], xref, resources, pdfFunctionFactory); 2407 const hiVal = Math.max(0, Math.min(xref.fetchIfRef(cs[2]), 255)); 2408 const lookup = xref.fetchIfRef(cs[3]); 2409 return new IndexedCS(baseCS, hiVal, lookup); 2410 case "Separation": 2411 case "DeviceN": 2412 const name = xref.fetchIfRef(cs[1]); 2413 numComps = Array.isArray(name) ? name.length : 1; 2414 baseCS = this._parse(cs[2], xref, resources, pdfFunctionFactory); 2415 const tintFn = pdfFunctionFactory.create(cs[3]); 2416 return new AlternateCS(numComps, baseCS, tintFn); 2417 case "Lab": 2418 params = xref.fetchIfRef(cs[1]); 2419 whitePoint = params.getArray("WhitePoint"); 2420 blackPoint = params.getArray("BlackPoint"); 2421 const range = params.getArray("Range");
vendor: 34,903 bytes, lines 2422-3482
2422 return new LabCS(whitePoint, blackPoint, range); 2423 default: 2424 warn(`Unimplemented ColorSpace object: ${mode}`); 2425 return this.singletons.gray; 2426 } 2427 } 2428 warn(`Unrecognized ColorSpace object: ${cs}`); 2429 return this.singletons.gray; 2430 } 2431 static isDefaultDecode(decode, numComps) { 2432 if (!Array.isArray(decode)) { 2433 return true; 2434 } 2435 if (numComps * 2 !== decode.length) { 2436 warn("The decode map is not the correct length"); 2437 return true; 2438 } 2439 for (let i = 0, ii = decode.length; i < ii; i += 2) { 2440 if (decode[i] !== 0 || decode[i + 1] !== 1) { 2441 return false; 2442 } 2443 } 2444 return true; 2445 } 2446 static get singletons() { 2447 return shadow(this, "singletons", { 2448 get gray() { 2449 return shadow(this, "gray", new DeviceGrayCS()); 2450 }, 2451 get rgb() { 2452 return shadow(this, "rgb", new DeviceRgbCS()); 2453 }, 2454 get rgba() { 2455 return shadow(this, "rgba", new DeviceRgbaCS()); 2456 }, 2457 get cmyk() { 2458 return shadow(this, "cmyk", new DeviceCmykCS()); 2459 } 2460 }); 2461 } 2462} 2463class AlternateCS extends ColorSpace { 2464 constructor(numComps, base, tintFn) { 2465 super("Alternate", numComps); 2466 this.base = base; 2467 this.tintFn = tintFn; 2468 this.tmpBuf = new Float32Array(base.numComps); 2469 } 2470 getRgbItem(src, srcOffset, dest, destOffset) { 2471 const tmpBuf = this.tmpBuf; 2472 this.tintFn(src, srcOffset, tmpBuf, 0); 2473 this.base.getRgbItem(tmpBuf, 0, dest, destOffset); 2474 } 2475 getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { 2476 const tintFn = this.tintFn; 2477 const base = this.base; 2478 const scale = 1 / ((1 << bits) - 1); 2479 const baseNumComps = base.numComps; 2480 const usesZeroToOneRange = base.usesZeroToOneRange; 2481 const isPassthrough = (base.isPassthrough(8) || !usesZeroToOneRange) && alpha01 === 0; 2482 let pos = isPassthrough ? destOffset : 0; 2483 const baseBuf = isPassthrough ? dest : new Uint8ClampedArray(baseNumComps * count); 2484 const numComps = this.numComps; 2485 const scaled = new Float32Array(numComps); 2486 const tinted = new Float32Array(baseNumComps); 2487 let i, j; 2488 for (i = 0; i < count; i++) { 2489 for (j = 0; j < numComps; j++) { 2490 scaled[j] = src[srcOffset++] * scale; 2491 } 2492 tintFn(scaled, 0, tinted, 0); 2493 if (usesZeroToOneRange) { 2494 for (j = 0; j < baseNumComps; j++) { 2495 baseBuf[pos++] = tinted[j] * 255; 2496 } 2497 } else { 2498 base.getRgbItem(tinted, 0, baseBuf, pos); 2499 pos += baseNumComps; 2500 } 2501 } 2502 if (!isPassthrough) { 2503 base.getRgbBuffer(baseBuf, 0, count, dest, destOffset, 8, alpha01); 2504 } 2505 } 2506 getOutputLength(inputLength, alpha01) { 2507 return this.base.getOutputLength(inputLength * this.base.numComps / this.numComps, alpha01); 2508 } 2509} 2510class PatternCS extends ColorSpace { 2511 constructor(baseCS) { 2512 super("Pattern", null); 2513 this.base = baseCS; 2514 } 2515 isDefaultDecode(decodeMap, bpc) { 2516 unreachable("Should not call PatternCS.isDefaultDecode"); 2517 } 2518} 2519class IndexedCS extends ColorSpace { 2520 constructor(base, highVal, lookup) { 2521 super("Indexed", 1); 2522 this.base = base; 2523 const length = base.numComps * (highVal + 1); 2524 this.lookup = new Uint8Array(length); 2525 if (lookup instanceof BaseStream) { 2526 const bytes = lookup.getBytes(length); 2527 this.lookup.set(bytes); 2528 } else if (typeof lookup === "string") { 2529 for (let i = 0; i < length; ++i) { 2530 this.lookup[i] = lookup.charCodeAt(i) & 0xff; 2531 } 2532 } else { 2533 throw new FormatError(`IndexedCS - unrecognized lookup table: ${lookup}`); 2534 } 2535 } 2536 getRgbItem(src, srcOffset, dest, destOffset) { 2537 const numComps = this.base.numComps; 2538 const start = src[srcOffset] * numComps; 2539 this.base.getRgbBuffer(this.lookup, start, 1, dest, destOffset, 8, 0); 2540 } 2541 getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { 2542 const base = this.base; 2543 const numComps = base.numComps; 2544 const outputDelta = base.getOutputLength(numComps, alpha01); 2545 const lookup = this.lookup; 2546 for (let i = 0; i < count; ++i) { 2547 const lookupPos = src[srcOffset++] * numComps; 2548 base.getRgbBuffer(lookup, lookupPos, 1, dest, destOffset, 8, alpha01); 2549 destOffset += outputDelta; 2550 } 2551 } 2552 getOutputLength(inputLength, alpha01) { 2553 return this.base.getOutputLength(inputLength * this.base.numComps, alpha01); 2554 } 2555 isDefaultDecode(decodeMap, bpc) { 2556 if (!Array.isArray(decodeMap)) { 2557 return true; 2558 } 2559 if (decodeMap.length !== 2) { 2560 warn("Decode map length is not correct"); 2561 return true; 2562 } 2563 if (!Number.isInteger(bpc) || bpc < 1) { 2564 warn("Bits per component is not correct"); 2565 return true; 2566 } 2567 return decodeMap[0] === 0 && decodeMap[1] === (1 << bpc) - 1; 2568 } 2569} 2570class DeviceGrayCS extends ColorSpace { 2571 constructor() { 2572 super("DeviceGray", 1); 2573 } 2574 getRgbItem(src, srcOffset, dest, destOffset) { 2575 const c = src[srcOffset] * 255; 2576 dest[destOffset] = dest[destOffset + 1] = dest[destOffset + 2] = c; 2577 } 2578 getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { 2579 const scale = 255 / ((1 << bits) - 1); 2580 let j = srcOffset, 2581 q = destOffset; 2582 for (let i = 0; i < count; ++i) { 2583 const c = scale * src[j++]; 2584 dest[q++] = c; 2585 dest[q++] = c; 2586 dest[q++] = c; 2587 q += alpha01; 2588 } 2589 } 2590 getOutputLength(inputLength, alpha01) { 2591 return inputLength * (3 + alpha01); 2592 } 2593} 2594class DeviceRgbCS extends ColorSpace { 2595 constructor() { 2596 super("DeviceRGB", 3); 2597 } 2598 getRgbItem(src, srcOffset, dest, destOffset) { 2599 dest[destOffset] = src[srcOffset] * 255; 2600 dest[destOffset + 1] = src[srcOffset + 1] * 255; 2601 dest[destOffset + 2] = src[srcOffset + 2] * 255; 2602 } 2603 getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { 2604 if (bits === 8 && alpha01 === 0) { 2605 dest.set(src.subarray(srcOffset, srcOffset + count * 3), destOffset); 2606 return; 2607 } 2608 const scale = 255 / ((1 << bits) - 1); 2609 let j = srcOffset, 2610 q = destOffset; 2611 for (let i = 0; i < count; ++i) { 2612 dest[q++] = scale * src[j++]; 2613 dest[q++] = scale * src[j++]; 2614 dest[q++] = scale * src[j++]; 2615 q += alpha01; 2616 } 2617 } 2618 getOutputLength(inputLength, alpha01) { 2619 return inputLength * (3 + alpha01) / 3 | 0; 2620 } 2621 isPassthrough(bits) { 2622 return bits === 8; 2623 } 2624} 2625class DeviceRgbaCS extends ColorSpace { 2626 constructor() { 2627 super("DeviceRGBA", 4); 2628 } 2629 getOutputLength(inputLength, _alpha01) { 2630 return inputLength * 4; 2631 } 2632 isPassthrough(bits) { 2633 return bits === 8; 2634 } 2635 fillRgb(dest, originalWidth, originalHeight, width, height, actualHeight, bpc, comps, alpha01) { 2636 if (originalHeight !== height || originalWidth !== width) { 2637 resizeRgbaImage(comps, dest, originalWidth, originalHeight, width, height, alpha01); 2638 } else { 2639 copyRgbaImage(comps, dest, alpha01); 2640 } 2641 } 2642} 2643class DeviceCmykCS extends ColorSpace { 2644 constructor() { 2645 super("DeviceCMYK", 4); 2646 } 2647 #toRgb(src, srcOffset, srcScale, dest, destOffset) { 2648 const c = src[srcOffset] * srcScale; 2649 const m = src[srcOffset + 1] * srcScale; 2650 const y = src[srcOffset + 2] * srcScale; 2651 const k = src[srcOffset + 3] * srcScale; 2652 dest[destOffset] = 255 + c * (-4.387332384609988 * c + 54.48615194189176 * m + 18.82290502165302 * y + 212.25662451639585 * k + -285.2331026137004) + m * (1.7149763477362134 * m - 5.6096736904047315 * y + -17.873870861415444 * k - 5.497006427196366) + y * (-2.5217340131683033 * y - 21.248923337353073 * k + 17.5119270841813) + k * (-21.86122147463605 * k - 189.48180835922747); 2653 dest[destOffset + 1] = 255 + c * (8.841041422036149 * c + 60.118027045597366 * m + 6.871425592049007 * y + 31.159100130055922 * k + -79.2970844816548) + m * (-15.310361306967817 * m + 17.575251261109482 * y + 131.35250912493976 * k - 190.9453302588951) + y * (4.444339102852739 * y + 9.8632861493405 * k - 24.86741582555878) + k * (-20.737325471181034 * k - 187.80453709719578); 2654 dest[destOffset + 2] = 255 + c * (0.8842522430003296 * c + 8.078677503112928 * m + 30.89978309703729 * y - 0.23883238689178934 * k + -14.183576799673286) + m * (10.49593273432072 * m + 63.02378494754052 * y + 50.606957656360734 * k - 112.23884253719248) + y * (0.03296041114873217 * y + 115.60384449646641 * k + -193.58209356861505) + k * (-22.33816807309886 * k - 180.12613974708367); 2655 } 2656 getRgbItem(src, srcOffset, dest, destOffset) { 2657 this.#toRgb(src, srcOffset, 1, dest, destOffset); 2658 } 2659 getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { 2660 const scale = 1 / ((1 << bits) - 1); 2661 for (let i = 0; i < count; i++) { 2662 this.#toRgb(src, srcOffset, scale, dest, destOffset); 2663 srcOffset += 4; 2664 destOffset += 3 + alpha01; 2665 } 2666 } 2667 getOutputLength(inputLength, alpha01) { 2668 return inputLength / 4 * (3 + alpha01) | 0; 2669 } 2670} 2671class CalGrayCS extends ColorSpace { 2672 constructor(whitePoint, blackPoint, gamma) { 2673 super("CalGray", 1); 2674 if (!whitePoint) { 2675 throw new FormatError("WhitePoint missing - required for color space CalGray"); 2676 } 2677 [this.XW, this.YW, this.ZW] = whitePoint; 2678 [this.XB, this.YB, this.ZB] = blackPoint || [0, 0, 0]; 2679 this.G = gamma || 1; 2680 if (this.XW < 0 || this.ZW < 0 || this.YW !== 1) { 2681 throw new FormatError(`Invalid WhitePoint components for ${this.name}, no fallback available`); 2682 } 2683 if (this.XB < 0 || this.YB < 0 || this.ZB < 0) { 2684 info(`Invalid BlackPoint for ${this.name}, falling back to default.`); 2685 this.XB = this.YB = this.ZB = 0; 2686 } 2687 if (this.XB !== 0 || this.YB !== 0 || this.ZB !== 0) { 2688 warn(`${this.name}, BlackPoint: XB: ${this.XB}, YB: ${this.YB}, ` + `ZB: ${this.ZB}, only default values are supported.`); 2689 } 2690 if (this.G < 1) { 2691 info(`Invalid Gamma: ${this.G} for ${this.name}, falling back to default.`); 2692 this.G = 1; 2693 } 2694 } 2695 #toRgb(src, srcOffset, dest, destOffset, scale) { 2696 const A = src[srcOffset] * scale; 2697 const AG = A ** this.G; 2698 const L = this.YW * AG; 2699 const val = Math.max(295.8 * L ** 0.3333333333333333 - 40.8, 0); 2700 dest[destOffset] = val; 2701 dest[destOffset + 1] = val; 2702 dest[destOffset + 2] = val; 2703 } 2704 getRgbItem(src, srcOffset, dest, destOffset) { 2705 this.#toRgb(src, srcOffset, dest, destOffset, 1); 2706 } 2707 getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { 2708 const scale = 1 / ((1 << bits) - 1); 2709 for (let i = 0; i < count; ++i) { 2710 this.#toRgb(src, srcOffset, dest, destOffset, scale); 2711 srcOffset += 1; 2712 destOffset += 3 + alpha01; 2713 } 2714 } 2715 getOutputLength(inputLength, alpha01) { 2716 return inputLength * (3 + alpha01); 2717 } 2718} 2719class CalRGBCS extends ColorSpace { 2720 static #BRADFORD_SCALE_MATRIX = new Float32Array([0.8951, 0.2664, -0.1614, -0.7502, 1.7135, 0.0367, 0.0389, -0.0685, 1.0296]); 2721 static #BRADFORD_SCALE_INVERSE_MATRIX = new Float32Array([0.9869929, -0.1470543, 0.1599627, 0.4323053, 0.5183603, 0.0492912, -0.0085287, 0.0400428, 0.9684867]); 2722 static #SRGB_D65_XYZ_TO_RGB_MATRIX = new Float32Array([3.2404542, -1.5371385, -0.4985314, -0.9692660, 1.8760108, 0.0415560, 0.0556434, -0.2040259, 1.0572252]); 2723 static #FLAT_WHITEPOINT_MATRIX = new Float32Array([1, 1, 1]); 2724 static #tempNormalizeMatrix = new Float32Array(3); 2725 static #tempConvertMatrix1 = new Float32Array(3); 2726 static #tempConvertMatrix2 = new Float32Array(3); 2727 static #DECODE_L_CONSTANT = ((8 + 16) / 116) ** 3 / 8.0; 2728 constructor(whitePoint, blackPoint, gamma, matrix) { 2729 super("CalRGB", 3); 2730 if (!whitePoint) { 2731 throw new FormatError("WhitePoint missing - required for color space CalRGB"); 2732 } 2733 const [XW, YW, ZW] = this.whitePoint = whitePoint; 2734 const [XB, YB, ZB] = this.blackPoint = blackPoint || new Float32Array(3); 2735 [this.GR, this.GG, this.GB] = gamma || new Float32Array([1, 1, 1]); 2736 [this.MXA, this.MYA, this.MZA, this.MXB, this.MYB, this.MZB, this.MXC, this.MYC, this.MZC] = matrix || new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1]); 2737 if (XW < 0 || ZW < 0 || YW !== 1) { 2738 throw new FormatError(`Invalid WhitePoint components for ${this.name}, no fallback available`); 2739 } 2740 if (XB < 0 || YB < 0 || ZB < 0) { 2741 info(`Invalid BlackPoint for ${this.name} [${XB}, ${YB}, ${ZB}], ` + "falling back to default."); 2742 this.blackPoint = new Float32Array(3); 2743 } 2744 if (this.GR < 0 || this.GG < 0 || this.GB < 0) { 2745 info(`Invalid Gamma [${this.GR}, ${this.GG}, ${this.GB}] for ` + `${this.name}, falling back to default.`); 2746 this.GR = this.GG = this.GB = 1; 2747 } 2748 } 2749 #matrixProduct(a, b, result) { 2750 result[0] = a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; 2751 result[1] = a[3] * b[0] + a[4] * b[1] + a[5] * b[2]; 2752 result[2] = a[6] * b[0] + a[7] * b[1] + a[8] * b[2]; 2753 } 2754 #toFlat(sourceWhitePoint, LMS, result) { 2755 result[0] = LMS[0] * 1 / sourceWhitePoint[0]; 2756 result[1] = LMS[1] * 1 / sourceWhitePoint[1]; 2757 result[2] = LMS[2] * 1 / sourceWhitePoint[2]; 2758 } 2759 #toD65(sourceWhitePoint, LMS, result) { 2760 const D65X = 0.95047; 2761 const D65Y = 1; 2762 const D65Z = 1.08883; 2763 result[0] = LMS[0] * D65X / sourceWhitePoint[0]; 2764 result[1] = LMS[1] * D65Y / sourceWhitePoint[1]; 2765 result[2] = LMS[2] * D65Z / sourceWhitePoint[2]; 2766 } 2767 #sRGBTransferFunction(color) { 2768 if (color <= 0.0031308) { 2769 return this.#adjustToRange(0, 1, 12.92 * color); 2770 } 2771 if (color >= 0.99554525) { 2772 return 1; 2773 } 2774 return this.#adjustToRange(0, 1, (1 + 0.055) * color ** (1 / 2.4) - 0.055); 2775 } 2776 #adjustToRange(min, max, value) { 2777 return Math.max(min, Math.min(max, value)); 2778 } 2779 #decodeL(L) { 2780 if (L < 0) { 2781 return -this.#decodeL(-L); 2782 } 2783 if (L > 8.0) { 2784 return ((L + 16) / 116) ** 3; 2785 } 2786 return L * CalRGBCS.#DECODE_L_CONSTANT; 2787 } 2788 #compensateBlackPoint(sourceBlackPoint, XYZ_Flat, result) { 2789 if (sourceBlackPoint[0] === 0 && sourceBlackPoint[1] === 0 && sourceBlackPoint[2] === 0) { 2790 result[0] = XYZ_Flat[0]; 2791 result[1] = XYZ_Flat[1]; 2792 result[2] = XYZ_Flat[2]; 2793 return; 2794 } 2795 const zeroDecodeL = this.#decodeL(0); 2796 const X_DST = zeroDecodeL; 2797 const X_SRC = this.#decodeL(sourceBlackPoint[0]); 2798 const Y_DST = zeroDecodeL; 2799 const Y_SRC = this.#decodeL(sourceBlackPoint[1]); 2800 const Z_DST = zeroDecodeL; 2801 const Z_SRC = this.#decodeL(sourceBlackPoint[2]); 2802 const X_Scale = (1 - X_DST) / (1 - X_SRC); 2803 const X_Offset = 1 - X_Scale; 2804 const Y_Scale = (1 - Y_DST) / (1 - Y_SRC); 2805 const Y_Offset = 1 - Y_Scale; 2806 const Z_Scale = (1 - Z_DST) / (1 - Z_SRC); 2807 const Z_Offset = 1 - Z_Scale; 2808 result[0] = XYZ_Flat[0] * X_Scale + X_Offset; 2809 result[1] = XYZ_Flat[1] * Y_Scale + Y_Offset; 2810 result[2] = XYZ_Flat[2] * Z_Scale + Z_Offset; 2811 } 2812 #normalizeWhitePointToFlat(sourceWhitePoint, XYZ_In, result) { 2813 if (sourceWhitePoint[0] === 1 && sourceWhitePoint[2] === 1) { 2814 result[0] = XYZ_In[0]; 2815 result[1] = XYZ_In[1]; 2816 result[2] = XYZ_In[2]; 2817 return; 2818 } 2819 const LMS = result; 2820 this.#matrixProduct(CalRGBCS.#BRADFORD_SCALE_MATRIX, XYZ_In, LMS); 2821 const LMS_Flat = CalRGBCS.#tempNormalizeMatrix; 2822 this.#toFlat(sourceWhitePoint, LMS, LMS_Flat); 2823 this.#matrixProduct(CalRGBCS.#BRADFORD_SCALE_INVERSE_MATRIX, LMS_Flat, result); 2824 } 2825 #normalizeWhitePointToD65(sourceWhitePoint, XYZ_In, result) { 2826 const LMS = result; 2827 this.#matrixProduct(CalRGBCS.#BRADFORD_SCALE_MATRIX, XYZ_In, LMS); 2828 const LMS_D65 = CalRGBCS.#tempNormalizeMatrix; 2829 this.#toD65(sourceWhitePoint, LMS, LMS_D65); 2830 this.#matrixProduct(CalRGBCS.#BRADFORD_SCALE_INVERSE_MATRIX, LMS_D65, result); 2831 } 2832 #toRgb(src, srcOffset, dest, destOffset, scale) { 2833 const A = this.#adjustToRange(0, 1, src[srcOffset] * scale); 2834 const B = this.#adjustToRange(0, 1, src[srcOffset + 1] * scale); 2835 const C = this.#adjustToRange(0, 1, src[srcOffset + 2] * scale); 2836 const AGR = A === 1 ? 1 : A ** this.GR; 2837 const BGG = B === 1 ? 1 : B ** this.GG; 2838 const CGB = C === 1 ? 1 : C ** this.GB; 2839 const X = this.MXA * AGR + this.MXB * BGG + this.MXC * CGB; 2840 const Y = this.MYA * AGR + this.MYB * BGG + this.MYC * CGB; 2841 const Z = this.MZA * AGR + this.MZB * BGG + this.MZC * CGB; 2842 const XYZ = CalRGBCS.#tempConvertMatrix1; 2843 XYZ[0] = X; 2844 XYZ[1] = Y; 2845 XYZ[2] = Z; 2846 const XYZ_Flat = CalRGBCS.#tempConvertMatrix2; 2847 this.#normalizeWhitePointToFlat(this.whitePoint, XYZ, XYZ_Flat); 2848 const XYZ_Black = CalRGBCS.#tempConvertMatrix1; 2849 this.#compensateBlackPoint(this.blackPoint, XYZ_Flat, XYZ_Black); 2850 const XYZ_D65 = CalRGBCS.#tempConvertMatrix2; 2851 this.#normalizeWhitePointToD65(CalRGBCS.#FLAT_WHITEPOINT_MATRIX, XYZ_Black, XYZ_D65); 2852 const SRGB = CalRGBCS.#tempConvertMatrix1; 2853 this.#matrixProduct(CalRGBCS.#SRGB_D65_XYZ_TO_RGB_MATRIX, XYZ_D65, SRGB); 2854 dest[destOffset] = this.#sRGBTransferFunction(SRGB[0]) * 255; 2855 dest[destOffset + 1] = this.#sRGBTransferFunction(SRGB[1]) * 255; 2856 dest[destOffset + 2] = this.#sRGBTransferFunction(SRGB[2]) * 255; 2857 } 2858 getRgbItem(src, srcOffset, dest, destOffset) { 2859 this.#toRgb(src, srcOffset, dest, destOffset, 1); 2860 } 2861 getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { 2862 const scale = 1 / ((1 << bits) - 1); 2863 for (let i = 0; i < count; ++i) { 2864 this.#toRgb(src, srcOffset, dest, destOffset, scale); 2865 srcOffset += 3; 2866 destOffset += 3 + alpha01; 2867 } 2868 } 2869 getOutputLength(inputLength, alpha01) { 2870 return inputLength * (3 + alpha01) / 3 | 0; 2871 } 2872} 2873class LabCS extends ColorSpace { 2874 constructor(whitePoint, blackPoint, range) { 2875 super("Lab", 3); 2876 if (!whitePoint) { 2877 throw new FormatError("WhitePoint missing - required for color space Lab"); 2878 } 2879 [this.XW, this.YW, this.ZW] = whitePoint; 2880 [this.amin, this.amax, this.bmin, this.bmax] = range || [-100, 100, -100, 100]; 2881 [this.XB, this.YB, this.ZB] = blackPoint || [0, 0, 0]; 2882 if (this.XW < 0 || this.ZW < 0 || this.YW !== 1) { 2883 throw new FormatError("Invalid WhitePoint components, no fallback available"); 2884 } 2885 if (this.XB < 0 || this.YB < 0 || this.ZB < 0) { 2886 info("Invalid BlackPoint, falling back to default"); 2887 this.XB = this.YB = this.ZB = 0; 2888 } 2889 if (this.amin > this.amax || this.bmin > this.bmax) { 2890 info("Invalid Range, falling back to defaults"); 2891 this.amin = -100; 2892 this.amax = 100; 2893 this.bmin = -100; 2894 this.bmax = 100; 2895 } 2896 } 2897 #fn_g(x) { 2898 return x >= 6 / 29 ? x ** 3 : 108 / 841 * (x - 4 / 29); 2899 } 2900 #decode(value, high1, low2, high2) { 2901 return low2 + value * (high2 - low2) / high1; 2902 } 2903 #toRgb(src, srcOffset, maxVal, dest, destOffset) { 2904 let Ls = src[srcOffset]; 2905 let as = src[srcOffset + 1]; 2906 let bs = src[srcOffset + 2]; 2907 if (maxVal !== false) { 2908 Ls = this.#decode(Ls, maxVal, 0, 100); 2909 as = this.#decode(as, maxVal, this.amin, this.amax); 2910 bs = this.#decode(bs, maxVal, this.bmin, this.bmax); 2911 } 2912 if (as > this.amax) { 2913 as = this.amax; 2914 } else if (as < this.amin) { 2915 as = this.amin; 2916 } 2917 if (bs > this.bmax) { 2918 bs = this.bmax; 2919 } else if (bs < this.bmin) { 2920 bs = this.bmin; 2921 } 2922 const M = (Ls + 16) / 116; 2923 const L = M + as / 500; 2924 const N = M - bs / 200; 2925 const X = this.XW * this.#fn_g(L); 2926 const Y = this.YW * this.#fn_g(M); 2927 const Z = this.ZW * this.#fn_g(N); 2928 let r, g, b; 2929 if (this.ZW < 1) { 2930 r = X * 3.1339 + Y * -1.617 + Z * -0.4906; 2931 g = X * -0.9785 + Y * 1.916 + Z * 0.0333; 2932 b = X * 0.072 + Y * -0.229 + Z * 1.4057; 2933 } else { 2934 r = X * 3.2406 + Y * -1.5372 + Z * -0.4986; 2935 g = X * -0.9689 + Y * 1.8758 + Z * 0.0415; 2936 b = X * 0.0557 + Y * -0.204 + Z * 1.057; 2937 } 2938 dest[destOffset] = Math.sqrt(r) * 255; 2939 dest[destOffset + 1] = Math.sqrt(g) * 255; 2940 dest[destOffset + 2] = Math.sqrt(b) * 255; 2941 } 2942 getRgbItem(src, srcOffset, dest, destOffset) { 2943 this.#toRgb(src, srcOffset, false, dest, destOffset); 2944 } 2945 getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { 2946 const maxVal = (1 << bits) - 1; 2947 for (let i = 0; i < count; i++) { 2948 this.#toRgb(src, srcOffset, maxVal, dest, destOffset); 2949 srcOffset += 3; 2950 destOffset += 3 + alpha01; 2951 } 2952 } 2953 getOutputLength(inputLength, alpha01) { 2954 return inputLength * (3 + alpha01) / 3 | 0; 2955 } 2956 isDefaultDecode(decodeMap, bpc) { 2957 return true; 2958 } 2959 get usesZeroToOneRange() { 2960 return shadow(this, "usesZeroToOneRange", false); 2961 } 2962} 2963 2964;// ./src/core/binary_cmap.js 2965 2966function hexToInt(a, size) { 2967 let n = 0; 2968 for (let i = 0; i <= size; i++) { 2969 n = n << 8 | a[i]; 2970 } 2971 return n >>> 0; 2972} 2973function hexToStr(a, size) { 2974 if (size === 1) { 2975 return String.fromCharCode(a[0], a[1]); 2976 } 2977 if (size === 3) { 2978 return String.fromCharCode(a[0], a[1], a[2], a[3]); 2979 } 2980 return String.fromCharCode(...a.subarray(0, size + 1)); 2981} 2982function addHex(a, b, size) { 2983 let c = 0; 2984 for (let i = size; i >= 0; i--) { 2985 c += a[i] + b[i]; 2986 a[i] = c & 255; 2987 c >>= 8; 2988 } 2989} 2990function incHex(a, size) { 2991 let c = 1; 2992 for (let i = size; i >= 0 && c > 0; i--) { 2993 c += a[i]; 2994 a[i] = c & 255; 2995 c >>= 8; 2996 } 2997} 2998const MAX_NUM_SIZE = 16; 2999const MAX_ENCODED_NUM_SIZE = 19; 3000class BinaryCMapStream { 3001 constructor(data) { 3002 this.buffer = data; 3003 this.pos = 0; 3004 this.end = data.length; 3005 this.tmpBuf = new Uint8Array(MAX_ENCODED_NUM_SIZE); 3006 } 3007 readByte() { 3008 if (this.pos >= this.end) { 3009 return -1; 3010 } 3011 return this.buffer[this.pos++]; 3012 } 3013 readNumber() { 3014 let n = 0; 3015 let last; 3016 do { 3017 const b = this.readByte(); 3018 if (b < 0) { 3019 throw new FormatError("unexpected EOF in bcmap"); 3020 } 3021 last = !(b & 0x80); 3022 n = n << 7 | b & 0x7f; 3023 } while (!last); 3024 return n; 3025 } 3026 readSigned() { 3027 const n = this.readNumber(); 3028 return n & 1 ? ~(n >>> 1) : n >>> 1; 3029 } 3030 readHex(num, size) { 3031 num.set(this.buffer.subarray(this.pos, this.pos + size + 1)); 3032 this.pos += size + 1; 3033 } 3034 readHexNumber(num, size) { 3035 let last; 3036 const stack = this.tmpBuf; 3037 let sp = 0; 3038 do { 3039 const b = this.readByte(); 3040 if (b < 0) { 3041 throw new FormatError("unexpected EOF in bcmap"); 3042 } 3043 last = !(b & 0x80); 3044 stack[sp++] = b & 0x7f; 3045 } while (!last); 3046 let i = size, 3047 buffer = 0, 3048 bufferSize = 0; 3049 while (i >= 0) { 3050 while (bufferSize < 8 && stack.length > 0) { 3051 buffer |= stack[--sp] << bufferSize; 3052 bufferSize += 7; 3053 } 3054 num[i] = buffer & 255; 3055 i--; 3056 buffer >>= 8; 3057 bufferSize -= 8; 3058 } 3059 } 3060 readHexSigned(num, size) { 3061 this.readHexNumber(num, size); 3062 const sign = num[size] & 1 ? 255 : 0; 3063 let c = 0; 3064 for (let i = 0; i <= size; i++) { 3065 c = (c & 1) << 8 | num[i]; 3066 num[i] = c >> 1 ^ sign; 3067 } 3068 } 3069 readString() { 3070 const len = this.readNumber(), 3071 buf = new Array(len); 3072 for (let i = 0; i < len; i++) { 3073 buf[i] = this.readNumber(); 3074 } 3075 return String.fromCharCode(...buf); 3076 } 3077} 3078class BinaryCMapReader { 3079 async process(data, cMap, extend) { 3080 const stream = new BinaryCMapStream(data); 3081 const header = stream.readByte(); 3082 cMap.vertical = !!(header & 1); 3083 let useCMap = null; 3084 const start = new Uint8Array(MAX_NUM_SIZE); 3085 const end = new Uint8Array(MAX_NUM_SIZE); 3086 const char = new Uint8Array(MAX_NUM_SIZE); 3087 const charCode = new Uint8Array(MAX_NUM_SIZE); 3088 const tmp = new Uint8Array(MAX_NUM_SIZE); 3089 let code; 3090 let b; 3091 while ((b = stream.readByte()) >= 0) { 3092 const type = b >> 5; 3093 if (type === 7) { 3094 switch (b & 0x1f) { 3095 case 0: 3096 stream.readString(); 3097 break; 3098 case 1: 3099 useCMap = stream.readString(); 3100 break; 3101 } 3102 continue; 3103 } 3104 const sequence = !!(b & 0x10); 3105 const dataSize = b & 15; 3106 if (dataSize + 1 > MAX_NUM_SIZE) { 3107 throw new Error("BinaryCMapReader.process: Invalid dataSize."); 3108 } 3109 const ucs2DataSize = 1; 3110 const subitemsCount = stream.readNumber(); 3111 switch (type) { 3112 case 0: 3113 stream.readHex(start, dataSize); 3114 stream.readHexNumber(end, dataSize); 3115 addHex(end, start, dataSize); 3116 cMap.addCodespaceRange(dataSize + 1, hexToInt(start, dataSize), hexToInt(end, dataSize)); 3117 for (let i = 1; i < subitemsCount; i++) { 3118 incHex(end, dataSize); 3119 stream.readHexNumber(start, dataSize); 3120 addHex(start, end, dataSize); 3121 stream.readHexNumber(end, dataSize); 3122 addHex(end, start, dataSize); 3123 cMap.addCodespaceRange(dataSize + 1, hexToInt(start, dataSize), hexToInt(end, dataSize)); 3124 } 3125 break; 3126 case 1: 3127 stream.readHex(start, dataSize); 3128 stream.readHexNumber(end, dataSize); 3129 addHex(end, start, dataSize); 3130 stream.readNumber(); 3131 for (let i = 1; i < subitemsCount; i++) { 3132 incHex(end, dataSize); 3133 stream.readHexNumber(start, dataSize); 3134 addHex(start, end, dataSize); 3135 stream.readHexNumber(end, dataSize); 3136 addHex(end, start, dataSize); 3137 stream.readNumber(); 3138 } 3139 break; 3140 case 2: 3141 stream.readHex(char, dataSize); 3142 code = stream.readNumber(); 3143 cMap.mapOne(hexToInt(char, dataSize), code); 3144 for (let i = 1; i < subitemsCount; i++) { 3145 incHex(char, dataSize); 3146 if (!sequence) { 3147 stream.readHexNumber(tmp, dataSize); 3148 addHex(char, tmp, dataSize); 3149 } 3150 code = stream.readSigned() + (code + 1); 3151 cMap.mapOne(hexToInt(char, dataSize), code); 3152 } 3153 break; 3154 case 3: 3155 stream.readHex(start, dataSize); 3156 stream.readHexNumber(end, dataSize); 3157 addHex(end, start, dataSize); 3158 code = stream.readNumber(); 3159 cMap.mapCidRange(hexToInt(start, dataSize), hexToInt(end, dataSize), code); 3160 for (let i = 1; i < subitemsCount; i++) { 3161 incHex(end, dataSize); 3162 if (!sequence) { 3163 stream.readHexNumber(start, dataSize); 3164 addHex(start, end, dataSize); 3165 } else { 3166 start.set(end); 3167 } 3168 stream.readHexNumber(end, dataSize); 3169 addHex(end, start, dataSize); 3170 code = stream.readNumber(); 3171 cMap.mapCidRange(hexToInt(start, dataSize), hexToInt(end, dataSize), code); 3172 } 3173 break; 3174 case 4: 3175 stream.readHex(char, ucs2DataSize); 3176 stream.readHex(charCode, dataSize); 3177 cMap.mapOne(hexToInt(char, ucs2DataSize), hexToStr(charCode, dataSize)); 3178 for (let i = 1; i < subitemsCount; i++) { 3179 incHex(char, ucs2DataSize); 3180 if (!sequence) { 3181 stream.readHexNumber(tmp, ucs2DataSize); 3182 addHex(char, tmp, ucs2DataSize); 3183 } 3184 incHex(charCode, dataSize); 3185 stream.readHexSigned(tmp, dataSize); 3186 addHex(charCode, tmp, dataSize); 3187 cMap.mapOne(hexToInt(char, ucs2DataSize), hexToStr(charCode, dataSize)); 3188 } 3189 break; 3190 case 5: 3191 stream.readHex(start, ucs2DataSize); 3192 stream.readHexNumber(end, ucs2DataSize); 3193 addHex(end, start, ucs2DataSize); 3194 stream.readHex(charCode, dataSize); 3195 cMap.mapBfRange(hexToInt(start, ucs2DataSize), hexToInt(end, ucs2DataSize), hexToStr(charCode, dataSize)); 3196 for (let i = 1; i < subitemsCount; i++) { 3197 incHex(end, ucs2DataSize); 3198 if (!sequence) { 3199 stream.readHexNumber(start, ucs2DataSize); 3200 addHex(start, end, ucs2DataSize); 3201 } else { 3202 start.set(end); 3203 } 3204 stream.readHexNumber(end, ucs2DataSize); 3205 addHex(end, start, ucs2DataSize); 3206 stream.readHex(charCode, dataSize); 3207 cMap.mapBfRange(hexToInt(start, ucs2DataSize), hexToInt(end, ucs2DataSize), hexToStr(charCode, dataSize)); 3208 } 3209 break; 3210 default: 3211 throw new Error(`BinaryCMapReader.process - unknown type: ${type}`); 3212 } 3213 } 3214 if (useCMap) { 3215 return extend(useCMap); 3216 } 3217 return cMap; 3218 } 3219} 3220 3221;// ./src/core/decode_stream.js 3222 3223 3224const emptyBuffer = new Uint8Array(0); 3225class DecodeStream extends BaseStream { 3226 constructor(maybeMinBufferLength) { 3227 super(); 3228 this._rawMinBufferLength = maybeMinBufferLength || 0; 3229 this.pos = 0; 3230 this.bufferLength = 0; 3231 this.eof = false; 3232 this.buffer = emptyBuffer; 3233 this.minBufferLength = 512; 3234 if (maybeMinBufferLength) { 3235 while (this.minBufferLength < maybeMinBufferLength) { 3236 this.minBufferLength *= 2; 3237 } 3238 } 3239 } 3240 get isEmpty() { 3241 while (!this.eof && this.bufferLength === 0) { 3242 this.readBlock(); 3243 } 3244 return this.bufferLength === 0; 3245 } 3246 ensureBuffer(requested) { 3247 const buffer = this.buffer; 3248 if (requested <= buffer.byteLength) { 3249 return buffer; 3250 } 3251 let size = this.minBufferLength; 3252 while (size < requested) { 3253 size *= 2; 3254 } 3255 const buffer2 = new Uint8Array(size); 3256 buffer2.set(buffer); 3257 return this.buffer = buffer2; 3258 } 3259 getByte() { 3260 const pos = this.pos; 3261 while (this.bufferLength <= pos) { 3262 if (this.eof) { 3263 return -1; 3264 } 3265 this.readBlock(); 3266 } 3267 return this.buffer[this.pos++]; 3268 } 3269 getBytes(length, decoderOptions = null) { 3270 const pos = this.pos; 3271 let end; 3272 if (length) { 3273 this.ensureBuffer(pos + length); 3274 end = pos + length; 3275 while (!this.eof && this.bufferLength < end) { 3276 this.readBlock(decoderOptions); 3277 } 3278 const bufEnd = this.bufferLength; 3279 if (end > bufEnd) { 3280 end = bufEnd; 3281 } 3282 } else { 3283 while (!this.eof) { 3284 this.readBlock(decoderOptions); 3285 } 3286 end = this.bufferLength; 3287 } 3288 this.pos = end; 3289 return this.buffer.subarray(pos, end); 3290 } 3291 async getImageData(length, decoderOptions = null) { 3292 if (!this.canAsyncDecodeImageFromBuffer) { 3293 return this.getBytes(length, decoderOptions); 3294 } 3295 const data = await this.stream.asyncGetBytes(); 3296 return this.decodeImage(data, decoderOptions); 3297 } 3298 reset() { 3299 this.pos = 0; 3300 } 3301 makeSubStream(start, length, dict = null) { 3302 if (length === undefined) { 3303 while (!this.eof) { 3304 this.readBlock(); 3305 } 3306 } else { 3307 const end = start + length; 3308 while (this.bufferLength <= end && !this.eof) { 3309 this.readBlock(); 3310 } 3311 } 3312 return new Stream(this.buffer, start, length, dict); 3313 } 3314 getBaseStreams() { 3315 return this.str ? this.str.getBaseStreams() : null; 3316 } 3317} 3318class StreamsSequenceStream extends DecodeStream { 3319 constructor(streams, onError = null) { 3320 streams = streams.filter(s => s instanceof BaseStream); 3321 let maybeLength = 0; 3322 for (const stream of streams) { 3323 maybeLength += stream instanceof DecodeStream ? stream._rawMinBufferLength : stream.length; 3324 } 3325 super(maybeLength); 3326 this.streams = streams; 3327 this._onError = onError; 3328 } 3329 readBlock() { 3330 const streams = this.streams; 3331 if (streams.length === 0) { 3332 this.eof = true; 3333 return; 3334 } 3335 const stream = streams.shift(); 3336 let chunk; 3337 try { 3338 chunk = stream.getBytes(); 3339 } catch (reason) { 3340 if (this._onError) { 3341 this._onError(reason, stream.dict?.objId); 3342 return; 3343 } 3344 throw reason; 3345 } 3346 const bufferLength = this.bufferLength; 3347 const newLength = bufferLength + chunk.length; 3348 const buffer = this.ensureBuffer(newLength); 3349 buffer.set(chunk, bufferLength); 3350 this.bufferLength = newLength; 3351 } 3352 getBaseStreams() { 3353 const baseStreamsBuf = []; 3354 for (const stream of this.streams) { 3355 const baseStreams = stream.getBaseStreams(); 3356 if (baseStreams) { 3357 baseStreamsBuf.push(...baseStreams); 3358 } 3359 } 3360 return baseStreamsBuf.length > 0 ? baseStreamsBuf : null; 3361 } 3362} 3363 3364;// ./src/core/ascii_85_stream.js 3365 3366 3367class Ascii85Stream extends DecodeStream { 3368 constructor(str, maybeLength) { 3369 if (maybeLength) { 3370 maybeLength *= 0.8; 3371 } 3372 super(maybeLength); 3373 this.str = str; 3374 this.dict = str.dict; 3375 this.input = new Uint8Array(5); 3376 } 3377 readBlock() { 3378 const TILDA_CHAR = 0x7e; 3379 const Z_LOWER_CHAR = 0x7a; 3380 const EOF = -1; 3381 const str = this.str; 3382 let c = str.getByte(); 3383 while (isWhiteSpace(c)) { 3384 c = str.getByte(); 3385 } 3386 if (c === EOF || c === TILDA_CHAR) { 3387 this.eof = true; 3388 return; 3389 } 3390 const bufferLength = this.bufferLength; 3391 let buffer, i; 3392 if (c === Z_LOWER_CHAR) { 3393 buffer = this.ensureBuffer(bufferLength + 4); 3394 for (i = 0; i < 4; ++i) { 3395 buffer[bufferLength + i] = 0; 3396 } 3397 this.bufferLength += 4; 3398 } else { 3399 const input = this.input; 3400 input[0] = c; 3401 for (i = 1; i < 5; ++i) { 3402 c = str.getByte(); 3403 while (isWhiteSpace(c)) { 3404 c = str.getByte(); 3405 } 3406 input[i] = c; 3407 if (c === EOF || c === TILDA_CHAR) { 3408 break; 3409 } 3410 } 3411 buffer = this.ensureBuffer(bufferLength + i - 1); 3412 this.bufferLength += i - 1; 3413 if (i < 5) { 3414 for (; i < 5; ++i) { 3415 input[i] = 0x21 + 84; 3416 } 3417 this.eof = true; 3418 } 3419 let t = 0; 3420 for (i = 0; i < 5; ++i) { 3421 t = t * 85 + (input[i] - 0x21); 3422 } 3423 for (i = 3; i >= 0; --i) { 3424 buffer[bufferLength + i] = t & 0xff; 3425 t >>= 8; 3426 } 3427 } 3428 } 3429} 3430 3431;// ./src/core/ascii_hex_stream.js 3432 3433class AsciiHexStream extends DecodeStream { 3434 constructor(str, maybeLength) { 3435 if (maybeLength) { 3436 maybeLength *= 0.5; 3437 } 3438 super(maybeLength); 3439 this.str = str; 3440 this.dict = str.dict; 3441 this.firstDigit = -1; 3442 } 3443 readBlock() { 3444 const UPSTREAM_BLOCK_SIZE = 8000; 3445 const bytes = this.str.getBytes(UPSTREAM_BLOCK_SIZE); 3446 if (!bytes.length) { 3447 this.eof = true; 3448 return; 3449 } 3450 const maxDecodeLength = bytes.length + 1 >> 1; 3451 const buffer = this.ensureBuffer(this.bufferLength + maxDecodeLength); 3452 let bufferLength = this.bufferLength; 3453 let firstDigit = this.firstDigit; 3454 for (const ch of bytes) { 3455 let digit; 3456 if (ch >= 0x30 && ch <= 0x39) { 3457 digit = ch & 0x0f; 3458 } else if (ch >= 0x41 && ch <= 0x46 || ch >= 0x61 && ch <= 0x66) { 3459 digit = (ch & 0x0f) + 9; 3460 } else if (ch === 0x3e) { 3461 this.eof = true; 3462 break; 3463 } else { 3464 continue; 3465 } 3466 if (firstDigit < 0) { 3467 firstDigit = digit; 3468 } else { 3469 buffer[bufferLength++] = firstDigit << 4 | digit; 3470 firstDigit = -1; 3471 } 3472 } 3473 if (firstDigit >= 0 && this.eof) { 3474 buffer[bufferLength++] = firstDigit << 4; 3475 firstDigit = -1; 3476 } 3477 this.firstDigit = firstDigit; 3478 this.bufferLength = bufferLength; 3479 } 3480} 3481 3482;// ./src/core/ccitt.js
vendor: 11,686 bytes, lines 3483-3513
3483 3484const ccittEOL = -2; 3485const ccittEOF = -1; 3486const twoDimPass = 0; 3487const twoDimHoriz = 1; 3488const twoDimVert0 = 2; 3489const twoDimVertR1 = 3; 3490const twoDimVertL1 = 4; 3491const twoDimVertR2 = 5; 3492const twoDimVertL2 = 6; 3493const twoDimVertR3 = 7; 3494const twoDimVertL3 = 8; 3495const 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]]; 3496const 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]]; 3497const 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]]; 3498const 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]]; 3499const 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]]; 3500const 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]]; 3501class CCITTFaxDecoder { 3502 constructor(source, options = {}) { 3503 if (!source || typeof source.next !== "function") { 3504 throw new Error('CCITTFaxDecoder - invalid "source" parameter.'); 3505 } 3506 this.source = source; 3507 this.eof = false; 3508 this.encoding = options.K || 0; 3509 this.eoline = options.EndOfLine || false; 3510 this.byteAlign = options.EncodedByteAlign || false; 3511 this.columns = options.Columns || 1728; 3512 this.rows = options.Rows || 0; 3513
vendor: 15,150 bytes, lines 3513-4035
3513this.eoblock = options.EndOfBlock ?? true; 3514 this.black = options.BlackIs1 || false; 3515 this.codingLine = new Uint32Array(this.columns + 1); 3516 this.refLine = new Uint32Array(this.columns + 2); 3517 this.codingLine[0] = this.columns; 3518 this.codingPos = 0; 3519 this.row = 0; 3520 this.nextLine2D = this.encoding < 0; 3521 this.inputBits = 0; 3522 this.inputBuf = 0; 3523 this.outputBits = 0; 3524 this.rowsDone = false; 3525 let code1; 3526 while ((code1 = this._lookBits(12)) === 0) { 3527 this._eatBits(1); 3528 } 3529 if (code1 === 1) { 3530 this._eatBits(12); 3531 } 3532 if (this.encoding > 0) { 3533 this.nextLine2D = !this._lookBits(1); 3534 this._eatBits(1); 3535 } 3536 } 3537 readNextChar() { 3538 if (this.eof) { 3539 return -1; 3540 } 3541 const refLine = this.refLine; 3542 const codingLine = this.codingLine; 3543 const columns = this.columns; 3544 let refPos, blackPixels, bits, i; 3545 if (this.outputBits === 0) { 3546 if (this.rowsDone) { 3547 this.eof = true; 3548 } 3549 if (this.eof) { 3550 return -1; 3551 } 3552 this.err = false; 3553 let code1, code2, code3; 3554 if (this.nextLine2D) { 3555 for (i = 0; codingLine[i] < columns; ++i) { 3556 refLine[i] = codingLine[i]; 3557 } 3558 refLine[i++] = columns; 3559 refLine[i] = columns; 3560 codingLine[0] = 0; 3561 this.codingPos = 0; 3562 refPos = 0; 3563 blackPixels = 0; 3564 while (codingLine[this.codingPos] < columns) { 3565 code1 = this._getTwoDimCode(); 3566 switch (code1) { 3567 case twoDimPass: 3568 this._addPixels(refLine[refPos + 1], blackPixels); 3569 if (refLine[refPos + 1] < columns) { 3570 refPos += 2; 3571 } 3572 break; 3573 case twoDimHoriz: 3574 code1 = code2 = 0; 3575 if (blackPixels) { 3576 do { 3577 code1 += code3 = this._getBlackCode(); 3578 } while (code3 >= 64); 3579 do { 3580 code2 += code3 = this._getWhiteCode(); 3581 } while (code3 >= 64); 3582 } else { 3583 do { 3584 code1 += code3 = this._getWhiteCode(); 3585 } while (code3 >= 64); 3586 do { 3587 code2 += code3 = this._getBlackCode(); 3588 } while (code3 >= 64); 3589 } 3590 this._addPixels(codingLine[this.codingPos] + code1, blackPixels); 3591 if (codingLine[this.codingPos] < columns) { 3592 this._addPixels(codingLine[this.codingPos] + code2, blackPixels ^ 1); 3593 } 3594 while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { 3595 refPos += 2; 3596 } 3597 break; 3598 case twoDimVertR3: 3599 this._addPixels(refLine[refPos] + 3, blackPixels); 3600 blackPixels ^= 1; 3601 if (codingLine[this.codingPos] < columns) { 3602 ++refPos; 3603 while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { 3604 refPos += 2; 3605 } 3606 } 3607 break; 3608 case twoDimVertR2: 3609 this._addPixels(refLine[refPos] + 2, blackPixels); 3610 blackPixels ^= 1; 3611 if (codingLine[this.codingPos] < columns) { 3612 ++refPos; 3613 while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { 3614 refPos += 2; 3615 } 3616 } 3617 break; 3618 case twoDimVertR1: 3619 this._addPixels(refLine[refPos] + 1, blackPixels); 3620 blackPixels ^= 1; 3621 if (codingLine[this.codingPos] < columns) { 3622 ++refPos; 3623 while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { 3624 refPos += 2; 3625 } 3626 } 3627 break; 3628 case twoDimVert0: 3629 this._addPixels(refLine[refPos], blackPixels); 3630 blackPixels ^= 1; 3631 if (codingLine[this.codingPos] < columns) { 3632 ++refPos; 3633 while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { 3634 refPos += 2; 3635 } 3636 } 3637 break; 3638 case twoDimVertL3: 3639 this._addPixelsNeg(refLine[refPos] - 3, blackPixels); 3640 blackPixels ^= 1; 3641 if (codingLine[this.codingPos] < columns) { 3642 if (refPos > 0) { 3643 --refPos; 3644 } else { 3645 ++refPos; 3646 } 3647 while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { 3648 refPos += 2; 3649 } 3650 } 3651 break; 3652 case twoDimVertL2: 3653 this._addPixelsNeg(refLine[refPos] - 2, blackPixels); 3654 blackPixels ^= 1; 3655 if (codingLine[this.codingPos] < columns) { 3656 if (refPos > 0) { 3657 --refPos; 3658 } else { 3659 ++refPos; 3660 } 3661 while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { 3662 refPos += 2; 3663 } 3664 } 3665 break; 3666 case twoDimVertL1: 3667 this._addPixelsNeg(refLine[refPos] - 1, blackPixels); 3668 blackPixels ^= 1; 3669 if (codingLine[this.codingPos] < columns) { 3670 if (refPos > 0) { 3671 --refPos; 3672 } else { 3673 ++refPos; 3674 } 3675 while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { 3676 refPos += 2; 3677 } 3678 } 3679 break; 3680 case ccittEOF: 3681 this._addPixels(columns, 0); 3682 this.eof = true; 3683 break; 3684 default: 3685 info("bad 2d code"); 3686 this._addPixels(columns, 0); 3687 this.err = true; 3688 } 3689 } 3690 } else { 3691 codingLine[0] = 0; 3692 this.codingPos = 0; 3693 blackPixels = 0; 3694 while (codingLine[this.codingPos] < columns) { 3695 code1 = 0; 3696 if (blackPixels) { 3697 do { 3698 code1 += code3 = this._getBlackCode(); 3699 } while (code3 >= 64); 3700 } else { 3701 do { 3702 code1 += code3 = this._getWhiteCode(); 3703 } while (code3 >= 64); 3704 } 3705 this._addPixels(codingLine[this.codingPos] + code1, blackPixels); 3706 blackPixels ^= 1; 3707 } 3708 } 3709 let gotEOL = false; 3710 if (this.byteAlign) { 3711 this.inputBits &= ~7; 3712 } 3713 if (!this.eoblock && this.row === this.rows - 1) { 3714 this.rowsDone = true; 3715 } else { 3716 code1 = this._lookBits(12); 3717 if (this.eoline) { 3718 while (code1 !== ccittEOF && code1 !== 1) { 3719 this._eatBits(1); 3720 code1 = this._lookBits(12); 3721 } 3722 } else { 3723 while (code1 === 0) { 3724 this._eatBits(1); 3725 code1 = this._lookBits(12); 3726 } 3727 } 3728 if (code1 === 1) { 3729 this._eatBits(12); 3730 gotEOL = true; 3731 } else if (code1 === ccittEOF) { 3732 this.eof = true; 3733 } 3734 } 3735 if (!this.eof && this.encoding > 0 && !this.rowsDone) { 3736 this.nextLine2D = !this._lookBits(1); 3737 this._eatBits(1); 3738 } 3739 if (this.eoblock && gotEOL && this.byteAlign) { 3740 code1 = this._lookBits(12); 3741 if (code1 === 1) { 3742 this._eatBits(12); 3743 if (this.encoding > 0) { 3744 this._lookBits(1); 3745 this._eatBits(1); 3746 } 3747 if (this.encoding >= 0) { 3748 for (i = 0; i < 4; ++i) { 3749 code1 = this._lookBits(12); 3750 if (code1 !== 1) { 3751 info("bad rtc code: " + code1); 3752 } 3753 this._eatBits(12); 3754 if (this.encoding > 0) { 3755 this._lookBits(1); 3756 this._eatBits(1); 3757 } 3758 } 3759 } 3760 this.eof = true; 3761 } 3762 } else if (this.err && this.eoline) { 3763 while (true) { 3764 code1 = this._lookBits(13); 3765 if (code1 === ccittEOF) { 3766 this.eof = true; 3767 return -1; 3768 } 3769 if (code1 >> 1 === 1) { 3770 break; 3771 } 3772 this._eatBits(1); 3773 } 3774 this._eatBits(12); 3775 if (this.encoding > 0) { 3776 this._eatBits(1); 3777 this.nextLine2D = !(code1 & 1); 3778 } 3779 } 3780 this.outputBits = codingLine[0] > 0 ? codingLine[this.codingPos = 0] : codingLine[this.codingPos = 1]; 3781 this.row++; 3782 } 3783 let c; 3784 if (this.outputBits >= 8) { 3785 c = this.codingPos & 1 ? 0 : 0xff; 3786 this.outputBits -= 8; 3787 if (this.outputBits === 0 && codingLine[this.codingPos] < columns) { 3788 this.codingPos++; 3789 this.outputBits = codingLine[this.codingPos] - codingLine[this.codingPos - 1]; 3790 } 3791 } else { 3792 bits = 8; 3793 c = 0; 3794 do { 3795 if (typeof this.outputBits !== "number") { 3796 throw new FormatError('Invalid /CCITTFaxDecode data, "outputBits" must be a number.'); 3797 } 3798 if (this.outputBits > bits) { 3799 c <<= bits; 3800 if (!(this.codingPos & 1)) { 3801 c |= 0xff >> 8 - bits; 3802 } 3803 this.outputBits -= bits; 3804 bits = 0; 3805 } else { 3806 c <<= this.outputBits; 3807 if (!(this.codingPos & 1)) { 3808 c |= 0xff >> 8 - this.outputBits; 3809 } 3810 bits -= this.outputBits; 3811 this.outputBits = 0; 3812 if (codingLine[this.codingPos] < columns) { 3813 this.codingPos++; 3814 this.outputBits = codingLine[this.codingPos] - codingLine[this.codingPos - 1]; 3815 } else if (bits > 0) { 3816 c <<= bits; 3817 bits = 0; 3818 } 3819 } 3820 } while (bits); 3821 } 3822 if (this.black) { 3823 c ^= 0xff; 3824 } 3825 return c; 3826 } 3827 _addPixels(a1, blackPixels) { 3828 const codingLine = this.codingLine; 3829 let codingPos = this.codingPos; 3830 if (a1 > codingLine[codingPos]) { 3831 if (a1 > this.columns) { 3832 info("row is wrong length"); 3833 this.err = true; 3834 a1 = this.columns; 3835 } 3836 if (codingPos & 1 ^ blackPixels) { 3837 ++codingPos; 3838 } 3839 codingLine[codingPos] = a1; 3840 } 3841 this.codingPos = codingPos; 3842 } 3843 _addPixelsNeg(a1, blackPixels) { 3844 const codingLine = this.codingLine; 3845 let codingPos = this.codingPos; 3846 if (a1 > codingLine[codingPos]) { 3847 if (a1 > this.columns) { 3848 info("row is wrong length"); 3849 this.err = true; 3850 a1 = this.columns; 3851 } 3852 if (codingPos & 1 ^ blackPixels) { 3853 ++codingPos; 3854 } 3855 codingLine[codingPos] = a1; 3856 } else if (a1 < codingLine[codingPos]) { 3857 if (a1 < 0) { 3858 info("invalid code"); 3859 this.err = true; 3860 a1 = 0; 3861 } 3862 while (codingPos > 0 && a1 < codingLine[codingPos - 1]) { 3863 --codingPos; 3864 } 3865 codingLine[codingPos] = a1; 3866 } 3867 this.codingPos = codingPos; 3868 } 3869 _findTableCode(start, end, table, limit) { 3870 const limitValue = limit || 0; 3871 for (let i = start; i <= end; ++i) { 3872 let code = this._lookBits(i); 3873 if (code === ccittEOF) { 3874 return [true, 1, false]; 3875 } 3876 if (i < end) { 3877 code <<= end - i; 3878 } 3879 if (!limitValue || code >= limitValue) { 3880 const p = table[code - limitValue]; 3881 if (p[0] === i) { 3882 this._eatBits(i); 3883 return [true, p[1], true]; 3884 } 3885 } 3886 } 3887 return [false, 0, false]; 3888 } 3889 _getTwoDimCode() { 3890 let code = 0; 3891 let p; 3892 if (this.eoblock) { 3893 code = this._lookBits(7); 3894 p = twoDimTable[code]; 3895 if (p?.[0] > 0) { 3896 this._eatBits(p[0]); 3897 return p[1]; 3898 } 3899 } else { 3900 const result = this._findTableCode(1, 7, twoDimTable); 3901 if (result[0] && result[2]) { 3902 return result[1]; 3903 } 3904 } 3905 info("Bad two dim code"); 3906 return ccittEOF; 3907 } 3908 _getWhiteCode() { 3909 let code = 0; 3910 let p; 3911 if (this.eoblock) { 3912 code = this._lookBits(12); 3913 if (code === ccittEOF) { 3914 return 1; 3915 } 3916 p = code >> 5 === 0 ? whiteTable1[code] : whiteTable2[code >> 3]; 3917 if (p[0] > 0) { 3918 this._eatBits(p[0]); 3919 return p[1]; 3920 } 3921 } else { 3922 let result = this._findTableCode(1, 9, whiteTable2); 3923 if (result[0]) { 3924 return result[1]; 3925 } 3926 result = this._findTableCode(11, 12, whiteTable1); 3927 if (result[0]) { 3928 return result[1]; 3929 } 3930 } 3931 info("bad white code"); 3932 this._eatBits(1); 3933 return 1; 3934 } 3935 _getBlackCode() { 3936 let code, p; 3937 if (this.eoblock) { 3938 code = this._lookBits(13); 3939 if (code === ccittEOF) { 3940 return 1; 3941 } 3942 if (code >> 7 === 0) { 3943 p = blackTable1[code]; 3944 } else if (code >> 9 === 0 && code >> 7 !== 0) { 3945 p = blackTable2[(code >> 1) - 64]; 3946 } else { 3947 p = blackTable3[code >> 7]; 3948 } 3949 if (p[0] > 0) { 3950 this._eatBits(p[0]); 3951 return p[1]; 3952 } 3953 } else { 3954 let result = this._findTableCode(2, 6, blackTable3); 3955 if (result[0]) { 3956 return result[1]; 3957 } 3958 result = this._findTableCode(7, 12, blackTable2, 64); 3959 if (result[0]) { 3960 return result[1]; 3961 } 3962 result = this._findTableCode(10, 13, blackTable1); 3963 if (result[0]) { 3964 return result[1]; 3965 } 3966 } 3967 info("bad black code"); 3968 this._eatBits(1); 3969 return 1; 3970 } 3971 _lookBits(n) { 3972 let c; 3973 while (this.inputBits < n) { 3974 if ((c = this.source.next()) === -1) { 3975 if (this.inputBits === 0) { 3976 return ccittEOF; 3977 } 3978 return this.inputBuf << n - this.inputBits & 0xffff >> 16 - n; 3979 } 3980 this.inputBuf = this.inputBuf << 8 | c; 3981 this.inputBits += 8; 3982 } 3983 return this.inputBuf >> this.inputBits - n & 0xffff >> 16 - n; 3984 } 3985 _eatBits(n) { 3986 if ((this.inputBits -= n) < 0) { 3987 this.inputBits = 0; 3988 } 3989 } 3990} 3991 3992;// ./src/core/ccitt_stream.js 3993 3994 3995 3996class CCITTFaxStream extends DecodeStream { 3997 constructor(str, maybeLength, params) { 3998 super(maybeLength); 3999 this.str = str; 4000 this.dict = str.dict; 4001 if (!(params instanceof Dict)) { 4002 params = Dict.empty; 4003 } 4004 const source = { 4005 next() { 4006 return str.getByte(); 4007 } 4008 }; 4009 this.ccittFaxDecoder = new CCITTFaxDecoder(source, { 4010 K: params.get("K"), 4011 EndOfLine: params.get("EndOfLine"), 4012 EncodedByteAlign: params.get("EncodedByteAlign"), 4013 Columns: params.get("Columns"), 4014 Rows: params.get("Rows"), 4015 EndOfBlock: params.get("EndOfBlock"), 4016 BlackIs1: params.get("BlackIs1") 4017 }); 4018 } 4019 readBlock() { 4020 while (!this.eof) { 4021 const c = this.ccittFaxDecoder.readNextChar(); 4022 if (c === -1) { 4023 this.eof = true; 4024 return; 4025 } 4026 this.ensureBuffer(this.bufferLength + 1); 4027 this.buffer[this.bufferLength++] = c; 4028 } 4029 } 4030} 4031 4032;// ./src/core/flate_stream.js 4033 4034 4035
4036const codeLenCodeMap = new Int32Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]); 4037const lengthDecode = new Int32Array([0x00003, 0x00004, 0x00005, 0x00006, 0x00007, 0x00008, 0x00009, 0x0000a, 0x1000b, 0x1000d, 0x1000f, 0x10011, 0x20013, 0x20017, 0x2001b, 0x2001f, 0x30023, 0x3002b, 0x30033, 0x3003b, 0x40043, 0x40053, 0x40063, 0x40073, 0x50083, 0x500a3, 0x500c3, 0x500e3, 0x00102, 0x00102, 0x00102]); 4038const distDecode = new Int32Array([0x00001, 0x00002, 0x00003, 0x00004, 0x10005, 0x10007, 0x20009, 0x2000d, 0x30011, 0x30019, 0x40021, 0x40031, 0x50041, 0x50061, 0x60081, 0x600c1, 0x70101, 0x70181, 0x80201, 0x80301, 0x90401, 0x90601, 0xa0801, 0xa0c01, 0xb1001, 0xb1801, 0xc2001, 0xc3001, 0xd4001, 0xd6001]); 4039const fixedLitCodeTab = [new Int32Array([0x70100, 0x80050, 0x80010, 0x80118, 0x70110, 0x80070, 0x80030, 0x900c0, 0x70108, 0x80060, 0x80020, 0x900a0, 0x80000, 0x80080, 0x80040, 0x900e0, 0x70104, 0x80058, 0x80018, 0x90090, 0x70114, 0x80078, 0x80038, 0x900d0, 0x7010c, 0x80068, 0x80028, 0x900b0, 0x80008, 0x80088, 0x80048, 0x900f0, 0x70102, 0x80054, 0x80014, 0x8011c, 0x70112, 0x80074, 0x80034, 0x900c8, 0x7010a, 0x80064, 0x80024, 0x900a8, 0x80004, 0x80084, 0x80044, 0x900e8, 0x70106, 0x8005c, 0x8001c, 0x90098, 0x70116, 0x8007c, 0x8003c, 0x900d8, 0x7010e, 0x8006c, 0x8002c, 0x900b8, 0x8000c, 0x8008c, 0x8004c, 0x900f8, 0x70101, 0x80052, 0x80012, 0x8011a, 0x70111, 0x80072, 0x80032, 0x900c4, 0x70109, 0x80062, 0x80022, 0x900a4, 0x80002, 0x80082, 0x80042, 0x900e4, 0x70105, 0x8005a, 0x8001a, 0x90094, 0x70115, 0x8007a, 0x8003a, 0x900d4, 0x7010d, 0x8006a, 0x8002a, 0x900b4, 0x8000a, 0x8008a, 0x8004a, 0x900f4, 0x70103, 0x80056, 0x80016, 0x8011e, 0x70113, 0x80076, 0x80036, 0x900cc, 0x7010b, 0x80066, 0x80026, 0x900ac, 0x80006, 0x80086, 0x80046, 0x900ec, 0x70107, 0x8005e, 0x8001e, 0x9009c, 0x70117, 0x8007e, 0x8003e, 0x900dc, 0x7010f, 0x8006e, 0x8002e, 0x900bc, 0x8000e, 0x8008e, 0x8004e, 0x900fc, 0x70100, 0x80051, 0x80011, 0x80119, 0x70110, 0x80071, 0x80031, 0x900c2, 0x70108, 0x80061, 0x80021, 0x900a2, 0x80001, 0x80081, 0x80041, 0x900e2, 0x70104, 0x80059, 0x80019, 0x90092, 0x70114, 0x80079, 0x80039, 0x900d2, 0x7010c, 0x80069, 0x80029, 0x900b2, 0x80009, 0x80089, 0x80049, 0x900f2, 0x70102, 0x80055, 0x80015, 0x8011d, 0x70112, 0x80075, 0x80035, 0x900ca, 0x7010a, 0x80065, 0x80025, 0x900aa, 0x80005, 0x80085, 0x80045, 0x900ea, 0x70106, 0x8005d, 0x8001d, 0x9009a, 0x70116, 0x8007d, 0x8003d, 0x900da, 0x7010e, 0x8006d, 0x8002d, 0x900ba, 0x8000d, 0x8008d, 0x8004d, 0x900fa, 0x70101, 0x80053, 0x80013, 0x8011b, 0x70111, 0x80073, 0x80033, 0x900c6, 0x70109, 0x80063, 0x80023, 0x900a6, 0x80003, 0x80083, 0x80043, 0x900e6, 0x70105, 0x8005b, 0x8001b, 0x90096, 0x70115, 0x8007b, 0x8003b, 0x900d6, 0x7010d, 0x8006b, 0x8002b, 0x900b6, 0x8000b, 0x8008b, 0x8004b,
vendor: 3,825 bytes, lines 4039-4065
40390x900f6, 0x70103, 0x80057, 0x80017, 0x8011f, 0x70113, 0x80077, 0x80037, 0x900ce, 0x7010b, 0x80067, 0x80027, 0x900ae, 0x80007, 0x80087, 0x80047, 0x900ee, 0x70107, 0x8005f, 0x8001f, 0x9009e, 0x70117, 0x8007f, 0x8003f, 0x900de, 0x7010f, 0x8006f, 0x8002f, 0x900be, 0x8000f, 0x8008f, 0x8004f, 0x900fe, 0x70100, 0x80050, 0x80010, 0x80118, 0x70110, 0x80070, 0x80030, 0x900c1, 0x70108, 0x80060, 0x80020, 0x900a1, 0x80000, 0x80080, 0x80040, 0x900e1, 0x70104, 0x80058, 0x80018, 0x90091, 0x70114, 0x80078, 0x80038, 0x900d1, 0x7010c, 0x80068, 0x80028, 0x900b1, 0x80008, 0x80088, 0x80048, 0x900f1, 0x70102, 0x80054, 0x80014, 0x8011c, 0x70112, 0x80074, 0x80034, 0x900c9, 0x7010a, 0x80064, 0x80024, 0x900a9, 0x80004, 0x80084, 0x80044, 0x900e9, 0x70106, 0x8005c, 0x8001c, 0x90099, 0x70116, 0x8007c, 0x8003c, 0x900d9, 0x7010e, 0x8006c, 0x8002c, 0x900b9, 0x8000c, 0x8008c, 0x8004c, 0x900f9, 0x70101, 0x80052, 0x80012, 0x8011a, 0x70111, 0x80072, 0x80032, 0x900c5, 0x70109, 0x80062, 0x80022, 0x900a5, 0x80002, 0x80082, 0x80042, 0x900e5, 0x70105, 0x8005a, 0x8001a, 0x90095, 0x70115, 0x8007a, 0x8003a, 0x900d5, 0x7010d, 0x8006a, 0x8002a, 0x900b5, 0x8000a, 0x8008a, 0x8004a, 0x900f5, 0x70103, 0x80056, 0x80016, 0x8011e, 0x70113, 0x80076, 0x80036, 0x900cd, 0x7010b, 0x80066, 0x80026, 0x900ad, 0x80006, 0x80086, 0x80046, 0x900ed, 0x70107, 0x8005e, 0x8001e, 0x9009d, 0x70117, 0x8007e, 0x8003e, 0x900dd, 0x7010f, 0x8006e, 0x8002e, 0x900bd, 0x8000e, 0x8008e, 0x8004e, 0x900fd, 0x70100, 0x80051, 0x80011, 0x80119, 0x70110, 0x80071, 0x80031, 0x900c3, 0x70108, 0x80061, 0x80021, 0x900a3, 0x80001, 0x80081, 0x80041, 0x900e3, 0x70104, 0x80059, 0x80019, 0x90093, 0x70114, 0x80079, 0x80039, 0x900d3, 0x7010c, 0x80069, 0x80029, 0x900b3, 0x80009, 0x80089, 0x80049, 0x900f3, 0x70102, 0x80055, 0x80015, 0x8011d, 0x70112, 0x80075, 0x80035, 0x900cb, 0x7010a, 0x80065, 0x80025, 0x900ab, 0x80005, 0x80085, 0x80045, 0x900eb, 0x70106, 0x8005d, 0x8001d, 0x9009b, 0x70116, 0x8007d, 0x8003d, 0x900db, 0x7010e, 0x8006d, 0x8002d, 0x900bb, 0x8000d, 0x8008d, 0x8004d, 0x900fb, 0x70101, 0x80053, 0x80013, 0x8011b, 0x70111, 0x80073, 0x80033, 0x900c7, 0x70109, 0x80063, 0x80023, 0x900a7, 0x80003, 0x80083, 0x80043, 0x900e7, 0x70105, 0x8005b, 0x8001b, 0x90097, 0x70115, 0x8007b, 0x8003b, 0x900d7, 0x7010d, 0x8006b, 0x8002b, 0x900b7, 0x8000b, 0x8008b, 0x8004b, 0x900f7, 0x70103, 0x80057, 0x80017, 0x8011f, 0x70113, 0x80077, 0x80037, 0x900cf, 0x7010b, 0x80067, 0x80027, 0x900af, 0x80007, 0x80087, 0x80047, 0x900ef, 0x70107, 0x8005f, 0x8001f, 0x9009f, 0x70117, 0x8007f, 0x8003f, 0x900df, 0x7010f, 0x8006f, 0x8002f, 0x900bf, 0x8000f, 0x8008f, 0x8004f, 0x900ff]), 9]; 4040const fixedDistCodeTab = [new Int32Array([0x50000, 0x50010, 0x50008, 0x50018, 0x50004, 0x50014, 0x5000c, 0x5001c, 0x50002, 0x50012, 0x5000a, 0x5001a, 0x50006, 0x50016, 0x5000e, 0x00000, 0x50001, 0x50011, 0x50009, 0x50019, 0x50005, 0x50015, 0x5000d, 0x5001d, 0x50003, 0x50013, 0x5000b, 0x5001b, 0x50007, 0x50017, 0x5000f, 0x00000]), 5]; 4041class FlateStream extends DecodeStream { 4042 constructor(str, maybeLength) { 4043 super(maybeLength); 4044 this.str = str; 4045 this.dict = str.dict; 4046 const cmf = str.getByte(); 4047 const flg = str.getByte(); 4048 if (cmf === -1 || flg === -1) { 4049 throw new FormatError(`Invalid header in flate stream: ${cmf}, ${flg}`); 4050 } 4051 if ((cmf & 0x0f) !== 0x08) { 4052 throw new FormatError(`Unknown compression method in flate stream: ${cmf}, ${flg}`); 4053 } 4054 if (((cmf << 8) + flg) % 31 !== 0) { 4055 throw new FormatError(`Bad FCHECK in flate stream: ${cmf}, ${flg}`); 4056 } 4057 if (flg & 0x20) { 4058 throw new FormatError(`FDICT bit set in flate stream: ${cmf}, ${flg}`); 4059 } 4060 this.codeSize = 0; 4061 this.codeBuf = 0; 4062 } 4063 async getImageData(length, _decoderOptions) { 4064 const data = await this.asyncGetBytes(); 4065 return data?.subarray(0, length) || this.getBytes(
vendor: 12,189 bytes, lines 4065-4654
4065length); 4066 } 4067 async asyncGetBytes() { 4068 this.str.reset(); 4069 const bytes = this.str.getBytes(); 4070 try { 4071 const { 4072 readable, 4073 writable 4074 } = new DecompressionStream("deflate"); 4075 const writer = writable.getWriter(); 4076 await writer.ready; 4077 writer.write(bytes).then(async () => { 4078 await writer.ready; 4079 await writer.close(); 4080 }).catch(() => {}); 4081 const chunks = []; 4082 let totalLength = 0; 4083 for await (const chunk of readable) { 4084 chunks.push(chunk); 4085 totalLength += chunk.byteLength; 4086 } 4087 const data = new Uint8Array(totalLength); 4088 let offset = 0; 4089 for (const chunk of chunks) { 4090 data.set(chunk, offset); 4091 offset += chunk.byteLength; 4092 } 4093 return data; 4094 } catch { 4095 this.str = new Stream(bytes, 2, bytes.length, this.str.dict); 4096 this.reset(); 4097 return null; 4098 } 4099 } 4100 get isAsync() { 4101 return true; 4102 } 4103 getBits(bits) { 4104 const str = this.str; 4105 let codeSize = this.codeSize; 4106 let codeBuf = this.codeBuf; 4107 let b; 4108 while (codeSize < bits) { 4109 if ((b = str.getByte()) === -1) { 4110 throw new FormatError("Bad encoding in flate stream"); 4111 } 4112 codeBuf |= b << codeSize; 4113 codeSize += 8; 4114 } 4115 b = codeBuf & (1 << bits) - 1; 4116 this.codeBuf = codeBuf >> bits; 4117 this.codeSize = codeSize -= bits; 4118 return b; 4119 } 4120 getCode(table) { 4121 const str = this.str; 4122 const codes = table[0]; 4123 const maxLen = table[1]; 4124 let codeSize = this.codeSize; 4125 let codeBuf = this.codeBuf; 4126 let b; 4127 while (codeSize < maxLen) { 4128 if ((b = str.getByte()) === -1) { 4129 break; 4130 } 4131 codeBuf |= b << codeSize; 4132 codeSize += 8; 4133 } 4134 const code = codes[codeBuf & (1 << maxLen) - 1]; 4135 const codeLen = code >> 16; 4136 const codeVal = code & 0xffff; 4137 if (codeLen < 1 || codeSize < codeLen) { 4138 throw new FormatError("Bad encoding in flate stream"); 4139 } 4140 this.codeBuf = codeBuf >> codeLen; 4141 this.codeSize = codeSize - codeLen; 4142 return codeVal; 4143 } 4144 generateHuffmanTable(lengths) { 4145 const n = lengths.length; 4146 let maxLen = 0; 4147 let i; 4148 for (i = 0; i < n; ++i) { 4149 if (lengths[i] > maxLen) { 4150 maxLen = lengths[i]; 4151 } 4152 } 4153 const size = 1 << maxLen; 4154 const codes = new Int32Array(size); 4155 for (let len = 1, code = 0, skip = 2; len <= maxLen; ++len, code <<= 1, skip <<= 1) { 4156 for (let val = 0; val < n; ++val) { 4157 if (lengths[val] === len) { 4158 let code2 = 0; 4159 let t = code; 4160 for (i = 0; i < len; ++i) { 4161 code2 = code2 << 1 | t & 1; 4162 t >>= 1; 4163 } 4164 for (i = code2; i < size; i += skip) { 4165 codes[i] = len << 16 | val; 4166 } 4167 ++code; 4168 } 4169 } 4170 } 4171 return [codes, maxLen]; 4172 } 4173 #endsStreamOnError(err) { 4174 info(err); 4175 this.eof = true; 4176 } 4177 readBlock() { 4178 let buffer, hdr, len; 4179 const str = this.str; 4180 try { 4181 hdr = this.getBits(3); 4182 } catch (ex) { 4183 this.#endsStreamOnError(ex.message); 4184 return; 4185 } 4186 if (hdr & 1) { 4187 this.eof = true; 4188 } 4189 hdr >>= 1; 4190 if (hdr === 0) { 4191 let b; 4192 if ((b = str.getByte()) === -1) { 4193 this.#endsStreamOnError("Bad block header in flate stream"); 4194 return; 4195 } 4196 let blockLen = b; 4197 if ((b = str.getByte()) === -1) { 4198 this.#endsStreamOnError("Bad block header in flate stream"); 4199 return; 4200 } 4201 blockLen |= b << 8; 4202 if ((b = str.getByte()) === -1) { 4203 this.#endsStreamOnError("Bad block header in flate stream"); 4204 return; 4205 } 4206 let check = b; 4207 if ((b = str.getByte()) === -1) { 4208 this.#endsStreamOnError("Bad block header in flate stream"); 4209 return; 4210 } 4211 check |= b << 8; 4212 if (check !== (~blockLen & 0xffff) && (blockLen !== 0 || check !== 0)) { 4213 throw new FormatError("Bad uncompressed block length in flate stream"); 4214 } 4215 this.codeBuf = 0; 4216 this.codeSize = 0; 4217 const bufferLength = this.bufferLength, 4218 end = bufferLength + blockLen; 4219 buffer = this.ensureBuffer(end); 4220 this.bufferLength = end; 4221 if (blockLen === 0) { 4222 if (str.peekByte() === -1) { 4223 this.eof = true; 4224 } 4225 } else { 4226 const block = str.getBytes(blockLen); 4227 buffer.set(block, bufferLength); 4228 if (block.length < blockLen) { 4229 this.eof = true; 4230 } 4231 } 4232 return; 4233 } 4234 let litCodeTable; 4235 let distCodeTable; 4236 if (hdr === 1) { 4237 litCodeTable = fixedLitCodeTab; 4238 distCodeTable = fixedDistCodeTab; 4239 } else if (hdr === 2) { 4240 const numLitCodes = this.getBits(5) + 257; 4241 const numDistCodes = this.getBits(5) + 1; 4242 const numCodeLenCodes = this.getBits(4) + 4; 4243 const codeLenCodeLengths = new Uint8Array(codeLenCodeMap.length); 4244 let i; 4245 for (i = 0; i < numCodeLenCodes; ++i) { 4246 codeLenCodeLengths[codeLenCodeMap[i]] = this.getBits(3); 4247 } 4248 const codeLenCodeTab = this.generateHuffmanTable(codeLenCodeLengths); 4249 len = 0; 4250 i = 0; 4251 const codes = numLitCodes + numDistCodes; 4252 const codeLengths = new Uint8Array(codes); 4253 let bitsLength, bitsOffset, what; 4254 while (i < codes) { 4255 const code = this.getCode(codeLenCodeTab); 4256 if (code === 16) { 4257 bitsLength = 2; 4258 bitsOffset = 3; 4259 what = len; 4260 } else if (code === 17) { 4261 bitsLength = 3; 4262 bitsOffset = 3; 4263 what = len = 0; 4264 } else if (code === 18) { 4265 bitsLength = 7; 4266 bitsOffset = 11; 4267 what = len = 0; 4268 } else { 4269 codeLengths[i++] = len = code; 4270 continue; 4271 } 4272 let repeatLength = this.getBits(bitsLength) + bitsOffset; 4273 while (repeatLength-- > 0) { 4274 codeLengths[i++] = what; 4275 } 4276 } 4277 litCodeTable = this.generateHuffmanTable(codeLengths.subarray(0, numLitCodes)); 4278 distCodeTable = this.generateHuffmanTable(codeLengths.subarray(numLitCodes, codes)); 4279 } else { 4280 throw new FormatError("Unknown block type in flate stream"); 4281 } 4282 buffer = this.buffer; 4283 let limit = buffer ? buffer.length : 0; 4284 let pos = this.bufferLength; 4285 while (true) { 4286 let code1 = this.getCode(litCodeTable); 4287 if (code1 < 256) { 4288 if (pos + 1 >= limit) { 4289 buffer = this.ensureBuffer(pos + 1); 4290 limit = buffer.length; 4291 } 4292 buffer[pos++] = code1; 4293 continue; 4294 } 4295 if (code1 === 256) { 4296 this.bufferLength = pos; 4297 return; 4298 } 4299 code1 -= 257; 4300 code1 = lengthDecode[code1]; 4301 let code2 = code1 >> 16; 4302 if (code2 > 0) { 4303 code2 = this.getBits(code2); 4304 } 4305 len = (code1 & 0xffff) + code2; 4306 code1 = this.getCode(distCodeTable); 4307 code1 = distDecode[code1]; 4308 code2 = code1 >> 16; 4309 if (code2 > 0) { 4310 code2 = this.getBits(code2); 4311 } 4312 const dist = (code1 & 0xffff) + code2; 4313 if (pos + len >= limit) { 4314 buffer = this.ensureBuffer(pos + len); 4315 limit = buffer.length; 4316 } 4317 for (let k = 0; k < len; ++k, ++pos) { 4318 buffer[pos] = buffer[pos - dist]; 4319 } 4320 } 4321 } 4322} 4323 4324;// ./src/core/arithmetic_decoder.js 4325const QeTable = [{ 4326 qe: 0x5601, 4327 nmps: 1, 4328 nlps: 1, 4329 switchFlag: 1 4330}, { 4331 qe: 0x3401, 4332 nmps: 2, 4333 nlps: 6, 4334 switchFlag: 0 4335}, { 4336 qe: 0x1801, 4337 nmps: 3, 4338 nlps: 9, 4339 switchFlag: 0 4340}, { 4341 qe: 0x0ac1, 4342 nmps: 4, 4343 nlps: 12, 4344 switchFlag: 0 4345}, { 4346 qe: 0x0521, 4347 nmps: 5, 4348 nlps: 29, 4349 switchFlag: 0 4350}, { 4351 qe: 0x0221, 4352 nmps: 38, 4353 nlps: 33, 4354 switchFlag: 0 4355}, { 4356 qe: 0x5601, 4357 nmps: 7, 4358 nlps: 6, 4359 switchFlag: 1 4360}, { 4361 qe: 0x5401, 4362 nmps: 8, 4363 nlps: 14, 4364 switchFlag: 0 4365}, { 4366 qe: 0x4801, 4367 nmps: 9, 4368 nlps: 14, 4369 switchFlag: 0 4370}, { 4371 qe: 0x3801, 4372 nmps: 10, 4373 nlps: 14, 4374 switchFlag: 0 4375}, { 4376 qe: 0x3001, 4377 nmps: 11, 4378 nlps: 17, 4379 switchFlag: 0 4380}, { 4381 qe: 0x2401, 4382 nmps: 12, 4383 nlps: 18, 4384 switchFlag: 0 4385}, { 4386 qe: 0x1c01, 4387 nmps: 13, 4388 nlps: 20, 4389 switchFlag: 0 4390}, { 4391 qe: 0x1601, 4392 nmps: 29, 4393 nlps: 21, 4394 switchFlag: 0 4395}, { 4396 qe: 0x5601, 4397 nmps: 15, 4398 nlps: 14, 4399 switchFlag: 1 4400}, { 4401 qe: 0x5401, 4402 nmps: 16, 4403 nlps: 14, 4404 switchFlag: 0 4405}, { 4406 qe: 0x5101, 4407 nmps: 17, 4408 nlps: 15, 4409 switchFlag: 0 4410}, { 4411 qe: 0x4801, 4412 nmps: 18, 4413 nlps: 16, 4414 switchFlag: 0 4415}, { 4416 qe: 0x3801, 4417 nmps: 19, 4418 nlps: 17, 4419 switchFlag: 0 4420}, { 4421 qe: 0x3401, 4422 nmps: 20, 4423 nlps: 18, 4424 switchFlag: 0 4425}, { 4426 qe: 0x3001, 4427 nmps: 21, 4428 nlps: 19, 4429 switchFlag: 0 4430}, { 4431 qe: 0x2801, 4432 nmps: 22, 4433 nlps: 19, 4434 switchFlag: 0 4435}, { 4436 qe: 0x2401, 4437 nmps: 23, 4438 nlps: 20, 4439 switchFlag: 0 4440}, { 4441 qe: 0x2201, 4442 nmps: 24, 4443 nlps: 21, 4444 switchFlag: 0 4445}, { 4446 qe: 0x1c01, 4447 nmps: 25, 4448 nlps: 22, 4449 switchFlag: 0 4450}, { 4451 qe: 0x1801, 4452 nmps: 26, 4453 nlps: 23, 4454 switchFlag: 0 4455}, { 4456 qe: 0x1601, 4457 nmps: 27, 4458 nlps: 24, 4459 switchFlag: 0 4460}, { 4461 qe: 0x1401, 4462 nmps: 28, 4463 nlps: 25, 4464 switchFlag: 0 4465}, { 4466 qe: 0x1201, 4467 nmps: 29, 4468 nlps: 26, 4469 switchFlag: 0 4470}, { 4471 qe: 0x1101, 4472 nmps: 30, 4473 nlps: 27, 4474 switchFlag: 0 4475}, { 4476 qe: 0x0ac1, 4477 nmps: 31, 4478 nlps: 28, 4479 switchFlag: 0 4480}, { 4481 qe: 0x09c1, 4482 nmps: 32, 4483 nlps: 29, 4484 switchFlag: 0 4485}, { 4486 qe: 0x08a1, 4487 nmps: 33, 4488 nlps: 30, 4489 switchFlag: 0 4490}, { 4491 qe: 0x0521, 4492 nmps: 34, 4493 nlps: 31, 4494 switchFlag: 0 4495}, { 4496 qe: 0x0441, 4497 nmps: 35, 4498 nlps: 32, 4499 switchFlag: 0 4500}, { 4501 qe: 0x02a1, 4502 nmps: 36, 4503 nlps: 33, 4504 switchFlag: 0 4505}, { 4506 qe: 0x0221, 4507 nmps: 37, 4508 nlps: 34, 4509 switchFlag: 0 4510}, { 4511 qe: 0x0141, 4512 nmps: 38, 4513 nlps: 35, 4514 switchFlag: 0 4515}, { 4516 qe: 0x0111, 4517 nmps: 39, 4518 nlps: 36, 4519 switchFlag: 0 4520}, { 4521 qe: 0x0085, 4522 nmps: 40, 4523 nlps: 37, 4524 switchFlag: 0 4525}, { 4526 qe: 0x0049, 4527 nmps: 41, 4528 nlps: 38, 4529 switchFlag: 0 4530}, { 4531 qe: 0x0025, 4532 nmps: 42, 4533 nlps: 39, 4534 switchFlag: 0 4535}, { 4536 qe: 0x0015, 4537 nmps: 43, 4538 nlps: 40, 4539 switchFlag: 0 4540}, { 4541 qe: 0x0009, 4542 nmps: 44, 4543 nlps: 41, 4544 switchFlag: 0 4545}, { 4546 qe: 0x0005, 4547 nmps: 45, 4548 nlps: 42, 4549 switchFlag: 0 4550}, { 4551 qe: 0x0001, 4552 nmps: 45, 4553 nlps: 43, 4554 switchFlag: 0 4555}, { 4556 qe: 0x5601, 4557 nmps: 46, 4558 nlps: 46, 4559 switchFlag: 0 4560}]; 4561class ArithmeticDecoder { 4562 constructor(data, start, end) { 4563 this.data = data; 4564 this.bp = start; 4565 this.dataEnd = end; 4566 this.chigh = data[start]; 4567 this.clow = 0; 4568 this.byteIn(); 4569 this.chigh = this.chigh << 7 & 0xffff | this.clow >> 9 & 0x7f; 4570 this.clow = this.clow << 7 & 0xffff; 4571 this.ct -= 7; 4572 this.a = 0x8000; 4573 } 4574 byteIn() { 4575 const data = this.data; 4576 let bp = this.bp; 4577 if (data[bp] === 0xff) { 4578 if (data[bp + 1] > 0x8f) { 4579 this.clow += 0xff00; 4580 this.ct = 8; 4581 } else { 4582 bp++; 4583 this.clow += data[bp] << 9; 4584 this.ct = 7; 4585 this.bp = bp; 4586 } 4587 } else { 4588 bp++; 4589 this.clow += bp < this.dataEnd ? data[bp] << 8 : 0xff00; 4590 this.ct = 8; 4591 this.bp = bp; 4592 } 4593 if (this.clow > 0xffff) { 4594 this.chigh += this.clow >> 16; 4595 this.clow &= 0xffff; 4596 } 4597 } 4598 readBit(contexts, pos) { 4599 let cx_index = contexts[pos] >> 1, 4600 cx_mps = contexts[pos] & 1; 4601 const qeTableIcx = QeTable[cx_index]; 4602 const qeIcx = qeTableIcx.qe; 4603 let d; 4604 let a = this.a - qeIcx; 4605 if (this.chigh < qeIcx) { 4606 if (a < qeIcx) { 4607 a = qeIcx; 4608 d = cx_mps; 4609 cx_index = qeTableIcx.nmps; 4610 } else { 4611 a = qeIcx; 4612 d = 1 ^ cx_mps; 4613 if (qeTableIcx.switchFlag === 1) { 4614 cx_mps = d; 4615 } 4616 cx_index = qeTableIcx.nlps; 4617 } 4618 } else { 4619 this.chigh -= qeIcx; 4620 if ((a & 0x8000) !== 0) { 4621 this.a = a; 4622 return cx_mps; 4623 } 4624 if (a < qeIcx) { 4625 d = 1 ^ cx_mps; 4626 if (qeTableIcx.switchFlag === 1) { 4627 cx_mps = d; 4628 } 4629 cx_index = qeTableIcx.nlps; 4630 } else { 4631 d = cx_mps; 4632 cx_index = qeTableIcx.nmps; 4633 } 4634 } 4635 do { 4636 if (this.ct === 0) { 4637 this.byteIn(); 4638 } 4639 a <<= 1; 4640 this.chigh = this.chigh << 1 & 0xffff | this.clow >> 15 & 1; 4641 this.clow = this.clow << 1 & 0xffff; 4642 this.ct--; 4643 } while ((a & 0x8000) === 0); 4644 this.a = a; 4645 contexts[pos] = cx_index << 1 | cx_mps; 4646 return d; 4647 } 4648} 4649 4650;// ./src/core/jbig2.js 4651 4652 4653 4654
vendor: 1,514 bytes, lines 4655-4706
4655class Jbig2Error extends BaseException { 4656 constructor(msg) { 4657 super(msg, "Jbig2Error"); 4658 } 4659} 4660class ContextCache { 4661 getContexts(id) { 4662 if (id in this) { 4663 return this[id]; 4664 } 4665 return this[id] = new Int8Array(1 << 16); 4666 } 4667} 4668class DecodingContext { 4669 constructor(data, start, end) { 4670 this.data = data; 4671 this.start = start; 4672 this.end = end; 4673 } 4674 get decoder() { 4675 const decoder = new ArithmeticDecoder(this.data, this.start, this.end); 4676 return shadow(this, "decoder", decoder); 4677 } 4678 get contextCache() { 4679 const cache = new ContextCache(); 4680 return shadow(this, "contextCache", cache); 4681 } 4682} 4683const MAX_INT_32 = 2 ** 31 - 1; 4684const MIN_INT_32 = -(2 ** 31); 4685function decodeInteger(contextCache, procedure, decoder) { 4686 const contexts = contextCache.getContexts(procedure); 4687 let prev = 1; 4688 function readBits(length) { 4689 let v = 0; 4690 for (let i = 0; i < length; i++) { 4691 const bit = decoder.readBit(contexts, prev); 4692 prev = prev < 256 ? prev << 1 | bit : (prev << 1 | bit) & 511 | 256; 4693 v = v << 1 | bit; 4694 } 4695 return v >>> 0; 4696 } 4697 const sign = readBits(1); 4698 const value = readBits(1) ? readBits(1) ? readBits(1) ? readBits(1) ? readBits(1) ? readBits(32) + 4436 : readBits(12) + 340 : readBits(8) + 84 : readBits(6) + 20 : readBits(4) + 4 : readBits(2); 4699 let signedValue; 4700 if (sign === 0) { 4701 signedValue = value; 4702 } else if (value > 0) { 4703 signedValue = -value; 4704 } 4705 if (signedValue >= MIN_INT_32 && signedValue <= MAX_INT_32) { 4706 return signedV
vendor: 9,035 bytes, lines 4706-5086
4706alue; 4707 } 4708 return null; 4709} 4710function decodeIAID(contextCache, decoder, codeLength) { 4711 const contexts = contextCache.getContexts("IAID"); 4712 let prev = 1; 4713 for (let i = 0; i < codeLength; i++) { 4714 const bit = decoder.readBit(contexts, prev); 4715 prev = prev << 1 | bit; 4716 } 4717 if (codeLength < 31) { 4718 return prev & (1 << codeLength) - 1; 4719 } 4720 return prev & 0x7fffffff; 4721} 4722const SegmentTypes = ["SymbolDictionary", null, null, null, "IntermediateTextRegion", null, "ImmediateTextRegion", "ImmediateLosslessTextRegion", null, null, null, null, null, null, null, null, "PatternDictionary", null, null, null, "IntermediateHalftoneRegion", null, "ImmediateHalftoneRegion", "ImmediateLosslessHalftoneRegion", null, null, null, null, null, null, null, null, null, null, null, null, "IntermediateGenericRegion", null, "ImmediateGenericRegion", "ImmediateLosslessGenericRegion", "IntermediateGenericRefinementRegion", null, "ImmediateGenericRefinementRegion", "ImmediateLosslessGenericRefinementRegion", null, null, null, null, "PageInformation", "EndOfPage", "EndOfStripe", "EndOfFile", "Profiles", "Tables", null, null, null, null, null, null, null, null, "Extension"]; 4723const CodingTemplates = [[{ 4724 x: -1, 4725 y: -2 4726}, { 4727 x: 0, 4728 y: -2 4729}, { 4730 x: 1, 4731 y: -2 4732}, { 4733 x: -2, 4734 y: -1 4735}, { 4736 x: -1, 4737 y: -1 4738}, { 4739 x: 0, 4740 y: -1 4741}, { 4742 x: 1, 4743 y: -1 4744}, { 4745 x: 2, 4746 y: -1 4747}, { 4748 x: -4, 4749 y: 0 4750}, { 4751 x: -3, 4752 y: 0 4753}, { 4754 x: -2, 4755 y: 0 4756}, { 4757 x: -1, 4758 y: 0 4759}], [{ 4760 x: -1, 4761 y: -2 4762}, { 4763 x: 0, 4764 y: -2 4765}, { 4766 x: 1, 4767 y: -2 4768}, { 4769 x: 2, 4770 y: -2 4771}, { 4772 x: -2, 4773 y: -1 4774}, { 4775 x: -1, 4776 y: -1 4777}, { 4778 x: 0, 4779 y: -1 4780}, { 4781 x: 1, 4782 y: -1 4783}, { 4784 x: 2, 4785 y: -1 4786}, { 4787 x: -3, 4788 y: 0 4789}, { 4790 x: -2, 4791 y: 0 4792}, { 4793 x: -1, 4794 y: 0 4795}], [{ 4796 x: -1, 4797 y: -2 4798}, { 4799 x: 0, 4800 y: -2 4801}, { 4802 x: 1, 4803 y: -2 4804}, { 4805 x: -2, 4806 y: -1 4807}, { 4808 x: -1, 4809 y: -1 4810}, { 4811 x: 0, 4812 y: -1 4813}, { 4814 x: 1, 4815 y: -1 4816}, { 4817 x: -2, 4818 y: 0 4819}, { 4820 x: -1, 4821 y: 0 4822}], [{ 4823 x: -3, 4824 y: -1 4825}, { 4826 x: -2, 4827 y: -1 4828}, { 4829 x: -1, 4830 y: -1 4831}, { 4832 x: 0, 4833 y: -1 4834}, { 4835 x: 1, 4836 y: -1 4837}, { 4838 x: -4, 4839 y: 0 4840}, { 4841 x: -3, 4842 y: 0 4843}, { 4844 x: -2, 4845 y: 0 4846}, { 4847 x: -1, 4848 y: 0 4849}]]; 4850const RefinementTemplates = [{ 4851 coding: [{ 4852 x: 0, 4853 y: -1 4854 }, { 4855 x: 1, 4856 y: -1 4857 }, { 4858 x: -1, 4859 y: 0 4860 }], 4861 reference: [{ 4862 x: 0, 4863 y: -1 4864 }, { 4865 x: 1, 4866 y: -1 4867 }, { 4868 x: -1, 4869 y: 0 4870 }, { 4871 x: 0, 4872 y: 0 4873 }, { 4874 x: 1, 4875 y: 0 4876 }, { 4877 x: -1, 4878 y: 1 4879 }, { 4880 x: 0, 4881 y: 1 4882 }, { 4883 x: 1, 4884 y: 1 4885 }] 4886}, { 4887 coding: [{ 4888 x: -1, 4889 y: -1 4890 }, { 4891 x: 0, 4892 y: -1 4893 }, { 4894 x: 1, 4895 y: -1 4896 }, { 4897 x: -1, 4898 y: 0 4899 }], 4900 reference: [{ 4901 x: 0, 4902 y: -1 4903 }, { 4904 x: -1, 4905 y: 0 4906 }, { 4907 x: 0, 4908 y: 0 4909 }, { 4910 x: 1, 4911 y: 0 4912 }, { 4913 x: 0, 4914 y: 1 4915 }, { 4916 x: 1, 4917 y: 1 4918 }] 4919}]; 4920const ReusedContexts = [0x9b25, 0x0795, 0x00e5, 0x0195]; 4921const RefinementReusedContexts = [0x0020, 0x0008]; 4922function decodeBitmapTemplate0(width, height, decodingContext) { 4923 const decoder = decodingContext.decoder; 4924 const contexts = decodingContext.contextCache.getContexts("GB"); 4925 const bitmap = []; 4926 let contextLabel, i, j, pixel, row, row1, row2; 4927 const OLD_PIXEL_MASK = 0x7bf7; 4928 for (i = 0; i < height; i++) { 4929 row = bitmap[i] = new Uint8Array(width); 4930 row1 = i < 1 ? row : bitmap[i - 1]; 4931 row2 = i < 2 ? row : bitmap[i - 2]; 4932 contextLabel = row2[0] << 13 | row2[1] << 12 | row2[2] << 11 | row1[0] << 7 | row1[1] << 6 | row1[2] << 5 | row1[3] << 4; 4933 for (j = 0; j < width; j++) { 4934 row[j] = pixel = decoder.readBit(contexts, contextLabel); 4935 contextLabel = (contextLabel & OLD_PIXEL_MASK) << 1 | (j + 3 < width ? row2[j + 3] << 11 : 0) | (j + 4 < width ? row1[j + 4] << 4 : 0) | pixel; 4936 } 4937 } 4938 return bitmap; 4939} 4940function decodeBitmap(mmr, width, height, templateIndex, prediction, skip, at, decodingContext) { 4941 if (mmr) { 4942 const input = new Reader(decodingContext.data, decodingContext.start, decodingContext.end); 4943 return decodeMMRBitmap(input, width, height, false); 4944 } 4945 if (templateIndex === 0 && !skip && !prediction && at.length === 4 && at[0].x === 3 && at[0].y === -1 && at[1].x === -3 && at[1].y === -1 && at[2].x === 2 && at[2].y === -2 && at[3].x === -2 && at[3].y === -2) { 4946 return decodeBitmapTemplate0(width, height, decodingContext); 4947 } 4948 const useskip = !!skip; 4949 const template = CodingTemplates[templateIndex].concat(at); 4950 template.sort(function (a, b) { 4951 return a.y - b.y || a.x - b.x; 4952 }); 4953 const templateLength = template.length; 4954 const templateX = new Int8Array(templateLength); 4955 const templateY = new Int8Array(templateLength); 4956 const changingTemplateEntries = []; 4957 let reuseMask = 0, 4958 minX = 0, 4959 maxX = 0, 4960 minY = 0; 4961 let c, k; 4962 for (k = 0; k < templateLength; k++) { 4963 templateX[k] = template[k].x; 4964 templateY[k] = template[k].y; 4965 minX = Math.min(minX, template[k].x); 4966 maxX = Math.max(maxX, template[k].x); 4967 minY = Math.min(minY, template[k].y); 4968 if (k < templateLength - 1 && template[k].y === template[k + 1].y && template[k].x === template[k + 1].x - 1) { 4969 reuseMask |= 1 << templateLength - 1 - k; 4970 } else { 4971 changingTemplateEntries.push(k); 4972 } 4973 } 4974 const changingEntriesLength = changingTemplateEntries.length; 4975 const changingTemplateX = new Int8Array(changingEntriesLength); 4976 const changingTemplateY = new Int8Array(changingEntriesLength); 4977 const changingTemplateBit = new Uint16Array(changingEntriesLength); 4978 for (c = 0; c < changingEntriesLength; c++) { 4979 k = changingTemplateEntries[c]; 4980 changingTemplateX[c] = template[k].x; 4981 changingTemplateY[c] = template[k].y; 4982 changingTemplateBit[c] = 1 << templateLength - 1 - k; 4983 } 4984 const sbb_left = -minX; 4985 const sbb_top = -minY; 4986 const sbb_right = width - maxX; 4987 const pseudoPixelContext = ReusedContexts[templateIndex]; 4988 let row = new Uint8Array(width); 4989 const bitmap = []; 4990 const decoder = decodingContext.decoder; 4991 const contexts = decodingContext.contextCache.getContexts("GB"); 4992 let ltp = 0, 4993 j, 4994 i0, 4995 j0, 4996 contextLabel = 0, 4997 bit, 4998 shift; 4999 for (let i = 0; i < height; i++) { 5000 if (prediction) { 5001 const sltp = decoder.readBit(contexts, pseudoPixelContext); 5002 ltp ^= sltp; 5003 if (ltp) { 5004 bitmap.push(row); 5005 continue; 5006 } 5007 } 5008 row = new Uint8Array(row); 5009 bitmap.push(row); 5010 for (j = 0; j < width; j++) { 5011 if (useskip && skip[i][j]) { 5012 row[j] = 0; 5013 continue; 5014 } 5015 if (j >= sbb_left && j < sbb_right && i >= sbb_top) { 5016 contextLabel = contextLabel << 1 & reuseMask; 5017 for (k = 0; k < changingEntriesLength; k++) { 5018 i0 = i + changingTemplateY[k]; 5019 j0 = j + changingTemplateX[k]; 5020 bit = bitmap[i0][j0]; 5021 if (bit) { 5022 bit = changingTemplateBit[k]; 5023 contextLabel |= bit; 5024 } 5025 } 5026 } else { 5027 contextLabel = 0; 5028 shift = templateLength - 1; 5029 for (k = 0; k < templateLength; k++, shift--) { 5030 j0 = j + templateX[k]; 5031 if (j0 >= 0 && j0 < width) { 5032 i0 = i + templateY[k]; 5033 if (i0 >= 0) { 5034 bit = bitmap[i0][j0]; 5035 if (bit) { 5036 contextLabel |= bit << shift; 5037 } 5038 } 5039 } 5040 } 5041 } 5042 const pixel = decoder.readBit(contexts, contextLabel); 5043 row[j] = pixel; 5044 } 5045 } 5046 return bitmap; 5047} 5048function decodeRefinement(width, height, templateIndex, referenceBitmap, offsetX, offsetY, prediction, at, decodingContext) { 5049 let codingTemplate = RefinementTemplates[templateIndex].coding; 5050 if (templateIndex === 0) { 5051 codingTemplate = codingTemplate.concat([at[0]]); 5052 } 5053 const codingTemplateLength = codingTemplate.length; 5054 const codingTemplateX = new Int32Array(codingTemplateLength); 5055 const codingTemplateY = new Int32Array(codingTemplateLength); 5056 let k; 5057 for (k = 0; k < codingTemplateLength; k++) { 5058 codingTemplateX[k] = codingTemplate[k].x; 5059 codingTemplateY[k] = codingTemplate[k].y; 5060 } 5061 let referenceTemplate = RefinementTemplates[templateIndex].reference; 5062 if (templateIndex === 0) { 5063 referenceTemplate = referenceTemplate.concat([at[1]]); 5064 } 5065 const referenceTemplateLength = referenceTemplate.length; 5066 const referenceTemplateX = new Int32Array(referenceTemplateLength); 5067 const referenceTemplateY = new Int32Array(referenceTemplateLength); 5068 for (k = 0; k < referenceTemplateLength; k++) { 5069 referenceTemplateX[k] = referenceTemplate[k].x; 5070 referenceTemplateY[k] = referenceTemplate[k].y; 5071 } 5072 const referenceWidth = referenceBitmap[0].length; 5073 const referenceHeight = referenceBitmap.length; 5074 const pseudoPixelContext = RefinementReusedContexts[templateIndex]; 5075 const bitmap = []; 5076 const decoder = decodingContext.decoder; 5077 const contexts = decodingContext.contextCache.getContexts("GR"); 5078 let ltp = 0; 5079 for (let i = 0; i < height; i++) { 5080 if (prediction) { 5081 const sltp = decoder.readBit(contexts, pseudoPixelContext); 5082 ltp ^= sltp; 5083 if (ltp) { 5084 throw new Jbig2Error("prediction is not supported"); 5085 } 5086 }
vendor: 5,979 bytes, lines 5087-5235
5087 const row = new Uint8Array(width); 5088 bitmap.push(row); 5089 for (let j = 0; j < width; j++) { 5090 let i0, j0; 5091 let contextLabel = 0; 5092 for (k = 0; k < codingTemplateLength; k++) { 5093 i0 = i + codingTemplateY[k]; 5094 j0 = j + codingTemplateX[k]; 5095 if (i0 < 0 || j0 < 0 || j0 >= width) { 5096 contextLabel <<= 1; 5097 } else { 5098 contextLabel = contextLabel << 1 | bitmap[i0][j0]; 5099 } 5100 } 5101 for (k = 0; k < referenceTemplateLength; k++) { 5102 i0 = i + referenceTemplateY[k] - offsetY; 5103 j0 = j + referenceTemplateX[k] - offsetX; 5104 if (i0 < 0 || i0 >= referenceHeight || j0 < 0 || j0 >= referenceWidth) { 5105 contextLabel <<= 1; 5106 } else { 5107 contextLabel = contextLabel << 1 | referenceBitmap[i0][j0]; 5108 } 5109 } 5110 const pixel = decoder.readBit(contexts, contextLabel); 5111 row[j] = pixel; 5112 } 5113 } 5114 return bitmap; 5115} 5116function decodeSymbolDictionary(huffman, refinement, symbols, numberOfNewSymbols, numberOfExportedSymbols, huffmanTables, templateIndex, at, refinementTemplateIndex, refinementAt, decodingContext, huffmanInput) { 5117 if (huffman && refinement) { 5118 throw new Jbig2Error("symbol refinement with Huffman is not supported"); 5119 } 5120 const newSymbols = []; 5121 let currentHeight = 0; 5122 let symbolCodeLength = log2(symbols.length + numberOfNewSymbols); 5123 const decoder = decodingContext.decoder; 5124 const contextCache = decodingContext.contextCache; 5125 let tableB1, symbolWidths; 5126 if (huffman) { 5127 tableB1 = getStandardTable(1); 5128 symbolWidths = []; 5129 symbolCodeLength = Math.max(symbolCodeLength, 1); 5130 } 5131 while (newSymbols.length < numberOfNewSymbols) { 5132 const deltaHeight = huffman ? huffmanTables.tableDeltaHeight.decode(huffmanInput) : decodeInteger(contextCache, "IADH", decoder); 5133 currentHeight += deltaHeight; 5134 let currentWidth = 0, 5135 totalWidth = 0; 5136 const firstSymbol = huffman ? symbolWidths.length : 0; 5137 while (true) { 5138 const deltaWidth = huffman ? huffmanTables.tableDeltaWidth.decode(huffmanInput) : decodeInteger(contextCache, "IADW", decoder); 5139 if (deltaWidth === null) { 5140 break; 5141 } 5142 currentWidth += deltaWidth; 5143 totalWidth += currentWidth; 5144 let bitmap; 5145 if (refinement) { 5146 const numberOfInstances = decodeInteger(contextCache, "IAAI", decoder); 5147 if (numberOfInstances > 1) { 5148 bitmap = decodeTextRegion(huffman, refinement, currentWidth, currentHeight, 0, numberOfInstances, 1, symbols.concat(newSymbols), symbolCodeLength, 0, 0, 1, 0, huffmanTables, refinementTemplateIndex, refinementAt, decodingContext, 0, huffmanInput); 5149 } else { 5150 const symbolId = decodeIAID(contextCache, decoder, symbolCodeLength); 5151 const rdx = decodeInteger(contextCache, "IARDX", decoder); 5152 const rdy = decodeInteger(contextCache, "IARDY", decoder); 5153 const symbol = symbolId < symbols.length ? symbols[symbolId] : newSymbols[symbolId - symbols.length]; 5154 bitmap = decodeRefinement(currentWidth, currentHeight, refinementTemplateIndex, symbol, rdx, rdy, false, refinementAt, decodingContext); 5155 } 5156 newSymbols.push(bitmap); 5157 } else if (huffman) { 5158 symbolWidths.push(currentWidth); 5159 } else { 5160 bitmap = decodeBitmap(false, currentWidth, currentHeight, templateIndex, false, null, at, decodingContext); 5161 newSymbols.push(bitmap); 5162 } 5163 } 5164 if (huffman && !refinement) { 5165 const bitmapSize = huffmanTables.tableBitmapSize.decode(huffmanInput); 5166 huffmanInput.byteAlign(); 5167 let collectiveBitmap; 5168 if (bitmapSize === 0) { 5169 collectiveBitmap = readUncompressedBitmap(huffmanInput, totalWidth, currentHeight); 5170 } else { 5171 const originalEnd = huffmanInput.end; 5172 const bitmapEnd = huffmanInput.position + bitmapSize; 5173 huffmanInput.end = bitmapEnd; 5174 collectiveBitmap = decodeMMRBitmap(huffmanInput, totalWidth, currentHeight, false); 5175 huffmanInput.end = originalEnd; 5176 huffmanInput.position = bitmapEnd; 5177 } 5178 const numberOfSymbolsDecoded = symbolWidths.length; 5179 if (firstSymbol === numberOfSymbolsDecoded - 1) { 5180 newSymbols.push(collectiveBitmap); 5181 } else { 5182 let i, 5183 y, 5184 xMin = 0, 5185 xMax, 5186 bitmapWidth, 5187 symbolBitmap; 5188 for (i = firstSymbol; i < numberOfSymbolsDecoded; i++) { 5189 bitmapWidth = symbolWidths[i]; 5190 xMax = xMin + bitmapWidth; 5191 symbolBitmap = []; 5192 for (y = 0; y < currentHeight; y++) { 5193 symbolBitmap.push(collectiveBitmap[y].subarray(xMin, xMax)); 5194 } 5195 newSymbols.push(symbolBitmap); 5196 xMin = xMax; 5197 } 5198 } 5199 } 5200 } 5201 const exportedSymbols = [], 5202 flags = []; 5203 let currentFlag = false, 5204 i, 5205 ii; 5206 const totalSymbolsLength = symbols.length + numberOfNewSymbols; 5207 while (flags.length < totalSymbolsLength) { 5208 let runLength = huffman ? tableB1.decode(huffmanInput) : decodeInteger(contextCache, "IAEX", decoder); 5209 while (runLength--) { 5210 flags.push(currentFlag); 5211 } 5212 currentFlag = !currentFlag; 5213 } 5214 for (i = 0, ii = symbols.length; i < ii; i++) { 5215 if (flags[i]) { 5216 exportedSymbols.push(symbols[i]); 5217 } 5218 } 5219 for (let j = 0; j < numberOfNewSymbols; i++, j++) { 5220 if (flags[i]) { 5221 exportedSymbols.push(newSymbols[j]); 5222 } 5223 } 5224 return exportedSymbols; 5225} 5226function decodeTextRegion(huffman, refinement, width, height, defaultPixelValue, numberOfSymbolInstances, stripSize, inputSymbols, symbolCodeLength, transposed, dsOffset, referenceCorner, combinationOperator, huffmanTables, refinementTemplateIndex, refinementAt, decodingContext, logStripSize, huffmanInput) { 5227 if (huffman && refinement) { 5228 throw new Jbig2Error("refinement with Huffman is not supported"); 5229 } 5230 const bitmap = []; 5231 let i, row; 5232 for (i = 0; i < height; i++) { 5233 row = new Uint8Array(width); 5234 if (defaultPixelValue) { 5235
vendor: 5,765 bytes, lines 5235-5392
5235for (let j = 0; j < width; j++) { 5236 row[j] = defaultPixelValue; 5237 } 5238 } 5239 bitmap.push(row); 5240 } 5241 const decoder = decodingContext.decoder; 5242 const contextCache = decodingContext.contextCache; 5243 let stripT = huffman ? -huffmanTables.tableDeltaT.decode(huffmanInput) : -decodeInteger(contextCache, "IADT", decoder); 5244 let firstS = 0; 5245 i = 0; 5246 while (i < numberOfSymbolInstances) { 5247 const deltaT = huffman ? huffmanTables.tableDeltaT.decode(huffmanInput) : decodeInteger(contextCache, "IADT", decoder); 5248 stripT += deltaT; 5249 const deltaFirstS = huffman ? huffmanTables.tableFirstS.decode(huffmanInput) : decodeInteger(contextCache, "IAFS", decoder); 5250 firstS += deltaFirstS; 5251 let currentS = firstS; 5252 do { 5253 let currentT = 0; 5254 if (stripSize > 1) { 5255 currentT = huffman ? huffmanInput.readBits(logStripSize) : decodeInteger(contextCache, "IAIT", decoder); 5256 } 5257 const t = stripSize * stripT + currentT; 5258 const symbolId = huffman ? huffmanTables.symbolIDTable.decode(huffmanInput) : decodeIAID(contextCache, decoder, symbolCodeLength); 5259 const applyRefinement = refinement && (huffman ? huffmanInput.readBit() : decodeInteger(contextCache, "IARI", decoder)); 5260 let symbolBitmap = inputSymbols[symbolId]; 5261 let symbolWidth = symbolBitmap[0].length; 5262 let symbolHeight = symbolBitmap.length; 5263 if (applyRefinement) { 5264 const rdw = decodeInteger(contextCache, "IARDW", decoder); 5265 const rdh = decodeInteger(contextCache, "IARDH", decoder); 5266 const rdx = decodeInteger(contextCache, "IARDX", decoder); 5267 const rdy = decodeInteger(contextCache, "IARDY", decoder); 5268 symbolWidth += rdw; 5269 symbolHeight += rdh; 5270 symbolBitmap = decodeRefinement(symbolWidth, symbolHeight, refinementTemplateIndex, symbolBitmap, (rdw >> 1) + rdx, (rdh >> 1) + rdy, false, refinementAt, decodingContext); 5271 } 5272 let increment = 0; 5273 if (!transposed) { 5274 if (referenceCorner > 1) { 5275 currentS += symbolWidth - 1; 5276 } else { 5277 increment = symbolWidth - 1; 5278 } 5279 } else if (!(referenceCorner & 1)) { 5280 currentS += symbolHeight - 1; 5281 } else { 5282 increment = symbolHeight - 1; 5283 } 5284 const offsetT = t - (referenceCorner & 1 ? 0 : symbolHeight - 1); 5285 const offsetS = currentS - (referenceCorner & 2 ? symbolWidth - 1 : 0); 5286 let s2, t2, symbolRow; 5287 if (transposed) { 5288 for (s2 = 0; s2 < symbolHeight; s2++) { 5289 row = bitmap[offsetS + s2]; 5290 if (!row) { 5291 continue; 5292 } 5293 symbolRow = symbolBitmap[s2]; 5294 const maxWidth = Math.min(width - offsetT, symbolWidth); 5295 switch (combinationOperator) { 5296 case 0: 5297 for (t2 = 0; t2 < maxWidth; t2++) { 5298 row[offsetT + t2] |= symbolRow[t2]; 5299 } 5300 break; 5301 case 2: 5302 for (t2 = 0; t2 < maxWidth; t2++) { 5303 row[offsetT + t2] ^= symbolRow[t2]; 5304 } 5305 break; 5306 default: 5307 throw new Jbig2Error(`operator ${combinationOperator} is not supported`); 5308 } 5309 } 5310 } else { 5311 for (t2 = 0; t2 < symbolHeight; t2++) { 5312 row = bitmap[offsetT + t2]; 5313 if (!row) { 5314 continue; 5315 } 5316 symbolRow = symbolBitmap[t2]; 5317 switch (combinationOperator) { 5318 case 0: 5319 for (s2 = 0; s2 < symbolWidth; s2++) { 5320 row[offsetS + s2] |= symbolRow[s2]; 5321 } 5322 break; 5323 case 2: 5324 for (s2 = 0; s2 < symbolWidth; s2++) { 5325 row[offsetS + s2] ^= symbolRow[s2]; 5326 } 5327 break; 5328 default: 5329 throw new Jbig2Error(`operator ${combinationOperator} is not supported`); 5330 } 5331 } 5332 } 5333 i++; 5334 const deltaS = huffman ? huffmanTables.tableDeltaS.decode(huffmanInput) : decodeInteger(contextCache, "IADS", decoder); 5335 if (deltaS === null) { 5336 break; 5337 } 5338 currentS += increment + deltaS + dsOffset; 5339 } while (true); 5340 } 5341 return bitmap; 5342} 5343function decodePatternDictionary(mmr, patternWidth, patternHeight, maxPatternIndex, template, decodingContext) { 5344 const at = []; 5345 if (!mmr) { 5346 at.push({ 5347 x: -patternWidth, 5348 y: 0 5349 }); 5350 if (template === 0) { 5351 at.push({ 5352 x: -3, 5353 y: -1 5354 }, { 5355 x: 2, 5356 y: -2 5357 }, { 5358 x: -2, 5359 y: -2 5360 }); 5361 } 5362 } 5363 const collectiveWidth = (maxPatternIndex + 1) * patternWidth; 5364 const collectiveBitmap = decodeBitmap(mmr, collectiveWidth, patternHeight, template, false, null, at, decodingContext); 5365 const patterns = []; 5366 for (let i = 0; i <= maxPatternIndex; i++) { 5367 const patternBitmap = []; 5368 const xMin = patternWidth * i; 5369 const xMax = xMin + patternWidth; 5370 for (let y = 0; y < patternHeight; y++) { 5371 patternBitmap.push(collectiveBitmap[y].subarray(xMin, xMax)); 5372 } 5373 patterns.push(patternBitmap); 5374 } 5375 return patterns; 5376} 5377function decodeHalftoneRegion(mmr, patterns, template, regionWidth, regionHeight, defaultPixelValue, enableSkip, combinationOperator, gridWidth, gridHeight, gridOffsetX, gridOffsetY, gridVectorX, gridVectorY, decodingContext) { 5378 const skip = null; 5379 if (enableSkip) { 5380 throw new Jbig2Error("skip is not supported"); 5381 } 5382 if (combinationOperator !== 0) { 5383 throw new Jbig2Error(`operator "${combinationOperator}" is not supported in halftone region`); 5384 } 5385 const regionBitmap = []; 5386 let i, j, row; 5387 for (i = 0; i < regionHeight; i++) { 5388 row = new Uint8Array(regionWidth); 5389 if (defaultPixelValue) { 5390 for (j = 0; j < regionWidth; j++) { 5391 row[j] = defaultPixelValue; 5392 }
vendor: 15,050 bytes, lines 5392-5810
5392 5393 } 5394 regionBitmap.push(row); 5395 } 5396 const numberOfPatterns = patterns.length; 5397 const pattern0 = patterns[0]; 5398 const patternWidth = pattern0[0].length, 5399 patternHeight = pattern0.length; 5400 const bitsPerValue = log2(numberOfPatterns); 5401 const at = []; 5402 if (!mmr) { 5403 at.push({ 5404 x: template <= 1 ? 3 : 2, 5405 y: -1 5406 }); 5407 if (template === 0) { 5408 at.push({ 5409 x: -3, 5410 y: -1 5411 }, { 5412 x: 2, 5413 y: -2 5414 }, { 5415 x: -2, 5416 y: -2 5417 }); 5418 } 5419 } 5420 const grayScaleBitPlanes = []; 5421 let mmrInput, bitmap; 5422 if (mmr) { 5423 mmrInput = new Reader(decodingContext.data, decodingContext.start, decodingContext.end); 5424 } 5425 for (i = bitsPerValue - 1; i >= 0; i--) { 5426 if (mmr) { 5427 bitmap = decodeMMRBitmap(mmrInput, gridWidth, gridHeight, true); 5428 } else { 5429 bitmap = decodeBitmap(false, gridWidth, gridHeight, template, false, skip, at, decodingContext); 5430 } 5431 grayScaleBitPlanes[i] = bitmap; 5432 } 5433 let mg, ng, bit, patternIndex, patternBitmap, x, y, patternRow, regionRow; 5434 for (mg = 0; mg < gridHeight; mg++) { 5435 for (ng = 0; ng < gridWidth; ng++) { 5436 bit = 0; 5437 patternIndex = 0; 5438 for (j = bitsPerValue - 1; j >= 0; j--) { 5439 bit ^= grayScaleBitPlanes[j][mg][ng]; 5440 patternIndex |= bit << j; 5441 } 5442 patternBitmap = patterns[patternIndex]; 5443 x = gridOffsetX + mg * gridVectorY + ng * gridVectorX >> 8; 5444 y = gridOffsetY + mg * gridVectorX - ng * gridVectorY >> 8; 5445 if (x >= 0 && x + patternWidth <= regionWidth && y >= 0 && y + patternHeight <= regionHeight) { 5446 for (i = 0; i < patternHeight; i++) { 5447 regionRow = regionBitmap[y + i]; 5448 patternRow = patternBitmap[i]; 5449 for (j = 0; j < patternWidth; j++) { 5450 regionRow[x + j] |= patternRow[j]; 5451 } 5452 } 5453 } else { 5454 let regionX, regionY; 5455 for (i = 0; i < patternHeight; i++) { 5456 regionY = y + i; 5457 if (regionY < 0 || regionY >= regionHeight) { 5458 continue; 5459 } 5460 regionRow = regionBitmap[regionY]; 5461 patternRow = patternBitmap[i]; 5462 for (j = 0; j < patternWidth; j++) { 5463 regionX = x + j; 5464 if (regionX >= 0 && regionX < regionWidth) { 5465 regionRow[regionX] |= patternRow[j]; 5466 } 5467 } 5468 } 5469 } 5470 } 5471 } 5472 return regionBitmap; 5473} 5474function readSegmentHeader(data, start) { 5475 const segmentHeader = {}; 5476 segmentHeader.number = readUint32(data, start); 5477 const flags = data[start + 4]; 5478 const segmentType = flags & 0x3f; 5479 if (!SegmentTypes[segmentType]) { 5480 throw new Jbig2Error("invalid segment type: " + segmentType); 5481 } 5482 segmentHeader.type = segmentType; 5483 segmentHeader.typeName = SegmentTypes[segmentType]; 5484 segmentHeader.deferredNonRetain = !!(flags & 0x80); 5485 const pageAssociationFieldSize = !!(flags & 0x40); 5486 const referredFlags = data[start + 5]; 5487 let referredToCount = referredFlags >> 5 & 7; 5488 const retainBits = [referredFlags & 31]; 5489 let position = start + 6; 5490 if (referredFlags === 7) { 5491 referredToCount = readUint32(data, position - 1) & 0x1fffffff; 5492 position += 3; 5493 let bytes = referredToCount + 7 >> 3; 5494 retainBits[0] = data[position++]; 5495 while (--bytes > 0) { 5496 retainBits.push(data[position++]); 5497 } 5498 } else if (referredFlags === 5 || referredFlags === 6) { 5499 throw new Jbig2Error("invalid referred-to flags"); 5500 } 5501 segmentHeader.retainBits = retainBits; 5502 let referredToSegmentNumberSize = 4; 5503 if (segmentHeader.number <= 256) { 5504 referredToSegmentNumberSize = 1; 5505 } else if (segmentHeader.number <= 65536) { 5506 referredToSegmentNumberSize = 2; 5507 } 5508 const referredTo = []; 5509 let i, ii; 5510 for (i = 0; i < referredToCount; i++) { 5511 let number; 5512 if (referredToSegmentNumberSize === 1) { 5513 number = data[position]; 5514 } else if (referredToSegmentNumberSize === 2) { 5515 number = readUint16(data, position); 5516 } else { 5517 number = readUint32(data, position); 5518 } 5519 referredTo.push(number); 5520 position += referredToSegmentNumberSize; 5521 } 5522 segmentHeader.referredTo = referredTo; 5523 if (!pageAssociationFieldSize) { 5524 segmentHeader.pageAssociation = data[position++]; 5525 } else { 5526 segmentHeader.pageAssociation = readUint32(data, position); 5527 position += 4; 5528 } 5529 segmentHeader.length = readUint32(data, position); 5530 position += 4; 5531 if (segmentHeader.length === 0xffffffff) { 5532 if (segmentType === 38) { 5533 const genericRegionInfo = readRegionSegmentInformation(data, position); 5534 const genericRegionSegmentFlags = data[position + RegionSegmentInformationFieldLength]; 5535 const genericRegionMmr = !!(genericRegionSegmentFlags & 1); 5536 const searchPatternLength = 6; 5537 const searchPattern = new Uint8Array(searchPatternLength); 5538 if (!genericRegionMmr) { 5539 searchPattern[0] = 0xff; 5540 searchPattern[1] = 0xac; 5541 } 5542 searchPattern[2] = genericRegionInfo.height >>> 24 & 0xff; 5543 searchPattern[3] = genericRegionInfo.height >> 16 & 0xff; 5544 searchPattern[4] = genericRegionInfo.height >> 8 & 0xff; 5545 searchPattern[5] = genericRegionInfo.height & 0xff; 5546 for (i = position, ii = data.length; i < ii; i++) { 5547 let j = 0; 5548 while (j < searchPatternLength && searchPattern[j] === data[i + j]) { 5549 j++; 5550 } 5551 if (j === searchPatternLength) { 5552 segmentHeader.length = i + searchPatternLength; 5553 break; 5554 } 5555 } 5556 if (segmentHeader.length === 0xffffffff) { 5557 throw new Jbig2Error("segment end was not found"); 5558 } 5559 } else { 5560 throw new Jbig2Error("invalid unknown segment length"); 5561 } 5562 } 5563 segmentHeader.headerEnd = position; 5564 return segmentHeader; 5565} 5566function readSegments(header, data, start, end) { 5567 const segments = []; 5568 let position = start; 5569 while (position < end) { 5570 const segmentHeader = readSegmentHeader(data, position); 5571 position = segmentHeader.headerEnd; 5572 const segment = { 5573 header: segmentHeader, 5574 data 5575 }; 5576 if (!header.randomAccess) { 5577 segment.start = position; 5578 position += segmentHeader.length; 5579 segment.end = position; 5580 } 5581 segments.push(segment); 5582 if (segmentHeader.type === 51) { 5583 break; 5584 } 5585 } 5586 if (header.randomAccess) { 5587 for (let i = 0, ii = segments.length; i < ii; i++) { 5588 segments[i].start = position; 5589 position += segments[i].header.length; 5590 segments[i].end = position; 5591 } 5592 } 5593 return segments; 5594} 5595function readRegionSegmentInformation(data, start) { 5596 return { 5597 width: readUint32(data, start), 5598 height: readUint32(data, start + 4), 5599 x: readUint32(data, start + 8), 5600 y: readUint32(data, start + 12), 5601 combinationOperator: data[start + 16] & 7 5602 }; 5603} 5604const RegionSegmentInformationFieldLength = 17; 5605function processSegment(segment, visitor) { 5606 const header = segment.header; 5607 const data = segment.data, 5608 end = segment.end; 5609 let position = segment.start; 5610 let args, at, i, atLength; 5611 switch (header.type) { 5612 case 0: 5613 const dictionary = {}; 5614 const dictionaryFlags = readUint16(data, position); 5615 dictionary.huffman = !!(dictionaryFlags & 1); 5616 dictionary.refinement = !!(dictionaryFlags & 2); 5617 dictionary.huffmanDHSelector = dictionaryFlags >> 2 & 3; 5618 dictionary.huffmanDWSelector = dictionaryFlags >> 4 & 3; 5619 dictionary.bitmapSizeSelector = dictionaryFlags >> 6 & 1; 5620 dictionary.aggregationInstancesSelector = dictionaryFlags >> 7 & 1; 5621 dictionary.bitmapCodingContextUsed = !!(dictionaryFlags & 256); 5622 dictionary.bitmapCodingContextRetained = !!(dictionaryFlags & 512); 5623 dictionary.template = dictionaryFlags >> 10 & 3; 5624 dictionary.refinementTemplate = dictionaryFlags >> 12 & 1; 5625 position += 2; 5626 if (!dictionary.huffman) { 5627 atLength = dictionary.template === 0 ? 4 : 1; 5628 at = []; 5629 for (i = 0; i < atLength; i++) { 5630 at.push({ 5631 x: readInt8(data, position), 5632 y: readInt8(data, position + 1) 5633 }); 5634 position += 2; 5635 } 5636 dictionary.at = at; 5637 } 5638 if (dictionary.refinement && !dictionary.refinementTemplate) { 5639 at = []; 5640 for (i = 0; i < 2; i++) { 5641 at.push({ 5642 x: readInt8(data, position), 5643 y: readInt8(data, position + 1) 5644 }); 5645 position += 2; 5646 } 5647 dictionary.refinementAt = at; 5648 } 5649 dictionary.numberOfExportedSymbols = readUint32(data, position); 5650 position += 4; 5651 dictionary.numberOfNewSymbols = readUint32(data, position); 5652 position += 4; 5653 args = [dictionary, header.number, header.referredTo, data, position, end]; 5654 break; 5655 case 6: 5656 case 7: 5657 const textRegion = {}; 5658 textRegion.info = readRegionSegmentInformation(data, position); 5659 position += RegionSegmentInformationFieldLength; 5660 const textRegionSegmentFlags = readUint16(data, position); 5661 position += 2; 5662 textRegion.huffman = !!(textRegionSegmentFlags & 1); 5663 textRegion.refinement = !!(textRegionSegmentFlags & 2); 5664 textRegion.logStripSize = textRegionSegmentFlags >> 2 & 3; 5665 textRegion.stripSize = 1 << textRegion.logStripSize; 5666 textRegion.referenceCorner = textRegionSegmentFlags >> 4 & 3; 5667 textRegion.transposed = !!(textRegionSegmentFlags & 64); 5668 textRegion.combinationOperator = textRegionSegmentFlags >> 7 & 3; 5669 textRegion.defaultPixelValue = textRegionSegmentFlags >> 9 & 1; 5670 textRegion.dsOffset = textRegionSegmentFlags << 17 >> 27; 5671 textRegion.refinementTemplate = textRegionSegmentFlags >> 15 & 1; 5672 if (textRegion.huffman) { 5673 const textRegionHuffmanFlags = readUint16(data, position); 5674 position += 2; 5675 textRegion.huffmanFS = textRegionHuffmanFlags & 3; 5676 textRegion.huffmanDS = textRegionHuffmanFlags >> 2 & 3; 5677 textRegion.huffmanDT = textRegionHuffmanFlags >> 4 & 3; 5678 textRegion.huffmanRefinementDW = textRegionHuffmanFlags >> 6 & 3; 5679 textRegion.huffmanRefinementDH = textRegionHuffmanFlags >> 8 & 3; 5680 textRegion.huffmanRefinementDX = textRegionHuffmanFlags >> 10 & 3; 5681 textRegion.huffmanRefinementDY = textRegionHuffmanFlags >> 12 & 3; 5682 textRegion.huffmanRefinementSizeSelector = !!(textRegionHuffmanFlags & 0x4000); 5683 } 5684 if (textRegion.refinement && !textRegion.refinementTemplate) { 5685 at = []; 5686 for (i = 0; i < 2; i++) { 5687 at.push({ 5688 x: readInt8(data, position), 5689 y: readInt8(data, position + 1) 5690 }); 5691 position += 2; 5692 } 5693 textRegion.refinementAt = at; 5694 } 5695 textRegion.numberOfSymbolInstances = readUint32(data, position); 5696 position += 4; 5697 args = [textRegion, header.referredTo, data, position, end]; 5698 break; 5699 case 16: 5700 const patternDictionary = {}; 5701 const patternDictionaryFlags = data[position++]; 5702 patternDictionary.mmr = !!(patternDictionaryFlags & 1); 5703 patternDictionary.template = patternDictionaryFlags >> 1 & 3; 5704 patternDictionary.patternWidth = data[position++]; 5705 patternDictionary.patternHeight = data[position++]; 5706 patternDictionary.maxPatternIndex = readUint32(data, position); 5707 position += 4; 5708 args = [patternDictionary, header.number, data, position, end]; 5709 break; 5710 case 22: 5711 case 23: 5712 const halftoneRegion = {}; 5713 halftoneRegion.info = readRegionSegmentInformation(data, position); 5714 position += RegionSegmentInformationFieldLength; 5715 const halftoneRegionFlags = data[position++]; 5716 halftoneRegion.mmr = !!(halftoneRegionFlags & 1); 5717 halftoneRegion.template = halftoneRegionFlags >> 1 & 3; 5718 halftoneRegion.enableSkip = !!(halftoneRegionFlags & 8); 5719 halftoneRegion.combinationOperator = halftoneRegionFlags >> 4 & 7; 5720 halftoneRegion.defaultPixelValue = halftoneRegionFlags >> 7 & 1; 5721 halftoneRegion.gridWidth = readUint32(data, position); 5722 position += 4; 5723 halftoneRegion.gridHeight = readUint32(data, position); 5724 position += 4; 5725 halftoneRegion.gridOffsetX = readUint32(data, position) & 0xffffffff; 5726 position += 4; 5727 halftoneRegion.gridOffsetY = readUint32(data, position) & 0xffffffff; 5728 position += 4; 5729 halftoneRegion.gridVectorX = readUint16(data, position); 5730 position += 2; 5731 halftoneRegion.gridVectorY = readUint16(data, position); 5732 position += 2; 5733 args = [halftoneRegion, header.referredTo, data, position, end]; 5734 break; 5735 case 38: 5736 case 39: 5737 const genericRegion = {}; 5738 genericRegion.info = readRegionSegmentInformation(data, position); 5739 position += RegionSegmentInformationFieldLength; 5740 const genericRegionSegmentFlags = data[position++]; 5741 genericRegion.mmr = !!(genericRegionSegmentFlags & 1); 5742 genericRegion.template = genericRegionSegmentFlags >> 1 & 3; 5743 genericRegion.prediction = !!(genericRegionSegmentFlags & 8); 5744 if (!genericRegion.mmr) { 5745 atLength = genericRegion.template === 0 ? 4 : 1; 5746 at = []; 5747 for (i = 0; i < atLength; i++) { 5748 at.push({ 5749 x: readInt8(data, position), 5750 y: readInt8(data, position + 1) 5751 }); 5752 position += 2; 5753 } 5754 genericRegion.at = at; 5755 } 5756 args = [genericRegion, data, position, end]; 5757 break; 5758 case 48: 5759 const pageInfo = { 5760 width: readUint32(data, position), 5761 height: readUint32(data, position + 4), 5762 resolutionX: readUint32(data, position + 8), 5763 resolutionY: readUint32(data, position + 12) 5764 }; 5765 if (pageInfo.height === 0xffffffff) { 5766 delete pageInfo.height; 5767 } 5768 const pageSegmentFlags = data[position + 16]; 5769 readUint16(data, position + 17); 5770 pageInfo.lossless = !!(pageSegmentFlags & 1); 5771 pageInfo.refinement = !!(pageSegmentFlags & 2); 5772 pageInfo.defaultPixelValue = pageSegmentFlags >> 2 & 1; 5773 pageInfo.combinationOperator = pageSegmentFlags >> 3 & 3; 5774 pageInfo.requiresBuffer = !!(pageSegmentFlags & 32); 5775 pageInfo.combinationOperatorOverride = !!(pageSegmentFlags & 64); 5776 args = [pageInfo]; 5777 break; 5778 case 49: 5779 break; 5780 case 50: 5781 break; 5782 case 51: 5783 break; 5784 case 53: 5785 args = [header.number, data, position, end]; 5786 break; 5787 case 62: 5788 break; 5789 default: 5790 throw new Jbig2Error(`segment type ${header.typeName}(${header.type}) is not implemented`); 5791 } 5792 const callbackName = "on" + header.typeName; 5793 if (callbackName in visitor) { 5794 visitor[callbackName].apply(visitor, args); 5795 } 5796} 5797function processSegments(segments, visitor) { 5798 for (let i = 0, ii = segments.length; i < ii; i++) { 5799 processSegment(segments[i], visitor); 5800 } 5801} 5802function parseJbig2Chunks(chunks) { 5803 const visitor = new SimpleSegmentVisitor(); 5804 for (let i = 0, ii = chunks.length; i < ii; i++) { 5805 const chunk = chunks[i]; 5806 const segments = readSegments({}, chunk.data, chunk.start, chunk.end); 5807 processSegments(segments, visitor); 5808 } 5809 return visitor.buffer; 5810}
5811function parseJbig2(data) { 5812 throw new Error("Not implemented: parseJbig2")
vendor: 21,175 bytes, lines 5812-6406
5812; 5813} 5814class SimpleSegmentVisitor { 5815 onPageInformation(info) { 5816 this.currentPageInfo = info; 5817 const rowSize = info.width + 7 >> 3; 5818 const buffer = new Uint8ClampedArray(rowSize * info.height); 5819 if (info.defaultPixelValue) { 5820 buffer.fill(0xff); 5821 } 5822 this.buffer = buffer; 5823 } 5824 drawBitmap(regionInfo, bitmap) { 5825 const pageInfo = this.currentPageInfo; 5826 const width = regionInfo.width, 5827 height = regionInfo.height; 5828 const rowSize = pageInfo.width + 7 >> 3; 5829 const combinationOperator = pageInfo.combinationOperatorOverride ? regionInfo.combinationOperator : pageInfo.combinationOperator; 5830 const buffer = this.buffer; 5831 const mask0 = 128 >> (regionInfo.x & 7); 5832 let offset0 = regionInfo.y * rowSize + (regionInfo.x >> 3); 5833 let i, j, mask, offset; 5834 switch (combinationOperator) { 5835 case 0: 5836 for (i = 0; i < height; i++) { 5837 mask = mask0; 5838 offset = offset0; 5839 for (j = 0; j < width; j++) { 5840 if (bitmap[i][j]) { 5841 buffer[offset] |= mask; 5842 } 5843 mask >>= 1; 5844 if (!mask) { 5845 mask = 128; 5846 offset++; 5847 } 5848 } 5849 offset0 += rowSize; 5850 } 5851 break; 5852 case 2: 5853 for (i = 0; i < height; i++) { 5854 mask = mask0; 5855 offset = offset0; 5856 for (j = 0; j < width; j++) { 5857 if (bitmap[i][j]) { 5858 buffer[offset] ^= mask; 5859 } 5860 mask >>= 1; 5861 if (!mask) { 5862 mask = 128; 5863 offset++; 5864 } 5865 } 5866 offset0 += rowSize; 5867 } 5868 break; 5869 default: 5870 throw new Jbig2Error(`operator ${combinationOperator} is not supported`); 5871 } 5872 } 5873 onImmediateGenericRegion(region, data, start, end) { 5874 const regionInfo = region.info; 5875 const decodingContext = new DecodingContext(data, start, end); 5876 const bitmap = decodeBitmap(region.mmr, regionInfo.width, regionInfo.height, region.template, region.prediction, null, region.at, decodingContext); 5877 this.drawBitmap(regionInfo, bitmap); 5878 } 5879 onImmediateLosslessGenericRegion() { 5880 this.onImmediateGenericRegion(...arguments); 5881 } 5882 onSymbolDictionary(dictionary, currentSegment, referredSegments, data, start, end) { 5883 let huffmanTables, huffmanInput; 5884 if (dictionary.huffman) { 5885 huffmanTables = getSymbolDictionaryHuffmanTables(dictionary, referredSegments, this.customTables); 5886 huffmanInput = new Reader(data, start, end); 5887 } 5888 let symbols = this.symbols; 5889 if (!symbols) { 5890 this.symbols = symbols = {}; 5891 } 5892 const inputSymbols = []; 5893 for (const referredSegment of referredSegments) { 5894 const referredSymbols = symbols[referredSegment]; 5895 if (referredSymbols) { 5896 inputSymbols.push(...referredSymbols); 5897 } 5898 } 5899 const decodingContext = new DecodingContext(data, start, end); 5900 symbols[currentSegment] = decodeSymbolDictionary(dictionary.huffman, dictionary.refinement, inputSymbols, dictionary.numberOfNewSymbols, dictionary.numberOfExportedSymbols, huffmanTables, dictionary.template, dictionary.at, dictionary.refinementTemplate, dictionary.refinementAt, decodingContext, huffmanInput); 5901 } 5902 onImmediateTextRegion(region, referredSegments, data, start, end) { 5903 const regionInfo = region.info; 5904 let huffmanTables, huffmanInput; 5905 const symbols = this.symbols; 5906 const inputSymbols = []; 5907 for (const referredSegment of referredSegments) { 5908 const referredSymbols = symbols[referredSegment]; 5909 if (referredSymbols) { 5910 inputSymbols.push(...referredSymbols); 5911 } 5912 } 5913 const symbolCodeLength = log2(inputSymbols.length); 5914 if (region.huffman) { 5915 huffmanInput = new Reader(data, start, end); 5916 huffmanTables = getTextRegionHuffmanTables(region, referredSegments, this.customTables, inputSymbols.length, huffmanInput); 5917 } 5918 const decodingContext = new DecodingContext(data, start, end); 5919 const bitmap = decodeTextRegion(region.huffman, region.refinement, regionInfo.width, regionInfo.height, region.defaultPixelValue, region.numberOfSymbolInstances, region.stripSize, inputSymbols, symbolCodeLength, region.transposed, region.dsOffset, region.referenceCorner, region.combinationOperator, huffmanTables, region.refinementTemplate, region.refinementAt, decodingContext, region.logStripSize, huffmanInput); 5920 this.drawBitmap(regionInfo, bitmap); 5921 } 5922 onImmediateLosslessTextRegion() { 5923 this.onImmediateTextRegion(...arguments); 5924 } 5925 onPatternDictionary(dictionary, currentSegment, data, start, end) { 5926 let patterns = this.patterns; 5927 if (!patterns) { 5928 this.patterns = patterns = {}; 5929 } 5930 const decodingContext = new DecodingContext(data, start, end); 5931 patterns[currentSegment] = decodePatternDictionary(dictionary.mmr, dictionary.patternWidth, dictionary.patternHeight, dictionary.maxPatternIndex, dictionary.template, decodingContext); 5932 } 5933 onImmediateHalftoneRegion(region, referredSegments, data, start, end) { 5934 const patterns = this.patterns[referredSegments[0]]; 5935 const regionInfo = region.info; 5936 const decodingContext = new DecodingContext(data, start, end); 5937 const bitmap = decodeHalftoneRegion(region.mmr, patterns, region.template, regionInfo.width, regionInfo.height, region.defaultPixelValue, region.enableSkip, region.combinationOperator, region.gridWidth, region.gridHeight, region.gridOffsetX, region.gridOffsetY, region.gridVectorX, region.gridVectorY, decodingContext); 5938 this.drawBitmap(regionInfo, bitmap); 5939 } 5940 onImmediateLosslessHalftoneRegion() { 5941 this.onImmediateHalftoneRegion(...arguments); 5942 } 5943 onTables(currentSegment, data, start, end) { 5944 let customTables = this.customTables; 5945 if (!customTables) { 5946 this.customTables = customTables = {}; 5947 } 5948 customTables[currentSegment] = decodeTablesSegment(data, start, end); 5949 } 5950} 5951class HuffmanLine { 5952 constructor(lineData) { 5953 if (lineData.length === 2) { 5954 this.isOOB = true; 5955 this.rangeLow = 0; 5956 this.prefixLength = lineData[0]; 5957 this.rangeLength = 0; 5958 this.prefixCode = lineData[1]; 5959 this.isLowerRange = false; 5960 } else { 5961 this.isOOB = false; 5962 this.rangeLow = lineData[0]; 5963 this.prefixLength = lineData[1]; 5964 this.rangeLength = lineData[2]; 5965 this.prefixCode = lineData[3]; 5966 this.isLowerRange = lineData[4] === "lower"; 5967 } 5968 } 5969} 5970class HuffmanTreeNode { 5971 constructor(line) { 5972 this.children = []; 5973 if (line) { 5974 this.isLeaf = true; 5975 this.rangeLength = line.rangeLength; 5976 this.rangeLow = line.rangeLow; 5977 this.isLowerRange = line.isLowerRange; 5978 this.isOOB = line.isOOB; 5979 } else { 5980 this.isLeaf = false; 5981 } 5982 } 5983 buildTree(line, shift) { 5984 const bit = line.prefixCode >> shift & 1; 5985 if (shift <= 0) { 5986 this.children[bit] = new HuffmanTreeNode(line); 5987 } else { 5988 let node = this.children[bit]; 5989 if (!node) { 5990 this.children[bit] = node = new HuffmanTreeNode(null); 5991 } 5992 node.buildTree(line, shift - 1); 5993 } 5994 } 5995 decodeNode(reader) { 5996 if (this.isLeaf) { 5997 if (this.isOOB) { 5998 return null; 5999 } 6000 const htOffset = reader.readBits(this.rangeLength); 6001 return this.rangeLow + (this.isLowerRange ? -htOffset : htOffset); 6002 } 6003 const node = this.children[reader.readBit()]; 6004 if (!node) { 6005 throw new Jbig2Error("invalid Huffman data"); 6006 } 6007 return node.decodeNode(reader); 6008 } 6009} 6010class HuffmanTable { 6011 constructor(lines, prefixCodesDone) { 6012 if (!prefixCodesDone) { 6013 this.assignPrefixCodes(lines); 6014 } 6015 this.rootNode = new HuffmanTreeNode(null); 6016 for (let i = 0, ii = lines.length; i < ii; i++) { 6017 const line = lines[i]; 6018 if (line.prefixLength > 0) { 6019 this.rootNode.buildTree(line, line.prefixLength - 1); 6020 } 6021 } 6022 } 6023 decode(reader) { 6024 return this.rootNode.decodeNode(reader); 6025 } 6026 assignPrefixCodes(lines) { 6027 const linesLength = lines.length; 6028 let prefixLengthMax = 0; 6029 for (let i = 0; i < linesLength; i++) { 6030 prefixLengthMax = Math.max(prefixLengthMax, lines[i].prefixLength); 6031 } 6032 const histogram = new Uint32Array(prefixLengthMax + 1); 6033 for (let i = 0; i < linesLength; i++) { 6034 histogram[lines[i].prefixLength]++; 6035 } 6036 let currentLength = 1, 6037 firstCode = 0, 6038 currentCode, 6039 currentTemp, 6040 line; 6041 histogram[0] = 0; 6042 while (currentLength <= prefixLengthMax) { 6043 firstCode = firstCode + histogram[currentLength - 1] << 1; 6044 currentCode = firstCode; 6045 currentTemp = 0; 6046 while (currentTemp < linesLength) { 6047 line = lines[currentTemp]; 6048 if (line.prefixLength === currentLength) { 6049 line.prefixCode = currentCode; 6050 currentCode++; 6051 } 6052 currentTemp++; 6053 } 6054 currentLength++; 6055 } 6056 } 6057} 6058function decodeTablesSegment(data, start, end) { 6059 const flags = data[start]; 6060 const lowestValue = readUint32(data, start + 1) & 0xffffffff; 6061 const highestValue = readUint32(data, start + 5) & 0xffffffff; 6062 const reader = new Reader(data, start + 9, end); 6063 const prefixSizeBits = (flags >> 1 & 7) + 1; 6064 const rangeSizeBits = (flags >> 4 & 7) + 1; 6065 const lines = []; 6066 let prefixLength, 6067 rangeLength, 6068 currentRangeLow = lowestValue; 6069 do { 6070 prefixLength = reader.readBits(prefixSizeBits); 6071 rangeLength = reader.readBits(rangeSizeBits); 6072 lines.push(new HuffmanLine([currentRangeLow, prefixLength, rangeLength, 0])); 6073 currentRangeLow += 1 << rangeLength; 6074 } while (currentRangeLow < highestValue); 6075 prefixLength = reader.readBits(prefixSizeBits); 6076 lines.push(new HuffmanLine([lowestValue - 1, prefixLength, 32, 0, "lower"])); 6077 prefixLength = reader.readBits(prefixSizeBits); 6078 lines.push(new HuffmanLine([highestValue, prefixLength, 32, 0])); 6079 if (flags & 1) { 6080 prefixLength = reader.readBits(prefixSizeBits); 6081 lines.push(new HuffmanLine([prefixLength, 0])); 6082 } 6083 return new HuffmanTable(lines, false); 6084} 6085const standardTablesCache = {}; 6086function getStandardTable(number) { 6087 let table = standardTablesCache[number]; 6088 if (table) { 6089 return table; 6090 } 6091 let lines; 6092 switch (number) { 6093 case 1: 6094 lines = [[0, 1, 4, 0x0], [16, 2, 8, 0x2], [272, 3, 16, 0x6], [65808, 3, 32, 0x7]]; 6095 break; 6096 case 2: 6097 lines = [[0, 1, 0, 0x0], [1, 2, 0, 0x2], [2, 3, 0, 0x6], [3, 4, 3, 0xe], [11, 5, 6, 0x1e], [75, 6, 32, 0x3e], [6, 0x3f]]; 6098 break; 6099 case 3: 6100 lines = [[-256, 8, 8, 0xfe], [0, 1, 0, 0x0], [1, 2, 0, 0x2], [2, 3, 0, 0x6], [3, 4, 3, 0xe], [11, 5, 6, 0x1e], [-257, 8, 32, 0xff, "lower"], [75, 7, 32, 0x7e], [6, 0x3e]]; 6101 break; 6102 case 4: 6103 lines = [[1, 1, 0, 0x0], [2, 2, 0, 0x2], [3, 3, 0, 0x6], [4, 4, 3, 0xe], [12, 5, 6, 0x1e], [76, 5, 32, 0x1f]]; 6104 break; 6105 case 5: 6106 lines = [[-255, 7, 8, 0x7e], [1, 1, 0, 0x0], [2, 2, 0, 0x2], [3, 3, 0, 0x6], [4, 4, 3, 0xe], [12, 5, 6, 0x1e], [-256, 7, 32, 0x7f, "lower"], [76, 6, 32, 0x3e]]; 6107 break; 6108 case 6: 6109 lines = [[-2048, 5, 10, 0x1c], [-1024, 4, 9, 0x8], [-512, 4, 8, 0x9], [-256, 4, 7, 0xa], [-128, 5, 6, 0x1d], [-64, 5, 5, 0x1e], [-32, 4, 5, 0xb], [0, 2, 7, 0x0], [128, 3, 7, 0x2], [256, 3, 8, 0x3], [512, 4, 9, 0xc], [1024, 4, 10, 0xd], [-2049, 6, 32, 0x3e, "lower"], [2048, 6, 32, 0x3f]]; 6110 break; 6111 case 7: 6112 lines = [[-1024, 4, 9, 0x8], [-512, 3, 8, 0x0], [-256, 4, 7, 0x9], [-128, 5, 6, 0x1a], [-64, 5, 5, 0x1b], [-32, 4, 5, 0xa], [0, 4, 5, 0xb], [32, 5, 5, 0x1c], [64, 5, 6, 0x1d], [128, 4, 7, 0xc], [256, 3, 8, 0x1], [512, 3, 9, 0x2], [1024, 3, 10, 0x3], [-1025, 5, 32, 0x1e, "lower"], [2048, 5, 32, 0x1f]]; 6113 break; 6114 case 8: 6115 lines = [[-15, 8, 3, 0xfc], [-7, 9, 1, 0x1fc], [-5, 8, 1, 0xfd], [-3, 9, 0, 0x1fd], [-2, 7, 0, 0x7c], [-1, 4, 0, 0xa], [0, 2, 1, 0x0], [2, 5, 0, 0x1a], [3, 6, 0, 0x3a], [4, 3, 4, 0x4], [20, 6, 1, 0x3b], [22, 4, 4, 0xb], [38, 4, 5, 0xc], [70, 5, 6, 0x1b], [134, 5, 7, 0x1c], [262, 6, 7, 0x3c], [390, 7, 8, 0x7d], [646, 6, 10, 0x3d], [-16, 9, 32, 0x1fe, "lower"], [1670, 9, 32, 0x1ff], [2, 0x1]]; 6116 break; 6117 case 9: 6118 lines = [[-31, 8, 4, 0xfc], [-15, 9, 2, 0x1fc], [-11, 8, 2, 0xfd], [-7, 9, 1, 0x1fd], [-5, 7, 1, 0x7c], [-3, 4, 1, 0xa], [-1, 3, 1, 0x2], [1, 3, 1, 0x3], [3, 5, 1, 0x1a], [5, 6, 1, 0x3a], [7, 3, 5, 0x4], [39, 6, 2, 0x3b], [43, 4, 5, 0xb], [75, 4, 6, 0xc], [139, 5, 7, 0x1b], [267, 5, 8, 0x1c], [523, 6, 8, 0x3c], [779, 7, 9, 0x7d], [1291, 6, 11, 0x3d], [-32, 9, 32, 0x1fe, "lower"], [3339, 9, 32, 0x1ff], [2, 0x0]]; 6119 break; 6120 case 10: 6121 lines = [[-21, 7, 4, 0x7a], [-5, 8, 0, 0xfc], [-4, 7, 0, 0x7b], [-3, 5, 0, 0x18], [-2, 2, 2, 0x0], [2, 5, 0, 0x19], [3, 6, 0, 0x36], [4, 7, 0, 0x7c], [5, 8, 0, 0xfd], [6, 2, 6, 0x1], [70, 5, 5, 0x1a], [102, 6, 5, 0x37], [134, 6, 6, 0x38], [198, 6, 7, 0x39], [326, 6, 8, 0x3a], [582, 6, 9, 0x3b], [1094, 6, 10, 0x3c], [2118, 7, 11, 0x7d], [-22, 8, 32, 0xfe, "lower"], [4166, 8, 32, 0xff], [2, 0x2]]; 6122 break; 6123 case 11: 6124 lines = [[1, 1, 0, 0x0], [2, 2, 1, 0x2], [4, 4, 0, 0xc], [5, 4, 1, 0xd], [7, 5, 1, 0x1c], [9, 5, 2, 0x1d], [13, 6, 2, 0x3c], [17, 7, 2, 0x7a], [21, 7, 3, 0x7b], [29, 7, 4, 0x7c], [45, 7, 5, 0x7d], [77, 7, 6, 0x7e], [141, 7, 32, 0x7f]]; 6125 break; 6126 case 12: 6127 lines = [[1, 1, 0, 0x0], [2, 2, 0, 0x2], [3, 3, 1, 0x6], [5, 5, 0, 0x1c], [6, 5, 1, 0x1d], [8, 6, 1, 0x3c], [10, 7, 0, 0x7a], [11, 7, 1, 0x7b], [13, 7, 2, 0x7c], [17, 7, 3, 0x7d], [25, 7, 4, 0x7e], [41, 8, 5, 0xfe], [73, 8, 32, 0xff]]; 6128 break; 6129 case 13: 6130 lines = [[1, 1, 0, 0x0], [2, 3, 0, 0x4], [3, 4, 0, 0xc], [4, 5, 0, 0x1c], [5, 4, 1, 0xd], [7, 3, 3, 0x5], [15, 6, 1, 0x3a], [17, 6, 2, 0x3b], [21, 6, 3, 0x3c], [29, 6, 4, 0x3d], [45, 6, 5, 0x3e], [77, 7, 6, 0x7e], [141, 7, 32, 0x7f]]; 6131 break; 6132 case 14: 6133 lines = [[-2, 3, 0, 0x4], [-1, 3, 0, 0x5], [0, 1, 0, 0x0], [1, 3, 0, 0x6], [2, 3, 0, 0x7]]; 6134 break; 6135 case 15: 6136 lines = [[-24, 7, 4, 0x7c], [-8, 6, 2, 0x3c], [-4, 5, 1, 0x1c], [-2, 4, 0, 0xc], [-1, 3, 0, 0x4], [0, 1, 0, 0x0], [1, 3, 0, 0x5], [2, 4, 0, 0xd], [3, 5, 1, 0x1d], [5, 6, 2, 0x3d], [9, 7, 4, 0x7d], [-25, 7, 32, 0x7e, "lower"], [25, 7, 32, 0x7f]]; 6137 break; 6138 default: 6139 throw new Jbig2Error(`standard table B.${number} does not exist`); 6140 } 6141 for (let i = 0, ii = lines.length; i < ii; i++) { 6142 lines[i] = new HuffmanLine(lines[i]); 6143 } 6144 table = new HuffmanTable(lines, true); 6145 standardTablesCache[number] = table; 6146 return table; 6147} 6148class Reader { 6149 constructor(data, start, end) { 6150 this.data = data; 6151 this.start = start; 6152 this.end = end; 6153 this.position = start; 6154 this.shift = -1; 6155 this.currentByte = 0; 6156 } 6157 readBit() { 6158 if (this.shift < 0) { 6159 if (this.position >= this.end) { 6160 throw new Jbig2Error("end of data while reading bit"); 6161 } 6162 this.currentByte = this.data[this.position++]; 6163 this.shift = 7; 6164 } 6165 const bit = this.currentByte >> this.shift & 1; 6166 this.shift--; 6167 return bit; 6168 } 6169 readBits(numBits) { 6170 let result = 0, 6171 i; 6172 for (i = numBits - 1; i >= 0; i--) { 6173 result |= this.readBit() << i; 6174 } 6175 return result; 6176 } 6177 byteAlign() { 6178 this.shift = -1; 6179 } 6180 next() { 6181 if (this.position >= this.end) { 6182 return -1; 6183 } 6184 return this.data[this.position++]; 6185 } 6186} 6187function getCustomHuffmanTable(index, referredTo, customTables) { 6188 let currentIndex = 0; 6189 for (let i = 0, ii = referredTo.length; i < ii; i++) { 6190 const table = customTables[referredTo[i]]; 6191 if (table) { 6192 if (index === currentIndex) { 6193 return table; 6194 } 6195 currentIndex++; 6196 } 6197 } 6198 throw new Jbig2Error("can't find custom Huffman table"); 6199} 6200function getTextRegionHuffmanTables(textRegion, referredTo, customTables, numberOfSymbols, reader) { 6201 const codes = []; 6202 for (let i = 0; i <= 34; i++) { 6203 const codeLength = reader.readBits(4); 6204 codes.push(new HuffmanLine([i, codeLength, 0, 0])); 6205 } 6206 const runCodesTable = new HuffmanTable(codes, false); 6207 codes.length = 0; 6208 for (let i = 0; i < numberOfSymbols;) { 6209 const codeLength = runCodesTable.decode(reader); 6210 if (codeLength >= 32) { 6211 let repeatedLength, numberOfRepeats, j; 6212 switch (codeLength) { 6213 case 32: 6214 if (i === 0) { 6215 throw new Jbig2Error("no previous value in symbol ID table"); 6216 } 6217 numberOfRepeats = reader.readBits(2) + 3; 6218 repeatedLength = codes[i - 1].prefixLength; 6219 break; 6220 case 33: 6221 numberOfRepeats = reader.readBits(3) + 3; 6222 repeatedLength = 0; 6223 break; 6224 case 34: 6225 numberOfRepeats = reader.readBits(7) + 11; 6226 repeatedLength = 0; 6227 break; 6228 default: 6229 throw new Jbig2Error("invalid code length in symbol ID table"); 6230 } 6231 for (j = 0; j < numberOfRepeats; j++) { 6232 codes.push(new HuffmanLine([i, repeatedLength, 0, 0])); 6233 i++; 6234 } 6235 } else { 6236 codes.push(new HuffmanLine([i, codeLength, 0, 0])); 6237 i++; 6238 } 6239 } 6240 reader.byteAlign(); 6241 const symbolIDTable = new HuffmanTable(codes, false); 6242 let customIndex = 0, 6243 tableFirstS, 6244 tableDeltaS, 6245 tableDeltaT; 6246 switch (textRegion.huffmanFS) { 6247 case 0: 6248 case 1: 6249 tableFirstS = getStandardTable(textRegion.huffmanFS + 6); 6250 break; 6251 case 3: 6252 tableFirstS = getCustomHuffmanTable(customIndex, referredTo, customTables); 6253 customIndex++; 6254 break; 6255 default: 6256 throw new Jbig2Error("invalid Huffman FS selector"); 6257 } 6258 switch (textRegion.huffmanDS) { 6259 case 0: 6260 case 1: 6261 case 2: 6262 tableDeltaS = getStandardTable(textRegion.huffmanDS + 8); 6263 break; 6264 case 3: 6265 tableDeltaS = getCustomHuffmanTable(customIndex, referredTo, customTables); 6266 customIndex++; 6267 break; 6268 default: 6269 throw new Jbig2Error("invalid Huffman DS selector"); 6270 } 6271 switch (textRegion.huffmanDT) { 6272 case 0: 6273 case 1: 6274 case 2: 6275 tableDeltaT = getStandardTable(textRegion.huffmanDT + 11); 6276 break; 6277 case 3: 6278 tableDeltaT = getCustomHuffmanTable(customIndex, referredTo, customTables); 6279 customIndex++; 6280 break; 6281 default: 6282 throw new Jbig2Error("invalid Huffman DT selector"); 6283 } 6284 if (textRegion.refinement) { 6285 throw new Jbig2Error("refinement with Huffman is not supported"); 6286 } 6287 return { 6288 symbolIDTable, 6289 tableFirstS, 6290 tableDeltaS, 6291 tableDeltaT 6292 }; 6293} 6294function getSymbolDictionaryHuffmanTables(dictionary, referredTo, customTables) { 6295 let customIndex = 0, 6296 tableDeltaHeight, 6297 tableDeltaWidth; 6298 switch (dictionary.huffmanDHSelector) { 6299 case 0: 6300 case 1: 6301 tableDeltaHeight = getStandardTable(dictionary.huffmanDHSelector + 4); 6302 break; 6303 case 3: 6304 tableDeltaHeight = getCustomHuffmanTable(customIndex, referredTo, customTables); 6305 customIndex++; 6306 break; 6307 default: 6308 throw new Jbig2Error("invalid Huffman DH selector"); 6309 } 6310 switch (dictionary.huffmanDWSelector) { 6311 case 0: 6312 case 1: 6313 tableDeltaWidth = getStandardTable(dictionary.huffmanDWSelector + 2); 6314 break; 6315 case 3: 6316 tableDeltaWidth = getCustomHuffmanTable(customIndex, referredTo, customTables); 6317 customIndex++; 6318 break; 6319 default: 6320 throw new Jbig2Error("invalid Huffman DW selector"); 6321 } 6322 let tableBitmapSize, tableAggregateInstances; 6323 if (dictionary.bitmapSizeSelector) { 6324 tableBitmapSize = getCustomHuffmanTable(customIndex, referredTo, customTables); 6325 customIndex++; 6326 } else { 6327 tableBitmapSize = getStandardTable(1); 6328 } 6329 if (dictionary.aggregationInstancesSelector) { 6330 tableAggregateInstances = getCustomHuffmanTable(customIndex, referredTo, customTables); 6331 } else { 6332 tableAggregateInstances = getStandardTable(1); 6333 } 6334 return { 6335 tableDeltaHeight, 6336 tableDeltaWidth, 6337 tableBitmapSize, 6338 tableAggregateInstances 6339 }; 6340} 6341function readUncompressedBitmap(reader, width, height) { 6342 const bitmap = []; 6343 for (let y = 0; y < height; y++) { 6344 const row = new Uint8Array(width); 6345 bitmap.push(row); 6346 for (let x = 0; x < width; x++) { 6347 row[x] = reader.readBit(); 6348 } 6349 reader.byteAlign(); 6350 } 6351 return bitmap; 6352} 6353function decodeMMRBitmap(input, width, height, endOfBlock) { 6354 const params = { 6355 K: -1, 6356 Columns: width, 6357 Rows: height, 6358 BlackIs1: true, 6359 EndOfBlock: endOfBlock 6360 }; 6361 const decoder = new CCITTFaxDecoder(input, params); 6362 const bitmap = []; 6363 let currentByte, 6364 eof = false; 6365 for (let y = 0; y < height; y++) { 6366 const row = new Uint8Array(width); 6367 bitmap.push(row); 6368 let shift = -1; 6369 for (let x = 0; x < width; x++) { 6370 if (shift < 0) { 6371 currentByte = decoder.readNextChar(); 6372 if (currentByte === -1) { 6373 currentByte = 0; 6374 eof = true; 6375 } 6376 shift = 7; 6377 } 6378 row[x] = currentByte >> shift & 1; 6379 shift--; 6380 } 6381 } 6382 if (endOfBlock && !eof) { 6383 const lookForEOFLimit = 5; 6384 for (let i = 0; i < lookForEOFLimit; i++) { 6385 if (decoder.readNextChar() === -1) { 6386 break; 6387 } 6388 } 6389 } 6390 return bitmap; 6391} 6392class Jbig2Image { 6393 parseChunks(chunks) { 6394 return parseJbig2Chunks(chunks); 6395 } 6396 parse(data) { 6397 throw new Error("Not implemented: Jbig2Image.parse"); 6398 } 6399} 6400 6401;// ./src/core/jbig2_stream.js 6402 6403 6404 6405 6406
vendor: 3,966 bytes, lines 6407-6541
6407class Jbig2Stream extends DecodeStream { 6408 constructor(stream, maybeLength, params) { 6409 super(maybeLength); 6410 this.stream = stream; 6411 this.dict = stream.dict; 6412 this.maybeLength = maybeLength; 6413 this.params = params; 6414 } 6415 get bytes() { 6416 return shadow(this, "bytes", this.stream.getBytes(this.maybeLength)); 6417 } 6418 ensureBuffer(requested) {} 6419 readBlock() { 6420 this.decodeImage(); 6421 } 6422 decodeImage(bytes) { 6423 if (this.eof) { 6424 return this.buffer; 6425 } 6426 bytes ||= this.bytes; 6427 const jbig2Image = new Jbig2Image(); 6428 const chunks = []; 6429 if (this.params instanceof Dict) { 6430 const globalsStream = this.params.get("JBIG2Globals"); 6431 if (globalsStream instanceof BaseStream) { 6432 const globals = globalsStream.getBytes(); 6433 chunks.push({ 6434 data: globals, 6435 start: 0, 6436 end: globals.length 6437 }); 6438 } 6439 } 6440 chunks.push({ 6441 data: bytes, 6442 start: 0, 6443 end: bytes.length 6444 }); 6445 const data = jbig2Image.parseChunks(chunks); 6446 const dataLength = data.length; 6447 for (let i = 0; i < dataLength; i++) { 6448 data[i] ^= 0xff; 6449 } 6450 this.buffer = data; 6451 this.bufferLength = dataLength; 6452 this.eof = true; 6453 return this.buffer; 6454 } 6455 get canAsyncDecodeImageFromBuffer() { 6456 return this.stream.isAsync; 6457 } 6458} 6459 6460;// ./src/shared/image_utils.js 6461 6462function convertToRGBA(params) { 6463 switch (params.kind) { 6464 case ImageKind.GRAYSCALE_1BPP: 6465 return convertBlackAndWhiteToRGBA(params); 6466 case ImageKind.RGB_24BPP: 6467 return convertRGBToRGBA(params); 6468 } 6469 return null; 6470} 6471function convertBlackAndWhiteToRGBA({ 6472 src, 6473 srcPos = 0, 6474 dest, 6475 width, 6476 height, 6477 nonBlackColor = 0xffffffff, 6478 inverseDecode = false 6479}) { 6480 const black = FeatureTest.isLittleEndian ? 0xff000000 : 0x000000ff; 6481 const [zeroMapping, oneMapping] = inverseDecode ? [nonBlackColor, black] : [black, nonBlackColor]; 6482 const widthInSource = width >> 3; 6483 const widthRemainder = width & 7; 6484 const srcLength = src.length; 6485 dest = new Uint32Array(dest.buffer); 6486 let destPos = 0; 6487 for (let i = 0; i < height; i++) { 6488 for (const max = srcPos + widthInSource; srcPos < max; srcPos++) { 6489 const elem = srcPos < srcLength ? src[srcPos] : 255; 6490 dest[destPos++] = elem & 0b10000000 ? oneMapping : zeroMapping; 6491 dest[destPos++] = elem & 0b1000000 ? oneMapping : zeroMapping; 6492 dest[destPos++] = elem & 0b100000 ? oneMapping : zeroMapping; 6493 dest[destPos++] = elem & 0b10000 ? oneMapping : zeroMapping; 6494 dest[destPos++] = elem & 0b1000 ? oneMapping : zeroMapping; 6495 dest[destPos++] = elem & 0b100 ? oneMapping : zeroMapping; 6496 dest[destPos++] = elem & 0b10 ? oneMapping : zeroMapping; 6497 dest[destPos++] = elem & 0b1 ? oneMapping : zeroMapping; 6498 } 6499 if (widthRemainder === 0) { 6500 continue; 6501 } 6502 const elem = srcPos < srcLength ? src[srcPos++] : 255; 6503 for (let j = 0; j < widthRemainder; j++) { 6504 dest[destPos++] = elem & 1 << 7 - j ? oneMapping : zeroMapping; 6505 } 6506 } 6507 return { 6508 srcPos, 6509 destPos 6510 }; 6511} 6512function convertRGBToRGBA({ 6513 src, 6514 srcPos = 0, 6515 dest, 6516 destPos = 0, 6517 width, 6518 height 6519}) { 6520 let i = 0; 6521 const len32 = src.length >> 2; 6522 const src32 = new Uint32Array(src.buffer, srcPos, len32); 6523 if (FeatureTest.isLittleEndian) { 6524 for (; i < len32 - 2; i += 3, destPos += 4) { 6525 const s1 = src32[i]; 6526 const s2 = src32[i + 1]; 6527 const s3 = src32[i + 2]; 6528 dest[destPos] = s1 | 0xff000000; 6529 dest[destPos + 1] = s1 >>> 24 | s2 << 8 | 0xff000000; 6530 dest[destPos + 2] = s2 >>> 16 | s3 << 16 | 0xff000000; 6531 dest[destPos + 3] = s3 >>> 8 | 0xff000000; 6532 } 6533 for (let j = i * 4, jj = src.length; j < jj; j += 3) { 6534 dest[destPos++] = src[j] | src[j + 1] << 8 | src[j + 2] << 16 | 0xff000000; 6535 } 6536 } else { 6537 for (; i < len32 - 2; i += 3, destPos += 4) { 6538 const s1 = src32[i]; 6539 const s2 = src32[i + 1]; 6540 const s3 = src32[i + 2]; 6541 dest[destPos] = s1 | 0xff;
6542 dest[destPos + 1] = s1 << 24 | s2 >>> 8 | 0xff; 6543 dest[destPos + 2] = s2 << 16 | s3 >>> 16 | 0xff; 6544 dest[destPos + 3] = s3 << 8 | 0xff; 6545 } 6546 for (let j = i * 4, jj = src.length; j < jj; j += 3) { 6547 dest[destPos++] = src[j] << 24 | src[j + 1] << 16 | src[j + 2] << 8 | 0xff; 6548 } 6549 } 6550 return { 6551 srcPos, 6552 destPos 6553 }; 6554} 6555function grayToRGBA(src, dest) { 6556 if (FeatureTest.isLittleEndian) { 6557 for (let i = 0, ii = src.length; i < ii; i++) { 6558 dest[i] = src[i] * 0x10101 | 0xff000000; 6559 } 6560 } else { 6561 for (let i = 0, ii = src.length; i < ii; i++) { 6562 dest[i] = src[i] * 0x1010100 | 0x000000ff; 6563 } 6564 } 6565} 6566 6567;// ./src/core/jpg.js
vendor: 17,884 bytes, lines 6567-7179
6567 6568 6569 6570 6571class JpegError extends BaseException { 6572 constructor(msg) { 6573 super(msg, "JpegError"); 6574 } 6575} 6576class DNLMarkerError extends BaseException { 6577 constructor(message, scanLines) { 6578 super(message, "DNLMarkerError"); 6579 this.scanLines = scanLines; 6580 } 6581} 6582class EOIMarkerError extends BaseException { 6583 constructor(msg) { 6584 super(msg, "EOIMarkerError"); 6585 } 6586} 6587const dctZigZag = new Uint8Array([0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, 12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, 35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, 58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63]); 6588const dctCos1 = 4017; 6589const dctSin1 = 799; 6590const dctCos3 = 3406; 6591const dctSin3 = 2276; 6592const dctCos6 = 1567; 6593const dctSin6 = 3784; 6594const dctSqrt2 = 5793; 6595const dctSqrt1d2 = 2896; 6596function buildHuffmanTable(codeLengths, values) { 6597 let k = 0, 6598 i, 6599 j, 6600 length = 16; 6601 while (length > 0 && !codeLengths[length - 1]) { 6602 length--; 6603 } 6604 const code = [{ 6605 children: [], 6606 index: 0 6607 }]; 6608 let p = code[0], 6609 q; 6610 for (i = 0; i < length; i++) { 6611 for (j = 0; j < codeLengths[i]; j++) { 6612 p = code.pop(); 6613 p.children[p.index] = values[k]; 6614 while (p.index > 0) { 6615 p = code.pop(); 6616 } 6617 p.index++; 6618 code.push(p); 6619 while (code.length <= i) { 6620 code.push(q = { 6621 children: [], 6622 index: 0 6623 }); 6624 p.children[p.index] = q.children; 6625 p = q; 6626 } 6627 k++; 6628 } 6629 if (i + 1 < length) { 6630 code.push(q = { 6631 children: [], 6632 index: 0 6633 }); 6634 p.children[p.index] = q.children; 6635 p = q; 6636 } 6637 } 6638 return code[0].children; 6639} 6640function getBlockBufferOffset(component, row, col) { 6641 return 64 * ((component.blocksPerLine + 1) * row + col); 6642} 6643function decodeScan(data, offset, frame, components, resetInterval, spectralStart, spectralEnd, successivePrev, successive, parseDNLMarker = false) { 6644 const mcusPerLine = frame.mcusPerLine; 6645 const progressive = frame.progressive; 6646 const startOffset = offset; 6647 let bitsData = 0, 6648 bitsCount = 0; 6649 function readBit() { 6650 if (bitsCount > 0) { 6651 bitsCount--; 6652 return bitsData >> bitsCount & 1; 6653 } 6654 bitsData = data[offset++]; 6655 if (bitsData === 0xff) { 6656 const nextByte = data[offset++]; 6657 if (nextByte) { 6658 if (nextByte === 0xdc && parseDNLMarker) { 6659 offset += 2; 6660 const scanLines = readUint16(data, offset); 6661 offset += 2; 6662 if (scanLines > 0 && scanLines !== frame.scanLines) { 6663 throw new DNLMarkerError("Found DNL marker (0xFFDC) while parsing scan data", scanLines); 6664 } 6665 } else if (nextByte === 0xd9) { 6666 if (parseDNLMarker) { 6667 const maybeScanLines = blockRow * (frame.precision === 8 ? 8 : 0); 6668 if (maybeScanLines > 0 && Math.round(frame.scanLines / maybeScanLines) >= 5) { 6669 throw new DNLMarkerError("Found EOI marker (0xFFD9) while parsing scan data, " + "possibly caused by incorrect `scanLines` parameter", maybeScanLines); 6670 } 6671 } 6672 throw new EOIMarkerError("Found EOI marker (0xFFD9) while parsing scan data"); 6673 } 6674 throw new JpegError(`unexpected marker ${(bitsData << 8 | nextByte).toString(16)}`); 6675 } 6676 } 6677 bitsCount = 7; 6678 return bitsData >>> 7; 6679 } 6680 function decodeHuffman(tree) { 6681 let node = tree; 6682 while (true) { 6683 node = node[readBit()]; 6684 switch (typeof node) { 6685 case "number": 6686 return node; 6687 case "object": 6688 continue; 6689 } 6690 throw new JpegError("invalid huffman sequence"); 6691 } 6692 } 6693 function receive(length) { 6694 let n = 0; 6695 while (length > 0) { 6696 n = n << 1 | readBit(); 6697 length--; 6698 } 6699 return n; 6700 } 6701 function receiveAndExtend(length) { 6702 if (length === 1) { 6703 return readBit() === 1 ? 1 : -1; 6704 } 6705 const n = receive(length); 6706 if (n >= 1 << length - 1) { 6707 return n; 6708 } 6709 return n + (-1 << length) + 1; 6710 } 6711 function decodeBaseline(component, blockOffset) { 6712 const t = decodeHuffman(component.huffmanTableDC); 6713 const diff = t === 0 ? 0 : receiveAndExtend(t); 6714 component.blockData[blockOffset] = component.pred += diff; 6715 let k = 1; 6716 while (k < 64) { 6717 const rs = decodeHuffman(component.huffmanTableAC); 6718 const s = rs & 15, 6719 r = rs >> 4; 6720 if (s === 0) { 6721 if (r < 15) { 6722 break; 6723 } 6724 k += 16; 6725 continue; 6726 } 6727 k += r; 6728 const z = dctZigZag[k]; 6729 component.blockData[blockOffset + z] = receiveAndExtend(s); 6730 k++; 6731 } 6732 } 6733 function decodeDCFirst(component, blockOffset) { 6734 const t = decodeHuffman(component.huffmanTableDC); 6735 const diff = t === 0 ? 0 : receiveAndExtend(t) << successive; 6736 component.blockData[blockOffset] = component.pred += diff; 6737 } 6738 function decodeDCSuccessive(component, blockOffset) { 6739 component.blockData[blockOffset] |= readBit() << successive; 6740 } 6741 let eobrun = 0; 6742 function decodeACFirst(component, blockOffset) { 6743 if (eobrun > 0) { 6744 eobrun--; 6745 return; 6746 } 6747 let k = spectralStart; 6748 const e = spectralEnd; 6749 while (k <= e) { 6750 const rs = decodeHuffman(component.huffmanTableAC); 6751 const s = rs & 15, 6752 r = rs >> 4; 6753 if (s === 0) { 6754 if (r < 15) { 6755 eobrun = receive(r) + (1 << r) - 1; 6756 break; 6757 } 6758 k += 16; 6759 continue; 6760 } 6761 k += r; 6762 const z = dctZigZag[k]; 6763 component.blockData[blockOffset + z] = receiveAndExtend(s) * (1 << successive); 6764 k++; 6765 } 6766 } 6767 let successiveACState = 0, 6768 successiveACNextValue; 6769 function decodeACSuccessive(component, blockOffset) { 6770 let k = spectralStart; 6771 const e = spectralEnd; 6772 let r = 0; 6773 let s; 6774 let rs; 6775 while (k <= e) { 6776 const offsetZ = blockOffset + dctZigZag[k]; 6777 const sign = component.blockData[offsetZ] < 0 ? -1 : 1; 6778 switch (successiveACState) { 6779 case 0: 6780 rs = decodeHuffman(component.huffmanTableAC); 6781 s = rs & 15; 6782 r = rs >> 4; 6783 if (s === 0) { 6784 if (r < 15) { 6785 eobrun = receive(r) + (1 << r); 6786 successiveACState = 4; 6787 } else { 6788 r = 16; 6789 successiveACState = 1; 6790 } 6791 } else { 6792 if (s !== 1) { 6793 throw new JpegError("invalid ACn encoding"); 6794 } 6795 successiveACNextValue = receiveAndExtend(s); 6796 successiveACState = r ? 2 : 3; 6797 } 6798 continue; 6799 case 1: 6800 case 2: 6801 if (component.blockData[offsetZ]) { 6802 component.blockData[offsetZ] += sign * (readBit() << successive); 6803 } else { 6804 r--; 6805 if (r === 0) { 6806 successiveACState = successiveACState === 2 ? 3 : 0; 6807 } 6808 } 6809 break; 6810 case 3: 6811 if (component.blockData[offsetZ]) { 6812 component.blockData[offsetZ] += sign * (readBit() << successive); 6813 } else { 6814 component.blockData[offsetZ] = successiveACNextValue << successive; 6815 successiveACState = 0; 6816 } 6817 break; 6818 case 4: 6819 if (component.blockData[offsetZ]) { 6820 component.blockData[offsetZ] += sign * (readBit() << successive); 6821 } 6822 break; 6823 } 6824 k++; 6825 } 6826 if (successiveACState === 4) { 6827 eobrun--; 6828 if (eobrun === 0) { 6829 successiveACState = 0; 6830 } 6831 } 6832 } 6833 let blockRow = 0; 6834 function decodeMcu(component, decode, mcu, row, col) { 6835 const mcuRow = mcu / mcusPerLine | 0; 6836 const mcuCol = mcu % mcusPerLine; 6837 blockRow = mcuRow * component.v + row; 6838 const blockCol = mcuCol * component.h + col; 6839 const blockOffset = getBlockBufferOffset(component, blockRow, blockCol); 6840 decode(component, blockOffset); 6841 } 6842 function decodeBlock(component, decode, mcu) { 6843 blockRow = mcu / component.blocksPerLine | 0; 6844 const blockCol = mcu % component.blocksPerLine; 6845 const blockOffset = getBlockBufferOffset(component, blockRow, blockCol); 6846 decode(component, blockOffset); 6847 } 6848 const componentsLength = components.length; 6849 let component, i, j, k, n; 6850 let decodeFn; 6851 if (progressive) { 6852 if (spectralStart === 0) { 6853 decodeFn = successivePrev === 0 ? decodeDCFirst : decodeDCSuccessive; 6854 } else { 6855 decodeFn = successivePrev === 0 ? decodeACFirst : decodeACSuccessive; 6856 } 6857 } else { 6858 decodeFn = decodeBaseline; 6859 } 6860 let mcu = 0, 6861 fileMarker; 6862 const mcuExpected = componentsLength === 1 ? components[0].blocksPerLine * components[0].blocksPerColumn : mcusPerLine * frame.mcusPerColumn; 6863 let h, v; 6864 while (mcu <= mcuExpected) { 6865 const mcuToRead = resetInterval ? Math.min(mcuExpected - mcu, resetInterval) : mcuExpected; 6866 if (mcuToRead > 0) { 6867 for (i = 0; i < componentsLength; i++) { 6868 components[i].pred = 0; 6869 } 6870 eobrun = 0; 6871 if (componentsLength === 1) { 6872 component = components[0]; 6873 for (n = 0; n < mcuToRead; n++) { 6874 decodeBlock(component, decodeFn, mcu); 6875 mcu++; 6876 } 6877 } else { 6878 for (n = 0; n < mcuToRead; n++) { 6879 for (i = 0; i < componentsLength; i++) { 6880 component = components[i]; 6881 h = component.h; 6882 v = component.v; 6883 for (j = 0; j < v; j++) { 6884 for (k = 0; k < h; k++) { 6885 decodeMcu(component, decodeFn, mcu, j, k); 6886 } 6887 } 6888 } 6889 mcu++; 6890 } 6891 } 6892 } 6893 bitsCount = 0; 6894 fileMarker = findNextFileMarker(data, offset); 6895 if (!fileMarker) { 6896 break; 6897 } 6898 if (fileMarker.invalid) { 6899 const partialMsg = mcuToRead > 0 ? "unexpected" : "excessive"; 6900 warn(`decodeScan - ${partialMsg} MCU data, current marker is: ${fileMarker.invalid}`); 6901 offset = fileMarker.offset; 6902 } 6903 if (fileMarker.marker >= 0xffd0 && fileMarker.marker <= 0xffd7) { 6904 offset += 2; 6905 } else { 6906 break; 6907 } 6908 } 6909 return offset - startOffset; 6910} 6911function quantizeAndInverse(component, blockBufferOffset, p) { 6912 const qt = component.quantizationTable, 6913 blockData = component.blockData; 6914 let v0, v1, v2, v3, v4, v5, v6, v7; 6915 let p0, p1, p2, p3, p4, p5, p6, p7; 6916 let t; 6917 if (!qt) { 6918 throw new JpegError("missing required Quantization Table."); 6919 } 6920 for (let row = 0; row < 64; row += 8) { 6921 p0 = blockData[blockBufferOffset + row]; 6922 p1 = blockData[blockBufferOffset + row + 1]; 6923 p2 = blockData[blockBufferOffset + row + 2]; 6924 p3 = blockData[blockBufferOffset + row + 3]; 6925 p4 = blockData[blockBufferOffset + row + 4]; 6926 p5 = blockData[blockBufferOffset + row + 5]; 6927 p6 = blockData[blockBufferOffset + row + 6]; 6928 p7 = blockData[blockBufferOffset + row + 7]; 6929 p0 *= qt[row]; 6930 if ((p1 | p2 | p3 | p4 | p5 | p6 | p7) === 0) { 6931 t = dctSqrt2 * p0 + 512 >> 10; 6932 p[row] = t; 6933 p[row + 1] = t; 6934 p[row + 2] = t; 6935 p[row + 3] = t; 6936 p[row + 4] = t; 6937 p[row + 5] = t; 6938 p[row + 6] = t; 6939 p[row + 7] = t; 6940 continue; 6941 } 6942 p1 *= qt[row + 1]; 6943 p2 *= qt[row + 2]; 6944 p3 *= qt[row + 3]; 6945 p4 *= qt[row + 4]; 6946 p5 *= qt[row + 5]; 6947 p6 *= qt[row + 6]; 6948 p7 *= qt[row + 7]; 6949 v0 = dctSqrt2 * p0 + 128 >> 8; 6950 v1 = dctSqrt2 * p4 + 128 >> 8; 6951 v2 = p2; 6952 v3 = p6; 6953 v4 = dctSqrt1d2 * (p1 - p7) + 128 >> 8; 6954 v7 = dctSqrt1d2 * (p1 + p7) + 128 >> 8; 6955 v5 = p3 << 4; 6956 v6 = p5 << 4; 6957 v0 = v0 + v1 + 1 >> 1; 6958 v1 = v0 - v1; 6959 t = v2 * dctSin6 + v3 * dctCos6 + 128 >> 8; 6960 v2 = v2 * dctCos6 - v3 * dctSin6 + 128 >> 8; 6961 v3 = t; 6962 v4 = v4 + v6 + 1 >> 1; 6963 v6 = v4 - v6; 6964 v7 = v7 + v5 + 1 >> 1; 6965 v5 = v7 - v5; 6966 v0 = v0 + v3 + 1 >> 1; 6967 v3 = v0 - v3; 6968 v1 = v1 + v2 + 1 >> 1; 6969 v2 = v1 - v2; 6970 t = v4 * dctSin3 + v7 * dctCos3 + 2048 >> 12; 6971 v4 = v4 * dctCos3 - v7 * dctSin3 + 2048 >> 12; 6972 v7 = t; 6973 t = v5 * dctSin1 + v6 * dctCos1 + 2048 >> 12; 6974 v5 = v5 * dctCos1 - v6 * dctSin1 + 2048 >> 12; 6975 v6 = t; 6976 p[row] = v0 + v7; 6977 p[row + 7] = v0 - v7; 6978 p[row + 1] = v1 + v6; 6979 p[row + 6] = v1 - v6; 6980 p[row + 2] = v2 + v5; 6981 p[row + 5] = v2 - v5; 6982 p[row + 3] = v3 + v4; 6983 p[row + 4] = v3 - v4; 6984 } 6985 for (let col = 0; col < 8; ++col) { 6986 p0 = p[col]; 6987 p1 = p[col + 8]; 6988 p2 = p[col + 16]; 6989 p3 = p[col + 24]; 6990 p4 = p[col + 32]; 6991 p5 = p[col + 40]; 6992 p6 = p[col + 48]; 6993 p7 = p[col + 56]; 6994 if ((p1 | p2 | p3 | p4 | p5 | p6 | p7) === 0) { 6995 t = dctSqrt2 * p0 + 8192 >> 14; 6996 if (t < -2040) { 6997 t = 0; 6998 } else if (t >= 2024) { 6999 t = 255; 7000 } else { 7001 t = t + 2056 >> 4; 7002 } 7003 blockData[blockBufferOffset + col] = t; 7004 blockData[blockBufferOffset + col + 8] = t; 7005 blockData[blockBufferOffset + col + 16] = t; 7006 blockData[blockBufferOffset + col + 24] = t; 7007 blockData[blockBufferOffset + col + 32] = t; 7008 blockData[blockBufferOffset + col + 40] = t; 7009 blockData[blockBufferOffset + col + 48] = t; 7010 blockData[blockBufferOffset + col + 56] = t; 7011 continue; 7012 } 7013 v0 = dctSqrt2 * p0 + 2048 >> 12; 7014 v1 = dctSqrt2 * p4 + 2048 >> 12; 7015 v2 = p2; 7016 v3 = p6; 7017 v4 = dctSqrt1d2 * (p1 - p7) + 2048 >> 12; 7018 v7 = dctSqrt1d2 * (p1 + p7) + 2048 >> 12; 7019 v5 = p3; 7020 v6 = p5; 7021 v0 = (v0 + v1 + 1 >> 1) + 4112; 7022 v1 = v0 - v1; 7023 t = v2 * dctSin6 + v3 * dctCos6 + 2048 >> 12; 7024 v2 = v2 * dctCos6 - v3 * dctSin6 + 2048 >> 12; 7025 v3 = t; 7026 v4 = v4 + v6 + 1 >> 1; 7027 v6 = v4 - v6; 7028 v7 = v7 + v5 + 1 >> 1; 7029 v5 = v7 - v5; 7030 v0 = v0 + v3 + 1 >> 1; 7031 v3 = v0 - v3; 7032 v1 = v1 + v2 + 1 >> 1; 7033 v2 = v1 - v2; 7034 t = v4 * dctSin3 + v7 * dctCos3 + 2048 >> 12; 7035 v4 = v4 * dctCos3 - v7 * dctSin3 + 2048 >> 12; 7036 v7 = t; 7037 t = v5 * dctSin1 + v6 * dctCos1 + 2048 >> 12; 7038 v5 = v5 * dctCos1 - v6 * dctSin1 + 2048 >> 12; 7039 v6 = t; 7040 p0 = v0 + v7; 7041 p7 = v0 - v7; 7042 p1 = v1 + v6; 7043 p6 = v1 - v6; 7044 p2 = v2 + v5; 7045 p5 = v2 - v5; 7046 p3 = v3 + v4; 7047 p4 = v3 - v4; 7048 if (p0 < 16) { 7049 p0 = 0; 7050 } else if (p0 >= 4080) { 7051 p0 = 255; 7052 } else { 7053 p0 >>= 4; 7054 } 7055 if (p1 < 16) { 7056 p1 = 0; 7057 } else if (p1 >= 4080) { 7058 p1 = 255; 7059 } else { 7060 p1 >>= 4; 7061 } 7062 if (p2 < 16) { 7063 p2 = 0; 7064 } else if (p2 >= 4080) { 7065 p2 = 255; 7066 } else { 7067 p2 >>= 4; 7068 } 7069 if (p3 < 16) { 7070 p3 = 0; 7071 } else if (p3 >= 4080) { 7072 p3 = 255; 7073 } else { 7074 p3 >>= 4; 7075 } 7076 if (p4 < 16) { 7077 p4 = 0; 7078 } else if (p4 >= 4080) { 7079 p4 = 255; 7080 } else { 7081 p4 >>= 4; 7082 } 7083 if (p5 < 16) { 7084 p5 = 0; 7085 } else if (p5 >= 4080) { 7086 p5 = 255; 7087 } else { 7088 p5 >>= 4; 7089 } 7090 if (p6 < 16) { 7091 p6 = 0; 7092 } else if (p6 >= 4080) { 7093 p6 = 255; 7094 } else { 7095 p6 >>= 4; 7096 } 7097 if (p7 < 16) { 7098 p7 = 0; 7099 } else if (p7 >= 4080) { 7100 p7 = 255; 7101 } else { 7102 p7 >>= 4; 7103 } 7104 blockData[blockBufferOffset + col] = p0; 7105 blockData[blockBufferOffset + col + 8] = p1; 7106 blockData[blockBufferOffset + col + 16] = p2; 7107 blockData[blockBufferOffset + col + 24] = p3; 7108 blockData[blockBufferOffset + col + 32] = p4; 7109 blockData[blockBufferOffset + col + 40] = p5; 7110 blockData[blockBufferOffset + col + 48] = p6; 7111 blockData[blockBufferOffset + col + 56] = p7; 7112 } 7113} 7114function buildComponentData(frame, component) { 7115 const blocksPerLine = component.blocksPerLine; 7116 const blocksPerColumn = component.blocksPerColumn; 7117 const computationBuffer = new Int16Array(64); 7118 for (let blockRow = 0; blockRow < blocksPerColumn; blockRow++) { 7119 for (let blockCol = 0; blockCol < blocksPerLine; blockCol++) { 7120 const offset = getBlockBufferOffset(component, blockRow, blockCol); 7121 quantizeAndInverse(component, offset, computationBuffer); 7122 } 7123 } 7124 return component.blockData; 7125} 7126function findNextFileMarker(data, currentPos, startPos = currentPos) { 7127 const maxPos = data.length - 1; 7128 let newPos = startPos < currentPos ? startPos : currentPos; 7129 if (currentPos >= maxPos) { 7130 return null; 7131 } 7132 const currentMarker = readUint16(data, currentPos); 7133 if (currentMarker >= 0xffc0 && currentMarker <= 0xfffe) { 7134 return { 7135 invalid: null, 7136 marker: currentMarker, 7137 offset: currentPos 7138 }; 7139 } 7140 let newMarker = readUint16(data, newPos); 7141 while (!(newMarker >= 0xffc0 && newMarker <= 0xfffe)) { 7142 if (++newPos >= maxPos) { 7143 return null; 7144 } 7145 newMarker = readUint16(data, newPos); 7146 } 7147 return { 7148 invalid: currentMarker.toString(16), 7149 marker: newMarker, 7150 offset: newPos 7151 }; 7152} 7153function prepareComponents(frame) { 7154 const mcusPerLine = Math.ceil(frame.samplesPerLine / 8 / frame.maxH); 7155 const mcusPerColumn = Math.ceil(frame.scanLines / 8 / frame.maxV); 7156 for (const component of frame.components) { 7157 const blocksPerLine = Math.ceil(Math.ceil(frame.samplesPerLine / 8) * component.h / frame.maxH); 7158 const blocksPerColumn = Math.ceil(Math.ceil(frame.scanLines / 8) * component.v / frame.maxV); 7159 const blocksPerLineForMcu = mcusPerLine * component.h; 7160 const blocksPerColumnForMcu = mcusPerColumn * component.v; 7161 const blocksBufferSize = 64 * blocksPerColumnForMcu * (blocksPerLineForMcu + 1); 7162 component.blockData = new Int16Array(blocksBufferSize); 7163 component.blocksPerLine = blocksPerLine; 7164 component.blocksPerColumn = blocksPerColumn; 7165 } 7166 frame.mcusPerLine = mcusPerLine; 7167 frame.mcusPerColumn = mcusPerColumn; 7168} 7169function readDataBlock(data, offset) { 7170 const length = readUint16(data, offset); 7171 offset += 2; 7172 let endOffset = offset + length - 2; 7173 const fileMarker = findNextFileMarker(data, endOffset, offset); 7174 if (fileMarker?.invalid) { 7175 warn("readDataBlock - incorrect length, current marker is: " + fileMarker.invalid); 7176 endOffset = fileMarker.offset; 7177 } 7178 const array = data.subarray(offset, endOffset); 7179
7179offset += array.length; 7180 return { 7181 appData: array, 7182 newOffset: offset 7183 }; 7184} 7185function skipData(data, offset) { 7186 const length = readUint16(data, offset); 7187 offset += 2; 7188 const endOffset = offset + length - 2; 7189 const fileMarker = findNextFileMarker(data, endOffset, offset);
7190 if (fileMarker?.invalid) { 7191 return fileMarker.offset; 7192 } 7193 return endOffset; 7194} 7195class JpegImage { 7196 constructor({ 7197 decodeTransform = null, 7198 colorTransform = -1 7199 } = {}) { 7200 this._decodeTransform = decodeTransform; 7201 this._colorTransform = colorTransform; 7202 } 7203 static canUseImageDecoder(data, colorTransform = -1) { 7204 let offset = 0; 7205 let numComponents = null; 7206 let fileMarker = readUint16(data, offset); 7207 offset += 2; 7208 if (fileMarker !== 0xffd8) { 7209 throw new JpegError("SOI not found"); 7210 } 7211 fileMarker = readUint16(data, offset); 7212 offset += 2; 7213 markerLoop: while (fileMarker !== 0xffd9) { 7214 switch (fileMarker) { 7215 case 0xffc0: 7216 case 0xffc1: 7217 case 0xffc2: 7218 numComponents = data[offset + (2 + 1 + 2 + 2)]; 7219 break markerLoop; 7220 case 0xffff: 7221 if (data[offset] !== 0xff) { 7222 offset--; 7223 } 7224 break; 7225 } 7226 offset = skipData(data, offset); 7227 fileMarker = readUint16(data, offset); 7228 offset += 2; 7229 } 7230 if (numComponents === 4) { 7231 return false; 7232 } 7233 if (numComponents === 3 && colorTransform === 0) { 7234 return false; 7235 } 7236 return true
vendor: 11,990 bytes, lines 7236-7576
7236; 7237 } 7238 parse(data, { 7239 dnlScanLines = null 7240 } = {}) { 7241 let offset = 0; 7242 let jfif = null; 7243 let adobe = null; 7244 let frame, resetInterval; 7245 let numSOSMarkers = 0; 7246 const quantizationTables = []; 7247 const huffmanTablesAC = [], 7248 huffmanTablesDC = []; 7249 let fileMarker = readUint16(data, offset); 7250 offset += 2; 7251 if (fileMarker !== 0xffd8) { 7252 throw new JpegError("SOI not found"); 7253 } 7254 fileMarker = readUint16(data, offset); 7255 offset += 2; 7256 markerLoop: while (fileMarker !== 0xffd9) { 7257 let i, j, l; 7258 switch (fileMarker) { 7259 case 0xffe0: 7260 case 0xffe1: 7261 case 0xffe2: 7262 case 0xffe3: 7263 case 0xffe4: 7264 case 0xffe5: 7265 case 0xffe6: 7266 case 0xffe7: 7267 case 0xffe8: 7268 case 0xffe9: 7269 case 0xffea: 7270 case 0xffeb: 7271 case 0xffec: 7272 case 0xffed: 7273 case 0xffee: 7274 case 0xffef: 7275 case 0xfffe: 7276 const { 7277 appData, 7278 newOffset 7279 } = readDataBlock(data, offset); 7280 offset = newOffset; 7281 if (fileMarker === 0xffe0) { 7282 if (appData[0] === 0x4a && appData[1] === 0x46 && appData[2] === 0x49 && appData[3] === 0x46 && appData[4] === 0) { 7283 jfif = { 7284 version: { 7285 major: appData[5], 7286 minor: appData[6] 7287 }, 7288 densityUnits: appData[7], 7289 xDensity: appData[8] << 8 | appData[9], 7290 yDensity: appData[10] << 8 | appData[11], 7291 thumbWidth: appData[12], 7292 thumbHeight: appData[13], 7293 thumbData: appData.subarray(14, 14 + 3 * appData[12] * appData[13]) 7294 }; 7295 } 7296 } 7297 if (fileMarker === 0xffee) { 7298 if (appData[0] === 0x41 && appData[1] === 0x64 && appData[2] === 0x6f && appData[3] === 0x62 && appData[4] === 0x65) { 7299 adobe = { 7300 version: appData[5] << 8 | appData[6], 7301 flags0: appData[7] << 8 | appData[8], 7302 flags1: appData[9] << 8 | appData[10], 7303 transformCode: appData[11] 7304 }; 7305 } 7306 } 7307 break; 7308 case 0xffdb: 7309 const quantizationTablesLength = readUint16(data, offset); 7310 offset += 2; 7311 const quantizationTablesEnd = quantizationTablesLength + offset - 2; 7312 let z; 7313 while (offset < quantizationTablesEnd) { 7314 const quantizationTableSpec = data[offset++]; 7315 const tableData = new Uint16Array(64); 7316 if (quantizationTableSpec >> 4 === 0) { 7317 for (j = 0; j < 64; j++) { 7318 z = dctZigZag[j]; 7319 tableData[z] = data[offset++]; 7320 } 7321 } else if (quantizationTableSpec >> 4 === 1) { 7322 for (j = 0; j < 64; j++) { 7323 z = dctZigZag[j]; 7324 tableData[z] = readUint16(data, offset); 7325 offset += 2; 7326 } 7327 } else { 7328 throw new JpegError("DQT - invalid table spec"); 7329 } 7330 quantizationTables[quantizationTableSpec & 15] = tableData; 7331 } 7332 break; 7333 case 0xffc0: 7334 case 0xffc1: 7335 case 0xffc2: 7336 if (frame) { 7337 throw new JpegError("Only single frame JPEGs supported"); 7338 } 7339 offset += 2; 7340 frame = {}; 7341 frame.extended = fileMarker === 0xffc1; 7342 frame.progressive = fileMarker === 0xffc2; 7343 frame.precision = data[offset++]; 7344 const sofScanLines = readUint16(data, offset); 7345 offset += 2; 7346 frame.scanLines = dnlScanLines || sofScanLines; 7347 frame.samplesPerLine = readUint16(data, offset); 7348 offset += 2; 7349 frame.components = []; 7350 frame.componentIds = {}; 7351 const componentsCount = data[offset++]; 7352 let maxH = 0, 7353 maxV = 0; 7354 for (i = 0; i < componentsCount; i++) { 7355 const componentId = data[offset]; 7356 const h = data[offset + 1] >> 4; 7357 const v = data[offset + 1] & 15; 7358 if (maxH < h) { 7359 maxH = h; 7360 } 7361 if (maxV < v) { 7362 maxV = v; 7363 } 7364 const qId = data[offset + 2]; 7365 l = frame.components.push({ 7366 h, 7367 v, 7368 quantizationId: qId, 7369 quantizationTable: null 7370 }); 7371 frame.componentIds[componentId] = l - 1; 7372 offset += 3; 7373 } 7374 frame.maxH = maxH; 7375 frame.maxV = maxV; 7376 prepareComponents(frame); 7377 break; 7378 case 0xffc4: 7379 const huffmanLength = readUint16(data, offset); 7380 offset += 2; 7381 for (i = 2; i < huffmanLength;) { 7382 const huffmanTableSpec = data[offset++]; 7383 const codeLengths = new Uint8Array(16); 7384 let codeLengthSum = 0; 7385 for (j = 0; j < 16; j++, offset++) { 7386 codeLengthSum += codeLengths[j] = data[offset]; 7387 } 7388 const huffmanValues = new Uint8Array(codeLengthSum); 7389 for (j = 0; j < codeLengthSum; j++, offset++) { 7390 huffmanValues[j] = data[offset]; 7391 } 7392 i += 17 + codeLengthSum; 7393 (huffmanTableSpec >> 4 === 0 ? huffmanTablesDC : huffmanTablesAC)[huffmanTableSpec & 15] = buildHuffmanTable(codeLengths, huffmanValues); 7394 } 7395 break; 7396 case 0xffdd: 7397 offset += 2; 7398 resetInterval = readUint16(data, offset); 7399 offset += 2; 7400 break; 7401 case 0xffda: 7402 const parseDNLMarker = ++numSOSMarkers === 1 && !dnlScanLines; 7403 offset += 2; 7404 const selectorsCount = data[offset++], 7405 components = []; 7406 for (i = 0; i < selectorsCount; i++) { 7407 const index = data[offset++]; 7408 const componentIndex = frame.componentIds[index]; 7409 const component = frame.components[componentIndex]; 7410 component.index = index; 7411 const tableSpec = data[offset++]; 7412 component.huffmanTableDC = huffmanTablesDC[tableSpec >> 4]; 7413 component.huffmanTableAC = huffmanTablesAC[tableSpec & 15]; 7414 components.push(component); 7415 } 7416 const spectralStart = data[offset++], 7417 spectralEnd = data[offset++], 7418 successiveApproximation = data[offset++]; 7419 try { 7420 const processed = decodeScan(data, offset, frame, components, resetInterval, spectralStart, spectralEnd, successiveApproximation >> 4, successiveApproximation & 15, parseDNLMarker); 7421 offset += processed; 7422 } catch (ex) { 7423 if (ex instanceof DNLMarkerError) { 7424 warn(`${ex.message} -- attempting to re-parse the JPEG image.`); 7425 return this.parse(data, { 7426 dnlScanLines: ex.scanLines 7427 }); 7428 } else if (ex instanceof EOIMarkerError) { 7429 warn(`${ex.message} -- ignoring the rest of the image data.`); 7430 break markerLoop; 7431 } 7432 throw ex; 7433 } 7434 break; 7435 case 0xffdc: 7436 offset += 4; 7437 break; 7438 case 0xffff: 7439 if (data[offset] !== 0xff) { 7440 offset--; 7441 } 7442 break; 7443 default: 7444 const nextFileMarker = findNextFileMarker(data, offset - 2, offset - 3); 7445 if (nextFileMarker?.invalid) { 7446 warn("JpegImage.parse - unexpected data, current marker is: " + nextFileMarker.invalid); 7447 offset = nextFileMarker.offset; 7448 break; 7449 } 7450 if (!nextFileMarker || offset >= data.length - 1) { 7451 warn("JpegImage.parse - reached the end of the image data " + "without finding an EOI marker (0xFFD9)."); 7452 break markerLoop; 7453 } 7454 throw new JpegError("JpegImage.parse - unknown marker: " + fileMarker.toString(16)); 7455 } 7456 fileMarker = readUint16(data, offset); 7457 offset += 2; 7458 } 7459 if (!frame) { 7460 throw new JpegError("JpegImage.parse - no frame data found."); 7461 } 7462 this.width = frame.samplesPerLine; 7463 this.height = frame.scanLines; 7464 this.jfif = jfif; 7465 this.adobe = adobe; 7466 this.components = []; 7467 for (const component of frame.components) { 7468 const quantizationTable = quantizationTables[component.quantizationId]; 7469 if (quantizationTable) { 7470 component.quantizationTable = quantizationTable; 7471 } 7472 this.components.push({ 7473 index: component.index, 7474 output: buildComponentData(frame, component), 7475 scaleX: component.h / frame.maxH, 7476 scaleY: component.v / frame.maxV, 7477 blocksPerLine: component.blocksPerLine, 7478 blocksPerColumn: component.blocksPerColumn 7479 }); 7480 } 7481 this.numComponents = this.components.length; 7482 return undefined; 7483 } 7484 _getLinearizedBlockData(width, height, isSourcePDF = false) { 7485 const scaleX = this.width / width, 7486 scaleY = this.height / height; 7487 let component, componentScaleX, componentScaleY, blocksPerScanline; 7488 let x, y, i, j, k; 7489 let index; 7490 let offset = 0; 7491 let output; 7492 const numComponents = this.components.length; 7493 const dataLength = width * height * numComponents; 7494 const data = new Uint8ClampedArray(dataLength); 7495 const xScaleBlockOffset = new Uint32Array(width); 7496 const mask3LSB = 0xfffffff8; 7497 let lastComponentScaleX; 7498 for (i = 0; i < numComponents; i++) { 7499 component = this.components[i]; 7500 componentScaleX = component.scaleX * scaleX; 7501 componentScaleY = component.scaleY * scaleY; 7502 offset = i; 7503 output = component.output; 7504 blocksPerScanline = component.blocksPerLine + 1 << 3; 7505 if (componentScaleX !== lastComponentScaleX) { 7506 for (x = 0; x < width; x++) { 7507 j = 0 | x * componentScaleX; 7508 xScaleBlockOffset[x] = (j & mask3LSB) << 3 | j & 7; 7509 } 7510 lastComponentScaleX = componentScaleX; 7511 } 7512 for (y = 0; y < height; y++) { 7513 j = 0 | y * componentScaleY; 7514 index = blocksPerScanline * (j & mask3LSB) | (j & 7) << 3; 7515 for (x = 0; x < width; x++) { 7516 data[offset] = output[index + xScaleBlockOffset[x]]; 7517 offset += numComponents; 7518 } 7519 } 7520 } 7521 let transform = this._decodeTransform; 7522 if (!isSourcePDF && numComponents === 4 && !transform) { 7523 transform = new Int32Array([-256, 255, -256, 255, -256, 255, -256, 255]); 7524 } 7525 if (transform) { 7526 for (i = 0; i < dataLength;) { 7527 for (j = 0, k = 0; j < numComponents; j++, i++, k += 2) { 7528 data[i] = (data[i] * transform[k] >> 8) + transform[k + 1]; 7529 } 7530 } 7531 } 7532 return data; 7533 } 7534 get _isColorConversionNeeded() { 7535 if (this.adobe) { 7536 return !!this.adobe.transformCode; 7537 } 7538 if (this.numComponents === 3) { 7539 if (this._colorTransform === 0) { 7540 return false; 7541 } else if (this.components[0].index === 0x52 && this.components[1].index === 0x47 && this.components[2].index === 0x42) { 7542 return false; 7543 } 7544 return true; 7545 } 7546 if (this._colorTransform === 1) { 7547 return true; 7548 } 7549 return false; 7550 } 7551 _convertYccToRgb(data) { 7552 let Y, Cb, Cr; 7553 for (let i = 0, length = data.length; i < length; i += 3) { 7554 Y = data[i]; 7555 Cb = data[i + 1]; 7556 Cr = data[i + 2]; 7557 data[i] = Y - 179.456 + 1.402 * Cr; 7558 data[i + 1] = Y + 135.459 - 0.344 * Cb - 0.714 * Cr; 7559 data[i + 2] = Y - 226.816 + 1.772 * Cb; 7560 } 7561 return data; 7562 } 7563 _convertYccToRgba(data, out) { 7564 for (let i = 0, j = 0, length = data.length; i < length; i += 3, j += 4) { 7565 const Y = data[i]; 7566 const Cb = data[i + 1]; 7567 const Cr = data[i + 2]; 7568 out[j] = Y - 179.456 + 1.402 * Cr; 7569 out[j + 1] = Y + 135.459 - 0.344 * Cb - 0.714 * Cr; 7570 out[j + 2] = Y - 226.816 + 1.772 * Cb; 7571 out[j + 3] = 255; 7572 } 7573 return out; 7574 } 7575 _convertYcckToRgb(data) { 7576
vendor: 3,360 bytes, lines 7576-7614
7576let Y, Cb, Cr, k; 7577 let offset = 0; 7578 for (let i = 0, length = data.length; i < length; i += 4) { 7579 Y = data[i]; 7580 Cb = data[i + 1]; 7581 Cr = data[i + 2]; 7582 k = data[i + 3]; 7583 data[offset++] = -122.67195406894 + Cb * (-6.60635669420364e-5 * Cb + 0.000437130475926232 * Cr - 5.4080610064599e-5 * Y + 0.00048449797120281 * k - 0.154362151871126) + Cr * (-0.000957964378445773 * Cr + 0.000817076911346625 * Y - 0.00477271405408747 * k + 1.53380253221734) + Y * (0.000961250184130688 * Y - 0.00266257332283933 * k + 0.48357088451265) + k * (-0.000336197177618394 * k + 0.484791561490776); 7584 data[offset++] = 107.268039397724 + Cb * (2.19927104525741e-5 * Cb - 0.000640992018297945 * Cr + 0.000659397001245577 * Y + 0.000426105652938837 * k - 0.176491792462875) + Cr * (-0.000778269941513683 * Cr + 0.00130872261408275 * Y + 0.000770482631801132 * k - 0.151051492775562) + Y * (0.00126935368114843 * Y - 0.00265090189010898 * k + 0.25802910206845) + k * (-0.000318913117588328 * k - 0.213742400323665); 7585 data[offset++] = -20.810012546947 + Cb * (-0.000570115196973677 * Cb - 2.63409051004589e-5 * Cr + 0.0020741088115012 * Y - 0.00288260236853442 * k + 0.814272968359295) + Cr * (-1.53496057440975e-5 * Cr - 0.000132689043961446 * Y + 0.000560833691242812 * k - 0.195152027534049) + Y * (0.00174418132927582 * Y - 0.00255243321439347 * k + 0.116935020465145) + k * (-0.000343531996510555 * k + 0.24165260232407); 7586 } 7587 return data.subarray(0, offset); 7588 } 7589 _convertYcckToRgba(data) { 7590 for (let i = 0, length = data.length; i < length; i += 4) { 7591 const Y = data[i]; 7592 const Cb = data[i + 1]; 7593 const Cr = data[i + 2]; 7594 const k = data[i + 3]; 7595 data[i] = -122.67195406894 + Cb * (-6.60635669420364e-5 * Cb + 0.000437130475926232 * Cr - 5.4080610064599e-5 * Y + 0.00048449797120281 * k - 0.154362151871126) + Cr * (-0.000957964378445773 * Cr + 0.000817076911346625 * Y - 0.00477271405408747 * k + 1.53380253221734) + Y * (0.000961250184130688 * Y - 0.00266257332283933 * k + 0.48357088451265) + k * (-0.000336197177618394 * k + 0.484791561490776); 7596 data[i + 1] = 107.268039397724 + Cb * (2.19927104525741e-5 * Cb - 0.000640992018297945 * Cr + 0.000659397001245577 * Y + 0.000426105652938837 * k - 0.176491792462875) + Cr * (-0.000778269941513683 * Cr + 0.00130872261408275 * Y + 0.000770482631801132 * k - 0.151051492775562) + Y * (0.00126935368114843 * Y - 0.00265090189010898 * k + 0.25802910206845) + k * (-0.000318913117588328 * k - 0.213742400323665); 7597 data[i + 2] = -20.810012546947 + Cb * (-0.000570115196973677 * Cb - 2.63409051004589e-5 * Cr + 0.0020741088115012 * Y - 0.00288260236853442 * k + 0.814272968359295) + Cr * (-1.53496057440975e-5 * Cr - 0.000132689043961446 * Y + 0.000560833691242812 * k - 0.195152027534049) + Y * (0.00174418132927582 * Y - 0.00255243321439347 * k + 0.116935020465145) + k * (-0.000343531996510555 * k + 0.24165260232407); 7598 data[i + 3] = 255; 7599 } 7600 return data; 7601 } 7602 _convertYcckToCmyk(data) { 7603 let Y, Cb, Cr; 7604 for (let i = 0, length = data.length; i < length; i += 4) { 7605 Y = data[i]; 7606 Cb = data[i + 1]; 7607 Cr = data[i + 2]; 7608 data[i] = 434.456 - Y - 1.402 * Cr; 7609 data[i + 1] = 119.541 - Y + 0.344 * Cb + 0.714 * Cr; 7610 data[i + 2] = 481.816 - Y - 1.772 * Cb; 7611 } 7612 return data; 7613 } 7614 _convertCmykToRgb(data) {
7615 let c, m, y, k; 7616 let offset = 0; 7617 for (let i = 0, length = data.length; i < length; i += 4) { 7618 c = data[i]; 7619 m = data[i + 1]; 7620 y = data[i + 2]; 7621 k = data[i + 3]; 7622 data[offset++] = 255 + c * (-0.00006747147073602441 * c + 0.0008379262121013727 * m + 0.0002894718188643294 * y + 0.003264231057537806 * k - 1.1185611867203937) + m * (0.000026374107616089405 * m - 0.00008626949158638572 * y - 0.0002748769067499491 * k - 0.02155688794978967) + y * (-0.00003878099212869363 * y - 0.0003267808279485286 * k + 0.0686742238595345) - k * (0.0003361971776183937 * k + 0.7430659151342254); 7623 data[offset++] = 255 + c * (0.00013596372813588848 * c + 0.000924537132573585 * m + 0.00010567359618683593 * y + 0.0004791864687436512 * k - 0.3109689587515875) + m * (-0.00023545346108370344 * m + 0.0002702845253534714 * y + 0.0020200308977307156 * k - 0.7488052167015494) + y * (0.00006834815998235662 * y + 0.00015168452363460973 * k - 0.09751927774728933) - k * (0.0003189131175883281 * k + 0.7364883807733168); 7624 data[offset++] = 255 + c * (0.000013598650411385307 * c + 0.00012423956175490851 * m + 0.0004751985097583589 * y - 0.0000036729317476630422 * k - 0.05562186980264034) + m * (0.00016141380598724676 * m + 0.0009692239130725186 * y + 0.0007782692450036253 * k - 0.44015232367526463) + y * (5.068882914068769e-7 * y + 0.0017778369011375071 * k - 0.7591454649749609) - k * (0.0003435319965105553 * k + 0.7063770186160144); 7625 } 7626 return data.subarray(0, offset); 7627 } 7628 _convertCmykToRgba(data) { 7629 for (let i = 0, length = data.length; i < length; i += 4) { 7630 const c = data[i]; 7631 const m = data[i + 1]; 7632 const y = data[i + 2]; 7633 const k = data[i + 3]; 7634 data[i] = 255 + c * (-0.00006747147073602441 * c + 0.0008379262121013727 * m + 0.0002894718188643294 * y + 0.003264231057537806 * k - 1.1185611867203937) + m * (0.000026374107616089405 * m - 0.00008626949158638572 * y - 0.0002748769067499491 * k - 0.02155688794978967) + y * (-0.00003878099212869363 * y - 0.0003267808279485286 * k + 0.0686742238595345) - k * (0.0003361971776183937 * k + 0.7430659151342254); 7635 data[i + 1] = 255 + c * (0.00013596372813588848 * c + 0.000924537132573585 * m + 0.00010567359618683593 * y + 0.0004791864687436512 * k - 0.3109689587515875) + m * (-0.00023545346108370344 * m + 0.0002702845253534714 * y + 0.0020200308977307156 * k - 0.7488052167015494) + y * (0.00006834815998235662 * y + 0.00015168452363460973 * k - 0.09751927774728933) - k * (0.0003189131175883281 * k + 0.7364883807733168); 7636 data[i + 2] = 255 + c * (0.000013598650411385307 * c + 0.00012423956175490851 * m + 0.0004751985097583589 * y - 0.0000036729317476630422 * k - 0.05562186980264034) + m * (0.00016141380598724676 * m + 0.0009692239130725186 * y + 0.0007782692450036253 * k - 0.44015232367526463) + y * (5.068882914068769e-7 * y + 0.0017778369011375071 * k - 0.7591454649749609) - k * (0.0003435319965105553 * k + 0.7063770186160144); 7637 data[i + 3] = 255; 7638 } 7639 return data; 7640 } 7641 getData({ 7642 width, 7643 height, 7644 forceRGBA = false, 7645 forceRGB = false, 7646 isSourcePDF = false 7647 }) { 7648 if (this.numComponents > 4) { 7649 throw new JpegError("Unsupported color mode"); 7650 } 7651 const data = this._getLinearizedBlockData(width, height, isSourcePDF); 7652 if (this.numComponents === 1 && (forceRGBA || forceRGB)) { 7653 const len = data.length * (forceRGBA ? 4 : 3); 7654 const rgbaData = new Uint8ClampedArray(len); 7655 let offset = 0; 7656 if (forceRGBA) { 7657 grayToRGBA(data, new Uint32Array(rgbaData.buffer)); 7658 } else { 7659 for (const grayColor of data) { 7660 rgbaData[offset++] = grayColor; 7661 rgbaData[offset++] = grayColor; 7662 rgbaData[offset++] = grayColor; 7663 } 7664 } 7665 return rgbaData; 7666 } else if (this.numComponents === 3 && this._isColorConversionNeeded) { 7667 if (forceRGBA) { 7668 const rgbaData = new Uint8ClampedArray(data.length / 3 * 4); 7669 return this._convertYccToRgba(data, rgbaData); 7670 } 7671 return this._convertYccToRgb(data); 7672 } else if (this.numComponents === 4) { 7673 if (this._isColorConversionNeeded) { 7674 if (forceRGBA) { 7675 return this._convertYcckToRgba(data); 7676 } 7677 if (forceRGB) { 7678 return this._convertYcckToRgb(data); 7679 } 7680 return this._convertYcckToCmyk(data); 7681 } else if (forceRGBA) { 7682 return this._convertCmykToRgba(data); 7683 } else if (forceRGB) { 7684 return this._convertCmykToRgb(data); 7685 } 7686 } 7687 return data; 7688 } 7689} 7690 7691;// ./src/core/jpeg_stream.js 7692 7693 7694 7695 7696class JpegStream extends DecodeStream { 7697 constructor(stream, maybeLength, params) { 7698 super(maybeLength); 7699 this.stream = stream; 7700 this.dict = stream.dict; 7701 this.maybeLength = maybeLength; 7702 this.params = params; 7703 } 7704 static get canUseImageDecoder() { 7705 return shadow(this, "canUseImageDecoder", typeof ImageDecoder === "undefined" ? Promise.resolve(false) : ImageDecoder.isTypeSupp
7705orted("image/jpeg")); 7706 } 7707 get bytes() { 7708 return shadow(this, "bytes", this.stream.getBytes(this.maybeLength)); 7709 } 7710 ensureBuffer(requested) {} 7711 readBlock() { 7712 this.decodeImage(); 7713 } 7714 get jpegOptions() { 7715 const jpegOptions = { 7716 decodeTransform: undefined, 7717 colorTransform: undefined 7718 }; 7719 const decodeArr = this.dict.getArray("D", "Decode"); 7720 if ((this.forceRGBA || this.forceRGB) && Array.isArray(decodeArr)) { 7721 const bitsPerComponent = this.dict.get("BPC", "BitsPerComponent") || 8; 7722 const decodeArrLength = decodeArr.length; 7723 const transform = new Int32Array(decodeArrLength); 7724 let transformNeeded = false; 7725 const maxValue = (1 << bitsPerComponent) - 1; 7726 for (let i = 0; i < decodeArrLength; i += 2) { 7727 transform[i] = (decodeArr[i + 1] - decodeArr[i]) * 256 | 0; 7728 transform[i + 1] = decodeArr[i] * maxValue | 0; 7729 if (transform[i] !== 256 || transform[i + 1] !== 0) { 7730 transformNeeded = true; 7731 } 7732 } 7733 if (transformNeeded) { 7734 jpegOptions.decodeTransform = transform; 7735 } 7736 } 7737 if (this.params instanceof Dict) { 7738 const colorTransform = this.params.get("ColorTransform"); 7739 if (Number.isInteger(colorTransform)) { 7740 jpegOptions.colorTransform = colorTransform; 7741 } 7742 } 7743 return shadow(this, "jpegOptions", jpegOptions); 7744 } 7745 #skipUselessBytes(data) { 7746 for (let i = 0, ii = data.length - 1; i < ii; i++) { 7747 if (data[i] === 0xff && data[i + 1] === 0xd8) { 7748 if (i > 0) { 7749 data = data.subarray(i); 7750 } 7751 break; 7752 } 7753 } 7754 return data; 7755 } 7756 decodeImage(bytes) { 7757 if (this.eof) { 7758 return this.buffer; 7759 } 7760 bytes = this.#skipUselessBytes(bytes || this.bytes); 7761 const jpegImage = new JpegImage(this.jpegOptions); 7762 jpegImage.parse(bytes); 7763 const data = jpegImage.getData({ 7764 width: this.drawWidth, 7765 height: this.drawHeight, 7766 forceRGBA: this.forceRGBA, 7767 forceRGB: this.forceRGB, 7768 isSourcePDF: true 7769 }); 7770 this.buffer = data; 7771 this.bufferLength = data.length; 7772 this.eof = true; 7773 return this.buffer; 7774 } 7775 get canAsyncDecodeImageFromBuffer() { 7776 return this.stream.isAsync; 7777 } 7778 async getTransferableImage() { 7779 if (!(await JpegStream.canUseImageDecoder)) { 7780 return null; 7781 } 7782 const jpegOptions = this.jpegOptions; 7783 if (jpegOptions.decodeTransform) { 7784 return null; 7785 } 7786 let decoder; 7787 try { 7788 const bytes = this.canAsyncDecodeImageFromBuffer && (await this.stream.asyncGetBytes()) || this.bytes; 7789 if (!bytes) { 7790 return null; 7791 } 7792 const data = this.#skipUselessBytes(bytes); 7793 if (!JpegImage.canUseImageDecoder(data, jpegOptions.colorTransform)) { 7794 return null; 7795 } 7796 decoder = new ImageDecoder({ 7797 data, 7798 type: "image/jpeg", 7799 preferAnimation: false 7800 }); 7801 return (await decoder.decode()).image; 7802 } catch (reason) { 7803 warn(`getTransferableImage - failed: "${reason}".`); 7804 return null; 7805 } finally { 7806 decoder?.close(); 7807 } 7808 } 7809} 7810 7811;// ./external/openjpeg/openjpeg.js 7812var OpenJPEG = (() => { 7813 var _scriptName = typeof document != 'undefined' ? document.currentScript?.src : undefined; 7814 return function (moduleArg = {}) { 7815 var moduleRtn; 7816 var Module = moduleArg; 7817 var readyPromiseResolve, readyPromiseReject; 7818 var readyPromise = new Promise((resolve, reject) => { 7819 readyPromiseResolve = resolve; 7820 readyPromiseReject = reject; 7821 }); 7822 var ENVIRONMENT_IS_WEB = true; 7823 var ENVIRONMENT_IS_WORKER = false; 7824 Module.decode = function (bytes, { 7825 numComponents = 4, 7826 isIndexedColormap = false, 7827 smaskInData = false 7828 }) { 7829 const size = bytes.length; 7830 const ptr = Module._malloc(size); 7831 Module.HEAPU8.set(bytes, ptr); 7832 const ret = Module._jp2_decode(ptr, size, numComponents > 0 ? numComponents : 0, !!isIndexedColormap, !!smaskInData); 7833 Module._free(ptr); 7834 if (ret) { 7835 const { 7836 errorMessages: errorMessages 7837 } = Module; 7838 if (errorMessages) { 7839 delete Module.errorMessages; 7840 return errorMessages; 7841 } 7842 return "Unknown error"; 7843 } 7844 const { 7845 imageData: imageData 7846 } = Module; 7847 Module.imageData = null; 7848 return imageData; 7849 }; 7850 var moduleOverrides = Object.assign({}, Module); 7851 var arguments_ = []; 7852 var thisProgram = "./this.program"; 7853 var quit_ = (status, toThrow) => { 7854 throw toThrow; 7855 }; 7856 var scriptDirectory = ""; 7857 var read_, readAsync, readBinary; 7858 if (ENVIRONMENT_IS_WEB || ENVIRONMENT_IS_WORKER) { 7859 if (ENVIRONMENT_IS_WORKER) { 7860 scriptDirectory = self.location.href; 7861 } else if (typeof document != "undefined" && document.currentScript) { 7862 scriptDirectory = document.currentScript.src; 7863 } 7864 if (_scriptName) { 7865 scriptDirectory = _scriptName; 7866 } 7867 if (scriptDirectory.startsWith("blob:")) { 7868 scriptDirectory = ""; 7869 } else { 7870 scriptDirectory = scriptDirectory.substr(0, scriptDirectory.replace(/[?#].*/, "").lastIndexOf("/") + 1); 7871 } 7872 read_ = url => { 7873 var xhr = new XMLHttpRequest(); 7874 xhr.open("GET", url, false); 7875 xhr.send(null); 7876 return xhr.responseText; 7877 }; 7878 if (ENVIRONMENT_IS_WORKER) { 7879 readBinary = url => { 7880 var xhr = new XMLHttpRequest(); 7881 xhr.open("GET", url, false); 7882 xhr.responseType = "arraybuffer"; 7883 xhr.send(null); 7884 return new Uint8Array(xhr.response); 7885 }; 7886 } 7887 readAsync = (url, onload, onerror) => { 7888 fetch(url, { 7889 credentials: "same-origin" 7890 }).then(response => { 7891 if (response.ok) { 7892 return response.arrayBuffer(); 7893 } 7894 return Promise.reject(new Error(response.status + " : " + response.url)); 7895 }).then(onload, onerror); 7896 }; 7897 } else {} 7898 var out = Module["print"] || console.log.bind(console); 7899 var err = Module["printErr"] || console.error.bind(console);
vendor: 4,133 bytes, lines 7900-7995
7900 Object.assign(Module, moduleOverrides); 7901 moduleOverrides = null; 7902 if (Module["arguments"]) arguments_ = Module["arguments"]; 7903 if (Module["thisProgram"]) thisProgram = Module["thisProgram"]; 7904 if (Module["quit"]) quit_ = Module["quit"]; 7905 var wasmBinary; 7906 if (Module["wasmBinary"]) wasmBinary = Module["wasmBinary"]; 7907 function intArrayFromBase64(s) { 7908 var decoded = atob(s); 7909 var bytes = new Uint8Array(decoded.length); 7910 for (var i = 0; i < decoded.length; ++i) { 7911 bytes[i] = decoded.charCodeAt(i); 7912 } 7913 return bytes; 7914 } 7915 function tryParseAsDataURI(filename) { 7916 if (!isDataURI(filename)) { 7917 return; 7918 } 7919 return intArrayFromBase64(filename.slice(dataURIPrefix.length)); 7920 } 7921 var wasmMemory; 7922 var ABORT = false; 7923 var HEAP8, HEAPU8, HEAP16, HEAPU16, HEAP32, HEAPU32, HEAPF32, HEAPF64; 7924 function updateMemoryViews() { 7925 var b = wasmMemory.buffer; 7926 Module["HEAP8"] = HEAP8 = new Int8Array(b); 7927 Module["HEAP16"] = HEAP16 = new Int16Array(b); 7928 Module["HEAPU8"] = HEAPU8 = new Uint8Array(b); 7929 Module["HEAPU16"] = HEAPU16 = new Uint16Array(b); 7930 Module["HEAP32"] = HEAP32 = new Int32Array(b); 7931 Module["HEAPU32"] = HEAPU32 = new Uint32Array(b); 7932 Module["HEAPF32"] = HEAPF32 = new Float32Array(b); 7933 Module["HEAPF64"] = HEAPF64 = new Float64Array(b); 7934 } 7935 var __ATPRERUN__ = []; 7936 var __ATINIT__ = []; 7937 var __ATPOSTRUN__ = []; 7938 var runtimeInitialized = false; 7939 function preRun() { 7940 if (Module["preRun"]) { 7941 if (typeof Module["preRun"] == "function") Module["preRun"] = [Module["preRun"]]; 7942 while (Module["preRun"].length) { 7943 addOnPreRun(Module["preRun"].shift()); 7944 } 7945 } 7946 callRuntimeCallbacks(__ATPRERUN__); 7947 } 7948 function initRuntime() { 7949 runtimeInitialized = true; 7950 callRuntimeCallbacks(__ATINIT__); 7951 } 7952 function postRun() { 7953 if (Module["postRun"]) { 7954 if (typeof Module["postRun"] == "function") Module["postRun"] = [Module["postRun"]]; 7955 while (Module["postRun"].length) { 7956 addOnPostRun(Module["postRun"].shift()); 7957 } 7958 } 7959 callRuntimeCallbacks(__ATPOSTRUN__); 7960 } 7961 function addOnPreRun(cb) { 7962 __ATPRERUN__.unshift(cb); 7963 } 7964 function addOnInit(cb) { 7965 __ATINIT__.unshift(cb); 7966 } 7967 function addOnPostRun(cb) { 7968 __ATPOSTRUN__.unshift(cb); 7969 } 7970 var runDependencies = 0; 7971 var runDependencyWatcher = null; 7972 var dependenciesFulfilled = null; 7973 function addRunDependency(id) { 7974 runDependencies++; 7975 Module["monitorRunDependencies"]?.(runDependencies); 7976 } 7977 function removeRunDependency(id) { 7978 runDependencies--; 7979 Module["monitorRunDependencies"]?.(runDependencies); 7980 if (runDependencies == 0) { 7981 if (runDependencyWatcher !== null) { 7982 clearInterval(runDependencyWatcher); 7983 runDependencyWatcher = null; 7984 } 7985 if (dependenciesFulfilled) { 7986 var callback = dependenciesFulfilled; 7987 dependenciesFulfilled = null; 7988 callback(); 7989 } 7990 } 7991 } 7992 var dataURIPrefix = "data:application/octet-stream;base64,"; 7993 var isDataURI = filename => filename.startsWith(dataURIPrefix); 7994 function findWasmBinary() { 7995 var f = "data:application/octet-stream;base64,AGFzbQEAAAABzgEaYAN/f38Bf2AEf39/fwF/YAF/AGACf38AYAF/AX9gA39/fwBgAn9/AX9gBH9/f38AYAN/fn8BfmAFf39/f38Bf2ACfn8Bf2ACfn8BfmAFf39/f38AYAN/fn8Bf2AAAX9gB39/f39/f38Bf2AJf39/f39/f39/AX9gC39/f39/f39/f39/AX9gBn9/f39/fwF/YAZ/fH9/f38Bf2AIf39/f39/f38AYAh/f39/f39/fwF/YAAAYAZ/f39/f38AYAd/f39/f39/AGACfH8BfAJbDwFhAWEAAgFhAWIAAQFhAWMABQFhAWQAAgFhAWUADAFhAWYABwFhAWcAAwFhAWgABwFhAWkABQFhAWoACQFhAWsABAFhAWwABgFhAW0ABgFhAW4ABAFhAW8AAwPAAb4BBwIFAAYEAAUGBAUBBAwFFAYCAgICAAYQEQQCChICBQIEBwQCDgICDQYCFQMHAAAEAwEWCQkDAAkGAQQEBQUODwEBAwADBgIQBBcYAgcGAwcHAQECAAQZBAYHBA8MAAQCAgIABgAGAQEBAQEBAQEAAAAAAAYDAgICAwMDAwMAAxMIBA4EAAgDAwkECAoLCAAAAQEBAQEBAQENAQAEBAUJDwESEQEAAAYDAwEFBQUFBQUFBQELAQEBAQEBAQEBCgQFAXABbm4FBwEBggKAgAIGCAF/AUGQ2QULBxsGAXACAAFxAEEBcgCYAQFzABABdAEAAXUAlwEJvQEBAEEBC21RzAHCAXNzNqcBnAGZAYsBigGJAYgBhwGGAYU
7995BhAFSgQGAAX9+fXx7enl4d3Z1ywHKAckByAHHAcYBQMUBxAFAQMMBwQHAAb8BvgG9AbwBuwG6AbkBswGoAaYBpQGkAaMBogGhAaABnwGeAZ0BmwGaAUlKTFJIgwFTOFCCAU9FRk4rJ6sBqgGsAbQBuAG1Aa8BqQGtAa4BtgG3AXCwAbEBsgFRlgGVAYwBjgGNAZIBkwGUAZABjwEKkZoOvgGCAgEDfyMAQZAEayIEJAACQ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BkcNAAsLIAUgAmtBfEsNAANAIANBAWsgAS0AADoAACADQQJrIAEtAAE6AAAgA0EDayABLQACOgAAIANBBGsiAyABLQADOgAAIAFBBGohASAEQQRqIgQgAkcNAAsLC4AEAQN/IAJBgARPBEAgACABIAIQAiAADwsgACACaiEDAkAgACABc0EDcUUEQAJAIABBA3FFBEAgACECDAELIAJFBEAgACECDAELIAAhAgNAIAIgAS0AADoAACABQQFqIQEgAkEBaiICQQNxRQ0BIAIgA0kNAAsLAkAgA0F8cSIEQcAASQ0AIAIgBEFAaiIFSw0AA0AgAiABKAIANgIAIAIgASgCBDYCBCACIAEoAgg2AgggAiABKAIMNgIMIAIgASgCEDYCECACIAEoAhQ2AhQgAiABKAIYNgIYIAIgASgCHDYCHCACIAEoAiA2AiAgAiABKAIkNgIkIAIgASgCKDYCKCACIAEoAiw2AiwgAiABKAIwNgIwIAIgASgCNDYCNCACIAEoAjg2AjggAiABKAI8NgI8IAFBQGshASACQUBrIgIgBU0NAAsLIAIgBE8NAQNAIAIgASgCADYCACABQQRqIQEgAkEEaiICIARJDQALDAELIANBBEkEQCAAIQIMAQsgACADQQRrIgRLBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAswAQF/AkAgAEUNACABRQ0AQQggACABbCIBECUiAARAIABBACABEBUaCyAAIQILIAILEQAgAEUEQEEADwtBCCAAECUL8gICAn8BfgJAIAJFDQAgACABOgAAIAAgAmoiA0EBayABOgAAIAJBA0kNACAAIAE6AAIgACABOgABIANBA2sgAToAACADQQJrIAE6AAAgAkEHSQ0AIAAgAToAAyADQQRrIAE6AAAgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBBGsgATYCACAEQQlJDQAgAyABNgIIIAMgAT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AIAEgB2pBAmpBAnVrNgIAIBUhBiAQIgEiByAPSARAA0AgFCABQQV0aiIHIAf9AAIAIDYgBkEFdGr9AAIAIAf9AAIQ/a4B/QwCAAAAAgAAAAIAAAACAAAA/a4BQQL9rAH9sQH9CwIAIAEiBkEBaiIBIA9HDQALIA8hBwsgByAbTg0AA0AgB0EDdCEBIAcgLEghBgJAIAdBAEwEQCA2KAIAIQogB0EATgRAIBQgAUECdCIBaiIyIDIoAgAgCiABIDZqIEUgBhsoAgBqQQJqQQJ1azYCACABICRqIgogCigCACAgKAIAIAEgIGogPCAGGygCAGpBAmpBAnVrNgIAIAEgKmoiCiAKKAIAIB8oAgAgASAfaiA6IAYbKAIAakECakECdWs2AgAgQygCACABIENqICYgBhsoAgBqQQJqIQYgASApaiEBDAILIBQgAUECdCIBaiIGIAYoAgAgCkEBdEECakECdWs2AgAgASAkaiIGIAYoAgAgFCgCFEEBdEECakECdWs2AgAgASAqaiIGIAYoAgAgFCgCGEEBdEECakECdWs2AgAgASApaiEBIBQoAhxBAXRBAmohBgwBCyAUIAcgLCAGG0EDdEEEa0ECdCIKaigCACEyIAZFBEAgFCABQQJ0IgFqIgYgBigCACAyIEUoAgBqQQJqQQJ1azYCACABICRqIgYgBigCACAKICRqKAIAIDwoAgBqQQJqQQJ1azYCACABICpqIgYgBigCACAKICpqKAIAIDooAgBqQQJqQQJ1azYCACABIClqIQEgCiApaigCACAmKAIAakECaiEGDAELIBQgAUECdCIBaiIGIAYoAgAgMiAGKAIQakECakECdWs2AgAgASAkaiIGIAYoAgAgCiAkaigCACAGKAIQakECakECdWs2AgAgASAqaiIGIAYoAgAgCiAqaigCACAGKAIQakECakECdWs2AgAgCiApaigCACABIClqIgEoAhBqQQJqIQYLIAEgASgCACAGQQJ1azYCACAHQQFqIgcgG0cNAAsLIA4gHE4NACAMIA4iASIHSgRAA0AgFCABQQV0aiIH
7995IAf9AAIgIAf9AAIA/a4BQQH9rAEgB/0AAhD9rgH9CwIQIAFBAWoiASAMRw0ACyAMIQcLIAcgHE4NAANAIEMgB0EDdCIBQQJ0aiIyAn8gB0EASARAIBQoAgAhBiAHQX9HBEAgNiABQQJ0IgFqIgogCigCACAGajYCACABICBqIgYgBigCACAkKAIAajYCACABIB9qIgEgASgCACAqKAIAajYCACApKAIADAILIDYgAUECdCIBaiIKIAooAgAgVygCACAGakEBdWo2AgAgASAgaiIGIAYoAgAgVigCACAkKAIAakEBdWo2AgAgASAfaiIBIAEoAgAgVSgCACAqKAIAakEBdWo2AgAgVCgCACApKAIAakEBdQwBCyABID4gByASSBshBiASIAdBAWoiZkwEQCA2IAFBAnQiCmoiASABKAIAIGsoAgAgFCAGQQJ0aiIBKAIAakEBdWo2AgAgCiAgaiIGIAYoAgAgaigCACABKAIEakEBdWo2AgAgCiAfaiIGIAYoAgAgaSgCACABKAIIakEBdWo2AgAgaCgCACABKAIMakEBdQwBCyA2IAFBAnQiCmoiASABKAIAIBQgZkEFdGoiASgCACAUIAZBAnRqIgYoAgBqQQF1ajYCACAKICBqImYgZigCACABKAIEIAYoAgRqQQF1ajYCACAKIB9qIgogCigCACABKAIIIAYoAghqQQF1ajYCACABKAIMIAYoAgxqQQF1CyAyKAIAajYCACAHQQFqIgcgHEcNAAsLIDkgFiBdIBggSCBeQQFBBEEAECYNAAsLDAILIBQQEEEBIQcLIDkgNUEQaygCACIBIF8oAgAiBmsgNUEMaygCACBgKAIAIgprIDVBCGsoAgAiCCAGayA1QQRrKAIAIAprIAkoAjRBASAIIAFrEB4gORAjDAMLIDkQIyAUEBBBACEHDAILIDkQI0EAIQcMAQtBACEHIA4QICAPEBALICVBIGokACAHDQEMBQsgASEIQQAhDv0MAAAAAAAAAAAAAAAAAAAAACGAASMAQUBqIhwkAAJAAn8CQCAZKAJABEAgCSgCHCIVIAkoAhhBmAFsaiIBQZgBaygCACEaIAFBkAFrKAIAIRsgFSgCBCEMIBUoAgwheiAVKAIAIRAgFSgCCCETQQEhByAZKAIsIh8oAgQhKyAIQQFGDQNBACE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IAEQECAAQQA2AnQLIAAoAogBEBAgAEEANgJ4IABBADYCiAEgACgCZBAQIABBADYCZCAALQC8AUECcUUEQCAAKAKoARAQCyAAQdAAakEAQfAAEBUaIAAoAsABEDIgAEEANgLAASAAKALEARAyIABBADYCwAEgACgCyAEiAQRAIAEoAhwiAgRAIAIQECABQQA2AhwLIAEoAigiAgRAIAEoAiQEQANAIAIgBUEobCIDaigCJCIEBEAgBBAQIAEoAigiAiADakEANgIkCyACIANqKAIQIgQEQCAEEBAgASgCKCICIANqQQA2AhALIAIgA2ooAhgiBARAIAQQECABKAIoIgIgA2pBADYCGAsgBUEBaiIFIAEoAiRJDQALCyACEBAgAUEANgIoCyABEBALIABBADYCyAEgACgCSBAhIABBADYCSCAAKAJMECEgAEEANgJMIAAoAtQBIgMEQAJAIAMoAghFDQAgAygCDARAIANBADYCKANAIAMoAhhBAEoNAAsLIANBATYCECADKAIAEBAgAygCHCICRQ0AA0AgAigCBCEBIAIQECADIAE2AhwgASICDQALCyADKAIkIgIEQCACKAIEIgVBAEoEQEEAIQEDQCACKAIAIAFBDGxqIgQoAggiBgRAIAQoAgQgBhECACACKAIEIQULIAFBAWoiASAFSA0ACwsgAigCABAQIAIQEAsgAxAQCyAAQQA2AtQBIAAQEAsL5gMCCH8EfiAAKAIUKAIAKAIUIAFBzABsaiIJKAIMIgggACgCGCgCGCABQTRsaiIKNQIEIhBCAX0iEiAANQI8fCAQgKciCyAIIAtJGyEMIAkoAggiCCAKNQIAIhFCAX0iEyAANQI4fCARgKciCiAIIApJGyEKIAkoAgQiCCASIAA1AjR8IBCApyILIAggC0sbIQsgCSgCACIIIBMgADUCMHwgEYCnIg0gCCANSxshDUEAIQggACgCICgC0CsgAUG4CGxqKAIUIQ4CQCAJKAIUQQAgAmtBfyACG2oiAkUEQCAKIQAgDSEIIAshAQwBCyADQQFxIAJBAWsiD3QiCSANSQRAIA0gCWutQn8gAq0iEIZCf4V8IBCIpyEIC0EAIQBBACEBIANBAXYgD3QiAyAL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FIAEgBCAPGyIEIQEgB0ECaiIHIApHDQALCyAJQQFxDQEgBCEBDAILA0AgBCEFIAIhBANAAkAgACABNgIAIARBAUYEQCAAQRBqIQAgAUEQaiEBDAELIAAgATYCECABQRBqIQEgAEEgaiEAIARBAkohECAEQQJrIQQgEA0BCwsgASAFIAJBBHRqIAcgByAMRnJBAXEiChshBCABIAUgChshASAHQQFqIgcgCUcNAAsMAQsgASAEIAJBBHRqIAUgBSAMRnJBAXEiBRshESABIAQgBRshASARIQQLIA5BAWoiDiANRw0ACwsgAEEANgIAAkAgC0UNACALQQRPBEAgC0F8cSEAQQAhAQNAIANBADYCPCADQucHNwI0IANBADYCLCADQucHNwIkIANBADYCHCADQucHNwIUIANBADYCDCADQucHNwIEIANBQGshAyABQQRqIgEgAEcNAAsLIAtBA3EiAEUNAEEAIQEDQCADQQA2AgwgA0LnBzcCBCADQRBqIQMgAUEBaiIBIABHDQALCyAGCyESIAhBgAJqJAAgEgtTAQF/An8gAC0ADEH/AUYEQCAAQoD+g4DwADcCDEEAIAAoAggiASAAKAIETw0BGiAAIAFBAWo2AgggACABLQAAQYD+A3I2AgwLIABBADYCEEEBCwt+AgF/AX4gAL0iA0I0iKdB/w9xIgJB/w9HBHwgAkUEQCABIABEAAAAAAAAAABhBH9BAAUgAEQAAAAAAADwQ6IgARBlIQAgASgCAEFAags2AgAgAA8LIAEgAkH+B2s2AgAgA0L/////////h4B/g0KAgICAgICA8D+EvwUgAAsLSQEBfwJAQQFBLBATIgEEQCABQQA2AhACQCAAQQBMBEAgAUEBQQgQEyIANgIkIABFDQEMAwsgAUEANgIMCyABEBALQQAhAQsgAQuRAgAgAEUEQEEADwsCfwJAIAFB/wBNDQACQEGU0AEoAgAoAgBFBEAgAUGAf3FBgL8DRg0CDAELIAFB/w9NBEAgACABQT9xQYABcjoAASAAIAFBBnZBwAFyOgAAQQIMAwsgAUGAQHFBgMADRyABQYCwA09xRQRAIAAgAUE/cUGAAXI6AAIgACABQQx2QeABcjoAACAAIAFBBnZBP3FBgAFyOgABQQMMAwsgAUGAgARrQf//P00EQCAAIAFBP3FBgAFyOgADIAAgAUESdkHwAXI6AAAgACABQQZ2QT9xQYABcjoAAiAAIAFBDHZBP3FBgAFyOgABQQQMAwsLQZTHAUEZNgIAQX8MAQsgACABOgAAQQELC7wCAAJAAkACQAJAAkACQAJAAkACQAJAAkAgAUEJaw4SAAgJCggJAQIDBAoJCgoICQUGBwsgAiACKAIAIgFBBGo2AgAgACABKAIANgIADwsgAiACKAIAIgFBBGo2AgAgACABMgEANwMADwsgAiACKAIAIgFBBGo2AgAgACABMwEANwMADwsgAiACKAIAIgFBBGo2AgAgACABMAAANwMADwsgAiACKAIAIgFBBGo2AgAgACABMQAANwMADwsgAiACKAIAQQdqQXhxIgFBCGo2AgAgACABKwMAOQMADwsgACACIAMRAwALDwsgAiACKAIAIgFBBGo2AgAgACABNAIANwMADwsgAiACKAIAIgFBBGo2AgAgACABNQIANwMADwsgAiACKAIAQQdqQXhxIgFBCGo2AgAgACABKQMANwMAC3MBBn8gACgCACIDLAAAQTBrIgFBCUsEQEEADwsDQEF/IQQgAkHMmbPmAE0EQEF/IAEgAkEKbCIFaiABIAVB/////wdzSxshBAsgACADQQFqIgU2AgAgAywAASEGIAQhAiAFIQMgBkEwayIBQQpJDQALIAILtBQCFX8BfiMAQUBqIggkACAIIAE2AjwgCEEnaiEWIAhBKGohEQJAAkACQAJAA0BBACEHA0AgASENIAcgDkH/////B3NKDQIgByAOaiEOAkACQAJAAkAgASIHLQAAIgsEQANAAkACQCALQf8BcSIBRQRAIAchAQwBCyABQSVHDQEgByELA0AgCy0AAUElRwRAIAshAQwCCyAHQQFqIQcgCy0AAiEZIAtBAmoiASELIBlBJUYNAAsLIAcgDWsiByAOQf////8HcyIXSg0JIAAEQCAAIA0gBxAZCyAHDQcgCCABNgI8IAFBAWohB0F/IRACQCABLAABQTBrIglBCUsNACABLQACQSRHDQAgAUEDaiEHQQEhEiAJIRALIAggBzYCPEEAIQwC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whAgtCACACIAJC/////////wdWIgAbIQIgAK0gBXwMAQsCQCADIASEUA0AIAVC//8BUg0AIARCBIYgA0I8iIRCgICAgICAgASEIQJC/w8MAQtC/w8gCkH+hwFLDQAaQgBBgPgAQYH4ACAFUCIBGyIAIAprIglB8ABKDQAaIAMhAiAEIARCgICAgICAwACEIAEbIgYhBAJAQYABIAlrIgFBwABxBEAgAyABQUBqrYYhBEIAIQIMAQsgAUUNACAEIAGtIgWGIAJBwAAgAWutiIQhBCACIAWGIQILIAggAjcDECAIIAQ3AxgCQCAJQcAAcQRAIAYgCUFAaq2IIQNCACEGDAELIAlFDQAgBkHAACAJa62GIAMgCa0iAoiEIQMgBiACiCEGCyAIIAM3AwAgCCAGNwMIIAgpAwhCBIYgCCkDACICQjyIhCEDAkAgACAKRyAIKQMQIAgpAxiEQgBSca0gAkL//////////w+DhCICQoGAgICAgICACFoEQCADQgF8IQMMAQsgAkKAgICAgICAgAhSDQAgA0IBgyADfCEDCyADQoCAgICAgIAIhSADIANC/////////wdWIgAbIQIgAK0LIQMgCEEgaiQAIAsgB0KAgICAgICAgIB/gyADQjSGhCAChL85AwALhhgDE38BfAN+IwBBsARrIgwkACAMQQA2AiwCQCABvSIaQgBTBEBBASERQboIIRMgAZoiAb0hGgwBCyAEQYAQcQRAQQEhEUG9CCETDAELQcAIQbsIIARBAXEiERshEyARRSEVCwJAIBpCgICAgICAgPj/AINCgICAgICAgPj/AFEEQCAAQSAgAiARQQNqIgMgBEH//3txEBwgACATIBEQGSAAQZIJQfYKIAVBIHEiBRtB+wlB+gogBRsgASABYhtBAxAZIABBICACIAMgBEGAwABzEBwgAyACIAIgA0gbIQoMAQsgDEEQaiESAkACfwJAIAEgDEEsahBlIgEgAaAiAUQAAAAAAAAAAGIEQCAMIAwoAiwiBkEBazYCLCAFQSByIg5B4QBHDQEMAwsgBUEgciIOQeEARg0CIAwoAiwhCUEGIAMgA0EASBsMAQsgDCAGQR1rIgk2AiwgAUQAAAAAAACwQaIhAUE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QRBqEA8MBwsgBSAITQRAIAYhBAwECyAFIQggBiAFEBciBA0DIAYQECACQQFB/w9BABAPQQAMBwsgBEECcUUEQCACQQFBwg9BABAPIAYQEEEADAcLIAAgBEH/////B3I2AmQgASAHIAVrrSINIAIgASgCKBEIACANUQ0DIAAtAGRBCHFFDQEgAkECQZIcQQAQDwsgBhAQQQEMBQsgAkEBQZIcQQAQDyAGEBBBAAwECyABIAQgBSACEBogBUcEQCACQQFBxBxBABAPIAQQEEEADAQLIAAgBCIGIAUgAiAKKAIEEQEADQALIAQQEEEADAILIAJBAUGiJUEAEA9BAAwBCyAGEBBBAAshDCADQfAAaiQAIAwL5gEBBn8gACgCCEE1IAIQJARAAkAgACgCCCIGKAIAIQMgBigCCCEFAkACQAJ/AkAgAwRAQQEhBCADQQFxIQcgA0EBRw0BQQAMAgsgBkEANgIADAILIANBfnEhAwNAAn9BACAERQ0AGkEAIAAgASACIAUoAgARAABFDQAaIAAgASACIAUoAgQRAABBAEcLIQQgBUEIaiEFIAhBAmoiCCADRw0ACyAERQshAyAHBEAgAw0CIAAgASACIAUoAgARAABBAEchBAsgBkEANgIAIARFDQILIAAoAgAaQQEPCyAGQQA2AgALC0EACwoAIAAoAgAaQQALFAAgACgCACIABEAgACABNgK4AQsLIQAgACgCACABEFMgAEEAOgB8IAAgASgCuEBBAXE2AoABCzIAIAJFBEBBAA8LIAAoAgAgASACIAMQSEUEQCADQQFBqS9BABAPQQAPCyAAIAIgAxBxC2kCAn8BfCMAQRBrIgMkACACBEADQCAAIANBCGoQRCABAn8gAysDCCIFmUQAAAAAAADgQWMEQCAFqgwBC0GAgICAeAs2AgAgAUEEaiEBIABBCGohACAEQQFqIgQgAkcNAAsLIANBEGokAAuEAQICfwF9IwBBEGsiAyQAIAIEQANAIAMgAC0AADoADyADIAAtAAE6AA4gAyAALQACOgANIAMgAC0AAzoADCABAn8gAyoCDCIFi0MAAABPXQRAIAWoDAELQYCAgIB4CzYCACABQQRqIQEgAEEEaiEAIARBAWoiBCACRw0ACwsgA0EQaiQAC0sBAn8jAEEQayIDJAAgAgRAA0AgACADQQxqQQQQESABIAMoAgw2AgAgAUEEaiEBIABBBGohACAEQQFqIgQgAkcNAAsLIANBEGokAAtLAQJ/IwBBEGsiAyQAIAIEQANAIAAgA0EMakECEBEgASADKAIMNgIAIAFBBGohASAAQQJqIQAgBEEBaiIEIAJHDQALCyADQRBqJAALSgECfyMAQRBrIgMkACACBEADQCAAIANBCGoQRCABIAMrAwi2OAIAIAFBBGohASAAQQhqIQAgBEEBaiIEIAJHDQALCyADQRBqJAALaAECfyMAQRBrIgMkACACBEADQCADIAAtAAA6AA8gAyAALQABOgAOIAMgAC0AAjoADSADIAAtAAM6AAwgASADKgIMOAIAIAFBBGohASAAQQRqIQAgBEEBaiIEIAJHDQALCyADQRBqJAALTAECfyMAQRBrIgMkACACBEADQCAAIANBDGpBBBARIAEgAygCDLM4AgAgAUEEaiEBIABBBGohACAEQQFqIgQgAkcNAAsLIANBEGokAAtMAQJ/IwBBEGsiAyQAIAIEQANAIAAgA0EMakECEBEgASADKAIMszgCACABQQRqIQEgAEECaiEAIARBAWoiBCACRw0ACwsgA0EQaiQAC6oIAg1/AXsjAEEQayIIJAACfyAAKAIIQRBGBEAgACgCnAEgACgCzAFBjCxsagwBCyAAKAIMCyEJAkAgAkUEQCADQQFB8B9BABAPDAELIAAoAkghBkEBIQQgASAIQQhqQQEQESAIKAIIIgVBAk8EQCADQQJBxsgAQQAQDwwBCyACIAVBAWpHBEBBACEEIANBAkHwH0EAEA8MAQsCQCAGKAIQIgNFDQAgCSgC0CshBCADQQhPBEAgA0F4cSEGQQAhAgNAIARBADYCvEMgBEEANgKEOyAEQQA2AswyIARBADYClCogBEEANgLcISAEQQA2AqQZIARBADYC7BAgBEEANgK0CCAEQcDDAGohBCACQQhqIgIgBkcNAAsLIANBB3EiA0UNAEEAIQIDQCAEQQA2ArQIIARBuAhqIQQgAkEBaiICIANHDQALCyAJKALoKyICBH8gAhAQIAlBAD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AAAFD/AAAEAAAAKQAAAFn/AAAEAAAAKgAAAHX/AAAUAAAAKwAAAHf/AAAUAAAALAAAAAAAAAAUAEGAwAELNS0AAAAuAAAALwAAADAAAAAxAAAAMgAAADMAAAA0AAAAICBQajYAAABweXRmNwAAAGgycGo4AEHAwAELMnJkaGk5AAAAcmxvYzoAAABjY3BiOwAAAHJsY3A8AAAAcGFtYz0AAABmZWRjPgAAAPhiAEGAwQELQRkACwAZGRkAAAAABQAAAAAAAAkAAAAACwAAAAAAAAAAGQAKChkZGQMKBwABAAkLGAAACQYLAAALAAYZAAAAGRkZAEHRwQELIQ4AAAAAAAAAABkACw0ZGRkADQAAAgAJDgAAAAkADgAADgBBi8IBCwEMAEGXwgELFRMAAAAAEwAAAAAJDAAAAAAADAAADABBxcIBCwEQAEHRwgELFQ8AAAAEDwAAAAAJEAAAAAAAEAAAEABB/8IBCwESAEGLwwELHhEAAAAAEQAAAAAJEgAAAAAAEgAAEgAAGgAAABoaGgBBwsMBCw4aAAAAGhoaAAAAAAAACQBB88MBCwEUAEH/wwELFRcAAAAAFwAAAAAJFAAAAAAAFAAAFABBrcQBCwEWAEG5xAELJxUAAAAAFQAAAAAJFgAAAAAAFgAAFgAAMDEyMzQ1Njc4OUFCQ0RFRgBB4MQBCwmQbAEAAAAAAAUAQfTEAQsBaQBBjMUBCwpqAAAAawAAAHhoAEGkxQELAQIAQbTFAQsI//////////8AQfjFAQsBBQBBhMYBCwFsAEGcxgELDmoAAABtAAAAiGgAAAAEAEG0xgELAQEAQcTGAQsF/////wo="; 7996 return f; 7997 } 7998 var wasmBinaryFile; 7999 function getBinarySync(file) { 8000 if (file == wasmBinaryFile && wasmBinary) { 8001 return new Uint8Array(wasmBinary); 8002 } 8003 var binary = tryParseAsDataURI(file); 8004 if (binary) { 8005 return binary; 8006 } 8007 if (readBinary) { 8008 return readBinary(file); 8009 } 8010 throw 'sync fetching of the wasm failed: you can preload it to Module["wasmBinary"] manually, or emcc.py will do that for you when generating HTML (but not JS)'; 8011 } 8012 function instantiateSync(file, info) { 8013 var module; 8014 var binary = getBinarySync(file); 8015 module = new WebAssembly.Module(binary); 8016 var instance = new WebAssembly.Instance(module, info); 8017 return [instance, module]; 8018 } 8019 function getWasmImports() { 8020 return { 8021 a: wasmImports 8022 }; 8023 } 8024 function createWasm() { 8025 var info = getWasmImports(); 8026 function receiveInstance(instance, module) { 8027 wasmExports = instance.exports; 8028 wasmMemory = wasmExports["p"]; 8029 updateMemoryViews(); 8030 addOnInit(wasmExports["q"]); 8031 removeRunDependency("wasm-instantiate"); 8032 return wasmExports; 8033 } 8034 addRunDependency("wasm-instantiate"); 8035 if (Module["instantiateWasm"]) { 8036 try { 8037 return Module["instantiateWasm"](info, receiveInstance); 8038 } catch (e) { 8039 err(`Module.instantiateWasm callback failed with error: ${e}`); 8040 readyPromiseReject(e); 8041 } 8042 } 8043 if (!wasmBinaryFile) wasmBinaryFile = findWasmBinary(); 8044 var result = instantiateSync(wasmBinaryFile, info); 8045 return receiveInstance(result[0]); 8046 } 8047 var callRuntimeCallbacks = callbacks => { 8048 while (callbacks.length > 0) { 8049 callbacks.shift()(Module); 8050 } 8051 }; 8052 var noExitRuntime = Module["noExitRuntime"] || true; 8053 var __emscripten_memcpy_js = (dest, src, num) => HEAPU8.copyWithin(dest, src, src + num); 8054 function _copy_pixels_1(compG_ptr, nb_pixels) { 8055 compG_ptr >>= 2; 8056 const imageData = Module.imageData = new Uint8ClampedArray(nb_pixels); 8057 const compG = Module.HEAP32.subarray(compG_ptr, compG_ptr + nb_pixels); 8058 imageData.set(compG); 8059 } 8060 function _copy_pixels_3(compR_ptr, compG_ptr, compB_ptr, nb_pixels) { 8061 compR_ptr >>= 2; 8062 compG_ptr >>= 2; 8063 compB_ptr >>= 2; 8064 const imageData = Module.imageData = new Uint8ClampedArray(nb_pixels * 3); 8065 const compR = Module.HEAP32.subarray(compR_ptr, compR_ptr + nb_pixels); 8066 const compG = Module.HEAP32.subarray(compG_ptr, compG_ptr + nb_pixels); 8067 const compB = Module.HEAP32.subarray(compB_ptr, compB_ptr + nb_pixels); 8068 for (let i = 0; i < nb_pixels; i++) { 8069 imageData[3 * i] = compR[i]; 8070 imageData[3 * i + 1] = compG[i]; 8071 imageData[3 * i + 2] = compB[i]; 8072 } 8073 } 8074 function _copy_pixels_4(compR_ptr, compG_ptr, compB_ptr, compA_ptr, nb_pixels) { 8075 compR_ptr >>= 2; 8076 compG_ptr >>= 2; 8077 compB_ptr >>= 2; 8078 compA_ptr >>= 2; 8079 const imageData = Module.imageData = new Uint8ClampedArray(nb_pixels * 4); 8080 const compR = Module.HEAP32.subarray(compR_ptr, compR_ptr + nb_pixels); 8081 const compG = Module.HEAP32.subarray(compG_ptr, compG_ptr + nb_pixels); 8082 const compB = Module.HEAP32.subarray(compB_ptr, compB_ptr + nb_pixels); 8083 const compA = Module.HEAP32.subarray(compA_ptr, compA_ptr + nb_pixels); 8084 for (let i = 0; i < nb_pixels; i++) { 8085 imageData[4 * i] = compR[i]; 8086 imageData[4 * i + 1] = compG[i]; 8087 imageData[4 * i + 2] = compB[i]; 8088 imageData[4 * i + 3] = compA[i]; 8089 } 8090 } 8091 var getHeapMax = () => 2147483648; 8092 var growMemory = size => { 8093 var b = wasmMemory.buffer; 8094 var pages = (size - b.byteLength + 65535) / 65536;
vendor: 1,942 bytes, lines 8095-8152
8095 try { 8096 wasmMemory.grow(pages); 8097 updateMemoryViews(); 8098 return 1; 8099 } catch (e) {} 8100 }; 8101 var _emscripten_resize_heap = requestedSize => { 8102 var oldSize = HEAPU8.length; 8103 requestedSize >>>= 0; 8104 var maxHeapSize = getHeapMax(); 8105 if (requestedSize > maxHeapSize) { 8106 return false; 8107 } 8108 var alignUp = (x, multiple) => x + (multiple - x % multiple) % multiple; 8109 for (var cutDown = 1; cutDown <= 4; cutDown *= 2) { 8110 var overGrownHeapSize = oldSize * (1 + .2 / cutDown); 8111 overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296); 8112 var newSize = Math.min(maxHeapSize, alignUp(Math.max(requestedSize, overGrownHeapSize), 65536)); 8113 var replacement = growMemory(newSize); 8114 if (replacement) { 8115 return true; 8116 } 8117 } 8118 return false; 8119 }; 8120 var ENV = {}; 8121 var getExecutableName = () => thisProgram || "./this.program"; 8122 var getEnvStrings = () => { 8123 if (!getEnvStrings.strings) { 8124 var lang = (typeof navigator == "object" && navigator.languages && navigator.languages[0] || "C").replace("-", "_") + ".UTF-8"; 8125 var env = { 8126 USER: "web_user", 8127 LOGNAME: "web_user", 8128 PATH: "/", 8129 PWD: "/", 8130 HOME: "/home/web_user", 8131 LANG: lang, 8132 _: getExecutableName() 8133 }; 8134 for (var x in ENV) { 8135 if (ENV[x] === undefined) delete env[x];else env[x] = ENV[x]; 8136 } 8137 var strings = []; 8138 for (var x in env) { 8139 strings.push(`${x}=${env[x]}`); 8140 } 8141 getEnvStrings.strings = strings; 8142 } 8143 return getEnvStrings.strings; 8144 }; 8145 var stringToAscii = (str, buffer) => { 8146 for (var i = 0; i < str.length; ++i) { 8147 HEAP8[buffer++] = str.charCodeAt(i); 8148 } 8149 HEAP8[buffer] = 0; 8150 }; 8151 var _environ_get = (__environ, environ_buf) => { 8152 var bufSize = 0;
8153 getEnvStrings().forEach((string, i) => { 8154 var ptr = environ_buf + bufSize; 8155 HEAPU32[__environ + i * 4 >> 2] = ptr; 8156 stringToAscii(string, ptr); 8157 bufSize += string.length + 1; 8158 }); 8159 return 0; 8160 }; 8161 var _environ_sizes_get = (penviron_count, penviron_buf_size) => { 8162 var strings = getEnvStrings(); 8163 HEAPU32[penviron_count >> 2] = strings.length; 8164 var bufSize = 0; 8165 strings.forEach(string => bufSize += string.length + 1); 8166 HEAPU32[penviron_buf_size >> 2] = bufSize; 8167 return 0; 8168 }; 8169 var _fd_close = fd => 52; 8170 var convertI32PairToI53Checked = (lo, hi) => hi + 2097152 >>> 0 < 4194305 - !!lo ? (lo >>> 0) + hi * 4294967296 : NaN; 8171 function _fd_seek(fd, offset_low, offset_high, whence, newOffset) { 8172 var offset = convertI32PairToI53Checked(offset_low, offset_high); 8173 return 70; 8174 } 8175 var printCharBuffers = [null, [], []]; 8176 var UTF8Decoder = typeof TextDecoder != "undefined" ? new TextDecoder("utf8") : undefined; 8177 var UTF8ArrayToString = (heapOrArray, idx, maxBytesToRead) => { 8178 var endIdx = idx + maxBytesToRead; 8179 var endPtr = idx; 8180 while (heapOrArray[endPtr] && !(endPtr >= endIdx)) ++endPtr; 8181 if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) { 8182 return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr)); 8183 } 8184 var str = ""; 8185 while (idx < endPtr) { 8186 var u0 = heapOrArray[idx++]; 8187 if (!(u0 & 128)) { 8188 str += String.fromCharCode(u0); 8189 continue; 8190 } 8191 var u1 = heapOrArray[idx++] & 63; 8192 if ((u0 & 224) == 192) { 8193 str += String.fromCharCode((u0 & 31) << 6 | u1); 8194 continue; 8195 } 8196 var u2 = heapOrArray[idx++] & 63; 8197 if ((u0 & 240) == 224) { 8198 u0 = (u0 & 15) << 12 | u1 << 6 | u2; 8199 } else { 8200 u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63; 8201 } 8202 if (u0 < 65536) { 8203 str += String.fromCharCode(u0); 8204 } else { 8205 var ch = u0 - 65536; 8206 str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023); 8207 } 8208 } 8209 return str; 8210 }; 8211 var printChar = (stream, curr) => { 8212 var buffer = printCharBuffers[stream]; 8213 if (curr === 0 || curr === 10) { 8214 (stream === 1 ? out : err)(UTF8ArrayToString(buffer, 0)); 8215 buffer.length = 0; 8216 } else { 8217 buffer.push(curr); 8218 } 8219 }; 8220 var UTF8ToString = (ptr, maxBytesToRead) => ptr ? UTF8ArrayToString(HEAPU8, ptr, maxBytesToRead) : ""; 8221 var _fd_write = (fd, iov, iovcnt, pnum) => { 8222 var num = 0; 8223 for (var i = 0; i < iovcnt; i++) { 8224 var ptr = HEAPU32[iov >> 2]; 8225 var len = HEAPU32[iov + 4 >> 2]; 8226 iov += 8; 8227 for (var j = 0; j < len; j++) { 8228 printChar(fd, HEAPU8[ptr + j]); 8229 } 8230 num += len; 8231 } 8232 HEAPU32[pnum >> 2] = num; 8233 return 0; 8234 }; 8235 function _gray_to_rgba(compG_ptr, nb_pixels) { 8236 compG_ptr >>= 2; 8237 const imageData = Module.imageData = new Uint8ClampedArray(nb_pixels * 4); 8238 const compG = Module.HEAP32.subarray(compG_ptr, compG_ptr + nb_pixels); 8239 for (let i = 0; i < nb_pixels; i++) { 8240 imageData[4 * i] = imageData[4 * i + 1] = imageData[4 * i + 2] = compG[i]; 8241 imageData[4 * i + 3] = 255; 8242 } 8243 } 8244 function _graya_to_rgba(compG_ptr, compA_ptr, nb_pixels) { 8245 compG_ptr >>= 2; 8246 compA_ptr >>= 2; 8247 const imageData = Module.imageData = new Uint8ClampedArray(nb_pixels * 4); 8248 const compG = Module.HEAP32.subarray(compG_ptr, compG_ptr + nb_pixels); 8249 const compA = Module.HEAP32.subarray(compA_ptr, compA_ptr + nb_pixels); 8250 for (let i = 0; i < nb_pixels; i++) { 8251 imageData[4 * i] = imageData[4 * i + 1] = imageData[4 * i + 2] = compG[i]; 8252 imageData[4 * i + 3] = compA[i]; 8253 } 8254 } 8255 function _jsPrintWarning(message_ptr) { 8256 const message = UTF8ToString(message_ptr); 8257 (Module.warn || console.warn)(`OpenJPEG: ${message}`); 8258 } 8259 function _rgb_to_rgba(compR_ptr, compG_ptr, compB_ptr, nb_pixels) { 8260 compR_ptr >>= 2; 8261 compG_ptr >>= 2; 8262 compB_ptr >>= 2; 8263 const imageData = Module.imageData = new Uint8ClampedArray(nb_pixels * 4); 8264 const compR = Module.HEAP32.subarray(compR_ptr, compR_ptr + nb_pixels); 8265 const compG = Module.HEAP32.subarray(compG_ptr, compG_ptr + nb_pixels); 8266 const compB = Module.HEAP32.subarray(compB_ptr, compB_ptr + nb_pixels); 8267 for (let i = 0; i < nb_pixels; i++) { 8268 imageData[4 * i] = compR[i]; 8269 imageData[4 * i + 1] = compG[i]; 8270 imageData[4 * i + 2] = compB[i]; 8271 imageData[4 * i + 3] = 255; 8272 } 8273 } 8274 function _storeErrorMessage(message_ptr) { 8275 const message = UTF8ToString(message_ptr); 8276 if (!Module.errorMessages) { 8277 Module.errorMessages = message; 8278 } else { 8279 Module.errorMessages += "\n" + message; 8280 } 8281 } 8282 var wasmImports = { 8283 c: __emscripten_memcpy_js, 8284 g: _copy_pixels_1, 8285 f: _copy_pixels_3, 8286 e: _copy_pixels_4, 8287 k: _emscripten_resize_heap, 8288 l: _environ_get, 8289 m: _environ_sizes_get, 8290 n: _fd_close, 8291 j: _fd_seek, 8292 b: _fd_write, 8293 o: _gray_to_rgba, 8294 i: _graya_to_rgba, 8295 d: _jsPrintWarning, 8296 h: _rgb_to_rgba, 8297 a: _storeErrorMessage 8298 }; 8299 var wasmExports = createWasm(); 8300 var ___wasm_call_ctors = wasmExports["q"]; 8301 var _malloc = Module["_malloc"] = wasmExports["r"]; 8302 var _free = Module["_free"] = wasmExports["s"]; 8303 var _jp2_decode = Module["_jp2_decode"] = wasmExports["u"]; 8304 var calledRun; 8305 dependenciesFulfilled = function runCaller() { 8306 if (!calledRun) run();
8307 if (!calledRun) dependenciesFulfilled = runCaller; 8308 }; 8309 function run() { 8310 if (runDependencies > 0) { 8311 return; 8312 } 8313 preRun(); 8314 if (runDependencies > 0) { 8315 return; 8316 } 8317 function doRun() { 8318 if (calledRun) return; 8319 calledRun = true; 8320 Module["calledRun"] = true; 8321 if (ABORT) return; 8322 initRuntime(); 8323 readyPromiseResolve(Module); 8324 if (Module["onRuntimeInitialized"]) Module["onRuntimeInitialized"](); 8325 postRun(); 8326 } 8327 if (Module["setStatus"]) { 8328 Module["setStatus"]("Running..."); 8329 setTimeout(function () { 8330 setTimeout(function () { 8331 Module["setStatus"](""); 8332 }, 1); 8333 doRun(); 8334 }, 1); 8335 } else { 8336 doRun(); 8337 } 8338 } 8339 if (Module["preInit"]) { 8340 if (typeof Module["preInit"] == "function") Module["preInit"] = [Module["preInit"]]; 8341 while (Module["preInit"].length > 0) { 8342 Module["preInit"].pop()(); 8343 } 8344 } 8345 run(); 8346 moduleRtn = Module; 8347 return moduleRtn; 8348 }; 8349})(); 8350/* harmony default export */ const openjpeg = (OpenJPEG); 8351;// ./src/core/jpx.js 8352 8353 8354 8355class JpxError extends BaseException { 8356 constructor(msg) { 8357 super(msg, "JpxError"); 8358 } 8359} 8360class JpxImage { 8361 static #module = null; 8362 static decode(data, decoderOptions) { 8363 decoderOptions ||= {}; 8364 this.#module ||= openjpeg({ 8365 warn: warn 8366 }); 8367 const imageData = this.#module.decode(data, decoderOptions); 8368 if (typeof imageData === "string") { 8369 throw new JpxError(imageData); 8370 } 8371 return imageData; 8372 } 8373 static cleanup() { 8374 this.#module = null; 8375 } 8376 static parseImageProperties(stream) { 8377 let newByte = stream.getByte(); 8378 while (newByte >= 0) { 8379 const oldByte = newByte; 8380 newByte = stream.getByte(); 8381 const code = oldByte << 8 | newByte; 8382 if (code === 0xff51) { 8383 stream.skip(4); 8384 const Xsiz = stream.getInt32() >>> 0; 8385 const Ysiz = stream.getInt32() >>> 0; 8386 const XOsiz = stream.getInt32() >>> 0; 8387 const YOsiz = stream.getInt32() >>> 0; 8388 stream.skip(16); 8389 const Csiz = stream.getUint16(); 8390 return { 8391 width: Xsiz - XOsiz, 8392 height: Ysiz - YOsiz, 8393 bitsPerComponent: 8, 8394 componentsCount: Csiz 8395 }; 8396 } 8397 } 8398 throw new JpxError("No size marker found in JPX stream"); 8399 } 8400} 8401 8402;// ./src/core/jpx_stream.js 8403 8404 8405 8406class JpxStream extends DecodeStream { 8407 constructor(stream, maybeLength, params) { 8408 super(maybeLength); 8409 this.stream = stream; 8410 this.dict = stream.dict; 8411 this.maybeLength = maybeLength; 8412 this.params = params; 8413 } 8414 get bytes() { 8415 return shadow(this, "bytes", this.stream.getBytes(this.maybeLength)); 8416 } 8417 ensureBuffer(requested) {} 8418 readBlock(decoderOptions) { 8419 this.decodeImage(null, decoderOptions); 8420 } 8421 decodeImage(bytes, decoderOptions) { 8422 if (this.eof) { 8423 return this.buffer; 8424 } 8425 bytes ||= this.bytes; 8426 this.buffer = JpxImage.decode(bytes, decoderOptions); 8427 this.bufferLength = this.buffer.length; 8428 this.eof = true; 8429 return this.buffer; 8430 } 8431 get canAsyncDecodeImageFromBuffer() { 8432 return this.stream.isAsync; 8433 } 8434} 8435 8436;// ./src/core/lzw_stream.js 8437 8438class LZWStream extends DecodeStream { 8439 constructor(str, maybeLength, earlyChange) { 8440 super(maybeLength); 8441 this.str = str; 8442 this.dict = str.dict; 8443 this.cachedData = 0; 8444 this.bitsCached = 0; 8445 const maxLzwDictionarySize = 4096; 8446 const lzwState = { 8447 earlyChange, 8448 codeLength: 9, 8449 nextCode: 258, 8450 dictionaryValues: new Uint8Array(maxLzwDictionarySize), 8451 dictionaryLengths: new Uint16Array(maxLzwDictionarySize), 8452 dictionaryPrevCodes: new Uint16Array(maxLzwDictionarySize), 8453 currentSequence: new Uint8Array(maxLzwDictionarySize), 8454 currentSequenceLength: 0 8455 }; 8456 for (let i = 0; i < 256; ++i) { 8457 lzwState.dictionaryValues[i] = i; 8458 lzwState.dictionaryLengths[i] = 1; 8459 } 8460 this.lzwState = lzwState; 8461 } 8462 readBits(n) { 8463 let bitsCached = this.bitsCached; 8464 let cachedData = this.cachedData; 8465 while (bitsCached < n) { 8466 const c = this.str.getByte(); 8467 if (c === -1) { 8468 this.eof = true; 8469 return null; 8470 } 8471 cachedData = cachedData << 8 | c; 8472 bitsCached += 8; 8473 } 8474 this.bitsCached = bitsCached -= n; 8475 this.cachedData = cachedData; 8476 this.lastCode = null; 8477 return cachedData >>>
vendor: 1,122 bytes, lines 8477-8506
8477 bitsCached & (1 << n) - 1; 8478 } 8479 readBlock() { 8480 const blockSize = 512, 8481 decodedSizeDelta = blockSize; 8482 let estimatedDecodedSize = blockSize * 2; 8483 let i, j, q; 8484 const lzwState = this.lzwState; 8485 if (!lzwState) { 8486 return; 8487 } 8488 const earlyChange = lzwState.earlyChange; 8489 let nextCode = lzwState.nextCode; 8490 const dictionaryValues = lzwState.dictionaryValues; 8491 const dictionaryLengths = lzwState.dictionaryLengths; 8492 const dictionaryPrevCodes = lzwState.dictionaryPrevCodes; 8493 let codeLength = lzwState.codeLength; 8494 let prevCode = lzwState.prevCode; 8495 const currentSequence = lzwState.currentSequence; 8496 let currentSequenceLength = lzwState.currentSequenceLength; 8497 let decodedLength = 0; 8498 let currentBufferLength = this.bufferLength; 8499 let buffer = this.ensureBuffer(this.bufferLength + estimatedDecodedSize); 8500 for (i = 0; i < blockSize; i++) { 8501 const code = this.readBits(codeLength); 8502 const hasPrev = currentSequenceLength > 0; 8503 if (code < 256) { 8504 currentSequence[0] = code; 8505 currentSequenceLength = 1; 8506 } else if (code >= 258) {
vendor: 4,292 bytes, lines 8507-8633
8507 if (code < nextCode) { 8508 currentSequenceLength = dictionaryLengths[code]; 8509 for (j = currentSequenceLength - 1, q = code; j >= 0; j--) { 8510 currentSequence[j] = dictionaryValues[q]; 8511 q = dictionaryPrevCodes[q]; 8512 } 8513 } else { 8514 currentSequence[currentSequenceLength++] = currentSequence[0]; 8515 } 8516 } else if (code === 256) { 8517 codeLength = 9; 8518 nextCode = 258; 8519 currentSequenceLength = 0; 8520 continue; 8521 } else { 8522 this.eof = true; 8523 delete this.lzwState; 8524 break; 8525 } 8526 if (hasPrev) { 8527 dictionaryPrevCodes[nextCode] = prevCode; 8528 dictionaryLengths[nextCode] = dictionaryLengths[prevCode] + 1; 8529 dictionaryValues[nextCode] = currentSequence[0]; 8530 nextCode++; 8531 codeLength = nextCode + earlyChange & nextCode + earlyChange - 1 ? codeLength : Math.min(Math.log(nextCode + earlyChange) / 0.6931471805599453 + 1, 12) | 0; 8532 } 8533 prevCode = code; 8534 decodedLength += currentSequenceLength; 8535 if (estimatedDecodedSize < decodedLength) { 8536 do { 8537 estimatedDecodedSize += decodedSizeDelta; 8538 } while (estimatedDecodedSize < decodedLength); 8539 buffer = this.ensureBuffer(this.bufferLength + estimatedDecodedSize); 8540 } 8541 for (j = 0; j < currentSequenceLength; j++) { 8542 buffer[currentBufferLength++] = currentSequence[j]; 8543 } 8544 } 8545 lzwState.nextCode = nextCode; 8546 lzwState.codeLength = codeLength; 8547 lzwState.prevCode = prevCode; 8548 lzwState.currentSequenceLength = currentSequenceLength; 8549 this.bufferLength = currentBufferLength; 8550 } 8551} 8552 8553;// ./src/core/predictor_stream.js 8554 8555 8556 8557class PredictorStream extends DecodeStream { 8558 constructor(str, maybeLength, params) { 8559 super(maybeLength); 8560 if (!(params instanceof Dict)) { 8561 return str; 8562 } 8563 const predictor = this.predictor = params.get("Predictor") || 1; 8564 if (predictor <= 1) { 8565 return str; 8566 } 8567 if (predictor !== 2 && (predictor < 10 || predictor > 15)) { 8568 throw new FormatError(`Unsupported predictor: ${predictor}`); 8569 } 8570 this.readBlock = predictor === 2 ? this.readBlockTiff : this.readBlockPng; 8571 this.str = str; 8572 this.dict = str.dict; 8573 const colors = this.colors = params.get("Colors") || 1; 8574 const bits = this.bits = params.get("BPC", "BitsPerComponent") || 8; 8575 const columns = this.columns = params.get("Columns") || 1; 8576 this.pixBytes = colors * bits + 7 >> 3; 8577 this.rowBytes = columns * colors * bits + 7 >> 3; 8578 return this; 8579 } 8580 readBlockTiff() { 8581 const rowBytes = this.rowBytes; 8582 const bufferLength = this.bufferLength; 8583 const buffer = this.ensureBuffer(bufferLength + rowBytes); 8584 const bits = this.bits; 8585 const colors = this.colors; 8586 const rawBytes = this.str.getBytes(rowBytes); 8587 this.eof = !rawBytes.length; 8588 if (this.eof) { 8589 return; 8590 } 8591 let inbuf = 0, 8592 outbuf = 0; 8593 let inbits = 0, 8594 outbits = 0; 8595 let pos = bufferLength; 8596 let i; 8597 if (bits === 1 && colors === 1) { 8598 for (i = 0; i < rowBytes; ++i) { 8599 let c = rawBytes[i] ^ inbuf; 8600 c ^= c >> 1; 8601 c ^= c >> 2; 8602 c ^= c >> 4; 8603 inbuf = (c & 1) << 7; 8604 buffer[pos++] = c; 8605 } 8606 } else if (bits === 8) { 8607 for (i = 0; i < colors; ++i) { 8608 buffer[pos++] = rawBytes[i]; 8609 } 8610 for (; i < rowBytes; ++i) { 8611 buffer[pos] = buffer[pos - colors] + rawBytes[i]; 8612 pos++; 8613 } 8614 } else if (bits === 16) { 8615 const bytesPerPixel = colors * 2; 8616 for (i = 0; i < bytesPerPixel; ++i) { 8617 buffer[pos++] = rawBytes[i]; 8618 } 8619 for (; i < rowBytes; i += 2) { 8620 const sum = ((rawBytes[i] & 0xff) << 8) + (rawBytes[i + 1] & 0xff) + ((buffer[pos - bytesPerPixel] & 0xff) << 8) + (buffer[pos - bytesPerPixel + 1] & 0xff); 8621 buffer[pos++] = sum >> 8 & 0xff; 8622 buffer[pos++] = sum & 0xff; 8623 } 8624 } else { 8625 const compArray = new Uint8Array(colors + 1); 8626 const bitMask = (1 << bits) - 1; 8627 let j = 0, 8628 k = bufferLength; 8629 const columns = this.columns; 8630 for (i = 0; i < columns; ++i) { 8631 for (let kk = 0; kk < colors; ++kk) { 8632 if (inbits < bits) { 8633 inbuf = inbuf << 8 | rawBytes[j++] & 0xff;
vendor: 3,902 bytes, lines 8634-8777
8634 inbits += 8; 8635 } 8636 compArray[kk] = compArray[kk] + (inbuf >> inbits - bits) & bitMask; 8637 inbits -= bits; 8638 outbuf = outbuf << bits | compArray[kk]; 8639 outbits += bits; 8640 if (outbits >= 8) { 8641 buffer[k++] = outbuf >> outbits - 8 & 0xff; 8642 outbits -= 8; 8643 } 8644 } 8645 } 8646 if (outbits > 0) { 8647 buffer[k++] = (outbuf << 8 - outbits) + (inbuf & (1 << 8 - outbits) - 1); 8648 } 8649 } 8650 this.bufferLength += rowBytes; 8651 } 8652 readBlockPng() { 8653 const rowBytes = this.rowBytes; 8654 const pixBytes = this.pixBytes; 8655 const predictor = this.str.getByte(); 8656 const rawBytes = this.str.getBytes(rowBytes); 8657 this.eof = !rawBytes.length; 8658 if (this.eof) { 8659 return; 8660 } 8661 const bufferLength = this.bufferLength; 8662 const buffer = this.ensureBuffer(bufferLength + rowBytes); 8663 let prevRow = buffer.subarray(bufferLength - rowBytes, bufferLength); 8664 if (prevRow.length === 0) { 8665 prevRow = new Uint8Array(rowBytes); 8666 } 8667 let i, 8668 j = bufferLength, 8669 up, 8670 c; 8671 switch (predictor) { 8672 case 0: 8673 for (i = 0; i < rowBytes; ++i) { 8674 buffer[j++] = rawBytes[i]; 8675 } 8676 break; 8677 case 1: 8678 for (i = 0; i < pixBytes; ++i) { 8679 buffer[j++] = rawBytes[i]; 8680 } 8681 for (; i < rowBytes; ++i) { 8682 buffer[j] = buffer[j - pixBytes] + rawBytes[i] & 0xff; 8683 j++; 8684 } 8685 break; 8686 case 2: 8687 for (i = 0; i < rowBytes; ++i) { 8688 buffer[j++] = prevRow[i] + rawBytes[i] & 0xff; 8689 } 8690 break; 8691 case 3: 8692 for (i = 0; i < pixBytes; ++i) { 8693 buffer[j++] = (prevRow[i] >> 1) + rawBytes[i]; 8694 } 8695 for (; i < rowBytes; ++i) { 8696 buffer[j] = (prevRow[i] + buffer[j - pixBytes] >> 1) + rawBytes[i] & 0xff; 8697 j++; 8698 } 8699 break; 8700 case 4: 8701 for (i = 0; i < pixBytes; ++i) { 8702 up = prevRow[i]; 8703 c = rawBytes[i]; 8704 buffer[j++] = up + c; 8705 } 8706 for (; i < rowBytes; ++i) { 8707 up = prevRow[i]; 8708 const upLeft = prevRow[i - pixBytes]; 8709 const left = buffer[j - pixBytes]; 8710 const p = left + up - upLeft; 8711 let pa = p - left; 8712 if (pa < 0) { 8713 pa = -pa; 8714 } 8715 let pb = p - up; 8716 if (pb < 0) { 8717 pb = -pb; 8718 } 8719 let pc = p - upLeft; 8720 if (pc < 0) { 8721 pc = -pc; 8722 } 8723 c = rawBytes[i]; 8724 if (pa <= pb && pa <= pc) { 8725 buffer[j++] = left + c; 8726 } else if (pb <= pc) { 8727 buffer[j++] = up + c; 8728 } else { 8729 buffer[j++] = upLeft + c; 8730 } 8731 } 8732 break; 8733 default: 8734 throw new FormatError(`Unsupported predictor: ${predictor}`); 8735 } 8736 this.bufferLength += rowBytes; 8737 } 8738} 8739 8740;// ./src/core/run_length_stream.js 8741 8742class RunLengthStream extends DecodeStream { 8743 constructor(str, maybeLength) { 8744 super(maybeLength); 8745 this.str = str; 8746 this.dict = str.dict; 8747 } 8748 readBlock() { 8749 const repeatHeader = this.str.getBytes(2); 8750 if (!repeatHeader || repeatHeader.length < 2 || repeatHeader[0] === 128) { 8751 this.eof = true; 8752 return; 8753 } 8754 let buffer; 8755 let bufferLength = this.bufferLength; 8756 let n = repeatHeader[0]; 8757 if (n < 128) { 8758 buffer = this.ensureBuffer(bufferLength + n + 1); 8759 buffer[bufferLength++] = repeatHeader[1]; 8760 if (n > 0) { 8761 const source = this.str.getBytes(n); 8762 buffer.set(source, bufferLength); 8763 bufferLength += n; 8764 } 8765 } else { 8766 n = 257 - n; 8767 const b = repeatHeader[1]; 8768 buffer = this.ensureBuffer(bufferLength + n + 1); 8769 for (let i = 0; i < n; i++) { 8770 buffer[bufferLength++] = b; 8771 } 8772 } 8773 this.bufferLength = bufferLength; 8774 } 8775} 8776 8777;// ./src/core/parser.js
vendor: 4,460 bytes, lines 8777-8956
8777 8778 8779 8780 8781 8782 8783 8784 8785 8786 8787 8788 8789 8790 8791 8792const MAX_LENGTH_TO_CACHE = 1000; 8793function getInlineImageCacheKey(bytes) { 8794 const strBuf = [], 8795 ii = bytes.length; 8796 let i = 0; 8797 while (i < ii - 1) { 8798 strBuf.push(bytes[i++] << 8 | bytes[i++]); 8799 } 8800 if (i < ii) { 8801 strBuf.push(bytes[i]); 8802 } 8803 return ii + "_" + String.fromCharCode.apply(null, strBuf); 8804} 8805class Parser { 8806 constructor({ 8807 lexer, 8808 xref, 8809 allowStreams = false, 8810 recoveryMode = false 8811 }) { 8812 this.lexer = lexer; 8813 this.xref = xref; 8814 this.allowStreams = allowStreams; 8815 this.recoveryMode = recoveryMode; 8816 this.imageCache = Object.create(null); 8817 this._imageId = 0; 8818 this.refill(); 8819 } 8820 refill() { 8821 this.buf1 = this.lexer.getObj(); 8822 this.buf2 = this.lexer.getObj(); 8823 } 8824 shift() { 8825 if (this.buf2 instanceof Cmd && this.buf2.cmd === "ID") { 8826 this.buf1 = this.buf2; 8827 this.buf2 = null; 8828 } else { 8829 this.buf1 = this.buf2; 8830 this.buf2 = this.lexer.getObj(); 8831 } 8832 } 8833 tryShift() { 8834 try { 8835 this.shift(); 8836 return true; 8837 } catch (e) { 8838 if (e instanceof MissingDataException) { 8839 throw e; 8840 } 8841 return false; 8842 } 8843 } 8844 getObj(cipherTransform = null) { 8845 const buf1 = this.buf1; 8846 this.shift(); 8847 if (buf1 instanceof Cmd) { 8848 switch (buf1.cmd) { 8849 case "BI": 8850 return this.makeInlineImage(cipherTransform); 8851 case "[": 8852 const array = []; 8853 while (!isCmd(this.buf1, "]") && this.buf1 !== EOF) { 8854 array.push(this.getObj(cipherTransform)); 8855 } 8856 if (this.buf1 === EOF) { 8857 if (this.recoveryMode) { 8858 return array; 8859 } 8860 throw new ParserEOFException("End of file inside array."); 8861 } 8862 this.shift(); 8863 return array; 8864 case "<<": 8865 const dict = new Dict(this.xref); 8866 while (!isCmd(this.buf1, ">>") && this.buf1 !== EOF) { 8867 if (!(this.buf1 instanceof Name)) { 8868 info("Malformed dictionary: key must be a name object"); 8869 this.shift(); 8870 continue; 8871 } 8872 const key = this.buf1.name; 8873 this.shift(); 8874 if (this.buf1 === EOF) { 8875 break; 8876 } 8877 dict.set(key, this.getObj(cipherTransform)); 8878 } 8879 if (this.buf1 === EOF) { 8880 if (this.recoveryMode) { 8881 return dict; 8882 } 8883 throw new ParserEOFException("End of file inside dictionary."); 8884 } 8885 if (isCmd(this.buf2, "stream")) { 8886 return this.allowStreams ? this.makeStream(dict, cipherTransform) : dict; 8887 } 8888 this.shift(); 8889 return dict; 8890 default: 8891 return buf1; 8892 } 8893 } 8894 if (Number.isInteger(buf1)) { 8895 if (Number.isInteger(this.buf1) && isCmd(this.buf2, "R")) { 8896 const ref = Ref.get(buf1, this.buf1); 8897 this.shift(); 8898 this.shift(); 8899 return ref; 8900 } 8901 return buf1; 8902 } 8903 if (typeof buf1 === "string") { 8904 if (cipherTransform) { 8905 return cipherTransform.decryptString(buf1); 8906 } 8907 return buf1; 8908 } 8909 return buf1; 8910 } 8911 findDefaultInlineStreamEnd(stream) { 8912 const E = 0x45, 8913 I = 0x49, 8914 SPACE = 0x20, 8915 LF = 0xa, 8916 CR = 0xd, 8917 NUL = 0x0; 8918 const { 8919 knownCommands 8920 } = this.lexer, 8921 startPos = stream.pos, 8922 n = 15; 8923 let state = 0, 8924 ch, 8925 maybeEIPos; 8926 while ((ch = stream.getByte()) !== -1) { 8927 if (state === 0) { 8928 state = ch === E ? 1 : 0; 8929 } else if (state === 1) { 8930 state = ch === I ? 2 : 0; 8931 } else { 8932 if (ch === SPACE || ch === LF || ch === CR) { 8933 maybeEIPos = stream.pos; 8934 const followingBytes = stream.peekBytes(n); 8935 const ii = followingBytes.length; 8936 if (ii === 0) { 8937 break; 8938 } 8939 for (let i = 0; i < ii; i++) { 8940 ch = followingBytes[i]; 8941 if (ch === NUL && followingBytes[i + 1] !== NUL) { 8942 continue; 8943 } 8944 if (ch !== LF && ch !== CR && (ch < SPACE || ch > 0x7f)) { 8945 state = 0; 8946 break; 8947 } 8948 } 8949 if (state !== 2) { 8950 continue; 8951 } 8952 if (!knownCommands) { 8953 warn("findDefaultInlineStreamEnd - `lexer.knownCommands` is undefined."); 8954 continue; 8955 } 8956 const tmpLexer = new Lexer(new Stream(
8956followingBytes.slice(
vendor: 15,105 bytes, lines 8956-9445
8956)), knownCommands); 8957 tmpLexer._hexStringWarn = () => {}; 8958 let numArgs = 0; 8959 while (true) { 8960 const nextObj = tmpLexer.getObj(); 8961 if (nextObj === EOF) { 8962 state = 0; 8963 break; 8964 } 8965 if (nextObj instanceof Cmd) { 8966 const knownCommand = knownCommands[nextObj.cmd]; 8967 if (!knownCommand) { 8968 state = 0; 8969 break; 8970 } else if (knownCommand.variableArgs ? numArgs <= knownCommand.numArgs : numArgs === knownCommand.numArgs) { 8971 break; 8972 } 8973 numArgs = 0; 8974 continue; 8975 } 8976 numArgs++; 8977 } 8978 if (state === 2) { 8979 break; 8980 } 8981 } else { 8982 state = 0; 8983 } 8984 } 8985 } 8986 if (ch === -1) { 8987 warn("findDefaultInlineStreamEnd: " + "Reached the end of the stream without finding a valid EI marker"); 8988 if (maybeEIPos) { 8989 warn('... trying to recover by using the last "EI" occurrence.'); 8990 stream.skip(-(stream.pos - maybeEIPos)); 8991 } 8992 } 8993 let endOffset = 4; 8994 stream.skip(-endOffset); 8995 ch = stream.peekByte(); 8996 stream.skip(endOffset); 8997 if (!isWhiteSpace(ch)) { 8998 endOffset--; 8999 } 9000 return stream.pos - endOffset - startPos; 9001 } 9002 findDCTDecodeInlineStreamEnd(stream) { 9003 const startPos = stream.pos; 9004 let foundEOI = false, 9005 b, 9006 markerLength; 9007 while ((b = stream.getByte()) !== -1) { 9008 if (b !== 0xff) { 9009 continue; 9010 } 9011 switch (stream.getByte()) { 9012 case 0x00: 9013 break; 9014 case 0xff: 9015 stream.skip(-1); 9016 break; 9017 case 0xd9: 9018 foundEOI = true; 9019 break; 9020 case 0xc0: 9021 case 0xc1: 9022 case 0xc2: 9023 case 0xc3: 9024 case 0xc5: 9025 case 0xc6: 9026 case 0xc7: 9027 case 0xc9: 9028 case 0xca: 9029 case 0xcb: 9030 case 0xcd: 9031 case 0xce: 9032 case 0xcf: 9033 case 0xc4: 9034 case 0xcc: 9035 case 0xda: 9036 case 0xdb: 9037 case 0xdc: 9038 case 0xdd: 9039 case 0xde: 9040 case 0xdf: 9041 case 0xe0: 9042 case 0xe1: 9043 case 0xe2: 9044 case 0xe3: 9045 case 0xe4: 9046 case 0xe5: 9047 case 0xe6: 9048 case 0xe7: 9049 case 0xe8: 9050 case 0xe9: 9051 case 0xea: 9052 case 0xeb: 9053 case 0xec: 9054 case 0xed: 9055 case 0xee: 9056 case 0xef: 9057 case 0xfe: 9058 markerLength = stream.getUint16(); 9059 if (markerLength > 2) { 9060 stream.skip(markerLength - 2); 9061 } else { 9062 stream.skip(-2); 9063 } 9064 break; 9065 } 9066 if (foundEOI) { 9067 break; 9068 } 9069 } 9070 const length = stream.pos - startPos; 9071 if (b === -1) { 9072 warn("Inline DCTDecode image stream: " + "EOI marker not found, searching for /EI/ instead."); 9073 stream.skip(-length); 9074 return this.findDefaultInlineStreamEnd(stream); 9075 } 9076 this.inlineStreamSkipEI(stream); 9077 return length; 9078 } 9079 findASCII85DecodeInlineStreamEnd(stream) { 9080 const TILDE = 0x7e, 9081 GT = 0x3e; 9082 const startPos = stream.pos; 9083 let ch; 9084 while ((ch = stream.getByte()) !== -1) { 9085 if (ch === TILDE) { 9086 const tildePos = stream.pos; 9087 ch = stream.peekByte(); 9088 while (isWhiteSpace(ch)) { 9089 stream.skip(); 9090 ch = stream.peekByte(); 9091 } 9092 if (ch === GT) { 9093 stream.skip(); 9094 break; 9095 } 9096 if (stream.pos > tildePos) { 9097 const maybeEI = stream.peekBytes(2); 9098 if (maybeEI[0] === 0x45 && maybeEI[1] === 0x49) { 9099 break; 9100 } 9101 } 9102 } 9103 } 9104 const length = stream.pos - startPos; 9105 if (ch === -1) { 9106 warn("Inline ASCII85Decode image stream: " + "EOD marker not found, searching for /EI/ instead."); 9107 stream.skip(-length); 9108 return this.findDefaultInlineStreamEnd(stream); 9109 } 9110 this.inlineStreamSkipEI(stream); 9111 return length; 9112 } 9113 findASCIIHexDecodeInlineStreamEnd(stream) { 9114 const GT = 0x3e; 9115 const startPos = stream.pos; 9116 let ch; 9117 while ((ch = stream.getByte()) !== -1) { 9118 if (ch === GT) { 9119 break; 9120 } 9121 } 9122 const length = stream.pos - startPos; 9123 if (ch === -1) { 9124 warn("Inline ASCIIHexDecode image stream: " + "EOD marker not found, searching for /EI/ instead."); 9125 stream.skip(-length); 9126 return this.findDefaultInlineStreamEnd(stream); 9127 } 9128 this.inlineStreamSkipEI(stream); 9129 return length; 9130 } 9131 inlineStreamSkipEI(stream) { 9132 const E = 0x45, 9133 I = 0x49; 9134 let state = 0, 9135 ch; 9136 while ((ch = stream.getByte()) !== -1) { 9137 if (state === 0) { 9138 state = ch === E ? 1 : 0; 9139 } else if (state === 1) { 9140 state = ch === I ? 2 : 0; 9141 } else if (state === 2) { 9142 break; 9143 } 9144 } 9145 } 9146 makeInlineImage(cipherTransform) { 9147 const lexer = this.lexer; 9148 const stream = lexer.stream; 9149 const dictMap = Object.create(null); 9150 let dictLength; 9151 while (!isCmd(this.buf1, "ID") && this.buf1 !== EOF) { 9152 if (!(this.buf1 instanceof Name)) { 9153 throw new FormatError("Dictionary key must be a name object"); 9154 } 9155 const key = this.buf1.name; 9156 this.shift(); 9157 if (this.buf1 === EOF) { 9158 break; 9159 } 9160 dictMap[key] = this.getObj(cipherTransform); 9161 } 9162 if (lexer.beginInlineImagePos !== -1) { 9163 dictLength = stream.pos - lexer.beginInlineImagePos; 9164 } 9165 const filter = this.xref.fetchIfRef(dictMap.F || dictMap.Filter); 9166 let filterName; 9167 if (filter instanceof Name) { 9168 filterName = filter.name; 9169 } else if (Array.isArray(filter)) { 9170 const filterZero = this.xref.fetchIfRef(filter[0]); 9171 if (filterZero instanceof Name) { 9172 filterName = filterZero.name; 9173 } 9174 } 9175 const startPos = stream.pos; 9176 let length; 9177 switch (filterName) { 9178 case "DCT": 9179 case "DCTDecode": 9180 length = this.findDCTDecodeInlineStreamEnd(stream); 9181 break; 9182 case "A85": 9183 case "ASCII85Decode": 9184 length = this.findASCII85DecodeInlineStreamEnd(stream); 9185 break; 9186 case "AHx": 9187 case "ASCIIHexDecode": 9188 length = this.findASCIIHexDecodeInlineStreamEnd(stream); 9189 break; 9190 default: 9191 length = this.findDefaultInlineStreamEnd(stream); 9192 } 9193 let cacheKey; 9194 if (length < MAX_LENGTH_TO_CACHE && dictLength > 0) { 9195 const initialStreamPos = stream.pos; 9196 stream.pos = lexer.beginInlineImagePos; 9197 cacheKey = getInlineImageCacheKey(stream.getBytes(dictLength + length)); 9198 stream.pos = initialStreamPos; 9199 const cacheEntry = this.imageCache[cacheKey]; 9200 if (cacheEntry !== undefined) { 9201 this.buf2 = Cmd.get("EI"); 9202 this.shift(); 9203 cacheEntry.reset(); 9204 return cacheEntry; 9205 } 9206 } 9207 const dict = new Dict(this.xref); 9208 for (const key in dictMap) { 9209 dict.set(key, dictMap[key]); 9210 } 9211 let imageStream = stream.makeSubStream(startPos, length, dict); 9212 if (cipherTransform) { 9213 imageStream = cipherTransform.createStream(imageStream, length); 9214 } 9215 imageStream = this.filter(imageStream, dict, length); 9216 imageStream.dict = dict; 9217 if (cacheKey !== undefined) { 9218 imageStream.cacheKey = `inline_img_${++this._imageId}`; 9219 this.imageCache[cacheKey] = imageStream; 9220 } 9221 this.buf2 = Cmd.get("EI"); 9222 this.shift(); 9223 return imageStream; 9224 } 9225 #findStreamLength(startPos) { 9226 const { 9227 stream 9228 } = this.lexer; 9229 stream.pos = startPos; 9230 const SCAN_BLOCK_LENGTH = 2048; 9231 const signatureLength = "endstream".length; 9232 const END_SIGNATURE = new Uint8Array([0x65, 0x6e, 0x64]); 9233 const endLength = END_SIGNATURE.length; 9234 const PARTIAL_SIGNATURE = [new Uint8Array([0x73, 0x74, 0x72, 0x65, 0x61, 0x6d]), new Uint8Array([0x73, 0x74, 0x65, 0x61, 0x6d]), new Uint8Array([0x73, 0x74, 0x72, 0x65, 0x61])]; 9235 const normalLength = signatureLength - endLength; 9236 while (stream.pos < stream.end) { 9237 const scanBytes = stream.peekBytes(SCAN_BLOCK_LENGTH); 9238 const scanLength = scanBytes.length - signatureLength; 9239 if (scanLength <= 0) { 9240 break; 9241 } 9242 let pos = 0; 9243 while (pos < scanLength) { 9244 let j = 0; 9245 while (j < endLength && scanBytes[pos + j] === END_SIGNATURE[j]) { 9246 j++; 9247 } 9248 if (j >= endLength) { 9249 let found = false; 9250 for (const part of PARTIAL_SIGNATURE) { 9251 const partLen = part.length; 9252 let k = 0; 9253 while (k < partLen && scanBytes[pos + j + k] === part[k]) { 9254 k++; 9255 } 9256 if (k >= normalLength) { 9257 found = true; 9258 break; 9259 } 9260 if (k >= partLen) { 9261 const lastByte = scanBytes[pos + j + k]; 9262 if (isWhiteSpace(lastByte)) { 9263 info(`Found "${bytesToString([...END_SIGNATURE, ...part])}" when ` + "searching for endstream command."); 9264 found = true; 9265 } 9266 break; 9267 } 9268 } 9269 if (found) { 9270 stream.pos += pos; 9271 return stream.pos - startPos; 9272 } 9273 } 9274 pos++; 9275 } 9276 stream.pos += scanLength; 9277 } 9278 return -1; 9279 } 9280 makeStream(dict, cipherTransform) { 9281 const lexer = this.lexer; 9282 let stream = lexer.stream; 9283 lexer.skipToNextLine(); 9284 const startPos = stream.pos - 1; 9285 let length = dict.get("Length"); 9286 if (!Number.isInteger(length)) { 9287 info(`Bad length "${length && length.toString()}" in stream.`); 9288 length = 0; 9289 } 9290 stream.pos = startPos + length; 9291 lexer.nextChar(); 9292 if (this.tryShift() && isCmd(this.buf2, "endstream")) { 9293 this.shift(); 9294 } else { 9295 length = this.#findStreamLength(startPos); 9296 if (length < 0) { 9297 throw new FormatError("Missing endstream command."); 9298 } 9299 lexer.nextChar(); 9300 this.shift(); 9301 this.shift(); 9302 } 9303 this.shift(); 9304 stream = stream.makeSubStream(startPos, length, dict); 9305 if (cipherTransform) { 9306 stream = cipherTransform.createStream(stream, length); 9307 } 9308 stream = this.filter(stream, dict, length); 9309 stream.dict = dict; 9310 return stream; 9311 } 9312 filter(stream, dict, length) { 9313 let filter = dict.get("F", "Filter"); 9314 let params = dict.get("DP", "DecodeParms"); 9315 if (filter instanceof Name) { 9316 if (Array.isArray(params)) { 9317 warn("/DecodeParms should not be an Array, when /Filter is a Name."); 9318 } 9319 return this.makeFilter(stream, filter.name, length, params); 9320 } 9321 let maybeLength = length; 9322 if (Array.isArray(filter)) { 9323 const filterArray = filter; 9324 const paramsArray = params; 9325 for (let i = 0, ii = filterArray.length; i < ii; ++i) { 9326 filter = this.xref.fetchIfRef(filterArray[i]); 9327 if (!(filter instanceof Name)) { 9328 throw new FormatError(`Bad filter name "${filter}"`); 9329 } 9330 params = null; 9331 if (Array.isArray(paramsArray) && i in paramsArray) { 9332 params = this.xref.fetchIfRef(paramsArray[i]); 9333 } 9334 stream = this.makeFilter(stream, filter.name, maybeLength, params); 9335 maybeLength = null; 9336 } 9337 } 9338 return stream; 9339 } 9340 makeFilter(stream, name, maybeLength, params) { 9341 if (maybeLength === 0) { 9342 warn(`Empty "${name}" stream.`); 9343 return new NullStream(); 9344 } 9345 try { 9346 switch (name) { 9347 case "Fl": 9348 case "FlateDecode": 9349 if (params) { 9350 return new PredictorStream(new FlateStream(stream, maybeLength), maybeLength, params); 9351 } 9352 return new FlateStream(stream, maybeLength); 9353 case "LZW": 9354 case "LZWDecode": 9355 let earlyChange = 1; 9356 if (params) { 9357 if (params.has("EarlyChange")) { 9358 earlyChange = params.get("EarlyChange"); 9359 } 9360 return new PredictorStream(new LZWStream(stream, maybeLength, earlyChange), maybeLength, params); 9361 } 9362 return new LZWStream(stream, maybeLength, earlyChange); 9363 case "DCT": 9364 case "DCTDecode": 9365 return new JpegStream(stream, maybeLength, params); 9366 case "JPX": 9367 case "JPXDecode": 9368 return new JpxStream(stream, maybeLength, params); 9369 case "A85": 9370 case "ASCII85Decode": 9371 return new Ascii85Stream(stream, maybeLength); 9372 case "AHx": 9373 case "ASCIIHexDecode": 9374 return new AsciiHexStream(stream, maybeLength); 9375 case "CCF": 9376 case "CCITTFaxDecode": 9377 return new CCITTFaxStream(stream, maybeLength, params); 9378 case "RL": 9379 case "RunLengthDecode": 9380 return new RunLengthStream(stream, maybeLength); 9381 case "JBIG2Decode": 9382 return new Jbig2Stream(stream, maybeLength, params); 9383 } 9384 warn(`Filter "${name}" is not supported.`); 9385 return stream; 9386 } catch (ex) { 9387 if (ex instanceof MissingDataException) { 9388 throw ex; 9389 } 9390 warn(`Invalid stream: "${ex}"`); 9391 return new NullStream(); 9392 } 9393 } 9394} 9395const specialChars = [1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; 9396function toHexDigit(ch) { 9397 if (ch >= 0x30 && ch <= 0x39) { 9398 return ch & 0x0f; 9399 } 9400 if (ch >= 0x41 && ch <= 0x46 || ch >= 0x61 && ch <= 0x66) { 9401 return (ch & 0x0f) + 9; 9402 } 9403 return -1; 9404} 9405class Lexer { 9406 constructor(stream, knownCommands = null) { 9407 this.stream = stream; 9408 this.nextChar(); 9409 this.strBuf = []; 9410 this.knownCommands = knownCommands; 9411 this._hexStringNumWarn = 0; 9412 this.beginInlineImagePos = -1; 9413 } 9414 nextChar() { 9415 return this.currentChar = this.stream.getByte(); 9416 } 9417 peekChar() { 9418 return this.stream.peekByte(); 9419 } 9420 getNumber() { 9421 let ch = this.currentChar; 9422 let eNotation = false; 9423 let divideBy = 0; 9424 let sign = 1; 9425 if (ch === 0x2d) { 9426 sign = -1; 9427 ch = this.nextChar(); 9428 if (ch === 0x2d) { 9429 ch = this.nextChar(); 9430 } 9431 } else if (ch === 0x2b) { 9432 ch = this.nextChar(); 9433 } 9434 if (ch === 0x0a || ch === 0x0d) { 9435 do { 9436 ch = this.nextChar(); 9437 } while (ch === 0x0a || ch === 0x0d); 9438 } 9439 if (ch === 0x2e) { 9440 divideBy = 10; 9441 ch = this.nextChar(); 9442 } 9443 if (ch < 0x30 || ch > 0x39) { 9444 const msg = `Invalid number: ${String.fromCharCode(ch)} (charCode ${ch})`; 9445 if (isWhiteSpace(ch) || ch ===
vendor: 1,253 bytes, lines 9445-9490
9445-1) { 9446 info(`Lexer.getNumber - "${msg}".`); 9447 return 0; 9448 } 9449 throw new FormatError(msg); 9450 } 9451 let baseValue = ch - 0x30; 9452 let powerValue = 0; 9453 let powerValueSign = 1; 9454 while ((ch = this.nextChar()) >= 0) { 9455 if (ch >= 0x30 && ch <= 0x39) { 9456 const currentDigit = ch - 0x30; 9457 if (eNotation) { 9458 powerValue = powerValue * 10 + currentDigit; 9459 } else { 9460 if (divideBy !== 0) { 9461 divideBy *= 10; 9462 } 9463 baseValue = baseValue * 10 + currentDigit; 9464 } 9465 } else if (ch === 0x2e) { 9466 if (divideBy === 0) { 9467 divideBy = 1; 9468 } else { 9469 break; 9470 } 9471 } else if (ch === 0x2d) { 9472 warn("Badly formatted number: minus sign in the middle"); 9473 } else if (ch === 0x45 || ch === 0x65) { 9474 ch = this.peekChar(); 9475 if (ch === 0x2b || ch === 0x2d) { 9476 powerValueSign = ch === 0x2d ? -1 : 1; 9477 this.nextChar(); 9478 } else if (ch < 0x30 || ch > 0x39) { 9479 break; 9480 } 9481 eNotation = true; 9482 } else { 9483 break; 9484 } 9485 } 9486 if (divideBy !== 0) { 9487 baseValue /= divideBy; 9488 } 9489 if (eNotation) { 9490 baseValue *= 10 ** (powerValueSign * powerValue)
vendor: 12,617 bytes, lines 9490-9861
9490; 9491 } 9492 return sign * baseValue; 9493 } 9494 getString() { 9495 let numParen = 1; 9496 let done = false; 9497 const strBuf = this.strBuf; 9498 strBuf.length = 0; 9499 let ch = this.nextChar(); 9500 while (true) { 9501 let charBuffered = false; 9502 switch (ch | 0) { 9503 case -1: 9504 warn("Unterminated string"); 9505 done = true; 9506 break; 9507 case 0x28: 9508 ++numParen; 9509 strBuf.push("("); 9510 break; 9511 case 0x29: 9512 if (--numParen === 0) { 9513 this.nextChar(); 9514 done = true; 9515 } else { 9516 strBuf.push(")"); 9517 } 9518 break; 9519 case 0x5c: 9520 ch = this.nextChar(); 9521 switch (ch) { 9522 case -1: 9523 warn("Unterminated string"); 9524 done = true; 9525 break; 9526 case 0x6e: 9527 strBuf.push("\n"); 9528 break; 9529 case 0x72: 9530 strBuf.push("\r"); 9531 break; 9532 case 0x74: 9533 strBuf.push("\t"); 9534 break; 9535 case 0x62: 9536 strBuf.push("\b"); 9537 break; 9538 case 0x66: 9539 strBuf.push("\f"); 9540 break; 9541 case 0x5c: 9542 case 0x28: 9543 case 0x29: 9544 strBuf.push(String.fromCharCode(ch)); 9545 break; 9546 case 0x30: 9547 case 0x31: 9548 case 0x32: 9549 case 0x33: 9550 case 0x34: 9551 case 0x35: 9552 case 0x36: 9553 case 0x37: 9554 let x = ch & 0x0f; 9555 ch = this.nextChar(); 9556 charBuffered = true; 9557 if (ch >= 0x30 && ch <= 0x37) { 9558 x = (x << 3) + (ch & 0x0f); 9559 ch = this.nextChar(); 9560 if (ch >= 0x30 && ch <= 0x37) { 9561 charBuffered = false; 9562 x = (x << 3) + (ch & 0x0f); 9563 } 9564 } 9565 strBuf.push(String.fromCharCode(x)); 9566 break; 9567 case 0x0d: 9568 if (this.peekChar() === 0x0a) { 9569 this.nextChar(); 9570 } 9571 break; 9572 case 0x0a: 9573 break; 9574 default: 9575 strBuf.push(String.fromCharCode(ch)); 9576 break; 9577 } 9578 break; 9579 default: 9580 strBuf.push(String.fromCharCode(ch)); 9581 break; 9582 } 9583 if (done) { 9584 break; 9585 } 9586 if (!charBuffered) { 9587 ch = this.nextChar(); 9588 } 9589 } 9590 return strBuf.join(""); 9591 } 9592 getName() { 9593 let ch, previousCh; 9594 const strBuf = this.strBuf; 9595 strBuf.length = 0; 9596 while ((ch = this.nextChar()) >= 0 && !specialChars[ch]) { 9597 if (ch === 0x23) { 9598 ch = this.nextChar(); 9599 if (specialChars[ch]) { 9600 warn("Lexer_getName: " + "NUMBER SIGN (#) should be followed by a hexadecimal number."); 9601 strBuf.push("#"); 9602 break; 9603 } 9604 const x = toHexDigit(ch); 9605 if (x !== -1) { 9606 previousCh = ch; 9607 ch = this.nextChar(); 9608 const x2 = toHexDigit(ch); 9609 if (x2 === -1) { 9610 warn(`Lexer_getName: Illegal digit (${String.fromCharCode(ch)}) ` + "in hexadecimal number."); 9611 strBuf.push("#", String.fromCharCode(previousCh)); 9612 if (specialChars[ch]) { 9613 break; 9614 } 9615 strBuf.push(String.fromCharCode(ch)); 9616 continue; 9617 } 9618 strBuf.push(String.fromCharCode(x << 4 | x2)); 9619 } else { 9620 strBuf.push("#", String.fromCharCode(ch)); 9621 } 9622 } else { 9623 strBuf.push(String.fromCharCode(ch)); 9624 } 9625 } 9626 if (strBuf.length > 127) { 9627 warn(`Name token is longer than allowed by the spec: ${strBuf.length}`); 9628 } 9629 return Name.get(strBuf.join("")); 9630 } 9631 _hexStringWarn(ch) { 9632 const MAX_HEX_STRING_NUM_WARN = 5; 9633 if (this._hexStringNumWarn++ === MAX_HEX_STRING_NUM_WARN) { 9634 warn("getHexString - ignoring additional invalid characters."); 9635 return; 9636 } 9637 if (this._hexStringNumWarn > MAX_HEX_STRING_NUM_WARN) { 9638 return; 9639 } 9640 warn(`getHexString - ignoring invalid character: ${ch}`); 9641 } 9642 getHexString() { 9643 const strBuf = this.strBuf; 9644 strBuf.length = 0; 9645 let ch = this.currentChar; 9646 let firstDigit = -1, 9647 digit = -1; 9648 this._hexStringNumWarn = 0; 9649 while (true) { 9650 if (ch < 0) { 9651 warn("Unterminated hex string"); 9652 break; 9653 } else if (ch === 0x3e) { 9654 this.nextChar(); 9655 break; 9656 } else if (specialChars[ch] === 1) { 9657 ch = this.nextChar(); 9658 continue; 9659 } else { 9660 digit = toHexDigit(ch); 9661 if (digit === -1) { 9662 this._hexStringWarn(ch); 9663 } else if (firstDigit === -1) { 9664 firstDigit = digit; 9665 } else { 9666 strBuf.push(String.fromCharCode(firstDigit << 4 | digit)); 9667 firstDigit = -1; 9668 } 9669 ch = this.nextChar(); 9670 } 9671 } 9672 if (firstDigit !== -1) { 9673 strBuf.push(String.fromCharCode(firstDigit << 4)); 9674 } 9675 return strBuf.join(""); 9676 } 9677 getObj() { 9678 let comment = false; 9679 let ch = this.currentChar; 9680 while (true) { 9681 if (ch < 0) { 9682 return EOF; 9683 } 9684 if (comment) { 9685 if (ch === 0x0a || ch === 0x0d) { 9686 comment = false; 9687 } 9688 } else if (ch === 0x25) { 9689 comment = true; 9690 } else if (specialChars[ch] !== 1) { 9691 break; 9692 } 9693 ch = this.nextChar(); 9694 } 9695 switch (ch | 0) { 9696 case 0x30: 9697 case 0x31: 9698 case 0x32: 9699 case 0x33: 9700 case 0x34: 9701 case 0x35: 9702 case 0x36: 9703 case 0x37: 9704 case 0x38: 9705 case 0x39: 9706 case 0x2b: 9707 case 0x2d: 9708 case 0x2e: 9709 return this.getNumber(); 9710 case 0x28: 9711 return this.getString(); 9712 case 0x2f: 9713 return this.getName(); 9714 case 0x5b: 9715 this.nextChar(); 9716 return Cmd.get("["); 9717 case 0x5d: 9718 this.nextChar(); 9719 return Cmd.get("]"); 9720 case 0x3c: 9721 ch = this.nextChar(); 9722 if (ch === 0x3c) { 9723 this.nextChar(); 9724 return Cmd.get("<<"); 9725 } 9726 return this.getHexString(); 9727 case 0x3e: 9728 ch = this.nextChar(); 9729 if (ch === 0x3e) { 9730 this.nextChar(); 9731 return Cmd.get(">>"); 9732 } 9733 return Cmd.get(">"); 9734 case 0x7b: 9735 this.nextChar(); 9736 return Cmd.get("{"); 9737 case 0x7d: 9738 this.nextChar(); 9739 return Cmd.get("}"); 9740 case 0x29: 9741 this.nextChar(); 9742 throw new FormatError(`Illegal character: ${ch}`); 9743 } 9744 let str = String.fromCharCode(ch); 9745 if (ch < 0x20 || ch > 0x7f) { 9746 const nextCh = this.peekChar(); 9747 if (nextCh >= 0x20 && nextCh <= 0x7f) { 9748 this.nextChar(); 9749 return Cmd.get(str); 9750 } 9751 } 9752 const knownCommands = this.knownCommands; 9753 let knownCommandFound = knownCommands?.[str] !== undefined; 9754 while ((ch = this.nextChar()) >= 0 && !specialChars[ch]) { 9755 const possibleCommand = str + String.fromCharCode(ch); 9756 if (knownCommandFound && knownCommands[possibleCommand] === undefined) { 9757 break; 9758 } 9759 if (str.length === 128) { 9760 throw new FormatError(`Command token too long: ${str.length}`); 9761 } 9762 str = possibleCommand; 9763 knownCommandFound = knownCommands?.[str] !== undefined; 9764 } 9765 if (str === "true") { 9766 return true; 9767 } 9768 if (str === "false") { 9769 return false; 9770 } 9771 if (str === "null") { 9772 return null; 9773 } 9774 if (str === "BI") { 9775 this.beginInlineImagePos = this.stream.pos; 9776 } 9777 return Cmd.get(str); 9778 } 9779 skipToNextLine() { 9780 let ch = this.currentChar; 9781 while (ch >= 0) { 9782 if (ch === 0x0d) { 9783 ch = this.nextChar(); 9784 if (ch === 0x0a) { 9785 this.nextChar(); 9786 } 9787 break; 9788 } else if (ch === 0x0a) { 9789 this.nextChar(); 9790 break; 9791 } 9792 ch = this.nextChar(); 9793 } 9794 } 9795} 9796class Linearization { 9797 static create(stream) { 9798 function getInt(linDict, name, allowZeroValue = false) { 9799 const obj = linDict.get(name); 9800 if (Number.isInteger(obj) && (allowZeroValue ? obj >= 0 : obj > 0)) { 9801 return obj; 9802 } 9803 throw new Error(`The "${name}" parameter in the linearization ` + "dictionary is invalid."); 9804 } 9805 function getHints(linDict) { 9806 const hints = linDict.get("H"); 9807 let hintsLength; 9808 if (Array.isArray(hints) && ((hintsLength = hints.length) === 2 || hintsLength === 4)) { 9809 for (let index = 0; index < hintsLength; index++) { 9810 const hint = hints[index]; 9811 if (!(Number.isInteger(hint) && hint > 0)) { 9812 throw new Error(`Hint (${index}) in the linearization dictionary is invalid.`); 9813 } 9814 } 9815 return hints; 9816 } 9817 throw new Error("Hint array in the linearization dictionary is invalid."); 9818 } 9819 const parser = new Parser({ 9820 lexer: new Lexer(stream), 9821 xref: null 9822 }); 9823 const obj1 = parser.getObj(); 9824 const obj2 = parser.getObj(); 9825 const obj3 = parser.getObj(); 9826 const linDict = parser.getObj(); 9827 let obj, length; 9828 if (!(Number.isInteger(obj1) && Number.isInteger(obj2) && isCmd(obj3, "obj") && linDict instanceof Dict && typeof (obj = linDict.get("Linearized")) === "number" && obj > 0)) { 9829 return null; 9830 } else if ((length = getInt(linDict, "L")) !== stream.length) { 9831 throw new Error('The "L" parameter in the linearization dictionary ' + "does not equal the stream length."); 9832 } 9833 return { 9834 length, 9835 hints: getHints(linDict), 9836 objectNumberFirst: getInt(linDict, "O"), 9837 endFirst: getInt(linDict, "E"), 9838 numPages: getInt(linDict, "N"), 9839 mainXRefEntriesOffset: getInt(linDict, "T"), 9840 pageFirst: linDict.has("P") ? getInt(linDict, "P", true) : 0 9841 }; 9842 } 9843} 9844 9845;// ./src/core/cmap.js 9846 9847 9848 9849 9850 9851 9852 9853const 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"]; 9854const MAX_MAP_RANGE = 2 ** 24 - 1; 9855class CMap { 9856 constructor(builtInCMap = false) { 9857 this.codespaceRanges = [[], [], [], []]; 9858 this.numCodespaceRanges = 0; 9859 this._map = []; 9860 this.name = ""; 9861 this.vertical = false;
vendor: 2,526 bytes, lines 9862-9951
9862 this.useCMap = null; 9863 this.builtInCMap = builtInCMap; 9864 } 9865 addCodespaceRange(n, low, high) { 9866 this.codespaceRanges[n - 1].push(low, high); 9867 this.numCodespaceRanges++; 9868 } 9869 mapCidRange(low, high, dstLow) { 9870 if (high - low > MAX_MAP_RANGE) { 9871 throw new Error("mapCidRange - ignoring data above MAX_MAP_RANGE."); 9872 } 9873 while (low <= high) { 9874 this._map[low++] = dstLow++; 9875 } 9876 } 9877 mapBfRange(low, high, dstLow) { 9878 if (high - low > MAX_MAP_RANGE) { 9879 throw new Error("mapBfRange - ignoring data above MAX_MAP_RANGE."); 9880 } 9881 const lastByte = dstLow.length - 1; 9882 while (low <= high) { 9883 this._map[low++] = dstLow; 9884 const nextCharCode = dstLow.charCodeAt(lastByte) + 1; 9885 if (nextCharCode > 0xff) { 9886 dstLow = dstLow.substring(0, lastByte - 1) + String.fromCharCode(dstLow.charCodeAt(lastByte - 1) + 1) + "\x00"; 9887 continue; 9888 } 9889 dstLow = dstLow.substring(0, lastByte) + String.fromCharCode(nextCharCode); 9890 } 9891 } 9892 mapBfRangeToArray(low, high, array) { 9893 if (high - low > MAX_MAP_RANGE) { 9894 throw new Error("mapBfRangeToArray - ignoring data above MAX_MAP_RANGE."); 9895 } 9896 const ii = array.length; 9897 let i = 0; 9898 while (low <= high && i < ii) { 9899 this._map[low] = array[i++]; 9900 ++low; 9901 } 9902 } 9903 mapOne(src, dst) { 9904 this._map[src] = dst; 9905 } 9906 lookup(code) { 9907 return this._map[code]; 9908 } 9909 contains(code) { 9910 return this._map[code] !== undefined; 9911 } 9912 forEach(callback) { 9913 const map = this._map; 9914 const length = map.length; 9915 if (length <= 0x10000) { 9916 for (let i = 0; i < length; i++) { 9917 if (map[i] !== undefined) { 9918 callback(i, map[i]); 9919 } 9920 } 9921 } else { 9922 for (const i in map) { 9923 callback(i, map[i]); 9924 } 9925 } 9926 } 9927 charCodeOf(value) { 9928 const map = this._map; 9929 if (map.length <= 0x10000) { 9930 return map.indexOf(value); 9931 } 9932 for (const charCode in map) { 9933 if (map[charCode] === value) { 9934 return charCode | 0; 9935 } 9936 } 9937 return -1; 9938 } 9939 getMap() { 9940 return this._map; 9941 } 9942 readCharCode(str, offset, out) { 9943 let c = 0; 9944 const codespaceRanges = this.codespaceRanges; 9945 for (let n = 0, nn = codespaceRanges.length; n < nn; n++) { 9946 c = (c << 8 | str.charCodeAt(offset + n)) >>> 0; 9947 const codespaceRange = codespaceRanges[n]; 9948 for (let k = 0, kk = codespaceRange.length; k < kk;) { 9949 const low = codespaceRange[k++]; 9950 const high = codespaceRange[k++]; 9951 if (c >= low && c <= high) {
vendor: 7,230 bytes, lines 9952-10243
9952 out.charcode = c; 9953 out.length = n + 1; 9954 return; 9955 } 9956 } 9957 } 9958 out.charcode = 0; 9959 out.length = 1; 9960 } 9961 getCharCodeLength(charCode) { 9962 const codespaceRanges = this.codespaceRanges; 9963 for (let n = 0, nn = codespaceRanges.length; n < nn; n++) { 9964 const codespaceRange = codespaceRanges[n]; 9965 for (let k = 0, kk = codespaceRange.length; k < kk;) { 9966 const low = codespaceRange[k++]; 9967 const high = codespaceRange[k++]; 9968 if (charCode >= low && charCode <= high) { 9969 return n + 1; 9970 } 9971 } 9972 } 9973 return 1; 9974 } 9975 get length() { 9976 return this._map.length; 9977 } 9978 get isIdentityCMap() { 9979 if (!(this.name === "Identity-H" || this.name === "Identity-V")) { 9980 return false; 9981 } 9982 if (this._map.length !== 0x10000) { 9983 return false; 9984 } 9985 for (let i = 0; i < 0x10000; i++) { 9986 if (this._map[i] !== i) { 9987 return false; 9988 } 9989 } 9990 return true; 9991 } 9992} 9993class IdentityCMap extends CMap { 9994 constructor(vertical, n) { 9995 super(); 9996 this.vertical = vertical; 9997 this.addCodespaceRange(n, 0, 0xffff); 9998 } 9999 mapCidRange(low, high, dstLow) { 10000 unreachable("should not call mapCidRange"); 10001 } 10002 mapBfRange(low, high, dstLow) { 10003 unreachable("should not call mapBfRange"); 10004 } 10005 mapBfRangeToArray(low, high, array) { 10006 unreachable("should not call mapBfRangeToArray"); 10007 } 10008 mapOne(src, dst) { 10009 unreachable("should not call mapCidOne"); 10010 } 10011 lookup(code) { 10012 return Number.isInteger(code) && code <= 0xffff ? code : undefined; 10013 } 10014 contains(code) { 10015 return Number.isInteger(code) && code <= 0xffff; 10016 } 10017 forEach(callback) { 10018 for (let i = 0; i <= 0xffff; i++) { 10019 callback(i, i); 10020 } 10021 } 10022 charCodeOf(value) { 10023 return Number.isInteger(value) && value <= 0xffff ? value : -1; 10024 } 10025 getMap() { 10026 const map = new Array(0x10000); 10027 for (let i = 0; i <= 0xffff; i++) { 10028 map[i] = i; 10029 } 10030 return map; 10031 } 10032 get length() { 10033 return 0x10000; 10034 } 10035 get isIdentityCMap() { 10036 unreachable("should not access .isIdentityCMap"); 10037 } 10038} 10039function strToInt(str) { 10040 let a = 0; 10041 for (let i = 0; i < str.length; i++) { 10042 a = a << 8 | str.charCodeAt(i); 10043 } 10044 return a >>> 0; 10045} 10046function expectString(obj) { 10047 if (typeof obj !== "string") { 10048 throw new FormatError("Malformed CMap: expected string."); 10049 } 10050} 10051function expectInt(obj) { 10052 if (!Number.isInteger(obj)) { 10053 throw new FormatError("Malformed CMap: expected int."); 10054 } 10055} 10056function parseBfChar(cMap, lexer) { 10057 while (true) { 10058 let obj = lexer.getObj(); 10059 if (obj === EOF) { 10060 break; 10061 } 10062 if (isCmd(obj, "endbfchar")) { 10063 return; 10064 } 10065 expectString(obj); 10066 const src = strToInt(obj); 10067 obj = lexer.getObj(); 10068 expectString(obj); 10069 const dst = obj; 10070 cMap.mapOne(src, dst); 10071 } 10072} 10073function parseBfRange(cMap, lexer) { 10074 while (true) { 10075 let obj = lexer.getObj(); 10076 if (obj === EOF) { 10077 break; 10078 } 10079 if (isCmd(obj, "endbfrange")) { 10080 return; 10081 } 10082 expectString(obj); 10083 const low = strToInt(obj); 10084 obj = lexer.getObj(); 10085 expectString(obj); 10086 const high = strToInt(obj); 10087 obj = lexer.getObj(); 10088 if (Number.isInteger(obj) || typeof obj === "string") { 10089 const dstLow = Number.isInteger(obj) ? String.fromCharCode(obj) : obj; 10090 cMap.mapBfRange(low, high, dstLow); 10091 } else if (isCmd(obj, "[")) { 10092 obj = lexer.getObj(); 10093 const array = []; 10094 while (!isCmd(obj, "]") && obj !== EOF) { 10095 array.push(obj); 10096 obj = lexer.getObj(); 10097 } 10098 cMap.mapBfRangeToArray(low, high, array); 10099 } else { 10100 break; 10101 } 10102 } 10103 throw new FormatError("Invalid bf range."); 10104} 10105function parseCidChar(cMap, lexer) { 10106 while (true) { 10107 let obj = lexer.getObj(); 10108 if (obj === EOF) { 10109 break; 10110 } 10111 if (isCmd(obj, "endcidchar")) { 10112 return; 10113 } 10114 expectString(obj); 10115 const src = strToInt(obj); 10116 obj = lexer.getObj(); 10117 expectInt(obj); 10118 const dst = obj; 10119 cMap.mapOne(src, dst); 10120 } 10121} 10122function parseCidRange(cMap, lexer) { 10123 while (true) { 10124 let obj = lexer.getObj(); 10125 if (obj === EOF) { 10126 break; 10127 } 10128 if (isCmd(obj, "endcidrange")) { 10129 return; 10130 } 10131 expectString(obj); 10132 const low = strToInt(obj); 10133 obj = lexer.getObj(); 10134 expectString(obj); 10135 const high = strToInt(obj); 10136 obj = lexer.getObj(); 10137 expectInt(obj); 10138 const dstLow = obj; 10139 cMap.mapCidRange(low, high, dstLow); 10140 } 10141} 10142function parseCodespaceRange(cMap, lexer) { 10143 while (true) { 10144 let obj = lexer.getObj(); 10145 if (obj === EOF) { 10146 break; 10147 } 10148 if (isCmd(obj, "endcodespacerange")) { 10149 return; 10150 } 10151 if (typeof obj !== "string") { 10152 break; 10153 } 10154 const low = strToInt(obj); 10155 obj = lexer.getObj(); 10156 if (typeof obj !== "string") { 10157 break; 10158 } 10159 const high = strToInt(obj); 10160 cMap.addCodespaceRange(obj.length, low, high); 10161 } 10162 throw new FormatError("Invalid codespace range."); 10163} 10164function parseWMode(cMap, lexer) { 10165 const obj = lexer.getObj(); 10166 if (Number.isInteger(obj)) { 10167 cMap.vertical = !!obj; 10168 } 10169} 10170function parseCMapName(cMap, lexer) { 10171 const obj = lexer.getObj(); 10172 if (obj instanceof Name) { 10173 cMap.name = obj.name; 10174 } 10175} 10176async function parseCMap(cMap, lexer, fetchBuiltInCMap, useCMap) { 10177 let previous, embeddedUseCMap; 10178 objLoop: while (true) { 10179 try { 10180 const obj = lexer.getObj(); 10181 if (obj === EOF) { 10182 break; 10183 } else if (obj instanceof Name) { 10184 if (obj.name === "WMode") { 10185 parseWMode(cMap, lexer); 10186 } else if (obj.name === "CMapName") { 10187 parseCMapName(cMap, lexer); 10188 } 10189 previous = obj; 10190 } else if (obj instanceof Cmd) { 10191 switch (obj.cmd) { 10192 case "endcmap": 10193 break objLoop; 10194 case "usecmap": 10195 if (previous instanceof Name) { 10196 embeddedUseCMap = previous.name; 10197 } 10198 break; 10199 case "begincodespacerange": 10200 parseCodespaceRange(cMap, lexer); 10201 break; 10202 case "beginbfchar": 10203 parseBfChar(cMap, lexer); 10204 break; 10205 case "begincidchar": 10206 parseCidChar(cMap, lexer); 10207 break; 10208 case "beginbfrange": 10209 parseBfRange(cMap, lexer); 10210 break; 10211 case "begincidrange": 10212 parseCidRange(cMap, lexer); 10213 break; 10214 } 10215 } 10216 } catch (ex) { 10217 if (ex instanceof MissingDataException) { 10218 throw ex; 10219 } 10220 warn("Invalid cMap data: " + ex); 10221 continue; 10222 } 10223 } 10224 if (!useCMap && embeddedUseCMap) { 10225 useCMap = embeddedUseCMap; 10226 } 10227 if (useCMap) { 10228 return extendCMap(cMap, fetchBuiltInCMap, useCMap); 10229 } 10230 return cMap; 10231} 10232async function extendCMap(cMap, fetchBuiltInCMap, useCMap) { 10233 cMap.useCMap = await createBuiltInCMap(useCMap, fetchBuiltInCMap); 10234 if (cMap.numCodespaceRanges === 0) { 10235 const useCodespaceRanges = cMap.useCMap.codespaceRanges; 10236 for (let i = 0; i < useCodespaceRanges.length; i++) { 10237 cMap.codespaceRanges[i] = useCodespaceRanges[i].slice(); 10238 } 10239 cMap.numCodespaceRanges = cMap.useCMap.numCodespaceRanges; 10240 } 10241 cMap.useCMap.forEach(function (key, value) { 10242 if (!cMap.contains(key)) { 10243 cMap.mapOne(key,
vendor: 2,369 bytes, lines 10243-10291
10243cMap.useCMap.lookup(key)); 10244 } 10245 }); 10246 return cMap; 10247} 10248async function createBuiltInCMap(name, fetchBuiltInCMap) { 10249 if (name === "Identity-H") { 10250 return new IdentityCMap(false, 2); 10251 } else if (name === "Identity-V") { 10252 return new IdentityCMap(true, 2); 10253 } 10254 if (!BUILT_IN_CMAPS.includes(name)) { 10255 throw new Error("Unknown CMap name: " + name); 10256 } 10257 if (!fetchBuiltInCMap) { 10258 throw new Error("Built-in CMap parameters are not provided."); 10259 } 10260 const { 10261 cMapData, 10262 isCompressed 10263 } = await fetchBuiltInCMap(name); 10264 const cMap = new CMap(true); 10265 if (isCompressed) { 10266 return new BinaryCMapReader().process(cMapData, cMap, useCMap => extendCMap(cMap, fetchBuiltInCMap, useCMap)); 10267 } 10268 const lexer = new Lexer(new Stream(cMapData)); 10269 return parseCMap(cMap, lexer, fetchBuiltInCMap, null); 10270} 10271class CMapFactory { 10272 static async create({ 10273 encoding, 10274 fetchBuiltInCMap, 10275 useCMap 10276 }) { 10277 if (encoding instanceof Name) { 10278 return createBuiltInCMap(encoding.name, fetchBuiltInCMap); 10279 } else if (encoding instanceof BaseStream) { 10280 const parsedCMap = await parseCMap(new CMap(), new Lexer(encoding), fetchBuiltInCMap, useCMap); 10281 if (parsedCMap.isIdentityCMap) { 10282 return createBuiltInCMap(parsedCMap.name, fetchBuiltInCMap); 10283 } 10284 return parsedCMap; 10285 } 10286 throw new Error("Encoding required."); 10287 } 10288} 10289 10290;// ./src/core/charsets.js 10291const ISOAdobeCharset = [".notdef", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quoteright", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "quoteleft", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "braceleft", "bar", "braceright", "asciitilde", "exclamdown", "cent", "sterling", "fraction", "yen", "florin", "section", "currency", "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft", "guilsinglright", "fi", "fl", "endash", "dagger", "daggerdbl", "periodce
10291ntered", "paragraph", "bullet", "quotesinglbase", "quotedblbase", "quotedblright", "guillemotright", "ellipsis", "perthousand", "questiondown", "grave", "acute", "circumflex", "tilde", "macron", "breve", "dotaccent", "dieresis", "ring", "cedilla", "hungarumlaut", "ogonek", "caron", "emdash", "AE", "ordfeminine", "Lslash", "Oslash", "OE", "ordmasculine", "ae", "dotlessi", "lslash", "oslash", "oe", "germandbls", "onesuperior", "logicalnot", "mu", "trademark", "Eth", "onehalf", "plusminus", "Thorn", "onequarter", "divide", "brokenbar", "degree", "thorn", "threequarters", "twosuperior", "registered", "minus", "eth", "multiply", "threesuperior", "copyright", "Aacute", "Acircumflex", "Adieresis", "Agrave", "Aring", "Atilde", "Ccedilla", "Eacute", "Ecircumflex", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", "Igrave", "Ntilde", "Oacute", "Ocircumflex", "Odieresis", "Ograve", "Otilde", "Scaron", "Uacute", "Ucircumflex", "Udieresis", "Ugrave", "Yacute", "Ydieresis", "Zcaron", "aacute", "acircumflex", "adieresis", "agrave", "aring", "atilde", "ccedilla", "eacute", "ecircumflex", "edieresis", "egrave", "iacute", "icircumflex", "idieresis", "igrave", "ntilde", "oacute", "ocircumflex", "odieresis", "ograve", "otilde", "scaron", "uacute", "ucircumflex", "udieresis", "ugrave", "yacute", "ydieresis", "zcaron"]; 10292const ExpertCharset = [".notdef", "space", "exclamsmall", "Hungarumlautsmall", "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "comma", "hyphen", "period", "fraction", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "colon", "semicolon", "commasuperior", "threequartersemdash", "periodsuperior", "questionsmall", "asuperior", "bsuperior", "centsuperior", "dsuperior", "esuperior", "isuperior", "lsuperior", "msuperior", "nsuperior", "osuperior", "rsuperior", "ssuperior", "tsuperior", "ff", "fi", "fl", "ffi", "ffl", "parenleftinferior", "parenrightinferior", "Circumflexsmall", "hyphensuperior", "Gravesmall", "Asmall", "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall", "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall", "colonmonetary", "onefitted", "rupiah", "Tildesmall", "exclamdownsmall", "centoldstyle", "Lslashsmall", "Scaronsmall", "Zcaronsmall", "Dieresissmall", "Brevesmall", "Caronsmall", "Dotaccentsmall", "Macronsmall", "figuredash", "hypheninferior", "Ogoneksmall", "Ringsmall", "Cedillasmall", "onequarter", "onehalf", "threequarters", "questiondownsmall", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "zerosuperior", "onesuperior", "twosuperior", "threesuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior", "oneinferior", "twoinferior", "threeinferior", "fourinferior", "fiveinferior", "sixinferior", "seveninferior", "eightinferior", "nineinferior", "centinferior", "dollarinferior", "periodinferior", "commainferior", "Agravesmall", "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall", "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall", "Eacutesmall", "Ecircumflexsmall", "Edieresissmall", "Igravesmall", "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall", "Ntildesmall", "Ogravesmall", "Oacutesmall", "Ocircumflexsmall", "Otildesmall", "Odieresissmall", "OEsmall", "Oslashsmall", "Ugravesmall", "Uacutesmall", "Ucircumflexsmall", "Udieresissmall", "Yacutesmall", "Thornsmall", "Ydieresissmall"]; 10293const ExpertSubsetCharset = [".notdef", "space", "dollaroldstyle", "dollarsuperior", "parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "comma", "hyphen", "period", "fraction", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "colon", "semicolon", "commasuperior", "threequartersemdash", "periodsuperior", "asuperior", "bsuperior", "centsuperior", "dsuperior", "esuperior", "isuperior", "lsuperior", "msuperior", "nsuperior", "osuperior", "rsuperior", "ssuperior", "tsuperior", "ff", "fi", "fl", "ffi", "ffl", "parenleftinferior", "parenrightinferior", "hyphensuperior", "colonmonetary", "onefitted", "rupiah", "centoldstyle", "figuredash", "hypheninferior", "onequarter", "onehalf", "threequarters", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "zerosuperior", "onesuperior", "twosuperior", "threesuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior", "oneinferior", "twoinferior", "threeinferior", "fourinferior", "fiveinferior", "sixinferior", "seveninferior", "eightinferior", "nineinferior", "centinferior", "dollarinferior", "periodinferior", "commainferior"];
vendor: 16,958 bytes, lines 10293-10324
10293 10294 10295;// ./src/core/encodings.js 10296const ExpertEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclamsmall", "Hungarumlautsmall", "", "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "comma", "hyphen", "period", "fraction", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "colon", "semicolon", "commasuperior", "threequartersemdash", "periodsuperior", "questionsmall", "", "asuperior", "bsuperior", "centsuperior", "dsuperior", "esuperior", "", "", "", "isuperior", "", "", "lsuperior", "msuperior", "nsuperior", "osuperior", "", "", "rsuperior", "ssuperior", "tsuperior", "", "ff", "fi", "fl", "ffi", "ffl", "parenleftinferior", "", "parenrightinferior", "Circumflexsmall", "hyphensuperior", "Gravesmall", "Asmall", "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall", "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall", "colonmonetary", "onefitted", "rupiah", "Tildesmall", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "exclamdownsmall", "centoldstyle", "Lslashsmall", "", "", "Scaronsmall", "Zcaronsmall", "Dieresissmall", "Brevesmall", "Caronsmall", "", "Dotaccentsmall", "", "", "Macronsmall", "", "", "figuredash", "hypheninferior", "", "", "Ogoneksmall", "Ringsmall", "Cedillasmall", "", "", "", "onequarter", "onehalf", "threequarters", "questiondownsmall", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "", "", "zerosuperior", "onesuperior", "twosuperior", "threesuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior", "oneinferior", "twoinferior", "threeinferior", "fourinferior", "fiveinferior", "sixinferior", "seveninferior", "eightinferior", "nineinferior", "centinferior", "dollarinferior", "periodinferior", "commainferior", "Agravesmall", "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall", "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall", "Eacutesmall", "Ecircumflexsmall", "Edieresissmall", "Igravesmall", "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall", "Ntildesmall", "Ogravesmall", "Oacutesmall", "Ocircumflexsmall", "Otildesmall", "Odieresissmall", "OEsmall", "Oslashsmall", "Ugravesmall", "Uacutesmall", "Ucircumflexsmall", "Udieresissmall", "Yacutesmall", "Thornsmall", "Ydieresissmall"]; 10297const MacExpertEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclamsmall", "Hungarumlautsmall", "centoldstyle", "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "comma", "hyphen", "period", "fraction", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "colon", "semicolon", "", "threequartersemdash", "", "questionsmall", "", "", "", "", "Ethsmall", "", "", "onequarter", "onehalf", "threequarters", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "", "", "", "", "", "", "ff", "fi", "fl", "ffi", "ffl", "parenleftinferior", "", "parenrightinferior", "Circumflexsmall", "hypheninferior", "Gravesmall", "Asmall", "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall", "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall", "colonmonetary", "onefitted", "rupiah", "Tildesmall", "", "", "asuperior", "centsuperior", "", "", "", "", "Aacutesmall", "Agravesmall", "Acircumflexsmall", "Adieresissmall", "Atildesmall", "Aringsmall", "Ccedillasmall", "Eacutesmall", "Egravesmall", "Ecircumflexsmall", "Edieresissmall", "Iacutesmall", "Igravesmall", "Icircumflexsmall", "Idieresissmall", "Ntildesmall", "Oacutesmall", "Ogravesmall", "Ocircumflexsmall", "Odieresissmall", "Otildesmall", "Uacutesmall", "Ugravesmall", "Ucircumflexsmall", "Udieresissmall", "", "eightsuperior", "fourinferior", "threeinferior", "sixinferior", "eightinferior", "seveninferior", "Scaronsmall", "", "centinferior", "twoinferior", "", "Dieresissmall", "", "Caronsmall", "osuperior", "fiveinferior", "", "commainferior", "periodinferior", "Yacutesmall", "", "dollarinferior", "", "", "Thornsmall", "", "nineinferior", "zeroinferior", "Zcaronsmall", "AEsmall", "Oslashsmall", "questiondownsmall", "oneinferior", "Lslashsmall", "", "", "", "", "", "", "Cedillasmall", "", "", "", "", "", "OEsmall", "figuredash", "hyphensuperior", "", "", "", "", "exclamdownsmall", "", "Ydieresissmall", "", "onesuperior", "twosuperior", "threesuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "ninesuperior", "zerosuperior", "", "esuperior", "rsuperior", "tsuperior", "", "", "isuperior", "ssuperior", "dsuperior", "", "", "", "", "", "lsuperior", "Ogoneksmall", "Brevesmall", "Macronsmall", "bsuperior", "nsuperior", "msuperior", "commasuperior", "periodsuperior", "Dotaccentsmall", "Ringsmall", "", "", "", ""]; 10298const MacRomanEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quotesingle", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "grave", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "braceleft", "bar", "braceright", "asciitilde", "", "Adieresis", "Aring", "Ccedilla", "Eacute", "Ntilde", "Odieresis", "Udieresis", "aacute", "agrave", "acircumflex", "adieresis", "atilde", "aring", "ccedilla", "eacute", "egrave", "ecircumflex", "edieresis", "iacute", "igrave", "icircumflex", "idieresis", "ntilde", "oacute", "ograve", "ocircumflex", "odieresis", "otilde", "uacute", "ugrave", "ucircumflex", "udieresis", "dagger", "degree", "cent", "sterling", "section", "bullet", "paragraph", "germandbls", "registered", "copyright", "trademark", "acute", "dieresis", "notequal", "AE", "Oslash", "infinity", "plusminus", "lessequal", "greaterequal", "yen", "mu", "partialdiff", "summation", "product", "pi", "integral", "ordfeminine", "ordmasculine", "Omega", "ae", "oslash", "questiondown", "exclamdown", "logicalnot", "radical", "florin", "approxequal", "Delta", "guillemotleft", "guillemotright", "ellipsis", "space", "Agrave", "Atilde", "Otilde", "OE", "oe", "endash", "emdash", "quotedblleft", "quotedblright", "quoteleft", "quoteright", "divide", "lozenge", "ydieresis", "Ydieresis", "fraction", "currency", "guilsinglleft", "guilsinglright", "fi", "fl", "daggerdbl", "periodcentered", "quotesinglbase", "quotedblbase", "perthousand", "Acircumflex", "Ecircumflex", "Aacute", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", "Igrave", "Oacute", "Ocircumflex", "apple", "Ograve", "Uacute", "Ucircumflex", "Ugrave", "dotlessi", "circumflex", "tilde", "macron", "breve", "dotaccent", "ring", "cedilla", "hungarumlaut", "ogonek", "caron"]; 10299const StandardEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quoteright", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "quoteleft", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "braceleft", "bar", "braceright", "asciitilde", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "exclamdown", "cent", "sterling", "fraction", "yen", "florin", "section", "currency", "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft", "guilsinglright", "fi", "fl", "", "endash", "dagger", "daggerdbl", "periodcentered", "", "paragraph", "bullet", "quotesinglbase", "quotedblbase", "quotedblright", "guillemotright", "ellipsis", "perthousand", "", "questiondown", "", "grave", "acute", "circumflex", "tilde", "macron", "breve", "dotaccent", "dieresis", "", "ring", "cedilla", "", "hungarumlaut", "ogonek", "caron", "emdash", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "AE", "", "ordfeminine", "", "", "", "", "Lslash", "Oslash", "OE", "ordmasculine", "", "", "", "", "", "ae", "", "", "", "dotlessi", "", "", "lslash", "oslash", "oe", "germandbls", "", "", "", ""]; 10300const WinAnsiEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quotesingle", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "grave", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "braceleft", "bar", "braceright", "asciitilde", "bullet", "Euro", "bullet", "quotesinglbase", "florin", "quotedblbase", "ellipsis", "dagger", "daggerdbl", "circumflex", "perthousand", "Scaron", "guilsinglleft", "OE", "bullet", "Zcaron", "bullet", "bullet", "quoteleft", "quoteright", "quotedblleft", "quotedblright", "bullet", "endash", "emdash", "tilde", "trademark", "scaron", "guilsinglright", "oe", "bullet", "zcaron", "Ydieresis", "space", "exclamdown", "cent", "sterling", "currency", "yen", "brokenbar", "section", "dieresis", "copyright", "ordfeminine", "guillemotleft", "logicalnot", "hyphen", "registered", "macron", "degree", "plusminus", "twosuperior", "threesuperior", "acute", "mu", "paragraph", "periodcentered", "cedilla", "onesuperior", "ordmasculine", "guillemotright", "onequarter", "onehalf", "threequarters", "questiondown", "Agrave", "Aacute", "Acircumflex", "Atilde", "Adieresis", "Aring", "AE", "Ccedilla", "Egrave", "Eacute", "Ecircumflex", "Edieresis", "Igrave", "Iacute", "Icircumflex", "Idieresis", "Eth", "Ntilde", "Ograve", "Oacute", "Ocircumflex", "Otilde", "Odieresis", "multiply", "Oslash", "Ugrave", "Uacute", "Ucircumflex", "Udieresis", "Yacute", "Thorn", "germandbls", "agrave", "aacute", "acircumflex", "atilde", "adieresis", "aring", "ae", "ccedilla", "egrave", "eacute", "ecircumflex", "edieresis", "igrave", "iacute", "icircumflex", "idieresis", "eth", "ntilde", "ograve", "oacute", "ocircumflex", "otilde", "odieresis", "divide", "oslash", "ugrave", "uacute", "ucircumflex", "udieresis", "yacute", "thorn", "ydieresis"]; 10301const SymbolSetEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "exclam", "universal", "numbersign", "existential", "percent", "ampersand", "suchthat", "parenleft", "parenright", "asteriskmath", "plus", "comma", "minus", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "congruent", "Alpha", "Beta", "Chi", "Delta", "Epsilon", "Phi", "Gamma", "Eta", "Iota", "theta1", "Kappa", "Lambda", "Mu", "Nu", "Omicron", "Pi", "Theta", "Rho", "Sigma", "Tau", "Upsilon", "sigma1", "Omega", "Xi", "Psi", "Zeta", "bracketleft", "therefore", "bracketright", "perpendicular", "underscore", "radicalex", "alpha", "beta", "chi", "delta", "epsilon", "phi", "gamma", "eta", "iota", "phi1", "kappa", "lambda", "mu", "nu", "omicron", "pi", "theta", "rho", "sigma", "tau", "upsilon", "omega1", "omega", "xi", "psi", "zeta", "braceleft", "bar", "braceright", "similar", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "Euro", "Upsilon1", "minute", "lessequal", "fraction", "infinity", "florin", "club", "diamond", "heart", "spade", "arrowboth", "arrowleft", "arrowup", "arrowright", "arrowdown", "degree", "plusminus", "second", "greaterequal", "multiply", "proportional", "partialdiff", "bullet", "divide", "notequal", "equivalence", "approxequal", "ellipsis", "arrowvertex", "arrowhorizex", "carriagereturn", "aleph", "Ifraktur", "Rfraktur", "weierstrass", "circlemultiply", "circleplus", "emptyset", "intersection", "union", "propersuperset", "reflexsuperset", "notsubset", "propersubset", "reflexsubset", "element", "notelement", "angle", "gradient", "registerserif", "copyrightserif", "trademarkserif", "product", "radical", "dotmath", "logicalnot", "logicaland", "logicalor", "arrowdblboth", "arrowdblleft", "arrowdblup", "arrowdblright", "arrowdbldown", "lozenge", "angleleft", "registersans", "copyrightsans", "trademarksans", "summation", "parenlefttp", "parenleftex", "parenleftbt", "bracketlefttp", "bracketleftex", "bracketleftbt", "bracelefttp", "braceleftmid", "braceleftbt", "braceex", "", "angleright", "integral", "integraltp", "integralex", "integralbt", "parenrighttp", "parenrightex", "parenrightbt", "bracketrighttp", "bracketrightex", "bracketrightbt", "bracerighttp", "bracerightmid", "bracerightbt", ""]; 10302const ZapfDingbatsEncoding = ["", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "space", "a1", "a2", "a202", "a3", "a4", "a5", "a119", "a118", "a117", "a11", "a12", "a13", "a14", "a15", "a16", "a105", "a17", "a18", "a19", "a20", "a21", "a22", "a23", "a24", "a25", "a26", "a27", "a28", "a6", "a7", "a8", "a9", "a10", "a29", "a30", "a31", "a32", "a33", "a34", "a35", "a36", "a37", "a38", "a39", "a40", "a41", "a42", "a43", "a44", "a45", "a46", "a47", "a48", "a49", "a50", "a51", "a52", "a53", "a54", "a55", "a56", "a57", "a58", "a59", "a60", "a61", "a62", "a63", "a64", "a65", "a66", "a67", "a68", "a69", "a70", "a71", "a72", "a73", "a74", "a203", "a75", "a204", "a76", "a77", "a78", "a79", "a81", "a82", "a83", "a84", "a97", "a98", "a99", "a100", "", "a89", "a90", "a93", "a94", "a91", "a92", "a205", "a85", "a206", "a86", "a87", "a88", "a95", "a96", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "a101", "a102", "a103", "a104", "a106", "a107", "a108", "a112", "a111", "a110", "a109", "a120", "a121", "a122", "a123", "a124", "a125", "a126", "a127", "a128", "a129", "a130", "a131", "a132", "a133", "a134", "a135", "a136", "a137", "a138", "a139", "a140", "a141", "a142", "a143", "a144", "a145", "a146", "a147", "a148", "a149", "a150", "a151", "a152", "a153", "a154", "a155", "a156", "a157", "a158", "a159", "a160", "a161", "a163", "a164", "a196", "a165", "a192", "a166", "a167", "a168", "a169", "a170", "a171", "a172", "a173", "a162", "a174", "a175", "a176", "a177", "a178", "a179", "a193", "a180", "a199", "a181", "a200", "a182", "", "a201", "a183", "a184", "a197", "a185", "a194", "a198", "a186", "a195", "a187", "a188", "a189", "a190", "a191", ""]; 10303function getEncoding(encodingName) { 10304 switch (encodingName) { 10305 case "WinAnsiEncoding": 10306 return WinAnsiEncoding; 10307 case "StandardEncoding": 10308 return StandardEncoding; 10309 case "MacRomanEncoding": 10310 return MacRomanEncoding; 10311 case "SymbolSetEncoding": 10312 return SymbolSetEncoding; 10313 case "ZapfDingbatsEncoding": 10314 return ZapfDingbatsEncoding; 10315 case "ExpertEncoding": 10316 return ExpertEncoding; 10317 case "MacExpertEncoding": 10318 return MacExpertEncoding; 10319 default: 10320 return null; 10321 } 10322} 10323 10324;// ./src/core/
10324cff_parser.js
vendor: 11,504 bytes, lines 10324-10639
10324 10325 10326 10327 10328const MAX_SUBR_NESTING = 10; 10329const CFFStandardStrings = [".notdef", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quoteright", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "quoteleft", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "braceleft", "bar", "braceright", "asciitilde", "exclamdown", "cent", "sterling", "fraction", "yen", "florin", "section", "currency", "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft", "guilsinglright", "fi", "fl", "endash", "dagger", "daggerdbl", "periodcentered", "paragraph", "bullet", "quotesinglbase", "quotedblbase", "quotedblright", "guillemotright", "ellipsis", "perthousand", "questiondown", "grave", "acute", "circumflex", "tilde", "macron", "breve", "dotaccent", "dieresis", "ring", "cedilla", "hungarumlaut", "ogonek", "caron", "emdash", "AE", "ordfeminine", "Lslash", "Oslash", "OE", "ordmasculine", "ae", "dotlessi", "lslash", "oslash", "oe", "germandbls", "onesuperior", "logicalnot", "mu", "trademark", "Eth", "onehalf", "plusminus", "Thorn", "onequarter", "divide", "brokenbar", "degree", "thorn", "threequarters", "twosuperior", "registered", "minus", "eth", "multiply", "threesuperior", "copyright", "Aacute", "Acircumflex", "Adieresis", "Agrave", "Aring", "Atilde", "Ccedilla", "Eacute", "Ecircumflex", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", "Igrave", "Ntilde", "Oacute", "Ocircumflex", "Odieresis", "Ograve", "Otilde", "Scaron", "Uacute", "Ucircumflex", "Udieresis", "Ugrave", "Yacute", "Ydieresis", "Zcaron", "aacute", "acircumflex", "adieresis", "agrave", "aring", "atilde", "ccedilla", "eacute", "ecircumflex", "edieresis", "egrave", "iacute", "icircumflex", "idieresis", "igrave", "ntilde", "oacute", "ocircumflex", "odieresis", "ograve", "otilde", "scaron", "uacute", "ucircumflex", "udieresis", "ugrave", "yacute", "ydieresis", "zcaron", "exclamsmall", "Hungarumlautsmall", "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "commasuperior", "threequartersemdash", "periodsuperior", "questionsmall", "asuperior", "bsuperior", "centsuperior", "dsuperior", "esuperior", "isuperior", "lsuperior", "msuperior", "nsuperior", "osuperior", "rsuperior", "ssuperior", "tsuperior", "ff", "ffi", "ffl", "parenleftinferior", "parenrightinferior", "Circumflexsmall", "hyphensuperior", "Gravesmall", "Asmall", "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall", "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall", "colonmonetary", "onefitted", "rupiah", "Tildesmall", "exclamdownsmall", "centoldstyle", "Lslashsmall", "Scaronsmall", "Zcaronsmall", "Dieresissmall", "Brevesmall", "Caronsmall", "Dotaccentsmall", "Macronsmall", "figuredash", "hypheninferior", "Ogoneksmall", "Ringsmall", "Cedillasmall", "questiondownsmall", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "zerosuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior", "oneinferior", "twoinferior", "threeinferior", "fourinferior", "fiveinferior", "sixinferior", "seveninferior", "eightinferior", "nineinferior", "centinferior", "dollarinferior", "periodinferior", "commainferior", "Agravesmall", "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall", "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall", "Eacutesmall", "Ecircumflexsmall", "Edieresissmall", "Igravesmall", "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall", "Ntildesmall", "Ogravesmall", "Oacutesmall", "Ocircumflexsmall", "Otildesmall", "Odieresissmall", "OEsmall", "Oslashsmall", "Ugravesmall", "Uacutesmall", "Ucircumflexsmall", "Udieresissmall", "Yacutesmall", "Thornsmall", "Ydieresissmall", "001.000", "001.001", "001.002", "001.003", "Black", "Bold", "Book", "Light", "Medium", "Regular", "Roman", "Semibold"]; 10330const NUM_STANDARD_CFF_STRINGS = 391; 10331const CharstringValidationData = [null, { 10332 id: "hstem", 10333 min: 2, 10334 stackClearing: true, 10335 stem: true 10336}, null, { 10337 id: "vstem", 10338 min: 2, 10339 stackClearing: true, 10340 stem: true 10341}, { 10342 id: "vmoveto", 10343 min: 1, 10344 stackClearing: true 10345}, { 10346 id: "rlineto", 10347 min: 2, 10348 resetStack: true 10349}, { 10350 id: "hlineto", 10351 min: 1, 10352 resetStack: true 10353}, { 10354 id: "vlineto", 10355 min: 1, 10356 resetStack: true 10357}, { 10358 id: "rrcurveto", 10359 min: 6, 10360 resetStack: true 10361}, null, { 10362 id: "callsubr", 10363 min: 1, 10364 undefStack: true 10365}, { 10366 id: "return", 10367 min: 0, 10368 undefStack: true 10369}, null, null, { 10370 id: "endchar", 10371 min: 0, 10372 stackClearing: true 10373}, null, null, null, { 10374 id: "hstemhm", 10375 min: 2, 10376 stackClearing: true, 10377 stem: true 10378}, { 10379 id: "hintmask", 10380 min: 0, 10381 stackClearing: true 10382}, { 10383 id: "cntrmask", 10384 min: 0, 10385 stackClearing: true 10386}, { 10387 id: "rmoveto", 10388 min: 2, 10389 stackClearing: true 10390}, { 10391 id: "hmoveto", 10392 min: 1, 10393 stackClearing: true 10394}, { 10395 id: "vstemhm", 10396 min: 2, 10397 stackClearing: true, 10398 stem: true 10399}, { 10400 id: "rcurveline", 10401 min: 8, 10402 resetStack: true 10403}, { 10404 id: "rlinecurve", 10405 min: 8, 10406 resetStack: true 10407}, { 10408 id: "vvcurveto", 10409 min: 4, 10410 resetStack: true 10411}, { 10412 id: "hhcurveto", 10413 min: 4, 10414 resetStack: true 10415}, null, { 10416 id: "callgsubr", 10417 min: 1, 10418 undefStack: true 10419}, { 10420 id: "vhcurveto", 10421 min: 4, 10422 resetStack: true 10423}, { 10424 id: "hvcurveto", 10425 min: 4, 10426 resetStack: true 10427}]; 10428const CharstringValidationData12 = [null, null, null, { 10429 id: "and", 10430 min: 2, 10431 stackDelta: -1 10432}, { 10433 id: "or", 10434 min: 2, 10435 stackDelta: -1 10436}, { 10437 id: "not", 10438 min: 1, 10439 stackDelta: 0 10440}, null, null, null, { 10441 id: "abs", 10442 min: 1, 10443 stackDelta: 0 10444}, { 10445 id: "add", 10446 min: 2, 10447 stackDelta: -1, 10448 stackFn(stack, index) { 10449 stack[index - 2] = stack[index - 2] + stack[index - 1]; 10450 } 10451}, { 10452 id: "sub", 10453 min: 2, 10454 stackDelta: -1, 10455 stackFn(stack, index) { 10456 stack[index - 2] = stack[index - 2] - stack[index - 1]; 10457 } 10458}, { 10459 id: "div", 10460 min: 2, 10461 stackDelta: -1, 10462 stackFn(stack, index) { 10463 stack[index - 2] = stack[index - 2] / stack[index - 1]; 10464 } 10465}, null, { 10466 id: "neg", 10467 min: 1, 10468 stackDelta: 0, 10469 stackFn(stack, index) { 10470 stack[index - 1] = -stack[index - 1]; 10471 } 10472}, { 10473 id: "eq", 10474 min: 2, 10475 stackDelta: -1 10476}, null, null, { 10477 id: "drop", 10478 min: 1, 10479 stackDelta: -1 10480}, null, { 10481 id: "put", 10482 min: 2, 10483 stackDelta: -2 10484}, { 10485 id: "get", 10486 min: 1, 10487 stackDelta: 0 10488}, { 10489 id: "ifelse", 10490 min: 4, 10491 stackDelta: -3 10492}, { 10493 id: "random", 10494 min: 0, 10495 stackDelta: 1 10496}, { 10497 id: "mul", 10498 min: 2, 10499 stackDelta: -1, 10500 stackFn(stack, index) { 10501 stack[index - 2] = stack[index - 2] * stack[index - 1]; 10502 } 10503}, null, { 10504 id: "sqrt", 10505 min: 1, 10506 stackDelta: 0 10507}, { 10508 id: "dup", 10509 min: 1, 10510 stackDelta: 1 10511}, { 10512 id: "exch", 10513 min: 2, 10514 stackDelta: 0 10515}, { 10516 id: "index", 10517 min: 2, 10518 stackDelta: 0 10519}, { 10520 id: "roll", 10521 min: 3, 10522 stackDelta: -2 10523}, null, null, null, { 10524 id: "hflex", 10525 min: 7, 10526 resetStack: true 10527}, { 10528 id: "flex", 10529 min: 13, 10530 resetStack: true 10531}, { 10532 id: "hflex1", 10533 min: 9, 10534 resetStack: true 10535}, { 10536 id: "flex1", 10537 min: 11, 10538 resetStack: true 10539}]; 10540class CFFParser { 10541 constructor(file, properties, seacAnalysisEnabled) { 10542 this.bytes = file.getBytes(); 10543 this.properties = properties; 10544 this.seacAnalysisEnabled = !!seacAnalysisEnabled; 10545 } 10546 parse() { 10547 const properties = this.properties; 10548 const cff = new CFF(); 10549 this.cff = cff; 10550 const header = this.parseHeader(); 10551 const nameIndex = this.parseIndex(header.endPos); 10552 const topDictIndex = this.parseIndex(nameIndex.endPos); 10553 const stringIndex = this.parseIndex(topDictIndex.endPos); 10554 const globalSubrIndex = this.parseIndex(stringIndex.endPos); 10555 const topDictParsed = this.parseDict(topDictIndex.obj.get(0)); 10556 const topDict = this.createDict(CFFTopDict, topDictParsed, cff.strings); 10557 cff.header = header.obj; 10558 cff.names = this.parseNameIndex(nameIndex.obj); 10559 cff.strings = this.parseStringIndex(stringIndex.obj); 10560 cff.topDict = topDict; 10561 cff.globalSubrIndex = globalSubrIndex.obj; 10562 this.parsePrivateDict(cff.topDict); 10563 cff.isCIDFont = topDict.hasName("ROS"); 10564 const charStringOffset = topDict.getByName("CharStrings"); 10565 const charStringIndex = this.parseIndex(charStringOffset).obj; 10566 const fontMatrix = topDict.getByName("FontMatrix"); 10567 if (fontMatrix) { 10568 properties.fontMatrix = fontMatrix; 10569 } 10570 const fontBBox = topDict.getByName("FontBBox"); 10571 if (fontBBox) { 10572 properties.ascent = Math.max(fontBBox[3], fontBBox[1]); 10573 properties.descent = Math.min(fontBBox[1], fontBBox[3]); 10574 properties.ascentScaled = true; 10575 } 10576 let charset, encoding; 10577 if (cff.isCIDFont) { 10578 const fdArrayIndex = this.parseIndex(topDict.getByName("FDArray")).obj; 10579 for (let i = 0, ii = fdArrayIndex.count; i < ii; ++i) { 10580 const dictRaw = fdArrayIndex.get(i); 10581 const fontDict = this.createDict(CFFTopDict, this.parseDict(dictRaw), cff.strings); 10582 this.parsePrivateDict(fontDict); 10583 cff.fdArray.push(fontDict); 10584 } 10585 encoding = null; 10586 charset = this.parseCharsets(topDict.getByName("charset"), charStringIndex.count, cff.strings, true); 10587 cff.fdSelect = this.parseFDSelect(topDict.getByName("FDSelect"), charStringIndex.count); 10588 } else { 10589 charset = this.parseCharsets(topDict.getByName("charset"), charStringIndex.count, cff.strings, false); 10590 encoding = this.parseEncoding(topDict.getByName("Encoding"), properties, cff.strings, charset.charset); 10591 } 10592 cff.charset = charset; 10593 cff.encoding = encoding; 10594 const charStringsAndSeacs = this.parseCharStrings({ 10595 charStrings: charStringIndex, 10596 localSubrIndex: topDict.privateDict.subrsIndex, 10597 globalSubrIndex: globalSubrIndex.obj, 10598 fdSelect: cff.fdSelect, 10599 fdArray: cff.fdArray, 10600 privateDict: topDict.privateDict 10601 }); 10602 cff.charStrings = charStringsAndSeacs.charStrings; 10603 cff.seacs = charStringsAndSeacs.seacs; 10604 cff.widths = charStringsAndSeacs.widths; 10605 return cff; 10606 } 10607 parseHeader() { 10608 let bytes = this.bytes; 10609 const bytesLength = bytes.length; 10610 let offset = 0; 10611 while (offset < bytesLength && bytes[offset] !== 1) { 10612 ++offset; 10613 } 10614 if (offset >= bytesLength) { 10615 throw new FormatError("Invalid CFF header"); 10616 } 10617 if (offset !== 0) { 10618 info("cff data is shifted"); 10619 bytes = bytes.subarray(offset); 10620 this.bytes = bytes; 10621 } 10622 const major = bytes[0]; 10623 const minor = bytes[1]; 10624 const hdrSize = bytes[2]; 10625 const offSize = bytes[3]; 10626 const header = new CFFHeader(major, minor, hdrSize, offSize); 10627 return { 10628 obj: header, 10629 endPos: hdrSize 10630 }; 10631 } 10632 parseDict(dict) { 10633 let pos = 0; 10634 function parseOperand() { 10635 let value = dict[pos++]; 10636 if (value === 30) { 10637 return parseFloatOperand(); 10638 } else if (value === 28) { 10639 value =
vendor: 3,774 bytes, lines 10639-10770
10639dict[pos++]; 10640 value = (value << 24 | dict[pos++] << 16) >> 16; 10641 return value; 10642 } else if (value === 29) { 10643 value = dict[pos++]; 10644 value = value << 8 | dict[pos++]; 10645 value = value << 8 | dict[pos++]; 10646 value = value << 8 | dict[pos++]; 10647 return value; 10648 } else if (value >= 32 && value <= 246) { 10649 return value - 139; 10650 } else if (value >= 247 && value <= 250) { 10651 return (value - 247) * 256 + dict[pos++] + 108; 10652 } else if (value >= 251 && value <= 254) { 10653 return -((value - 251) * 256) - dict[pos++] - 108; 10654 } 10655 warn('CFFParser_parseDict: "' + value + '" is a reserved command.'); 10656 return NaN; 10657 } 10658 function parseFloatOperand() { 10659 let str = ""; 10660 const eof = 15; 10661 const lookup = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "E", "E-", null, "-"]; 10662 const length = dict.length; 10663 while (pos < length) { 10664 const b = dict[pos++]; 10665 const b1 = b >> 4; 10666 const b2 = b & 15; 10667 if (b1 === eof) { 10668 break; 10669 } 10670 str += lookup[b1]; 10671 if (b2 === eof) { 10672 break; 10673 } 10674 str += lookup[b2]; 10675 } 10676 return parseFloat(str); 10677 } 10678 let operands = []; 10679 const entries = []; 10680 pos = 0; 10681 const end = dict.length; 10682 while (pos < end) { 10683 let b = dict[pos]; 10684 if (b <= 21) { 10685 if (b === 12) { 10686 b = b << 8 | dict[++pos]; 10687 } 10688 entries.push([b, operands]); 10689 operands = []; 10690 ++pos; 10691 } else { 10692 operands.push(parseOperand()); 10693 } 10694 } 10695 return entries; 10696 } 10697 parseIndex(pos) { 10698 const cffIndex = new CFFIndex(); 10699 const bytes = this.bytes; 10700 const count = bytes[pos++] << 8 | bytes[pos++]; 10701 const offsets = []; 10702 let end = pos; 10703 let i, ii; 10704 if (count !== 0) { 10705 const offsetSize = bytes[pos++]; 10706 const startPos = pos + (count + 1) * offsetSize - 1; 10707 for (i = 0, ii = count + 1; i < ii; ++i) { 10708 let offset = 0; 10709 for (let j = 0; j < offsetSize; ++j) { 10710 offset <<= 8; 10711 offset += bytes[pos++]; 10712 } 10713 offsets.push(startPos + offset); 10714 } 10715 end = offsets[count]; 10716 } 10717 for (i = 0, ii = offsets.length - 1; i < ii; ++i) { 10718 const offsetStart = offsets[i]; 10719 const offsetEnd = offsets[i + 1]; 10720 cffIndex.add(bytes.subarray(offsetStart, offsetEnd)); 10721 } 10722 return { 10723 obj: cffIndex, 10724 endPos: end 10725 }; 10726 } 10727 parseNameIndex(index) { 10728 const names = []; 10729 for (let i = 0, ii = index.count; i < ii; ++i) { 10730 const name = index.get(i); 10731 names.push(bytesToString(name)); 10732 } 10733 return names; 10734 } 10735 parseStringIndex(index) { 10736 const strings = new CFFStrings(); 10737 for (let i = 0, ii = index.count; i < ii; ++i) { 10738 const data = index.get(i); 10739 strings.add(bytesToString(data)); 10740 } 10741 return strings; 10742 } 10743 createDict(Type, dict, strings) { 10744 const cffDict = new Type(strings); 10745 for (const [key, value] of dict) { 10746 cffDict.setByKey(key, value); 10747 } 10748 return cffDict; 10749 } 10750 parseCharString(state, data, localSubrIndex, globalSubrIndex) { 10751 if (!data || state.callDepth > MAX_SUBR_NESTING) { 10752 return false; 10753 } 10754 let stackSize = state.stackSize; 10755 const stack = state.stack; 10756 let length = data.length; 10757 for (let j = 0; j < length;) { 10758 const value = data[j++]; 10759 let validationCommand = null; 10760 if (value === 12) { 10761 const q = data[j++]; 10762 if (q === 0) { 10763 data[j - 2] = 139; 10764 data[j - 1] = 22; 10765 stackSize = 0; 10766 } else { 10767 validationCommand = CharstringValidationData12[q]; 10768 } 10769 } else if (value === 28) { 10770 stack[stackSize] = (data[j] << 24 | data[j + 1] << 16) >> 16
vendor: 30,681 bytes, lines 10770-11681
10770; 10771 j += 2; 10772 stackSize++; 10773 } else if (value === 14) { 10774 if (stackSize >= 4) { 10775 stackSize -= 4; 10776 if (this.seacAnalysisEnabled) { 10777 state.seac = stack.slice(stackSize, stackSize + 4); 10778 return false; 10779 } 10780 } 10781 validationCommand = CharstringValidationData[value]; 10782 } else if (value >= 32 && value <= 246) { 10783 stack[stackSize] = value - 139; 10784 stackSize++; 10785 } else if (value >= 247 && value <= 254) { 10786 stack[stackSize] = value < 251 ? (value - 247 << 8) + data[j] + 108 : -(value - 251 << 8) - data[j] - 108; 10787 j++; 10788 stackSize++; 10789 } else if (value === 255) { 10790 stack[stackSize] = (data[j] << 24 | data[j + 1] << 16 | data[j + 2] << 8 | data[j + 3]) / 65536; 10791 j += 4; 10792 stackSize++; 10793 } else if (value === 19 || value === 20) { 10794 state.hints += stackSize >> 1; 10795 if (state.hints === 0) { 10796 data.copyWithin(j - 1, j, -1); 10797 j -= 1; 10798 length -= 1; 10799 continue; 10800 } 10801 j += state.hints + 7 >> 3; 10802 stackSize %= 2; 10803 validationCommand = CharstringValidationData[value]; 10804 } else if (value === 10 || value === 29) { 10805 const subrsIndex = value === 10 ? localSubrIndex : globalSubrIndex; 10806 if (!subrsIndex) { 10807 validationCommand = CharstringValidationData[value]; 10808 warn("Missing subrsIndex for " + validationCommand.id); 10809 return false; 10810 } 10811 let bias = 32768; 10812 if (subrsIndex.count < 1240) { 10813 bias = 107; 10814 } else if (subrsIndex.count < 33900) { 10815 bias = 1131; 10816 } 10817 const subrNumber = stack[--stackSize] + bias; 10818 if (subrNumber < 0 || subrNumber >= subrsIndex.count || isNaN(subrNumber)) { 10819 validationCommand = CharstringValidationData[value]; 10820 warn("Out of bounds subrIndex for " + validationCommand.id); 10821 return false; 10822 } 10823 state.stackSize = stackSize; 10824 state.callDepth++; 10825 const valid = this.parseCharString(state, subrsIndex.get(subrNumber), localSubrIndex, globalSubrIndex); 10826 if (!valid) { 10827 return false; 10828 } 10829 state.callDepth--; 10830 stackSize = state.stackSize; 10831 continue; 10832 } else if (value === 11) { 10833 state.stackSize = stackSize; 10834 return true; 10835 } else if (value === 0 && j === data.length) { 10836 data[j - 1] = 14; 10837 validationCommand = CharstringValidationData[14]; 10838 } else if (value === 9) { 10839 data.copyWithin(j - 1, j, -1); 10840 j -= 1; 10841 length -= 1; 10842 continue; 10843 } else { 10844 validationCommand = CharstringValidationData[value]; 10845 } 10846 if (validationCommand) { 10847 if (validationCommand.stem) { 10848 state.hints += stackSize >> 1; 10849 if (value === 3 || value === 23) { 10850 state.hasVStems = true; 10851 } else if (state.hasVStems && (value === 1 || value === 18)) { 10852 warn("CFF stem hints are in wrong order"); 10853 data[j - 1] = value === 1 ? 3 : 23; 10854 } 10855 } 10856 if ("min" in validationCommand) { 10857 if (!state.undefStack && stackSize < validationCommand.min) { 10858 warn("Not enough parameters for " + validationCommand.id + "; actual: " + stackSize + ", expected: " + validationCommand.min); 10859 if (stackSize === 0) { 10860 data[j - 1] = 14; 10861 return true; 10862 } 10863 return false; 10864 } 10865 } 10866 if (state.firstStackClearing && validationCommand.stackClearing) { 10867 state.firstStackClearing = false; 10868 stackSize -= validationCommand.min; 10869 if (stackSize >= 2 && validationCommand.stem) { 10870 stackSize %= 2; 10871 } else if (stackSize > 1) { 10872 warn("Found too many parameters for stack-clearing command"); 10873 } 10874 if (stackSize > 0) { 10875 state.width = stack[stackSize - 1]; 10876 } 10877 } 10878 if ("stackDelta" in validationCommand) { 10879 if ("stackFn" in validationCommand) { 10880 validationCommand.stackFn(stack, stackSize); 10881 } 10882 stackSize += validationCommand.stackDelta; 10883 } else if (validationCommand.stackClearing) { 10884 stackSize = 0; 10885 } else if (validationCommand.resetStack) { 10886 stackSize = 0; 10887 state.undefStack = false; 10888 } else if (validationCommand.undefStack) { 10889 stackSize = 0; 10890 state.undefStack = true; 10891 state.firstStackClearing = false; 10892 } 10893 } 10894 } 10895 if (length < data.length) { 10896 data.fill(14, length); 10897 } 10898 state.stackSize = stackSize; 10899 return true; 10900 } 10901 parseCharStrings({ 10902 charStrings, 10903 localSubrIndex, 10904 globalSubrIndex, 10905 fdSelect, 10906 fdArray, 10907 privateDict 10908 }) { 10909 const seacs = []; 10910 const widths = []; 10911 const count = charStrings.count; 10912 for (let i = 0; i < count; i++) { 10913 const charstring = charStrings.get(i); 10914 const state = { 10915 callDepth: 0, 10916 stackSize: 0, 10917 stack: [], 10918 undefStack: true, 10919 hints: 0, 10920 firstStackClearing: true, 10921 seac: null, 10922 width: null, 10923 hasVStems: false 10924 }; 10925 let valid = true; 10926 let localSubrToUse = null; 10927 let privateDictToUse = privateDict; 10928 if (fdSelect && fdArray.length) { 10929 const fdIndex = fdSelect.getFDIndex(i); 10930 if (fdIndex === -1) { 10931 warn("Glyph index is not in fd select."); 10932 valid = false; 10933 } 10934 if (fdIndex >= fdArray.length) { 10935 warn("Invalid fd index for glyph index."); 10936 valid = false; 10937 } 10938 if (valid) { 10939 privateDictToUse = fdArray[fdIndex].privateDict; 10940 localSubrToUse = privateDictToUse.subrsIndex; 10941 } 10942 } else if (localSubrIndex) { 10943 localSubrToUse = localSubrIndex; 10944 } 10945 if (valid) { 10946 valid = this.parseCharString(state, charstring, localSubrToUse, globalSubrIndex); 10947 } 10948 if (state.width !== null) { 10949 const nominalWidth = privateDictToUse.getByName("nominalWidthX"); 10950 widths[i] = nominalWidth + state.width; 10951 } else { 10952 const defaultWidth = privateDictToUse.getByName("defaultWidthX"); 10953 widths[i] = defaultWidth; 10954 } 10955 if (state.seac !== null) { 10956 seacs[i] = state.seac; 10957 } 10958 if (!valid) { 10959 charStrings.set(i, new Uint8Array([14])); 10960 } 10961 } 10962 return { 10963 charStrings, 10964 seacs, 10965 widths 10966 }; 10967 } 10968 emptyPrivateDictionary(parentDict) { 10969 const privateDict = this.createDict(CFFPrivateDict, [], parentDict.strings); 10970 parentDict.setByKey(18, [0, 0]); 10971 parentDict.privateDict = privateDict; 10972 } 10973 parsePrivateDict(parentDict) { 10974 if (!parentDict.hasName("Private")) { 10975 this.emptyPrivateDictionary(parentDict); 10976 return; 10977 } 10978 const privateOffset = parentDict.getByName("Private"); 10979 if (!Array.isArray(privateOffset) || privateOffset.length !== 2) { 10980 parentDict.removeByName("Private"); 10981 return; 10982 } 10983 const size = privateOffset[0]; 10984 const offset = privateOffset[1]; 10985 if (size === 0 || offset >= this.bytes.length) { 10986 this.emptyPrivateDictionary(parentDict); 10987 return; 10988 } 10989 const privateDictEnd = offset + size; 10990 const dictData = this.bytes.subarray(offset, privateDictEnd); 10991 const dict = this.parseDict(dictData); 10992 const privateDict = this.createDict(CFFPrivateDict, dict, parentDict.strings); 10993 parentDict.privateDict = privateDict; 10994 if (privateDict.getByName("ExpansionFactor") === 0) { 10995 privateDict.setByName("ExpansionFactor", 0.06); 10996 } 10997 if (!privateDict.getByName("Subrs")) { 10998 return; 10999 } 11000 const subrsOffset = privateDict.getByName("Subrs"); 11001 const relativeOffset = offset + subrsOffset; 11002 if (subrsOffset === 0 || relativeOffset >= this.bytes.length) { 11003 this.emptyPrivateDictionary(parentDict); 11004 return; 11005 } 11006 const subrsIndex = this.parseIndex(relativeOffset); 11007 privateDict.subrsIndex = subrsIndex.obj; 11008 } 11009 parseCharsets(pos, length, strings, cid) { 11010 if (pos === 0) { 11011 return new CFFCharset(true, CFFCharsetPredefinedTypes.ISO_ADOBE, ISOAdobeCharset); 11012 } else if (pos === 1) { 11013 return new CFFCharset(true, CFFCharsetPredefinedTypes.EXPERT, ExpertCharset); 11014 } else if (pos === 2) { 11015 return new CFFCharset(true, CFFCharsetPredefinedTypes.EXPERT_SUBSET, ExpertSubsetCharset); 11016 } 11017 const bytes = this.bytes; 11018 const start = pos; 11019 const format = bytes[pos++]; 11020 const charset = [cid ? 0 : ".notdef"]; 11021 let id, count, i; 11022 length -= 1; 11023 switch (format) { 11024 case 0: 11025 for (i = 0; i < length; i++) { 11026 id = bytes[pos++] << 8 | bytes[pos++]; 11027 charset.push(cid ? id : strings.get(id)); 11028 } 11029 break; 11030 case 1: 11031 while (charset.length <= length) { 11032 id = bytes[pos++] << 8 | bytes[pos++]; 11033 count = bytes[pos++]; 11034 for (i = 0; i <= count; i++) { 11035 charset.push(cid ? id++ : strings.get(id++)); 11036 } 11037 } 11038 break; 11039 case 2: 11040 while (charset.length <= length) { 11041 id = bytes[pos++] << 8 | bytes[pos++]; 11042 count = bytes[pos++] << 8 | bytes[pos++]; 11043 for (i = 0; i <= count; i++) { 11044 charset.push(cid ? id++ : strings.get(id++)); 11045 } 11046 } 11047 break; 11048 default: 11049 throw new FormatError("Unknown charset format"); 11050 } 11051 const end = pos; 11052 const raw = bytes.subarray(start, end); 11053 return new CFFCharset(false, format, charset, raw); 11054 } 11055 parseEncoding(pos, properties, strings, charset) { 11056 const encoding = Object.create(null); 11057 const bytes = this.bytes; 11058 let predefined = false; 11059 let format, i, ii; 11060 let raw = null; 11061 function readSupplement() { 11062 const supplementsCount = bytes[pos++]; 11063 for (i = 0; i < supplementsCount; i++) { 11064 const code = bytes[pos++]; 11065 const sid = (bytes[pos++] << 8) + (bytes[pos++] & 0xff); 11066 encoding[code] = charset.indexOf(strings.get(sid)); 11067 } 11068 } 11069 if (pos === 0 || pos === 1) { 11070 predefined = true; 11071 format = pos; 11072 const baseEncoding = pos ? ExpertEncoding : StandardEncoding; 11073 for (i = 0, ii = charset.length; i < ii; i++) { 11074 const index = baseEncoding.indexOf(charset[i]); 11075 if (index !== -1) { 11076 encoding[index] = i; 11077 } 11078 } 11079 } else { 11080 const dataStart = pos; 11081 format = bytes[pos++]; 11082 switch (format & 0x7f) { 11083 case 0: 11084 const glyphsCount = bytes[pos++]; 11085 for (i = 1; i <= glyphsCount; i++) { 11086 encoding[bytes[pos++]] = i; 11087 } 11088 break; 11089 case 1: 11090 const rangesCount = bytes[pos++]; 11091 let gid = 1; 11092 for (i = 0; i < rangesCount; i++) { 11093 const start = bytes[pos++]; 11094 const left = bytes[pos++]; 11095 for (let j = start; j <= start + left; j++) { 11096 encoding[j] = gid++; 11097 } 11098 } 11099 break; 11100 default: 11101 throw new FormatError(`Unknown encoding format: ${format} in CFF`); 11102 } 11103 const dataEnd = pos; 11104 if (format & 0x80) { 11105 bytes[dataStart] &= 0x7f; 11106 readSupplement(); 11107 } 11108 raw = bytes.subarray(dataStart, dataEnd); 11109 } 11110 format &= 0x7f; 11111 return new CFFEncoding(predefined, format, encoding, raw); 11112 } 11113 parseFDSelect(pos, length) { 11114 const bytes = this.bytes; 11115 const format = bytes[pos++]; 11116 const fdSelect = []; 11117 let i; 11118 switch (format) { 11119 case 0: 11120 for (i = 0; i < length; ++i) { 11121 const id = bytes[pos++]; 11122 fdSelect.push(id); 11123 } 11124 break; 11125 case 3: 11126 const rangesCount = bytes[pos++] << 8 | bytes[pos++]; 11127 for (i = 0; i < rangesCount; ++i) { 11128 let first = bytes[pos++] << 8 | bytes[pos++]; 11129 if (i === 0 && first !== 0) { 11130 warn("parseFDSelect: The first range must have a first GID of 0" + " -- trying to recover."); 11131 first = 0; 11132 } 11133 const fdIndex = bytes[pos++]; 11134 const next = bytes[pos] << 8 | bytes[pos + 1]; 11135 for (let j = first; j < next; ++j) { 11136 fdSelect.push(fdIndex); 11137 } 11138 } 11139 pos += 2; 11140 break; 11141 default: 11142 throw new FormatError(`parseFDSelect: Unknown format "${format}".`); 11143 } 11144 if (fdSelect.length !== length) { 11145 throw new FormatError("parseFDSelect: Invalid font data."); 11146 } 11147 return new CFFFDSelect(format, fdSelect); 11148 } 11149} 11150class CFF { 11151 constructor() { 11152 this.header = null; 11153 this.names = []; 11154 this.topDict = null; 11155 this.strings = new CFFStrings(); 11156 this.globalSubrIndex = null; 11157 this.encoding = null; 11158 this.charset = null; 11159 this.charStrings = null; 11160 this.fdArray = []; 11161 this.fdSelect = null; 11162 this.isCIDFont = false; 11163 } 11164 duplicateFirstGlyph() { 11165 if (this.charStrings.count >= 65535) { 11166 warn("Not enough space in charstrings to duplicate first glyph."); 11167 return; 11168 } 11169 const glyphZero = this.charStrings.get(0); 11170 this.charStrings.add(glyphZero); 11171 if (this.isCIDFont) { 11172 this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0]); 11173 } 11174 } 11175 hasGlyphId(id) { 11176 if (id < 0 || id >= this.charStrings.count) { 11177 return false; 11178 } 11179 const glyph = this.charStrings.get(id); 11180 return glyph.length > 0; 11181 } 11182} 11183class CFFHeader { 11184 constructor(major, minor, hdrSize, offSize) { 11185 this.major = major; 11186 this.minor = minor; 11187 this.hdrSize = hdrSize; 11188 this.offSize = offSize; 11189 } 11190} 11191class CFFStrings { 11192 constructor() { 11193 this.strings = []; 11194 } 11195 get(index) { 11196 if (index >= 0 && index <= NUM_STANDARD_CFF_STRINGS - 1) { 11197 return CFFStandardStrings[index]; 11198 } 11199 if (index - NUM_STANDARD_CFF_STRINGS <= this.strings.length) { 11200 return this.strings[index - NUM_STANDARD_CFF_STRINGS]; 11201 } 11202 return CFFStandardStrings[0]; 11203 } 11204 getSID(str) { 11205 let index = CFFStandardStrings.indexOf(str); 11206 if (index !== -1) { 11207 return index; 11208 } 11209 index = this.strings.indexOf(str); 11210 if (index !== -1) { 11211 return index + NUM_STANDARD_CFF_STRINGS; 11212 } 11213 return -1; 11214 } 11215 add(value) { 11216 this.strings.push(value); 11217 } 11218 get count() { 11219 return this.strings.length; 11220 } 11221} 11222class CFFIndex { 11223 constructor() { 11224 this.objects = []; 11225 this.length = 0; 11226 } 11227 add(data) { 11228 this.length += data.length; 11229 this.objects.push(data); 11230 } 11231 set(index, data) { 11232 this.length += data.length - this.objects[index].length; 11233 this.objects[index] = data; 11234 } 11235 get(index) { 11236 return this.objects[index]; 11237 } 11238 get count() { 11239 return this.objects.length; 11240 } 11241} 11242class CFFDict { 11243 constructor(tables, strings) { 11244 this.keyToNameMap = tables.keyToNameMap; 11245 this.nameToKeyMap = tables.nameToKeyMap; 11246 this.defaults = tables.defaults; 11247 this.types = tables.types; 11248 this.opcodes = tables.opcodes; 11249 this.order = tables.order; 11250 this.strings = strings; 11251 this.values = Object.create(null); 11252 } 11253 setByKey(key, value) { 11254 if (!(key in this.keyToNameMap)) { 11255 return false; 11256 } 11257 if (value.length === 0) { 11258 return true; 11259 } 11260 for (const val of value) { 11261 if (isNaN(val)) { 11262 warn(`Invalid CFFDict value: "${value}" for key "${key}".`); 11263 return true; 11264 } 11265 } 11266 const type = this.types[key]; 11267 if (type === "num" || type === "sid" || type === "offset") { 11268 value = value[0]; 11269 } 11270 this.values[key] = value; 11271 return true; 11272 } 11273 setByName(name, value) { 11274 if (!(name in this.nameToKeyMap)) { 11275 throw new FormatError(`Invalid dictionary name "${name}"`); 11276 } 11277 this.values[this.nameToKeyMap[name]] = value; 11278 } 11279 hasName(name) { 11280 return this.nameToKeyMap[name] in this.values; 11281 } 11282 getByName(name) { 11283 if (!(name in this.nameToKeyMap)) { 11284 throw new FormatError(`Invalid dictionary name ${name}"`); 11285 } 11286 const key = this.nameToKeyMap[name]; 11287 if (!(key in this.values)) { 11288 return this.defaults[key]; 11289 } 11290 return this.values[key]; 11291 } 11292 removeByName(name) { 11293 delete this.values[this.nameToKeyMap[name]]; 11294 } 11295 static createTables(layout) { 11296 const tables = { 11297 keyToNameMap: {}, 11298 nameToKeyMap: {}, 11299 defaults: {}, 11300 types: {}, 11301 opcodes: {}, 11302 order: [] 11303 }; 11304 for (const entry of layout) { 11305 const key = Array.isArray(entry[0]) ? (entry[0][0] << 8) + entry[0][1] : entry[0]; 11306 tables.keyToNameMap[key] = entry[1]; 11307 tables.nameToKeyMap[entry[1]] = key; 11308 tables.types[key] = entry[2]; 11309 tables.defaults[key] = entry[3]; 11310 tables.opcodes[key] = Array.isArray(entry[0]) ? entry[0] : [entry[0]]; 11311 tables.order.push(key); 11312 } 11313 return tables; 11314 } 11315} 11316const CFFTopDictLayout = [[[12, 30], "ROS", ["sid", "sid", "num"], null], [[12, 20], "SyntheticBase", "num", null], [0, "version", "sid", null], [1, "Notice", "sid", null], [[12, 0], "Copyright", "sid", null], [2, "FullName", "sid", null], [3, "FamilyName", "sid", null], [4, "Weight", "sid", null], [[12, 1], "isFixedPitch", "num", 0], [[12, 2], "ItalicAngle", "num", 0], [[12, 3], "UnderlinePosition", "num", -100], [[12, 4], "UnderlineThickness", "num", 50], [[12, 5], "PaintType", "num", 0], [[12, 6], "CharstringType", "num", 2], [[12, 7], "FontMatrix", ["num", "num", "num", "num", "num", "num"], [0.001, 0, 0, 0.001, 0, 0]], [13, "UniqueID", "num", null], [5, "FontBBox", ["num", "num", "num", "num"], [0, 0, 0, 0]], [[12, 8], "StrokeWidth", "num", 0], [14, "XUID", "array", null], [15, "charset", "offset", 0], [16, "Encoding", "offset", 0], [17, "CharStrings", "offset", 0], [18, "Private", ["offset", "offset"], null], [[12, 21], "PostScript", "sid", null], [[12, 22], "BaseFontName", "sid", null], [[12, 23], "BaseFontBlend", "delta", null], [[12, 31], "CIDFontVersion", "num", 0], [[12, 32], "CIDFontRevision", "num", 0], [[12, 33], "CIDFontType", "num", 0], [[12, 34], "CIDCount", "num", 8720], [[12, 35], "UIDBase", "num", null], [[12, 37], "FDSelect", "offset", null], [[12, 36], "FDArray", "offset", null], [[12, 38], "FontName", "sid", null]]; 11317class CFFTopDict extends CFFDict { 11318 static get tables() { 11319 return shadow(this, "tables", this.createTables(CFFTopDictLayout)); 11320 } 11321 constructor(strings) { 11322 super(CFFTopDict.tables, strings); 11323 this.privateDict = null; 11324 } 11325} 11326const CFFPrivateDictLayout = [[6, "BlueValues", "delta", null], [7, "OtherBlues", "delta", null], [8, "FamilyBlues", "delta", null], [9, "FamilyOtherBlues", "delta", null], [[12, 9], "BlueScale", "num", 0.039625], [[12, 10], "BlueShift", "num", 7], [[12, 11], "BlueFuzz", "num", 1], [10, "StdHW", "num", null], [11, "StdVW", "num", null], [[12, 12], "StemSnapH", "delta", null], [[12, 13], "StemSnapV", "delta", null], [[12, 14], "ForceBold", "num", 0], [[12, 17], "LanguageGroup", "num", 0], [[12, 18], "ExpansionFactor", "num", 0.06], [[12, 19], "initialRandomSeed", "num", 0], [20, "defaultWidthX", "num", 0], [21, "nominalWidthX", "num", 0], [19, "Subrs", "offset", null]]; 11327class CFFPrivateDict extends CFFDict { 11328 static get tables() { 11329 return shadow(this, "tables", this.createTables(CFFPrivateDictLayout)); 11330 } 11331 constructor(strings) { 11332 super(CFFPrivateDict.tables, strings); 11333 this.subrsIndex = null; 11334 } 11335} 11336const CFFCharsetPredefinedTypes = { 11337 ISO_ADOBE: 0, 11338 EXPERT: 1, 11339 EXPERT_SUBSET: 2 11340}; 11341class CFFCharset { 11342 constructor(predefined, format, charset, raw) { 11343 this.predefined = predefined; 11344 this.format = format; 11345 this.charset = charset; 11346 this.raw = raw; 11347 } 11348} 11349class CFFEncoding { 11350 constructor(predefined, format, encoding, raw) { 11351 this.predefined = predefined; 11352 this.format = format; 11353 this.encoding = encoding; 11354 this.raw = raw; 11355 } 11356} 11357class CFFFDSelect { 11358 constructor(format, fdSelect) { 11359 this.format = format; 11360 this.fdSelect = fdSelect; 11361 } 11362 getFDIndex(glyphIndex) { 11363 if (glyphIndex < 0 || glyphIndex >= this.fdSelect.length) { 11364 return -1; 11365 } 11366 return this.fdSelect[glyphIndex]; 11367 } 11368} 11369class CFFOffsetTracker { 11370 constructor() { 11371 this.offsets = Object.create(null); 11372 } 11373 isTracking(key) { 11374 return key in this.offsets; 11375 } 11376 track(key, location) { 11377 if (key in this.offsets) { 11378 throw new FormatError(`Already tracking location of ${key}`); 11379 } 11380 this.offsets[key] = location; 11381 } 11382 offset(value) { 11383 for (const key in this.offsets) { 11384 this.offsets[key] += value; 11385 } 11386 } 11387 setEntryLocation(key, values, output) { 11388 if (!(key in this.offsets)) { 11389 throw new FormatError(`Not tracking location of ${key}`); 11390 } 11391 const data = output.data; 11392 const dataOffset = this.offsets[key]; 11393 const size = 5; 11394 for (let i = 0, ii = values.length; i < ii; ++i) { 11395 const offset0 = i * size + dataOffset; 11396 const offset1 = offset0 + 1; 11397 const offset2 = offset0 + 2; 11398 const offset3 = offset0 + 3; 11399 const offset4 = offset0 + 4; 11400 if (data[offset0] !== 0x1d || data[offset1] !== 0 || data[offset2] !== 0 || data[offset3] !== 0 || data[offset4] !== 0) { 11401 throw new FormatError("writing to an offset that is not empty"); 11402 } 11403 const value = values[i]; 11404 data[offset0] = 0x1d; 11405 data[offset1] = value >> 24 & 0xff; 11406 data[offset2] = value >> 16 & 0xff; 11407 data[offset3] = value >> 8 & 0xff; 11408 data[offset4] = value & 0xff; 11409 } 11410 } 11411} 11412class CFFCompiler { 11413 constructor(cff) { 11414 this.cff = cff; 11415 } 11416 compile() { 11417 const cff = this.cff; 11418 const output = { 11419 data: [], 11420 length: 0, 11421 add(data) { 11422 try { 11423 this.data.push(...data); 11424 } catch { 11425 this.data = this.data.concat(data); 11426 } 11427 this.length = this.data.length; 11428 } 11429 }; 11430 const header = this.compileHeader(cff.header); 11431 output.add(header); 11432 const nameIndex = this.compileNameIndex(cff.names); 11433 output.add(nameIndex); 11434 if (cff.isCIDFont) { 11435 if (cff.topDict.hasName("FontMatrix")) { 11436 const base = cff.topDict.getByName("FontMatrix"); 11437 cff.topDict.removeByName("FontMatrix"); 11438 for (const subDict of cff.fdArray) { 11439 let matrix = base.slice(0); 11440 if (subDict.hasName("FontMatrix")) { 11441 matrix = Util.transform(matrix, subDict.getByName("FontMatrix")); 11442 } 11443 subDict.setByName("FontMatrix", matrix); 11444 } 11445 } 11446 } 11447 const xuid = cff.topDict.getByName("XUID"); 11448 if (xuid?.length > 16) { 11449 cff.topDict.removeByName("XUID"); 11450 } 11451 cff.topDict.setByName("charset", 0); 11452 let compiled = this.compileTopDicts([cff.topDict], output.length, cff.isCIDFont); 11453 output.add(compiled.output); 11454 const topDictTracker = compiled.trackers[0]; 11455 const stringIndex = this.compileStringIndex(cff.strings.strings); 11456 output.add(stringIndex); 11457 const globalSubrIndex = this.compileIndex(cff.globalSubrIndex); 11458 output.add(globalSubrIndex); 11459 if (cff.encoding && cff.topDict.hasName("Encoding")) { 11460 if (cff.encoding.predefined) { 11461 topDictTracker.setEntryLocation("Encoding", [cff.encoding.format], output); 11462 } else { 11463 const encoding = this.compileEncoding(cff.encoding); 11464 topDictTracker.setEntryLocation("Encoding", [output.length], output); 11465 output.add(encoding); 11466 } 11467 } 11468 const charset = this.compileCharset(cff.charset, cff.charStrings.count, cff.strings, cff.isCIDFont); 11469 topDictTracker.setEntryLocation("charset", [output.length], output); 11470 output.add(charset); 11471 const charStrings = this.compileCharStrings(cff.charStrings); 11472 topDictTracker.setEntryLocation("CharStrings", [output.length], output); 11473 output.add(charStrings); 11474 if (cff.isCIDFont) { 11475 topDictTracker.setEntryLocation("FDSelect", [output.length], output); 11476 const fdSelect = this.compileFDSelect(cff.fdSelect); 11477 output.add(fdSelect); 11478 compiled = this.compileTopDicts(cff.fdArray, output.length, true); 11479 topDictTracker.setEntryLocation("FDArray", [output.length], output); 11480 output.add(compiled.output); 11481 const fontDictTrackers = compiled.trackers; 11482 this.compilePrivateDicts(cff.fdArray, fontDictTrackers, output); 11483 } 11484 this.compilePrivateDicts([cff.topDict], [topDictTracker], output); 11485 output.add([0]); 11486 return output.data; 11487 } 11488 encodeNumber(value) { 11489 if (Number.isInteger(value)) { 11490 return this.encodeInteger(value); 11491 } 11492 return this.encodeFloat(value); 11493 } 11494 static get EncodeFloatRegExp() { 11495 return shadow(this, "EncodeFloatRegExp", /\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/); 11496 } 11497 encodeFloat(num) { 11498 let value = num.toString(); 11499 const m = CFFCompiler.EncodeFloatRegExp.exec(value); 11500 if (m) { 11501 const epsilon = parseFloat("1e" + ((m[2] ? +m[2] : 0) + m[1].length)); 11502 value = (Math.round(num * epsilon) / epsilon).toString(); 11503 } 11504 let nibbles = ""; 11505 let i, ii; 11506 for (i = 0, ii = value.length; i < ii; ++i) { 11507 const a = value[i]; 11508 if (a === "e") { 11509 nibbles += value[++i] === "-" ? "c" : "b"; 11510 } else if (a === ".") { 11511 nibbles += "a"; 11512 } else if (a === "-") { 11513 nibbles += "e"; 11514 } else { 11515 nibbles += a; 11516 } 11517 } 11518 nibbles += nibbles.length & 1 ? "f" : "ff"; 11519 const out = [30]; 11520 for (i = 0, ii = nibbles.length; i < ii; i += 2) { 11521 out.push(parseInt(nibbles.substring(i, i + 2), 16)); 11522 } 11523 return out; 11524 } 11525 encodeInteger(value) { 11526 let code; 11527 if (value >= -107 && value <= 107) { 11528 code = [value + 139]; 11529 } else if (value >= 108 && value <= 1131) { 11530 value -= 108; 11531 code = [(value >> 8) + 247, value & 0xff]; 11532 } else if (value >= -1131 && value <= -108) { 11533 value = -value - 108; 11534 code = [(value >> 8) + 251, value & 0xff]; 11535 } else if (value >= -32768 && value <= 32767) { 11536 code = [0x1c, value >> 8 & 0xff, value & 0xff]; 11537 } else { 11538 code = [0x1d, value >> 24 & 0xff, value >> 16 & 0xff, value >> 8 & 0xff, value & 0xff]; 11539 } 11540 return code; 11541 } 11542 compileHeader(header) { 11543 return [header.major, header.minor, 4, header.offSize]; 11544 } 11545 compileNameIndex(names) { 11546 const nameIndex = new CFFIndex(); 11547 for (const name of names) { 11548 const length = Math.min(name.length, 127); 11549 let sanitizedName = new Array(length); 11550 for (let j = 0; j < length; j++) { 11551 let char = name[j]; 11552 if (char < "!" || char > "~" || char === "[" || char === "]" || char === "(" || char === ")" || char === "{" || char === "}" || char === "<" || char === ">" || char === "/" || char === "%") { 11553 char = "_"; 11554 } 11555 sanitizedName[j] = char; 11556 } 11557 sanitizedName = sanitizedName.join(""); 11558 if (sanitizedName === "") { 11559 sanitizedName = "Bad_Font_Name"; 11560 } 11561 nameIndex.add(stringToBytes(sanitizedName)); 11562 } 11563 return this.compileIndex(nameIndex); 11564 } 11565 compileTopDicts(dicts, length, removeCidKeys) { 11566 const fontDictTrackers = []; 11567 let fdArrayIndex = new CFFIndex(); 11568 for (const fontDict of dicts) { 11569 if (removeCidKeys) { 11570 fontDict.removeByName("CIDFontVersion"); 11571 fontDict.removeByName("CIDFontRevision"); 11572 fontDict.removeByName("CIDFontType"); 11573 fontDict.removeByName("CIDCount"); 11574 fontDict.removeByName("UIDBase"); 11575 } 11576 const fontDictTracker = new CFFOffsetTracker(); 11577 const fontDictData = this.compileDict(fontDict, fontDictTracker); 11578 fontDictTrackers.push(fontDictTracker); 11579 fdArrayIndex.add(fontDictData); 11580 fontDictTracker.offset(length); 11581 } 11582 fdArrayIndex = this.compileIndex(fdArrayIndex, fontDictTrackers); 11583 return { 11584 trackers: fontDictTrackers, 11585 output: fdArrayIndex 11586 }; 11587 } 11588 compilePrivateDicts(dicts, trackers, output) { 11589 for (let i = 0, ii = dicts.length; i < ii; ++i) { 11590 const fontDict = dicts[i]; 11591 const privateDict = fontDict.privateDict; 11592 if (!privateDict || !fontDict.hasName("Private")) { 11593 throw new FormatError("There must be a private dictionary."); 11594 } 11595 const privateDictTracker = new CFFOffsetTracker(); 11596 const privateDictData = this.compileDict(privateDict, privateDictTracker); 11597 let outputLength = output.length; 11598 privateDictTracker.offset(outputLength); 11599 if (!privateDictData.length) { 11600 outputLength = 0; 11601 } 11602 trackers[i].setEntryLocation("Private", [privateDictData.length, outputLength], output); 11603 output.add(privateDictData); 11604 if (privateDict.subrsIndex && privateDict.hasName("Subrs")) { 11605 const subrs = this.compileIndex(privateDict.subrsIndex); 11606 privateDictTracker.setEntryLocation("Subrs", [privateDictData.length], output); 11607 output.add(subrs); 11608 } 11609 } 11610 } 11611 compileDict(dict, offsetTracker) { 11612 const out = []; 11613 for (const key of dict.order) { 11614 if (!(key in dict.values)) { 11615 continue; 11616 } 11617 let values = dict.values[key]; 11618 let types = dict.types[key]; 11619 if (!Array.isArray(types)) { 11620 types = [types]; 11621 } 11622 if (!Array.isArray(values)) { 11623 values = [values]; 11624 } 11625 if (values.length === 0) { 11626 continue; 11627 } 11628 for (let j = 0, jj = types.length; j < jj; ++j) { 11629 const type = types[j]; 11630 const value = values[j]; 11631 switch (type) { 11632 case "num": 11633 case "sid": 11634 out.push(...this.encodeNumber(value)); 11635 break; 11636 case "offset": 11637 const name = dict.keyToNameMap[key]; 11638 if (!offsetTracker.isTracking(name)) { 11639 offsetTracker.track(name, out.length); 11640 } 11641 out.push(0x1d, 0, 0, 0, 0); 11642 break; 11643 case "array": 11644 case "delta": 11645 out.push(...this.encodeNumber(value)); 11646 for (let k = 1, kk = values.length; k < kk; ++k) { 11647 out.push(...this.encodeNumber(values[k])); 11648 } 11649 break; 11650 default: 11651 throw new FormatError(`Unknown data type of ${type}`); 11652 } 11653 } 11654 out.push(...dict.opcodes[key]); 11655 } 11656 return out; 11657 } 11658 compileStringIndex(strings) { 11659 const stringIndex = new CFFIndex(); 11660 for (const string of strings) { 11661 stringIndex.add(stringToBytes(string)); 11662 } 11663 return this.compileIndex(stringIndex); 11664 } 11665 compileCharStrings(charStrings) { 11666 const charStringsIndex = new CFFIndex(); 11667 for (let i = 0; i < charStrings.count; i++) { 11668 const glyph = charStrings.get(i); 11669 if (glyph.length === 0) { 11670 charStringsIndex.add(new Uint8Array([0x8b, 0x0e])); 11671 continue; 11672 } 11673 charStringsIndex.add(glyph); 11674 } 11675 return this.compileIndex(charStringsIndex); 11676 } 11677 compileCharset(charset, numGlyphs, strings, isCIDFont) { 11678 let out; 11679 const numGlyphsLessNotDef = numGlyphs - 1; 11680 if (isCIDFont) { 11681
vendor: 3,386 bytes, lines 11681-11789
11681out = new Uint8Array([2, 0, 0, numGlyphsLessNotDef >> 8 & 0xff, numGlyphsLessNotDef & 0xff]); 11682 } else { 11683 const length = 1 + numGlyphsLessNotDef * 2; 11684 out = new Uint8Array(length); 11685 out[0] = 0; 11686 let charsetIndex = 0; 11687 const numCharsets = charset.charset.length; 11688 let warned = false; 11689 for (let i = 1; i < out.length; i += 2) { 11690 let sid = 0; 11691 if (charsetIndex < numCharsets) { 11692 const name = charset.charset[charsetIndex++]; 11693 sid = strings.getSID(name); 11694 if (sid === -1) { 11695 sid = 0; 11696 if (!warned) { 11697 warned = true; 11698 warn(`Couldn't find ${name} in CFF strings`); 11699 } 11700 } 11701 } 11702 out[i] = sid >> 8 & 0xff; 11703 out[i + 1] = sid & 0xff; 11704 } 11705 } 11706 return this.compileTypedArray(out); 11707 } 11708 compileEncoding(encoding) { 11709 return this.compileTypedArray(encoding.raw); 11710 } 11711 compileFDSelect(fdSelect) { 11712 const format = fdSelect.format; 11713 let out, i; 11714 switch (format) { 11715 case 0: 11716 out = new Uint8Array(1 + fdSelect.fdSelect.length); 11717 out[0] = format; 11718 for (i = 0; i < fdSelect.fdSelect.length; i++) { 11719 out[i + 1] = fdSelect.fdSelect[i]; 11720 } 11721 break; 11722 case 3: 11723 const start = 0; 11724 let lastFD = fdSelect.fdSelect[0]; 11725 const ranges = [format, 0, 0, start >> 8 & 0xff, start & 0xff, lastFD]; 11726 for (i = 1; i < fdSelect.fdSelect.length; i++) { 11727 const currentFD = fdSelect.fdSelect[i]; 11728 if (currentFD !== lastFD) { 11729 ranges.push(i >> 8 & 0xff, i & 0xff, currentFD); 11730 lastFD = currentFD; 11731 } 11732 } 11733 const numRanges = (ranges.length - 3) / 3; 11734 ranges[1] = numRanges >> 8 & 0xff; 11735 ranges[2] = numRanges & 0xff; 11736 ranges.push(i >> 8 & 0xff, i & 0xff); 11737 out = new Uint8Array(ranges); 11738 break; 11739 } 11740 return this.compileTypedArray(out); 11741 } 11742 compileTypedArray(data) { 11743 return Array.from(data); 11744 } 11745 compileIndex(index, trackers = []) { 11746 const objects = index.objects; 11747 const count = objects.length; 11748 if (count === 0) { 11749 return [0, 0]; 11750 } 11751 const data = [count >> 8 & 0xff, count & 0xff]; 11752 let lastOffset = 1, 11753 i; 11754 for (i = 0; i < count; ++i) { 11755 lastOffset += objects[i].length; 11756 } 11757 let offsetSize; 11758 if (lastOffset < 0x100) { 11759 offsetSize = 1; 11760 } else if (lastOffset < 0x10000) { 11761 offsetSize = 2; 11762 } else if (lastOffset < 0x1000000) { 11763 offsetSize = 3; 11764 } else { 11765 offsetSize = 4; 11766 } 11767 data.push(offsetSize); 11768 let relativeOffset = 1; 11769 for (i = 0; i < count + 1; i++) { 11770 if (offsetSize === 1) { 11771 data.push(relativeOffset & 0xff); 11772 } else if (offsetSize === 2) { 11773 data.push(relativeOffset >> 8 & 0xff, relativeOffset & 0xff); 11774 } else if (offsetSize === 3) { 11775 data.push(relativeOffset >> 16 & 0xff, relativeOffset >> 8 & 0xff, relativeOffset & 0xff); 11776 } else { 11777 data.push(relativeOffset >>> 24 & 0xff, relativeOffset >> 16 & 0xff, relativeOffset >> 8 & 0xff, relativeOffset & 0xff); 11778 } 11779 if (objects[i]) { 11780 relativeOffset += objects[i].length; 11781 } 11782 } 11783 for (i = 0; i < count; i++) { 11784 if (trackers[i]) { 11785 trackers[i].offset(data.length); 11786 } 11787 data.push(...objects[i]); 11788 } 11789 return data
vendor: 119,570 bytes, lines 11789-16340
11789; 11790 } 11791} 11792 11793;// ./src/core/glyphlist.js 11794 11795const getGlyphsUnicode = getLookupTableFactory(function (t) { 11796 t.A = 0x0041; 11797 t.AE = 0x00c6; 11798 t.AEacute = 0x01fc; 11799 t.AEmacron = 0x01e2; 11800 t.AEsmall = 0xf7e6; 11801 t.Aacute = 0x00c1; 11802 t.Aacutesmall = 0xf7e1; 11803 t.Abreve = 0x0102; 11804 t.Abreveacute = 0x1eae; 11805 t.Abrevecyrillic = 0x04d0; 11806 t.Abrevedotbelow = 0x1eb6; 11807 t.Abrevegrave = 0x1eb0; 11808 t.Abrevehookabove = 0x1eb2; 11809 t.Abrevetilde = 0x1eb4; 11810 t.Acaron = 0x01cd; 11811 t.Acircle = 0x24b6; 11812 t.Acircumflex = 0x00c2; 11813 t.Acircumflexacute = 0x1ea4; 11814 t.Acircumflexdotbelow = 0x1eac; 11815 t.Acircumflexgrave = 0x1ea6; 11816 t.Acircumflexhookabove = 0x1ea8; 11817 t.Acircumflexsmall = 0xf7e2; 11818 t.Acircumflextilde = 0x1eaa; 11819 t.Acute = 0xf6c9; 11820 t.Acutesmall = 0xf7b4; 11821 t.Acyrillic = 0x0410; 11822 t.Adblgrave = 0x0200; 11823 t.Adieresis = 0x00c4; 11824 t.Adieresiscyrillic = 0x04d2; 11825 t.Adieresismacron = 0x01de; 11826 t.Adieresissmall = 0xf7e4; 11827 t.Adotbelow = 0x1ea0; 11828 t.Adotmacron = 0x01e0; 11829 t.Agrave = 0x00c0; 11830 t.Agravesmall = 0xf7e0; 11831 t.Ahookabove = 0x1ea2; 11832 t.Aiecyrillic = 0x04d4; 11833 t.Ainvertedbreve = 0x0202; 11834 t.Alpha = 0x0391; 11835 t.Alphatonos = 0x0386; 11836 t.Amacron = 0x0100; 11837 t.Amonospace = 0xff21; 11838 t.Aogonek = 0x0104; 11839 t.Aring = 0x00c5; 11840 t.Aringacute = 0x01fa; 11841 t.Aringbelow = 0x1e00; 11842 t.Aringsmall = 0xf7e5; 11843 t.Asmall = 0xf761; 11844 t.Atilde = 0x00c3; 11845 t.Atildesmall = 0xf7e3; 11846 t.Aybarmenian = 0x0531; 11847 t.B = 0x0042; 11848 t.Bcircle = 0x24b7; 11849 t.Bdotaccent = 0x1e02; 11850 t.Bdotbelow = 0x1e04; 11851 t.Becyrillic = 0x0411; 11852 t.Benarmenian = 0x0532; 11853 t.Beta = 0x0392; 11854 t.Bhook = 0x0181; 11855 t.Blinebelow = 0x1e06; 11856 t.Bmonospace = 0xff22; 11857 t.Brevesmall = 0xf6f4; 11858 t.Bsmall = 0xf762; 11859 t.Btopbar = 0x0182; 11860 t.C = 0x0043; 11861 t.Caarmenian = 0x053e; 11862 t.Cacute = 0x0106; 11863 t.Caron = 0xf6ca; 11864 t.Caronsmall = 0xf6f5; 11865 t.Ccaron = 0x010c; 11866 t.Ccedilla = 0x00c7; 11867 t.Ccedillaacute = 0x1e08; 11868 t.Ccedillasmall = 0xf7e7; 11869 t.Ccircle = 0x24b8; 11870 t.Ccircumflex = 0x0108; 11871 t.Cdot = 0x010a; 11872 t.Cdotaccent = 0x010a; 11873 t.Cedillasmall = 0xf7b8; 11874 t.Chaarmenian = 0x0549; 11875 t.Cheabkhasiancyrillic = 0x04bc; 11876 t.Checyrillic = 0x0427; 11877 t.Chedescenderabkhasiancyrillic = 0x04be; 11878 t.Chedescendercyrillic = 0x04b6; 11879 t.Chedieresiscyrillic = 0x04f4; 11880 t.Cheharmenian = 0x0543; 11881 t.Chekhakassiancyrillic = 0x04cb; 11882 t.Cheverticalstrokecyrillic = 0x04b8; 11883 t.Chi = 0x03a7; 11884 t.Chook = 0x0187; 11885 t.Circumflexsmall = 0xf6f6; 11886 t.Cmonospace = 0xff23; 11887 t.Coarmenian = 0x0551; 11888 t.Csmall = 0xf763; 11889 t.D = 0x0044; 11890 t.DZ = 0x01f1; 11891 t.DZcaron = 0x01c4; 11892 t.Daarmenian = 0x0534; 11893 t.Dafrican = 0x0189; 11894 t.Dcaron = 0x010e; 11895 t.Dcedilla = 0x1e10; 11896 t.Dcircle = 0x24b9; 11897 t.Dcircumflexbelow = 0x1e12; 11898 t.Dcroat = 0x0110; 11899 t.Ddotaccent = 0x1e0a; 11900 t.Ddotbelow = 0x1e0c; 11901 t.Decyrillic = 0x0414; 11902 t.Deicoptic = 0x03ee; 11903 t.Delta = 0x2206; 11904 t.Deltagreek = 0x0394; 11905 t.Dhook = 0x018a; 11906 t.Dieresis = 0xf6cb; 11907 t.DieresisAcute = 0xf6cc; 11908 t.DieresisGrave = 0xf6cd; 11909 t.Dieresissmall = 0xf7a8; 11910 t.Digammagreek = 0x03dc; 11911 t.Djecyrillic = 0x0402; 11912 t.Dlinebelow = 0x1e0e; 11913 t.Dmonospace = 0xff24; 11914 t.Dotaccentsmall = 0xf6f7; 11915 t.Dslash = 0x0110; 11916 t.Dsmall = 0xf764; 11917 t.Dtopbar = 0x018b; 11918 t.Dz = 0x01f2; 11919 t.Dzcaron = 0x01c5; 11920 t.Dzeabkhasiancyrillic = 0x04e0; 11921 t.Dzecyrillic = 0x0405; 11922 t.Dzhecyrillic = 0x040f; 11923 t.E = 0x0045; 11924 t.Eacute = 0x00c9; 11925 t.Eacutesmall = 0xf7e9; 11926 t.Ebreve = 0x0114; 11927 t.Ecaron = 0x011a; 11928 t.Ecedillabreve = 0x1e1c; 11929 t.Echarmenian = 0x0535; 11930 t.Ecircle = 0x24ba; 11931 t.Ecircumflex = 0x00ca; 11932 t.Ecircumflexacute = 0x1ebe; 11933 t.Ecircumflexbelow = 0x1e18; 11934 t.Ecircumflexdotbelow = 0x1ec6; 11935 t.Ecircumflexgrave = 0x1ec0; 11936 t.Ecircumflexhookabove = 0x1ec2; 11937 t.Ecircumflexsmall = 0xf7ea; 11938 t.Ecircumflextilde = 0x1ec4; 11939 t.Ecyrillic = 0x0404; 11940 t.Edblgrave = 0x0204; 11941 t.Edieresis = 0x00cb; 11942 t.Edieresissmall = 0xf7eb; 11943 t.Edot = 0x0116; 11944 t.Edotaccent = 0x0116; 11945 t.Edotbelow = 0x1eb8; 11946 t.Efcyrillic = 0x0424; 11947 t.Egrave = 0x00c8; 11948 t.Egravesmall = 0xf7e8; 11949 t.Eharmenian = 0x0537; 11950 t.Ehookabove = 0x1eba; 11951 t.Eightroman = 0x2167; 11952 t.Einvertedbreve = 0x0206; 11953 t.Eiotifiedcyrillic = 0x0464; 11954 t.Elcyrillic = 0x041b; 11955 t.Elevenroman = 0x216a; 11956 t.Emacron = 0x0112; 11957 t.Emacronacute = 0x1e16; 11958 t.Emacrongrave = 0x1e14; 11959 t.Emcyrillic = 0x041c; 11960 t.Emonospace = 0xff25; 11961 t.Encyrillic = 0x041d; 11962 t.Endescendercyrillic = 0x04a2; 11963 t.Eng = 0x014a; 11964 t.Enghecyrillic = 0x04a4; 11965 t.Enhookcyrillic = 0x04c7; 11966 t.Eogonek = 0x0118; 11967 t.Eopen = 0x0190; 11968 t.Epsilon = 0x0395; 11969 t.Epsilontonos = 0x0388; 11970 t.Ercyrillic = 0x0420; 11971 t.Ereversed = 0x018e; 11972 t.Ereversedcyrillic = 0x042d; 11973 t.Escyrillic = 0x0421; 11974 t.Esdescendercyrillic = 0x04aa; 11975 t.Esh = 0x01a9; 11976 t.Esmall = 0xf765; 11977 t.Eta = 0x0397; 11978 t.Etarmenian = 0x0538; 11979 t.Etatonos = 0x0389; 11980 t.Eth = 0x00d0; 11981 t.Ethsmall = 0xf7f0; 11982 t.Etilde = 0x1ebc; 11983 t.Etildebelow = 0x1e1a; 11984 t.Euro = 0x20ac; 11985 t.Ezh = 0x01b7; 11986 t.Ezhcaron = 0x01ee; 11987 t.Ezhreversed = 0x01b8; 11988 t.F = 0x0046; 11989 t.Fcircle = 0x24bb; 11990 t.Fdotaccent = 0x1e1e; 11991 t.Feharmenian = 0x0556; 11992 t.Feicoptic = 0x03e4; 11993 t.Fhook = 0x0191; 11994 t.Fitacyrillic = 0x0472; 11995 t.Fiveroman = 0x2164; 11996 t.Fmonospace = 0xff26; 11997 t.Fourroman = 0x2163; 11998 t.Fsmall = 0xf766; 11999 t.G = 0x0047; 12000 t.GBsquare = 0x3387; 12001 t.Gacute = 0x01f4; 12002 t.Gamma = 0x0393; 12003 t.Gammaafrican = 0x0194; 12004 t.Gangiacoptic = 0x03ea; 12005 t.Gbreve = 0x011e; 12006 t.Gcaron = 0x01e6; 12007 t.Gcedilla = 0x0122; 12008 t.Gcircle = 0x24bc; 12009 t.Gcircumflex = 0x011c; 12010 t.Gcommaaccent = 0x0122; 12011 t.Gdot = 0x0120; 12012 t.Gdotaccent = 0x0120; 12013 t.Gecyrillic = 0x0413; 12014 t.Ghadarmenian = 0x0542; 12015 t.Ghemiddlehookcyrillic = 0x0494; 12016 t.Ghestrokecyrillic = 0x0492; 12017 t.Gheupturncyrillic = 0x0490; 12018 t.Ghook = 0x0193; 12019 t.Gimarmenian = 0x0533; 12020 t.Gjecyrillic = 0x0403; 12021 t.Gmacron = 0x1e20; 12022 t.Gmonospace = 0xff27; 12023 t.Grave = 0xf6ce; 12024 t.Gravesmall = 0xf760; 12025 t.Gsmall = 0xf767; 12026 t.Gsmallhook = 0x029b; 12027 t.Gstroke = 0x01e4; 12028 t.H = 0x0048; 12029 t.H18533 = 0x25cf; 12030 t.H18543 = 0x25aa; 12031 t.H18551 = 0x25ab; 12032 t.H22073 = 0x25a1; 12033 t.HPsquare = 0x33cb; 12034 t.Haabkhasiancyrillic = 0x04a8; 12035 t.Hadescendercyrillic = 0x04b2; 12036 t.Hardsigncyrillic = 0x042a; 12037 t.Hbar = 0x0126; 12038 t.Hbrevebelow = 0x1e2a; 12039 t.Hcedilla = 0x1e28; 12040 t.Hcircle = 0x24bd; 12041 t.Hcircumflex = 0x0124; 12042 t.Hdieresis = 0x1e26; 12043 t.Hdotaccent = 0x1e22; 12044 t.Hdotbelow = 0x1e24; 12045 t.Hmonospace = 0xff28; 12046 t.Hoarmenian = 0x0540; 12047 t.Horicoptic = 0x03e8; 12048 t.Hsmall = 0xf768; 12049 t.Hungarumlaut = 0xf6cf; 12050 t.Hungarumlautsmall = 0xf6f8; 12051 t.Hzsquare = 0x3390; 12052 t.I = 0x0049; 12053 t.IAcyrillic = 0x042f; 12054 t.IJ = 0x0132; 12055 t.IUcyrillic = 0x042e; 12056 t.Iacute = 0x00cd; 12057 t.Iacutesmall = 0xf7ed; 12058 t.Ibreve = 0x012c; 12059 t.Icaron = 0x01cf; 12060 t.Icircle = 0x24be; 12061 t.Icircumflex = 0x00ce; 12062 t.Icircumflexsmall = 0xf7ee; 12063 t.Icyrillic = 0x0406; 12064 t.Idblgrave = 0x0208; 12065 t.Idieresis = 0x00cf; 12066 t.Idieresisacute = 0x1e2e; 12067 t.Idieresiscyrillic = 0x04e4; 12068 t.Idieresissmall = 0xf7ef; 12069 t.Idot = 0x0130; 12070 t.Idotaccent = 0x0130; 12071 t.Idotbelow = 0x1eca; 12072 t.Iebrevecyrillic = 0x04d6; 12073 t.Iecyrillic = 0x0415; 12074 t.Ifraktur = 0x2111; 12075 t.Igrave = 0x00cc; 12076 t.Igravesmall = 0xf7ec; 12077 t.Ihookabove = 0x1ec8; 12078 t.Iicyrillic = 0x0418; 12079 t.Iinvertedbreve = 0x020a; 12080 t.Iishortcyrillic = 0x0419; 12081 t.Imacron = 0x012a; 12082 t.Imacroncyrillic = 0x04e2; 12083 t.Imonospace = 0xff29; 12084 t.Iniarmenian = 0x053b; 12085 t.Iocyrillic = 0x0401; 12086 t.Iogonek = 0x012e; 12087 t.Iota = 0x0399; 12088 t.Iotaafrican = 0x0196; 12089 t.Iotadieresis = 0x03aa; 12090 t.Iotatonos = 0x038a; 12091 t.Ismall = 0xf769; 12092 t.Istroke = 0x0197; 12093 t.Itilde = 0x0128; 12094 t.Itildebelow = 0x1e2c; 12095 t.Izhitsacyrillic = 0x0474; 12096 t.Izhitsadblgravecyrillic = 0x0476; 12097 t.J = 0x004a; 12098 t.Jaarmenian = 0x0541; 12099 t.Jcircle = 0x24bf; 12100 t.Jcircumflex = 0x0134; 12101 t.Jecyrillic = 0x0408; 12102 t.Jheharmenian = 0x054b; 12103 t.Jmonospace = 0xff2a; 12104 t.Jsmall = 0xf76a; 12105 t.K = 0x004b; 12106 t.KBsquare = 0x3385; 12107 t.KKsquare = 0x33cd; 12108 t.Kabashkircyrillic = 0x04a0; 12109 t.Kacute = 0x1e30; 12110 t.Kacyrillic = 0x041a; 12111 t.Kadescendercyrillic = 0x049a; 12112 t.Kahookcyrillic = 0x04c3; 12113 t.Kappa = 0x039a; 12114 t.Kastrokecyrillic = 0x049e; 12115 t.Kaverticalstrokecyrillic = 0x049c; 12116 t.Kcaron = 0x01e8; 12117 t.Kcedilla = 0x0136; 12118 t.Kcircle = 0x24c0; 12119 t.Kcommaaccent = 0x0136; 12120 t.Kdotbelow = 0x1e32; 12121 t.Keharmenian = 0x0554; 12122 t.Kenarmenian = 0x053f; 12123 t.Khacyrillic = 0x0425; 12124 t.Kheicoptic = 0x03e6; 12125 t.Khook = 0x0198; 12126 t.Kjecyrillic = 0x040c; 12127 t.Klinebelow = 0x1e34; 12128 t.Kmonospace = 0xff2b; 12129 t.Koppacyrillic = 0x0480; 12130 t.Koppagreek = 0x03de; 12131 t.Ksicyrillic = 0x046e; 12132 t.Ksmall = 0xf76b; 12133 t.L = 0x004c; 12134 t.LJ = 0x01c7; 12135 t.LL = 0xf6bf; 12136 t.Lacute = 0x0139; 12137 t.Lambda = 0x039b; 12138 t.Lcaron = 0x013d; 12139 t.Lcedilla = 0x013b; 12140 t.Lcircle = 0x24c1; 12141 t.Lcircumflexbelow = 0x1e3c; 12142 t.Lcommaaccent = 0x013b; 12143 t.Ldot = 0x013f; 12144 t.Ldotaccent = 0x013f; 12145 t.Ldotbelow = 0x1e36; 12146 t.Ldotbelowmacron = 0x1e38; 12147 t.Liwnarmenian = 0x053c; 12148 t.Lj = 0x01c8; 12149 t.Ljecyrillic = 0x0409; 12150 t.Llinebelow = 0x1e3a; 12151 t.Lmonospace = 0xff2c; 12152 t.Lslash = 0x0141; 12153 t.Lslashsmall = 0xf6f9; 12154 t.Lsmall = 0xf76c; 12155 t.M = 0x004d; 12156 t.MBsquare = 0x3386; 12157 t.Macron = 0xf6d0; 12158 t.Macronsmall = 0xf7af; 12159 t.Macute = 0x1e3e; 12160 t.Mcircle = 0x24c2; 12161 t.Mdotaccent = 0x1e40; 12162 t.Mdotbelow = 0x1e42; 12163 t.Menarmenian = 0x0544; 12164 t.Mmonospace = 0xff2d; 12165 t.Msmall = 0xf76d; 12166 t.Mturned = 0x019c; 12167 t.Mu = 0x039c; 12168 t.N = 0x004e; 12169 t.NJ = 0x01ca; 12170 t.Nacute = 0x0143; 12171 t.Ncaron = 0x0147; 12172 t.Ncedilla = 0x0145; 12173 t.Ncircle = 0x24c3; 12174 t.Ncircumflexbelow = 0x1e4a; 12175 t.Ncommaaccent = 0x0145; 12176 t.Ndotaccent = 0x1e44; 12177 t.Ndotbelow = 0x1e46; 12178 t.Nhookleft = 0x019d; 12179 t.Nineroman = 0x2168; 12180 t.Nj = 0x01cb; 12181 t.Njecyrillic = 0x040a; 12182 t.Nlinebelow = 0x1e48; 12183 t.Nmonospace = 0xff2e; 12184 t.Nowarmenian = 0x0546; 12185 t.Nsmall = 0xf76e; 12186 t.Ntilde = 0x00d1; 12187 t.Ntildesmall = 0xf7f1; 12188 t.Nu = 0x039d; 12189 t.O = 0x004f; 12190 t.OE = 0x0152; 12191 t.OEsmall = 0xf6fa; 12192 t.Oacute = 0x00d3; 12193 t.Oacutesmall = 0xf7f3; 12194 t.Obarredcyrillic = 0x04e8; 12195 t.Obarreddieresiscyrillic = 0x04ea; 12196 t.Obreve = 0x014e; 12197 t.Ocaron = 0x01d1; 12198 t.Ocenteredtilde = 0x019f; 12199 t.Ocircle = 0x24c4; 12200 t.Ocircumflex = 0x00d4; 12201 t.Ocircumflexacute = 0x1ed0; 12202 t.Ocircumflexdotbelow = 0x1ed8; 12203 t.Ocircumflexgrave = 0x1ed2; 12204 t.Ocircumflexhookabove = 0x1ed4; 12205 t.Ocircumflexsmall = 0xf7f4; 12206 t.Ocircumflextilde = 0x1ed6; 12207 t.Ocyrillic = 0x041e; 12208 t.Odblacute = 0x0150; 12209 t.Odblgrave = 0x020c; 12210 t.Odieresis = 0x00d6; 12211 t.Odieresiscyrillic = 0x04e6; 12212 t.Odieresissmall = 0xf7f6; 12213 t.Odotbelow = 0x1ecc; 12214 t.Ogoneksmall = 0xf6fb; 12215 t.Ograve = 0x00d2; 12216 t.Ogravesmall = 0xf7f2; 12217 t.Oharmenian = 0x0555; 12218 t.Ohm = 0x2126; 12219 t.Ohookabove = 0x1ece; 12220 t.Ohorn = 0x01a0; 12221 t.Ohornacute = 0x1eda; 12222 t.Ohorndotbelow = 0x1ee2; 12223 t.Ohorngrave = 0x1edc; 12224 t.Ohornhookabove = 0x1ede; 12225 t.Ohorntilde = 0x1ee0; 12226 t.Ohungarumlaut = 0x0150; 12227 t.Oi = 0x01a2; 12228 t.Oinvertedbreve = 0x020e; 12229 t.Omacron = 0x014c; 12230 t.Omacronacute = 0x1e52; 12231 t.Omacrongrave = 0x1e50; 12232 t.Omega = 0x2126; 12233 t.Omegacyrillic = 0x0460; 12234 t.Omegagreek = 0x03a9; 12235 t.Omegaroundcyrillic = 0x047a; 12236 t.Omegatitlocyrillic = 0x047c; 12237 t.Omegatonos = 0x038f; 12238 t.Omicron = 0x039f; 12239 t.Omicrontonos = 0x038c; 12240 t.Omonospace = 0xff2f; 12241 t.Oneroman = 0x2160; 12242 t.Oogonek = 0x01ea; 12243 t.Oogonekmacron = 0x01ec; 12244 t.Oopen = 0x0186; 12245 t.Oslash = 0x00d8; 12246 t.Oslashacute = 0x01fe; 12247 t.Oslashsmall = 0xf7f8; 12248 t.Osmall = 0xf76f; 12249 t.Ostrokeacute = 0x01fe; 12250 t.Otcyrillic = 0x047e; 12251 t.Otilde = 0x00d5; 12252 t.Otildeacute = 0x1e4c; 12253 t.Otildedieresis = 0x1e4e; 12254 t.Otildesmall = 0xf7f5; 12255 t.P = 0x0050; 12256 t.Pacute = 0x1e54; 12257 t.Pcircle = 0x24c5; 12258 t.Pdotaccent = 0x1e56; 12259 t.Pecyrillic = 0x041f; 12260 t.Peharmenian = 0x054a; 12261 t.Pemiddlehookcyrillic = 0x04a6; 12262 t.Phi = 0x03a6; 12263 t.Phook = 0x01a4; 12264 t.Pi = 0x03a0; 12265 t.Piwrarmenian = 0x0553; 12266 t.Pmonospace = 0xff30; 12267 t.Psi = 0x03a8; 12268 t.Psicyrillic = 0x0470; 12269 t.Psmall = 0xf770; 12270 t.Q = 0x0051; 12271 t.Qcircle = 0x24c6; 12272 t.Qmonospace = 0xff31; 12273 t.Qsmall = 0xf771; 12274 t.R = 0x0052; 12275 t.Raarmenian = 0x054c; 12276 t.Racute = 0x0154; 12277 t.Rcaron = 0x0158; 12278 t.Rcedilla = 0x0156; 12279 t.Rcircle = 0x24c7; 12280 t.Rcommaaccent = 0x0156; 12281 t.Rdblgrave = 0x0210; 12282 t.Rdotaccent = 0x1e58; 12283 t.Rdotbelow = 0x1e5a; 12284 t.Rdotbelowmacron = 0x1e5c; 12285 t.Reharmenian = 0x0550; 12286 t.Rfraktur = 0x211c; 12287 t.Rho = 0x03a1; 12288 t.Ringsmall = 0xf6fc; 12289 t.Rinvertedbreve = 0x0212; 12290 t.Rlinebelow = 0x1e5e; 12291 t.Rmonospace = 0xff32; 12292 t.Rsmall = 0xf772; 12293 t.Rsmallinverted = 0x0281; 12294 t.Rsmallinvertedsuperior = 0x02b6; 12295 t.S = 0x0053; 12296 t.SF010000 = 0x250c; 12297 t.SF020000 = 0x2514; 12298 t.SF030000 = 0x2510; 12299 t.SF040000 = 0x2518; 12300 t.SF050000 = 0x253c; 12301 t.SF060000 = 0x252c; 12302 t.SF070000 = 0x2534; 12303 t.SF080000 = 0x251c; 12304 t.SF090000 = 0x2524; 12305 t.SF100000 = 0x2500; 12306 t.SF110000 = 0x2502; 12307 t.SF190000 = 0x2561; 12308 t.SF200000 = 0x2562; 12309 t.SF210000 = 0x2556; 12310 t.SF220000 = 0x2555; 12311 t.SF230000 = 0x2563; 12312 t.SF240000 = 0x2551; 12313 t.SF250000 = 0x2557; 12314 t.SF260000 = 0x255d; 12315 t.SF270000 = 0x255c; 12316 t.SF280000 = 0x255b; 12317 t.SF360000 = 0x255e; 12318 t.SF370000 = 0x255f; 12319 t.SF380000 = 0x255a; 12320 t.SF390000 = 0x2554; 12321 t.SF400000 = 0x2569; 12322 t.SF410000 = 0x2566; 12323 t.SF420000 = 0x2560; 12324 t.SF430000 = 0x2550; 12325 t.SF440000 = 0x256c; 12326 t.SF450000 = 0x2567; 12327 t.SF460000 = 0x2568; 12328 t.SF470000 = 0x2564; 12329 t.SF480000 = 0x2565; 12330 t.SF490000 = 0x2559; 12331 t.SF500000 = 0x2558; 12332 t.SF510000 = 0x2552; 12333 t.SF520000 = 0x2553; 12334 t.SF530000 = 0x256b; 12335 t.SF540000 = 0x256a; 12336 t.Sacute = 0x015a; 12337 t.Sacutedotaccent = 0x1e64; 12338 t.Sampigreek = 0x03e0; 12339 t.Scaron = 0x0160; 12340 t.Scarondotaccent = 0x1e66; 12341 t.Scaronsmall = 0xf6fd; 12342 t.Scedilla = 0x015e; 12343 t.Schwa = 0x018f; 12344 t.Schwacyrillic = 0x04d8; 12345 t.Schwadieresiscyrillic = 0x04da; 12346 t.Scircle = 0x24c8; 12347 t.Scircumflex = 0x015c; 12348 t.Scommaaccent = 0x0218; 12349 t.Sdotaccent = 0x1e60; 12350 t.Sdotbelow = 0x1e62; 12351 t.Sdotbelowdotaccent = 0x1e68; 12352 t.Seharmenian = 0x054d; 12353 t.Sevenroman = 0x2166; 12354 t.Shaarmenian = 0x0547; 12355 t.Shacyrillic = 0x0428; 12356 t.Shchacyrillic = 0x0429; 12357 t.Sheicoptic = 0x03e2; 12358 t.Shhacyrillic = 0x04ba; 12359 t.Shimacoptic = 0x03ec; 12360 t.Sigma = 0x03a3; 12361 t.Sixroman = 0x2165; 12362 t.Smonospace = 0xff33; 12363 t.Softsigncyrillic = 0x042c; 12364 t.Ssmall = 0xf773; 12365 t.Stigmagreek = 0x03da; 12366 t.T = 0x0054; 12367 t.Tau = 0x03a4; 12368 t.Tbar = 0x0166; 12369 t.Tcaron = 0x0164; 12370 t.Tcedilla = 0x0162; 12371 t.Tcircle = 0x24c9; 12372 t.Tcircumflexbelow = 0x1e70; 12373 t.Tcommaaccent = 0x0162; 12374 t.Tdotaccent = 0x1e6a; 12375 t.Tdotbelow = 0x1e6c; 12376 t.Tecyrillic = 0x0422; 12377 t.Tedescendercyrillic = 0x04ac; 12378 t.Tenroman = 0x2169; 12379 t.Tetsecyrillic = 0x04b4; 12380 t.Theta = 0x0398; 12381 t.Thook = 0x01ac; 12382 t.Thorn = 0x00de; 12383 t.Thornsmall = 0xf7fe; 12384 t.Threeroman = 0x2162; 12385 t.Tildesmall = 0xf6fe; 12386 t.Tiwnarmenian = 0x054f; 12387 t.Tlinebelow = 0x1e6e; 12388 t.Tmonospace = 0xff34; 12389 t.Toarmenian = 0x0539; 12390 t.Tonefive = 0x01bc; 12391 t.Tonesix = 0x0184; 12392 t.Tonetwo = 0x01a7; 12393 t.Tretroflexhook = 0x01ae; 12394 t.Tsecyrillic = 0x0426; 12395 t.Tshecyrillic = 0x040b; 12396 t.Tsmall = 0xf774; 12397 t.Twelveroman = 0x216b; 12398 t.Tworoman = 0x2161; 12399 t.U = 0x0055; 12400 t.Uacute = 0x00da; 12401 t.Uacutesmall = 0xf7fa; 12402 t.Ubreve = 0x016c; 12403 t.Ucaron = 0x01d3; 12404 t.Ucircle = 0x24ca; 12405 t.Ucircumflex = 0x00db; 12406 t.Ucircumflexbelow = 0x1e76; 12407 t.Ucircumflexsmall = 0xf7fb; 12408 t.Ucyrillic = 0x0423; 12409 t.Udblacute = 0x0170; 12410 t.Udblgrave = 0x0214; 12411 t.Udieresis = 0x00dc; 12412 t.Udieresisacute = 0x01d7; 12413 t.Udieresisbelow = 0x1e72; 12414 t.Udieresiscaron = 0x01d9; 12415 t.Udieresiscyrillic = 0x04f0; 12416 t.Udieresisgrave = 0x01db; 12417 t.Udieresismacron = 0x01d5; 12418 t.Udieresissmall = 0xf7fc; 12419 t.Udotbelow = 0x1ee4; 12420 t.Ugrave = 0x00d9; 12421 t.Ugravesmall = 0xf7f9; 12422 t.Uhookabove = 0x1ee6; 12423 t.Uhorn = 0x01af; 12424 t.Uhornacute = 0x1ee8; 12425 t.Uhorndotbelow = 0x1ef0; 12426 t.Uhorngrave = 0x1eea; 12427 t.Uhornhookabove = 0x1eec; 12428 t.Uhorntilde = 0x1eee; 12429 t.Uhungarumlaut = 0x0170; 12430 t.Uhungarumlautcyrillic = 0x04f2; 12431 t.Uinvertedbreve = 0x0216; 12432 t.Ukcyrillic = 0x0478; 12433 t.Umacron = 0x016a; 12434 t.Umacroncyrillic = 0x04ee; 12435 t.Umacrondieresis = 0x1e7a; 12436 t.Umonospace = 0xff35; 12437 t.Uogonek = 0x0172; 12438 t.Upsilon = 0x03a5; 12439 t.Upsilon1 = 0x03d2; 12440 t.Upsilonacutehooksymbolgreek = 0x03d3; 12441 t.Upsilonafrican = 0x01b1; 12442 t.Upsilondieresis = 0x03ab; 12443 t.Upsilondieresishooksymbolgreek = 0x03d4; 12444 t.Upsilonhooksymbol = 0x03d2; 12445 t.Upsilontonos = 0x038e; 12446 t.Uring = 0x016e; 12447 t.Ushortcyrillic = 0x040e; 12448 t.Usmall = 0xf775; 12449 t.Ustraightcyrillic = 0x04ae; 12450 t.Ustraightstrokecyrillic = 0x04b0; 12451 t.Utilde = 0x0168; 12452 t.Utildeacute = 0x1e78; 12453 t.Utildebelow = 0x1e74; 12454 t.V = 0x0056; 12455 t.Vcircle = 0x24cb; 12456 t.Vdotbelow = 0x1e7e; 12457 t.Vecyrillic = 0x0412; 12458 t.Vewarmenian = 0x054e; 12459 t.Vhook = 0x01b2; 12460 t.Vmonospace = 0xff36; 12461 t.Voarmenian = 0x0548; 12462 t.Vsmall = 0xf776; 12463 t.Vtilde = 0x1e7c; 12464 t.W = 0x0057; 12465 t.Wacute = 0x1e82; 12466 t.Wcircle = 0x24cc; 12467 t.Wcircumflex = 0x0174; 12468 t.Wdieresis = 0x1e84; 12469 t.Wdotaccent = 0x1e86; 12470 t.Wdotbelow = 0x1e88; 12471 t.Wgrave = 0x1e80; 12472 t.Wmonospace = 0xff37; 12473 t.Wsmall = 0xf777; 12474 t.X = 0x0058; 12475 t.Xcircle = 0x24cd; 12476 t.Xdieresis = 0x1e8c; 12477 t.Xdotaccent = 0x1e8a; 12478 t.Xeharmenian = 0x053d; 12479 t.Xi = 0x039e; 12480 t.Xmonospace = 0xff38; 12481 t.Xsmall = 0xf778; 12482 t.Y = 0x0059; 12483 t.Yacute = 0x00dd; 12484 t.Yacutesmall = 0xf7fd; 12485 t.Yatcyrillic = 0x0462; 12486 t.Ycircle = 0x24ce; 12487 t.Ycircumflex = 0x0176; 12488 t.Ydieresis = 0x0178; 12489 t.Ydieresissmall = 0xf7ff; 12490 t.Ydotaccent = 0x1e8e; 12491 t.Ydotbelow = 0x1ef4; 12492 t.Yericyrillic = 0x042b; 12493 t.Yerudieresiscyrillic = 0x04f8; 12494 t.Ygrave = 0x1ef2; 12495 t.Yhook = 0x01b3; 12496 t.Yhookabove = 0x1ef6; 12497 t.Yiarmenian = 0x0545; 12498 t.Yicyrillic = 0x0407; 12499 t.Yiwnarmenian = 0x0552; 12500 t.Ymonospace = 0xff39; 12501 t.Ysmall = 0xf779; 12502 t.Ytilde = 0x1ef8; 12503 t.Yusbigcyrillic = 0x046a; 12504 t.Yusbigiotifiedcyrillic = 0x046c; 12505 t.Yuslittlecyrillic = 0x0466; 12506 t.Yuslittleiotifiedcyrillic = 0x0468; 12507 t.Z = 0x005a; 12508 t.Zaarmenian = 0x0536; 12509 t.Zacute = 0x0179; 12510 t.Zcaron = 0x017d; 12511 t.Zcaronsmall = 0xf6ff; 12512 t.Zcircle = 0x24cf; 12513 t.Zcircumflex = 0x1e90; 12514 t.Zdot = 0x017b; 12515 t.Zdotaccent = 0x017b; 12516 t.Zdotbelow = 0x1e92; 12517 t.Zecyrillic = 0x0417; 12518 t.Zedescendercyrillic = 0x0498; 12519 t.Zedieresiscyrillic = 0x04de; 12520 t.Zeta = 0x0396; 12521 t.Zhearmenian = 0x053a; 12522 t.Zhebrevecyrillic = 0x04c1; 12523 t.Zhecyrillic = 0x0416; 12524 t.Zhedescendercyrillic = 0x0496; 12525 t.Zhedieresiscyrillic = 0x04dc; 12526 t.Zlinebelow = 0x1e94; 12527 t.Zmonospace = 0xff3a; 12528 t.Zsmall = 0xf77a; 12529 t.Zstroke = 0x01b5; 12530 t.a = 0x0061; 12531 t.aabengali = 0x0986; 12532 t.aacute = 0x00e1; 12533 t.aadeva = 0x0906; 12534 t.aagujarati = 0x0a86; 12535 t.aagurmukhi = 0x0a06; 12536 t.aamatragurmukhi = 0x0a3e; 12537 t.aarusquare = 0x3303; 12538 t.aavowelsignbengali = 0x09be; 12539 t.aavowelsigndeva = 0x093e; 12540 t.aavowelsigngujarati = 0x0abe; 12541 t.abbreviationmarkarmenian = 0x055f; 12542 t.abbreviationsigndeva = 0x0970; 12543 t.abengali = 0x0985; 12544 t.abopomofo = 0x311a; 12545 t.abreve = 0x0103; 12546 t.abreveacute = 0x1eaf; 12547 t.abrevecyrillic = 0x04d1; 12548 t.abrevedotbelow = 0x1eb7; 12549 t.abrevegrave = 0x1eb1; 12550 t.abrevehookabove = 0x1eb3; 12551 t.abrevetilde = 0x1eb5; 12552 t.acaron = 0x01ce; 12553 t.acircle = 0x24d0; 12554 t.acircumflex = 0x00e2; 12555 t.acircumflexacute = 0x1ea5; 12556 t.acircumflexdotbelow = 0x1ead; 12557 t.acircumflexgrave = 0x1ea7; 12558 t.acircumflexhookabove = 0x1ea9; 12559 t.acircumflextilde = 0x1eab; 12560 t.acute = 0x00b4; 12561 t.acutebelowcmb = 0x0317; 12562 t.acutecmb = 0x0301; 12563 t.acutecomb = 0x0301; 12564 t.acutedeva = 0x0954; 12565 t.acutelowmod = 0x02cf; 12566 t.acutetonecmb = 0x0341; 12567 t.acyrillic = 0x0430; 12568 t.adblgrave = 0x0201; 12569 t.addakgurmukhi = 0x0a71; 12570 t.adeva = 0x0905; 12571 t.adieresis = 0x00e4; 12572 t.adieresiscyrillic = 0x04d3; 12573 t.adieresismacron = 0x01df; 12574 t.adotbelow = 0x1ea1; 12575 t.adotmacron = 0x01e1; 12576 t.ae = 0x00e6; 12577 t.aeacute = 0x01fd; 12578 t.aekorean = 0x3150; 12579 t.aemacron = 0x01e3; 12580 t.afii00208 = 0x2015; 12581 t.afii08941 = 0x20a4; 12582 t.afii10017 = 0x0410; 12583 t.afii10018 = 0x0411; 12584 t.afii10019 = 0x0412; 12585 t.afii10020 = 0x0413; 12586 t.afii10021 = 0x0414; 12587 t.afii10022 = 0x0415; 12588 t.afii10023 = 0x0401; 12589 t.afii10024 = 0x0416; 12590 t.afii10025 = 0x0417; 12591 t.afii10026 = 0x0418; 12592 t.afii10027 = 0x0419; 12593 t.afii10028 = 0x041a; 12594 t.afii10029 = 0x041b; 12595 t.afii10030 = 0x041c; 12596 t.afii10031 = 0x041d; 12597 t.afii10032 = 0x041e; 12598 t.afii10033 = 0x041f; 12599 t.afii10034 = 0x0420; 12600 t.afii10035 = 0x0421; 12601 t.afii10036 = 0x0422; 12602 t.afii10037 = 0x0423; 12603 t.afii10038 = 0x0424; 12604 t.afii10039 = 0x0425; 12605 t.afii10040 = 0x0426; 12606 t.afii10041 = 0x0427; 12607 t.afii10042 = 0x0428; 12608 t.afii10043 = 0x0429; 12609 t.afii10044 = 0x042a; 12610 t.afii10045 = 0x042b; 12611 t.afii10046 = 0x042c; 12612 t.afii10047 = 0x042d; 12613 t.afii10048 = 0x042e; 12614 t.afii10049 = 0x042f; 12615 t.afii10050 = 0x0490; 12616 t.afii10051 = 0x0402; 12617 t.afii10052 = 0x0403; 12618 t.afii10053 = 0x0404; 12619 t.afii10054 = 0x0405; 12620 t.afii10055 = 0x0406; 12621 t.afii10056 = 0x0407; 12622 t.afii10057 = 0x0408; 12623 t.afii10058 = 0x0409; 12624 t.afii10059 = 0x040a; 12625 t.afii10060 = 0x040b; 12626 t.afii10061 = 0x040c; 12627 t.afii10062 = 0x040e; 12628 t.afii10063 = 0xf6c4; 12629 t.afii10064 = 0xf6c5; 12630 t.afii10065 = 0x0430; 12631 t.afii10066 = 0x0431; 12632 t.afii10067 = 0x0432; 12633 t.afii10068 = 0x0433; 12634 t.afii10069 = 0x0434; 12635 t.afii10070 = 0x0435; 12636 t.afii10071 = 0x0451; 12637 t.afii10072 = 0x0436; 12638 t.afii10073 = 0x0437; 12639 t.afii10074 = 0x0438; 12640 t.afii10075 = 0x0439; 12641 t.afii10076 = 0x043a; 12642 t.afii10077 = 0x043b; 12643 t.afii10078 = 0x043c; 12644 t.afii10079 = 0x043d; 12645 t.afii10080 = 0x043e; 12646 t.afii10081 = 0x043f; 12647 t.afii10082 = 0x0440; 12648 t.afii10083 = 0x0441; 12649 t.afii10084 = 0x0442; 12650 t.afii10085 = 0x0443; 12651 t.afii10086 = 0x0444; 12652 t.afii10087 = 0x0445; 12653 t.afii10088 = 0x0446; 12654 t.afii10089 = 0x0447; 12655 t.afii10090 = 0x0448; 12656 t.afii10091 = 0x0449; 12657 t.afii10092 = 0x044a; 12658 t.afii10093 = 0x044b; 12659 t.afii10094 = 0x044c; 12660 t.afii10095 = 0x044d; 12661 t.afii10096 = 0x044e; 12662 t.afii10097 = 0x044f; 12663 t.afii10098 = 0x0491; 12664 t.afii10099 = 0x0452; 12665 t.afii10100 = 0x0453; 12666 t.afii10101 = 0x0454; 12667 t.afii10102 = 0x0455; 12668 t.afii10103 = 0x0456; 12669 t.afii10104 = 0x0457; 12670 t.afii10105 = 0x0458; 12671 t.afii10106 = 0x0459; 12672 t.afii10107 = 0x045a; 12673 t.afii10108 = 0x045b; 12674 t.afii10109 = 0x045c; 12675 t.afii10110 = 0x045e; 12676 t.afii10145 = 0x040f; 12677 t.afii10146 = 0x0462; 12678 t.afii10147 = 0x0472; 12679 t.afii10148 = 0x0474; 12680 t.afii10192 = 0xf6c6; 12681 t.afii10193 = 0x045f; 12682 t.afii10194 = 0x0463; 12683 t.afii10195 = 0x0473; 12684 t.afii10196 = 0x0475; 12685 t.afii10831 = 0xf6c7; 12686 t.afii10832 = 0xf6c8; 12687 t.afii10846 = 0x04d9; 12688 t.afii299 = 0x200e; 12689 t.afii300 = 0x200f; 12690 t.afii301 = 0x200d; 12691 t.afii57381 = 0x066a; 12692 t.afii57388 = 0x060c; 12693 t.afii57392 = 0x0660; 12694 t.afii57393 = 0x0661; 12695 t.afii57394 = 0x0662; 12696 t.afii57395 = 0x0663; 12697 t.afii57396 = 0x0664; 12698 t.afii57397 = 0x0665; 12699 t.afii57398 = 0x0666; 12700 t.afii57399 = 0x0667; 12701 t.afii57400 = 0x0668; 12702 t.afii57401 = 0x0669; 12703 t.afii57403 = 0x061b; 12704 t.afii57407 = 0x061f; 12705 t.afii57409 = 0x0621; 12706 t.afii57410 = 0x0622; 12707 t.afii57411 = 0x0623; 12708 t.afii57412 = 0x0624; 12709 t.afii57413 = 0x0625; 12710 t.afii57414 = 0x0626; 12711 t.afii57415 = 0x0627; 12712 t.afii57416 = 0x0628; 12713 t.afii57417 = 0x0629; 12714 t.afii57418 = 0x062a; 12715 t.afii57419 = 0x062b; 12716 t.afii57420 = 0x062c; 12717 t.afii57421 = 0x062d; 12718 t.afii57422 = 0x062e; 12719 t.afii57423 = 0x062f; 12720 t.afii57424 = 0x0630; 12721 t.afii57425 = 0x0631; 12722 t.afii57426 = 0x0632; 12723 t.afii57427 = 0x0633; 12724 t.afii57428 = 0x0634; 12725 t.afii57429 = 0x0635; 12726 t.afii57430 = 0x0636; 12727 t.afii57431 = 0x0637; 12728 t.afii57432 = 0x0638; 12729 t.afii57433 = 0x0639; 12730 t.afii57434 = 0x063a; 12731 t.afii57440 = 0x0640; 12732 t.afii57441 = 0x0641; 12733 t.afii57442 = 0x0642; 12734 t.afii57443 = 0x0643; 12735 t.afii57444 = 0x0644; 12736 t.afii57445 = 0x0645; 12737 t.afii57446 = 0x0646; 12738 t.afii57448 = 0x0648; 12739 t.afii57449 = 0x0649; 12740 t.afii57450 = 0x064a; 12741 t.afii57451 = 0x064b; 12742 t.afii57452 = 0x064c; 12743 t.afii57453 = 0x064d; 12744 t.afii57454 = 0x064e; 12745 t.afii57455 = 0x064f; 12746 t.afii57456 = 0x0650; 12747 t.afii57457 = 0x0651; 12748 t.afii57458 = 0x0652; 12749 t.afii57470 = 0x0647; 12750 t.afii57505 = 0x06a4; 12751 t.afii57506 = 0x067e; 12752 t.afii57507 = 0x0686; 12753 t.afii57508 = 0x0698; 12754 t.afii57509 = 0x06af; 12755 t.afii57511 = 0x0679; 12756 t.afii57512 = 0x0688; 12757 t.afii57513 = 0x0691; 12758 t.afii57514 = 0x06ba; 12759 t.afii57519 = 0x06d2; 12760 t.afii57534 = 0x06d5; 12761 t.afii57636 = 0x20aa; 12762 t.afii57645 = 0x05be; 12763 t.afii57658 = 0x05c3; 12764 t.afii57664 = 0x05d0; 12765 t.afii57665 = 0x05d1; 12766 t.afii57666 = 0x05d2; 12767 t.afii57667 = 0x05d3; 12768 t.afii57668 = 0x05d4; 12769 t.afii57669 = 0x05d5; 12770 t.afii57670 = 0x05d6; 12771 t.afii57671 = 0x05d7; 12772 t.afii57672 = 0x05d8; 12773 t.afii57673 = 0x05d9; 12774 t.afii57674 = 0x05da; 12775 t.afii57675 = 0x05db; 12776 t.afii57676 = 0x05dc; 12777 t.afii57677 = 0x05dd; 12778 t.afii57678 = 0x05de; 12779 t.afii57679 = 0x05df; 12780 t.afii57680 = 0x05e0; 12781 t.afii57681 = 0x05e1; 12782 t.afii57682 = 0x05e2; 12783 t.afii57683 = 0x05e3; 12784 t.afii57684 = 0x05e4; 12785 t.afii57685 = 0x05e5; 12786 t.afii57686 = 0x05e6; 12787 t.afii57687 = 0x05e7; 12788 t.afii57688 = 0x05e8; 12789 t.afii57689 = 0x05e9; 12790 t.afii57690 = 0x05ea; 12791 t.afii57694 = 0xfb2a; 12792 t.afii57695 = 0xfb2b; 12793 t.afii57700 = 0xfb4b; 12794 t.afii57705 = 0xfb1f; 12795 t.afii57716 = 0x05f0; 12796 t.afii57717 = 0x05f1; 12797 t.afii57718 = 0x05f2; 12798 t.afii57723 = 0xfb35; 12799 t.afii57793 = 0x05b4; 12800 t.afii57794 = 0x05b5; 12801 t.afii57795 = 0x05b6; 12802 t.afii57796 = 0x05bb; 12803 t.afii57797 = 0x05b8; 12804 t.afii57798 = 0x05b7; 12805 t.afii57799 = 0x05b0; 12806 t.afii57800 = 0x05b2; 12807 t.afii57801 = 0x05b1; 12808 t.afii57802 = 0x05b3; 12809 t.afii57803 = 0x05c2; 12810 t.afii57804 = 0x05c1; 12811 t.afii57806 = 0x05b9; 12812 t.afii57807 = 0x05bc; 12813 t.afii57839 = 0x05bd; 12814 t.afii57841 = 0x05bf; 12815 t.afii57842 = 0x05c0; 12816 t.afii57929 = 0x02bc; 12817 t.afii61248 = 0x2105; 12818 t.afii61289 = 0x2113; 12819 t.afii61352 = 0x2116; 12820 t.afii61573 = 0x202c; 12821 t.afii61574 = 0x202d; 12822 t.afii61575 = 0x202e; 12823 t.afii61664 = 0x200c; 12824 t.afii63167 = 0x066d; 12825 t.afii64937 = 0x02bd; 12826 t.agrave = 0x00e0; 12827 t.agujarati = 0x0a85; 12828 t.agurmukhi = 0x0a05; 12829 t.ahiragana = 0x3042; 12830 t.ahookabove = 0x1ea3; 12831 t.aibengali = 0x0990; 12832 t.aibopomofo = 0x311e; 12833 t.aideva = 0x0910; 12834 t.aiecyrillic = 0x04d5; 12835 t.aigujarati = 0x0a90; 12836 t.aigurmukhi = 0x0a10; 12837 t.aimatragurmukhi = 0x0a48; 12838 t.ainarabic = 0x0639; 12839 t.ainfinalarabic = 0xfeca; 12840 t.aininitialarabic = 0xfecb; 12841 t.ainmedialarabic = 0xfecc; 12842 t.ainvertedbreve = 0x0203; 12843 t.aivowelsignbengali = 0x09c8; 12844 t.aivowelsigndeva = 0x0948; 12845 t.aivowelsigngujarati = 0x0ac8; 12846 t.akatakana = 0x30a2; 12847 t.akatakanahalfwidth = 0xff71; 12848 t.akorean = 0x314f; 12849 t.alef = 0x05d0; 12850 t.alefarabic = 0x0627; 12851 t.alefdageshhebrew = 0xfb30; 12852 t.aleffinalarabic = 0xfe8e; 12853 t.alefhamzaabovearabic = 0x0623; 12854 t.alefhamzaabovefinalarabic = 0xfe84; 12855 t.alefhamzabelowarabic = 0x0625; 12856 t.alefhamzabelowfinalarabic = 0xfe88; 12857 t.alefhebrew = 0x05d0; 12858 t.aleflamedhebrew = 0xfb4f; 12859 t.alefmaddaabovearabic = 0x0622; 12860 t.alefmaddaabovefinalarabic = 0xfe82; 12861 t.alefmaksuraarabic = 0x0649; 12862 t.alefmaksurafinalarabic = 0xfef0; 12863 t.alefmaksurainitialarabic = 0xfef3; 12864 t.alefmaksuramedialarabic = 0xfef4; 12865 t.alefpatahhebrew = 0xfb2e; 12866 t.alefqamatshebrew = 0xfb2f; 12867 t.aleph = 0x2135; 12868 t.allequal = 0x224c; 12869 t.alpha = 0x03b1; 12870 t.alphatonos = 0x03ac; 12871 t.amacron = 0x0101; 12872 t.amonospace = 0xff41; 12873 t.ampersand = 0x0026; 12874 t.ampersandmonospace = 0xff06; 12875 t.ampersandsmall = 0xf726; 12876 t.amsquare = 0x33c2; 12877 t.anbopomofo = 0x3122; 12878 t.angbopomofo = 0x3124; 12879 t.angbracketleft = 0x3008; 12880 t.angbracketright = 0x3009; 12881 t.angkhankhuthai = 0x0e5a; 12882 t.angle = 0x2220; 12883 t.anglebracketleft = 0x3008; 12884 t.anglebracketleftvertical = 0xfe3f; 12885 t.anglebracketright = 0x3009; 12886 t.anglebracketrightvertical = 0xfe40; 12887 t.angleleft = 0x2329; 12888 t.angleright = 0x232a; 12889 t.angstrom = 0x212b; 12890 t.anoteleia = 0x0387; 12891 t.anudattadeva = 0x0952; 12892 t.anusvarabengali = 0x0982; 12893 t.anusvaradeva = 0x0902; 12894 t.anusvaragujarati = 0x0a82; 12895 t.aogonek = 0x0105; 12896 t.apaatosquare = 0x3300; 12897 t.aparen = 0x249c; 12898 t.apostrophearmenian = 0x055a; 12899 t.apostrophemod = 0x02bc; 12900 t.apple = 0xf8ff; 12901 t.approaches = 0x2250; 12902 t.approxequal = 0x2248; 12903 t.approxequalorimage = 0x2252; 12904 t.approximatelyequal = 0x2245; 12905 t.araeaekorean = 0x318e; 12906 t.araeakorean = 0x318d; 12907 t.arc = 0x2312; 12908 t.arighthalfring = 0x1e9a; 12909 t.aring = 0x00e5; 12910 t.aringacute = 0x01fb; 12911 t.aringbelow = 0x1e01; 12912 t.arrowboth = 0x2194; 12913 t.arrowdashdown = 0x21e3; 12914 t.arrowdashleft = 0x21e0; 12915 t.arrowdashright = 0x21e2; 12916 t.arrowdashup = 0x21e1; 12917 t.arrowdblboth = 0x21d4; 12918 t.arrowdbldown = 0x21d3; 12919 t.arrowdblleft = 0x21d0; 12920 t.arrowdblright = 0x21d2; 12921 t.arrowdblup = 0x21d1; 12922 t.arrowdown = 0x2193; 12923 t.arrowdownleft = 0x2199; 12924 t.arrowdownright = 0x2198; 12925 t.arrowdownwhite = 0x21e9; 12926 t.arrowheaddownmod = 0x02c5; 12927 t.arrowheadleftmod = 0x02c2; 12928 t.arrowheadrightmod = 0x02c3; 12929 t.arrowheadupmod = 0x02c4; 12930 t.arrowhorizex = 0xf8e7; 12931 t.arrowleft = 0x2190; 12932 t.arrowleftdbl = 0x21d0; 12933 t.arrowleftdblstroke = 0x21cd; 12934 t.arrowleftoverright = 0x21c6; 12935 t.arrowleftwhite = 0x21e6; 12936 t.arrowright = 0x2192; 12937 t.arrowrightdblstroke = 0x21cf; 12938 t.arrowrightheavy = 0x279e; 12939 t.arrowrightoverleft = 0x21c4; 12940 t.arrowrightwhite = 0x21e8; 12941 t.arrowtableft = 0x21e4; 12942 t.arrowtabright = 0x21e5; 12943 t.arrowup = 0x2191; 12944 t.arrowupdn = 0x2195; 12945 t.arrowupdnbse = 0x21a8; 12946 t.arrowupdownbase = 0x21a8; 12947 t.arrowupleft = 0x2196; 12948 t.arrowupleftofdown = 0x21c5; 12949 t.arrowupright = 0x2197; 12950 t.arrowupwhite = 0x21e7; 12951 t.arrowvertex = 0xf8e6; 12952 t.asciicircum = 0x005e; 12953 t.asciicircummonospace = 0xff3e; 12954 t.asciitilde = 0x007e; 12955 t.asciitildemonospace = 0xff5e; 12956 t.ascript = 0x0251; 12957 t.ascriptturned = 0x0252; 12958 t.asmallhiragana = 0x3041; 12959 t.asmallkatakana = 0x30a1; 12960 t.asmallkatakanahalfwidth = 0xff67; 12961 t.asterisk = 0x002a; 12962 t.asteriskaltonearabic = 0x066d; 12963 t.asteriskarabic = 0x066d; 12964 t.asteriskmath = 0x2217; 12965 t.asteriskmonospace = 0xff0a; 12966 t.asterisksmall = 0xfe61; 12967 t.asterism = 0x2042; 12968 t.asuperior = 0xf6e9; 12969 t.asymptoticallyequal = 0x2243; 12970 t.at = 0x0040; 12971 t.atilde = 0x00e3; 12972 t.atmonospace = 0xff20; 12973 t.atsmall = 0xfe6b; 12974 t.aturned = 0x0250; 12975 t.aubengali = 0x0994; 12976 t.aubopomofo = 0x3120; 12977 t.audeva = 0x0914; 12978 t.augujarati = 0x0a94; 12979 t.augurmukhi = 0x0a14; 12980 t.aulengthmarkbengali = 0x09d7; 12981 t.aumatragurmukhi = 0x0a4c; 12982 t.auvowelsignbengali = 0x09cc; 12983 t.auvowelsigndeva = 0x094c; 12984 t.auvowelsigngujarati = 0x0acc; 12985 t.avagrahadeva = 0x093d; 12986 t.aybarmenian = 0x0561; 12987 t.ayin = 0x05e2; 12988 t.ayinaltonehebrew = 0xfb20; 12989 t.ayinhebrew = 0x05e2; 12990 t.b = 0x0062; 12991 t.babengali = 0x09ac; 12992 t.backslash = 0x005c; 12993 t.backslashmonospace = 0xff3c; 12994 t.badeva = 0x092c; 12995 t.bagujarati = 0x0aac; 12996 t.bagurmukhi = 0x0a2c; 12997 t.bahiragana = 0x3070; 12998 t.bahtthai = 0x0e3f; 12999 t.bakatakana = 0x30d0; 13000 t.bar = 0x007c; 13001 t.barmonospace = 0xff5c; 13002 t.bbopomofo = 0x3105; 13003 t.bcircle = 0x24d1; 13004 t.bdotaccent = 0x1e03; 13005 t.bdotbelow = 0x1e05; 13006 t.beamedsixteenthnotes = 0x266c; 13007 t.because = 0x2235; 13008 t.becyrillic = 0x0431; 13009 t.beharabic = 0x0628; 13010 t.behfinalarabic = 0xfe90; 13011 t.behinitialarabic = 0xfe91; 13012 t.behiragana = 0x3079; 13013 t.behmedialarabic = 0xfe92; 13014 t.behmeeminitialarabic = 0xfc9f; 13015 t.behmeemisolatedarabic = 0xfc08; 13016 t.behnoonfinalarabic = 0xfc6d; 13017 t.bekatakana = 0x30d9; 13018 t.benarmenian = 0x0562; 13019 t.bet = 0x05d1; 13020 t.beta = 0x03b2; 13021 t.betasymbolgreek = 0x03d0; 13022 t.betdagesh = 0xfb31; 13023 t.betdageshhebrew = 0xfb31; 13024 t.bethebrew = 0x05d1; 13025 t.betrafehebrew = 0xfb4c; 13026 t.bhabengali = 0x09ad; 13027 t.bhadeva = 0x092d; 13028 t.bhagujarati = 0x0aad; 13029 t.bhagurmukhi = 0x0a2d; 13030 t.bhook = 0x0253; 13031 t.bihiragana = 0x3073; 13032 t.bikatakana = 0x30d3; 13033 t.bilabialclick = 0x0298; 13034 t.bindigurmukhi = 0x0a02; 13035 t.birusquare = 0x3331; 13036 t.blackcircle = 0x25cf; 13037 t.blackdiamond = 0x25c6; 13038 t.blackdownpointingtriangle = 0x25bc; 13039 t.blackleftpointingpointer = 0x25c4; 13040 t.blackleftpointingtriangle = 0x25c0; 13041 t.blacklenticularbracketleft = 0x3010; 13042 t.blacklenticularbracketleftvertical = 0xfe3b; 13043 t.blacklenticularbracketright = 0x3011; 13044 t.blacklenticularbracketrightvertical = 0xfe3c; 13045 t.blacklowerlefttriangle = 0x25e3; 13046 t.blacklowerrighttriangle = 0x25e2; 13047 t.blackrectangle = 0x25ac; 13048 t.blackrightpointingpointer = 0x25ba; 13049 t.blackrightpointingtriangle = 0x25b6; 13050 t.blacksmallsquare = 0x25aa; 13051 t.blacksmilingface = 0x263b; 13052 t.blacksquare = 0x25a0; 13053 t.blackstar = 0x2605; 13054 t.blackupperlefttriangle = 0x25e4; 13055 t.blackupperrighttriangle = 0x25e5; 13056 t.blackuppointingsmalltriangle = 0x25b4; 13057 t.blackuppointingtriangle = 0x25b2; 13058 t.blank = 0x2423; 13059 t.blinebelow = 0x1e07; 13060 t.block = 0x2588; 13061 t.bmonospace = 0xff42; 13062 t.bobaimaithai = 0x0e1a; 13063 t.bohiragana = 0x307c; 13064 t.bokatakana = 0x30dc; 13065 t.bparen = 0x249d; 13066 t.bqsquare = 0x33c3; 13067 t.braceex = 0xf8f4; 13068 t.braceleft = 0x007b; 13069 t.braceleftbt = 0xf8f3; 13070 t.braceleftmid = 0xf8f2; 13071 t.braceleftmonospace = 0xff5b; 13072 t.braceleftsmall = 0xfe5b; 13073 t.bracelefttp = 0xf8f1; 13074 t.braceleftvertical = 0xfe37; 13075 t.braceright = 0x007d; 13076 t.bracerightbt = 0xf8fe; 13077 t.bracerightmid = 0xf8fd; 13078 t.bracerightmonospace = 0xff5d; 13079 t.bracerightsmall = 0xfe5c; 13080 t.bracerighttp = 0xf8fc; 13081 t.bracerightvertical = 0xfe38; 13082 t.bracketleft = 0x005b; 13083 t.bracketleftbt = 0xf8f0; 13084 t.bracketleftex = 0xf8ef; 13085 t.bracketleftmonospace = 0xff3b; 13086 t.bracketlefttp = 0xf8ee; 13087 t.bracketright = 0x005d; 13088 t.bracketrightbt = 0xf8fb; 13089 t.bracketrightex = 0xf8fa; 13090 t.bracketrightmonospace = 0xff3d; 13091 t.bracketrighttp = 0xf8f9; 13092 t.breve = 0x02d8; 13093 t.brevebelowcmb = 0x032e; 13094 t.brevecmb = 0x0306; 13095 t.breveinvertedbelowcmb = 0x032f; 13096 t.breveinvertedcmb = 0x0311; 13097 t.breveinverteddoublecmb = 0x0361; 13098 t.bridgebelowcmb = 0x032a; 13099 t.bridgeinvertedbelowcmb = 0x033a; 13100 t.brokenbar = 0x00a6; 13101 t.bstroke = 0x0180; 13102 t.bsuperior = 0xf6ea; 13103 t.btopbar = 0x0183; 13104 t.buhiragana = 0x3076; 13105 t.bukatakana = 0x30d6; 13106 t.bullet = 0x2022; 13107 t.bulletinverse = 0x25d8; 13108 t.bulletoperator = 0x2219; 13109 t.bullseye = 0x25ce; 13110 t.c = 0x0063; 13111 t.caarmenian = 0x056e; 13112 t.cabengali = 0x099a; 13113 t.cacute = 0x0107; 13114 t.cadeva = 0x091a; 13115 t.cagujarati = 0x0a9a; 13116 t.cagurmukhi = 0x0a1a; 13117 t.calsquare = 0x3388; 13118 t.candrabindubengali = 0x0981; 13119 t.candrabinducmb = 0x0310; 13120 t.candrabindudeva = 0x0901; 13121 t.candrabindugujarati = 0x0a81; 13122 t.capslock = 0x21ea; 13123 t.careof = 0x2105; 13124 t.caron = 0x02c7; 13125 t.caronbelowcmb = 0x032c; 13126 t.caroncmb = 0x030c; 13127 t.carriagereturn = 0x21b5; 13128 t.cbopomofo = 0x3118; 13129 t.ccaron = 0x010d; 13130 t.ccedilla = 0x00e7; 13131 t.ccedillaacute = 0x1e09; 13132 t.ccircle = 0x24d2; 13133 t.ccircumflex = 0x0109; 13134 t.ccurl = 0x0255; 13135 t.cdot = 0x010b; 13136 t.cdotaccent = 0x010b; 13137 t.cdsquare = 0x33c5; 13138 t.cedilla = 0x00b8; 13139 t.cedillacmb = 0x0327; 13140 t.cent = 0x00a2; 13141 t.centigrade = 0x2103; 13142 t.centinferior = 0xf6df; 13143 t.centmonospace = 0xffe0; 13144 t.centoldstyle = 0xf7a2; 13145 t.centsuperior = 0xf6e0; 13146 t.chaarmenian = 0x0579; 13147 t.chabengali = 0x099b; 13148 t.chadeva = 0x091b; 13149 t.chagujarati = 0x0a9b; 13150 t.chagurmukhi = 0x0a1b; 13151 t.chbopomofo = 0x3114; 13152 t.cheabkhasiancyrillic = 0x04bd; 13153 t.checkmark = 0x2713; 13154 t.checyrillic = 0x0447; 13155 t.chedescenderabkhasiancyrillic = 0x04bf; 13156 t.chedescendercyrillic = 0x04b7; 13157 t.chedieresiscyrillic = 0x04f5; 13158 t.cheharmenian = 0x0573; 13159 t.chekhakassiancyrillic = 0x04cc; 13160 t.cheverticalstrokecyrillic = 0x04b9; 13161 t.chi = 0x03c7; 13162 t.chieuchacirclekorean = 0x3277; 13163 t.chieuchaparenkorean = 0x3217; 13164 t.chieuchcirclekorean = 0x3269; 13165 t.chieuchkorean = 0x314a; 13166 t.chieuchparenkorean = 0x3209; 13167 t.chochangthai = 0x0e0a; 13168 t.chochanthai = 0x0e08; 13169 t.chochingthai = 0x0e09; 13170 t.chochoethai = 0x0e0c; 13171 t.chook = 0x0188; 13172 t.cieucacirclekorean = 0x3276; 13173 t.cieucaparenkorean = 0x3216; 13174 t.cieuccirclekorean = 0x3268; 13175 t.cieuckorean = 0x3148; 13176 t.cieucparenkorean = 0x3208; 13177 t.cieucuparenkorean = 0x321c; 13178 t.circle = 0x25cb; 13179 t.circlecopyrt = 0x00a9; 13180 t.circlemultiply = 0x2297; 13181 t.circleot = 0x2299; 13182 t.circleplus = 0x2295; 13183 t.circlepostalmark = 0x3036; 13184 t.circlewithlefthalfblack = 0x25d0; 13185 t.circlewithrighthalfblack = 0x25d1; 13186 t.circumflex = 0x02c6; 13187 t.circumflexbelowcmb = 0x032d; 13188 t.circumflexcmb = 0x0302; 13189 t.clear = 0x2327; 13190 t.clickalveolar = 0x01c2; 13191 t.clickdental = 0x01c0; 13192 t.clicklateral = 0x01c1; 13193 t.clickretroflex = 0x01c3; 13194 t.club = 0x2663; 13195 t.clubsuitblack = 0x2663; 13196 t.clubsuitwhite = 0x2667; 13197 t.cmcubedsquare = 0x33a4; 13198 t.cmonospace = 0xff43; 13199 t.cmsquaredsquare = 0x33a0; 13200 t.coarmenian = 0x0581; 13201 t.colon = 0x003a; 13202 t.colonmonetary = 0x20a1; 13203 t.colonmonospace = 0xff1a; 13204 t.colonsign = 0x20a1; 13205 t.colonsmall = 0xfe55; 13206 t.colontriangularhalfmod = 0x02d1; 13207 t.colontriangularmod = 0x02d0; 13208 t.comma = 0x002c; 13209 t.commaabovecmb = 0x0313; 13210 t.commaaboverightcmb = 0x0315; 13211 t.commaaccent = 0xf6c3; 13212 t.commaarabic = 0x060c; 13213 t.commaarmenian = 0x055d; 13214 t.commainferior = 0xf6e1; 13215 t.commamonospace = 0xff0c; 13216 t.commareversedabovecmb = 0x0314; 13217 t.commareversedmod = 0x02bd; 13218 t.commasmall = 0xfe50; 13219 t.commasuperior = 0xf6e2; 13220 t.commaturnedabovecmb = 0x0312; 13221 t.commaturnedmod = 0x02bb; 13222 t.compass = 0x263c; 13223 t.congruent = 0x2245; 13224 t.contourintegral = 0x222e; 13225 t.control = 0x2303; 13226 t.controlACK = 0x0006; 13227 t.controlBEL = 0x0007; 13228 t.controlBS = 0x0008; 13229 t.controlCAN = 0x0018; 13230 t.controlCR = 0x000d; 13231 t.controlDC1 = 0x0011; 13232 t.controlDC2 = 0x0012; 13233 t.controlDC3 = 0x0013; 13234 t.controlDC4 = 0x0014; 13235 t.controlDEL = 0x007f; 13236 t.controlDLE = 0x0010; 13237 t.controlEM = 0x0019; 13238 t.controlENQ = 0x0005; 13239 t.controlEOT = 0x0004; 13240 t.controlESC = 0x001b; 13241 t.controlETB = 0x0017; 13242 t.controlETX = 0x0003; 13243 t.controlFF = 0x000c; 13244 t.controlFS = 0x001c; 13245 t.controlGS = 0x001d; 13246 t.controlHT = 0x0009; 13247 t.controlLF = 0x000a; 13248 t.controlNAK = 0x0015; 13249 t.controlNULL = 0x0000; 13250 t.controlRS = 0x001e; 13251 t.controlSI = 0x000f; 13252 t.controlSO = 0x000e; 13253 t.controlSOT = 0x0002; 13254 t.controlSTX = 0x0001; 13255 t.controlSUB = 0x001a; 13256 t.controlSYN = 0x0016; 13257 t.controlUS = 0x001f; 13258 t.controlVT = 0x000b; 13259 t.copyright = 0x00a9; 13260 t.copyrightsans = 0xf8e9; 13261 t.copyrightserif = 0xf6d9; 13262 t.cornerbracketleft = 0x300c; 13263 t.cornerbracketlefthalfwidth = 0xff62; 13264 t.cornerbracketleftvertical = 0xfe41; 13265 t.cornerbracketright = 0x300d; 13266 t.cornerbracketrighthalfwidth = 0xff63; 13267 t.cornerbracketrightvertical = 0xfe42; 13268 t.corporationsquare = 0x337f; 13269 t.cosquare = 0x33c7; 13270 t.coverkgsquare = 0x33c6; 13271 t.cparen = 0x249e; 13272 t.cruzeiro = 0x20a2; 13273 t.cstretched = 0x0297; 13274 t.curlyand = 0x22cf; 13275 t.curlyor = 0x22ce; 13276 t.currency = 0x00a4; 13277 t.cyrBreve = 0xf6d1; 13278 t.cyrFlex = 0xf6d2; 13279 t.cyrbreve = 0xf6d4; 13280 t.cyrflex = 0xf6d5; 13281 t.d = 0x0064; 13282 t.daarmenian = 0x0564; 13283 t.dabengali = 0x09a6; 13284 t.dadarabic = 0x0636; 13285 t.dadeva = 0x0926; 13286 t.dadfinalarabic = 0xfebe; 13287 t.dadinitialarabic = 0xfebf; 13288 t.dadmedialarabic = 0xfec0; 13289 t.dagesh = 0x05bc; 13290 t.dageshhebrew = 0x05bc; 13291 t.dagger = 0x2020; 13292 t.daggerdbl = 0x2021; 13293 t.dagujarati = 0x0aa6; 13294 t.dagurmukhi = 0x0a26; 13295 t.dahiragana = 0x3060; 13296 t.dakatakana = 0x30c0; 13297 t.dalarabic = 0x062f; 13298 t.dalet = 0x05d3; 13299 t.daletdagesh = 0xfb33; 13300 t.daletdageshhebrew = 0xfb33; 13301 t.dalethebrew = 0x05d3; 13302 t.dalfinalarabic = 0xfeaa; 13303 t.dammaarabic = 0x064f; 13304 t.dammalowarabic = 0x064f; 13305 t.dammatanaltonearabic = 0x064c; 13306 t.dammatanarabic = 0x064c; 13307 t.danda = 0x0964; 13308 t.dargahebrew = 0x05a7; 13309 t.dargalefthebrew = 0x05a7; 13310 t.dasiapneumatacyrilliccmb = 0x0485; 13311 t.dblGrave = 0xf6d3; 13312 t.dblanglebracketleft = 0x300a; 13313 t.dblanglebracketleftvertical = 0xfe3d; 13314 t.dblanglebracketright = 0x300b; 13315 t.dblanglebracketrightvertical = 0xfe3e; 13316 t.dblarchinvertedbelowcmb = 0x032b; 13317 t.dblarrowleft = 0x21d4; 13318 t.dblarrowright = 0x21d2; 13319 t.dbldanda = 0x0965; 13320 t.dblgrave = 0xf6d6; 13321 t.dblgravecmb = 0x030f; 13322 t.dblintegral = 0x222c; 13323 t.dbllowline = 0x2017; 13324 t.dbllowlinecmb = 0x0333; 13325 t.dbloverlinecmb = 0x033f; 13326 t.dblprimemod = 0x02ba; 13327 t.dblverticalbar = 0x2016; 13328 t.dblverticallineabovecmb = 0x030e; 13329 t.dbopomofo = 0x3109; 13330 t.dbsquare = 0x33c8; 13331 t.dcaron = 0x010f; 13332 t.dcedilla = 0x1e11; 13333 t.dcircle = 0x24d3; 13334 t.dcircumflexbelow = 0x1e13; 13335 t.dcroat = 0x0111; 13336 t.ddabengali = 0x09a1; 13337 t.ddadeva = 0x0921; 13338 t.ddagujarati = 0x0aa1; 13339 t.ddagurmukhi = 0x0a21; 13340 t.ddalarabic = 0x0688; 13341 t.ddalfinalarabic = 0xfb89; 13342 t.dddhadeva = 0x095c; 13343 t.ddhabengali = 0x09a2; 13344 t.ddhadeva = 0x0922; 13345 t.ddhagujarati = 0x0aa2; 13346 t.ddhagurmukhi = 0x0a22; 13347 t.ddotaccent = 0x1e0b; 13348 t.ddotbelow = 0x1e0d; 13349 t.decimalseparatorarabic = 0x066b; 13350 t.decimalseparatorpersian = 0x066b; 13351 t.decyrillic = 0x0434; 13352 t.degree = 0x00b0; 13353 t.dehihebrew = 0x05ad; 13354 t.dehiragana = 0x3067; 13355 t.deicoptic = 0x03ef; 13356 t.dekatakana = 0x30c7; 13357 t.deleteleft = 0x232b; 13358 t.deleteright = 0x2326; 13359 t.delta = 0x03b4; 13360 t.deltaturned = 0x018d; 13361 t.denominatorminusonenumeratorbengali = 0x09f8; 13362 t.dezh = 0x02a4; 13363 t.dhabengali = 0x09a7; 13364 t.dhadeva = 0x0927; 13365 t.dhagujarati = 0x0aa7; 13366 t.dhagurmukhi = 0x0a27; 13367 t.dhook = 0x0257; 13368 t.dialytikatonos = 0x0385; 13369 t.dialytikatonoscmb = 0x0344; 13370 t.diamond = 0x2666; 13371 t.diamondsuitwhite = 0x2662; 13372 t.dieresis = 0x00a8; 13373 t.dieresisacute = 0xf6d7; 13374 t.dieresisbelowcmb = 0x0324; 13375 t.dieresiscmb = 0x0308; 13376 t.dieresisgrave = 0xf6d8; 13377 t.dieresistonos = 0x0385; 13378 t.dihiragana = 0x3062; 13379 t.dikatakana = 0x30c2; 13380 t.dittomark = 0x3003; 13381 t.divide = 0x00f7; 13382 t.divides = 0x2223; 13383 t.divisionslash = 0x2215; 13384 t.djecyrillic = 0x0452; 13385 t.dkshade = 0x2593; 13386 t.dlinebelow = 0x1e0f; 13387 t.dlsquare = 0x3397; 13388 t.dmacron = 0x0111; 13389 t.dmonospace = 0xff44; 13390 t.dnblock = 0x2584; 13391 t.dochadathai = 0x0e0e; 13392 t.dodekthai = 0x0e14; 13393 t.dohiragana = 0x3069; 13394 t.dokatakana = 0x30c9; 13395 t.dollar = 0x0024; 13396 t.dollarinferior = 0xf6e3; 13397 t.dollarmonospace = 0xff04; 13398 t.dollaroldstyle = 0xf724; 13399 t.dollarsmall = 0xfe69; 13400 t.dollarsuperior = 0xf6e4; 13401 t.dong = 0x20ab; 13402 t.dorusquare = 0x3326; 13403 t.dotaccent = 0x02d9; 13404 t.dotaccentcmb = 0x0307; 13405 t.dotbelowcmb = 0x0323; 13406 t.dotbelowcomb = 0x0323; 13407 t.dotkatakana = 0x30fb; 13408 t.dotlessi = 0x0131; 13409 t.dotlessj = 0xf6be; 13410 t.dotlessjstrokehook = 0x0284; 13411 t.dotmath = 0x22c5; 13412 t.dottedcircle = 0x25cc; 13413 t.doubleyodpatah = 0xfb1f; 13414 t.doubleyodpatahhebrew = 0xfb1f; 13415 t.downtackbelowcmb = 0x031e; 13416 t.downtackmod = 0x02d5; 13417 t.dparen = 0x249f; 13418 t.dsuperior = 0xf6eb; 13419 t.dtail = 0x0256; 13420 t.dtopbar = 0x018c; 13421 t.duhiragana = 0x3065; 13422 t.dukatakana = 0x30c5; 13423 t.dz = 0x01f3; 13424 t.dzaltone = 0x02a3; 13425 t.dzcaron = 0x01c6; 13426 t.dzcurl = 0x02a5; 13427 t.dzeabkhasiancyrillic = 0x04e1; 13428 t.dzecyrillic = 0x0455; 13429 t.dzhecyrillic = 0x045f; 13430 t.e = 0x0065; 13431 t.eacute = 0x00e9; 13432 t.earth = 0x2641; 13433 t.ebengali = 0x098f; 13434 t.ebopomofo = 0x311c; 13435 t.ebreve = 0x0115; 13436 t.ecandradeva = 0x090d; 13437 t.ecandragujarati = 0x0a8d; 13438 t.ecandravowelsigndeva = 0x0945; 13439 t.ecandravowelsigngujarati = 0x0ac5; 13440 t.ecaron = 0x011b; 13441 t.ecedillabreve = 0x1e1d; 13442 t.echarmenian = 0x0565; 13443 t.echyiwnarmenian = 0x0587; 13444 t.ecircle = 0x24d4; 13445 t.ecircumflex = 0x00ea; 13446 t.ecircumflexacute = 0x1ebf; 13447 t.ecircumflexbelow = 0x1e19; 13448 t.ecircumflexdotbelow = 0x1ec7; 13449 t.ecircumflexgrave = 0x1ec1; 13450 t.ecircumflexhookabove = 0x1ec3; 13451 t.ecircumflextilde = 0x1ec5; 13452 t.ecyrillic = 0x0454; 13453 t.edblgrave = 0x0205; 13454 t.edeva = 0x090f; 13455 t.edieresis = 0x00eb; 13456 t.edot = 0x0117; 13457 t.edotaccent = 0x0117; 13458 t.edotbelow = 0x1eb9; 13459 t.eegurmukhi = 0x0a0f; 13460 t.eematragurmukhi = 0x0a47; 13461 t.efcyrillic = 0x0444; 13462 t.egrave = 0x00e8; 13463 t.egujarati = 0x0a8f; 13464 t.eharmenian = 0x0567; 13465 t.ehbopomofo = 0x311d; 13466 t.ehiragana = 0x3048; 13467 t.ehookabove = 0x1ebb; 13468 t.eibopomofo = 0x311f; 13469 t.eight = 0x0038; 13470 t.eightarabic = 0x0668; 13471 t.eightbengali = 0x09ee; 13472 t.eightcircle = 0x2467; 13473 t.eightcircleinversesansserif = 0x2791; 13474 t.eightdeva = 0x096e; 13475 t.eighteencircle = 0x2471; 13476 t.eighteenparen = 0x2485; 13477 t.eighteenperiod = 0x2499; 13478 t.eightgujarati = 0x0aee; 13479 t.eightgurmukhi = 0x0a6e; 13480 t.eighthackarabic = 0x0668; 13481 t.eighthangzhou = 0x3028; 13482 t.eighthnotebeamed = 0x266b; 13483 t.eightideographicparen = 0x3227; 13484 t.eightinferior = 0x2088; 13485 t.eightmonospace = 0xff18; 13486 t.eightoldstyle = 0xf738; 13487 t.eightparen = 0x247b; 13488 t.eightperiod = 0x248f; 13489 t.eightpersian = 0x06f8; 13490 t.eightroman = 0x2177; 13491 t.eightsuperior = 0x2078; 13492 t.eightthai = 0x0e58; 13493 t.einvertedbreve = 0x0207; 13494 t.eiotifiedcyrillic = 0x0465; 13495 t.ekatakana = 0x30a8; 13496 t.ekatakanahalfwidth = 0xff74; 13497 t.ekonkargurmukhi = 0x0a74; 13498 t.ekorean = 0x3154; 13499 t.elcyrillic = 0x043b; 13500 t.element = 0x2208; 13501 t.elevencircle = 0x246a; 13502 t.elevenparen = 0x247e; 13503 t.elevenperiod = 0x2492; 13504 t.elevenroman = 0x217a; 13505 t.ellipsis = 0x2026; 13506 t.ellipsisvertical = 0x22ee; 13507 t.emacron = 0x0113; 13508 t.emacronacute = 0x1e17; 13509 t.emacrongrave = 0x1e15; 13510 t.emcyrillic = 0x043c; 13511 t.emdash = 0x2014; 13512 t.emdashvertical = 0xfe31; 13513 t.emonospace = 0xff45; 13514 t.emphasismarkarmenian = 0x055b; 13515 t.emptyset = 0x2205; 13516 t.enbopomofo = 0x3123; 13517 t.encyrillic = 0x043d; 13518 t.endash = 0x2013; 13519 t.endashvertical = 0xfe32; 13520 t.endescendercyrillic = 0x04a3; 13521 t.eng = 0x014b; 13522 t.engbopomofo = 0x3125; 13523 t.enghecyrillic = 0x04a5; 13524 t.enhookcyrillic = 0x04c8; 13525 t.enspace = 0x2002; 13526 t.eogonek = 0x0119; 13527 t.eokorean = 0x3153; 13528 t.eopen = 0x025b; 13529 t.eopenclosed = 0x029a; 13530 t.eopenreversed = 0x025c; 13531 t.eopenreversedclosed = 0x025e; 13532 t.eopenreversedhook = 0x025d; 13533 t.eparen = 0x24a0; 13534 t.epsilon = 0x03b5; 13535 t.epsilontonos = 0x03ad; 13536 t.equal = 0x003d; 13537 t.equalmonospace = 0xff1d; 13538 t.equalsmall = 0xfe66; 13539 t.equalsuperior = 0x207c; 13540 t.equivalence = 0x2261; 13541 t.erbopomofo = 0x3126; 13542 t.ercyrillic = 0x0440; 13543 t.ereversed = 0x0258; 13544 t.ereversedcyrillic = 0x044d; 13545 t.escyrillic = 0x0441; 13546 t.esdescendercyrillic = 0x04ab; 13547 t.esh = 0x0283; 13548 t.eshcurl = 0x0286; 13549 t.eshortdeva = 0x090e; 13550 t.eshortvowelsigndeva = 0x0946; 13551 t.eshreversedloop = 0x01aa; 13552 t.eshsquatreversed = 0x0285; 13553 t.esmallhiragana = 0x3047; 13554 t.esmallkatakana = 0x30a7; 13555 t.esmallkatakanahalfwidth = 0xff6a; 13556 t.estimated = 0x212e; 13557 t.esuperior = 0xf6ec; 13558 t.eta = 0x03b7; 13559 t.etarmenian = 0x0568; 13560 t.etatonos = 0x03ae; 13561 t.eth = 0x00f0; 13562 t.etilde = 0x1ebd; 13563 t.etildebelow = 0x1e1b; 13564 t.etnahtafoukhhebrew = 0x0591; 13565 t.etnahtafoukhlefthebrew = 0x0591; 13566 t.etnahtahebrew = 0x0591; 13567 t.etnahtalefthebrew = 0x0591; 13568 t.eturned = 0x01dd; 13569 t.eukorean = 0x3161; 13570 t.euro = 0x20ac; 13571 t.evowelsignbengali = 0x09c7; 13572 t.evowelsigndeva = 0x0947; 13573 t.evowelsigngujarati = 0x0ac7; 13574 t.exclam = 0x0021; 13575 t.exclamarmenian = 0x055c; 13576 t.exclamdbl = 0x203c; 13577 t.exclamdown = 0x00a1; 13578 t.exclamdownsmall = 0xf7a1; 13579 t.exclammonospace = 0xff01; 13580 t.exclamsmall = 0xf721; 13581 t.existential = 0x2203; 13582 t.ezh = 0x0292; 13583 t.ezhcaron = 0x01ef; 13584 t.ezhcurl = 0x0293; 13585 t.ezhreversed = 0x01b9; 13586 t.ezhtail = 0x01ba; 13587 t.f = 0x0066; 13588 t.fadeva = 0x095e; 13589 t.fagurmukhi = 0x0a5e; 13590 t.fahrenheit = 0x2109; 13591 t.fathaarabic = 0x064e; 13592 t.fathalowarabic = 0x064e; 13593 t.fathatanarabic = 0x064b; 13594 t.fbopomofo = 0x3108; 13595 t.fcircle = 0x24d5; 13596 t.fdotaccent = 0x1e1f; 13597 t.feharabic = 0x0641; 13598 t.feharmenian = 0x0586; 13599 t.fehfinalarabic = 0xfed2; 13600 t.fehinitialarabic = 0xfed3; 13601 t.fehmedialarabic = 0xfed4; 13602 t.feicoptic = 0x03e5; 13603 t.female = 0x2640; 13604 t.ff = 0xfb00; 13605 t.f_f = 0xfb00; 13606 t.ffi = 0xfb03; 13607 t.f_f_i = 0xfb03; 13608 t.ffl = 0xfb04; 13609 t.f_f_l = 0xfb04; 13610 t.fi = 0xfb01; 13611 t.f_i = 0xfb01; 13612 t.fifteencircle = 0x246e; 13613 t.fifteenparen = 0x2482; 13614 t.fifteenperiod = 0x2496; 13615 t.figuredash = 0x2012; 13616 t.filledbox = 0x25a0; 13617 t.filledrect = 0x25ac; 13618 t.finalkaf = 0x05da; 13619 t.finalkafdagesh = 0xfb3a; 13620 t.finalkafdageshhebrew = 0xfb3a; 13621 t.finalkafhebrew = 0x05da; 13622 t.finalmem = 0x05dd; 13623 t.finalmemhebrew = 0x05dd; 13624 t.finalnun = 0x05df; 13625 t.finalnunhebrew = 0x05df; 13626 t.finalpe = 0x05e3; 13627 t.finalpehebrew = 0x05e3; 13628 t.finaltsadi = 0x05e5; 13629 t.finaltsadihebrew = 0x05e5; 13630 t.firsttonechinese = 0x02c9; 13631 t.fisheye = 0x25c9; 13632 t.fitacyrillic = 0x0473; 13633 t.five = 0x0035; 13634 t.fivearabic = 0x0665; 13635 t.fivebengali = 0x09eb; 13636 t.fivecircle = 0x2464; 13637 t.fivecircleinversesansserif = 0x278e; 13638 t.fivedeva = 0x096b; 13639 t.fiveeighths = 0x215d; 13640 t.fivegujarati = 0x0aeb; 13641 t.fivegurmukhi = 0x0a6b; 13642 t.fivehackarabic = 0x0665; 13643 t.fivehangzhou = 0x3025; 13644 t.fiveideographicparen = 0x3224; 13645 t.fiveinferior = 0x2085; 13646 t.fivemonospace = 0xff15; 13647 t.fiveoldstyle = 0xf735; 13648 t.fiveparen = 0x2478; 13649 t.fiveperiod = 0x248c; 13650 t.fivepersian = 0x06f5; 13651 t.fiveroman = 0x2174; 13652 t.fivesuperior = 0x2075; 13653 t.fivethai = 0x0e55; 13654 t.fl = 0xfb02; 13655 t.f_l = 0xfb02; 13656 t.florin = 0x0192; 13657 t.fmonospace = 0xff46; 13658 t.fmsquare = 0x3399; 13659 t.fofanthai = 0x0e1f; 13660 t.fofathai = 0x0e1d; 13661 t.fongmanthai = 0x0e4f; 13662 t.forall = 0x2200; 13663 t.four = 0x0034; 13664 t.fourarabic = 0x0664; 13665 t.fourbengali = 0x09ea; 13666 t.fourcircle = 0x2463; 13667 t.fourcircleinversesansserif = 0x278d; 13668 t.fourdeva = 0x096a; 13669 t.fourgujarati = 0x0aea; 13670 t.fourgurmukhi = 0x0a6a; 13671 t.fourhackarabic = 0x0664; 13672 t.fourhangzhou = 0x3024; 13673 t.fourideographicparen = 0x3223; 13674 t.fourinferior = 0x2084; 13675 t.fourmonospace = 0xff14; 13676 t.fournumeratorbengali = 0x09f7; 13677 t.fouroldstyle = 0xf734; 13678 t.fourparen = 0x2477; 13679 t.fourperiod = 0x248b; 13680 t.fourpersian = 0x06f4; 13681 t.fourroman = 0x2173; 13682 t.foursuperior = 0x2074; 13683 t.fourteencircle = 0x246d; 13684 t.fourteenparen = 0x2481; 13685 t.fourteenperiod = 0x2495; 13686 t.fourthai = 0x0e54; 13687 t.fourthtonechinese = 0x02cb; 13688 t.fparen = 0x24a1; 13689 t.fraction = 0x2044; 13690 t.franc = 0x20a3; 13691 t.g = 0x0067; 13692 t.gabengali = 0x0997; 13693 t.gacute = 0x01f5; 13694 t.gadeva = 0x0917; 13695 t.gafarabic = 0x06af; 13696 t.gaffinalarabic = 0xfb93; 13697 t.gafinitialarabic = 0xfb94; 13698 t.gafmedialarabic = 0xfb95; 13699 t.gagujarati = 0x0a97; 13700 t.gagurmukhi = 0x0a17; 13701 t.gahiragana = 0x304c; 13702 t.gakatakana = 0x30ac; 13703 t.gamma = 0x03b3; 13704 t.gammalatinsmall = 0x0263; 13705 t.gammasuperior = 0x02e0; 13706 t.gangiacoptic = 0x03eb; 13707 t.gbopomofo = 0x310d; 13708 t.gbreve = 0x011f; 13709 t.gcaron = 0x01e7; 13710 t.gcedilla = 0x0123; 13711 t.gcircle = 0x24d6; 13712 t.gcircumflex = 0x011d; 13713 t.gcommaaccent = 0x0123; 13714 t.gdot = 0x0121; 13715 t.gdotaccent = 0x0121; 13716 t.gecyrillic = 0x0433; 13717 t.gehiragana = 0x3052; 13718 t.gekatakana = 0x30b2; 13719 t.geometricallyequal = 0x2251; 13720 t.gereshaccenthebrew = 0x059c; 13721 t.gereshhebrew = 0x05f3; 13722 t.gereshmuqdamhebrew = 0x059d; 13723 t.germandbls = 0x00df; 13724 t.gershayimaccenthebrew = 0x059e; 13725 t.gershayimhebrew = 0x05f4; 13726 t.getamark = 0x3013; 13727 t.ghabengali = 0x0998; 13728 t.ghadarmenian = 0x0572; 13729 t.ghadeva = 0x0918; 13730 t.ghagujarati = 0x0a98; 13731 t.ghagurmukhi = 0x0a18; 13732 t.ghainarabic = 0x063a; 13733 t.ghainfinalarabic = 0xfece; 13734 t.ghaininitialarabic = 0xfecf; 13735 t.ghainmedialarabic = 0xfed0; 13736 t.ghemiddlehookcyrillic = 0x0495; 13737 t.ghestrokecyrillic = 0x0493; 13738 t.gheupturncyrillic = 0x0491; 13739 t.ghhadeva = 0x095a; 13740 t.ghhagurmukhi = 0x0a5a; 13741 t.ghook = 0x0260; 13742 t.ghzsquare = 0x3393; 13743 t.gihiragana = 0x304e; 13744 t.gikatakana = 0x30ae; 13745 t.gimarmenian = 0x0563; 13746 t.gimel = 0x05d2; 13747 t.gimeldagesh = 0xfb32; 13748 t.gimeldageshhebrew = 0xfb32; 13749 t.gimelhebrew = 0x05d2; 13750 t.gjecyrillic = 0x0453; 13751 t.glottalinvertedstroke = 0x01be; 13752 t.glottalstop = 0x0294; 13753 t.glottalstopinverted = 0x0296; 13754 t.glottalstopmod = 0x02c0; 13755 t.glottalstopreversed = 0x0295; 13756 t.glottalstopreversedmod = 0x02c1; 13757 t.glottalstopreversedsuperior = 0x02e4; 13758 t.glottalstopstroke = 0x02a1; 13759 t.glottalstopstrokereversed = 0x02a2; 13760 t.gmacron = 0x1e21; 13761 t.gmonospace = 0xff47; 13762 t.gohiragana = 0x3054; 13763 t.gokatakana = 0x30b4; 13764 t.gparen = 0x24a2; 13765 t.gpasquare = 0x33ac; 13766 t.gradient = 0x2207; 13767 t.grave = 0x0060; 13768 t.gravebelowcmb = 0x0316; 13769 t.gravecmb = 0x0300; 13770 t.gravecomb = 0x0300; 13771 t.gravedeva = 0x0953; 13772 t.gravelowmod = 0x02ce; 13773 t.gravemonospace = 0xff40; 13774 t.gravetonecmb = 0x0340; 13775 t.greater = 0x003e; 13776 t.greaterequal = 0x2265; 13777 t.greaterequalorless = 0x22db; 13778 t.greatermonospace = 0xff1e; 13779 t.greaterorequivalent = 0x2273; 13780 t.greaterorless = 0x2277; 13781 t.greateroverequal = 0x2267; 13782 t.greatersmall = 0xfe65; 13783 t.gscript = 0x0261; 13784 t.gstroke = 0x01e5; 13785 t.guhiragana = 0x3050; 13786 t.guillemotleft = 0x00ab; 13787 t.guillemotright = 0x00bb; 13788 t.guilsinglleft = 0x2039; 13789 t.guilsinglright = 0x203a; 13790 t.gukatakana = 0x30b0; 13791 t.guramusquare = 0x3318; 13792 t.gysquare = 0x33c9; 13793 t.h = 0x0068; 13794 t.haabkhasiancyrillic = 0x04a9; 13795 t.haaltonearabic = 0x06c1; 13796 t.habengali = 0x09b9; 13797 t.hadescendercyrillic = 0x04b3; 13798 t.hadeva = 0x0939; 13799 t.hagujarati = 0x0ab9; 13800 t.hagurmukhi = 0x0a39; 13801 t.haharabic = 0x062d; 13802 t.hahfinalarabic = 0xfea2; 13803 t.hahinitialarabic = 0xfea3; 13804 t.hahiragana = 0x306f; 13805 t.hahmedialarabic = 0xfea4; 13806 t.haitusquare = 0x332a; 13807 t.hakatakana = 0x30cf; 13808 t.hakatakanahalfwidth = 0xff8a; 13809 t.halantgurmukhi = 0x0a4d; 13810 t.hamzaarabic = 0x0621; 13811 t.hamzalowarabic = 0x0621; 13812 t.hangulfiller = 0x3164; 13813 t.hardsigncyrillic = 0x044a; 13814 t.harpoonleftbarbup = 0x21bc; 13815 t.harpoonrightbarbup = 0x21c0; 13816 t.hasquare = 0x33ca; 13817 t.hatafpatah = 0x05b2; 13818 t.hatafpatah16 = 0x05b2; 13819 t.hatafpatah23 = 0x05b2; 13820 t.hatafpatah2f = 0x05b2; 13821 t.hatafpatahhebrew = 0x05b2; 13822 t.hatafpatahnarrowhebrew = 0x05b2; 13823 t.hatafpatahquarterhebrew = 0x05b2; 13824 t.hatafpatahwidehebrew = 0x05b2; 13825 t.hatafqamats = 0x05b3; 13826 t.hatafqamats1b = 0x05b3; 13827 t.hatafqamats28 = 0x05b3; 13828 t.hatafqamats34 = 0x05b3; 13829 t.hatafqamatshebrew = 0x05b3; 13830 t.hatafqamatsnarrowhebrew = 0x05b3; 13831 t.hatafqamatsquarterhebrew = 0x05b3; 13832 t.hatafqamatswidehebrew = 0x05b3; 13833 t.hatafsegol = 0x05b1; 13834 t.hatafsegol17 = 0x05b1; 13835 t.hatafsegol24 = 0x05b1; 13836 t.hatafsegol30 = 0x05b1; 13837 t.hatafsegolhebrew = 0x05b1; 13838 t.hatafsegolnarrowhebrew = 0x05b1; 13839 t.hatafsegolquarterhebrew = 0x05b1; 13840 t.hatafsegolwidehebrew = 0x05b1; 13841 t.hbar = 0x0127; 13842 t.hbopomofo = 0x310f; 13843 t.hbrevebelow = 0x1e2b; 13844 t.hcedilla = 0x1e29; 13845 t.hcircle = 0x24d7; 13846 t.hcircumflex = 0x0125; 13847 t.hdieresis = 0x1e27; 13848 t.hdotaccent = 0x1e23; 13849 t.hdotbelow = 0x1e25; 13850 t.he = 0x05d4; 13851 t.heart = 0x2665; 13852 t.heartsuitblack = 0x2665; 13853 t.heartsuitwhite = 0x2661; 13854 t.hedagesh = 0xfb34; 13855 t.hedageshhebrew = 0xfb34; 13856 t.hehaltonearabic = 0x06c1; 13857 t.heharabic = 0x0647; 13858 t.hehebrew = 0x05d4; 13859 t.hehfinalaltonearabic = 0xfba7; 13860 t.hehfinalalttwoarabic = 0xfeea; 13861 t.hehfinalarabic = 0xfeea; 13862 t.hehhamzaabovefinalarabic = 0xfba5; 13863 t.hehhamzaaboveisolatedarabic = 0xfba4; 13864 t.hehinitialaltonearabic = 0xfba8; 13865 t.hehinitialarabic = 0xfeeb; 13866 t.hehiragana = 0x3078; 13867 t.hehmedialaltonearabic = 0xfba9; 13868 t.hehmedialarabic = 0xfeec; 13869 t.heiseierasquare = 0x337b; 13870 t.hekatakana = 0x30d8; 13871 t.hekatakanahalfwidth = 0xff8d; 13872 t.hekutaarusquare = 0x3336; 13873 t.henghook = 0x0267; 13874 t.herutusquare = 0x3339; 13875 t.het = 0x05d7; 13876 t.hethebrew = 0x05d7; 13877 t.hhook = 0x0266; 13878 t.hhooksuperior = 0x02b1; 13879 t.hieuhacirclekorean = 0x327b; 13880 t.hieuhaparenkorean = 0x321b; 13881 t.hieuhcirclekorean = 0x326d; 13882 t.hieuhkorean = 0x314e; 13883 t.hieuhparenkorean = 0x320d; 13884 t.hihiragana = 0x3072; 13885 t.hikatakana = 0x30d2; 13886 t.hikatakanahalfwidth = 0xff8b; 13887 t.hiriq = 0x05b4; 13888 t.hiriq14 = 0x05b4; 13889 t.hiriq21 = 0x05b4; 13890 t.hiriq2d = 0x05b4; 13891 t.hiriqhebrew = 0x05b4; 13892 t.hiriqnarrowhebrew = 0x05b4; 13893 t.hiriqquarterhebrew = 0x05b4; 13894 t.hiriqwidehebrew = 0x05b4; 13895 t.hlinebelow = 0x1e96; 13896 t.hmonospace = 0xff48; 13897 t.hoarmenian = 0x0570; 13898 t.hohipthai = 0x0e2b; 13899 t.hohiragana = 0x307b; 13900 t.hokatakana = 0x30db; 13901 t.hokatakanahalfwidth = 0xff8e; 13902 t.holam = 0x05b9; 13903 t.holam19 = 0x05b9; 13904 t.holam26 = 0x05b9; 13905 t.holam32 = 0x05b9; 13906 t.holamhebrew = 0x05b9; 13907 t.holamnarrowhebrew = 0x05b9; 13908 t.holamquarterhebrew = 0x05b9; 13909 t.holamwidehebrew = 0x05b9; 13910 t.honokhukthai = 0x0e2e; 13911 t.hookabovecomb = 0x0309; 13912 t.hookcmb = 0x0309; 13913 t.hookpalatalizedbelowcmb = 0x0321; 13914 t.hookretroflexbelowcmb = 0x0322; 13915 t.hoonsquare = 0x3342; 13916 t.horicoptic = 0x03e9; 13917 t.horizontalbar = 0x2015; 13918 t.horncmb = 0x031b; 13919 t.hotsprings = 0x2668; 13920 t.house = 0x2302; 13921 t.hparen = 0x24a3; 13922 t.hsuperior = 0x02b0; 13923 t.hturned = 0x0265; 13924 t.huhiragana = 0x3075; 13925 t.huiitosquare = 0x3333; 13926 t.hukatakana = 0x30d5; 13927 t.hukatakanahalfwidth = 0xff8c; 13928 t.hungarumlaut = 0x02dd; 13929 t.hungarumlautcmb = 0x030b; 13930 t.hv = 0x0195; 13931 t.hyphen = 0x002d; 13932 t.hypheninferior = 0xf6e5; 13933 t.hyphenmonospace = 0xff0d; 13934 t.hyphensmall = 0xfe63; 13935 t.hyphensuperior = 0xf6e6; 13936 t.hyphentwo = 0x2010; 13937 t.i = 0x0069; 13938 t.iacute = 0x00ed; 13939 t.iacyrillic = 0x044f; 13940 t.ibengali = 0x0987; 13941 t.ibopomofo = 0x3127; 13942 t.ibreve = 0x012d; 13943 t.icaron = 0x01d0; 13944 t.icircle = 0x24d8; 13945 t.icircumflex = 0x00ee; 13946 t.icyrillic = 0x0456; 13947 t.idblgrave = 0x0209; 13948 t.ideographearthcircle = 0x328f; 13949 t.ideographfirecircle = 0x328b; 13950 t.ideographicallianceparen = 0x323f; 13951 t.ideographiccallparen = 0x323a; 13952 t.ideographiccentrecircle = 0x32a5; 13953 t.ideographicclose = 0x3006; 13954 t.ideographiccomma = 0x3001; 13955 t.ideographiccommaleft = 0xff64; 13956 t.ideographiccongratulationparen = 0x3237; 13957 t.ideographiccorrectcircle = 0x32a3; 13958 t.ideographicearthparen = 0x322f; 13959 t.ideographicenterpriseparen = 0x323d; 13960 t.ideographicexcellentcircle = 0x329d; 13961 t.ideographicfestivalparen = 0x3240; 13962 t.ideographicfinancialcircle = 0x3296; 13963 t.ideographicfinancialparen = 0x3236; 13964 t.ideographicfireparen = 0x322b; 13965 t.ideographichaveparen = 0x3232; 13966 t.ideographichighcircle = 0x32a4; 13967 t.ideographiciterationmark = 0x3005; 13968 t.ideographiclaborcircle = 0x3298; 13969 t.ideographiclaborparen = 0x3238; 13970 t.ideographicleftcircle = 0x32a7; 13971 t.ideographiclowcircle = 0x32a6; 13972 t.ideographicmedicinecircle = 0x32a9; 13973 t.ideographicmetalparen = 0x322e; 13974 t.ideographicmoonparen = 0x322a; 13975 t.ideographicnameparen = 0x3234; 13976 t.ideographicperiod = 0x3002; 13977 t.ideographicprintcircle = 0x329e; 13978 t.ideographicreachparen = 0x3243; 13979 t.ideographicrepresentparen = 0x3239; 13980 t.ideographicresourceparen = 0x323e; 13981 t.ideographicrightcircle = 0x32a8; 13982 t.ideographicsecretcircle = 0x3299; 13983 t.ideographicselfparen = 0x3242; 13984 t.ideographicsocietyparen = 0x3233; 13985 t.ideographicspace = 0x3000; 13986 t.ideographicspecialparen = 0x3235; 13987 t.ideographicstockparen = 0x3231; 13988 t.ideographicstudyparen = 0x323b; 13989 t.ideographicsunparen = 0x3230; 13990 t.ideographicsuperviseparen = 0x323c; 13991 t.ideographicwaterparen = 0x322c; 13992 t.ideographicwoodparen = 0x322d; 13993 t.ideographiczero = 0x3007; 13994 t.ideographmetalcircle = 0x328e; 13995 t.ideographmooncircle = 0x328a; 13996 t.ideographnamecircle = 0x3294; 13997 t.ideographsuncircle = 0x3290; 13998 t.ideographwatercircle = 0x328c; 13999 t.ideographwoodcircle = 0x328d; 14000 t.ideva = 0x0907; 14001 t.idieresis = 0x00ef; 14002 t.idieresisacute = 0x1e2f; 14003 t.idieresiscyrillic = 0x04e5; 14004 t.idotbelow = 0x1ecb; 14005 t.iebrevecyrillic = 0x04d7; 14006 t.iecyrillic = 0x0435; 14007 t.ieungacirclekorean = 0x3275; 14008 t.ieungaparenkorean = 0x3215; 14009 t.ieungcirclekorean = 0x3267; 14010 t.ieungkorean = 0x3147; 14011 t.ieungparenkorean = 0x3207; 14012 t.igrave = 0x00ec; 14013 t.igujarati = 0x0a87; 14014 t.igurmukhi = 0x0a07; 14015 t.ihiragana = 0x3044; 14016 t.ihookabove = 0x1ec9; 14017 t.iibengali = 0x0988; 14018 t.iicyrillic = 0x0438; 14019 t.iideva = 0x0908; 14020 t.iigujarati = 0x0a88; 14021 t.iigurmukhi = 0x0a08; 14022 t.iimatragurmukhi = 0x0a40; 14023 t.iinvertedbreve = 0x020b; 14024 t.iishortcyrillic = 0x0439; 14025 t.iivowelsignbengali = 0x09c0; 14026 t.iivowelsigndeva = 0x0940; 14027 t.iivowelsigngujarati = 0x0ac0; 14028 t.ij = 0x0133; 14029 t.ikatakana = 0x30a4; 14030 t.ikatakanahalfwidth = 0xff72; 14031 t.ikorean = 0x3163; 14032 t.ilde = 0x02dc; 14033 t.iluyhebrew = 0x05ac; 14034 t.imacron = 0x012b; 14035 t.imacroncyrillic = 0x04e3; 14036 t.imageorapproximatelyequal = 0x2253; 14037 t.imatragurmukhi = 0x0a3f; 14038 t.imonospace = 0xff49; 14039 t.increment = 0x2206; 14040 t.infinity = 0x221e; 14041 t.iniarmenian = 0x056b; 14042 t.integral = 0x222b; 14043 t.integralbottom = 0x2321; 14044 t.integralbt = 0x2321; 14045 t.integralex = 0xf8f5; 14046 t.integraltop = 0x2320; 14047 t.integraltp = 0x2320; 14048 t.intersection = 0x2229; 14049 t.intisquare = 0x3305; 14050 t.invbullet = 0x25d8; 14051 t.invcircle = 0x25d9; 14052 t.invsmileface = 0x263b; 14053 t.iocyrillic = 0x0451; 14054 t.iogonek = 0x012f; 14055 t.iota = 0x03b9; 14056 t.iotadieresis = 0x03ca; 14057 t.iotadieresistonos = 0x0390; 14058 t.iotalatin = 0x0269; 14059 t.iotatonos = 0x03af; 14060 t.iparen = 0x24a4; 14061 t.irigurmukhi = 0x0a72; 14062 t.ismallhiragana = 0x3043; 14063 t.ismallkatakana = 0x30a3; 14064 t.ismallkatakanahalfwidth = 0xff68; 14065 t.issharbengali = 0x09fa; 14066 t.istroke = 0x0268; 14067 t.isuperior = 0xf6ed; 14068 t.iterationhiragana = 0x309d; 14069 t.iterationkatakana = 0x30fd; 14070 t.itilde = 0x0129; 14071 t.itildebelow = 0x1e2d; 14072 t.iubopomofo = 0x3129; 14073 t.iucyrillic = 0x044e; 14074 t.ivowelsignbengali = 0x09bf; 14075 t.ivowelsigndeva = 0x093f; 14076 t.ivowelsigngujarati = 0x0abf; 14077 t.izhitsacyrillic = 0x0475; 14078 t.izhitsadblgravecyrillic = 0x0477; 14079 t.j = 0x006a; 14080 t.jaarmenian = 0x0571; 14081 t.jabengali = 0x099c; 14082 t.jadeva = 0x091c; 14083 t.jagujarati = 0x0a9c; 14084 t.jagurmukhi = 0x0a1c; 14085 t.jbopomofo = 0x3110; 14086 t.jcaron = 0x01f0; 14087 t.jcircle = 0x24d9; 14088 t.jcircumflex = 0x0135; 14089 t.jcrossedtail = 0x029d; 14090 t.jdotlessstroke = 0x025f; 14091 t.jecyrillic = 0x0458; 14092 t.jeemarabic = 0x062c; 14093 t.jeemfinalarabic = 0xfe9e; 14094 t.jeeminitialarabic = 0xfe9f; 14095 t.jeemmedialarabic = 0xfea0; 14096 t.jeharabic = 0x0698; 14097 t.jehfinalarabic = 0xfb8b; 14098 t.jhabengali = 0x099d; 14099 t.jhadeva = 0x091d; 14100 t.jhagujarati = 0x0a9d; 14101 t.jhagurmukhi = 0x0a1d; 14102 t.jheharmenian = 0x057b; 14103 t.jis = 0x3004; 14104 t.jmonospace = 0xff4a; 14105 t.jparen = 0x24a5; 14106 t.jsuperior = 0x02b2; 14107 t.k = 0x006b; 14108 t.kabashkircyrillic = 0x04a1; 14109 t.kabengali = 0x0995; 14110 t.kacute = 0x1e31; 14111 t.kacyrillic = 0x043a; 14112 t.kadescendercyrillic = 0x049b; 14113 t.kadeva = 0x0915; 14114 t.kaf = 0x05db; 14115 t.kafarabic = 0x0643; 14116 t.kafdagesh = 0xfb3b; 14117 t.kafdageshhebrew = 0xfb3b; 14118 t.kaffinalarabic = 0xfeda; 14119 t.kafhebrew = 0x05db; 14120 t.kafinitialarabic = 0xfedb; 14121 t.kafmedialarabic = 0xfedc; 14122 t.kafrafehebrew = 0xfb4d; 14123 t.kagujarati = 0x0a95; 14124 t.kagurmukhi = 0x0a15; 14125 t.kahiragana = 0x304b; 14126 t.kahookcyrillic = 0x04c4; 14127 t.kakatakana = 0x30ab; 14128 t.kakatakanahalfwidth = 0xff76; 14129 t.kappa = 0x03ba; 14130 t.kappasymbolgreek = 0x03f0; 14131 t.kapyeounmieumkorean = 0x3171; 14132 t.kapyeounphieuphkorean = 0x3184; 14133 t.kapyeounpieupkorean = 0x3178; 14134 t.kapyeounssangpieupkorean = 0x3179; 14135 t.karoriisquare = 0x330d; 14136 t.kashidaautoarabic = 0x0640; 14137 t.kashidaautonosidebearingarabic = 0x0640; 14138 t.kasmallkatakana = 0x30f5; 14139 t.kasquare = 0x3384; 14140 t.kasraarabic = 0x0650; 14141 t.kasratanarabic = 0x064d; 14142 t.kastrokecyrillic = 0x049f; 14143 t.katahiraprolongmarkhalfwidth = 0xff70; 14144 t.kaverticalstrokecyrillic = 0x049d; 14145 t.kbopomofo = 0x310e; 14146 t.kcalsquare = 0x3389; 14147 t.kcaron = 0x01e9; 14148 t.kcedilla = 0x0137; 14149 t.kcircle = 0x24da; 14150 t.kcommaaccent = 0x0137; 14151 t.kdotbelow = 0x1e33; 14152 t.keharmenian = 0x0584; 14153 t.kehiragana = 0x3051; 14154 t.kekatakana = 0x30b1; 14155 t.kekatakanahalfwidth = 0xff79; 14156 t.kenarmenian = 0x056f; 14157 t.kesmallkatakana = 0x30f6; 14158 t.kgreenlandic = 0x0138; 14159 t.khabengali = 0x0996; 14160 t.khacyrillic = 0x0445; 14161 t.khadeva = 0x0916; 14162 t.khagujarati = 0x0a96; 14163 t.khagurmukhi = 0x0a16; 14164 t.khaharabic = 0x062e; 14165 t.khahfinalarabic = 0xfea6; 14166 t.khahinitialarabic = 0xfea7; 14167 t.khahmedialarabic = 0xfea8; 14168 t.kheicoptic = 0x03e7; 14169 t.khhadeva = 0x0959; 14170 t.khhagurmukhi = 0x0a59; 14171 t.khieukhacirclekorean = 0x3278; 14172 t.khieukhaparenkorean = 0x3218; 14173 t.khieukhcirclekorean = 0x326a; 14174 t.khieukhkorean = 0x314b; 14175 t.khieukhparenkorean = 0x320a; 14176 t.khokhaithai = 0x0e02; 14177 t.khokhonthai = 0x0e05; 14178 t.khokhuatthai = 0x0e03; 14179 t.khokhwaithai = 0x0e04; 14180 t.khomutthai = 0x0e5b; 14181 t.khook = 0x0199; 14182 t.khorakhangthai = 0x0e06; 14183 t.khzsquare = 0x3391; 14184 t.kihiragana = 0x304d; 14185 t.kikatakana = 0x30ad; 14186 t.kikatakanahalfwidth = 0xff77; 14187 t.kiroguramusquare = 0x3315; 14188 t.kiromeetorusquare = 0x3316; 14189 t.kirosquare = 0x3314; 14190 t.kiyeokacirclekorean = 0x326e; 14191 t.kiyeokaparenkorean = 0x320e; 14192 t.kiyeokcirclekorean = 0x3260; 14193 t.kiyeokkorean = 0x3131; 14194 t.kiyeokparenkorean = 0x3200; 14195 t.kiyeoksioskorean = 0x3133; 14196 t.kjecyrillic = 0x045c; 14197 t.klinebelow = 0x1e35; 14198 t.klsquare = 0x3398; 14199 t.kmcubedsquare = 0x33a6; 14200 t.kmonospace = 0xff4b; 14201 t.kmsquaredsquare = 0x33a2; 14202 t.kohiragana = 0x3053; 14203 t.kohmsquare = 0x33c0; 14204 t.kokaithai = 0x0e01; 14205 t.kokatakana = 0x30b3; 14206 t.kokatakanahalfwidth = 0xff7a; 14207 t.kooposquare = 0x331e; 14208 t.koppacyrillic = 0x0481; 14209 t.koreanstandardsymbol = 0x327f; 14210 t.koroniscmb = 0x0343; 14211 t.kparen = 0x24a6; 14212 t.kpasquare = 0x33aa; 14213 t.ksicyrillic = 0x046f; 14214 t.ktsquare = 0x33cf; 14215 t.kturned = 0x029e; 14216 t.kuhiragana = 0x304f; 14217 t.kukatakana = 0x30af; 14218 t.kukatakanahalfwidth = 0xff78; 14219 t.kvsquare = 0x33b8; 14220 t.kwsquare = 0x33be; 14221 t.l = 0x006c; 14222 t.labengali = 0x09b2; 14223 t.lacute = 0x013a; 14224 t.ladeva = 0x0932; 14225 t.lagujarati = 0x0ab2; 14226 t.lagurmukhi = 0x0a32; 14227 t.lakkhangyaothai = 0x0e45; 14228 t.lamaleffinalarabic = 0xfefc; 14229 t.lamalefhamzaabovefinalarabic = 0xfef8; 14230 t.lamalefhamzaaboveisolatedarabic = 0xfef7; 14231 t.lamalefhamzabelowfinalarabic = 0xfefa; 14232 t.lamalefhamzabelowisolatedarabic = 0xfef9; 14233 t.lamalefisolatedarabic = 0xfefb; 14234 t.lamalefmaddaabovefinalarabic = 0xfef6; 14235 t.lamalefmaddaaboveisolatedarabic = 0xfef5; 14236 t.lamarabic = 0x0644; 14237 t.lambda = 0x03bb; 14238 t.lambdastroke = 0x019b; 14239 t.lamed = 0x05dc; 14240 t.lameddagesh = 0xfb3c; 14241 t.lameddageshhebrew = 0xfb3c; 14242 t.lamedhebrew = 0x05dc; 14243 t.lamfinalarabic = 0xfede; 14244 t.lamhahinitialarabic = 0xfcca; 14245 t.laminitialarabic = 0xfedf; 14246 t.lamjeeminitialarabic = 0xfcc9; 14247 t.lamkhahinitialarabic = 0xfccb; 14248 t.lamlamhehisolatedarabic = 0xfdf2; 14249 t.lammedialarabic = 0xfee0; 14250 t.lammeemhahinitialarabic = 0xfd88; 14251 t.lammeeminitialarabic = 0xfccc; 14252 t.largecircle = 0x25ef; 14253 t.lbar = 0x019a; 14254 t.lbelt = 0x026c; 14255 t.lbopomofo = 0x310c; 14256 t.lcaron = 0x013e; 14257 t.lcedilla = 0x013c; 14258 t.lcircle = 0x24db; 14259 t.lcircumflexbelow = 0x1e3d; 14260 t.lcommaaccent = 0x013c; 14261 t.ldot = 0x0140; 14262 t.ldotaccent = 0x0140; 14263 t.ldotbelow = 0x1e37; 14264 t.ldotbelowmacron = 0x1e39; 14265 t.leftangleabovecmb = 0x031a; 14266 t.lefttackbelowcmb = 0x0318; 14267 t.less = 0x003c; 14268 t.lessequal = 0x2264; 14269 t.lessequalorgreater = 0x22da; 14270 t.lessmonospace = 0xff1c; 14271 t.lessorequivalent = 0x2272; 14272 t.lessorgreater = 0x2276; 14273 t.lessoverequal = 0x2266; 14274 t.lesssmall = 0xfe64; 14275 t.lezh = 0x026e; 14276 t.lfblock = 0x258c; 14277 t.lhookretroflex = 0x026d; 14278 t.lira = 0x20a4; 14279 t.liwnarmenian = 0x056c; 14280 t.lj = 0x01c9; 14281 t.ljecyrillic = 0x0459; 14282 t.ll = 0xf6c0; 14283 t.lladeva = 0x0933; 14284 t.llagujarati = 0x0ab3; 14285 t.llinebelow = 0x1e3b; 14286 t.llladeva = 0x0934; 14287 t.llvocalicbengali = 0x09e1; 14288 t.llvocalicdeva = 0x0961; 14289 t.llvocalicvowelsignbengali = 0x09e3; 14290 t.llvocalicvowelsigndeva = 0x0963; 14291 t.lmiddletilde = 0x026b; 14292 t.lmonospace = 0xff4c; 14293 t.lmsquare = 0x33d0; 14294 t.lochulathai = 0x0e2c; 14295 t.logicaland = 0x2227; 14296 t.logicalnot = 0x00ac; 14297 t.logicalnotreversed = 0x2310; 14298 t.logicalor = 0x2228; 14299 t.lolingthai = 0x0e25; 14300 t.longs = 0x017f; 14301 t.lowlinecenterline = 0xfe4e; 14302 t.lowlinecmb = 0x0332; 14303 t.lowlinedashed = 0xfe4d; 14304 t.lozenge = 0x25ca; 14305 t.lparen = 0x24a7; 14306 t.lslash = 0x0142; 14307 t.lsquare = 0x2113; 14308 t.lsuperior = 0xf6ee; 14309 t.ltshade = 0x2591; 14310 t.luthai = 0x0e26; 14311 t.lvocalicbengali = 0x098c; 14312 t.lvocalicdeva = 0x090c; 14313 t.lvocalicvowelsignbengali = 0x09e2; 14314 t.lvocalicvowelsigndeva = 0x0962; 14315 t.lxsquare = 0x33d3; 14316 t.m = 0x006d; 14317 t.mabengali = 0x09ae; 14318 t.macron = 0x00af; 14319 t.macronbelowcmb = 0x0331; 14320 t.macroncmb = 0x0304; 14321 t.macronlowmod = 0x02cd; 14322 t.macronmonospace = 0xffe3; 14323 t.macute = 0x1e3f; 14324 t.madeva = 0x092e; 14325 t.magujarati = 0x0aae; 14326 t.magurmukhi = 0x0a2e; 14327 t.mahapakhhebrew = 0x05a4; 14328 t.mahapakhlefthebrew = 0x05a4; 14329 t.mahiragana = 0x307e; 14330 t.maichattawalowleftthai = 0xf895; 14331 t.maichattawalowrightthai = 0xf894; 14332 t.maichattawathai = 0x0e4b; 14333 t.maichattawaupperleftthai = 0xf893; 14334 t.maieklowleftthai = 0xf88c; 14335 t.maieklowrightthai = 0xf88b; 14336 t.maiekthai = 0x0e48; 14337 t.maiekupperleftthai = 0xf88a; 14338 t.maihanakatleftthai = 0xf884; 14339 t.maihanakatthai = 0x0e31; 14340 t.maitaikhuleftthai = 0xf889; 14341 t.maitaikhuthai = 0x0e47; 14342 t.maitholowleftthai = 0xf88f; 14343 t.maitholowrightthai = 0xf88e; 14344 t.maithothai = 0x0e49; 14345 t.maithoupperleftthai = 0xf88d; 14346 t.maitrilowleftthai = 0xf892; 14347 t.maitrilowrightthai = 0xf891; 14348 t.maitrithai = 0x0e4a; 14349 t.maitriupperleftthai = 0xf890; 14350 t.maiyamokthai = 0x0e46; 14351 t.makatakana = 0x30de; 14352 t.makatakanahalfwidth = 0xff8f; 14353 t.male = 0x2642; 14354 t.mansyonsquare = 0x3347; 14355 t.maqafhebrew = 0x05be; 14356 t.mars = 0x2642; 14357 t.masoracirclehebrew = 0x05af; 14358 t.masquare = 0x3383; 14359 t.mbopomofo = 0x3107; 14360 t.mbsquare = 0x33d4; 14361 t.mcircle = 0x24dc; 14362 t.mcubedsquare = 0x33a5; 14363 t.mdotaccent = 0x1e41; 14364 t.mdotbelow = 0x1e43; 14365 t.meemarabic = 0x0645; 14366 t.meemfinalarabic = 0xfee2; 14367 t.meeminitialarabic = 0xfee3; 14368 t.meemmedialarabic = 0xfee4; 14369 t.meemmeeminitialarabic = 0xfcd1; 14370 t.meemmeemisolatedarabic = 0xfc48; 14371 t.meetorusquare = 0x334d; 14372 t.mehiragana = 0x3081; 14373 t.meizierasquare = 0x337e; 14374 t.mekatakana = 0x30e1; 14375 t.mekatakanahalfwidth = 0xff92; 14376 t.mem = 0x05de; 14377 t.memdagesh = 0xfb3e; 14378 t.memdageshhebrew = 0xfb3e; 14379 t.memhebrew = 0x05de; 14380 t.menarmenian = 0x0574; 14381 t.merkhahebrew = 0x05a5; 14382 t.merkhakefulahebrew = 0x05a6; 14383 t.merkhakefulalefthebrew = 0x05a6; 14384 t.merkhalefthebrew = 0x05a5; 14385 t.mhook = 0x0271; 14386 t.mhzsquare = 0x3392; 14387 t.middledotkatakanahalfwidth = 0xff65; 14388 t.middot = 0x00b7; 14389 t.mieumacirclekorean = 0x3272; 14390 t.mieumaparenkorean = 0x3212; 14391 t.mieumcirclekorean = 0x3264; 14392 t.mieumkorean = 0x3141; 14393 t.mieumpansioskorean = 0x3170; 14394 t.mieumparenkorean = 0x3204; 14395 t.mieumpieupkorean = 0x316e; 14396 t.mieumsioskorean = 0x316f; 14397 t.mihiragana = 0x307f; 14398 t.mikatakana = 0x30df; 14399 t.mikatakanahalfwidth = 0xff90; 14400 t.minus = 0x2212; 14401 t.minusbelowcmb = 0x0320; 14402 t.minuscircle = 0x2296; 14403 t.minusmod = 0x02d7; 14404 t.minusplus = 0x2213; 14405 t.minute = 0x2032; 14406 t.miribaarusquare = 0x334a; 14407 t.mirisquare = 0x3349; 14408 t.mlonglegturned = 0x0270; 14409 t.mlsquare = 0x3396; 14410 t.mmcubedsquare = 0x33a3; 14411 t.mmonospace = 0xff4d; 14412 t.mmsquaredsquare = 0x339f; 14413 t.mohiragana = 0x3082; 14414 t.mohmsquare = 0x33c1; 14415 t.mokatakana = 0x30e2; 14416 t.mokatakanahalfwidth = 0xff93; 14417 t.molsquare = 0x33d6; 14418 t.momathai = 0x0e21; 14419 t.moverssquare = 0x33a7; 14420 t.moverssquaredsquare = 0x33a8; 14421 t.mparen = 0x24a8; 14422 t.mpasquare = 0x33ab; 14423 t.mssquare = 0x33b3; 14424 t.msuperior = 0xf6ef; 14425 t.mturned = 0x026f; 14426 t.mu = 0x00b5; 14427 t.mu1 = 0x00b5; 14428 t.muasquare = 0x3382; 14429 t.muchgreater = 0x226b; 14430 t.muchless = 0x226a; 14431 t.mufsquare = 0x338c; 14432 t.mugreek = 0x03bc; 14433 t.mugsquare = 0x338d; 14434 t.muhiragana = 0x3080; 14435 t.mukatakana = 0x30e0; 14436 t.mukatakanahalfwidth = 0xff91; 14437 t.mulsquare = 0x3395; 14438 t.multiply = 0x00d7; 14439 t.mumsquare = 0x339b; 14440 t.munahhebrew = 0x05a3; 14441 t.munahlefthebrew = 0x05a3; 14442 t.musicalnote = 0x266a; 14443 t.musicalnotedbl = 0x266b; 14444 t.musicflatsign = 0x266d; 14445 t.musicsharpsign = 0x266f; 14446 t.mussquare = 0x33b2; 14447 t.muvsquare = 0x33b6; 14448 t.muwsquare = 0x33bc; 14449 t.mvmegasquare = 0x33b9; 14450 t.mvsquare = 0x33b7; 14451 t.mwmegasquare = 0x33bf; 14452 t.mwsquare = 0x33bd; 14453 t.n = 0x006e; 14454 t.nabengali = 0x09a8; 14455 t.nabla = 0x2207; 14456 t.nacute = 0x0144; 14457 t.nadeva = 0x0928; 14458 t.nagujarati = 0x0aa8; 14459 t.nagurmukhi = 0x0a28; 14460 t.nahiragana = 0x306a; 14461 t.nakatakana = 0x30ca; 14462 t.nakatakanahalfwidth = 0xff85; 14463 t.napostrophe = 0x0149; 14464 t.nasquare = 0x3381; 14465 t.nbopomofo = 0x310b; 14466 t.nbspace = 0x00a0; 14467 t.ncaron = 0x0148; 14468 t.ncedilla = 0x0146; 14469 t.ncircle = 0x24dd; 14470 t.ncircumflexbelow = 0x1e4b; 14471 t.ncommaaccent = 0x0146; 14472 t.ndotaccent = 0x1e45; 14473 t.ndotbelow = 0x1e47; 14474 t.nehiragana = 0x306d; 14475 t.nekatakana = 0x30cd; 14476 t.nekatakanahalfwidth = 0xff88; 14477 t.newsheqelsign = 0x20aa; 14478 t.nfsquare = 0x338b; 14479 t.ngabengali = 0x0999; 14480 t.ngadeva = 0x0919; 14481 t.ngagujarati = 0x0a99; 14482 t.ngagurmukhi = 0x0a19; 14483 t.ngonguthai = 0x0e07; 14484 t.nhiragana = 0x3093; 14485 t.nhookleft = 0x0272; 14486 t.nhookretroflex = 0x0273; 14487 t.nieunacirclekorean = 0x326f; 14488 t.nieunaparenkorean = 0x320f; 14489 t.nieuncieuckorean = 0x3135; 14490 t.nieuncirclekorean = 0x3261; 14491 t.nieunhieuhkorean = 0x3136; 14492 t.nieunkorean = 0x3134; 14493 t.nieunpansioskorean = 0x3168; 14494 t.nieunparenkorean = 0x3201; 14495 t.nieunsioskorean = 0x3167; 14496 t.nieuntikeutkorean = 0x3166; 14497 t.nihiragana = 0x306b; 14498 t.nikatakana = 0x30cb; 14499 t.nikatakanahalfwidth = 0xff86; 14500 t.nikhahitleftthai = 0xf899; 14501 t.nikhahitthai = 0x0e4d; 14502 t.nine = 0x0039; 14503 t.ninearabic = 0x0669; 14504 t.ninebengali = 0x09ef; 14505 t.ninecircle = 0x2468; 14506 t.ninecircleinversesansserif = 0x2792; 14507 t.ninedeva = 0x096f; 14508 t.ninegujarati = 0x0aef; 14509 t.ninegurmukhi = 0x0a6f; 14510 t.ninehackarabic = 0x0669; 14511 t.ninehangzhou = 0x3029; 14512 t.nineideographicparen = 0x3228; 14513 t.nineinferior = 0x2089; 14514 t.ninemonospace = 0xff19; 14515 t.nineoldstyle = 0xf739; 14516 t.nineparen = 0x247c; 14517 t.nineperiod = 0x2490; 14518 t.ninepersian = 0x06f9; 14519 t.nineroman = 0x2178; 14520 t.ninesuperior = 0x2079; 14521 t.nineteencircle = 0x2472; 14522 t.nineteenparen = 0x2486; 14523 t.nineteenperiod = 0x249a; 14524 t.ninethai = 0x0e59; 14525 t.nj = 0x01cc; 14526 t.njecyrillic = 0x045a; 14527 t.nkatakana = 0x30f3; 14528 t.nkatakanahalfwidth = 0xff9d; 14529 t.nlegrightlong = 0x019e; 14530 t.nlinebelow = 0x1e49; 14531 t.nmonospace = 0xff4e; 14532 t.nmsquare = 0x339a; 14533 t.nnabengali = 0x09a3; 14534 t.nnadeva = 0x0923; 14535 t.nnagujarati = 0x0aa3; 14536 t.nnagurmukhi = 0x0a23; 14537 t.nnnadeva = 0x0929; 14538 t.nohiragana = 0x306e; 14539 t.nokatakana = 0x30ce; 14540 t.nokatakanahalfwidth = 0xff89; 14541 t.nonbreakingspace = 0x00a0; 14542 t.nonenthai = 0x0e13; 14543 t.nonuthai = 0x0e19; 14544 t.noonarabic = 0x0646; 14545 t.noonfinalarabic = 0xfee6; 14546 t.noonghunnaarabic = 0x06ba; 14547 t.noonghunnafinalarabic = 0xfb9f; 14548 t.nooninitialarabic = 0xfee7; 14549 t.noonjeeminitialarabic = 0xfcd2; 14550 t.noonjeemisolatedarabic = 0xfc4b; 14551 t.noonmedialarabic = 0xfee8; 14552 t.noonmeeminitialarabic = 0xfcd5; 14553 t.noonmeemisolatedarabic = 0xfc4e; 14554 t.noonnoonfinalarabic = 0xfc8d; 14555 t.notcontains = 0x220c; 14556 t.notelement = 0x2209; 14557 t.notelementof = 0x2209; 14558 t.notequal = 0x2260; 14559 t.notgreater = 0x226f; 14560 t.notgreaternorequal = 0x2271; 14561 t.notgreaternorless = 0x2279; 14562 t.notidentical = 0x2262; 14563 t.notless = 0x226e; 14564 t.notlessnorequal = 0x2270; 14565 t.notparallel = 0x2226; 14566 t.notprecedes = 0x2280; 14567 t.notsubset = 0x2284; 14568 t.notsucceeds = 0x2281; 14569 t.notsuperset = 0x2285; 14570 t.nowarmenian = 0x0576; 14571 t.nparen = 0x24a9; 14572 t.nssquare = 0x33b1; 14573 t.nsuperior = 0x207f; 14574 t.ntilde = 0x00f1; 14575 t.nu = 0x03bd; 14576 t.nuhiragana = 0x306c; 14577 t.nukatakana = 0x30cc; 14578 t.nukatakanahalfwidth = 0xff87; 14579 t.nuktabengali = 0x09bc; 14580 t.nuktadeva = 0x093c; 14581 t.nuktagujarati = 0x0abc; 14582 t.nuktagurmukhi = 0x0a3c; 14583 t.numbersign = 0x0023; 14584 t.numbersignmonospace = 0xff03; 14585 t.numbersignsmall = 0xfe5f; 14586 t.numeralsigngreek = 0x0374; 14587 t.numeralsignlowergreek = 0x0375; 14588 t.numero = 0x2116; 14589 t.nun = 0x05e0; 14590 t.nundagesh = 0xfb40; 14591 t.nundageshhebrew = 0xfb40; 14592 t.nunhebrew = 0x05e0; 14593 t.nvsquare = 0x33b5; 14594 t.nwsquare = 0x33bb; 14595 t.nyabengali = 0x099e; 14596 t.nyadeva = 0x091e; 14597 t.nyagujarati = 0x0a9e; 14598 t.nyagurmukhi = 0x0a1e; 14599 t.o = 0x006f; 14600 t.oacute = 0x00f3; 14601 t.oangthai = 0x0e2d; 14602 t.obarred = 0x0275; 14603 t.obarredcyrillic = 0x04e9; 14604 t.obarreddieresiscyrillic = 0x04eb; 14605 t.obengali = 0x0993; 14606 t.obopomofo = 0x311b; 14607 t.obreve = 0x014f; 14608 t.ocandradeva = 0x0911; 14609 t.ocandragujarati = 0x0a91; 14610 t.ocandravowelsigndeva = 0x0949; 14611 t.ocandravowelsigngujarati = 0x0ac9; 14612 t.ocaron = 0x01d2; 14613 t.ocircle = 0x24de; 14614 t.ocircumflex = 0x00f4; 14615 t.ocircumflexacute = 0x1ed1; 14616 t.ocircumflexdotbelow = 0x1ed9; 14617 t.ocircumflexgrave = 0x1ed3; 14618 t.ocircumflexhookabove = 0x1ed5; 14619 t.ocircumflextilde = 0x1ed7; 14620 t.ocyrillic = 0x043e; 14621 t.odblacute = 0x0151; 14622 t.odblgrave = 0x020d; 14623 t.odeva = 0x0913; 14624 t.odieresis = 0x00f6; 14625 t.odieresiscyrillic = 0x04e7; 14626 t.odotbelow = 0x1ecd; 14627 t.oe = 0x0153; 14628 t.oekorean = 0x315a; 14629 t.ogonek = 0x02db; 14630 t.ogonekcmb = 0x0328; 14631 t.ograve = 0x00f2; 14632 t.ogujarati = 0x0a93; 14633 t.oharmenian = 0x0585; 14634 t.ohiragana = 0x304a; 14635 t.ohookabove = 0x1ecf; 14636 t.ohorn = 0x01a1; 14637 t.ohornacute = 0x1edb; 14638 t.ohorndotbelow = 0x1ee3; 14639 t.ohorngrave = 0x1edd; 14640 t.ohornhookabove = 0x1edf; 14641 t.ohorntilde = 0x1ee1; 14642 t.ohungarumlaut = 0x0151; 14643 t.oi = 0x01a3; 14644 t.oinvertedbreve = 0x020f; 14645 t.okatakana = 0x30aa; 14646 t.okatakanahalfwidth = 0xff75; 14647 t.okorean = 0x3157; 14648 t.olehebrew = 0x05ab; 14649 t.omacron = 0x014d; 14650 t.omacronacute = 0x1e53; 14651 t.omacrongrave = 0x1e51; 14652 t.omdeva = 0x0950; 14653 t.omega = 0x03c9; 14654 t.omega1 = 0x03d6; 14655 t.omegacyrillic = 0x0461; 14656 t.omegalatinclosed = 0x0277; 14657 t.omegaroundcyrillic = 0x047b; 14658 t.omegatitlocyrillic = 0x047d; 14659 t.omegatonos = 0x03ce; 14660 t.omgujarati = 0x0ad0; 14661 t.omicron = 0x03bf; 14662 t.omicrontonos = 0x03cc; 14663 t.omonospace = 0xff4f; 14664 t.one = 0x0031; 14665 t.onearabic = 0x0661; 14666 t.onebengali = 0x09e7; 14667 t.onecircle = 0x2460; 14668 t.onecircleinversesansserif = 0x278a; 14669 t.onedeva = 0x0967; 14670 t.onedotenleader = 0x2024; 14671 t.oneeighth = 0x215b; 14672 t.onefitted = 0xf6dc; 14673 t.onegujarati = 0x0ae7; 14674 t.onegurmukhi = 0x0a67; 14675 t.onehackarabic = 0x0661; 14676 t.onehalf = 0x00bd; 14677 t.onehangzhou = 0x3021; 14678 t.oneideographicparen = 0x3220; 14679 t.oneinferior = 0x2081; 14680 t.onemonospace = 0xff11; 14681 t.onenumeratorbengali = 0x09f4; 14682 t.oneoldstyle = 0xf731; 14683 t.oneparen = 0x2474; 14684 t.oneperiod = 0x2488; 14685 t.onepersian = 0x06f1; 14686 t.onequarter = 0x00bc; 14687 t.oneroman = 0x2170; 14688 t.onesuperior = 0x00b9; 14689 t.onethai = 0x0e51; 14690 t.onethird = 0x2153; 14691 t.oogonek = 0x01eb; 14692 t.oogonekmacron = 0x01ed; 14693 t.oogurmukhi = 0x0a13; 14694 t.oomatragurmukhi = 0x0a4b; 14695 t.oopen = 0x0254; 14696 t.oparen = 0x24aa; 14697 t.openbullet = 0x25e6; 14698 t.option = 0x2325; 14699 t.ordfeminine = 0x00aa; 14700 t.ordmasculine = 0x00ba; 14701 t.orthogonal = 0x221f; 14702 t.oshortdeva = 0x0912; 14703 t.oshortvowelsigndeva = 0x094a; 14704 t.oslash = 0x00f8; 14705 t.oslashacute = 0x01ff; 14706 t.osmallhiragana = 0x3049; 14707 t.osmallkatakana = 0x30a9; 14708 t.osmallkatakanahalfwidth = 0xff6b; 14709 t.ostrokeacute = 0x01ff; 14710 t.osuperior = 0xf6f0; 14711 t.otcyrillic = 0x047f; 14712 t.otilde = 0x00f5; 14713 t.otildeacute = 0x1e4d; 14714 t.otildedieresis = 0x1e4f; 14715 t.oubopomofo = 0x3121; 14716 t.overline = 0x203e; 14717 t.overlinecenterline = 0xfe4a; 14718 t.overlinecmb = 0x0305; 14719 t.overlinedashed = 0xfe49; 14720 t.overlinedblwavy = 0xfe4c; 14721 t.overlinewavy = 0xfe4b; 14722 t.overscore = 0x00af; 14723 t.ovowelsignbengali = 0x09cb; 14724 t.ovowelsigndeva = 0x094b; 14725 t.ovowelsigngujarati = 0x0acb; 14726 t.p = 0x0070; 14727 t.paampssquare = 0x3380; 14728 t.paasentosquare = 0x332b; 14729 t.pabengali = 0x09aa; 14730 t.pacute = 0x1e55; 14731 t.padeva = 0x092a; 14732 t.pagedown = 0x21df; 14733 t.pageup = 0x21de; 14734 t.pagujarati = 0x0aaa; 14735 t.pagurmukhi = 0x0a2a; 14736 t.pahiragana = 0x3071; 14737 t.paiyannoithai = 0x0e2f; 14738 t.pakatakana = 0x30d1; 14739 t.palatalizationcyrilliccmb = 0x0484; 14740 t.palochkacyrillic = 0x04c0; 14741 t.pansioskorean = 0x317f; 14742 t.paragraph = 0x00b6; 14743 t.parallel = 0x2225; 14744 t.parenleft = 0x0028; 14745 t.parenleftaltonearabic = 0xfd3e; 14746 t.parenleftbt = 0xf8ed; 14747 t.parenleftex = 0xf8ec; 14748 t.parenleftinferior = 0x208d; 14749 t.parenleftmonospace = 0xff08; 14750 t.parenleftsmall = 0xfe59; 14751 t.parenleftsuperior = 0x207d; 14752 t.parenlefttp = 0xf8eb; 14753 t.parenleftvertical = 0xfe35; 14754 t.parenright = 0x0029; 14755 t.parenrightaltonearabic = 0xfd3f; 14756 t.parenrightbt = 0xf8f8; 14757 t.parenrightex = 0xf8f7; 14758 t.parenrightinferior = 0x208e; 14759 t.parenrightmonospace = 0xff09; 14760 t.parenrightsmall = 0xfe5a; 14761 t.parenrightsuperior = 0x207e; 14762 t.parenrighttp = 0xf8f6; 14763 t.parenrightvertical = 0xfe36; 14764 t.partialdiff = 0x2202; 14765 t.paseqhebrew = 0x05c0; 14766 t.pashtahebrew = 0x0599; 14767 t.pasquare = 0x33a9; 14768 t.patah = 0x05b7; 14769 t.patah11 = 0x05b7; 14770 t.patah1d = 0x05b7; 14771 t.patah2a = 0x05b7; 14772 t.patahhebrew = 0x05b7; 14773 t.patahnarrowhebrew = 0x05b7; 14774 t.patahquarterhebrew = 0x05b7; 14775 t.patahwidehebrew = 0x05b7; 14776 t.pazerhebrew = 0x05a1; 14777 t.pbopomofo = 0x3106; 14778 t.pcircle = 0x24df; 14779 t.pdotaccent = 0x1e57; 14780 t.pe = 0x05e4; 14781 t.pecyrillic = 0x043f; 14782 t.pedagesh = 0xfb44; 14783 t.pedageshhebrew = 0xfb44; 14784 t.peezisquare = 0x333b; 14785 t.pefinaldageshhebrew = 0xfb43; 14786 t.peharabic = 0x067e; 14787 t.peharmenian = 0x057a; 14788 t.pehebrew = 0x05e4; 14789 t.pehfinalarabic = 0xfb57; 14790 t.pehinitialarabic = 0xfb58; 14791 t.pehiragana = 0x307a; 14792 t.pehmedialarabic = 0xfb59; 14793 t.pekatakana = 0x30da; 14794 t.pemiddlehookcyrillic = 0x04a7; 14795 t.perafehebrew = 0xfb4e; 14796 t.percent = 0x0025; 14797 t.percentarabic = 0x066a; 14798 t.percentmonospace = 0xff05; 14799 t.percentsmall = 0xfe6a; 14800 t.period = 0x002e; 14801 t.periodarmenian = 0x0589; 14802 t.periodcentered = 0x00b7; 14803 t.periodhalfwidth = 0xff61; 14804 t.periodinferior = 0xf6e7; 14805 t.periodmonospace = 0xff0e; 14806 t.periodsmall = 0xfe52; 14807 t.periodsuperior = 0xf6e8; 14808 t.perispomenigreekcmb = 0x0342; 14809 t.perpendicular = 0x22a5; 14810 t.perthousand = 0x2030; 14811 t.peseta = 0x20a7; 14812 t.pfsquare = 0x338a; 14813 t.phabengali = 0x09ab; 14814 t.phadeva = 0x092b; 14815 t.phagujarati = 0x0aab; 14816 t.phagurmukhi = 0x0a2b; 14817 t.phi = 0x03c6; 14818 t.phi1 = 0x03d5; 14819 t.phieuphacirclekorean = 0x327a; 14820 t.phieuphaparenkorean = 0x321a; 14821 t.phieuphcirclekorean = 0x326c; 14822 t.phieuphkorean = 0x314d; 14823 t.phieuphparenkorean = 0x320c; 14824 t.philatin = 0x0278; 14825 t.phinthuthai = 0x0e3a; 14826 t.phisymbolgreek = 0x03d5; 14827 t.phook = 0x01a5; 14828 t.phophanthai = 0x0e1e; 14829 t.phophungthai = 0x0e1c; 14830 t.phosamphaothai = 0x0e20; 14831 t.pi = 0x03c0; 14832 t.pieupacirclekorean = 0x3273; 14833 t.pieupaparenkorean = 0x3213; 14834 t.pieupcieuckorean = 0x3176; 14835 t.pieupcirclekorean = 0x3265; 14836 t.pieupkiyeokkorean = 0x3172; 14837 t.pieupkorean = 0x3142; 14838 t.pieupparenkorean = 0x3205; 14839 t.pieupsioskiyeokkorean = 0x3174; 14840 t.pieupsioskorean = 0x3144; 14841 t.pieupsiostikeutkorean = 0x3175; 14842 t.pieupthieuthkorean = 0x3177; 14843 t.pieuptikeutkorean = 0x3173; 14844 t.pihiragana = 0x3074; 14845 t.pikatakana = 0x30d4; 14846 t.pisymbolgreek = 0x03d6; 14847 t.piwrarmenian = 0x0583; 14848 t.planckover2pi = 0x210f; 14849 t.planckover2pi1 = 0x210f; 14850 t.plus = 0x002b; 14851 t.plusbelowcmb = 0x031f; 14852 t.pluscircle = 0x2295; 14853 t.plusminus = 0x00b1; 14854 t.plusmod = 0x02d6; 14855 t.plusmonospace = 0xff0b; 14856 t.plussmall = 0xfe62; 14857 t.plussuperior = 0x207a; 14858 t.pmonospace = 0xff50; 14859 t.pmsquare = 0x33d8; 14860 t.pohiragana = 0x307d; 14861 t.pointingindexdownwhite = 0x261f; 14862 t.pointingindexleftwhite = 0x261c; 14863 t.pointingindexrightwhite = 0x261e; 14864 t.pointingindexupwhite = 0x261d; 14865 t.pokatakana = 0x30dd; 14866 t.poplathai = 0x0e1b; 14867 t.postalmark = 0x3012; 14868 t.postalmarkface = 0x3020; 14869 t.pparen = 0x24ab; 14870 t.precedes = 0x227a; 14871 t.prescription = 0x211e; 14872 t.primemod = 0x02b9; 14873 t.primereversed = 0x2035; 14874 t.product = 0x220f; 14875 t.projective = 0x2305; 14876 t.prolongedkana = 0x30fc; 14877 t.propellor = 0x2318; 14878 t.propersubset = 0x2282; 14879 t.propersuperset = 0x2283; 14880 t.proportion = 0x2237; 14881 t.proportional = 0x221d; 14882 t.psi = 0x03c8; 14883 t.psicyrillic = 0x0471; 14884 t.psilipneumatacyrilliccmb = 0x0486; 14885 t.pssquare = 0x33b0; 14886 t.puhiragana = 0x3077; 14887 t.pukatakana = 0x30d7; 14888 t.pvsquare = 0x33b4; 14889 t.pwsquare = 0x33ba; 14890 t.q = 0x0071; 14891 t.qadeva = 0x0958; 14892 t.qadmahebrew = 0x05a8; 14893 t.qafarabic = 0x0642; 14894 t.qaffinalarabic = 0xfed6; 14895 t.qafinitialarabic = 0xfed7; 14896 t.qafmedialarabic = 0xfed8; 14897 t.qamats = 0x05b8; 14898 t.qamats10 = 0x05b8; 14899 t.qamats1a = 0x05b8; 14900 t.qamats1c = 0x05b8; 14901 t.qamats27 = 0x05b8; 14902 t.qamats29 = 0x05b8; 14903 t.qamats33 = 0x05b8; 14904 t.qamatsde = 0x05b8; 14905 t.qamatshebrew = 0x05b8; 14906 t.qamatsnarrowhebrew = 0x05b8; 14907 t.qamatsqatanhebrew = 0x05b8; 14908 t.qamatsqatannarrowhebrew = 0x05b8; 14909 t.qamatsqatanquarterhebrew = 0x05b8; 14910 t.qamatsqatanwidehebrew = 0x05b8; 14911 t.qamatsquarterhebrew = 0x05b8; 14912 t.qamatswidehebrew = 0x05b8; 14913 t.qarneyparahebrew = 0x059f; 14914 t.qbopomofo = 0x3111; 14915 t.qcircle = 0x24e0; 14916 t.qhook = 0x02a0; 14917 t.qmonospace = 0xff51; 14918 t.qof = 0x05e7; 14919 t.qofdagesh = 0xfb47; 14920 t.qofdageshhebrew = 0xfb47; 14921 t.qofhebrew = 0x05e7; 14922 t.qparen = 0x24ac; 14923 t.quarternote = 0x2669; 14924 t.qubuts = 0x05bb; 14925 t.qubuts18 = 0x05bb; 14926 t.qubuts25 = 0x05bb; 14927 t.qubuts31 = 0x05bb; 14928 t.qubutshebrew = 0x05bb; 14929 t.qubutsnarrowhebrew = 0x05bb; 14930 t.qubutsquarterhebrew = 0x05bb; 14931 t.qubutswidehebrew = 0x05bb; 14932 t.question = 0x003f; 14933 t.questionarabic = 0x061f; 14934 t.questionarmenian = 0x055e; 14935 t.questiondown = 0x00bf; 14936 t.questiondownsmall = 0xf7bf; 14937 t.questiongreek = 0x037e; 14938 t.questionmonospace = 0xff1f; 14939 t.questionsmall = 0xf73f; 14940 t.quotedbl = 0x0022; 14941 t.quotedblbase = 0x201e; 14942 t.quotedblleft = 0x201c; 14943 t.quotedblmonospace = 0xff02; 14944 t.quotedblprime = 0x301e; 14945 t.quotedblprimereversed = 0x301d; 14946 t.quotedblright = 0x201d; 14947 t.quoteleft = 0x2018; 14948 t.quoteleftreversed = 0x201b; 14949 t.quotereversed = 0x201b; 14950 t.quoteright = 0x2019; 14951 t.quoterightn = 0x0149; 14952 t.quotesinglbase = 0x201a; 14953 t.quotesingle = 0x0027; 14954 t.quotesinglemonospace = 0xff07; 14955 t.r = 0x0072; 14956 t.raarmenian = 0x057c; 14957 t.rabengali = 0x09b0; 14958 t.racute = 0x0155; 14959 t.radeva = 0x0930; 14960 t.radical = 0x221a; 14961 t.radicalex = 0xf8e5; 14962 t.radoverssquare = 0x33ae; 14963 t.radoverssquaredsquare = 0x33af; 14964 t.radsquare = 0x33ad; 14965 t.rafe = 0x05bf; 14966 t.rafehebrew = 0x05bf; 14967 t.ragujarati = 0x0ab0; 14968 t.ragurmukhi = 0x0a30; 14969 t.rahiragana = 0x3089; 14970 t.rakatakana = 0x30e9; 14971 t.rakatakanahalfwidth = 0xff97; 14972 t.ralowerdiagonalbengali = 0x09f1; 14973 t.ramiddlediagonalbengali = 0x09f0; 14974 t.ramshorn = 0x0264; 14975 t.ratio = 0x2236; 14976 t.rbopomofo = 0x3116; 14977 t.rcaron = 0x0159; 14978 t.rcedilla = 0x0157; 14979 t.rcircle = 0x24e1; 14980 t.rcommaaccent = 0x0157; 14981 t.rdblgrave = 0x0211; 14982 t.rdotaccent = 0x1e59; 14983 t.rdotbelow = 0x1e5b; 14984 t.rdotbelowmacron = 0x1e5d; 14985 t.referencemark = 0x203b; 14986 t.reflexsubset = 0x2286; 14987 t.reflexsuperset = 0x2287; 14988 t.registered = 0x00ae; 14989 t.registersans = 0xf8e8; 14990 t.registerserif = 0xf6da; 14991 t.reharabic = 0x0631; 14992 t.reharmenian = 0x0580; 14993 t.rehfinalarabic = 0xfeae; 14994 t.rehiragana = 0x308c; 14995 t.rekatakana = 0x30ec; 14996 t.rekatakanahalfwidth = 0xff9a; 14997 t.resh = 0x05e8; 14998 t.reshdageshhebrew = 0xfb48; 14999 t.reshhebrew = 0x05e8; 15000 t.reversedtilde = 0x223d; 15001 t.reviahebrew = 0x0597; 15002 t.reviamugrashhebrew = 0x0597; 15003 t.revlogicalnot = 0x2310; 15004 t.rfishhook = 0x027e; 15005 t.rfishhookreversed = 0x027f; 15006 t.rhabengali = 0x09dd; 15007 t.rhadeva = 0x095d; 15008 t.rho = 0x03c1; 15009 t.rhook = 0x027d; 15010 t.rhookturned = 0x027b; 15011 t.rhookturnedsuperior = 0x02b5; 15012 t.rhosymbolgreek = 0x03f1; 15013 t.rhotichookmod = 0x02de; 15014 t.rieulacirclekorean = 0x3271; 15015 t.rieulaparenkorean = 0x3211; 15016 t.rieulcirclekorean = 0x3263; 15017 t.rieulhieuhkorean = 0x3140; 15018 t.rieulkiyeokkorean = 0x313a; 15019 t.rieulkiyeoksioskorean = 0x3169; 15020 t.rieulkorean = 0x3139; 15021 t.rieulmieumkorean = 0x313b; 15022 t.rieulpansioskorean = 0x316c; 15023 t.rieulparenkorean = 0x3203; 15024 t.rieulphieuphkorean = 0x313f; 15025 t.rieulpieupkorean = 0x313c; 15026 t.rieulpieupsioskorean = 0x316b; 15027 t.rieulsioskorean = 0x313d; 15028 t.rieulthieuthkorean = 0x313e; 15029 t.rieultikeutkorean = 0x316a; 15030 t.rieulyeorinhieuhkorean = 0x316d; 15031 t.rightangle = 0x221f; 15032 t.righttackbelowcmb = 0x0319; 15033 t.righttriangle = 0x22bf; 15034 t.rihiragana = 0x308a; 15035 t.rikatakana = 0x30ea; 15036 t.rikatakanahalfwidth = 0xff98; 15037 t.ring = 0x02da; 15038 t.ringbelowcmb = 0x0325; 15039 t.ringcmb = 0x030a; 15040 t.ringhalfleft = 0x02bf; 15041 t.ringhalfleftarmenian = 0x0559; 15042 t.ringhalfleftbelowcmb = 0x031c; 15043 t.ringhalfleftcentered = 0x02d3; 15044 t.ringhalfright = 0x02be; 15045 t.ringhalfrightbelowcmb = 0x0339; 15046 t.ringhalfrightcentered = 0x02d2; 15047 t.rinvertedbreve = 0x0213; 15048 t.rittorusquare = 0x3351; 15049 t.rlinebelow = 0x1e5f; 15050 t.rlongleg = 0x027c; 15051 t.rlonglegturned = 0x027a; 15052 t.rmonospace = 0xff52; 15053 t.rohiragana = 0x308d; 15054 t.rokatakana = 0x30ed; 15055 t.rokatakanahalfwidth = 0xff9b; 15056 t.roruathai = 0x0e23; 15057 t.rparen = 0x24ad; 15058 t.rrabengali = 0x09dc; 15059 t.rradeva = 0x0931; 15060 t.rragurmukhi = 0x0a5c; 15061 t.rreharabic = 0x0691; 15062 t.rrehfinalarabic = 0xfb8d; 15063 t.rrvocalicbengali = 0x09e0; 15064 t.rrvocalicdeva = 0x0960; 15065 t.rrvocalicgujarati = 0x0ae0; 15066 t.rrvocalicvowelsignbengali = 0x09c4; 15067 t.rrvocalicvowelsigndeva = 0x0944; 15068 t.rrvocalicvowelsigngujarati = 0x0ac4; 15069 t.rsuperior = 0xf6f1; 15070 t.rtblock = 0x2590; 15071 t.rturned = 0x0279; 15072 t.rturnedsuperior = 0x02b4; 15073 t.ruhiragana = 0x308b; 15074 t.rukatakana = 0x30eb; 15075 t.rukatakanahalfwidth = 0xff99; 15076 t.rupeemarkbengali = 0x09f2; 15077 t.rupeesignbengali = 0x09f3; 15078 t.rupiah = 0xf6dd; 15079 t.ruthai = 0x0e24; 15080 t.rvocalicbengali = 0x098b; 15081 t.rvocalicdeva = 0x090b; 15082 t.rvocalicgujarati = 0x0a8b; 15083 t.rvocalicvowelsignbengali = 0x09c3; 15084 t.rvocalicvowelsigndeva = 0x0943; 15085 t.rvocalicvowelsigngujarati = 0x0ac3; 15086 t.s = 0x0073; 15087 t.sabengali = 0x09b8; 15088 t.sacute = 0x015b; 15089 t.sacutedotaccent = 0x1e65; 15090 t.sadarabic = 0x0635; 15091 t.sadeva = 0x0938; 15092 t.sadfinalarabic = 0xfeba; 15093 t.sadinitialarabic = 0xfebb; 15094 t.sadmedialarabic = 0xfebc; 15095 t.sagujarati = 0x0ab8; 15096 t.sagurmukhi = 0x0a38; 15097 t.sahiragana = 0x3055; 15098 t.sakatakana = 0x30b5; 15099 t.sakatakanahalfwidth = 0xff7b; 15100 t.sallallahoualayhewasallamarabic = 0xfdfa; 15101 t.samekh = 0x05e1; 15102 t.samekhdagesh = 0xfb41; 15103 t.samekhdageshhebrew = 0xfb41; 15104 t.samekhhebrew = 0x05e1; 15105 t.saraaathai = 0x0e32; 15106 t.saraaethai = 0x0e41; 15107 t.saraaimaimalaithai = 0x0e44; 15108 t.saraaimaimuanthai = 0x0e43; 15109 t.saraamthai = 0x0e33; 15110 t.saraathai = 0x0e30; 15111 t.saraethai = 0x0e40; 15112 t.saraiileftthai = 0xf886; 15113 t.saraiithai = 0x0e35; 15114 t.saraileftthai = 0xf885; 15115 t.saraithai = 0x0e34; 15116 t.saraothai = 0x0e42; 15117 t.saraueeleftthai = 0xf888; 15118 t.saraueethai = 0x0e37; 15119 t.saraueleftthai = 0xf887; 15120 t.sarauethai = 0x0e36; 15121 t.sarauthai = 0x0e38; 15122 t.sarauuthai = 0x0e39; 15123 t.sbopomofo = 0x3119; 15124 t.scaron = 0x0161; 15125 t.scarondotaccent = 0x1e67; 15126 t.scedilla = 0x015f; 15127 t.schwa = 0x0259; 15128 t.schwacyrillic = 0x04d9; 15129 t.schwadieresiscyrillic = 0x04db; 15130 t.schwahook = 0x025a; 15131 t.scircle = 0x24e2; 15132 t.scircumflex = 0x015d; 15133 t.scommaaccent = 0x0219; 15134 t.sdotaccent = 0x1e61; 15135 t.sdotbelow = 0x1e63; 15136 t.sdotbelowdotaccent = 0x1e69; 15137 t.seagullbelowcmb = 0x033c; 15138 t.second = 0x2033; 15139 t.secondtonechinese = 0x02ca; 15140 t.section = 0x00a7; 15141 t.seenarabic = 0x0633; 15142 t.seenfinalarabic = 0xfeb2; 15143 t.seeninitialarabic = 0xfeb3; 15144 t.seenmedialarabic = 0xfeb4; 15145 t.segol = 0x05b6; 15146 t.segol13 = 0x05b6; 15147 t.segol1f = 0x05b6; 15148 t.segol2c = 0x05b6; 15149 t.segolhebrew = 0x05b6; 15150 t.segolnarrowhebrew = 0x05b6; 15151 t.segolquarterhebrew = 0x05b6; 15152 t.segoltahebrew = 0x0592; 15153 t.segolwidehebrew = 0x05b6; 15154 t.seharmenian = 0x057d; 15155 t.sehiragana = 0x305b; 15156 t.sekatakana = 0x30bb; 15157 t.sekatakanahalfwidth = 0xff7e; 15158 t.semicolon = 0x003b; 15159 t.semicolonarabic = 0x061b; 15160 t.semicolonmonospace = 0xff1b; 15161 t.semicolonsmall = 0xfe54; 15162 t.semivoicedmarkkana = 0x309c; 15163 t.semivoicedmarkkanahalfwidth = 0xff9f; 15164 t.sentisquare = 0x3322; 15165 t.sentosquare = 0x3323; 15166 t.seven = 0x0037; 15167 t.sevenarabic = 0x0667; 15168 t.sevenbengali = 0x09ed; 15169 t.sevencircle = 0x2466; 15170 t.sevencircleinversesansserif = 0x2790; 15171 t.sevendeva = 0x096d; 15172 t.seveneighths = 0x215e; 15173 t.sevengujarati = 0x0aed; 15174 t.sevengurmukhi = 0x0a6d; 15175 t.sevenhackarabic = 0x0667; 15176 t.sevenhangzhou = 0x3027; 15177 t.sevenideographicparen = 0x3226; 15178 t.seveninferior = 0x2087; 15179 t.sevenmonospace = 0xff17; 15180 t.sevenoldstyle = 0xf737; 15181 t.sevenparen = 0x247a; 15182 t.sevenperiod = 0x248e; 15183 t.sevenpersian = 0x06f7; 15184 t.sevenroman = 0x2176; 15185 t.sevensuperior = 0x2077; 15186 t.seventeencircle = 0x2470; 15187 t.seventeenparen = 0x2484; 15188 t.seventeenperiod = 0x2498; 15189 t.seventhai = 0x0e57; 15190 t.sfthyphen = 0x00ad; 15191 t.shaarmenian = 0x0577; 15192 t.shabengali = 0x09b6; 15193 t.shacyrillic = 0x0448; 15194 t.shaddaarabic = 0x0651; 15195 t.shaddadammaarabic = 0xfc61; 15196 t.shaddadammatanarabic = 0xfc5e; 15197 t.shaddafathaarabic = 0xfc60; 15198 t.shaddakasraarabic = 0xfc62; 15199 t.shaddakasratanarabic = 0xfc5f; 15200 t.shade = 0x2592; 15201 t.shadedark = 0x2593; 15202 t.shadelight = 0x2591; 15203 t.shademedium = 0x2592; 15204 t.shadeva = 0x0936; 15205 t.shagujarati = 0x0ab6; 15206 t.shagurmukhi = 0x0a36; 15207 t.shalshelethebrew = 0x0593; 15208 t.shbopomofo = 0x3115; 15209 t.shchacyrillic = 0x0449; 15210 t.sheenarabic = 0x0634; 15211 t.sheenfinalarabic = 0xfeb6; 15212 t.sheeninitialarabic = 0xfeb7; 15213 t.sheenmedialarabic = 0xfeb8; 15214 t.sheicoptic = 0x03e3; 15215 t.sheqel = 0x20aa; 15216 t.sheqelhebrew = 0x20aa; 15217 t.sheva = 0x05b0; 15218 t.sheva115 = 0x05b0; 15219 t.sheva15 = 0x05b0; 15220 t.sheva22 = 0x05b0; 15221 t.sheva2e = 0x05b0; 15222 t.shevahebrew = 0x05b0; 15223 t.shevanarrowhebrew = 0x05b0; 15224 t.shevaquarterhebrew = 0x05b0; 15225 t.shevawidehebrew = 0x05b0; 15226 t.shhacyrillic = 0x04bb; 15227 t.shimacoptic = 0x03ed; 15228 t.shin = 0x05e9; 15229 t.shindagesh = 0xfb49; 15230 t.shindageshhebrew = 0xfb49; 15231 t.shindageshshindot = 0xfb2c; 15232 t.shindageshshindothebrew = 0xfb2c; 15233 t.shindageshsindot = 0xfb2d; 15234 t.shindageshsindothebrew = 0xfb2d; 15235 t.shindothebrew = 0x05c1; 15236 t.shinhebrew = 0x05e9; 15237 t.shinshindot = 0xfb2a; 15238 t.shinshindothebrew = 0xfb2a; 15239 t.shinsindot = 0xfb2b; 15240 t.shinsindothebrew = 0xfb2b; 15241 t.shook = 0x0282; 15242 t.sigma = 0x03c3; 15243 t.sigma1 = 0x03c2; 15244 t.sigmafinal = 0x03c2; 15245 t.sigmalunatesymbolgreek = 0x03f2; 15246 t.sihiragana = 0x3057; 15247 t.sikatakana = 0x30b7; 15248 t.sikatakanahalfwidth = 0xff7c; 15249 t.siluqhebrew = 0x05bd; 15250 t.siluqlefthebrew = 0x05bd; 15251 t.similar = 0x223c; 15252 t.sindothebrew = 0x05c2; 15253 t.siosacirclekorean = 0x3274; 15254 t.siosaparenkorean = 0x3214; 15255 t.sioscieuckorean = 0x317e; 15256 t.sioscirclekorean = 0x3266; 15257 t.sioskiyeokkorean = 0x317a; 15258 t.sioskorean = 0x3145; 15259 t.siosnieunkorean = 0x317b; 15260 t.siosparenkorean = 0x3206; 15261 t.siospieupkorean = 0x317d; 15262 t.siostikeutkorean = 0x317c; 15263 t.six = 0x0036; 15264 t.sixarabic = 0x0666; 15265 t.sixbengali = 0x09ec; 15266 t.sixcircle = 0x2465; 15267 t.sixcircleinversesansserif = 0x278f; 15268 t.sixdeva = 0x096c; 15269 t.sixgujarati = 0x0aec; 15270 t.sixgurmukhi = 0x0a6c; 15271 t.sixhackarabic = 0x0666; 15272 t.sixhangzhou = 0x3026; 15273 t.sixideographicparen = 0x3225; 15274 t.sixinferior = 0x2086; 15275 t.sixmonospace = 0xff16; 15276 t.sixoldstyle = 0xf736; 15277 t.sixparen = 0x2479; 15278 t.sixperiod = 0x248d; 15279 t.sixpersian = 0x06f6; 15280 t.sixroman = 0x2175; 15281 t.sixsuperior = 0x2076; 15282 t.sixteencircle = 0x246f; 15283 t.sixteencurrencydenominatorbengali = 0x09f9; 15284 t.sixteenparen = 0x2483; 15285 t.sixteenperiod = 0x2497; 15286 t.sixthai = 0x0e56; 15287 t.slash = 0x002f; 15288 t.slashmonospace = 0xff0f; 15289 t.slong = 0x017f; 15290 t.slongdotaccent = 0x1e9b; 15291 t.smileface = 0x263a; 15292 t.smonospace = 0xff53; 15293 t.sofpasuqhebrew = 0x05c3; 15294 t.softhyphen = 0x00ad; 15295 t.softsigncyrillic = 0x044c; 15296 t.sohiragana = 0x305d; 15297 t.sokatakana = 0x30bd; 15298 t.sokatakanahalfwidth = 0xff7f; 15299 t.soliduslongoverlaycmb = 0x0338; 15300 t.solidusshortoverlaycmb = 0x0337; 15301 t.sorusithai = 0x0e29; 15302 t.sosalathai = 0x0e28; 15303 t.sosothai = 0x0e0b; 15304 t.sosuathai = 0x0e2a; 15305 t.space = 0x0020; 15306 t.spacehackarabic = 0x0020; 15307 t.spade = 0x2660; 15308 t.spadesuitblack = 0x2660; 15309 t.spadesuitwhite = 0x2664; 15310 t.sparen = 0x24ae; 15311 t.squarebelowcmb = 0x033b; 15312 t.squarecc = 0x33c4; 15313 t.squarecm = 0x339d; 15314 t.squarediagonalcrosshatchfill = 0x25a9; 15315 t.squarehorizontalfill = 0x25a4; 15316 t.squarekg = 0x338f; 15317 t.squarekm = 0x339e; 15318 t.squarekmcapital = 0x33ce; 15319 t.squareln = 0x33d1; 15320 t.squarelog = 0x33d2; 15321 t.squaremg = 0x338e; 15322 t.squaremil = 0x33d5; 15323 t.squaremm = 0x339c; 15324 t.squaremsquared = 0x33a1; 15325 t.squareorthogonalcrosshatchfill = 0x25a6; 15326 t.squareupperlefttolowerrightfill = 0x25a7; 15327 t.squareupperrighttolowerleftfill = 0x25a8; 15328 t.squareverticalfill = 0x25a5; 15329 t.squarewhitewithsmallblack = 0x25a3; 15330 t.srsquare = 0x33db; 15331 t.ssabengali = 0x09b7; 15332 t.ssadeva = 0x0937; 15333 t.ssagujarati = 0x0ab7; 15334 t.ssangcieuckorean = 0x3149; 15335 t.ssanghieuhkorean = 0x3185; 15336 t.ssangieungkorean = 0x3180; 15337 t.ssangkiyeokkorean = 0x3132; 15338 t.ssangnieunkorean = 0x3165; 15339 t.ssangpieupkorean = 0x3143; 15340 t.ssangsioskorean = 0x3146; 15341 t.ssangtikeutkorean = 0x3138; 15342 t.ssuperior = 0xf6f2; 15343 t.sterling = 0x00a3; 15344 t.sterlingmonospace = 0xffe1; 15345 t.strokelongoverlaycmb = 0x0336; 15346 t.strokeshortoverlaycmb = 0x0335; 15347 t.subset = 0x2282; 15348 t.subsetnotequal = 0x228a; 15349 t.subsetorequal = 0x2286; 15350 t.succeeds = 0x227b; 15351 t.suchthat = 0x220b; 15352 t.suhiragana = 0x3059; 15353 t.sukatakana = 0x30b9; 15354 t.sukatakanahalfwidth = 0xff7d; 15355 t.sukunarabic = 0x0652; 15356 t.summation = 0x2211; 15357 t.sun = 0x263c; 15358 t.superset = 0x2283; 15359 t.supersetnotequal = 0x228b; 15360 t.supersetorequal = 0x2287; 15361 t.svsquare = 0x33dc; 15362 t.syouwaerasquare = 0x337c; 15363 t.t = 0x0074; 15364 t.tabengali = 0x09a4; 15365 t.tackdown = 0x22a4; 15366 t.tackleft = 0x22a3; 15367 t.tadeva = 0x0924; 15368 t.tagujarati = 0x0aa4; 15369 t.tagurmukhi = 0x0a24; 15370 t.taharabic = 0x0637; 15371 t.tahfinalarabic = 0xfec2; 15372 t.tahinitialarabic = 0xfec3; 15373 t.tahiragana = 0x305f; 15374 t.tahmedialarabic = 0xfec4; 15375 t.taisyouerasquare = 0x337d; 15376 t.takatakana = 0x30bf; 15377 t.takatakanahalfwidth = 0xff80; 15378 t.tatweelarabic = 0x0640; 15379 t.tau = 0x03c4; 15380 t.tav = 0x05ea; 15381 t.tavdages = 0xfb4a; 15382 t.tavdagesh = 0xfb4a; 15383 t.tavdageshhebrew = 0xfb4a; 15384 t.tavhebrew = 0x05ea; 15385 t.tbar = 0x0167; 15386 t.tbopomofo = 0x310a; 15387 t.tcaron = 0x0165; 15388 t.tccurl = 0x02a8; 15389 t.tcedilla = 0x0163; 15390 t.tcheharabic = 0x0686; 15391 t.tchehfinalarabic = 0xfb7b; 15392 t.tchehinitialarabic = 0xfb7c; 15393 t.tchehmedialarabic = 0xfb7d; 15394 t.tcircle = 0x24e3; 15395 t.tcircumflexbelow = 0x1e71; 15396 t.tcommaaccent = 0x0163; 15397 t.tdieresis = 0x1e97; 15398 t.tdotaccent = 0x1e6b; 15399 t.tdotbelow = 0x1e6d; 15400 t.tecyrillic = 0x0442; 15401 t.tedescendercyrillic = 0x04ad; 15402 t.teharabic = 0x062a; 15403 t.tehfinalarabic = 0xfe96; 15404 t.tehhahinitialarabic = 0xfca2; 15405 t.tehhahisolatedarabic = 0xfc0c; 15406 t.tehinitialarabic = 0xfe97; 15407 t.tehiragana = 0x3066; 15408 t.tehjeeminitialarabic = 0xfca1; 15409 t.tehjeemisolatedarabic = 0xfc0b; 15410 t.tehmarbutaarabic = 0x0629; 15411 t.tehmarbutafinalarabic = 0xfe94; 15412 t.tehmedialarabic = 0xfe98; 15413 t.tehmeeminitialarabic = 0xfca4; 15414 t.tehmeemisolatedarabic = 0xfc0e; 15415 t.tehnoonfinalarabic = 0xfc73; 15416 t.tekatakana = 0x30c6; 15417 t.tekatakanahalfwidth = 0xff83; 15418 t.telephone = 0x2121; 15419 t.telephoneblack = 0x260e; 15420 t.telishagedolahebrew = 0x05a0; 15421 t.telishaqetanahebrew = 0x05a9; 15422 t.tencircle = 0x2469; 15423 t.tenideographicparen = 0x3229; 15424 t.tenparen = 0x247d; 15425 t.tenperiod = 0x2491; 15426 t.tenroman = 0x2179; 15427 t.tesh = 0x02a7; 15428 t.tet = 0x05d8; 15429 t.tetdagesh = 0xfb38; 15430 t.tetdageshhebrew = 0xfb38; 15431 t.tethebrew = 0x05d8; 15432 t.tetsecyrillic = 0x04b5; 15433 t.tevirhebrew = 0x059b; 15434 t.tevirlefthebrew = 0x059b; 15435 t.thabengali = 0x09a5; 15436 t.thadeva = 0x0925; 15437 t.thagujarati = 0x0aa5; 15438 t.thagurmukhi = 0x0a25; 15439 t.thalarabic = 0x0630; 15440 t.thalfinalarabic = 0xfeac; 15441 t.thanthakhatlowleftthai = 0xf898; 15442 t.thanthakhatlowrightthai = 0xf897; 15443 t.thanthakhatthai = 0x0e4c; 15444 t.thanthakhatupperleftthai = 0xf896; 15445 t.theharabic = 0x062b; 15446 t.thehfinalarabic = 0xfe9a; 15447 t.thehinitialarabic = 0xfe9b; 15448 t.thehmedialarabic = 0xfe9c; 15449 t.thereexists = 0x2203; 15450 t.therefore = 0x2234; 15451 t.theta = 0x03b8; 15452 t.theta1 = 0x03d1; 15453 t.thetasymbolgreek = 0x03d1; 15454 t.thieuthacirclekorean = 0x3279; 15455 t.thieuthaparenkorean = 0x3219; 15456 t.thieuthcirclekorean = 0x326b; 15457 t.thieuthkorean = 0x314c; 15458 t.thieuthparenkorean = 0x320b; 15459 t.thirteencircle = 0x246c; 15460 t.thirteenparen = 0x2480; 15461 t.thirteenperiod = 0x2494; 15462 t.thonangmonthothai = 0x0e11; 15463 t.thook = 0x01ad; 15464 t.thophuthaothai = 0x0e12; 15465 t.thorn = 0x00fe; 15466 t.thothahanthai = 0x0e17; 15467 t.thothanthai = 0x0e10; 15468 t.thothongthai = 0x0e18; 15469 t.thothungthai = 0x0e16; 15470 t.thousandcyrillic = 0x0482; 15471 t.thousandsseparatorarabic = 0x066c; 15472 t.thousandsseparatorpersian = 0x066c; 15473 t.three = 0x0033; 15474 t.threearabic = 0x0663; 15475 t.threebengali = 0x09e9; 15476 t.threecircle = 0x2462; 15477 t.threecircleinversesansserif = 0x278c; 15478 t.threedeva = 0x0969; 15479 t.threeeighths = 0x215c; 15480 t.threegujarati = 0x0ae9; 15481 t.threegurmukhi = 0x0a69; 15482 t.threehackarabic = 0x0663; 15483 t.threehangzhou = 0x3023; 15484 t.threeideographicparen = 0x3222; 15485 t.threeinferior = 0x2083; 15486 t.threemonospace = 0xff13; 15487 t.threenumeratorbengali = 0x09f6; 15488 t.threeoldstyle = 0xf733; 15489 t.threeparen = 0x2476; 15490 t.threeperiod = 0x248a; 15491 t.threepersian = 0x06f3; 15492 t.threequarters = 0x00be; 15493 t.threequartersemdash = 0xf6de; 15494 t.threeroman = 0x2172; 15495 t.threesuperior = 0x00b3; 15496 t.threethai = 0x0e53; 15497 t.thzsquare = 0x3394; 15498 t.tihiragana = 0x3061; 15499 t.tikatakana = 0x30c1; 15500 t.tikatakanahalfwidth = 0xff81; 15501 t.tikeutacirclekorean = 0x3270; 15502 t.tikeutaparenkorean = 0x3210; 15503 t.tikeutcirclekorean = 0x3262; 15504 t.tikeutkorean = 0x3137; 15505 t.tikeutparenkorean = 0x3202; 15506 t.tilde = 0x02dc; 15507 t.tildebelowcmb = 0x0330; 15508 t.tildecmb = 0x0303; 15509 t.tildecomb = 0x0303; 15510 t.tildedoublecmb = 0x0360; 15511 t.tildeoperator = 0x223c; 15512 t.tildeoverlaycmb = 0x0334; 15513 t.tildeverticalcmb = 0x033e; 15514 t.timescircle = 0x2297; 15515 t.tipehahebrew = 0x0596; 15516 t.tipehalefthebrew = 0x0596; 15517 t.tippigurmukhi = 0x0a70; 15518 t.titlocyrilliccmb = 0x0483; 15519 t.tiwnarmenian = 0x057f; 15520 t.tlinebelow = 0x1e6f; 15521 t.tmonospace = 0xff54; 15522 t.toarmenian = 0x0569; 15523 t.tohiragana = 0x3068; 15524 t.tokatakana = 0x30c8; 15525 t.tokatakanahalfwidth = 0xff84; 15526 t.tonebarextrahighmod = 0x02e5; 15527 t.tonebarextralowmod = 0x02e9; 15528 t.tonebarhighmod = 0x02e6; 15529 t.tonebarlowmod = 0x02e8; 15530 t.tonebarmidmod = 0x02e7; 15531 t.tonefive = 0x01bd; 15532 t.tonesix = 0x0185; 15533 t.tonetwo = 0x01a8; 15534 t.tonos = 0x0384; 15535 t.tonsquare = 0x3327; 15536 t.topatakthai = 0x0e0f; 15537 t.tortoiseshellbracketleft = 0x3014; 15538 t.tortoiseshellbracketleftsmall = 0xfe5d; 15539 t.tortoiseshellbracketleftvertical = 0xfe39; 15540 t.tortoiseshellbracketright = 0x3015; 15541 t.tortoiseshellbracketrightsmall = 0xfe5e; 15542 t.tortoiseshellbracketrightvertical = 0xfe3a; 15543 t.totaothai = 0x0e15; 15544 t.tpalatalhook = 0x01ab; 15545 t.tparen = 0x24af; 15546 t.trademark = 0x2122; 15547 t.trademarksans = 0xf8ea; 15548 t.trademarkserif = 0xf6db; 15549 t.tretroflexhook = 0x0288; 15550 t.triagdn = 0x25bc; 15551 t.triaglf = 0x25c4; 15552 t.triagrt = 0x25ba; 15553 t.triagup = 0x25b2; 15554 t.ts = 0x02a6; 15555 t.tsadi = 0x05e6; 15556 t.tsadidagesh = 0xfb46; 15557 t.tsadidageshhebrew = 0xfb46; 15558 t.tsadihebrew = 0x05e6; 15559 t.tsecyrillic = 0x0446; 15560 t.tsere = 0x05b5; 15561 t.tsere12 = 0x05b5; 15562 t.tsere1e = 0x05b5; 15563 t.tsere2b = 0x05b5; 15564 t.tserehebrew = 0x05b5; 15565 t.tserenarrowhebrew = 0x05b5; 15566 t.tserequarterhebrew = 0x05b5; 15567 t.tserewidehebrew = 0x05b5; 15568 t.tshecyrillic = 0x045b; 15569 t.tsuperior = 0xf6f3; 15570 t.ttabengali = 0x099f; 15571 t.ttadeva = 0x091f; 15572 t.ttagujarati = 0x0a9f; 15573 t.ttagurmukhi = 0x0a1f; 15574 t.tteharabic = 0x0679; 15575 t.ttehfinalarabic = 0xfb67; 15576 t.ttehinitialarabic = 0xfb68; 15577 t.ttehmedialarabic = 0xfb69; 15578 t.tthabengali = 0x09a0; 15579 t.tthadeva = 0x0920; 15580 t.tthagujarati = 0x0aa0; 15581 t.tthagurmukhi = 0x0a20; 15582 t.tturned = 0x0287; 15583 t.tuhiragana = 0x3064; 15584 t.tukatakana = 0x30c4; 15585 t.tukatakanahalfwidth = 0xff82; 15586 t.tusmallhiragana = 0x3063; 15587 t.tusmallkatakana = 0x30c3; 15588 t.tusmallkatakanahalfwidth = 0xff6f; 15589 t.twelvecircle = 0x246b; 15590 t.twelveparen = 0x247f; 15591 t.twelveperiod = 0x2493; 15592 t.twelveroman = 0x217b; 15593 t.twentycircle = 0x2473; 15594 t.twentyhangzhou = 0x5344; 15595 t.twentyparen = 0x2487; 15596 t.twentyperiod = 0x249b; 15597 t.two = 0x0032; 15598 t.twoarabic = 0x0662; 15599 t.twobengali = 0x09e8; 15600 t.twocircle = 0x2461; 15601 t.twocircleinversesansserif = 0x278b; 15602 t.twodeva = 0x0968; 15603 t.twodotenleader = 0x2025; 15604 t.twodotleader = 0x2025; 15605 t.twodotleadervertical = 0xfe30; 15606 t.twogujarati = 0x0ae8; 15607 t.twogurmukhi = 0x0a68; 15608 t.twohackarabic = 0x0662; 15609 t.twohangzhou = 0x3022; 15610 t.twoideographicparen = 0x3221; 15611 t.twoinferior = 0x2082; 15612 t.twomonospace = 0xff12; 15613 t.twonumeratorbengali = 0x09f5; 15614 t.twooldstyle = 0xf732; 15615 t.twoparen = 0x2475; 15616 t.twoperiod = 0x2489; 15617 t.twopersian = 0x06f2; 15618 t.tworoman = 0x2171; 15619 t.twostroke = 0x01bb; 15620 t.twosuperior = 0x00b2; 15621 t.twothai = 0x0e52; 15622 t.twothirds = 0x2154; 15623 t.u = 0x0075; 15624 t.uacute = 0x00fa; 15625 t.ubar = 0x0289; 15626 t.ubengali = 0x0989; 15627 t.ubopomofo = 0x3128; 15628 t.ubreve = 0x016d; 15629 t.ucaron = 0x01d4; 15630 t.ucircle = 0x24e4; 15631 t.ucircumflex = 0x00fb; 15632 t.ucircumflexbelow = 0x1e77; 15633 t.ucyrillic = 0x0443; 15634 t.udattadeva = 0x0951; 15635 t.udblacute = 0x0171; 15636 t.udblgrave = 0x0215; 15637 t.udeva = 0x0909; 15638 t.udieresis = 0x00fc; 15639 t.udieresisacute = 0x01d8; 15640 t.udieresisbelow = 0x1e73; 15641 t.udieresiscaron = 0x01da; 15642 t.udieresiscyrillic = 0x04f1; 15643 t.udieresisgrave = 0x01dc; 15644 t.udieresismacron = 0x01d6; 15645 t.udotbelow = 0x1ee5; 15646 t.ugrave = 0x00f9; 15647 t.ugujarati = 0x0a89; 15648 t.ugurmukhi = 0x0a09; 15649 t.uhiragana = 0x3046; 15650 t.uhookabove = 0x1ee7; 15651 t.uhorn = 0x01b0; 15652 t.uhornacute = 0x1ee9; 15653 t.uhorndotbelow = 0x1ef1; 15654 t.uhorngrave = 0x1eeb; 15655 t.uhornhookabove = 0x1eed; 15656 t.uhorntilde = 0x1eef; 15657 t.uhungarumlaut = 0x0171; 15658 t.uhungarumlautcyrillic = 0x04f3; 15659 t.uinvertedbreve = 0x0217; 15660 t.ukatakana = 0x30a6; 15661 t.ukatakanahalfwidth = 0xff73; 15662 t.ukcyrillic = 0x0479; 15663 t.ukorean = 0x315c; 15664 t.umacron = 0x016b; 15665 t.umacroncyrillic = 0x04ef; 15666 t.umacrondieresis = 0x1e7b; 15667 t.umatragurmukhi = 0x0a41; 15668 t.umonospace = 0xff55; 15669 t.underscore = 0x005f; 15670 t.underscoredbl = 0x2017; 15671 t.underscoremonospace = 0xff3f; 15672 t.underscorevertical = 0xfe33; 15673 t.underscorewavy = 0xfe4f; 15674 t.union = 0x222a; 15675 t.universal = 0x2200; 15676 t.uogonek = 0x0173; 15677 t.uparen = 0x24b0; 15678 t.upblock = 0x2580; 15679 t.upperdothebrew = 0x05c4; 15680 t.upsilon = 0x03c5; 15681 t.upsilondieresis = 0x03cb; 15682 t.upsilondieresistonos = 0x03b0; 15683 t.upsilonlatin = 0x028a; 15684 t.upsilontonos = 0x03cd; 15685 t.uptackbelowcmb = 0x031d; 15686 t.uptackmod = 0x02d4; 15687 t.uragurmukhi = 0x0a73; 15688 t.uring = 0x016f; 15689 t.ushortcyrillic = 0x045e; 15690 t.usmallhiragana = 0x3045; 15691 t.usmallkatakana = 0x30a5; 15692 t.usmallkatakanahalfwidth = 0xff69; 15693 t.ustraightcyrillic = 0x04af; 15694 t.ustraightstrokecyrillic = 0x04b1; 15695 t.utilde = 0x0169; 15696 t.utildeacute = 0x1e79; 15697 t.utildebelow = 0x1e75; 15698 t.uubengali = 0x098a; 15699 t.uudeva = 0x090a; 15700 t.uugujarati = 0x0a8a; 15701 t.uugurmukhi = 0x0a0a; 15702 t.uumatragurmukhi = 0x0a42; 15703 t.uuvowelsignbengali = 0x09c2; 15704 t.uuvowelsigndeva = 0x0942; 15705 t.uuvowelsigngujarati = 0x0ac2; 15706 t.uvowelsignbengali = 0x09c1; 15707 t.uvowelsigndeva = 0x0941; 15708 t.uvowelsigngujarati = 0x0ac1; 15709 t.v = 0x0076; 15710 t.vadeva = 0x0935; 15711 t.vagujarati = 0x0ab5; 15712 t.vagurmukhi = 0x0a35; 15713 t.vakatakana = 0x30f7; 15714 t.vav = 0x05d5; 15715 t.vavdagesh = 0xfb35; 15716 t.vavdagesh65 = 0xfb35; 15717 t.vavdageshhebrew = 0xfb35; 15718 t.vavhebrew = 0x05d5; 15719 t.vavholam = 0xfb4b; 15720 t.vavholamhebrew = 0xfb4b; 15721 t.vavvavhebrew = 0x05f0; 15722 t.vavyodhebrew = 0x05f1; 15723 t.vcircle = 0x24e5; 15724 t.vdotbelow = 0x1e7f; 15725 t.vecyrillic = 0x0432; 15726 t.veharabic = 0x06a4; 15727 t.vehfinalarabic = 0xfb6b; 15728 t.vehinitialarabic = 0xfb6c; 15729 t.vehmedialarabic = 0xfb6d; 15730 t.vekatakana = 0x30f9; 15731 t.venus = 0x2640; 15732 t.verticalbar = 0x007c; 15733 t.verticallineabovecmb = 0x030d; 15734 t.verticallinebelowcmb = 0x0329; 15735 t.verticallinelowmod = 0x02cc; 15736 t.verticallinemod = 0x02c8; 15737 t.vewarmenian = 0x057e; 15738 t.vhook = 0x028b; 15739 t.vikatakana = 0x30f8; 15740 t.viramabengali = 0x09cd; 15741 t.viramadeva = 0x094d; 15742 t.viramagujarati = 0x0acd; 15743 t.visargabengali = 0x0983; 15744 t.visargadeva = 0x0903; 15745 t.visargagujarati = 0x0a83; 15746 t.vmonospace = 0xff56; 15747 t.voarmenian = 0x0578; 15748 t.voicediterationhiragana = 0x309e; 15749 t.voicediterationkatakana = 0x30fe; 15750 t.voicedmarkkana = 0x309b; 15751 t.voicedmarkkanahalfwidth = 0xff9e; 15752 t.vokatakana = 0x30fa; 15753 t.vparen = 0x24b1; 15754 t.vtilde = 0x1e7d; 15755 t.vturned = 0x028c; 15756 t.vuhiragana = 0x3094; 15757 t.vukatakana = 0x30f4; 15758 t.w = 0x0077; 15759 t.wacute = 0x1e83; 15760 t.waekorean = 0x3159; 15761 t.wahiragana = 0x308f; 15762 t.wakatakana = 0x30ef; 15763 t.wakatakanahalfwidth = 0xff9c; 15764 t.wakorean = 0x3158; 15765 t.wasmallhiragana = 0x308e; 15766 t.wasmallkatakana = 0x30ee; 15767 t.wattosquare = 0x3357; 15768 t.wavedash = 0x301c; 15769 t.wavyunderscorevertical = 0xfe34; 15770 t.wawarabic = 0x0648; 15771 t.wawfinalarabic = 0xfeee; 15772 t.wawhamzaabovearabic = 0x0624; 15773 t.wawhamzaabovefinalarabic = 0xfe86; 15774 t.wbsquare = 0x33dd; 15775 t.wcircle = 0x24e6; 15776 t.wcircumflex = 0x0175; 15777 t.wdieresis = 0x1e85; 15778 t.wdotaccent = 0x1e87; 15779 t.wdotbelow = 0x1e89; 15780 t.wehiragana = 0x3091; 15781 t.weierstrass = 0x2118; 15782 t.wekatakana = 0x30f1; 15783 t.wekorean = 0x315e; 15784 t.weokorean = 0x315d; 15785 t.wgrave = 0x1e81; 15786 t.whitebullet = 0x25e6; 15787 t.whitecircle = 0x25cb; 15788 t.whitecircleinverse = 0x25d9; 15789 t.whitecornerbracketleft = 0x300e; 15790 t.whitecornerbracketleftvertical = 0xfe43; 15791 t.whitecornerbracketright = 0x300f; 15792 t.whitecornerbracketrightvertical = 0xfe44; 15793 t.whitediamond = 0x25c7; 15794 t.whitediamondcontainingblacksmalldiamond = 0x25c8; 15795 t.whitedownpointingsmalltriangle = 0x25bf; 15796 t.whitedownpointingtriangle = 0x25bd; 15797 t.whiteleftpointingsmalltriangle = 0x25c3; 15798 t.whiteleftpointingtriangle = 0x25c1; 15799 t.whitelenticularbracketleft = 0x3016; 15800 t.whitelenticularbracketright = 0x3017; 15801 t.whiterightpointingsmalltriangle = 0x25b9; 15802 t.whiterightpointingtriangle = 0x25b7; 15803 t.whitesmallsquare = 0x25ab; 15804 t.whitesmilingface = 0x263a; 15805 t.whitesquare = 0x25a1; 15806 t.whitestar = 0x2606; 15807 t.whitetelephone = 0x260f; 15808 t.whitetortoiseshellbracketleft = 0x3018; 15809 t.whitetortoiseshellbracketright = 0x3019; 15810 t.whiteuppointingsmalltriangle = 0x25b5; 15811 t.whiteuppointingtriangle = 0x25b3; 15812 t.wihiragana = 0x3090; 15813 t.wikatakana = 0x30f0; 15814 t.wikorean = 0x315f; 15815 t.wmonospace = 0xff57; 15816 t.wohiragana = 0x3092; 15817 t.wokatakana = 0x30f2; 15818 t.wokatakanahalfwidth = 0xff66; 15819 t.won = 0x20a9; 15820 t.wonmonospace = 0xffe6; 15821 t.wowaenthai = 0x0e27; 15822 t.wparen = 0x24b2; 15823 t.wring = 0x1e98; 15824 t.wsuperior = 0x02b7; 15825 t.wturned = 0x028d; 15826 t.wynn = 0x01bf; 15827 t.x = 0x0078; 15828 t.xabovecmb = 0x033d; 15829 t.xbopomofo = 0x3112; 15830 t.xcircle = 0x24e7; 15831 t.xdieresis = 0x1e8d; 15832 t.xdotaccent = 0x1e8b; 15833 t.xeharmenian = 0x056d; 15834 t.xi = 0x03be; 15835 t.xmonospace = 0xff58; 15836 t.xparen = 0x24b3; 15837 t.xsuperior = 0x02e3; 15838 t.y = 0x0079; 15839 t.yaadosquare = 0x334e; 15840 t.yabengali = 0x09af; 15841 t.yacute = 0x00fd; 15842 t.yadeva = 0x092f; 15843 t.yaekorean = 0x3152; 15844 t.yagujarati = 0x0aaf; 15845 t.yagurmukhi = 0x0a2f; 15846 t.yahiragana = 0x3084; 15847 t.yakatakana = 0x30e4; 15848 t.yakatakanahalfwidth = 0xff94; 15849 t.yakorean = 0x3151; 15850 t.yamakkanthai = 0x0e4e; 15851 t.yasmallhiragana = 0x3083; 15852 t.yasmallkatakana = 0x30e3; 15853 t.yasmallkatakanahalfwidth = 0xff6c; 15854 t.yatcyrillic = 0x0463; 15855 t.ycircle = 0x24e8; 15856 t.ycircumflex = 0x0177; 15857 t.ydieresis = 0x00ff; 15858 t.ydotaccent = 0x1e8f; 15859 t.ydotbelow = 0x1ef5; 15860 t.yeharabic = 0x064a; 15861 t.yehbarreearabic = 0x06d2; 15862 t.yehbarreefinalarabic = 0xfbaf; 15863 t.yehfinalarabic = 0xfef2; 15864 t.yehhamzaabovearabic = 0x0626; 15865 t.yehhamzaabovefinalarabic = 0xfe8a; 15866 t.yehhamzaaboveinitialarabic = 0xfe8b; 15867 t.yehhamzaabovemedialarabic = 0xfe8c; 15868 t.yehinitialarabic = 0xfef3; 15869 t.yehmedialarabic = 0xfef4; 15870 t.yehmeeminitialarabic = 0xfcdd; 15871 t.yehmeemisolatedarabic = 0xfc58; 15872 t.yehnoonfinalarabic = 0xfc94; 15873 t.yehthreedotsbelowarabic = 0x06d1; 15874 t.yekorean = 0x3156; 15875 t.yen = 0x00a5; 15876 t.yenmonospace = 0xffe5; 15877 t.yeokorean = 0x3155; 15878 t.yeorinhieuhkorean = 0x3186; 15879 t.yerahbenyomohebrew = 0x05aa; 15880 t.yerahbenyomolefthebrew = 0x05aa; 15881 t.yericyrillic = 0x044b; 15882 t.yerudieresiscyrillic = 0x04f9; 15883 t.yesieungkorean = 0x3181; 15884 t.yesieungpansioskorean = 0x3183; 15885 t.yesieungsioskorean = 0x3182; 15886 t.yetivhebrew = 0x059a; 15887 t.ygrave = 0x1ef3; 15888 t.yhook = 0x01b4; 15889 t.yhookabove = 0x1ef7; 15890 t.yiarmenian = 0x0575; 15891 t.yicyrillic = 0x0457; 15892 t.yikorean = 0x3162; 15893 t.yinyang = 0x262f; 15894 t.yiwnarmenian = 0x0582; 15895 t.ymonospace = 0xff59; 15896 t.yod = 0x05d9; 15897 t.yoddagesh = 0xfb39; 15898 t.yoddageshhebrew = 0xfb39; 15899 t.yodhebrew = 0x05d9; 15900 t.yodyodhebrew = 0x05f2; 15901 t.yodyodpatahhebrew = 0xfb1f; 15902 t.yohiragana = 0x3088; 15903 t.yoikorean = 0x3189; 15904 t.yokatakana = 0x30e8; 15905 t.yokatakanahalfwidth = 0xff96; 15906 t.yokorean = 0x315b; 15907 t.yosmallhiragana = 0x3087; 15908 t.yosmallkatakana = 0x30e7; 15909 t.yosmallkatakanahalfwidth = 0xff6e; 15910 t.yotgreek = 0x03f3; 15911 t.yoyaekorean = 0x3188; 15912 t.yoyakorean = 0x3187; 15913 t.yoyakthai = 0x0e22; 15914 t.yoyingthai = 0x0e0d; 15915 t.yparen = 0x24b4; 15916 t.ypogegrammeni = 0x037a; 15917 t.ypogegrammenigreekcmb = 0x0345; 15918 t.yr = 0x01a6; 15919 t.yring = 0x1e99; 15920 t.ysuperior = 0x02b8; 15921 t.ytilde = 0x1ef9; 15922 t.yturned = 0x028e; 15923 t.yuhiragana = 0x3086; 15924 t.yuikorean = 0x318c; 15925 t.yukatakana = 0x30e6; 15926 t.yukatakanahalfwidth = 0xff95; 15927 t.yukorean = 0x3160; 15928 t.yusbigcyrillic = 0x046b; 15929 t.yusbigiotifiedcyrillic = 0x046d; 15930 t.yuslittlecyrillic = 0x0467; 15931 t.yuslittleiotifiedcyrillic = 0x0469; 15932 t.yusmallhiragana = 0x3085; 15933 t.yusmallkatakana = 0x30e5; 15934 t.yusmallkatakanahalfwidth = 0xff6d; 15935 t.yuyekorean = 0x318b; 15936 t.yuyeokorean = 0x318a; 15937 t.yyabengali = 0x09df; 15938 t.yyadeva = 0x095f; 15939 t.z = 0x007a; 15940 t.zaarmenian = 0x0566; 15941 t.zacute = 0x017a; 15942 t.zadeva = 0x095b; 15943 t.zagurmukhi = 0x0a5b; 15944 t.zaharabic = 0x0638; 15945 t.zahfinalarabic = 0xfec6; 15946 t.zahinitialarabic = 0xfec7; 15947 t.zahiragana = 0x3056; 15948 t.zahmedialarabic = 0xfec8; 15949 t.zainarabic = 0x0632; 15950 t.zainfinalarabic = 0xfeb0; 15951 t.zakatakana = 0x30b6; 15952 t.zaqefgadolhebrew = 0x0595; 15953 t.zaqefqatanhebrew = 0x0594; 15954 t.zarqahebrew = 0x0598; 15955 t.zayin = 0x05d6; 15956 t.zayindagesh = 0xfb36; 15957 t.zayindageshhebrew = 0xfb36; 15958 t.zayinhebrew = 0x05d6; 15959 t.zbopomofo = 0x3117; 15960 t.zcaron = 0x017e; 15961 t.zcircle = 0x24e9; 15962 t.zcircumflex = 0x1e91; 15963 t.zcurl = 0x0291; 15964 t.zdot = 0x017c; 15965 t.zdotaccent = 0x017c; 15966 t.zdotbelow = 0x1e93; 15967 t.zecyrillic = 0x0437; 15968 t.zedescendercyrillic = 0x0499; 15969 t.zedieresiscyrillic = 0x04df; 15970 t.zehiragana = 0x305c; 15971 t.zekatakana = 0x30bc; 15972 t.zero = 0x0030; 15973 t.zeroarabic = 0x0660; 15974 t.zerobengali = 0x09e6; 15975 t.zerodeva = 0x0966; 15976 t.zerogujarati = 0x0ae6; 15977 t.zerogurmukhi = 0x0a66; 15978 t.zerohackarabic = 0x0660; 15979 t.zeroinferior = 0x2080; 15980 t.zeromonospace = 0xff10; 15981 t.zerooldstyle = 0xf730; 15982 t.zeropersian = 0x06f0; 15983 t.zerosuperior = 0x2070; 15984 t.zerothai = 0x0e50; 15985 t.zerowidthjoiner = 0xfeff; 15986 t.zerowidthnonjoiner = 0x200c; 15987 t.zerowidthspace = 0x200b; 15988 t.zeta = 0x03b6; 15989 t.zhbopomofo = 0x3113; 15990 t.zhearmenian = 0x056a; 15991 t.zhebrevecyrillic = 0x04c2; 15992 t.zhecyrillic = 0x0436; 15993 t.zhedescendercyrillic = 0x0497; 15994 t.zhedieresiscyrillic = 0x04dd; 15995 t.zihiragana = 0x3058; 15996 t.zikatakana = 0x30b8; 15997 t.zinorhebrew = 0x05ae; 15998 t.zlinebelow = 0x1e95; 15999 t.zmonospace = 0xff5a; 16000 t.zohiragana = 0x305e; 16001 t.zokatakana = 0x30be; 16002 t.zparen = 0x24b5; 16003 t.zretroflexhook = 0x0290; 16004 t.zstroke = 0x01b6; 16005 t.zuhiragana = 0x305a; 16006 t.zukatakana = 0x30ba; 16007 t[".notdef"] = 0x0000; 16008 t.angbracketleftbig = 0x2329; 16009 t.angbracketleftBig = 0x2329; 16010 t.angbracketleftbigg = 0x2329; 16011 t.angbracketleftBigg = 0x2329; 16012 t.angbracketrightBig = 0x232a; 16013 t.angbracketrightbig = 0x232a; 16014 t.angbracketrightBigg = 0x232a; 16015 t.angbracketrightbigg = 0x232a; 16016 t.arrowhookleft = 0x21aa; 16017 t.arrowhookright = 0x21a9; 16018 t.arrowlefttophalf = 0x21bc; 16019 t.arrowleftbothalf = 0x21bd; 16020 t.arrownortheast = 0x2197; 16021 t.arrownorthwest = 0x2196; 16022 t.arrowrighttophalf = 0x21c0; 16023 t.arrowrightbothalf = 0x21c1; 16024 t.arrowsoutheast = 0x2198; 16025 t.arrowsouthwest = 0x2199; 16026 t.backslashbig = 0x2216; 16027 t.backslashBig = 0x2216; 16028 t.backslashBigg = 0x2216; 16029 t.backslashbigg = 0x2216; 16030 t.bardbl = 0x2016; 16031 t.bracehtipdownleft = 0xfe37; 16032 t.bracehtipdownright = 0xfe37; 16033 t.bracehtipupleft = 0xfe38; 16034 t.bracehtipupright = 0xfe38; 16035 t.braceleftBig = 0x007b; 16036 t.braceleftbig = 0x007b; 16037 t.braceleftbigg = 0x007b; 16038 t.braceleftBigg = 0x007b; 16039 t.bracerightBig = 0x007d; 16040 t.bracerightbig = 0x007d; 16041 t.bracerightbigg = 0x007d; 16042 t.bracerightBigg = 0x007d; 16043 t.bracketleftbig = 0x005b; 16044 t.bracketleftBig = 0x005b; 16045 t.bracketleftbigg = 0x005b; 16046 t.bracketleftBigg = 0x005b; 16047 t.bracketrightBig = 0x005d; 16048 t.bracketrightbig = 0x005d; 16049 t.bracketrightbigg = 0x005d; 16050 t.bracketrightBigg = 0x005d; 16051 t.ceilingleftbig = 0x2308; 16052 t.ceilingleftBig = 0x2308; 16053 t.ceilingleftBigg = 0x2308; 16054 t.ceilingleftbigg = 0x2308; 16055 t.ceilingrightbig = 0x2309; 16056 t.ceilingrightBig = 0x2309; 16057 t.ceilingrightbigg = 0x2309; 16058 t.ceilingrightBigg = 0x2309; 16059 t.circledotdisplay = 0x2299; 16060 t.circledottext = 0x2299; 16061 t.circlemultiplydisplay = 0x2297; 16062 t.circlemultiplytext = 0x2297; 16063 t.circleplusdisplay = 0x2295; 16064 t.circleplustext = 0x2295; 16065 t.contintegraldisplay = 0x222e; 16066 t.contintegraltext = 0x222e; 16067 t.coproductdisplay = 0x2210; 16068 t.coproducttext = 0x2210; 16069 t.floorleftBig = 0x230a; 16070 t.floorleftbig = 0x230a; 16071 t.floorleftbigg = 0x230a; 16072 t.floorleftBigg = 0x230a; 16073 t.floorrightbig = 0x230b; 16074 t.floorrightBig = 0x230b; 16075 t.floorrightBigg = 0x230b; 16076 t.floorrightbigg = 0x230b; 16077 t.hatwide = 0x0302; 16078 t.hatwider = 0x0302; 16079 t.hatwidest = 0x0302; 16080 t.intercal = 0x1d40; 16081 t.integraldisplay = 0x222b; 16082 t.integraltext = 0x222b; 16083 t.intersectiondisplay = 0x22c2; 16084 t.intersectiontext = 0x22c2; 16085 t.logicalanddisplay = 0x2227; 16086 t.logicalandtext = 0x2227; 16087 t.logicalordisplay = 0x2228; 16088 t.logicalortext = 0x2228; 16089 t.parenleftBig = 0x0028; 16090 t.parenleftbig = 0x0028; 16091 t.parenleftBigg = 0x0028; 16092 t.parenleftbigg = 0x0028; 16093 t.parenrightBig = 0x0029; 16094 t.parenrightbig = 0x0029; 16095 t.parenrightBigg = 0x0029; 16096 t.parenrightbigg = 0x0029; 16097 t.prime = 0x2032; 16098 t.productdisplay = 0x220f; 16099 t.producttext = 0x220f; 16100 t.radicalbig = 0x221a; 16101 t.radicalBig = 0x221a; 16102 t.radicalBigg = 0x221a; 16103 t.radicalbigg = 0x221a; 16104 t.radicalbt = 0x221a; 16105 t.radicaltp = 0x221a; 16106 t.radicalvertex = 0x221a; 16107 t.slashbig = 0x002f; 16108 t.slashBig = 0x002f; 16109 t.slashBigg = 0x002f; 16110 t.slashbigg = 0x002f; 16111 t.summationdisplay = 0x2211; 16112 t.summationtext = 0x2211; 16113 t.tildewide = 0x02dc; 16114 t.tildewider = 0x02dc; 16115 t.tildewidest = 0x02dc; 16116 t.uniondisplay = 0x22c3; 16117 t.unionmultidisplay = 0x228e; 16118 t.unionmultitext = 0x228e; 16119 t.unionsqdisplay = 0x2294; 16120 t.unionsqtext = 0x2294; 16121 t.uniontext = 0x22c3; 16122 t.vextenddouble = 0x2225; 16123 t.vextendsingle = 0x2223; 16124}); 16125const getDingbatsGlyphsUnicode = getLookupTableFactory(function (t) { 16126 t.space = 0x0020; 16127 t.a1 = 0x2701; 16128 t.a2 = 0x2702; 16129 t.a202 = 0x2703; 16130 t.a3 = 0x2704; 16131 t.a4 = 0x260e; 16132 t.a5 = 0x2706; 16133 t.a119 = 0x2707; 16134 t.a118 = 0x2708; 16135 t.a117 = 0x2709; 16136 t.a11 = 0x261b; 16137 t.a12 = 0x261e; 16138 t.a13 = 0x270c; 16139 t.a14 = 0x270d; 16140 t.a15 = 0x270e; 16141 t.a16 = 0x270f; 16142 t.a105 = 0x2710; 16143 t.a17 = 0x2711; 16144 t.a18 = 0x2712; 16145 t.a19 = 0x2713; 16146 t.a20 = 0x2714; 16147 t.a21 = 0x2715; 16148 t.a22 = 0x2716; 16149 t.a23 = 0x2717; 16150 t.a24 = 0x2718; 16151 t.a25 = 0x2719; 16152 t.a26 = 0x271a; 16153 t.a27 = 0x271b; 16154 t.a28 = 0x271c; 16155 t.a6 = 0x271d; 16156 t.a7 = 0x271e; 16157 t.a8 = 0x271f; 16158 t.a9 = 0x2720; 16159 t.a10 = 0x2721; 16160 t.a29 = 0x2722; 16161 t.a30 = 0x2723; 16162 t.a31 = 0x2724; 16163 t.a32 = 0x2725; 16164 t.a33 = 0x2726; 16165 t.a34 = 0x2727; 16166 t.a35 = 0x2605; 16167 t.a36 = 0x2729; 16168 t.a37 = 0x272a; 16169 t.a38 = 0x272b; 16170 t.a39 = 0x272c; 16171 t.a40 = 0x272d; 16172 t.a41 = 0x272e; 16173 t.a42 = 0x272f; 16174 t.a43 = 0x2730; 16175 t.a44 = 0x2731; 16176 t.a45 = 0x2732; 16177 t.a46 = 0x2733; 16178 t.a47 = 0x2734; 16179 t.a48 = 0x2735; 16180 t.a49 = 0x2736; 16181 t.a50 = 0x2737; 16182 t.a51 = 0x2738; 16183 t.a52 = 0x2739; 16184 t.a53 = 0x273a; 16185 t.a54 = 0x273b; 16186 t.a55 = 0x273c; 16187 t.a56 = 0x273d; 16188 t.a57 = 0x273e; 16189 t.a58 = 0x273f; 16190 t.a59 = 0x2740; 16191 t.a60 = 0x2741; 16192 t.a61 = 0x2742; 16193 t.a62 = 0x2743; 16194 t.a63 = 0x2744; 16195 t.a64 = 0x2745; 16196 t.a65 = 0x2746; 16197 t.a66 = 0x2747; 16198 t.a67 = 0x2748; 16199 t.a68 = 0x2749; 16200 t.a69 = 0x274a; 16201 t.a70 = 0x274b; 16202 t.a71 = 0x25cf; 16203 t.a72 = 0x274d; 16204 t.a73 = 0x25a0; 16205 t.a74 = 0x274f; 16206 t.a203 = 0x2750; 16207 t.a75 = 0x2751; 16208 t.a204 = 0x2752; 16209 t.a76 = 0x25b2; 16210 t.a77 = 0x25bc; 16211 t.a78 = 0x25c6; 16212 t.a79 = 0x2756; 16213 t.a81 = 0x25d7; 16214 t.a82 = 0x2758; 16215 t.a83 = 0x2759; 16216 t.a84 = 0x275a; 16217 t.a97 = 0x275b; 16218 t.a98 = 0x275c; 16219 t.a99 = 0x275d; 16220 t.a100 = 0x275e; 16221 t.a101 = 0x2761; 16222 t.a102 = 0x2762; 16223 t.a103 = 0x2763; 16224 t.a104 = 0x2764; 16225 t.a106 = 0x2765; 16226 t.a107 = 0x2766; 16227 t.a108 = 0x2767; 16228 t.a112 = 0x2663; 16229 t.a111 = 0x2666; 16230 t.a110 = 0x2665; 16231 t.a109 = 0x2660; 16232 t.a120 = 0x2460; 16233 t.a121 = 0x2461; 16234 t.a122 = 0x2462; 16235 t.a123 = 0x2463; 16236 t.a124 = 0x2464; 16237 t.a125 = 0x2465; 16238 t.a126 = 0x2466; 16239 t.a127 = 0x2467; 16240 t.a128 = 0x2468; 16241 t.a129 = 0x2469; 16242 t.a130 = 0x2776; 16243 t.a131 = 0x2777; 16244 t.a132 = 0x2778; 16245 t.a133 = 0x2779; 16246 t.a134 = 0x277a; 16247 t.a135 = 0x277b; 16248 t.a136 = 0x277c; 16249 t.a137 = 0x277d; 16250 t.a138 = 0x277e; 16251 t.a139 = 0x277f; 16252 t.a140 = 0x2780; 16253 t.a141 = 0x2781; 16254 t.a142 = 0x2782; 16255 t.a143 = 0x2783; 16256 t.a144 = 0x2784; 16257 t.a145 = 0x2785; 16258 t.a146 = 0x2786; 16259 t.a147 = 0x2787; 16260 t.a148 = 0x2788; 16261 t.a149 = 0x2789; 16262 t.a150 = 0x278a; 16263 t.a151 = 0x278b; 16264 t.a152 = 0x278c; 16265 t.a153 = 0x278d; 16266 t.a154 = 0x278e; 16267 t.a155 = 0x278f; 16268 t.a156 = 0x2790; 16269 t.a157 = 0x2791; 16270 t.a158 = 0x2792; 16271 t.a159 = 0x2793; 16272 t.a160 = 0x2794; 16273 t.a161 = 0x2192; 16274 t.a163 = 0x2194; 16275 t.a164 = 0x2195; 16276 t.a196 = 0x2798; 16277 t.a165 = 0x2799; 16278 t.a192 = 0x279a; 16279 t.a166 = 0x279b; 16280 t.a167 = 0x279c; 16281 t.a168 = 0x279d; 16282 t.a169 = 0x279e; 16283 t.a170 = 0x279f; 16284 t.a171 = 0x27a0; 16285 t.a172 = 0x27a1; 16286 t.a173 = 0x27a2; 16287 t.a162 = 0x27a3; 16288 t.a174 = 0x27a4; 16289 t.a175 = 0x27a5; 16290 t.a176 = 0x27a6; 16291 t.a177 = 0x27a7; 16292 t.a178 = 0x27a8; 16293 t.a179 = 0x27a9; 16294 t.a193 = 0x27aa; 16295 t.a180 = 0x27ab; 16296 t.a199 = 0x27ac; 16297 t.a181 = 0x27ad; 16298 t.a200 = 0x27ae; 16299 t.a182 = 0x27af; 16300 t.a201 = 0x27b1; 16301 t.a183 = 0x27b2; 16302 t.a184 = 0x27b3; 16303 t.a197 = 0x27b4; 16304 t.a185 = 0x27b5; 16305 t.a194 = 0x27b6; 16306 t.a198 = 0x27b7; 16307 t.a186 = 0x27b8; 16308 t.a195 = 0x27b9; 16309 t.a187 = 0x27ba; 16310 t.a188 = 0x27bb; 16311 t.a189 = 0x27bc; 16312 t.a190 = 0x27bd; 16313 t.a191 = 0x27be; 16314 t.a89 = 0x2768; 16315 t.a90 = 0x2769; 16316 t.a93 = 0x276a; 16317 t.a94 = 0x276b; 16318 t.a91 = 0x276c; 16319 t.a92 = 0x276d; 16320 t.a205 = 0x276e; 16321 t.a85 = 0x276f; 16322 t.a206 = 0x2770; 16323 t.a86 = 0x2771; 16324 t.a87 = 0x2772; 16325 t.a88 = 0x2773; 16326 t.a95 = 0x2774; 16327 t.a96 = 0x2775; 16328 t[".notdef"] = 0x0000; 16329}); 16330 16331;// ./src/core/unicode.js 16332 16333const getSpecialPUASymbols = getLookupTableFactory(function (t) { 16334 t[63721] = 0x00a9; 16335 t[63193] = 0x00a9; 16336 t[63720] = 0x00ae; 16337 t[63194] = 0x00ae; 16338 t[63722] = 0x2122; 16339 t[63195] = 0x2122; 16340 t[637
vendor: 11,451 bytes, lines 16340-16556
1634029] = 0x23a7; 16341 t[63730] = 0x23a8; 16342 t[63731] = 0x23a9; 16343 t[63740] = 0x23ab; 16344 t[63741] = 0x23ac; 16345 t[63742] = 0x23ad; 16346 t[63726] = 0x23a1; 16347 t[63727] = 0x23a2; 16348 t[63728] = 0x23a3; 16349 t[63737] = 0x23a4; 16350 t[63738] = 0x23a5; 16351 t[63739] = 0x23a6; 16352 t[63723] = 0x239b; 16353 t[63724] = 0x239c; 16354 t[63725] = 0x239d; 16355 t[63734] = 0x239e; 16356 t[63735] = 0x239f; 16357 t[63736] = 0x23a0; 16358}); 16359function mapSpecialUnicodeValues(code) { 16360 if (code >= 0xfff0 && code <= 0xffff) { 16361 return 0; 16362 } else if (code >= 0xf600 && code <= 0xf8ff) { 16363 return getSpecialPUASymbols()[code] || code; 16364 } else if (code === 0x00ad) { 16365 return 0x002d; 16366 } 16367 return code; 16368} 16369function getUnicodeForGlyph(name, glyphsUnicodeMap) { 16370 let unicode = glyphsUnicodeMap[name]; 16371 if (unicode !== undefined) { 16372 return unicode; 16373 } 16374 if (!name) { 16375 return -1; 16376 } 16377 if (name[0] === "u") { 16378 const nameLen = name.length; 16379 let hexStr; 16380 if (nameLen === 7 && name[1] === "n" && name[2] === "i") { 16381 hexStr = name.substring(3); 16382 } else if (nameLen >= 5 && nameLen <= 7) { 16383 hexStr = name.substring(1); 16384 } else { 16385 return -1; 16386 } 16387 if (hexStr === hexStr.toUpperCase()) { 16388 unicode = parseInt(hexStr, 16); 16389 if (unicode >= 0) { 16390 return unicode; 16391 } 16392 } 16393 } 16394 return -1; 16395} 16396const UnicodeRanges = [[0x0000, 0x007f], [0x0080, 0x00ff], [0x0100, 0x017f], [0x0180, 0x024f], [0x0250, 0x02af, 0x1d00, 0x1d7f, 0x1d80, 0x1dbf], [0x02b0, 0x02ff, 0xa700, 0xa71f], [0x0300, 0x036f, 0x1dc0, 0x1dff], [0x0370, 0x03ff], [0x2c80, 0x2cff], [0x0400, 0x04ff, 0x0500, 0x052f, 0x2de0, 0x2dff, 0xa640, 0xa69f], [0x0530, 0x058f], [0x0590, 0x05ff], [0xa500, 0xa63f], [0x0600, 0x06ff, 0x0750, 0x077f], [0x07c0, 0x07ff], [0x0900, 0x097f], [0x0980, 0x09ff], [0x0a00, 0x0a7f], [0x0a80, 0x0aff], [0x0b00, 0x0b7f], [0x0b80, 0x0bff], [0x0c00, 0x0c7f], [0x0c80, 0x0cff], [0x0d00, 0x0d7f], [0x0e00, 0x0e7f], [0x0e80, 0x0eff], [0x10a0, 0x10ff, 0x2d00, 0x2d2f], [0x1b00, 0x1b7f], [0x1100, 0x11ff], [0x1e00, 0x1eff, 0x2c60, 0x2c7f, 0xa720, 0xa7ff], [0x1f00, 0x1fff], [0x2000, 0x206f, 0x2e00, 0x2e7f], [0x2070, 0x209f], [0x20a0, 0x20cf], [0x20d0, 0x20ff], [0x2100, 0x214f], [0x2150, 0x218f], [0x2190, 0x21ff, 0x27f0, 0x27ff, 0x2900, 0x297f, 0x2b00, 0x2bff], [0x2200, 0x22ff, 0x2a00, 0x2aff, 0x27c0, 0x27ef, 0x2980, 0x29ff], [0x2300, 0x23ff], [0x2400, 0x243f], [0x2440, 0x245f], [0x2460, 0x24ff], [0x2500, 0x257f], [0x2580, 0x259f], [0x25a0, 0x25ff], [0x2600, 0x26ff], [0x2700, 0x27bf], [0x3000, 0x303f], [0x3040, 0x309f], [0x30a0, 0x30ff, 0x31f0, 0x31ff], [0x3100, 0x312f, 0x31a0, 0x31bf], [0x3130, 0x318f], [0xa840, 0xa87f], [0x3200, 0x32ff], [0x3300, 0x33ff], [0xac00, 0xd7af], [0xd800, 0xdfff], [0x10900, 0x1091f], [0x4e00, 0x9fff, 0x2e80, 0x2eff, 0x2f00, 0x2fdf, 0x2ff0, 0x2fff, 0x3400, 0x4dbf, 0x20000, 0x2a6df, 0x3190, 0x319f], [0xe000, 0xf8ff], [0x31c0, 0x31ef, 0xf900, 0xfaff, 0x2f800, 0x2fa1f], [0xfb00, 0xfb4f], [0xfb50, 0xfdff], [0xfe20, 0xfe2f], [0xfe10, 0xfe1f], [0xfe50, 0xfe6f], [0xfe70, 0xfeff], [0xff00, 0xffef], [0xfff0, 0xffff], [0x0f00, 0x0fff], [0x0700, 0x074f], [0x0780, 0x07bf], [0x0d80, 0x0dff], [0x1000, 0x109f], [0x1200, 0x137f, 0x1380, 0x139f, 0x2d80, 0x2ddf], [0x13a0, 0x13ff], [0x1400, 0x167f], [0x1680, 0x169f], [0x16a0, 0x16ff], [0x1780, 0x17ff], [0x1800, 0x18af], [0x2800, 0x28ff], [0xa000, 0xa48f], [0x1700, 0x171f, 0x1720, 0x173f, 0x1740, 0x175f, 0x1760, 0x177f], [0x10300, 0x1032f], [0x10330, 0x1034f], [0x10400, 0x1044f], [0x1d000, 0x1d0ff, 0x1d100, 0x1d1ff, 0x1d200, 0x1d24f], [0x1d400, 0x1d7ff], [0xff000, 0xffffd], [0xfe00, 0xfe0f, 0xe0100, 0xe01ef], [0xe0000, 0xe007f], [0x1900, 0x194f], [0x1950, 0x197f], [0x1980, 0x19df], [0x1a00, 0x1a1f], [0x2c00, 0x2c5f], [0x2d30, 0x2d7f], [0x4dc0, 0x4dff], [0xa800, 0xa82f], [0x10000, 0x1007f, 0x10080, 0x100ff, 0x10100, 0x1013f], [0x10140, 0x1018f], [0x10380, 0x1039f], [0x103a0, 0x103df], [0x10450, 0x1047f], [0x10480, 0x104af], [0x10800, 0x1083f], [0x10a00, 0x10a5f], [0x1d300, 0x1d35f], [0x12000, 0x123ff, 0x12400, 0x1247f], [0x1d360, 0x1d37f], [0x1b80, 0x1bbf], [0x1c00, 0x1c4f], [0x1c50, 0x1c7f], [0xa880, 0xa8df], [0xa900, 0xa92f], [0xa930, 0xa95f], [0xaa00, 0xaa5f], [0x10190, 0x101cf], [0x101d0, 0x101ff], [0x102a0, 0x102df, 0x10280, 0x1029f, 0x10920, 0x1093f], [0x1f030, 0x1f09f, 0x1f000, 0x1f02f]]; 16397function getUnicodeRangeFor(value, lastPosition = -1) { 16398 if (lastPosition !== -1) { 16399 const range = UnicodeRanges[lastPosition]; 16400 for (let i = 0, ii = range.length; i < ii; i += 2) { 16401 if (value >= range[i] && value <= range[i + 1]) { 16402 return lastPosition; 16403 } 16404 } 16405 } 16406 for (let i = 0, ii = UnicodeRanges.length; i < ii; i++) { 16407 const range = UnicodeRanges[i]; 16408 for (let j = 0, jj = range.length; j < jj; j += 2) { 16409 if (value >= range[j] && value <= range[j + 1]) { 16410 return i; 16411 } 16412 } 16413 } 16414 return -1; 16415} 16416const SpecialCharRegExp = new RegExp("^(\\s)|(\\p{Mn})|(\\p{Cf})$", "u"); 16417const CategoryCache = new Map(); 16418function getCharUnicodeCategory(char) { 16419 const cachedCategory = CategoryCache.get(char); 16420 if (cachedCategory) { 16421 return cachedCategory; 16422 } 16423 const groups = char.match(SpecialCharRegExp); 16424 const category = { 16425 isWhitespace: !!groups?.[1], 16426 isZeroWidthDiacritic: !!groups?.[2], 16427 isInvisibleFormatMark: !!groups?.[3] 16428 }; 16429 CategoryCache.set(char, category); 16430 return category; 16431} 16432function clearUnicodeCaches() { 16433 CategoryCache.clear(); 16434} 16435 16436;// ./src/core/fonts_utils.js 16437 16438 16439 16440 16441 16442const SEAC_ANALYSIS_ENABLED = true; 16443const FontFlags = { 16444 FixedPitch: 1, 16445 Serif: 2, 16446 Symbolic: 4, 16447 Script: 8, 16448 Nonsymbolic: 32, 16449 Italic: 64, 16450 AllCap: 65536, 16451 SmallCap: 131072, 16452 ForceBold: 262144 16453}; 16454const MacStandardGlyphOrdering = [".notdef", ".null", "nonmarkingreturn", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quotesingle", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "grave", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "braceleft", "bar", "braceright", "asciitilde", "Adieresis", "Aring", "Ccedilla", "Eacute", "Ntilde", "Odieresis", "Udieresis", "aacute", "agrave", "acircumflex", "adieresis", "atilde", "aring", "ccedilla", "eacute", "egrave", "ecircumflex", "edieresis", "iacute", "igrave", "icircumflex", "idieresis", "ntilde", "oacute", "ograve", "ocircumflex", "odieresis", "otilde", "uacute", "ugrave", "ucircumflex", "udieresis", "dagger", "degree", "cent", "sterling", "section", "bullet", "paragraph", "germandbls", "registered", "copyright", "trademark", "acute", "dieresis", "notequal", "AE", "Oslash", "infinity", "plusminus", "lessequal", "greaterequal", "yen", "mu", "partialdiff", "summation", "product", "pi", "integral", "ordfeminine", "ordmasculine", "Omega", "ae", "oslash", "questiondown", "exclamdown", "logicalnot", "radical", "florin", "approxequal", "Delta", "guillemotleft", "guillemotright", "ellipsis", "nonbreakingspace", "Agrave", "Atilde", "Otilde", "OE", "oe", "endash", "emdash", "quotedblleft", "quotedblright", "quoteleft", "quoteright", "divide", "lozenge", "ydieresis", "Ydieresis", "fraction", "currency", "guilsinglleft", "guilsinglright", "fi", "fl", "daggerdbl", "periodcentered", "quotesinglbase", "quotedblbase", "perthousand", "Acircumflex", "Ecircumflex", "Aacute", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", "Igrave", "Oacute", "Ocircumflex", "apple", "Ograve", "Uacute", "Ucircumflex", "Ugrave", "dotlessi", "circumflex", "tilde", "macron", "breve", "dotaccent", "ring", "cedilla", "hungarumlaut", "ogonek", "caron", "Lslash", "lslash", "Scaron", "scaron", "Zcaron", "zcaron", "brokenbar", "Eth", "eth", "Yacute", "yacute", "Thorn", "thorn", "minus", "multiply", "onesuperior", "twosuperior", "threesuperior", "onehalf", "onequarter", "threequarters", "franc", "Gbreve", "gbreve", "Idotaccent", "Scedilla", "scedilla", "Cacute", "cacute", "Ccaron", "ccaron", "dcroat"]; 16455function recoverGlyphName(name, glyphsUnicodeMap) { 16456 if (glyphsUnicodeMap[name] !== undefined) { 16457 return name; 16458 } 16459 const unicode = getUnicodeForGlyph(name, glyphsUnicodeMap); 16460 if (unicode !== -1) { 16461 for (const key in glyphsUnicodeMap) { 16462 if (glyphsUnicodeMap[key] === unicode) { 16463 return key; 16464 } 16465 } 16466 } 16467 info("Unable to recover a standard glyph name for: " + name); 16468 return name; 16469} 16470function type1FontGlyphMapping(properties, builtInEncoding, glyphNames) { 16471 const charCodeToGlyphId = Object.create(null); 16472 let glyphId, charCode, baseEncoding; 16473 const isSymbolicFont = !!(properties.flags & FontFlags.Symbolic); 16474 if (properties.isInternalFont) { 16475 baseEncoding = builtInEncoding; 16476 for (charCode = 0; charCode < baseEncoding.length; charCode++) { 16477 glyphId = glyphNames.indexOf(baseEncoding[charCode]); 16478 charCodeToGlyphId[charCode] = glyphId >= 0 ? glyphId : 0; 16479 } 16480 } else if (properties.baseEncodingName) { 16481 baseEncoding = getEncoding(properties.baseEncodingName); 16482 for (charCode = 0; charCode < baseEncoding.length; charCode++) { 16483 glyphId = glyphNames.indexOf(baseEncoding[charCode]); 16484 charCodeToGlyphId[charCode] = glyphId >= 0 ? glyphId : 0; 16485 } 16486 } else if (isSymbolicFont) { 16487 for (charCode in builtInEncoding) { 16488 charCodeToGlyphId[charCode] = builtInEncoding[charCode]; 16489 } 16490 } else { 16491 baseEncoding = StandardEncoding; 16492 for (charCode = 0; charCode < baseEncoding.length; charCode++) { 16493 glyphId = glyphNames.indexOf(baseEncoding[charCode]); 16494 charCodeToGlyphId[charCode] = glyphId >= 0 ? glyphId : 0; 16495 } 16496 } 16497 const differences = properties.differences; 16498 let glyphsUnicodeMap; 16499 if (differences) { 16500 for (charCode in differences) { 16501 const glyphName = differences[charCode]; 16502 glyphId = glyphNames.indexOf(glyphName); 16503 if (glyphId === -1) { 16504 if (!glyphsUnicodeMap) { 16505 glyphsUnicodeMap = getGlyphsUnicode(); 16506 } 16507 const standardGlyphName = recoverGlyphName(glyphName, glyphsUnicodeMap); 16508 if (standardGlyphName !== glyphName) { 16509 glyphId = glyphNames.indexOf(standardGlyphName); 16510 } 16511 } 16512 charCodeToGlyphId[charCode] = glyphId >= 0 ? glyphId : 0; 16513 } 16514 } 16515 return charCodeToGlyphId; 16516} 16517function normalizeFontName(name) { 16518 return name.replaceAll(/[,_]/g, "-").replaceAll(/\s/g, ""); 16519} 16520const getVerticalPresentationForm = getLookupTableFactory(t => { 16521 t[0x2013] = 0xfe32; 16522 t[0x2014] = 0xfe31; 16523 t[0x2025] = 0xfe30; 16524 t[0x2026] = 0xfe19; 16525 t[0x3001] = 0xfe11; 16526 t[0x3002] = 0xfe12; 16527 t[0x3008] = 0xfe3f; 16528 t[0x3009] = 0xfe40; 16529 t[0x300a] = 0xfe3d; 16530 t[0x300b] = 0xfe3e; 16531 t[0x300c] = 0xfe41; 16532 t[0x300d] = 0xfe42; 16533 t[0x300e] = 0xfe43; 16534 t[0x300f] = 0xfe44; 16535 t[0x3010] = 0xfe3b; 16536 t[0x3011] = 0xfe3c; 16537 t[0x3014] = 0xfe39; 16538 t[0x3015] = 0xfe3a; 16539 t[0x3016] = 0xfe17; 16540 t[0x3017] = 0xfe18; 16541 t[0xfe4f] = 0xfe34; 16542 t[0xff01] = 0xfe15; 16543 t[0xff08] = 0xfe35; 16544 t[0xff09] = 0xfe36; 16545 t[0xff0c] = 0xfe10; 16546 t[0xff1a] = 0xfe13; 16547 t[0xff1b] = 0xfe14; 16548 t[0xff1f] = 0xfe16; 16549 t[0xff3b] = 0xfe47; 16550 t[0xff3d] = 0xfe48; 16551 t[0xff3f] = 0xfe33; 16552 t[0xff5b] = 0xfe37; 16553 t[0xff5d] = 0xfe38; 16554}); 16555 16556;// ./src/core/standard_fonts.js
vendor: 2,381 bytes, lines 16556-16613
16556 16557 16558 16559const getStdFontMap = getLookupTableFactory(function (t) { 16560 t["Times-Roman"] = "Times-Roman"; 16561 t.Helvetica = "Helvetica"; 16562 t.Courier = "Courier"; 16563 t.Symbol = "Symbol"; 16564 t["Times-Bold"] = "Times-Bold"; 16565 t["Helvetica-Bold"] = "Helvetica-Bold"; 16566 t["Courier-Bold"] = "Courier-Bold"; 16567 t.ZapfDingbats = "ZapfDingbats"; 16568 t["Times-Italic"] = "Times-Italic"; 16569 t["Helvetica-Oblique"] = "Helvetica-Oblique"; 16570 t["Courier-Oblique"] = "Courier-Oblique"; 16571 t["Times-BoldItalic"] = "Times-BoldItalic"; 16572 t["Helvetica-BoldOblique"] = "Helvetica-BoldOblique"; 16573 t["Courier-BoldOblique"] = "Courier-BoldOblique"; 16574 t.ArialNarrow = "Helvetica"; 16575 t["ArialNarrow-Bold"] = "Helvetica-Bold"; 16576 t["ArialNarrow-BoldItalic"] = "Helvetica-BoldOblique"; 16577 t["ArialNarrow-Italic"] = "Helvetica-Oblique"; 16578 t.ArialBlack = "Helvetica"; 16579 t["ArialBlack-Bold"] = "Helvetica-Bold"; 16580 t["ArialBlack-BoldItalic"] = "Helvetica-BoldOblique"; 16581 t["ArialBlack-Italic"] = "Helvetica-Oblique"; 16582 t["Arial-Black"] = "Helvetica"; 16583 t["Arial-Black-Bold"] = "Helvetica-Bold"; 16584 t["Arial-Black-BoldItalic"] = "Helvetica-BoldOblique"; 16585 t["Arial-Black-Italic"] = "Helvetica-Oblique"; 16586 t.Arial = "Helvetica"; 16587 t["Arial-Bold"] = "Helvetica-Bold"; 16588 t["Arial-BoldItalic"] = "Helvetica-BoldOblique"; 16589 t["Arial-Italic"] = "Helvetica-Oblique"; 16590 t.ArialMT = "Helvetica"; 16591 t["Arial-BoldItalicMT"] = "Helvetica-BoldOblique"; 16592 t["Arial-BoldMT"] = "Helvetica-Bold"; 16593 t["Arial-ItalicMT"] = "Helvetica-Oblique"; 16594 t["Arial-BoldItalicMT-BoldItalic"] = "Helvetica-BoldOblique"; 16595 t["Arial-BoldMT-Bold"] = "Helvetica-Bold"; 16596 t["Arial-ItalicMT-Italic"] = "Helvetica-Oblique"; 16597 t.ArialUnicodeMS = "Helvetica"; 16598 t["ArialUnicodeMS-Bold"] = "Helvetica-Bold"; 16599 t["ArialUnicodeMS-BoldItalic"] = "Helvetica-BoldOblique"; 16600 t["ArialUnicodeMS-Italic"] = "Helvetica-Oblique"; 16601 t["Courier-BoldItalic"] = "Courier-BoldOblique"; 16602 t["Courier-Italic"] = "Courier-Oblique"; 16603 t.CourierNew = "Courier"; 16604 t["CourierNew-Bold"] = "Courier-Bold"; 16605 t["CourierNew-BoldItalic"] = "Courier-BoldOblique"; 16606 t["CourierNew-Italic"] = "Courier-Oblique"; 16607 t["CourierNewPS-BoldItalicMT"] = "Courier-BoldOblique"; 16608 t["CourierNewPS-BoldMT"] = "Courier-Bold"; 16609 t["CourierNewPS-ItalicMT"] = "Courier-Oblique"; 16610 t.CourierNewPSMT = "Courier"; 16611 t["Helvetica-BoldItalic"] = "Helvetica-BoldOblique"; 16612 t["Helvetica-Italic"] = "Helvetica-Oblique"; 16613 t["
vendor: 16,303 bytes, lines 16613-17387
16613Symbol-Bold"] = "Symbol"; 16614 t["Symbol-BoldItalic"] = "Symbol"; 16615 t["Symbol-Italic"] = "Symbol"; 16616 t.TimesNewRoman = "Times-Roman"; 16617 t["TimesNewRoman-Bold"] = "Times-Bold"; 16618 t["TimesNewRoman-BoldItalic"] = "Times-BoldItalic"; 16619 t["TimesNewRoman-Italic"] = "Times-Italic"; 16620 t.TimesNewRomanPS = "Times-Roman"; 16621 t["TimesNewRomanPS-Bold"] = "Times-Bold"; 16622 t["TimesNewRomanPS-BoldItalic"] = "Times-BoldItalic"; 16623 t["TimesNewRomanPS-BoldItalicMT"] = "Times-BoldItalic"; 16624 t["TimesNewRomanPS-BoldMT"] = "Times-Bold"; 16625 t["TimesNewRomanPS-Italic"] = "Times-Italic"; 16626 t["TimesNewRomanPS-ItalicMT"] = "Times-Italic"; 16627 t.TimesNewRomanPSMT = "Times-Roman"; 16628 t["TimesNewRomanPSMT-Bold"] = "Times-Bold"; 16629 t["TimesNewRomanPSMT-BoldItalic"] = "Times-BoldItalic"; 16630 t["TimesNewRomanPSMT-Italic"] = "Times-Italic"; 16631}); 16632const getFontNameToFileMap = getLookupTableFactory(function (t) { 16633 t.Courier = "FoxitFixed.pfb"; 16634 t["Courier-Bold"] = "FoxitFixedBold.pfb"; 16635 t["Courier-BoldOblique"] = "FoxitFixedBoldItalic.pfb"; 16636 t["Courier-Oblique"] = "FoxitFixedItalic.pfb"; 16637 t.Helvetica = "LiberationSans-Regular.ttf"; 16638 t["Helvetica-Bold"] = "LiberationSans-Bold.ttf"; 16639 t["Helvetica-BoldOblique"] = "LiberationSans-BoldItalic.ttf"; 16640 t["Helvetica-Oblique"] = "LiberationSans-Italic.ttf"; 16641 t["Times-Roman"] = "FoxitSerif.pfb"; 16642 t["Times-Bold"] = "FoxitSerifBold.pfb"; 16643 t["Times-BoldItalic"] = "FoxitSerifBoldItalic.pfb"; 16644 t["Times-Italic"] = "FoxitSerifItalic.pfb"; 16645 t.Symbol = "FoxitSymbol.pfb"; 16646 t.ZapfDingbats = "FoxitDingbats.pfb"; 16647 t["LiberationSans-Regular"] = "LiberationSans-Regular.ttf"; 16648 t["LiberationSans-Bold"] = "LiberationSans-Bold.ttf"; 16649 t["LiberationSans-Italic"] = "LiberationSans-Italic.ttf"; 16650 t["LiberationSans-BoldItalic"] = "LiberationSans-BoldItalic.ttf"; 16651}); 16652const getNonStdFontMap = getLookupTableFactory(function (t) { 16653 t.Calibri = "Helvetica"; 16654 t["Calibri-Bold"] = "Helvetica-Bold"; 16655 t["Calibri-BoldItalic"] = "Helvetica-BoldOblique"; 16656 t["Calibri-Italic"] = "Helvetica-Oblique"; 16657 t.CenturyGothic = "Helvetica"; 16658 t["CenturyGothic-Bold"] = "Helvetica-Bold"; 16659 t["CenturyGothic-BoldItalic"] = "Helvetica-BoldOblique"; 16660 t["CenturyGothic-Italic"] = "Helvetica-Oblique"; 16661 t.ComicSansMS = "Comic Sans MS"; 16662 t["ComicSansMS-Bold"] = "Comic Sans MS-Bold"; 16663 t["ComicSansMS-BoldItalic"] = "Comic Sans MS-BoldItalic"; 16664 t["ComicSansMS-Italic"] = "Comic Sans MS-Italic"; 16665 t.GillSansMT = "Helvetica"; 16666 t["GillSansMT-Bold"] = "Helvetica-Bold"; 16667 t["GillSansMT-BoldItalic"] = "Helvetica-BoldOblique"; 16668 t["GillSansMT-Italic"] = "Helvetica-Oblique"; 16669 t.Impact = "Helvetica"; 16670 t["ItcSymbol-Bold"] = "Helvetica-Bold"; 16671 t["ItcSymbol-BoldItalic"] = "Helvetica-BoldOblique"; 16672 t["ItcSymbol-Book"] = "Helvetica"; 16673 t["ItcSymbol-BookItalic"] = "Helvetica-Oblique"; 16674 t["ItcSymbol-Medium"] = "Helvetica"; 16675 t["ItcSymbol-MediumItalic"] = "Helvetica-Oblique"; 16676 t.LucidaConsole = "Courier"; 16677 t["LucidaConsole-Bold"] = "Courier-Bold"; 16678 t["LucidaConsole-BoldItalic"] = "Courier-BoldOblique"; 16679 t["LucidaConsole-Italic"] = "Courier-Oblique"; 16680 t["LucidaSans-Demi"] = "Helvetica-Bold"; 16681 t["MS-Gothic"] = "MS Gothic"; 16682 t["MS-Gothic-Bold"] = "MS Gothic-Bold"; 16683 t["MS-Gothic-BoldItalic"] = "MS Gothic-BoldItalic"; 16684 t["MS-Gothic-Italic"] = "MS Gothic-Italic"; 16685 t["MS-Mincho"] = "MS Mincho"; 16686 t["MS-Mincho-Bold"] = "MS Mincho-Bold"; 16687 t["MS-Mincho-BoldItalic"] = "MS Mincho-BoldItalic"; 16688 t["MS-Mincho-Italic"] = "MS Mincho-Italic"; 16689 t["MS-PGothic"] = "MS PGothic"; 16690 t["MS-PGothic-Bold"] = "MS PGothic-Bold"; 16691 t["MS-PGothic-BoldItalic"] = "MS PGothic-BoldItalic"; 16692 t["MS-PGothic-Italic"] = "MS PGothic-Italic"; 16693 t["MS-PMincho"] = "MS PMincho"; 16694 t["MS-PMincho-Bold"] = "MS PMincho-Bold"; 16695 t["MS-PMincho-BoldItalic"] = "MS PMincho-BoldItalic"; 16696 t["MS-PMincho-Italic"] = "MS PMincho-Italic"; 16697 t.NuptialScript = "Times-Italic"; 16698 t.SegoeUISymbol = "Helvetica"; 16699}); 16700const getSerifFonts = getLookupTableFactory(function (t) { 16701 t["Adobe Jenson"] = true; 16702 t["Adobe Text"] = true; 16703 t.Albertus = true; 16704 t.Aldus = true; 16705 t.Alexandria = true; 16706 t.Algerian = true; 16707 t["American Typewriter"] = true; 16708 t.Antiqua = true; 16709 t.Apex = true; 16710 t.Arno = true; 16711 t.Aster = true; 16712 t.Aurora = true; 16713 t.Baskerville = true; 16714 t.Bell = true; 16715 t.Bembo = true; 16716 t["Bembo Schoolbook"] = true; 16717 t.Benguiat = true; 16718 t["Berkeley Old Style"] = true; 16719 t["Bernhard Modern"] = true; 16720 t["Berthold City"] = true; 16721 t.Bodoni = true; 16722 t["Bauer Bodoni"] = true; 16723 t["Book Antiqua"] = true; 16724 t.Bookman = true; 16725 t["Bordeaux Roman"] = true; 16726 t["Californian FB"] = true; 16727 t.Calisto = true; 16728 t.Calvert = true; 16729 t.Capitals = true; 16730 t.Cambria = true; 16731 t.Cartier = true; 16732 t.Caslon = true; 16733 t.Catull = true; 16734 t.Centaur = true; 16735 t["Century Old Style"] = true; 16736 t["Century Schoolbook"] = true; 16737 t.Chaparral = true; 16738 t["Charis SIL"] = true; 16739 t.Cheltenham = true; 16740 t["Cholla Slab"] = true; 16741 t.Clarendon = true; 16742 t.Clearface = true; 16743 t.Cochin = true; 16744 t.Colonna = true; 16745 t["Computer Modern"] = true; 16746 t["Concrete Roman"] = true; 16747 t.Constantia = true; 16748 t["Cooper Black"] = true; 16749 t.Corona = true; 16750 t.Ecotype = true; 16751 t.Egyptienne = true; 16752 t.Elephant = true; 16753 t.Excelsior = true; 16754 t.Fairfield = true; 16755 t["FF Scala"] = true; 16756 t.Folkard = true; 16757 t.Footlight = true; 16758 t.FreeSerif = true; 16759 t["Friz Quadrata"] = true; 16760 t.Garamond = true; 16761 t.Gentium = true; 16762 t.Georgia = true; 16763 t.Gloucester = true; 16764 t["Goudy Old Style"] = true; 16765 t["Goudy Schoolbook"] = true; 16766 t["Goudy Pro Font"] = true; 16767 t.Granjon = true; 16768 t["Guardian Egyptian"] = true; 16769 t.Heather = true; 16770 t.Hercules = true; 16771 t["High Tower Text"] = true; 16772 t.Hiroshige = true; 16773 t["Hoefler Text"] = true; 16774 t["Humana Serif"] = true; 16775 t.Imprint = true; 16776 t["Ionic No. 5"] = true; 16777 t.Janson = true; 16778 t.Joanna = true; 16779 t.Korinna = true; 16780 t.Lexicon = true; 16781 t.LiberationSerif = true; 16782 t["Liberation Serif"] = true; 16783 t["Linux Libertine"] = true; 16784 t.Literaturnaya = true; 16785 t.Lucida = true; 16786 t["Lucida Bright"] = true; 16787 t.Melior = true; 16788 t.Memphis = true; 16789 t.Miller = true; 16790 t.Minion = true; 16791 t.Modern = true; 16792 t["Mona Lisa"] = true; 16793 t["Mrs Eaves"] = true; 16794 t["MS Serif"] = true; 16795 t["Museo Slab"] = true; 16796 t["New York"] = true; 16797 t["Nimbus Roman"] = true; 16798 t["NPS Rawlinson Roadway"] = true; 16799 t.NuptialScript = true; 16800 t.Palatino = true; 16801 t.Perpetua = true; 16802 t.Plantin = true; 16803 t["Plantin Schoolbook"] = true; 16804 t.Playbill = true; 16805 t["Poor Richard"] = true; 16806 t["Rawlinson Roadway"] = true; 16807 t.Renault = true; 16808 t.Requiem = true; 16809 t.Rockwell = true; 16810 t.Roman = true; 16811 t["Rotis Serif"] = true; 16812 t.Sabon = true; 16813 t.Scala = true; 16814 t.Seagull = true; 16815 t.Sistina = true; 16816 t.Souvenir = true; 16817 t.STIX = true; 16818 t["Stone Informal"] = true; 16819 t["Stone Serif"] = true; 16820 t.Sylfaen = true; 16821 t.Times = true; 16822 t.Trajan = true; 16823 t["Trinité"] = true; 16824 t["Trump Mediaeval"] = true; 16825 t.Utopia = true; 16826 t["Vale Type"] = true; 16827 t["Bitstream Vera"] = true; 16828 t["Vera Serif"] = true; 16829 t.Versailles = true; 16830 t.Wanted = true; 16831 t.Weiss = true; 16832 t["Wide Latin"] = true; 16833 t.Windsor = true; 16834 t.XITS = true; 16835}); 16836const getSymbolsFonts = getLookupTableFactory(function (t) { 16837 t.Dingbats = true; 16838 t.Symbol = true; 16839 t.ZapfDingbats = true; 16840 t.Wingdings = true; 16841 t["Wingdings-Bold"] = true; 16842 t["Wingdings-Regular"] = true; 16843}); 16844const getGlyphMapForStandardFonts = getLookupTableFactory(function (t) { 16845 t[2] = 10; 16846 t[3] = 32; 16847 t[4] = 33; 16848 t[5] = 34; 16849 t[6] = 35; 16850 t[7] = 36; 16851 t[8] = 37; 16852 t[9] = 38; 16853 t[10] = 39; 16854 t[11] = 40; 16855 t[12] = 41; 16856 t[13] = 42; 16857 t[14] = 43; 16858 t[15] = 44; 16859 t[16] = 45; 16860 t[17] = 46; 16861 t[18] = 47; 16862 t[19] = 48; 16863 t[20] = 49; 16864 t[21] = 50; 16865 t[22] = 51; 16866 t[23] = 52; 16867 t[24] = 53; 16868 t[25] = 54; 16869 t[26] = 55; 16870 t[27] = 56; 16871 t[28] = 57; 16872 t[29] = 58; 16873 t[30] = 894; 16874 t[31] = 60; 16875 t[32] = 61; 16876 t[33] = 62; 16877 t[34] = 63; 16878 t[35] = 64; 16879 t[36] = 65; 16880 t[37] = 66; 16881 t[38] = 67; 16882 t[39] = 68; 16883 t[40] = 69; 16884 t[41] = 70; 16885 t[42] = 71; 16886 t[43] = 72; 16887 t[44] = 73; 16888 t[45] = 74; 16889 t[46] = 75; 16890 t[47] = 76; 16891 t[48] = 77; 16892 t[49] = 78; 16893 t[50] = 79; 16894 t[51] = 80; 16895 t[52] = 81; 16896 t[53] = 82; 16897 t[54] = 83; 16898 t[55] = 84; 16899 t[56] = 85; 16900 t[57] = 86; 16901 t[58] = 87; 16902 t[59] = 88; 16903 t[60] = 89; 16904 t[61] = 90; 16905 t[62] = 91; 16906 t[63] = 92; 16907 t[64] = 93; 16908 t[65] = 94; 16909 t[66] = 95; 16910 t[67] = 96; 16911 t[68] = 97; 16912 t[69] = 98; 16913 t[70] = 99; 16914 t[71] = 100; 16915 t[72] = 101; 16916 t[73] = 102; 16917 t[74] = 103; 16918 t[75] = 104; 16919 t[76] = 105; 16920 t[77] = 106; 16921 t[78] = 107; 16922 t[79] = 108; 16923 t[80] = 109; 16924 t[81] = 110; 16925 t[82] = 111; 16926 t[83] = 112; 16927 t[84] = 113; 16928 t[85] = 114; 16929 t[86] = 115; 16930 t[87] = 116; 16931 t[88] = 117; 16932 t[89] = 118; 16933 t[90] = 119; 16934 t[91] = 120; 16935 t[92] = 121; 16936 t[93] = 122; 16937 t[94] = 123; 16938 t[95] = 124; 16939 t[96] = 125; 16940 t[97] = 126; 16941 t[98] = 196; 16942 t[99] = 197; 16943 t[100] = 199; 16944 t[101] = 201; 16945 t[102] = 209; 16946 t[103] = 214; 16947 t[104] = 220; 16948 t[105] = 225; 16949 t[106] = 224; 16950 t[107] = 226; 16951 t[108] = 228; 16952 t[109] = 227; 16953 t[110] = 229; 16954 t[111] = 231; 16955 t[112] = 233; 16956 t[113] = 232; 16957 t[114] = 234; 16958 t[115] = 235; 16959 t[116] = 237; 16960 t[117] = 236; 16961 t[118] = 238; 16962 t[119] = 239; 16963 t[120] = 241; 16964 t[121] = 243; 16965 t[122] = 242; 16966 t[123] = 244; 16967 t[124] = 246; 16968 t[125] = 245; 16969 t[126] = 250; 16970 t[127] = 249; 16971 t[128] = 251; 16972 t[129] = 252; 16973 t[130] = 8224; 16974 t[131] = 176; 16975 t[132] = 162; 16976 t[133] = 163; 16977 t[134] = 167; 16978 t[135] = 8226; 16979 t[136] = 182; 16980 t[137] = 223; 16981 t[138] = 174; 16982 t[139] = 169; 16983 t[140] = 8482; 16984 t[141] = 180; 16985 t[142] = 168; 16986 t[143] = 8800; 16987 t[144] = 198; 16988 t[145] = 216; 16989 t[146] = 8734; 16990 t[147] = 177; 16991 t[148] = 8804; 16992 t[149] = 8805; 16993 t[150] = 165; 16994 t[151] = 181; 16995 t[152] = 8706; 16996 t[153] = 8721; 16997 t[154] = 8719; 16998 t[156] = 8747; 16999 t[157] = 170; 17000 t[158] = 186; 17001 t[159] = 8486; 17002 t[160] = 230; 17003 t[161] = 248; 17004 t[162] = 191; 17005 t[163] = 161; 17006 t[164] = 172; 17007 t[165] = 8730; 17008 t[166] = 402; 17009 t[167] = 8776; 17010 t[168] = 8710; 17011 t[169] = 171; 17012 t[170] = 187; 17013 t[171] = 8230; 17014 t[179] = 8220; 17015 t[180] = 8221; 17016 t[181] = 8216; 17017 t[182] = 8217; 17018 t[200] = 193; 17019 t[203] = 205; 17020 t[207] = 211; 17021 t[210] = 218; 17022 t[223] = 711; 17023 t[224] = 321; 17024 t[225] = 322; 17025 t[226] = 352; 17026 t[227] = 353; 17027 t[228] = 381; 17028 t[229] = 382; 17029 t[233] = 221; 17030 t[234] = 253; 17031 t[252] = 263; 17032 t[253] = 268; 17033 t[254] = 269; 17034 t[258] = 258; 17035 t[260] = 260; 17036 t[261] = 261; 17037 t[265] = 280; 17038 t[266] = 281; 17039 t[267] = 282; 17040 t[268] = 283; 17041 t[269] = 313; 17042 t[275] = 323; 17043 t[276] = 324; 17044 t[278] = 328; 17045 t[283] = 344; 17046 t[284] = 345; 17047 t[285] = 346; 17048 t[286] = 347; 17049 t[292] = 367; 17050 t[295] = 377; 17051 t[296] = 378; 17052 t[298] = 380; 17053 t[305] = 963; 17054 t[306] = 964; 17055 t[307] = 966; 17056 t[308] = 8215; 17057 t[309] = 8252; 17058 t[310] = 8319; 17059 t[311] = 8359; 17060 t[312] = 8592; 17061 t[313] = 8593; 17062 t[337] = 9552; 17063 t[493] = 1039; 17064 t[494] = 1040; 17065 t[672] = 1488; 17066 t[673] = 1489; 17067 t[674] = 1490; 17068 t[675] = 1491; 17069 t[676] = 1492; 17070 t[677] = 1493; 17071 t[678] = 1494; 17072 t[679] = 1495; 17073 t[680] = 1496; 17074 t[681] = 1497; 17075 t[682] = 1498; 17076 t[683] = 1499; 17077 t[684] = 1500; 17078 t[685] = 1501; 17079 t[686] = 1502; 17080 t[687] = 1503; 17081 t[688] = 1504; 17082 t[689] = 1505; 17083 t[690] = 1506; 17084 t[691] = 1507; 17085 t[692] = 1508; 17086 t[693] = 1509; 17087 t[694] = 1510; 17088 t[695] = 1511; 17089 t[696] = 1512; 17090 t[697] = 1513; 17091 t[698] = 1514; 17092 t[705] = 1524; 17093 t[706] = 8362; 17094 t[710] = 64288; 17095 t[711] = 64298; 17096 t[759] = 1617; 17097 t[761] = 1776; 17098 t[763] = 1778; 17099 t[775] = 1652; 17100 t[777] = 1764; 17101 t[778] = 1780; 17102 t[779] = 1781; 17103 t[780] = 1782; 17104 t[782] = 771; 17105 t[783] = 64726; 17106 t[786] = 8363; 17107 t[788] = 8532; 17108 t[790] = 768; 17109 t[791] = 769; 17110 t[792] = 768; 17111 t[795] = 803; 17112 t[797] = 64336; 17113 t[798] = 64337; 17114 t[799] = 64342; 17115 t[800] = 64343; 17116 t[801] = 64344; 17117 t[802] = 64345; 17118 t[803] = 64362; 17119 t[804] = 64363; 17120 t[805] = 64364; 17121 t[2424] = 7821; 17122 t[2425] = 7822; 17123 t[2426] = 7823; 17124 t[2427] = 7824; 17125 t[2428] = 7825; 17126 t[2429] = 7826; 17127 t[2430] = 7827; 17128 t[2433] = 7682; 17129 t[2678] = 8045; 17130 t[2679] = 8046; 17131 t[2830] = 1552; 17132 t[2838] = 686; 17133 t[2840] = 751; 17134 t[2842] = 753; 17135 t[2843] = 754; 17136 t[2844] = 755; 17137 t[2846] = 757; 17138 t[2856] = 767; 17139 t[2857] = 848; 17140 t[2858] = 849; 17141 t[2862] = 853; 17142 t[2863] = 854; 17143 t[2864] = 855; 17144 t[2865] = 861; 17145 t[2866] = 862; 17146 t[2906] = 7460; 17147 t[2908] = 7462; 17148 t[2909] = 7463; 17149 t[2910] = 7464; 17150 t[2912] = 7466; 17151 t[2913] = 7467; 17152 t[2914] = 7468; 17153 t[2916] = 7470; 17154 t[2917] = 7471; 17155 t[2918] = 7472; 17156 t[2920] = 7474; 17157 t[2921] = 7475; 17158 t[2922] = 7476; 17159 t[2924] = 7478; 17160 t[2925] = 7479; 17161 t[2926] = 7480; 17162 t[2928] = 7482; 17163 t[2929] = 7483; 17164 t[2930] = 7484; 17165 t[2932] = 7486; 17166 t[2933] = 7487; 17167 t[2934] = 7488; 17168 t[2936] = 7490; 17169 t[2937] = 7491; 17170 t[2938] = 7492; 17171 t[2940] = 7494; 17172 t[2941] = 7495; 17173 t[2942] = 7496; 17174 t[2944] = 7498; 17175 t[2946] = 7500; 17176 t[2948] = 7502; 17177 t[2950] = 7504; 17178 t[2951] = 7505; 17179 t[2952] = 7506; 17180 t[2954] = 7508; 17181 t[2955] = 7509; 17182 t[2956] = 7510; 17183 t[2958] = 7512; 17184 t[2959] = 7513; 17185 t[2960] = 7514; 17186 t[2962] = 7516; 17187 t[2963] = 7517; 17188 t[2964] = 7518; 17189 t[2966] = 7520; 17190 t[2967] = 7521; 17191 t[2968] = 7522; 17192 t[2970] = 7524; 17193 t[2971] = 7525; 17194 t[2972] = 7526; 17195 t[2974] = 7528; 17196 t[2975] = 7529; 17197 t[2976] = 7530; 17198 t[2978] = 1537; 17199 t[2979] = 1538; 17200 t[2980] = 1539; 17201 t[2982] = 1549; 17202 t[2983] = 1551; 17203 t[2984] = 1552; 17204 t[2986] = 1554; 17205 t[2987] = 1555; 17206 t[2988] = 1556; 17207 t[2990] = 1623; 17208 t[2991] = 1624; 17209 t[2995] = 1775; 17210 t[2999] = 1791; 17211 t[3002] = 64290; 17212 t[3003] = 64291; 17213 t[3004] = 64292; 17214 t[3006] = 64294; 17215 t[3007] = 64295; 17216 t[3008] = 64296; 17217 t[3011] = 1900; 17218 t[3014] = 8223; 17219 t[3015] = 8244; 17220 t[3017] = 7532; 17221 t[3018] = 7533; 17222 t[3019] = 7534; 17223 t[3075] = 7590; 17224 t[3076] = 7591; 17225 t[3079] = 7594; 17226 t[3080] = 7595; 17227 t[3083] = 7598; 17228 t[3084] = 7599; 17229 t[3087] = 7602; 17230 t[3088] = 7603; 17231 t[3091] = 7606; 17232 t[3092] = 7607; 17233 t[3095] = 7610; 17234 t[3096] = 7611; 17235 t[3099] = 7614; 17236 t[3100] = 7615; 17237 t[3103] = 7618; 17238 t[3104] = 7619; 17239 t[3107] = 8337; 17240 t[3108] = 8338; 17241 t[3116] = 1884; 17242 t[3119] = 1885; 17243 t[3120] = 1885; 17244 t[3123] = 1886; 17245 t[3124] = 1886; 17246 t[3127] = 1887; 17247 t[3128] = 1887; 17248 t[3131] = 1888; 17249 t[3132] = 1888; 17250 t[3135] = 1889; 17251 t[3136] = 1889; 17252 t[3139] = 1890; 17253 t[3140] = 1890; 17254 t[3143] = 1891; 17255 t[3144] = 1891; 17256 t[3147] = 1892; 17257 t[3148] = 1892; 17258 t[3153] = 580; 17259 t[3154] = 581; 17260 t[3157] = 584; 17261 t[3158] = 585; 17262 t[3161] = 588; 17263 t[3162] = 589; 17264 t[3165] = 891; 17265 t[3166] = 892; 17266 t[3169] = 1274; 17267 t[3170] = 1275; 17268 t[3173] = 1278; 17269 t[3174] = 1279; 17270 t[3181] = 7622; 17271 t[3182] = 7623; 17272 t[3282] = 11799; 17273 t[3316] = 578; 17274 t[3379] = 42785; 17275 t[3393] = 1159; 17276 t[3416] = 8377; 17277}); 17278const getSupplementalGlyphMapForArialBlack = getLookupTableFactory(function (t) { 17279 t[227] = 322; 17280 t[264] = 261; 17281 t[291] = 346; 17282}); 17283const getSupplementalGlyphMapForCalibri = getLookupTableFactory(function (t) { 17284 t[1] = 32; 17285 t[4] = 65; 17286 t[5] = 192; 17287 t[6] = 193; 17288 t[9] = 196; 17289 t[17] = 66; 17290 t[18] = 67; 17291 t[21] = 268; 17292 t[24] = 68; 17293 t[28] = 69; 17294 t[29] = 200; 17295 t[30] = 201; 17296 t[32] = 282; 17297 t[38] = 70; 17298 t[39] = 71; 17299 t[44] = 72; 17300 t[47] = 73; 17301 t[48] = 204; 17302 t[49] = 205; 17303 t[58] = 74; 17304 t[60] = 75; 17305 t[62] = 76; 17306 t[68] = 77; 17307 t[69] = 78; 17308 t[75] = 79; 17309 t[76] = 210; 17310 t[80] = 214; 17311 t[87] = 80; 17312 t[89] = 81; 17313 t[90] = 82; 17314 t[92] = 344; 17315 t[94] = 83; 17316 t[97] = 352; 17317 t[100] = 84; 17318 t[104] = 85; 17319 t[109] = 220; 17320 t[115] = 86; 17321 t[116] = 87; 17322 t[121] = 88; 17323 t[122] = 89; 17324 t[124] = 221; 17325 t[127] = 90; 17326 t[129] = 381; 17327 t[258] = 97; 17328 t[259] = 224; 17329 t[260] = 225; 17330 t[263] = 228; 17331 t[268] = 261; 17332 t[271] = 98; 17333 t[272] = 99; 17334 t[273] = 263; 17335 t[275] = 269; 17336 t[282] = 100; 17337 t[286] = 101; 17338 t[287] = 232; 17339 t[288] = 233; 17340 t[290] = 283; 17341 t[295] = 281; 17342 t[296] = 102; 17343 t[336] = 103; 17344 t[346] = 104; 17345 t[349] = 105; 17346 t[350] = 236; 17347 t[351] = 237; 17348 t[361] = 106; 17349 t[364] = 107; 17350 t[367] = 108; 17351 t[371] = 322; 17352 t[373] = 109; 17353 t[374] = 110; 17354 t[381] = 111; 17355 t[382] = 242; 17356 t[383] = 243; 17357 t[386] = 246; 17358 t[393] = 112; 17359 t[395] = 113; 17360 t[396] = 114; 17361 t[398] = 345; 17362 t[400] = 115; 17363 t[401] = 347; 17364 t[403] = 353; 17365 t[410] = 116; 17366 t[437] = 117; 17367 t[442] = 252; 17368 t[448] = 118; 17369 t[449] = 119; 17370 t[454] = 120; 17371 t[455] = 121; 17372 t[457] = 253; 17373 t[460] = 122; 17374 t[462] = 382; 17375 t[463] = 380; 17376 t[853] = 44; 17377 t[855] = 58; 17378 t[856] = 46; 17379 t[876] = 47; 17380 t[878] = 45; 17381 t[882] = 45; 17382 t[894] = 40; 17383 t[895] = 41; 17384 t[896] = 91; 17385 t[897] = 93; 17386 t[923] = 64; 17387 t[
vendor: 13,321 bytes, lines 17387-17889
173871004] = 48; 17388 t[1005] = 49; 17389 t[1006] = 50; 17390 t[1007] = 51; 17391 t[1008] = 52; 17392 t[1009] = 53; 17393 t[1010] = 54; 17394 t[1011] = 55; 17395 t[1012] = 56; 17396 t[1013] = 57; 17397 t[1081] = 37; 17398 t[1085] = 43; 17399 t[1086] = 45; 17400}); 17401function getStandardFontName(name) { 17402 const fontName = normalizeFontName(name); 17403 const stdFontMap = getStdFontMap(); 17404 return stdFontMap[fontName]; 17405} 17406function isKnownFontName(name) { 17407 const fontName = normalizeFontName(name); 17408 return !!(getStdFontMap()[fontName] || getNonStdFontMap()[fontName] || getSerifFonts()[fontName] || getSymbolsFonts()[fontName]); 17409} 17410 17411;// ./src/core/to_unicode_map.js 17412 17413class ToUnicodeMap { 17414 constructor(cmap = []) { 17415 this._map = cmap; 17416 } 17417 get length() { 17418 return this._map.length; 17419 } 17420 forEach(callback) { 17421 for (const charCode in this._map) { 17422 callback(charCode, this._map[charCode].charCodeAt(0)); 17423 } 17424 } 17425 has(i) { 17426 return this._map[i] !== undefined; 17427 } 17428 get(i) { 17429 return this._map[i]; 17430 } 17431 charCodeOf(value) { 17432 const map = this._map; 17433 if (map.length <= 0x10000) { 17434 return map.indexOf(value); 17435 } 17436 for (const charCode in map) { 17437 if (map[charCode] === value) { 17438 return charCode | 0; 17439 } 17440 } 17441 return -1; 17442 } 17443 amend(map) { 17444 for (const charCode in map) { 17445 this._map[charCode] = map[charCode]; 17446 } 17447 } 17448} 17449class IdentityToUnicodeMap { 17450 constructor(firstChar, lastChar) { 17451 this.firstChar = firstChar; 17452 this.lastChar = lastChar; 17453 } 17454 get length() { 17455 return this.lastChar + 1 - this.firstChar; 17456 } 17457 forEach(callback) { 17458 for (let i = this.firstChar, ii = this.lastChar; i <= ii; i++) { 17459 callback(i, i); 17460 } 17461 } 17462 has(i) { 17463 return this.firstChar <= i && i <= this.lastChar; 17464 } 17465 get(i) { 17466 if (this.firstChar <= i && i <= this.lastChar) { 17467 return String.fromCharCode(i); 17468 } 17469 return undefined; 17470 } 17471 charCodeOf(v) { 17472 return Number.isInteger(v) && v >= this.firstChar && v <= this.lastChar ? v : -1; 17473 } 17474 amend(map) { 17475 unreachable("Should not call amend()"); 17476 } 17477} 17478 17479;// ./src/core/cff_font.js 17480 17481 17482 17483class CFFFont { 17484 constructor(file, properties) { 17485 this.properties = properties; 17486 const parser = new CFFParser(file, properties, SEAC_ANALYSIS_ENABLED); 17487 this.cff = parser.parse(); 17488 this.cff.duplicateFirstGlyph(); 17489 const compiler = new CFFCompiler(this.cff); 17490 this.seacs = this.cff.seacs; 17491 try { 17492 this.data = compiler.compile(); 17493 } catch { 17494 warn("Failed to compile font " + properties.loadedName); 17495 this.data = file; 17496 } 17497 this._createBuiltInEncoding(); 17498 } 17499 get numGlyphs() { 17500 return this.cff.charStrings.count; 17501 } 17502 getCharset() { 17503 return this.cff.charset.charset; 17504 } 17505 getGlyphMapping() { 17506 const cff = this.cff; 17507 const properties = this.properties; 17508 const { 17509 cidToGidMap, 17510 cMap 17511 } = properties; 17512 const charsets = cff.charset.charset; 17513 let charCodeToGlyphId; 17514 let glyphId; 17515 if (properties.composite) { 17516 let invCidToGidMap; 17517 if (cidToGidMap?.length > 0) { 17518 invCidToGidMap = Object.create(null); 17519 for (let i = 0, ii = cidToGidMap.length; i < ii; i++) { 17520 const gid = cidToGidMap[i]; 17521 if (gid !== undefined) { 17522 invCidToGidMap[gid] = i; 17523 } 17524 } 17525 } 17526 charCodeToGlyphId = Object.create(null); 17527 let charCode; 17528 if (cff.isCIDFont) { 17529 for (glyphId = 0; glyphId < charsets.length; glyphId++) { 17530 const cid = charsets[glyphId]; 17531 charCode = cMap.charCodeOf(cid); 17532 if (invCidToGidMap?.[charCode] !== undefined) { 17533 charCode = invCidToGidMap[charCode]; 17534 } 17535 charCodeToGlyphId[charCode] = glyphId; 17536 } 17537 } else { 17538 for (glyphId = 0; glyphId < cff.charStrings.count; glyphId++) { 17539 charCode = cMap.charCodeOf(glyphId); 17540 charCodeToGlyphId[charCode] = glyphId; 17541 } 17542 } 17543 return charCodeToGlyphId; 17544 } 17545 let encoding = cff.encoding ? cff.encoding.encoding : null; 17546 if (properties.isInternalFont) { 17547 encoding = properties.defaultEncoding; 17548 } 17549 charCodeToGlyphId = type1FontGlyphMapping(properties, encoding, charsets); 17550 return charCodeToGlyphId; 17551 } 17552 hasGlyphId(id) { 17553 return this.cff.hasGlyphId(id); 17554 } 17555 _createBuiltInEncoding() { 17556 const { 17557 charset, 17558 encoding 17559 } = this.cff; 17560 if (!charset || !encoding) { 17561 return; 17562 } 17563 const charsets = charset.charset, 17564 encodings = encoding.encoding; 17565 const map = []; 17566 for (const charCode in encodings) { 17567 const glyphId = encodings[charCode]; 17568 if (glyphId >= 0) { 17569 const glyphName = charsets[glyphId]; 17570 if (glyphName) { 17571 map[charCode] = glyphName; 17572 } 17573 } 17574 } 17575 if (map.length > 0) { 17576 this.properties.builtInEncoding = map; 17577 } 17578 } 17579} 17580 17581;// ./src/core/font_renderer.js 17582 17583 17584 17585 17586 17587 17588function getUint32(data, offset) { 17589 return (data[offset] << 24 | data[offset + 1] << 16 | data[offset + 2] << 8 | data[offset + 3]) >>> 0; 17590} 17591function getUint16(data, offset) { 17592 return data[offset] << 8 | data[offset + 1]; 17593} 17594function getInt16(data, offset) { 17595 return (data[offset] << 24 | data[offset + 1] << 16) >> 16; 17596} 17597function getInt8(data, offset) { 17598 return data[offset] << 24 >> 24; 17599} 17600function getFloat214(data, offset) { 17601 return getInt16(data, offset) / 16384; 17602} 17603function getSubroutineBias(subrs) { 17604 const numSubrs = subrs.length; 17605 let bias = 32768; 17606 if (numSubrs < 1240) { 17607 bias = 107; 17608 } else if (numSubrs < 33900) { 17609 bias = 1131; 17610 } 17611 return bias; 17612} 17613function parseCmap(data, start, end) { 17614 const offset = getUint16(data, start + 2) === 1 ? getUint32(data, start + 8) : getUint32(data, start + 16); 17615 const format = getUint16(data, start + offset); 17616 let ranges, p, i; 17617 if (format === 4) { 17618 getUint16(data, start + offset + 2); 17619 const segCount = getUint16(data, start + offset + 6) >> 1; 17620 p = start + offset + 14; 17621 ranges = []; 17622 for (i = 0; i < segCount; i++, p += 2) { 17623 ranges[i] = { 17624 end: getUint16(data, p) 17625 }; 17626 } 17627 p += 2; 17628 for (i = 0; i < segCount; i++, p += 2) { 17629 ranges[i].start = getUint16(data, p); 17630 } 17631 for (i = 0; i < segCount; i++, p += 2) { 17632 ranges[i].idDelta = getUint16(data, p); 17633 } 17634 for (i = 0; i < segCount; i++, p += 2) { 17635 let idOffset = getUint16(data, p); 17636 if (idOffset === 0) { 17637 continue; 17638 } 17639 ranges[i].ids = []; 17640 for (let j = 0, jj = ranges[i].end - ranges[i].start + 1; j < jj; j++) { 17641 ranges[i].ids[j] = getUint16(data, p + idOffset); 17642 idOffset += 2; 17643 } 17644 } 17645 return ranges; 17646 } else if (format === 12) { 17647 const groups = getUint32(data, start + offset + 12); 17648 p = start + offset + 16; 17649 ranges = []; 17650 for (i = 0; i < groups; i++) { 17651 start = getUint32(data, p); 17652 ranges.push({ 17653 start, 17654 end: getUint32(data, p + 4), 17655 idDelta: getUint32(data, p + 8) - start 17656 }); 17657 p += 12; 17658 } 17659 return ranges; 17660 } 17661 throw new FormatError(`unsupported cmap: ${format}`); 17662} 17663function parseCff(data, start, end, seacAnalysisEnabled) { 17664 const properties = {}; 17665 const parser = new CFFParser(new Stream(data, start, end - start), properties, seacAnalysisEnabled); 17666 const cff = parser.parse(); 17667 return { 17668 glyphs: cff.charStrings.objects, 17669 subrs: cff.topDict.privateDict?.subrsIndex?.objects, 17670 gsubrs: cff.globalSubrIndex?.objects, 17671 isCFFCIDFont: cff.isCIDFont, 17672 fdSelect: cff.fdSelect, 17673 fdArray: cff.fdArray 17674 }; 17675} 17676function parseGlyfTable(glyf, loca, isGlyphLocationsLong) { 17677 let itemSize, itemDecode; 17678 if (isGlyphLocationsLong) { 17679 itemSize = 4; 17680 itemDecode = getUint32; 17681 } else { 17682 itemSize = 2; 17683 itemDecode = (data, offset) => 2 * getUint16(data, offset); 17684 } 17685 const glyphs = []; 17686 let startOffset = itemDecode(loca, 0); 17687 for (let j = itemSize; j < loca.length; j += itemSize) { 17688 const endOffset = itemDecode(loca, j); 17689 glyphs.push(glyf.subarray(startOffset, endOffset)); 17690 startOffset = endOffset; 17691 } 17692 return glyphs; 17693} 17694function lookupCmap(ranges, unicode) { 17695 const code = unicode.codePointAt(0); 17696 let gid = 0, 17697 l = 0, 17698 r = ranges.length - 1; 17699 while (l < r) { 17700 const c = l + r + 1 >> 1; 17701 if (code < ranges[c].start) { 17702 r = c - 1; 17703 } else { 17704 l = c; 17705 } 17706 } 17707 if (ranges[l].start <= code && code <= ranges[l].end) { 17708 gid = ranges[l].idDelta + (ranges[l].ids ? ranges[l].ids[code - ranges[l].start] : code) & 0xffff; 17709 } 17710 return { 17711 charCode: code, 17712 glyphId: gid 17713 }; 17714} 17715function compileGlyf(code, cmds, font) { 17716 function moveTo(x, y) { 17717 cmds.add(FontRenderOps.MOVE_TO, [x, y]); 17718 } 17719 function lineTo(x, y) { 17720 cmds.add(FontRenderOps.LINE_TO, [x, y]); 17721 } 17722 function quadraticCurveTo(xa, ya, x, y) { 17723 cmds.add(FontRenderOps.QUADRATIC_CURVE_TO, [xa, ya, x, y]); 17724 } 17725 let i = 0; 17726 const numberOfContours = getInt16(code, i); 17727 let flags; 17728 let x = 0, 17729 y = 0; 17730 i += 10; 17731 if (numberOfContours < 0) { 17732 do { 17733 flags = getUint16(code, i); 17734 const glyphIndex = getUint16(code, i + 2); 17735 i += 4; 17736 let arg1, arg2; 17737 if (flags & 0x01) { 17738 if (flags & 0x02) { 17739 arg1 = getInt16(code, i); 17740 arg2 = getInt16(code, i + 2); 17741 } else { 17742 arg1 = getUint16(code, i); 17743 arg2 = getUint16(code, i + 2); 17744 } 17745 i += 4; 17746 } else if (flags & 0x02) { 17747 arg1 = getInt8(code, i++); 17748 arg2 = getInt8(code, i++); 17749 } else { 17750 arg1 = code[i++]; 17751 arg2 = code[i++]; 17752 } 17753 if (flags & 0x02) { 17754 x = arg1; 17755 y = arg2; 17756 } else { 17757 x = 0; 17758 y = 0; 17759 } 17760 let scaleX = 1, 17761 scaleY = 1, 17762 scale01 = 0, 17763 scale10 = 0; 17764 if (flags & 0x08) { 17765 scaleX = scaleY = getFloat214(code, i); 17766 i += 2; 17767 } else if (flags & 0x40) { 17768 scaleX = getFloat214(code, i); 17769 scaleY = getFloat214(code, i + 2); 17770 i += 4; 17771 } else if (flags & 0x80) { 17772 scaleX = getFloat214(code, i); 17773 scale01 = getFloat214(code, i + 2); 17774 scale10 = getFloat214(code, i + 4); 17775 scaleY = getFloat214(code, i + 6); 17776 i += 8; 17777 } 17778 const subglyph = font.glyphs[glyphIndex]; 17779 if (subglyph) { 17780 cmds.add(FontRenderOps.SAVE); 17781 cmds.add(FontRenderOps.TRANSFORM, [scaleX, scale01, scale10, scaleY, x, y]); 17782 if (!(flags & 0x02)) {} 17783 compileGlyf(subglyph, cmds, font); 17784 cmds.add(FontRenderOps.RESTORE); 17785 } 17786 } while (flags & 0x20); 17787 } else { 17788 const endPtsOfContours = []; 17789 let j, jj; 17790 for (j = 0; j < numberOfContours; j++) { 17791 endPtsOfContours.push(getUint16(code, i)); 17792 i += 2; 17793 } 17794 const instructionLength = getUint16(code, i); 17795 i += 2 + instructionLength; 17796 const numberOfPoints = endPtsOfContours.at(-1) + 1; 17797 const points = []; 17798 while (points.length < numberOfPoints) { 17799 flags = code[i++]; 17800 let repeat = 1; 17801 if (flags & 0x08) { 17802 repeat += code[i++]; 17803 } 17804 while (repeat-- > 0) { 17805 points.push({ 17806 flags 17807 }); 17808 } 17809 } 17810 for (j = 0; j < numberOfPoints; j++) { 17811 switch (points[j].flags & 0x12) { 17812 case 0x00: 17813 x += getInt16(code, i); 17814 i += 2; 17815 break; 17816 case 0x02: 17817 x -= code[i++]; 17818 break; 17819 case 0x12: 17820 x += code[i++]; 17821 break; 17822 } 17823 points[j].x = x; 17824 } 17825 for (j = 0; j < numberOfPoints; j++) { 17826 switch (points[j].flags & 0x24) { 17827 case 0x00: 17828 y += getInt16(code, i); 17829 i += 2; 17830 break; 17831 case 0x04: 17832 y -= code[i++]; 17833 break; 17834 case 0x24: 17835 y += code[i++]; 17836 break; 17837 } 17838 points[j].y = y; 17839 } 17840 let startPoint = 0; 17841 for (i = 0; i < numberOfContours; i++) { 17842 const endPoint = endPtsOfContours[i]; 17843 const contour = points.slice(startPoint, endPoint + 1); 17844 if (contour[0].flags & 1) { 17845 contour.push(contour[0]); 17846 } else if (contour.at(-1).flags & 1) { 17847 contour.unshift(contour.at(-1)); 17848 } else { 17849 const p = { 17850 flags: 1, 17851 x: (contour[0].x + contour.at(-1).x) / 2, 17852 y: (contour[0].y + contour.at(-1).y) / 2 17853 }; 17854 contour.unshift(p); 17855 contour.push(p); 17856 } 17857 moveTo(contour[0].x, contour[0].y); 17858 for (j = 1, jj = contour.length; j < jj; j++) { 17859 if (contour[j].flags & 1) { 17860 lineTo(contour[j].x, contour[j].y); 17861 } else if (contour[j + 1].flags & 1) { 17862 quadraticCurveTo(contour[j].x, contour[j].y, contour[j + 1].x, contour[j + 1].y); 17863 j++; 17864 } else { 17865 quadraticCurveTo(contour[j].x, contour[j].y, (contour[j].x + contour[j + 1].x) / 2, (contour[j].y + contour[j + 1].y) / 2); 17866 } 17867 } 17868 startPoint = endPoint + 1; 17869 } 17870 } 17871} 17872function compileCharString(charStringCode, cmds, font, glyphId) { 17873 function moveTo(x, y) { 17874 cmds.add(FontRenderOps.MOVE_TO, [x, y]); 17875 } 17876 function lineTo(x, y) { 17877 cmds.add(FontRenderOps.LINE_TO, [x, y]); 17878 } 17879 function bezierCurveTo(x1, y1, x2, y2, x, y) { 17880 cmds.add(FontRenderOps.BEZIER_CURVE_TO, [x1, y1, x2, y2, x, y]); 17881 } 17882 const stack = []; 17883 let x = 0, 17884 y = 0; 17885 let stems = 0; 17886 function parse(code) { 17887 let i = 0; 17888 while (i < code.length) { 17889 let stackClean = false;
vendor: 9,991 bytes, lines 17890-18205
17890 let v = code[i++]; 17891 let xa, xb, ya, yb, y1, y2, y3, n, subrCode; 17892 switch (v) { 17893 case 1: 17894 stems += stack.length >> 1; 17895 stackClean = true; 17896 break; 17897 case 3: 17898 stems += stack.length >> 1; 17899 stackClean = true; 17900 break; 17901 case 4: 17902 y += stack.pop(); 17903 moveTo(x, y); 17904 stackClean = true; 17905 break; 17906 case 5: 17907 while (stack.length > 0) { 17908 x += stack.shift(); 17909 y += stack.shift(); 17910 lineTo(x, y); 17911 } 17912 break; 17913 case 6: 17914 while (stack.length > 0) { 17915 x += stack.shift(); 17916 lineTo(x, y); 17917 if (stack.length === 0) { 17918 break; 17919 } 17920 y += stack.shift(); 17921 lineTo(x, y); 17922 } 17923 break; 17924 case 7: 17925 while (stack.length > 0) { 17926 y += stack.shift(); 17927 lineTo(x, y); 17928 if (stack.length === 0) { 17929 break; 17930 } 17931 x += stack.shift(); 17932 lineTo(x, y); 17933 } 17934 break; 17935 case 8: 17936 while (stack.length > 0) { 17937 xa = x + stack.shift(); 17938 ya = y + stack.shift(); 17939 xb = xa + stack.shift(); 17940 yb = ya + stack.shift(); 17941 x = xb + stack.shift(); 17942 y = yb + stack.shift(); 17943 bezierCurveTo(xa, ya, xb, yb, x, y); 17944 } 17945 break; 17946 case 10: 17947 n = stack.pop(); 17948 subrCode = null; 17949 if (font.isCFFCIDFont) { 17950 const fdIndex = font.fdSelect.getFDIndex(glyphId); 17951 if (fdIndex >= 0 && fdIndex < font.fdArray.length) { 17952 const fontDict = font.fdArray[fdIndex]; 17953 let subrs; 17954 if (fontDict.privateDict?.subrsIndex) { 17955 subrs = fontDict.privateDict.subrsIndex.objects; 17956 } 17957 if (subrs) { 17958 n += getSubroutineBias(subrs); 17959 subrCode = subrs[n]; 17960 } 17961 } else { 17962 warn("Invalid fd index for glyph index."); 17963 } 17964 } else { 17965 subrCode = font.subrs[n + font.subrsBias]; 17966 } 17967 if (subrCode) { 17968 parse(subrCode); 17969 } 17970 break; 17971 case 11: 17972 return; 17973 case 12: 17974 v = code[i++]; 17975 switch (v) { 17976 case 34: 17977 xa = x + stack.shift(); 17978 xb = xa + stack.shift(); 17979 y1 = y + stack.shift(); 17980 x = xb + stack.shift(); 17981 bezierCurveTo(xa, y, xb, y1, x, y1); 17982 xa = x + stack.shift(); 17983 xb = xa + stack.shift(); 17984 x = xb + stack.shift(); 17985 bezierCurveTo(xa, y1, xb, y, x, y); 17986 break; 17987 case 35: 17988 xa = x + stack.shift(); 17989 ya = y + stack.shift(); 17990 xb = xa + stack.shift(); 17991 yb = ya + stack.shift(); 17992 x = xb + stack.shift(); 17993 y = yb + stack.shift(); 17994 bezierCurveTo(xa, ya, xb, yb, x, y); 17995 xa = x + stack.shift(); 17996 ya = y + stack.shift(); 17997 xb = xa + stack.shift(); 17998 yb = ya + stack.shift(); 17999 x = xb + stack.shift(); 18000 y = yb + stack.shift(); 18001 bezierCurveTo(xa, ya, xb, yb, x, y); 18002 stack.pop(); 18003 break; 18004 case 36: 18005 xa = x + stack.shift(); 18006 y1 = y + stack.shift(); 18007 xb = xa + stack.shift(); 18008 y2 = y1 + stack.shift(); 18009 x = xb + stack.shift(); 18010 bezierCurveTo(xa, y1, xb, y2, x, y2); 18011 xa = x + stack.shift(); 18012 xb = xa + stack.shift(); 18013 y3 = y2 + stack.shift(); 18014 x = xb + stack.shift(); 18015 bezierCurveTo(xa, y2, xb, y3, x, y); 18016 break; 18017 case 37: 18018 const x0 = x, 18019 y0 = y; 18020 xa = x + stack.shift(); 18021 ya = y + stack.shift(); 18022 xb = xa + stack.shift(); 18023 yb = ya + stack.shift(); 18024 x = xb + stack.shift(); 18025 y = yb + stack.shift(); 18026 bezierCurveTo(xa, ya, xb, yb, x, y); 18027 xa = x + stack.shift(); 18028 ya = y + stack.shift(); 18029 xb = xa + stack.shift(); 18030 yb = ya + stack.shift(); 18031 x = xb; 18032 y = yb; 18033 if (Math.abs(x - x0) > Math.abs(y - y0)) { 18034 x += stack.shift(); 18035 } else { 18036 y += stack.shift(); 18037 } 18038 bezierCurveTo(xa, ya, xb, yb, x, y); 18039 break; 18040 default: 18041 throw new FormatError(`unknown operator: 12 ${v}`); 18042 } 18043 break; 18044 case 14: 18045 if (stack.length >= 4) { 18046 const achar = stack.pop(); 18047 const bchar = stack.pop(); 18048 y = stack.pop(); 18049 x = stack.pop(); 18050 cmds.add(FontRenderOps.SAVE); 18051 cmds.add(FontRenderOps.TRANSLATE, [x, y]); 18052 let cmap = lookupCmap(font.cmap, String.fromCharCode(font.glyphNameMap[StandardEncoding[achar]])); 18053 compileCharString(font.glyphs[cmap.glyphId], cmds, font, cmap.glyphId); 18054 cmds.add(FontRenderOps.RESTORE); 18055 cmap = lookupCmap(font.cmap, String.fromCharCode(font.glyphNameMap[StandardEncoding[bchar]])); 18056 compileCharString(font.glyphs[cmap.glyphId], cmds, font, cmap.glyphId); 18057 } 18058 return; 18059 case 18: 18060 stems += stack.length >> 1; 18061 stackClean = true; 18062 break; 18063 case 19: 18064 stems += stack.length >> 1; 18065 i += stems + 7 >> 3; 18066 stackClean = true; 18067 break; 18068 case 20: 18069 stems += stack.length >> 1; 18070 i += stems + 7 >> 3; 18071 stackClean = true; 18072 break; 18073 case 21: 18074 y += stack.pop(); 18075 x += stack.pop(); 18076 moveTo(x, y); 18077 stackClean = true; 18078 break; 18079 case 22: 18080 x += stack.pop(); 18081 moveTo(x, y); 18082 stackClean = true; 18083 break; 18084 case 23: 18085 stems += stack.length >> 1; 18086 stackClean = true; 18087 break; 18088 case 24: 18089 while (stack.length > 2) { 18090 xa = x + stack.shift(); 18091 ya = y + stack.shift(); 18092 xb = xa + stack.shift(); 18093 yb = ya + stack.shift(); 18094 x = xb + stack.shift(); 18095 y = yb + stack.shift(); 18096 bezierCurveTo(xa, ya, xb, yb, x, y); 18097 } 18098 x += stack.shift(); 18099 y += stack.shift(); 18100 lineTo(x, y); 18101 break; 18102 case 25: 18103 while (stack.length > 6) { 18104 x += stack.shift(); 18105 y += stack.shift(); 18106 lineTo(x, y); 18107 } 18108 xa = x + stack.shift(); 18109 ya = y + stack.shift(); 18110 xb = xa + stack.shift(); 18111 yb = ya + stack.shift(); 18112 x = xb + stack.shift(); 18113 y = yb + stack.shift(); 18114 bezierCurveTo(xa, ya, xb, yb, x, y); 18115 break; 18116 case 26: 18117 if (stack.length % 2) { 18118 x += stack.shift(); 18119 } 18120 while (stack.length > 0) { 18121 xa = x; 18122 ya = y + stack.shift(); 18123 xb = xa + stack.shift(); 18124 yb = ya + stack.shift(); 18125 x = xb; 18126 y = yb + stack.shift(); 18127 bezierCurveTo(xa, ya, xb, yb, x, y); 18128 } 18129 break; 18130 case 27: 18131 if (stack.length % 2) { 18132 y += stack.shift(); 18133 } 18134 while (stack.length > 0) { 18135 xa = x + stack.shift(); 18136 ya = y; 18137 xb = xa + stack.shift(); 18138 yb = ya + stack.shift(); 18139 x = xb + stack.shift(); 18140 y = yb; 18141 bezierCurveTo(xa, ya, xb, yb, x, y); 18142 } 18143 break; 18144 case 28: 18145 stack.push((code[i] << 24 | code[i + 1] << 16) >> 16); 18146 i += 2; 18147 break; 18148 case 29: 18149 n = stack.pop() + font.gsubrsBias; 18150 subrCode = font.gsubrs[n]; 18151 if (subrCode) { 18152 parse(subrCode); 18153 } 18154 break; 18155 case 30: 18156 while (stack.length > 0) { 18157 xa = x; 18158 ya = y + stack.shift(); 18159 xb = xa + stack.shift(); 18160 yb = ya + stack.shift(); 18161 x = xb + stack.shift(); 18162 y = yb + (stack.length === 1 ? stack.shift() : 0); 18163 bezierCurveTo(xa, ya, xb, yb, x, y); 18164 if (stack.length === 0) { 18165 break; 18166 } 18167 xa = x + stack.shift(); 18168 ya = y; 18169 xb = xa + stack.shift(); 18170 yb = ya + stack.shift(); 18171 y = yb + stack.shift(); 18172 x = xb + (stack.length === 1 ? stack.shift() : 0); 18173 bezierCurveTo(xa, ya, xb, yb, x, y); 18174 } 18175 break; 18176 case 31: 18177 while (stack.length > 0) { 18178 xa = x + stack.shift(); 18179 ya = y; 18180 xb = xa + stack.shift(); 18181 yb = ya + stack.shift(); 18182 y = yb + stack.shift(); 18183 x = xb + (stack.length === 1 ? stack.shift() : 0); 18184 bezierCurveTo(xa, ya, xb, yb, x, y); 18185 if (stack.length === 0) { 18186 break; 18187 } 18188 xa = x; 18189 ya = y + stack.shift(); 18190 xb = xa + stack.shift(); 18191 yb = ya + stack.shift(); 18192 x = xb + stack.shift(); 18193 y = yb + (stack.length === 1 ? stack.shift() : 0); 18194 bezierCurveTo(xa, ya, xb, yb, x, y); 18195 } 18196 break; 18197 default: 18198 if (v < 32) { 18199 throw new FormatError(`unknown operator: ${v}`); 18200 } 18201 if (v < 247) { 18202 stack.push(v - 139); 18203 } else if (v < 251) { 18204 stack.push((v - 247) * 256 + code[i++] + 108); 18205 } else if (v < 255) {
vendor: 4,814 bytes, lines 18206-18358
18206 stack.push(-(v - 251) * 256 - code[i++] - 108); 18207 } else { 18208 stack.push((code[i] << 24 | code[i + 1] << 16 | code[i + 2] << 8 | code[i + 3]) / 65536); 18209 i += 4; 18210 } 18211 break; 18212 } 18213 if (stackClean) { 18214 stack.length = 0; 18215 } 18216 } 18217 } 18218 parse(charStringCode); 18219} 18220const NOOP = []; 18221class Commands { 18222 cmds = []; 18223 add(cmd, args) { 18224 if (args) { 18225 if (!isNumberArray(args, null)) { 18226 warn(`Commands.add - "${cmd}" has at least one non-number arg: "${args}".`); 18227 const newArgs = args.map(arg => typeof arg === "number" ? arg : 0); 18228 this.cmds.push(cmd, ...newArgs); 18229 } else { 18230 this.cmds.push(cmd, ...args); 18231 } 18232 } else { 18233 this.cmds.push(cmd); 18234 } 18235 } 18236} 18237class CompiledFont { 18238 constructor(fontMatrix) { 18239 this.fontMatrix = fontMatrix; 18240 this.compiledGlyphs = Object.create(null); 18241 this.compiledCharCodeToGlyphId = Object.create(null); 18242 } 18243 getPathJs(unicode) { 18244 const { 18245 charCode, 18246 glyphId 18247 } = lookupCmap(this.cmap, unicode); 18248 let fn = this.compiledGlyphs[glyphId], 18249 compileEx; 18250 if (!fn) { 18251 try { 18252 fn = this.compileGlyph(this.glyphs[glyphId], glyphId); 18253 } catch (ex) { 18254 fn = NOOP; 18255 compileEx = ex; 18256 } 18257 this.compiledGlyphs[glyphId] = fn; 18258 } 18259 this.compiledCharCodeToGlyphId[charCode] ??= glyphId; 18260 if (compileEx) { 18261 throw compileEx; 18262 } 18263 return fn; 18264 } 18265 compileGlyph(code, glyphId) { 18266 if (!code || code.length === 0 || code[0] === 14) { 18267 return NOOP; 18268 } 18269 let fontMatrix = this.fontMatrix; 18270 if (this.isCFFCIDFont) { 18271 const fdIndex = this.fdSelect.getFDIndex(glyphId); 18272 if (fdIndex >= 0 && fdIndex < this.fdArray.length) { 18273 const fontDict = this.fdArray[fdIndex]; 18274 fontMatrix = fontDict.getByName("FontMatrix") || FONT_IDENTITY_MATRIX; 18275 } else { 18276 warn("Invalid fd index for glyph index."); 18277 } 18278 } 18279 const cmds = new Commands(); 18280 cmds.add(FontRenderOps.SAVE); 18281 cmds.add(FontRenderOps.TRANSFORM, fontMatrix.slice()); 18282 cmds.add(FontRenderOps.SCALE); 18283 this.compileGlyphImpl(code, cmds, glyphId); 18284 cmds.add(FontRenderOps.RESTORE); 18285 return cmds.cmds; 18286 } 18287 compileGlyphImpl() { 18288 unreachable("Children classes should implement this."); 18289 } 18290 hasBuiltPath(unicode) { 18291 const { 18292 charCode, 18293 glyphId 18294 } = lookupCmap(this.cmap, unicode); 18295 return this.compiledGlyphs[glyphId] !== undefined && this.compiledCharCodeToGlyphId[charCode] !== undefined; 18296 } 18297} 18298class TrueTypeCompiled extends CompiledFont { 18299 constructor(glyphs, cmap, fontMatrix) { 18300 super(fontMatrix || [0.000488, 0, 0, 0.000488, 0, 0]); 18301 this.glyphs = glyphs; 18302 this.cmap = cmap; 18303 } 18304 compileGlyphImpl(code, cmds) { 18305 compileGlyf(code, cmds, this); 18306 } 18307} 18308class Type2Compiled extends CompiledFont { 18309 constructor(cffInfo, cmap, fontMatrix, glyphNameMap) { 18310 super(fontMatrix || [0.001, 0, 0, 0.001, 0, 0]); 18311 this.glyphs = cffInfo.glyphs; 18312 this.gsubrs = cffInfo.gsubrs || []; 18313 this.subrs = cffInfo.subrs || []; 18314 this.cmap = cmap; 18315 this.glyphNameMap = glyphNameMap || getGlyphsUnicode(); 18316 this.gsubrsBias = getSubroutineBias(this.gsubrs); 18317 this.subrsBias = getSubroutineBias(this.subrs); 18318 this.isCFFCIDFont = cffInfo.isCFFCIDFont; 18319 this.fdSelect = cffInfo.fdSelect; 18320 this.fdArray = cffInfo.fdArray; 18321 } 18322 compileGlyphImpl(code, cmds, glyphId) { 18323 compileCharString(code, cmds, this, glyphId); 18324 } 18325} 18326class FontRendererFactory { 18327 static create(font, seacAnalysisEnabled) { 18328 const data = new Uint8Array(font.data); 18329 let cmap, glyf, loca, cff, indexToLocFormat, unitsPerEm; 18330 const numTables = getUint16(data, 4); 18331 for (let i = 0, p = 12; i < numTables; i++, p += 16) { 18332 const tag = bytesToString(data.subarray(p, p + 4)); 18333 const offset = getUint32(data, p + 8); 18334 const length = getUint32(data, p + 12); 18335 switch (tag) { 18336 case "cmap": 18337 cmap = parseCmap(data, offset, offset + length); 18338 break; 18339 case "glyf": 18340 glyf = data.subarray(offset, offset + length); 18341 break; 18342 case "loca": 18343 loca = data.subarray(offset, offset + length); 18344 break; 18345 case "head": 18346 unitsPerEm = getUint16(data, offset + 18); 18347 indexToLocFormat = getUint16(data, offset + 50); 18348 break; 18349 case "CFF ": 18350 cff = parseCff(data, offset, offset + length, seacAnalysisEnabled); 18351 break; 18352 } 18353 } 18354 if (glyf) { 18355 const fontMatrix = !unitsPerEm ? font.fontMatrix : [1 / unitsPerEm, 0, 0, 1 / unitsPerEm, 0, 0]; 18356 return new TrueTypeCompiled(parseGlyfTable(glyf, loca, indexToLocFormat), cmap, fontMatrix); 18357 } 18358 return new Type2Compiled(cff, cmap, font.fontMatrix, font.glyphNameMap
vendor: 20,727 bytes, lines 18358-19365
18358); 18359 } 18360} 18361 18362;// ./src/core/metrics.js 18363 18364const getMetrics = getLookupTableFactory(function (t) { 18365 t.Courier = 600; 18366 t["Courier-Bold"] = 600; 18367 t["Courier-BoldOblique"] = 600; 18368 t["Courier-Oblique"] = 600; 18369 t.Helvetica = getLookupTableFactory(function (t) { 18370 t.space = 278; 18371 t.exclam = 278; 18372 t.quotedbl = 355; 18373 t.numbersign = 556; 18374 t.dollar = 556; 18375 t.percent = 889; 18376 t.ampersand = 667; 18377 t.quoteright = 222; 18378 t.parenleft = 333; 18379 t.parenright = 333; 18380 t.asterisk = 389; 18381 t.plus = 584; 18382 t.comma = 278; 18383 t.hyphen = 333; 18384 t.period = 278; 18385 t.slash = 278; 18386 t.zero = 556; 18387 t.one = 556; 18388 t.two = 556; 18389 t.three = 556; 18390 t.four = 556; 18391 t.five = 556; 18392 t.six = 556; 18393 t.seven = 556; 18394 t.eight = 556; 18395 t.nine = 556; 18396 t.colon = 278; 18397 t.semicolon = 278; 18398 t.less = 584; 18399 t.equal = 584; 18400 t.greater = 584; 18401 t.question = 556; 18402 t.at = 1015; 18403 t.A = 667; 18404 t.B = 667; 18405 t.C = 722; 18406 t.D = 722; 18407 t.E = 667; 18408 t.F = 611; 18409 t.G = 778; 18410 t.H = 722; 18411 t.I = 278; 18412 t.J = 500; 18413 t.K = 667; 18414 t.L = 556; 18415 t.M = 833; 18416 t.N = 722; 18417 t.O = 778; 18418 t.P = 667; 18419 t.Q = 778; 18420 t.R = 722; 18421 t.S = 667; 18422 t.T = 611; 18423 t.U = 722; 18424 t.V = 667; 18425 t.W = 944; 18426 t.X = 667; 18427 t.Y = 667; 18428 t.Z = 611; 18429 t.bracketleft = 278; 18430 t.backslash = 278; 18431 t.bracketright = 278; 18432 t.asciicircum = 469; 18433 t.underscore = 556; 18434 t.quoteleft = 222; 18435 t.a = 556; 18436 t.b = 556; 18437 t.c = 500; 18438 t.d = 556; 18439 t.e = 556; 18440 t.f = 278; 18441 t.g = 556; 18442 t.h = 556; 18443 t.i = 222; 18444 t.j = 222; 18445 t.k = 500; 18446 t.l = 222; 18447 t.m = 833; 18448 t.n = 556; 18449 t.o = 556; 18450 t.p = 556; 18451 t.q = 556; 18452 t.r = 333; 18453 t.s = 500; 18454 t.t = 278; 18455 t.u = 556; 18456 t.v = 500; 18457 t.w = 722; 18458 t.x = 500; 18459 t.y = 500; 18460 t.z = 500; 18461 t.braceleft = 334; 18462 t.bar = 260; 18463 t.braceright = 334; 18464 t.asciitilde = 584; 18465 t.exclamdown = 333; 18466 t.cent = 556; 18467 t.sterling = 556; 18468 t.fraction = 167; 18469 t.yen = 556; 18470 t.florin = 556; 18471 t.section = 556; 18472 t.currency = 556; 18473 t.quotesingle = 191; 18474 t.quotedblleft = 333; 18475 t.guillemotleft = 556; 18476 t.guilsinglleft = 333; 18477 t.guilsinglright = 333; 18478 t.fi = 500; 18479 t.fl = 500; 18480 t.endash = 556; 18481 t.dagger = 556; 18482 t.daggerdbl = 556; 18483 t.periodcentered = 278; 18484 t.paragraph = 537; 18485 t.bullet = 350; 18486 t.quotesinglbase = 222; 18487 t.quotedblbase = 333; 18488 t.quotedblright = 333; 18489 t.guillemotright = 556; 18490 t.ellipsis = 1000; 18491 t.perthousand = 1000; 18492 t.questiondown = 611; 18493 t.grave = 333; 18494 t.acute = 333; 18495 t.circumflex = 333; 18496 t.tilde = 333; 18497 t.macron = 333; 18498 t.breve = 333; 18499 t.dotaccent = 333; 18500 t.dieresis = 333; 18501 t.ring = 333; 18502 t.cedilla = 333; 18503 t.hungarumlaut = 333; 18504 t.ogonek = 333; 18505 t.caron = 333; 18506 t.emdash = 1000; 18507 t.AE = 1000; 18508 t.ordfeminine = 370; 18509 t.Lslash = 556; 18510 t.Oslash = 778; 18511 t.OE = 1000; 18512 t.ordmasculine = 365; 18513 t.ae = 889; 18514 t.dotlessi = 278; 18515 t.lslash = 222; 18516 t.oslash = 611; 18517 t.oe = 944; 18518 t.germandbls = 611; 18519 t.Idieresis = 278; 18520 t.eacute = 556; 18521 t.abreve = 556; 18522 t.uhungarumlaut = 556; 18523 t.ecaron = 556; 18524 t.Ydieresis = 667; 18525 t.divide = 584; 18526 t.Yacute = 667; 18527 t.Acircumflex = 667; 18528 t.aacute = 556; 18529 t.Ucircumflex = 722; 18530 t.yacute = 500; 18531 t.scommaaccent = 500; 18532 t.ecircumflex = 556; 18533 t.Uring = 722; 18534 t.Udieresis = 722; 18535 t.aogonek = 556; 18536 t.Uacute = 722; 18537 t.uogonek = 556; 18538 t.Edieresis = 667; 18539 t.Dcroat = 722; 18540 t.commaaccent = 250; 18541 t.copyright = 737; 18542 t.Emacron = 667; 18543 t.ccaron = 500; 18544 t.aring = 556; 18545 t.Ncommaaccent = 722; 18546 t.lacute = 222; 18547 t.agrave = 556; 18548 t.Tcommaaccent = 611; 18549 t.Cacute = 722; 18550 t.atilde = 556; 18551 t.Edotaccent = 667; 18552 t.scaron = 500; 18553 t.scedilla = 500; 18554 t.iacute = 278; 18555 t.lozenge = 471; 18556 t.Rcaron = 722; 18557 t.Gcommaaccent = 778; 18558 t.ucircumflex = 556; 18559 t.acircumflex = 556; 18560 t.Amacron = 667; 18561 t.rcaron = 333; 18562 t.ccedilla = 500; 18563 t.Zdotaccent = 611; 18564 t.Thorn = 667; 18565 t.Omacron = 778; 18566 t.Racute = 722; 18567 t.Sacute = 667; 18568 t.dcaron = 643; 18569 t.Umacron = 722; 18570 t.uring = 556; 18571 t.threesuperior = 333; 18572 t.Ograve = 778; 18573 t.Agrave = 667; 18574 t.Abreve = 667; 18575 t.multiply = 584; 18576 t.uacute = 556; 18577 t.Tcaron = 611; 18578 t.partialdiff = 476; 18579 t.ydieresis = 500; 18580 t.Nacute = 722; 18581 t.icircumflex = 278; 18582 t.Ecircumflex = 667; 18583 t.adieresis = 556; 18584 t.edieresis = 556; 18585 t.cacute = 500; 18586 t.nacute = 556; 18587 t.umacron = 556; 18588 t.Ncaron = 722; 18589 t.Iacute = 278; 18590 t.plusminus = 584; 18591 t.brokenbar = 260; 18592 t.registered = 737; 18593 t.Gbreve = 778; 18594 t.Idotaccent = 278; 18595 t.summation = 600; 18596 t.Egrave = 667; 18597 t.racute = 333; 18598 t.omacron = 556; 18599 t.Zacute = 611; 18600 t.Zcaron = 611; 18601 t.greaterequal = 549; 18602 t.Eth = 722; 18603 t.Ccedilla = 722; 18604 t.lcommaaccent = 222; 18605 t.tcaron = 317; 18606 t.eogonek = 556; 18607 t.Uogonek = 722; 18608 t.Aacute = 667; 18609 t.Adieresis = 667; 18610 t.egrave = 556; 18611 t.zacute = 500; 18612 t.iogonek = 222; 18613 t.Oacute = 778; 18614 t.oacute = 556; 18615 t.amacron = 556; 18616 t.sacute = 500; 18617 t.idieresis = 278; 18618 t.Ocircumflex = 778; 18619 t.Ugrave = 722; 18620 t.Delta = 612; 18621 t.thorn = 556; 18622 t.twosuperior = 333; 18623 t.Odieresis = 778; 18624 t.mu = 556; 18625 t.igrave = 278; 18626 t.ohungarumlaut = 556; 18627 t.Eogonek = 667; 18628 t.dcroat = 556; 18629 t.threequarters = 834; 18630 t.Scedilla = 667; 18631 t.lcaron = 299; 18632 t.Kcommaaccent = 667; 18633 t.Lacute = 556; 18634 t.trademark = 1000; 18635 t.edotaccent = 556; 18636 t.Igrave = 278; 18637 t.Imacron = 278; 18638 t.Lcaron = 556; 18639 t.onehalf = 834; 18640 t.lessequal = 549; 18641 t.ocircumflex = 556; 18642 t.ntilde = 556; 18643 t.Uhungarumlaut = 722; 18644 t.Eacute = 667; 18645 t.emacron = 556; 18646 t.gbreve = 556; 18647 t.onequarter = 834; 18648 t.Scaron = 667; 18649 t.Scommaaccent = 667; 18650 t.Ohungarumlaut = 778; 18651 t.degree = 400; 18652 t.ograve = 556; 18653 t.Ccaron = 722; 18654 t.ugrave = 556; 18655 t.radical = 453; 18656 t.Dcaron = 722; 18657 t.rcommaaccent = 333; 18658 t.Ntilde = 722; 18659 t.otilde = 556; 18660 t.Rcommaaccent = 722; 18661 t.Lcommaaccent = 556; 18662 t.Atilde = 667; 18663 t.Aogonek = 667; 18664 t.Aring = 667; 18665 t.Otilde = 778; 18666 t.zdotaccent = 500; 18667 t.Ecaron = 667; 18668 t.Iogonek = 278; 18669 t.kcommaaccent = 500; 18670 t.minus = 584; 18671 t.Icircumflex = 278; 18672 t.ncaron = 556; 18673 t.tcommaaccent = 278; 18674 t.logicalnot = 584; 18675 t.odieresis = 556; 18676 t.udieresis = 556; 18677 t.notequal = 549; 18678 t.gcommaaccent = 556; 18679 t.eth = 556; 18680 t.zcaron = 500; 18681 t.ncommaaccent = 556; 18682 t.onesuperior = 333; 18683 t.imacron = 278; 18684 t.Euro = 556; 18685 }); 18686 t["Helvetica-Bold"] = getLookupTableFactory(function (t) { 18687 t.space = 278; 18688 t.exclam = 333; 18689 t.quotedbl = 474; 18690 t.numbersign = 556; 18691 t.dollar = 556; 18692 t.percent = 889; 18693 t.ampersand = 722; 18694 t.quoteright = 278; 18695 t.parenleft = 333; 18696 t.parenright = 333; 18697 t.asterisk = 389; 18698 t.plus = 584; 18699 t.comma = 278; 18700 t.hyphen = 333; 18701 t.period = 278; 18702 t.slash = 278; 18703 t.zero = 556; 18704 t.one = 556; 18705 t.two = 556; 18706 t.three = 556; 18707 t.four = 556; 18708 t.five = 556; 18709 t.six = 556; 18710 t.seven = 556; 18711 t.eight = 556; 18712 t.nine = 556; 18713 t.colon = 333; 18714 t.semicolon = 333; 18715 t.less = 584; 18716 t.equal = 584; 18717 t.greater = 584; 18718 t.question = 611; 18719 t.at = 975; 18720 t.A = 722; 18721 t.B = 722; 18722 t.C = 722; 18723 t.D = 722; 18724 t.E = 667; 18725 t.F = 611; 18726 t.G = 778; 18727 t.H = 722; 18728 t.I = 278; 18729 t.J = 556; 18730 t.K = 722; 18731 t.L = 611; 18732 t.M = 833; 18733 t.N = 722; 18734 t.O = 778; 18735 t.P = 667; 18736 t.Q = 778; 18737 t.R = 722; 18738 t.S = 667; 18739 t.T = 611; 18740 t.U = 722; 18741 t.V = 667; 18742 t.W = 944; 18743 t.X = 667; 18744 t.Y = 667; 18745 t.Z = 611; 18746 t.bracketleft = 333; 18747 t.backslash = 278; 18748 t.bracketright = 333; 18749 t.asciicircum = 584; 18750 t.underscore = 556; 18751 t.quoteleft = 278; 18752 t.a = 556; 18753 t.b = 611; 18754 t.c = 556; 18755 t.d = 611; 18756 t.e = 556; 18757 t.f = 333; 18758 t.g = 611; 18759 t.h = 611; 18760 t.i = 278; 18761 t.j = 278; 18762 t.k = 556; 18763 t.l = 278; 18764 t.m = 889; 18765 t.n = 611; 18766 t.o = 611; 18767 t.p = 611; 18768 t.q = 611; 18769 t.r = 389; 18770 t.s = 556; 18771 t.t = 333; 18772 t.u = 611; 18773 t.v = 556; 18774 t.w = 778; 18775 t.x = 556; 18776 t.y = 556; 18777 t.z = 500; 18778 t.braceleft = 389; 18779 t.bar = 280; 18780 t.braceright = 389; 18781 t.asciitilde = 584; 18782 t.exclamdown = 333; 18783 t.cent = 556; 18784 t.sterling = 556; 18785 t.fraction = 167; 18786 t.yen = 556; 18787 t.florin = 556; 18788 t.section = 556; 18789 t.currency = 556; 18790 t.quotesingle = 238; 18791 t.quotedblleft = 500; 18792 t.guillemotleft = 556; 18793 t.guilsinglleft = 333; 18794 t.guilsinglright = 333; 18795 t.fi = 611; 18796 t.fl = 611; 18797 t.endash = 556; 18798 t.dagger = 556; 18799 t.daggerdbl = 556; 18800 t.periodcentered = 278; 18801 t.paragraph = 556; 18802 t.bullet = 350; 18803 t.quotesinglbase = 278; 18804 t.quotedblbase = 500; 18805 t.quotedblright = 500; 18806 t.guillemotright = 556; 18807 t.ellipsis = 1000; 18808 t.perthousand = 1000; 18809 t.questiondown = 611; 18810 t.grave = 333; 18811 t.acute = 333; 18812 t.circumflex = 333; 18813 t.tilde = 333; 18814 t.macron = 333; 18815 t.breve = 333; 18816 t.dotaccent = 333; 18817 t.dieresis = 333; 18818 t.ring = 333; 18819 t.cedilla = 333; 18820 t.hungarumlaut = 333; 18821 t.ogonek = 333; 18822 t.caron = 333; 18823 t.emdash = 1000; 18824 t.AE = 1000; 18825 t.ordfeminine = 370; 18826 t.Lslash = 611; 18827 t.Oslash = 778; 18828 t.OE = 1000; 18829 t.ordmasculine = 365; 18830 t.ae = 889; 18831 t.dotlessi = 278; 18832 t.lslash = 278; 18833 t.oslash = 611; 18834 t.oe = 944; 18835 t.germandbls = 611; 18836 t.Idieresis = 278; 18837 t.eacute = 556; 18838 t.abreve = 556; 18839 t.uhungarumlaut = 611; 18840 t.ecaron = 556; 18841 t.Ydieresis = 667; 18842 t.divide = 584; 18843 t.Yacute = 667; 18844 t.Acircumflex = 722; 18845 t.aacute = 556; 18846 t.Ucircumflex = 722; 18847 t.yacute = 556; 18848 t.scommaaccent = 556; 18849 t.ecircumflex = 556; 18850 t.Uring = 722; 18851 t.Udieresis = 722; 18852 t.aogonek = 556; 18853 t.Uacute = 722; 18854 t.uogonek = 611; 18855 t.Edieresis = 667; 18856 t.Dcroat = 722; 18857 t.commaaccent = 250; 18858 t.copyright = 737; 18859 t.Emacron = 667; 18860 t.ccaron = 556; 18861 t.aring = 556; 18862 t.Ncommaaccent = 722; 18863 t.lacute = 278; 18864 t.agrave = 556; 18865 t.Tcommaaccent = 611; 18866 t.Cacute = 722; 18867 t.atilde = 556; 18868 t.Edotaccent = 667; 18869 t.scaron = 556; 18870 t.scedilla = 556; 18871 t.iacute = 278; 18872 t.lozenge = 494; 18873 t.Rcaron = 722; 18874 t.Gcommaaccent = 778; 18875 t.ucircumflex = 611; 18876 t.acircumflex = 556; 18877 t.Amacron = 722; 18878 t.rcaron = 389; 18879 t.ccedilla = 556; 18880 t.Zdotaccent = 611; 18881 t.Thorn = 667; 18882 t.Omacron = 778; 18883 t.Racute = 722; 18884 t.Sacute = 667; 18885 t.dcaron = 743; 18886 t.Umacron = 722; 18887 t.uring = 611; 18888 t.threesuperior = 333; 18889 t.Ograve = 778; 18890 t.Agrave = 722; 18891 t.Abreve = 722; 18892 t.multiply = 584; 18893 t.uacute = 611; 18894 t.Tcaron = 611; 18895 t.partialdiff = 494; 18896 t.ydieresis = 556; 18897 t.Nacute = 722; 18898 t.icircumflex = 278; 18899 t.Ecircumflex = 667; 18900 t.adieresis = 556; 18901 t.edieresis = 556; 18902 t.cacute = 556; 18903 t.nacute = 611; 18904 t.umacron = 611; 18905 t.Ncaron = 722; 18906 t.Iacute = 278; 18907 t.plusminus = 584; 18908 t.brokenbar = 280; 18909 t.registered = 737; 18910 t.Gbreve = 778; 18911 t.Idotaccent = 278; 18912 t.summation = 600; 18913 t.Egrave = 667; 18914 t.racute = 389; 18915 t.omacron = 611; 18916 t.Zacute = 611; 18917 t.Zcaron = 611; 18918 t.greaterequal = 549; 18919 t.Eth = 722; 18920 t.Ccedilla = 722; 18921 t.lcommaaccent = 278; 18922 t.tcaron = 389; 18923 t.eogonek = 556; 18924 t.Uogonek = 722; 18925 t.Aacute = 722; 18926 t.Adieresis = 722; 18927 t.egrave = 556; 18928 t.zacute = 500; 18929 t.iogonek = 278; 18930 t.Oacute = 778; 18931 t.oacute = 611; 18932 t.amacron = 556; 18933 t.sacute = 556; 18934 t.idieresis = 278; 18935 t.Ocircumflex = 778; 18936 t.Ugrave = 722; 18937 t.Delta = 612; 18938 t.thorn = 611; 18939 t.twosuperior = 333; 18940 t.Odieresis = 778; 18941 t.mu = 611; 18942 t.igrave = 278; 18943 t.ohungarumlaut = 611; 18944 t.Eogonek = 667; 18945 t.dcroat = 611; 18946 t.threequarters = 834; 18947 t.Scedilla = 667; 18948 t.lcaron = 400; 18949 t.Kcommaaccent = 722; 18950 t.Lacute = 611; 18951 t.trademark = 1000; 18952 t.edotaccent = 556; 18953 t.Igrave = 278; 18954 t.Imacron = 278; 18955 t.Lcaron = 611; 18956 t.onehalf = 834; 18957 t.lessequal = 549; 18958 t.ocircumflex = 611; 18959 t.ntilde = 611; 18960 t.Uhungarumlaut = 722; 18961 t.Eacute = 667; 18962 t.emacron = 556; 18963 t.gbreve = 611; 18964 t.onequarter = 834; 18965 t.Scaron = 667; 18966 t.Scommaaccent = 667; 18967 t.Ohungarumlaut = 778; 18968 t.degree = 400; 18969 t.ograve = 611; 18970 t.Ccaron = 722; 18971 t.ugrave = 611; 18972 t.radical = 549; 18973 t.Dcaron = 722; 18974 t.rcommaaccent = 389; 18975 t.Ntilde = 722; 18976 t.otilde = 611; 18977 t.Rcommaaccent = 722; 18978 t.Lcommaaccent = 611; 18979 t.Atilde = 722; 18980 t.Aogonek = 722; 18981 t.Aring = 722; 18982 t.Otilde = 778; 18983 t.zdotaccent = 500; 18984 t.Ecaron = 667; 18985 t.Iogonek = 278; 18986 t.kcommaaccent = 556; 18987 t.minus = 584; 18988 t.Icircumflex = 278; 18989 t.ncaron = 611; 18990 t.tcommaaccent = 333; 18991 t.logicalnot = 584; 18992 t.odieresis = 611; 18993 t.udieresis = 611; 18994 t.notequal = 549; 18995 t.gcommaaccent = 611; 18996 t.eth = 611; 18997 t.zcaron = 500; 18998 t.ncommaaccent = 611; 18999 t.onesuperior = 333; 19000 t.imacron = 278; 19001 t.Euro = 556; 19002 }); 19003 t["Helvetica-BoldOblique"] = getLookupTableFactory(function (t) { 19004 t.space = 278; 19005 t.exclam = 333; 19006 t.quotedbl = 474; 19007 t.numbersign = 556; 19008 t.dollar = 556; 19009 t.percent = 889; 19010 t.ampersand = 722; 19011 t.quoteright = 278; 19012 t.parenleft = 333; 19013 t.parenright = 333; 19014 t.asterisk = 389; 19015 t.plus = 584; 19016 t.comma = 278; 19017 t.hyphen = 333; 19018 t.period = 278; 19019 t.slash = 278; 19020 t.zero = 556; 19021 t.one = 556; 19022 t.two = 556; 19023 t.three = 556; 19024 t.four = 556; 19025 t.five = 556; 19026 t.six = 556; 19027 t.seven = 556; 19028 t.eight = 556; 19029 t.nine = 556; 19030 t.colon = 333; 19031 t.semicolon = 333; 19032 t.less = 584; 19033 t.equal = 584; 19034 t.greater = 584; 19035 t.question = 611; 19036 t.at = 975; 19037 t.A = 722; 19038 t.B = 722; 19039 t.C = 722; 19040 t.D = 722; 19041 t.E = 667; 19042 t.F = 611; 19043 t.G = 778; 19044 t.H = 722; 19045 t.I = 278; 19046 t.J = 556; 19047 t.K = 722; 19048 t.L = 611; 19049 t.M = 833; 19050 t.N = 722; 19051 t.O = 778; 19052 t.P = 667; 19053 t.Q = 778; 19054 t.R = 722; 19055 t.S = 667; 19056 t.T = 611; 19057 t.U = 722; 19058 t.V = 667; 19059 t.W = 944; 19060 t.X = 667; 19061 t.Y = 667; 19062 t.Z = 611; 19063 t.bracketleft = 333; 19064 t.backslash = 278; 19065 t.bracketright = 333; 19066 t.asciicircum = 584; 19067 t.underscore = 556; 19068 t.quoteleft = 278; 19069 t.a = 556; 19070 t.b = 611; 19071 t.c = 556; 19072 t.d = 611; 19073 t.e = 556; 19074 t.f = 333; 19075 t.g = 611; 19076 t.h = 611; 19077 t.i = 278; 19078 t.j = 278; 19079 t.k = 556; 19080 t.l = 278; 19081 t.m = 889; 19082 t.n = 611; 19083 t.o = 611; 19084 t.p = 611; 19085 t.q = 611; 19086 t.r = 389; 19087 t.s = 556; 19088 t.t = 333; 19089 t.u = 611; 19090 t.v = 556; 19091 t.w = 778; 19092 t.x = 556; 19093 t.y = 556; 19094 t.z = 500; 19095 t.braceleft = 389; 19096 t.bar = 280; 19097 t.braceright = 389; 19098 t.asciitilde = 584; 19099 t.exclamdown = 333; 19100 t.cent = 556; 19101 t.sterling = 556; 19102 t.fraction = 167; 19103 t.yen = 556; 19104 t.florin = 556; 19105 t.section = 556; 19106 t.currency = 556; 19107 t.quotesingle = 238; 19108 t.quotedblleft = 500; 19109 t.guillemotleft = 556; 19110 t.guilsinglleft = 333; 19111 t.guilsinglright = 333; 19112 t.fi = 611; 19113 t.fl = 611; 19114 t.endash = 556; 19115 t.dagger = 556; 19116 t.daggerdbl = 556; 19117 t.periodcentered = 278; 19118 t.paragraph = 556; 19119 t.bullet = 350; 19120 t.quotesinglbase = 278; 19121 t.quotedblbase = 500; 19122 t.quotedblright = 500; 19123 t.guillemotright = 556; 19124 t.ellipsis = 1000; 19125 t.perthousand = 1000; 19126 t.questiondown = 611; 19127 t.grave = 333; 19128 t.acute = 333; 19129 t.circumflex = 333; 19130 t.tilde = 333; 19131 t.macron = 333; 19132 t.breve = 333; 19133 t.dotaccent = 333; 19134 t.dieresis = 333; 19135 t.ring = 333; 19136 t.cedilla = 333; 19137 t.hungarumlaut = 333; 19138 t.ogonek = 333; 19139 t.caron = 333; 19140 t.emdash = 1000; 19141 t.AE = 1000; 19142 t.ordfeminine = 370; 19143 t.Lslash = 611; 19144 t.Oslash = 778; 19145 t.OE = 1000; 19146 t.ordmasculine = 365; 19147 t.ae = 889; 19148 t.dotlessi = 278; 19149 t.lslash = 278; 19150 t.oslash = 611; 19151 t.oe = 944; 19152 t.germandbls = 611; 19153 t.Idieresis = 278; 19154 t.eacute = 556; 19155 t.abreve = 556; 19156 t.uhungarumlaut = 611; 19157 t.ecaron = 556; 19158 t.Ydieresis = 667; 19159 t.divide = 584; 19160 t.Yacute = 667; 19161 t.Acircumflex = 722; 19162 t.aacute = 556; 19163 t.Ucircumflex = 722; 19164 t.yacute = 556; 19165 t.scommaaccent = 556; 19166 t.ecircumflex = 556; 19167 t.Uring = 722; 19168 t.Udieresis = 722; 19169 t.aogonek = 556; 19170 t.Uacute = 722; 19171 t.uogonek = 611; 19172 t.Edieresis = 667; 19173 t.Dcroat = 722; 19174 t.commaaccent = 250; 19175 t.copyright = 737; 19176 t.Emacron = 667; 19177 t.ccaron = 556; 19178 t.aring = 556; 19179 t.Ncommaaccent = 722; 19180 t.lacute = 278; 19181 t.agrave = 556; 19182 t.Tcommaaccent = 611; 19183 t.Cacute = 722; 19184 t.atilde = 556; 19185 t.Edotaccent = 667; 19186 t.scaron = 556; 19187 t.scedilla = 556; 19188 t.iacute = 278; 19189 t.lozenge = 494; 19190 t.Rcaron = 722; 19191 t.Gcommaaccent = 778; 19192 t.ucircumflex = 611; 19193 t.acircumflex = 556; 19194 t.Amacron = 722; 19195 t.rcaron = 389; 19196 t.ccedilla = 556; 19197 t.Zdotaccent = 611; 19198 t.Thorn = 667; 19199 t.Omacron = 778; 19200 t.Racute = 722; 19201 t.Sacute = 667; 19202 t.dcaron = 743; 19203 t.Umacron = 722; 19204 t.uring = 611; 19205 t.threesuperior = 333; 19206 t.Ograve = 778; 19207 t.Agrave = 722; 19208 t.Abreve = 722; 19209 t.multiply = 584; 19210 t.uacute = 611; 19211 t.Tcaron = 611; 19212 t.partialdiff = 494; 19213 t.ydieresis = 556; 19214 t.Nacute = 722; 19215 t.icircumflex = 278; 19216 t.Ecircumflex = 667; 19217 t.adieresis = 556; 19218 t.edieresis = 556; 19219 t.cacute = 556; 19220 t.nacute = 611; 19221 t.umacron = 611; 19222 t.Ncaron = 722; 19223 t.Iacute = 278; 19224 t.plusminus = 584; 19225 t.brokenbar = 280; 19226 t.registered = 737; 19227 t.Gbreve = 778; 19228 t.Idotaccent = 278; 19229 t.summation = 600; 19230 t.Egrave = 667; 19231 t.racute = 389; 19232 t.omacron = 611; 19233 t.Zacute = 611; 19234 t.Zcaron = 611; 19235 t.greaterequal = 549; 19236 t.Eth = 722; 19237 t.Ccedilla = 722; 19238 t.lcommaaccent = 278; 19239 t.tcaron = 389; 19240 t.eogonek = 556; 19241 t.Uogonek = 722; 19242 t.Aacute = 722; 19243 t.Adieresis = 722; 19244 t.egrave = 556; 19245 t.zacute = 500; 19246 t.iogonek = 278; 19247 t.Oacute = 778; 19248 t.oacute = 611; 19249 t.amacron = 556; 19250 t.sacute = 556; 19251 t.idieresis = 278; 19252 t.Ocircumflex = 778; 19253 t.Ugrave = 722; 19254 t.Delta = 612; 19255 t.thorn = 611; 19256 t.twosuperior = 333; 19257 t.Odieresis = 778; 19258 t.mu = 611; 19259 t.igrave = 278; 19260 t.ohungarumlaut = 611; 19261 t.Eogonek = 667; 19262 t.dcroat = 611; 19263 t.threequarters = 834; 19264 t.Scedilla = 667; 19265 t.lcaron = 400; 19266 t.Kcommaaccent = 722; 19267 t.Lacute = 611; 19268 t.trademark = 1000; 19269 t.edotaccent = 556; 19270 t.Igrave = 278; 19271 t.Imacron = 278; 19272 t.Lcaron = 611; 19273 t.onehalf = 834; 19274 t.lessequal = 549; 19275 t.ocircumflex = 611; 19276 t.ntilde = 611; 19277 t.Uhungarumlaut = 722; 19278 t.Eacute = 667; 19279 t.emacron = 556; 19280 t.gbreve = 611; 19281 t.onequarter = 834; 19282 t.Scaron = 667; 19283 t.Scommaaccent = 667; 19284 t.Ohungarumlaut = 778; 19285 t.degree = 400; 19286 t.ograve = 611; 19287 t.Ccaron = 722; 19288 t.ugrave = 611; 19289 t.radical = 549; 19290 t.Dcaron = 722; 19291 t.rcommaaccent = 389; 19292 t.Ntilde = 722; 19293 t.otilde = 611; 19294 t.Rcommaaccent = 722; 19295 t.Lcommaaccent = 611; 19296 t.Atilde = 722; 19297 t.Aogonek = 722; 19298 t.Aring = 722; 19299 t.Otilde = 778; 19300 t.zdotaccent = 500; 19301 t.Ecaron = 667; 19302 t.Iogonek = 278; 19303 t.kcommaaccent = 556; 19304 t.minus = 584; 19305 t.Icircumflex = 278; 19306 t.ncaron = 611; 19307 t.tcommaaccent = 333; 19308 t.logicalnot = 584; 19309 t.odieresis = 611; 19310 t.udieresis = 611; 19311 t.notequal = 549; 19312 t.gcommaaccent = 611; 19313 t.eth = 611; 19314 t.zcaron = 500; 19315 t.ncommaaccent = 611; 19316 t.onesuperior = 333; 19317 t.imacron = 278; 19318 t.Euro = 556; 19319 }); 19320 t["Helvetica-Oblique"] = getLookupTableFactory(function (t) { 19321 t.space = 278; 19322 t.exclam = 278; 19323 t.quotedbl = 355; 19324 t.numbersign = 556; 19325 t.dollar = 556; 19326 t.percent = 889; 19327 t.ampersand = 667; 19328 t.quoteright = 222; 19329 t.parenleft = 333; 19330 t.parenright = 333; 19331 t.asterisk = 389; 19332 t.plus = 584; 19333 t.comma = 278; 19334 t.hyphen = 333; 19335 t.period = 278; 19336 t.slash = 278; 19337 t.zero = 556; 19338 t.one = 556; 19339 t.two = 556; 19340 t.three = 556; 19341 t.four = 556; 19342 t.five = 556; 19343 t.six = 556; 19344 t.seven = 556; 19345 t.eight = 556; 19346 t.nine = 556; 19347 t.colon = 278; 19348 t.semicolon = 278; 19349 t.less = 584; 19350 t.equal = 584; 19351 t.greater = 584; 19352 t.question = 556; 19353 t.at = 1015; 19354 t.A = 667; 19355 t.B = 667; 19356 t.C = 722; 19357 t.D = 722; 19358 t.E = 667; 19359 t.F = 611; 19360 t.G = 778; 19361 t.H = 722; 19362 t.I = 278; 19363 t.J = 500; 19364 t.K = 667; 19365 t.L = 556;
vendor: 4,866 bytes, lines 19366-19600
19366 t.M = 833; 19367 t.N = 722; 19368 t.O = 778; 19369 t.P = 667; 19370 t.Q = 778; 19371 t.R = 722; 19372 t.S = 667; 19373 t.T = 611; 19374 t.U = 722; 19375 t.V = 667; 19376 t.W = 944; 19377 t.X = 667; 19378 t.Y = 667; 19379 t.Z = 611; 19380 t.bracketleft = 278; 19381 t.backslash = 278; 19382 t.bracketright = 278; 19383 t.asciicircum = 469; 19384 t.underscore = 556; 19385 t.quoteleft = 222; 19386 t.a = 556; 19387 t.b = 556; 19388 t.c = 500; 19389 t.d = 556; 19390 t.e = 556; 19391 t.f = 278; 19392 t.g = 556; 19393 t.h = 556; 19394 t.i = 222; 19395 t.j = 222; 19396 t.k = 500; 19397 t.l = 222; 19398 t.m = 833; 19399 t.n = 556; 19400 t.o = 556; 19401 t.p = 556; 19402 t.q = 556; 19403 t.r = 333; 19404 t.s = 500; 19405 t.t = 278; 19406 t.u = 556; 19407 t.v = 500; 19408 t.w = 722; 19409 t.x = 500; 19410 t.y = 500; 19411 t.z = 500; 19412 t.braceleft = 334; 19413 t.bar = 260; 19414 t.braceright = 334; 19415 t.asciitilde = 584; 19416 t.exclamdown = 333; 19417 t.cent = 556; 19418 t.sterling = 556; 19419 t.fraction = 167; 19420 t.yen = 556; 19421 t.florin = 556; 19422 t.section = 556; 19423 t.currency = 556; 19424 t.quotesingle = 191; 19425 t.quotedblleft = 333; 19426 t.guillemotleft = 556; 19427 t.guilsinglleft = 333; 19428 t.guilsinglright = 333; 19429 t.fi = 500; 19430 t.fl = 500; 19431 t.endash = 556; 19432 t.dagger = 556; 19433 t.daggerdbl = 556; 19434 t.periodcentered = 278; 19435 t.paragraph = 537; 19436 t.bullet = 350; 19437 t.quotesinglbase = 222; 19438 t.quotedblbase = 333; 19439 t.quotedblright = 333; 19440 t.guillemotright = 556; 19441 t.ellipsis = 1000; 19442 t.perthousand = 1000; 19443 t.questiondown = 611; 19444 t.grave = 333; 19445 t.acute = 333; 19446 t.circumflex = 333; 19447 t.tilde = 333; 19448 t.macron = 333; 19449 t.breve = 333; 19450 t.dotaccent = 333; 19451 t.dieresis = 333; 19452 t.ring = 333; 19453 t.cedilla = 333; 19454 t.hungarumlaut = 333; 19455 t.ogonek = 333; 19456 t.caron = 333; 19457 t.emdash = 1000; 19458 t.AE = 1000; 19459 t.ordfeminine = 370; 19460 t.Lslash = 556; 19461 t.Oslash = 778; 19462 t.OE = 1000; 19463 t.ordmasculine = 365; 19464 t.ae = 889; 19465 t.dotlessi = 278; 19466 t.lslash = 222; 19467 t.oslash = 611; 19468 t.oe = 944; 19469 t.germandbls = 611; 19470 t.Idieresis = 278; 19471 t.eacute = 556; 19472 t.abreve = 556; 19473 t.uhungarumlaut = 556; 19474 t.ecaron = 556; 19475 t.Ydieresis = 667; 19476 t.divide = 584; 19477 t.Yacute = 667; 19478 t.Acircumflex = 667; 19479 t.aacute = 556; 19480 t.Ucircumflex = 722; 19481 t.yacute = 500; 19482 t.scommaaccent = 500; 19483 t.ecircumflex = 556; 19484 t.Uring = 722; 19485 t.Udieresis = 722; 19486 t.aogonek = 556; 19487 t.Uacute = 722; 19488 t.uogonek = 556; 19489 t.Edieresis = 667; 19490 t.Dcroat = 722; 19491 t.commaaccent = 250; 19492 t.copyright = 737; 19493 t.Emacron = 667; 19494 t.ccaron = 500; 19495 t.aring = 556; 19496 t.Ncommaaccent = 722; 19497 t.lacute = 222; 19498 t.agrave = 556; 19499 t.Tcommaaccent = 611; 19500 t.Cacute = 722; 19501 t.atilde = 556; 19502 t.Edotaccent = 667; 19503 t.scaron = 500; 19504 t.scedilla = 500; 19505 t.iacute = 278; 19506 t.lozenge = 471; 19507 t.Rcaron = 722; 19508 t.Gcommaaccent = 778; 19509 t.ucircumflex = 556; 19510 t.acircumflex = 556; 19511 t.Amacron = 667; 19512 t.rcaron = 333; 19513 t.ccedilla = 500; 19514 t.Zdotaccent = 611; 19515 t.Thorn = 667; 19516 t.Omacron = 778; 19517 t.Racute = 722; 19518 t.Sacute = 667; 19519 t.dcaron = 643; 19520 t.Umacron = 722; 19521 t.uring = 556; 19522 t.threesuperior = 333; 19523 t.Ograve = 778; 19524 t.Agrave = 667; 19525 t.Abreve = 667; 19526 t.multiply = 584; 19527 t.uacute = 556; 19528 t.Tcaron = 611; 19529 t.partialdiff = 476; 19530 t.ydieresis = 500; 19531 t.Nacute = 722; 19532 t.icircumflex = 278; 19533 t.Ecircumflex = 667; 19534 t.adieresis = 556; 19535 t.edieresis = 556; 19536 t.cacute = 500; 19537 t.nacute = 556; 19538 t.umacron = 556; 19539 t.Ncaron = 722; 19540 t.Iacute = 278; 19541 t.plusminus = 584; 19542 t.brokenbar = 260; 19543 t.registered = 737; 19544 t.Gbreve = 778; 19545 t.Idotaccent = 278; 19546 t.summation = 600; 19547 t.Egrave = 667; 19548 t.racute = 333; 19549 t.omacron = 556; 19550 t.Zacute = 611; 19551 t.Zcaron = 611; 19552 t.greaterequal = 549; 19553 t.Eth = 722; 19554 t.Ccedilla = 722; 19555 t.lcommaaccent = 222; 19556 t.tcaron = 317; 19557 t.eogonek = 556; 19558 t.Uogonek = 722; 19559 t.Aacute = 667; 19560 t.Adieresis = 667; 19561 t.egrave = 556; 19562 t.zacute = 500; 19563 t.iogonek = 222; 19564 t.Oacute = 778; 19565 t.oacute = 556; 19566 t.amacron = 556; 19567 t.sacute = 500; 19568 t.idieresis = 278; 19569 t.Ocircumflex = 778; 19570 t.Ugrave = 722; 19571 t.Delta = 612; 19572 t.thorn = 556; 19573 t.twosuperior = 333; 19574 t.Odieresis = 778; 19575 t.mu = 556; 19576 t.igrave = 278; 19577 t.ohungarumlaut = 556; 19578 t.Eogonek = 667; 19579 t.dcroat = 556; 19580 t.threequarters = 834; 19581 t.Scedilla = 667; 19582 t.lcaron = 299; 19583 t.Kcommaaccent = 667; 19584 t.Lacute = 556; 19585 t.trademark = 1000; 19586 t.edotaccent = 556; 19587 t.Igrave = 278; 19588 t.Imacron = 278; 19589 t.Lcaron = 556; 19590 t.onehalf = 834; 19591 t.lessequal = 549; 19592 t.ocircumflex = 556; 19593 t.ntilde = 556; 19594 t.Uhungarumlaut = 722; 19595 t.Eacute = 667; 19596 t.emacron = 556; 19597 t.gbreve = 556; 19598 t.onequarter = 834; 19599 t.Scaron = 667; 19600 t.Scommaaccent = 667;
vendor: 25,462 bytes, lines 19601-20825
19601 t.Ohungarumlaut = 778; 19602 t.degree = 400; 19603 t.ograve = 556; 19604 t.Ccaron = 722; 19605 t.ugrave = 556; 19606 t.radical = 453; 19607 t.Dcaron = 722; 19608 t.rcommaaccent = 333; 19609 t.Ntilde = 722; 19610 t.otilde = 556; 19611 t.Rcommaaccent = 722; 19612 t.Lcommaaccent = 556; 19613 t.Atilde = 667; 19614 t.Aogonek = 667; 19615 t.Aring = 667; 19616 t.Otilde = 778; 19617 t.zdotaccent = 500; 19618 t.Ecaron = 667; 19619 t.Iogonek = 278; 19620 t.kcommaaccent = 500; 19621 t.minus = 584; 19622 t.Icircumflex = 278; 19623 t.ncaron = 556; 19624 t.tcommaaccent = 278; 19625 t.logicalnot = 584; 19626 t.odieresis = 556; 19627 t.udieresis = 556; 19628 t.notequal = 549; 19629 t.gcommaaccent = 556; 19630 t.eth = 556; 19631 t.zcaron = 500; 19632 t.ncommaaccent = 556; 19633 t.onesuperior = 333; 19634 t.imacron = 278; 19635 t.Euro = 556; 19636 }); 19637 t.Symbol = getLookupTableFactory(function (t) { 19638 t.space = 250; 19639 t.exclam = 333; 19640 t.universal = 713; 19641 t.numbersign = 500; 19642 t.existential = 549; 19643 t.percent = 833; 19644 t.ampersand = 778; 19645 t.suchthat = 439; 19646 t.parenleft = 333; 19647 t.parenright = 333; 19648 t.asteriskmath = 500; 19649 t.plus = 549; 19650 t.comma = 250; 19651 t.minus = 549; 19652 t.period = 250; 19653 t.slash = 278; 19654 t.zero = 500; 19655 t.one = 500; 19656 t.two = 500; 19657 t.three = 500; 19658 t.four = 500; 19659 t.five = 500; 19660 t.six = 500; 19661 t.seven = 500; 19662 t.eight = 500; 19663 t.nine = 500; 19664 t.colon = 278; 19665 t.semicolon = 278; 19666 t.less = 549; 19667 t.equal = 549; 19668 t.greater = 549; 19669 t.question = 444; 19670 t.congruent = 549; 19671 t.Alpha = 722; 19672 t.Beta = 667; 19673 t.Chi = 722; 19674 t.Delta = 612; 19675 t.Epsilon = 611; 19676 t.Phi = 763; 19677 t.Gamma = 603; 19678 t.Eta = 722; 19679 t.Iota = 333; 19680 t.theta1 = 631; 19681 t.Kappa = 722; 19682 t.Lambda = 686; 19683 t.Mu = 889; 19684 t.Nu = 722; 19685 t.Omicron = 722; 19686 t.Pi = 768; 19687 t.Theta = 741; 19688 t.Rho = 556; 19689 t.Sigma = 592; 19690 t.Tau = 611; 19691 t.Upsilon = 690; 19692 t.sigma1 = 439; 19693 t.Omega = 768; 19694 t.Xi = 645; 19695 t.Psi = 795; 19696 t.Zeta = 611; 19697 t.bracketleft = 333; 19698 t.therefore = 863; 19699 t.bracketright = 333; 19700 t.perpendicular = 658; 19701 t.underscore = 500; 19702 t.radicalex = 500; 19703 t.alpha = 631; 19704 t.beta = 549; 19705 t.chi = 549; 19706 t.delta = 494; 19707 t.epsilon = 439; 19708 t.phi = 521; 19709 t.gamma = 411; 19710 t.eta = 603; 19711 t.iota = 329; 19712 t.phi1 = 603; 19713 t.kappa = 549; 19714 t.lambda = 549; 19715 t.mu = 576; 19716 t.nu = 521; 19717 t.omicron = 549; 19718 t.pi = 549; 19719 t.theta = 521; 19720 t.rho = 549; 19721 t.sigma = 603; 19722 t.tau = 439; 19723 t.upsilon = 576; 19724 t.omega1 = 713; 19725 t.omega = 686; 19726 t.xi = 493; 19727 t.psi = 686; 19728 t.zeta = 494; 19729 t.braceleft = 480; 19730 t.bar = 200; 19731 t.braceright = 480; 19732 t.similar = 549; 19733 t.Euro = 750; 19734 t.Upsilon1 = 620; 19735 t.minute = 247; 19736 t.lessequal = 549; 19737 t.fraction = 167; 19738 t.infinity = 713; 19739 t.florin = 500; 19740 t.club = 753; 19741 t.diamond = 753; 19742 t.heart = 753; 19743 t.spade = 753; 19744 t.arrowboth = 1042; 19745 t.arrowleft = 987; 19746 t.arrowup = 603; 19747 t.arrowright = 987; 19748 t.arrowdown = 603; 19749 t.degree = 400; 19750 t.plusminus = 549; 19751 t.second = 411; 19752 t.greaterequal = 549; 19753 t.multiply = 549; 19754 t.proportional = 713; 19755 t.partialdiff = 494; 19756 t.bullet = 460; 19757 t.divide = 549; 19758 t.notequal = 549; 19759 t.equivalence = 549; 19760 t.approxequal = 549; 19761 t.ellipsis = 1000; 19762 t.arrowvertex = 603; 19763 t.arrowhorizex = 1000; 19764 t.carriagereturn = 658; 19765 t.aleph = 823; 19766 t.Ifraktur = 686; 19767 t.Rfraktur = 795; 19768 t.weierstrass = 987; 19769 t.circlemultiply = 768; 19770 t.circleplus = 768; 19771 t.emptyset = 823; 19772 t.intersection = 768; 19773 t.union = 768; 19774 t.propersuperset = 713; 19775 t.reflexsuperset = 713; 19776 t.notsubset = 713; 19777 t.propersubset = 713; 19778 t.reflexsubset = 713; 19779 t.element = 713; 19780 t.notelement = 713; 19781 t.angle = 768; 19782 t.gradient = 713; 19783 t.registerserif = 790; 19784 t.copyrightserif = 790; 19785 t.trademarkserif = 890; 19786 t.product = 823; 19787 t.radical = 549; 19788 t.dotmath = 250; 19789 t.logicalnot = 713; 19790 t.logicaland = 603; 19791 t.logicalor = 603; 19792 t.arrowdblboth = 1042; 19793 t.arrowdblleft = 987; 19794 t.arrowdblup = 603; 19795 t.arrowdblright = 987; 19796 t.arrowdbldown = 603; 19797 t.lozenge = 494; 19798 t.angleleft = 329; 19799 t.registersans = 790; 19800 t.copyrightsans = 790; 19801 t.trademarksans = 786; 19802 t.summation = 713; 19803 t.parenlefttp = 384; 19804 t.parenleftex = 384; 19805 t.parenleftbt = 384; 19806 t.bracketlefttp = 384; 19807 t.bracketleftex = 384; 19808 t.bracketleftbt = 384; 19809 t.bracelefttp = 494; 19810 t.braceleftmid = 494; 19811 t.braceleftbt = 494; 19812 t.braceex = 494; 19813 t.angleright = 329; 19814 t.integral = 274; 19815 t.integraltp = 686; 19816 t.integralex = 686; 19817 t.integralbt = 686; 19818 t.parenrighttp = 384; 19819 t.parenrightex = 384; 19820 t.parenrightbt = 384; 19821 t.bracketrighttp = 384; 19822 t.bracketrightex = 384; 19823 t.bracketrightbt = 384; 19824 t.bracerighttp = 494; 19825 t.bracerightmid = 494; 19826 t.bracerightbt = 494; 19827 t.apple = 790; 19828 }); 19829 t["Times-Roman"] = getLookupTableFactory(function (t) { 19830 t.space = 250; 19831 t.exclam = 333; 19832 t.quotedbl = 408; 19833 t.numbersign = 500; 19834 t.dollar = 500; 19835 t.percent = 833; 19836 t.ampersand = 778; 19837 t.quoteright = 333; 19838 t.parenleft = 333; 19839 t.parenright = 333; 19840 t.asterisk = 500; 19841 t.plus = 564; 19842 t.comma = 250; 19843 t.hyphen = 333; 19844 t.period = 250; 19845 t.slash = 278; 19846 t.zero = 500; 19847 t.one = 500; 19848 t.two = 500; 19849 t.three = 500; 19850 t.four = 500; 19851 t.five = 500; 19852 t.six = 500; 19853 t.seven = 500; 19854 t.eight = 500; 19855 t.nine = 500; 19856 t.colon = 278; 19857 t.semicolon = 278; 19858 t.less = 564; 19859 t.equal = 564; 19860 t.greater = 564; 19861 t.question = 444; 19862 t.at = 921; 19863 t.A = 722; 19864 t.B = 667; 19865 t.C = 667; 19866 t.D = 722; 19867 t.E = 611; 19868 t.F = 556; 19869 t.G = 722; 19870 t.H = 722; 19871 t.I = 333; 19872 t.J = 389; 19873 t.K = 722; 19874 t.L = 611; 19875 t.M = 889; 19876 t.N = 722; 19877 t.O = 722; 19878 t.P = 556; 19879 t.Q = 722; 19880 t.R = 667; 19881 t.S = 556; 19882 t.T = 611; 19883 t.U = 722; 19884 t.V = 722; 19885 t.W = 944; 19886 t.X = 722; 19887 t.Y = 722; 19888 t.Z = 611; 19889 t.bracketleft = 333; 19890 t.backslash = 278; 19891 t.bracketright = 333; 19892 t.asciicircum = 469; 19893 t.underscore = 500; 19894 t.quoteleft = 333; 19895 t.a = 444; 19896 t.b = 500; 19897 t.c = 444; 19898 t.d = 500; 19899 t.e = 444; 19900 t.f = 333; 19901 t.g = 500; 19902 t.h = 500; 19903 t.i = 278; 19904 t.j = 278; 19905 t.k = 500; 19906 t.l = 278; 19907 t.m = 778; 19908 t.n = 500; 19909 t.o = 500; 19910 t.p = 500; 19911 t.q = 500; 19912 t.r = 333; 19913 t.s = 389; 19914 t.t = 278; 19915 t.u = 500; 19916 t.v = 500; 19917 t.w = 722; 19918 t.x = 500; 19919 t.y = 500; 19920 t.z = 444; 19921 t.braceleft = 480; 19922 t.bar = 200; 19923 t.braceright = 480; 19924 t.asciitilde = 541; 19925 t.exclamdown = 333; 19926 t.cent = 500; 19927 t.sterling = 500; 19928 t.fraction = 167; 19929 t.yen = 500; 19930 t.florin = 500; 19931 t.section = 500; 19932 t.currency = 500; 19933 t.quotesingle = 180; 19934 t.quotedblleft = 444; 19935 t.guillemotleft = 500; 19936 t.guilsinglleft = 333; 19937 t.guilsinglright = 333; 19938 t.fi = 556; 19939 t.fl = 556; 19940 t.endash = 500; 19941 t.dagger = 500; 19942 t.daggerdbl = 500; 19943 t.periodcentered = 250; 19944 t.paragraph = 453; 19945 t.bullet = 350; 19946 t.quotesinglbase = 333; 19947 t.quotedblbase = 444; 19948 t.quotedblright = 444; 19949 t.guillemotright = 500; 19950 t.ellipsis = 1000; 19951 t.perthousand = 1000; 19952 t.questiondown = 444; 19953 t.grave = 333; 19954 t.acute = 333; 19955 t.circumflex = 333; 19956 t.tilde = 333; 19957 t.macron = 333; 19958 t.breve = 333; 19959 t.dotaccent = 333; 19960 t.dieresis = 333; 19961 t.ring = 333; 19962 t.cedilla = 333; 19963 t.hungarumlaut = 333; 19964 t.ogonek = 333; 19965 t.caron = 333; 19966 t.emdash = 1000; 19967 t.AE = 889; 19968 t.ordfeminine = 276; 19969 t.Lslash = 611; 19970 t.Oslash = 722; 19971 t.OE = 889; 19972 t.ordmasculine = 310; 19973 t.ae = 667; 19974 t.dotlessi = 278; 19975 t.lslash = 278; 19976 t.oslash = 500; 19977 t.oe = 722; 19978 t.germandbls = 500; 19979 t.Idieresis = 333; 19980 t.eacute = 444; 19981 t.abreve = 444; 19982 t.uhungarumlaut = 500; 19983 t.ecaron = 444; 19984 t.Ydieresis = 722; 19985 t.divide = 564; 19986 t.Yacute = 722; 19987 t.Acircumflex = 722; 19988 t.aacute = 444; 19989 t.Ucircumflex = 722; 19990 t.yacute = 500; 19991 t.scommaaccent = 389; 19992 t.ecircumflex = 444; 19993 t.Uring = 722; 19994 t.Udieresis = 722; 19995 t.aogonek = 444; 19996 t.Uacute = 722; 19997 t.uogonek = 500; 19998 t.Edieresis = 611; 19999 t.Dcroat = 722; 20000 t.commaaccent = 250; 20001 t.copyright = 760; 20002 t.Emacron = 611; 20003 t.ccaron = 444; 20004 t.aring = 444; 20005 t.Ncommaaccent = 722; 20006 t.lacute = 278; 20007 t.agrave = 444; 20008 t.Tcommaaccent = 611; 20009 t.Cacute = 667; 20010 t.atilde = 444; 20011 t.Edotaccent = 611; 20012 t.scaron = 389; 20013 t.scedilla = 389; 20014 t.iacute = 278; 20015 t.lozenge = 471; 20016 t.Rcaron = 667; 20017 t.Gcommaaccent = 722; 20018 t.ucircumflex = 500; 20019 t.acircumflex = 444; 20020 t.Amacron = 722; 20021 t.rcaron = 333; 20022 t.ccedilla = 444; 20023 t.Zdotaccent = 611; 20024 t.Thorn = 556; 20025 t.Omacron = 722; 20026 t.Racute = 667; 20027 t.Sacute = 556; 20028 t.dcaron = 588; 20029 t.Umacron = 722; 20030 t.uring = 500; 20031 t.threesuperior = 300; 20032 t.Ograve = 722; 20033 t.Agrave = 722; 20034 t.Abreve = 722; 20035 t.multiply = 564; 20036 t.uacute = 500; 20037 t.Tcaron = 611; 20038 t.partialdiff = 476; 20039 t.ydieresis = 500; 20040 t.Nacute = 722; 20041 t.icircumflex = 278; 20042 t.Ecircumflex = 611; 20043 t.adieresis = 444; 20044 t.edieresis = 444; 20045 t.cacute = 444; 20046 t.nacute = 500; 20047 t.umacron = 500; 20048 t.Ncaron = 722; 20049 t.Iacute = 333; 20050 t.plusminus = 564; 20051 t.brokenbar = 200; 20052 t.registered = 760; 20053 t.Gbreve = 722; 20054 t.Idotaccent = 333; 20055 t.summation = 600; 20056 t.Egrave = 611; 20057 t.racute = 333; 20058 t.omacron = 500; 20059 t.Zacute = 611; 20060 t.Zcaron = 611; 20061 t.greaterequal = 549; 20062 t.Eth = 722; 20063 t.Ccedilla = 667; 20064 t.lcommaaccent = 278; 20065 t.tcaron = 326; 20066 t.eogonek = 444; 20067 t.Uogonek = 722; 20068 t.Aacute = 722; 20069 t.Adieresis = 722; 20070 t.egrave = 444; 20071 t.zacute = 444; 20072 t.iogonek = 278; 20073 t.Oacute = 722; 20074 t.oacute = 500; 20075 t.amacron = 444; 20076 t.sacute = 389; 20077 t.idieresis = 278; 20078 t.Ocircumflex = 722; 20079 t.Ugrave = 722; 20080 t.Delta = 612; 20081 t.thorn = 500; 20082 t.twosuperior = 300; 20083 t.Odieresis = 722; 20084 t.mu = 500; 20085 t.igrave = 278; 20086 t.ohungarumlaut = 500; 20087 t.Eogonek = 611; 20088 t.dcroat = 500; 20089 t.threequarters = 750; 20090 t.Scedilla = 556; 20091 t.lcaron = 344; 20092 t.Kcommaaccent = 722; 20093 t.Lacute = 611; 20094 t.trademark = 980; 20095 t.edotaccent = 444; 20096 t.Igrave = 333; 20097 t.Imacron = 333; 20098 t.Lcaron = 611; 20099 t.onehalf = 750; 20100 t.lessequal = 549; 20101 t.ocircumflex = 500; 20102 t.ntilde = 500; 20103 t.Uhungarumlaut = 722; 20104 t.Eacute = 611; 20105 t.emacron = 444; 20106 t.gbreve = 500; 20107 t.onequarter = 750; 20108 t.Scaron = 556; 20109 t.Scommaaccent = 556; 20110 t.Ohungarumlaut = 722; 20111 t.degree = 400; 20112 t.ograve = 500; 20113 t.Ccaron = 667; 20114 t.ugrave = 500; 20115 t.radical = 453; 20116 t.Dcaron = 722; 20117 t.rcommaaccent = 333; 20118 t.Ntilde = 722; 20119 t.otilde = 500; 20120 t.Rcommaaccent = 667; 20121 t.Lcommaaccent = 611; 20122 t.Atilde = 722; 20123 t.Aogonek = 722; 20124 t.Aring = 722; 20125 t.Otilde = 722; 20126 t.zdotaccent = 444; 20127 t.Ecaron = 611; 20128 t.Iogonek = 333; 20129 t.kcommaaccent = 500; 20130 t.minus = 564; 20131 t.Icircumflex = 333; 20132 t.ncaron = 500; 20133 t.tcommaaccent = 278; 20134 t.logicalnot = 564; 20135 t.odieresis = 500; 20136 t.udieresis = 500; 20137 t.notequal = 549; 20138 t.gcommaaccent = 500; 20139 t.eth = 500; 20140 t.zcaron = 444; 20141 t.ncommaaccent = 500; 20142 t.onesuperior = 300; 20143 t.imacron = 278; 20144 t.Euro = 500; 20145 }); 20146 t["Times-Bold"] = getLookupTableFactory(function (t) { 20147 t.space = 250; 20148 t.exclam = 333; 20149 t.quotedbl = 555; 20150 t.numbersign = 500; 20151 t.dollar = 500; 20152 t.percent = 1000; 20153 t.ampersand = 833; 20154 t.quoteright = 333; 20155 t.parenleft = 333; 20156 t.parenright = 333; 20157 t.asterisk = 500; 20158 t.plus = 570; 20159 t.comma = 250; 20160 t.hyphen = 333; 20161 t.period = 250; 20162 t.slash = 278; 20163 t.zero = 500; 20164 t.one = 500; 20165 t.two = 500; 20166 t.three = 500; 20167 t.four = 500; 20168 t.five = 500; 20169 t.six = 500; 20170 t.seven = 500; 20171 t.eight = 500; 20172 t.nine = 500; 20173 t.colon = 333; 20174 t.semicolon = 333; 20175 t.less = 570; 20176 t.equal = 570; 20177 t.greater = 570; 20178 t.question = 500; 20179 t.at = 930; 20180 t.A = 722; 20181 t.B = 667; 20182 t.C = 722; 20183 t.D = 722; 20184 t.E = 667; 20185 t.F = 611; 20186 t.G = 778; 20187 t.H = 778; 20188 t.I = 389; 20189 t.J = 500; 20190 t.K = 778; 20191 t.L = 667; 20192 t.M = 944; 20193 t.N = 722; 20194 t.O = 778; 20195 t.P = 611; 20196 t.Q = 778; 20197 t.R = 722; 20198 t.S = 556; 20199 t.T = 667; 20200 t.U = 722; 20201 t.V = 722; 20202 t.W = 1000; 20203 t.X = 722; 20204 t.Y = 722; 20205 t.Z = 667; 20206 t.bracketleft = 333; 20207 t.backslash = 278; 20208 t.bracketright = 333; 20209 t.asciicircum = 581; 20210 t.underscore = 500; 20211 t.quoteleft = 333; 20212 t.a = 500; 20213 t.b = 556; 20214 t.c = 444; 20215 t.d = 556; 20216 t.e = 444; 20217 t.f = 333; 20218 t.g = 500; 20219 t.h = 556; 20220 t.i = 278; 20221 t.j = 333; 20222 t.k = 556; 20223 t.l = 278; 20224 t.m = 833; 20225 t.n = 556; 20226 t.o = 500; 20227 t.p = 556; 20228 t.q = 556; 20229 t.r = 444; 20230 t.s = 389; 20231 t.t = 333; 20232 t.u = 556; 20233 t.v = 500; 20234 t.w = 722; 20235 t.x = 500; 20236 t.y = 500; 20237 t.z = 444; 20238 t.braceleft = 394; 20239 t.bar = 220; 20240 t.braceright = 394; 20241 t.asciitilde = 520; 20242 t.exclamdown = 333; 20243 t.cent = 500; 20244 t.sterling = 500; 20245 t.fraction = 167; 20246 t.yen = 500; 20247 t.florin = 500; 20248 t.section = 500; 20249 t.currency = 500; 20250 t.quotesingle = 278; 20251 t.quotedblleft = 500; 20252 t.guillemotleft = 500; 20253 t.guilsinglleft = 333; 20254 t.guilsinglright = 333; 20255 t.fi = 556; 20256 t.fl = 556; 20257 t.endash = 500; 20258 t.dagger = 500; 20259 t.daggerdbl = 500; 20260 t.periodcentered = 250; 20261 t.paragraph = 540; 20262 t.bullet = 350; 20263 t.quotesinglbase = 333; 20264 t.quotedblbase = 500; 20265 t.quotedblright = 500; 20266 t.guillemotright = 500; 20267 t.ellipsis = 1000; 20268 t.perthousand = 1000; 20269 t.questiondown = 500; 20270 t.grave = 333; 20271 t.acute = 333; 20272 t.circumflex = 333; 20273 t.tilde = 333; 20274 t.macron = 333; 20275 t.breve = 333; 20276 t.dotaccent = 333; 20277 t.dieresis = 333; 20278 t.ring = 333; 20279 t.cedilla = 333; 20280 t.hungarumlaut = 333; 20281 t.ogonek = 333; 20282 t.caron = 333; 20283 t.emdash = 1000; 20284 t.AE = 1000; 20285 t.ordfeminine = 300; 20286 t.Lslash = 667; 20287 t.Oslash = 778; 20288 t.OE = 1000; 20289 t.ordmasculine = 330; 20290 t.ae = 722; 20291 t.dotlessi = 278; 20292 t.lslash = 278; 20293 t.oslash = 500; 20294 t.oe = 722; 20295 t.germandbls = 556; 20296 t.Idieresis = 389; 20297 t.eacute = 444; 20298 t.abreve = 500; 20299 t.uhungarumlaut = 556; 20300 t.ecaron = 444; 20301 t.Ydieresis = 722; 20302 t.divide = 570; 20303 t.Yacute = 722; 20304 t.Acircumflex = 722; 20305 t.aacute = 500; 20306 t.Ucircumflex = 722; 20307 t.yacute = 500; 20308 t.scommaaccent = 389; 20309 t.ecircumflex = 444; 20310 t.Uring = 722; 20311 t.Udieresis = 722; 20312 t.aogonek = 500; 20313 t.Uacute = 722; 20314 t.uogonek = 556; 20315 t.Edieresis = 667; 20316 t.Dcroat = 722; 20317 t.commaaccent = 250; 20318 t.copyright = 747; 20319 t.Emacron = 667; 20320 t.ccaron = 444; 20321 t.aring = 500; 20322 t.Ncommaaccent = 722; 20323 t.lacute = 278; 20324 t.agrave = 500; 20325 t.Tcommaaccent = 667; 20326 t.Cacute = 722; 20327 t.atilde = 500; 20328 t.Edotaccent = 667; 20329 t.scaron = 389; 20330 t.scedilla = 389; 20331 t.iacute = 278; 20332 t.lozenge = 494; 20333 t.Rcaron = 722; 20334 t.Gcommaaccent = 778; 20335 t.ucircumflex = 556; 20336 t.acircumflex = 500; 20337 t.Amacron = 722; 20338 t.rcaron = 444; 20339 t.ccedilla = 444; 20340 t.Zdotaccent = 667; 20341 t.Thorn = 611; 20342 t.Omacron = 778; 20343 t.Racute = 722; 20344 t.Sacute = 556; 20345 t.dcaron = 672; 20346 t.Umacron = 722; 20347 t.uring = 556; 20348 t.threesuperior = 300; 20349 t.Ograve = 778; 20350 t.Agrave = 722; 20351 t.Abreve = 722; 20352 t.multiply = 570; 20353 t.uacute = 556; 20354 t.Tcaron = 667; 20355 t.partialdiff = 494; 20356 t.ydieresis = 500; 20357 t.Nacute = 722; 20358 t.icircumflex = 278; 20359 t.Ecircumflex = 667; 20360 t.adieresis = 500; 20361 t.edieresis = 444; 20362 t.cacute = 444; 20363 t.nacute = 556; 20364 t.umacron = 556; 20365 t.Ncaron = 722; 20366 t.Iacute = 389; 20367 t.plusminus = 570; 20368 t.brokenbar = 220; 20369 t.registered = 747; 20370 t.Gbreve = 778; 20371 t.Idotaccent = 389; 20372 t.summation = 600; 20373 t.Egrave = 667; 20374 t.racute = 444; 20375 t.omacron = 500; 20376 t.Zacute = 667; 20377 t.Zcaron = 667; 20378 t.greaterequal = 549; 20379 t.Eth = 722; 20380 t.Ccedilla = 722; 20381 t.lcommaaccent = 278; 20382 t.tcaron = 416; 20383 t.eogonek = 444; 20384 t.Uogonek = 722; 20385 t.Aacute = 722; 20386 t.Adieresis = 722; 20387 t.egrave = 444; 20388 t.zacute = 444; 20389 t.iogonek = 278; 20390 t.Oacute = 778; 20391 t.oacute = 500; 20392 t.amacron = 500; 20393 t.sacute = 389; 20394 t.idieresis = 278; 20395 t.Ocircumflex = 778; 20396 t.Ugrave = 722; 20397 t.Delta = 612; 20398 t.thorn = 556; 20399 t.twosuperior = 300; 20400 t.Odieresis = 778; 20401 t.mu = 556; 20402 t.igrave = 278; 20403 t.ohungarumlaut = 500; 20404 t.Eogonek = 667; 20405 t.dcroat = 556; 20406 t.threequarters = 750; 20407 t.Scedilla = 556; 20408 t.lcaron = 394; 20409 t.Kcommaaccent = 778; 20410 t.Lacute = 667; 20411 t.trademark = 1000; 20412 t.edotaccent = 444; 20413 t.Igrave = 389; 20414 t.Imacron = 389; 20415 t.Lcaron = 667; 20416 t.onehalf = 750; 20417 t.lessequal = 549; 20418 t.ocircumflex = 500; 20419 t.ntilde = 556; 20420 t.Uhungarumlaut = 722; 20421 t.Eacute = 667; 20422 t.emacron = 444; 20423 t.gbreve = 500; 20424 t.onequarter = 750; 20425 t.Scaron = 556; 20426 t.Scommaaccent = 556; 20427 t.Ohungarumlaut = 778; 20428 t.degree = 400; 20429 t.ograve = 500; 20430 t.Ccaron = 722; 20431 t.ugrave = 556; 20432 t.radical = 549; 20433 t.Dcaron = 722; 20434 t.rcommaaccent = 444; 20435 t.Ntilde = 722; 20436 t.otilde = 500; 20437 t.Rcommaaccent = 722; 20438 t.Lcommaaccent = 667; 20439 t.Atilde = 722; 20440 t.Aogonek = 722; 20441 t.Aring = 722; 20442 t.Otilde = 778; 20443 t.zdotaccent = 444; 20444 t.Ecaron = 667; 20445 t.Iogonek = 389; 20446 t.kcommaaccent = 556; 20447 t.minus = 570; 20448 t.Icircumflex = 389; 20449 t.ncaron = 556; 20450 t.tcommaaccent = 333; 20451 t.logicalnot = 570; 20452 t.odieresis = 500; 20453 t.udieresis = 556; 20454 t.notequal = 549; 20455 t.gcommaaccent = 500; 20456 t.eth = 500; 20457 t.zcaron = 444; 20458 t.ncommaaccent = 556; 20459 t.onesuperior = 300; 20460 t.imacron = 278; 20461 t.Euro = 500; 20462 }); 20463 t["Times-BoldItalic"] = getLookupTableFactory(function (t) { 20464 t.space = 250; 20465 t.exclam = 389; 20466 t.quotedbl = 555; 20467 t.numbersign = 500; 20468 t.dollar = 500; 20469 t.percent = 833; 20470 t.ampersand = 778; 20471 t.quoteright = 333; 20472 t.parenleft = 333; 20473 t.parenright = 333; 20474 t.asterisk = 500; 20475 t.plus = 570; 20476 t.comma = 250; 20477 t.hyphen = 333; 20478 t.period = 250; 20479 t.slash = 278; 20480 t.zero = 500; 20481 t.one = 500; 20482 t.two = 500; 20483 t.three = 500; 20484 t.four = 500; 20485 t.five = 500; 20486 t.six = 500; 20487 t.seven = 500; 20488 t.eight = 500; 20489 t.nine = 500; 20490 t.colon = 333; 20491 t.semicolon = 333; 20492 t.less = 570; 20493 t.equal = 570; 20494 t.greater = 570; 20495 t.question = 500; 20496 t.at = 832; 20497 t.A = 667; 20498 t.B = 667; 20499 t.C = 667; 20500 t.D = 722; 20501 t.E = 667; 20502 t.F = 667; 20503 t.G = 722; 20504 t.H = 778; 20505 t.I = 389; 20506 t.J = 500; 20507 t.K = 667; 20508 t.L = 611; 20509 t.M = 889; 20510 t.N = 722; 20511 t.O = 722; 20512 t.P = 611; 20513 t.Q = 722; 20514 t.R = 667; 20515 t.S = 556; 20516 t.T = 611; 20517 t.U = 722; 20518 t.V = 667; 20519 t.W = 889; 20520 t.X = 667; 20521 t.Y = 611; 20522 t.Z = 611; 20523 t.bracketleft = 333; 20524 t.backslash = 278; 20525 t.bracketright = 333; 20526 t.asciicircum = 570; 20527 t.underscore = 500; 20528 t.quoteleft = 333; 20529 t.a = 500; 20530 t.b = 500; 20531 t.c = 444; 20532 t.d = 500; 20533 t.e = 444; 20534 t.f = 333; 20535 t.g = 500; 20536 t.h = 556; 20537 t.i = 278; 20538 t.j = 278; 20539 t.k = 500; 20540 t.l = 278; 20541 t.m = 778; 20542 t.n = 556; 20543 t.o = 500; 20544 t.p = 500; 20545 t.q = 500; 20546 t.r = 389; 20547 t.s = 389; 20548 t.t = 278; 20549 t.u = 556; 20550 t.v = 444; 20551 t.w = 667; 20552 t.x = 500; 20553 t.y = 444; 20554 t.z = 389; 20555 t.braceleft = 348; 20556 t.bar = 220; 20557 t.braceright = 348; 20558 t.asciitilde = 570; 20559 t.exclamdown = 389; 20560 t.cent = 500; 20561 t.sterling = 500; 20562 t.fraction = 167; 20563 t.yen = 500; 20564 t.florin = 500; 20565 t.section = 500; 20566 t.currency = 500; 20567 t.quotesingle = 278; 20568 t.quotedblleft = 500; 20569 t.guillemotleft = 500; 20570 t.guilsinglleft = 333; 20571 t.guilsinglright = 333; 20572 t.fi = 556; 20573 t.fl = 556; 20574 t.endash = 500; 20575 t.dagger = 500; 20576 t.daggerdbl = 500; 20577 t.periodcentered = 250; 20578 t.paragraph = 500; 20579 t.bullet = 350; 20580 t.quotesinglbase = 333; 20581 t.quotedblbase = 500; 20582 t.quotedblright = 500; 20583 t.guillemotright = 500; 20584 t.ellipsis = 1000; 20585 t.perthousand = 1000; 20586 t.questiondown = 500; 20587 t.grave = 333; 20588 t.acute = 333; 20589 t.circumflex = 333; 20590 t.tilde = 333; 20591 t.macron = 333; 20592 t.breve = 333; 20593 t.dotaccent = 333; 20594 t.dieresis = 333; 20595 t.ring = 333; 20596 t.cedilla = 333; 20597 t.hungarumlaut = 333; 20598 t.ogonek = 333; 20599 t.caron = 333; 20600 t.emdash = 1000; 20601 t.AE = 944; 20602 t.ordfeminine = 266; 20603 t.Lslash = 611; 20604 t.Oslash = 722; 20605 t.OE = 944; 20606 t.ordmasculine = 300; 20607 t.ae = 722; 20608 t.dotlessi = 278; 20609 t.lslash = 278; 20610 t.oslash = 500; 20611 t.oe = 722; 20612 t.germandbls = 500; 20613 t.Idieresis = 389; 20614 t.eacute = 444; 20615 t.abreve = 500; 20616 t.uhungarumlaut = 556; 20617 t.ecaron = 444; 20618 t.Ydieresis = 611; 20619 t.divide = 570; 20620 t.Yacute = 611; 20621 t.Acircumflex = 667; 20622 t.aacute = 500; 20623 t.Ucircumflex = 722; 20624 t.yacute = 444; 20625 t.scommaaccent = 389; 20626 t.ecircumflex = 444; 20627 t.Uring = 722; 20628 t.Udieresis = 722; 20629 t.aogonek = 500; 20630 t.Uacute = 722; 20631 t.uogonek = 556; 20632 t.Edieresis = 667; 20633 t.Dcroat = 722; 20634 t.commaaccent = 250; 20635 t.copyright = 747; 20636 t.Emacron = 667; 20637 t.ccaron = 444; 20638 t.aring = 500; 20639 t.Ncommaaccent = 722; 20640 t.lacute = 278; 20641 t.agrave = 500; 20642 t.Tcommaaccent = 611; 20643 t.Cacute = 667; 20644 t.atilde = 500; 20645 t.Edotaccent = 667; 20646 t.scaron = 389; 20647 t.scedilla = 389; 20648 t.iacute = 278; 20649 t.lozenge = 494; 20650 t.Rcaron = 667; 20651 t.Gcommaaccent = 722; 20652 t.ucircumflex = 556; 20653 t.acircumflex = 500; 20654 t.Amacron = 667; 20655 t.rcaron = 389; 20656 t.ccedilla = 444; 20657 t.Zdotaccent = 611; 20658 t.Thorn = 611; 20659 t.Omacron = 722; 20660 t.Racute = 667; 20661 t.Sacute = 556; 20662 t.dcaron = 608; 20663 t.Umacron = 722; 20664 t.uring = 556; 20665 t.threesuperior = 300; 20666 t.Ograve = 722; 20667 t.Agrave = 667; 20668 t.Abreve = 667; 20669 t.multiply = 570; 20670 t.uacute = 556; 20671 t.Tcaron = 611; 20672 t.partialdiff = 494; 20673 t.ydieresis = 444; 20674 t.Nacute = 722; 20675 t.icircumflex = 278; 20676 t.Ecircumflex = 667; 20677 t.adieresis = 500; 20678 t.edieresis = 444; 20679 t.cacute = 444; 20680 t.nacute = 556; 20681 t.umacron = 556; 20682 t.Ncaron = 722; 20683 t.Iacute = 389; 20684 t.plusminus = 570; 20685 t.brokenbar = 220; 20686 t.registered = 747; 20687 t.Gbreve = 722; 20688 t.Idotaccent = 389; 20689 t.summation = 600; 20690 t.Egrave = 667; 20691 t.racute = 389; 20692 t.omacron = 500; 20693 t.Zacute = 611; 20694 t.Zcaron = 611; 20695 t.greaterequal = 549; 20696 t.Eth = 722; 20697 t.Ccedilla = 667; 20698 t.lcommaaccent = 278; 20699 t.tcaron = 366; 20700 t.eogonek = 444; 20701 t.Uogonek = 722; 20702 t.Aacute = 667; 20703 t.Adieresis = 667; 20704 t.egrave = 444; 20705 t.zacute = 389; 20706 t.iogonek = 278; 20707 t.Oacute = 722; 20708 t.oacute = 500; 20709 t.amacron = 500; 20710 t.sacute = 389; 20711 t.idieresis = 278; 20712 t.Ocircumflex = 722; 20713 t.Ugrave = 722; 20714 t.Delta = 612; 20715 t.thorn = 500; 20716 t.twosuperior = 300; 20717 t.Odieresis = 722; 20718 t.mu = 576; 20719 t.igrave = 278; 20720 t.ohungarumlaut = 500; 20721 t.Eogonek = 667; 20722 t.dcroat = 500; 20723 t.threequarters = 750; 20724 t.Scedilla = 556; 20725 t.lcaron = 382; 20726 t.Kcommaaccent = 667; 20727 t.Lacute = 611; 20728 t.trademark = 1000; 20729 t.edotaccent = 444; 20730 t.Igrave = 389; 20731 t.Imacron = 389; 20732 t.Lcaron = 611; 20733 t.onehalf = 750; 20734 t.lessequal = 549; 20735 t.ocircumflex = 500; 20736 t.ntilde = 556; 20737 t.Uhungarumlaut = 722; 20738 t.Eacute = 667; 20739 t.emacron = 444; 20740 t.gbreve = 500; 20741 t.onequarter = 750; 20742 t.Scaron = 556; 20743 t.Scommaaccent = 556; 20744 t.Ohungarumlaut = 722; 20745 t.degree = 400; 20746 t.ograve = 500; 20747 t.Ccaron = 667; 20748 t.ugrave = 556; 20749 t.radical = 549; 20750 t.Dcaron = 722; 20751 t.rcommaaccent = 389; 20752 t.Ntilde = 722; 20753 t.otilde = 500; 20754 t.Rcommaaccent = 667; 20755 t.Lcommaaccent = 611; 20756 t.Atilde = 667; 20757 t.Aogonek = 667; 20758 t.Aring = 667; 20759 t.Otilde = 722; 20760 t.zdotaccent = 389; 20761 t.Ecaron = 667; 20762 t.Iogonek = 389; 20763 t.kcommaaccent = 500; 20764 t.minus = 606; 20765 t.Icircumflex = 389; 20766 t.ncaron = 556; 20767 t.tcommaaccent = 278; 20768 t.logicalnot = 606; 20769 t.odieresis = 500; 20770 t.udieresis = 556; 20771 t.notequal = 549; 20772 t.gcommaaccent = 500; 20773 t.eth = 500; 20774 t.zcaron = 389; 20775 t.ncommaaccent = 556; 20776 t.onesuperior = 300; 20777 t.imacron = 278; 20778 t.Euro = 500; 20779 }); 20780 t["Times-Italic"] = getLookupTableFactory(function (t) { 20781 t.space = 250; 20782 t.exclam = 333; 20783 t.quotedbl = 420; 20784 t.numbersign = 500; 20785 t.dollar = 500; 20786 t.percent = 833; 20787 t.ampersand = 778; 20788 t.quoteright = 333; 20789 t.parenleft = 333; 20790 t.parenright = 333; 20791 t.asterisk = 500; 20792 t.plus = 675; 20793 t.comma = 250; 20794 t.hyphen = 333; 20795 t.period = 250; 20796 t.slash = 278; 20797 t.zero = 500; 20798 t.one = 500; 20799 t.two = 500; 20800 t.three = 500; 20801 t.four = 500; 20802 t.five = 500; 20803 t.six = 500; 20804 t.seven = 500; 20805 t.eight = 500; 20806 t.nine = 500; 20807 t.colon = 333; 20808 t.semicolon = 333; 20809 t.less = 675; 20810 t.equal = 675; 20811 t.greater = 675; 20812 t.question = 500; 20813 t.at = 920; 20814 t.A = 611; 20815 t.B = 611; 20816 t.C = 667; 20817 t.D = 722; 20818 t.E = 611; 20819 t.F = 611; 20820 t.G = 722; 20821 t.H = 722; 20822 t.I = 333; 20823 t.J = 444; 20824 t.K = 667; 20825 t.L = 556;
vendor: 4,861 bytes, lines 20826-21060
20826 t.M = 833; 20827 t.N = 667; 20828 t.O = 722; 20829 t.P = 611; 20830 t.Q = 722; 20831 t.R = 611; 20832 t.S = 500; 20833 t.T = 556; 20834 t.U = 722; 20835 t.V = 611; 20836 t.W = 833; 20837 t.X = 611; 20838 t.Y = 556; 20839 t.Z = 556; 20840 t.bracketleft = 389; 20841 t.backslash = 278; 20842 t.bracketright = 389; 20843 t.asciicircum = 422; 20844 t.underscore = 500; 20845 t.quoteleft = 333; 20846 t.a = 500; 20847 t.b = 500; 20848 t.c = 444; 20849 t.d = 500; 20850 t.e = 444; 20851 t.f = 278; 20852 t.g = 500; 20853 t.h = 500; 20854 t.i = 278; 20855 t.j = 278; 20856 t.k = 444; 20857 t.l = 278; 20858 t.m = 722; 20859 t.n = 500; 20860 t.o = 500; 20861 t.p = 500; 20862 t.q = 500; 20863 t.r = 389; 20864 t.s = 389; 20865 t.t = 278; 20866 t.u = 500; 20867 t.v = 444; 20868 t.w = 667; 20869 t.x = 444; 20870 t.y = 444; 20871 t.z = 389; 20872 t.braceleft = 400; 20873 t.bar = 275; 20874 t.braceright = 400; 20875 t.asciitilde = 541; 20876 t.exclamdown = 389; 20877 t.cent = 500; 20878 t.sterling = 500; 20879 t.fraction = 167; 20880 t.yen = 500; 20881 t.florin = 500; 20882 t.section = 500; 20883 t.currency = 500; 20884 t.quotesingle = 214; 20885 t.quotedblleft = 556; 20886 t.guillemotleft = 500; 20887 t.guilsinglleft = 333; 20888 t.guilsinglright = 333; 20889 t.fi = 500; 20890 t.fl = 500; 20891 t.endash = 500; 20892 t.dagger = 500; 20893 t.daggerdbl = 500; 20894 t.periodcentered = 250; 20895 t.paragraph = 523; 20896 t.bullet = 350; 20897 t.quotesinglbase = 333; 20898 t.quotedblbase = 556; 20899 t.quotedblright = 556; 20900 t.guillemotright = 500; 20901 t.ellipsis = 889; 20902 t.perthousand = 1000; 20903 t.questiondown = 500; 20904 t.grave = 333; 20905 t.acute = 333; 20906 t.circumflex = 333; 20907 t.tilde = 333; 20908 t.macron = 333; 20909 t.breve = 333; 20910 t.dotaccent = 333; 20911 t.dieresis = 333; 20912 t.ring = 333; 20913 t.cedilla = 333; 20914 t.hungarumlaut = 333; 20915 t.ogonek = 333; 20916 t.caron = 333; 20917 t.emdash = 889; 20918 t.AE = 889; 20919 t.ordfeminine = 276; 20920 t.Lslash = 556; 20921 t.Oslash = 722; 20922 t.OE = 944; 20923 t.ordmasculine = 310; 20924 t.ae = 667; 20925 t.dotlessi = 278; 20926 t.lslash = 278; 20927 t.oslash = 500; 20928 t.oe = 667; 20929 t.germandbls = 500; 20930 t.Idieresis = 333; 20931 t.eacute = 444; 20932 t.abreve = 500; 20933 t.uhungarumlaut = 500; 20934 t.ecaron = 444; 20935 t.Ydieresis = 556; 20936 t.divide = 675; 20937 t.Yacute = 556; 20938 t.Acircumflex = 611; 20939 t.aacute = 500; 20940 t.Ucircumflex = 722; 20941 t.yacute = 444; 20942 t.scommaaccent = 389; 20943 t.ecircumflex = 444; 20944 t.Uring = 722; 20945 t.Udieresis = 722; 20946 t.aogonek = 500; 20947 t.Uacute = 722; 20948 t.uogonek = 500; 20949 t.Edieresis = 611; 20950 t.Dcroat = 722; 20951 t.commaaccent = 250; 20952 t.copyright = 760; 20953 t.Emacron = 611; 20954 t.ccaron = 444; 20955 t.aring = 500; 20956 t.Ncommaaccent = 667; 20957 t.lacute = 278; 20958 t.agrave = 500; 20959 t.Tcommaaccent = 556; 20960 t.Cacute = 667; 20961 t.atilde = 500; 20962 t.Edotaccent = 611; 20963 t.scaron = 389; 20964 t.scedilla = 389; 20965 t.iacute = 278; 20966 t.lozenge = 471; 20967 t.Rcaron = 611; 20968 t.Gcommaaccent = 722; 20969 t.ucircumflex = 500; 20970 t.acircumflex = 500; 20971 t.Amacron = 611; 20972 t.rcaron = 389; 20973 t.ccedilla = 444; 20974 t.Zdotaccent = 556; 20975 t.Thorn = 611; 20976 t.Omacron = 722; 20977 t.Racute = 611; 20978 t.Sacute = 500; 20979 t.dcaron = 544; 20980 t.Umacron = 722; 20981 t.uring = 500; 20982 t.threesuperior = 300; 20983 t.Ograve = 722; 20984 t.Agrave = 611; 20985 t.Abreve = 611; 20986 t.multiply = 675; 20987 t.uacute = 500; 20988 t.Tcaron = 556; 20989 t.partialdiff = 476; 20990 t.ydieresis = 444; 20991 t.Nacute = 667; 20992 t.icircumflex = 278; 20993 t.Ecircumflex = 611; 20994 t.adieresis = 500; 20995 t.edieresis = 444; 20996 t.cacute = 444; 20997 t.nacute = 500; 20998 t.umacron = 500; 20999 t.Ncaron = 667; 21000 t.Iacute = 333; 21001 t.plusminus = 675; 21002 t.brokenbar = 275; 21003 t.registered = 760; 21004 t.Gbreve = 722; 21005 t.Idotaccent = 333; 21006 t.summation = 600; 21007 t.Egrave = 611; 21008 t.racute = 389; 21009 t.omacron = 500; 21010 t.Zacute = 556; 21011 t.Zcaron = 556; 21012 t.greaterequal = 549; 21013 t.Eth = 722; 21014 t.Ccedilla = 667; 21015 t.lcommaaccent = 278; 21016 t.tcaron = 300; 21017 t.eogonek = 444; 21018 t.Uogonek = 722; 21019 t.Aacute = 611; 21020 t.Adieresis = 611; 21021 t.egrave = 444; 21022 t.zacute = 389; 21023 t.iogonek = 278; 21024 t.Oacute = 722; 21025 t.oacute = 500; 21026 t.amacron = 500; 21027 t.sacute = 389; 21028 t.idieresis = 278; 21029 t.Ocircumflex = 722; 21030 t.Ugrave = 722; 21031 t.Delta = 612; 21032 t.thorn = 500; 21033 t.twosuperior = 300; 21034 t.Odieresis = 722; 21035 t.mu = 500; 21036 t.igrave = 278; 21037 t.ohungarumlaut = 500; 21038 t.Eogonek = 611; 21039 t.dcroat = 500; 21040 t.threequarters = 750; 21041 t.Scedilla = 500; 21042 t.lcaron = 300; 21043 t.Kcommaaccent = 667; 21044 t.Lacute = 556; 21045 t.trademark = 980; 21046 t.edotaccent = 444; 21047 t.Igrave = 333; 21048 t.Imacron = 333; 21049 t.Lcaron = 611; 21050 t.onehalf = 750; 21051 t.lessequal = 549; 21052 t.ocircumflex = 500; 21053 t.ntilde = 500; 21054 t.Uhungarumlaut = 722; 21055 t.Eacute = 611; 21056 t.emacron = 444; 21057 t.gbreve = 500; 21058 t.onequarter = 750; 21059 t.Scaron = 500; 21060 t.Scommaaccent = 500;
vendor: 5,928 bytes, lines 21061-21389
21061 t.Ohungarumlaut = 722; 21062 t.degree = 400; 21063 t.ograve = 500; 21064 t.Ccaron = 667; 21065 t.ugrave = 500; 21066 t.radical = 453; 21067 t.Dcaron = 722; 21068 t.rcommaaccent = 389; 21069 t.Ntilde = 667; 21070 t.otilde = 500; 21071 t.Rcommaaccent = 611; 21072 t.Lcommaaccent = 556; 21073 t.Atilde = 611; 21074 t.Aogonek = 611; 21075 t.Aring = 611; 21076 t.Otilde = 722; 21077 t.zdotaccent = 389; 21078 t.Ecaron = 611; 21079 t.Iogonek = 333; 21080 t.kcommaaccent = 444; 21081 t.minus = 675; 21082 t.Icircumflex = 333; 21083 t.ncaron = 500; 21084 t.tcommaaccent = 278; 21085 t.logicalnot = 675; 21086 t.odieresis = 500; 21087 t.udieresis = 500; 21088 t.notequal = 549; 21089 t.gcommaaccent = 500; 21090 t.eth = 500; 21091 t.zcaron = 389; 21092 t.ncommaaccent = 500; 21093 t.onesuperior = 300; 21094 t.imacron = 278; 21095 t.Euro = 500; 21096 }); 21097 t.ZapfDingbats = getLookupTableFactory(function (t) { 21098 t.space = 278; 21099 t.a1 = 974; 21100 t.a2 = 961; 21101 t.a202 = 974; 21102 t.a3 = 980; 21103 t.a4 = 719; 21104 t.a5 = 789; 21105 t.a119 = 790; 21106 t.a118 = 791; 21107 t.a117 = 690; 21108 t.a11 = 960; 21109 t.a12 = 939; 21110 t.a13 = 549; 21111 t.a14 = 855; 21112 t.a15 = 911; 21113 t.a16 = 933; 21114 t.a105 = 911; 21115 t.a17 = 945; 21116 t.a18 = 974; 21117 t.a19 = 755; 21118 t.a20 = 846; 21119 t.a21 = 762; 21120 t.a22 = 761; 21121 t.a23 = 571; 21122 t.a24 = 677; 21123 t.a25 = 763; 21124 t.a26 = 760; 21125 t.a27 = 759; 21126 t.a28 = 754; 21127 t.a6 = 494; 21128 t.a7 = 552; 21129 t.a8 = 537; 21130 t.a9 = 577; 21131 t.a10 = 692; 21132 t.a29 = 786; 21133 t.a30 = 788; 21134 t.a31 = 788; 21135 t.a32 = 790; 21136 t.a33 = 793; 21137 t.a34 = 794; 21138 t.a35 = 816; 21139 t.a36 = 823; 21140 t.a37 = 789; 21141 t.a38 = 841; 21142 t.a39 = 823; 21143 t.a40 = 833; 21144 t.a41 = 816; 21145 t.a42 = 831; 21146 t.a43 = 923; 21147 t.a44 = 744; 21148 t.a45 = 723; 21149 t.a46 = 749; 21150 t.a47 = 790; 21151 t.a48 = 792; 21152 t.a49 = 695; 21153 t.a50 = 776; 21154 t.a51 = 768; 21155 t.a52 = 792; 21156 t.a53 = 759; 21157 t.a54 = 707; 21158 t.a55 = 708; 21159 t.a56 = 682; 21160 t.a57 = 701; 21161 t.a58 = 826; 21162 t.a59 = 815; 21163 t.a60 = 789; 21164 t.a61 = 789; 21165 t.a62 = 707; 21166 t.a63 = 687; 21167 t.a64 = 696; 21168 t.a65 = 689; 21169 t.a66 = 786; 21170 t.a67 = 787; 21171 t.a68 = 713; 21172 t.a69 = 791; 21173 t.a70 = 785; 21174 t.a71 = 791; 21175 t.a72 = 873; 21176 t.a73 = 761; 21177 t.a74 = 762; 21178 t.a203 = 762; 21179 t.a75 = 759; 21180 t.a204 = 759; 21181 t.a76 = 892; 21182 t.a77 = 892; 21183 t.a78 = 788; 21184 t.a79 = 784; 21185 t.a81 = 438; 21186 t.a82 = 138; 21187 t.a83 = 277; 21188 t.a84 = 415; 21189 t.a97 = 392; 21190 t.a98 = 392; 21191 t.a99 = 668; 21192 t.a100 = 668; 21193 t.a89 = 390; 21194 t.a90 = 390; 21195 t.a93 = 317; 21196 t.a94 = 317; 21197 t.a91 = 276; 21198 t.a92 = 276; 21199 t.a205 = 509; 21200 t.a85 = 509; 21201 t.a206 = 410; 21202 t.a86 = 410; 21203 t.a87 = 234; 21204 t.a88 = 234; 21205 t.a95 = 334; 21206 t.a96 = 334; 21207 t.a101 = 732; 21208 t.a102 = 544; 21209 t.a103 = 544; 21210 t.a104 = 910; 21211 t.a106 = 667; 21212 t.a107 = 760; 21213 t.a108 = 760; 21214 t.a112 = 776; 21215 t.a111 = 595; 21216 t.a110 = 694; 21217 t.a109 = 626; 21218 t.a120 = 788; 21219 t.a121 = 788; 21220 t.a122 = 788; 21221 t.a123 = 788; 21222 t.a124 = 788; 21223 t.a125 = 788; 21224 t.a126 = 788; 21225 t.a127 = 788; 21226 t.a128 = 788; 21227 t.a129 = 788; 21228 t.a130 = 788; 21229 t.a131 = 788; 21230 t.a132 = 788; 21231 t.a133 = 788; 21232 t.a134 = 788; 21233 t.a135 = 788; 21234 t.a136 = 788; 21235 t.a137 = 788; 21236 t.a138 = 788; 21237 t.a139 = 788; 21238 t.a140 = 788; 21239 t.a141 = 788; 21240 t.a142 = 788; 21241 t.a143 = 788; 21242 t.a144 = 788; 21243 t.a145 = 788; 21244 t.a146 = 788; 21245 t.a147 = 788; 21246 t.a148 = 788; 21247 t.a149 = 788; 21248 t.a150 = 788; 21249 t.a151 = 788; 21250 t.a152 = 788; 21251 t.a153 = 788; 21252 t.a154 = 788; 21253 t.a155 = 788; 21254 t.a156 = 788; 21255 t.a157 = 788; 21256 t.a158 = 788; 21257 t.a159 = 788; 21258 t.a160 = 894; 21259 t.a161 = 838; 21260 t.a163 = 1016; 21261 t.a164 = 458; 21262 t.a196 = 748; 21263 t.a165 = 924; 21264 t.a192 = 748; 21265 t.a166 = 918; 21266 t.a167 = 927; 21267 t.a168 = 928; 21268 t.a169 = 928; 21269 t.a170 = 834; 21270 t.a171 = 873; 21271 t.a172 = 828; 21272 t.a173 = 924; 21273 t.a162 = 924; 21274 t.a174 = 917; 21275 t.a175 = 930; 21276 t.a176 = 931; 21277 t.a177 = 463; 21278 t.a178 = 883; 21279 t.a179 = 836; 21280 t.a193 = 836; 21281 t.a180 = 867; 21282 t.a199 = 867; 21283 t.a181 = 696; 21284 t.a200 = 696; 21285 t.a182 = 874; 21286 t.a201 = 874; 21287 t.a183 = 760; 21288 t.a184 = 946; 21289 t.a197 = 771; 21290 t.a185 = 865; 21291 t.a194 = 771; 21292 t.a198 = 888; 21293 t.a186 = 967; 21294 t.a195 = 888; 21295 t.a187 = 831; 21296 t.a188 = 873; 21297 t.a189 = 927; 21298 t.a190 = 970; 21299 t.a191 = 918; 21300 }); 21301}); 21302const getFontBasicMetrics = getLookupTableFactory(function (t) { 21303 t.Courier = { 21304 ascent: 629, 21305 descent: -157, 21306 capHeight: 562, 21307 xHeight: -426 21308 }; 21309 t["Courier-Bold"] = { 21310 ascent: 629, 21311 descent: -157, 21312 capHeight: 562, 21313 xHeight: 439 21314 }; 21315 t["Courier-Oblique"] = { 21316 ascent: 629, 21317 descent: -157, 21318 capHeight: 562, 21319 xHeight: 426 21320 }; 21321 t["Courier-BoldOblique"] = { 21322 ascent: 629, 21323 descent: -157, 21324 capHeight: 562, 21325 xHeight: 426 21326 }; 21327 t.Helvetica = { 21328 ascent: 718, 21329 descent: -207, 21330 capHeight: 718, 21331 xHeight: 523 21332 }; 21333 t["Helvetica-Bold"] = { 21334 ascent: 718, 21335 descent: -207, 21336 capHeight: 718, 21337 xHeight: 532 21338 }; 21339 t["Helvetica-Oblique"] = { 21340 ascent: 718, 21341 descent: -207, 21342 capHeight: 718, 21343 xHeight: 523 21344 }; 21345 t["Helvetica-BoldOblique"] = { 21346 ascent: 718, 21347 descent: -207, 21348 capHeight: 718, 21349 xHeight: 532 21350 }; 21351 t["Times-Roman"] = { 21352 ascent: 683, 21353 descent: -217, 21354 capHeight: 662, 21355 xHeight: 450 21356 }; 21357 t["Times-Bold"] = { 21358 ascent: 683, 21359 descent: -217, 21360 capHeight: 676, 21361 xHeight: 461 21362 }; 21363 t["Times-Italic"] = { 21364 ascent: 683, 21365 descent: -217, 21366 capHeight: 653, 21367 xHeight: 441 21368 }; 21369 t["Times-BoldItalic"] = { 21370 ascent: 683, 21371 descent: -217, 21372 capHeight: 669, 21373 xHeight: 462 21374 }; 21375 t.Symbol = { 21376 ascent: Math.NaN, 21377 descent: Math.NaN, 21378 capHeight: Math.NaN, 21379 xHeight: Math.NaN 21380 }; 21381 t.ZapfDingbats = { 21382 ascent: Math.NaN, 21383 descent: Math.NaN, 21384 capHeight: Math.NaN, 21385 xHeight: Math.NaN 21386 }; 21387}); 21388 21389;// ./src/core/
vendor: 4,908 bytes, lines 21389-21571
21389glyf.js 21390const ON_CURVE_POINT = 1 << 0; 21391const X_SHORT_VECTOR = 1 << 1; 21392const Y_SHORT_VECTOR = 1 << 2; 21393const REPEAT_FLAG = 1 << 3; 21394const X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR = 1 << 4; 21395const Y_IS_SAME_OR_POSITIVE_Y_SHORT_VECTOR = 1 << 5; 21396const OVERLAP_SIMPLE = 1 << 6; 21397const ARG_1_AND_2_ARE_WORDS = 1 << 0; 21398const ARGS_ARE_XY_VALUES = 1 << 1; 21399const WE_HAVE_A_SCALE = 1 << 3; 21400const MORE_COMPONENTS = 1 << 5; 21401const WE_HAVE_AN_X_AND_Y_SCALE = 1 << 6; 21402const WE_HAVE_A_TWO_BY_TWO = 1 << 7; 21403const WE_HAVE_INSTRUCTIONS = 1 << 8; 21404class GlyfTable { 21405 constructor({ 21406 glyfTable, 21407 isGlyphLocationsLong, 21408 locaTable, 21409 numGlyphs 21410 }) { 21411 this.glyphs = []; 21412 const loca = new DataView(locaTable.buffer, locaTable.byteOffset, locaTable.byteLength); 21413 const glyf = new DataView(glyfTable.buffer, glyfTable.byteOffset, glyfTable.byteLength); 21414 const offsetSize = isGlyphLocationsLong ? 4 : 2; 21415 let prev = isGlyphLocationsLong ? loca.getUint32(0) : 2 * loca.getUint16(0); 21416 let pos = 0; 21417 for (let i = 0; i < numGlyphs; i++) { 21418 pos += offsetSize; 21419 const next = isGlyphLocationsLong ? loca.getUint32(pos) : 2 * loca.getUint16(pos); 21420 if (next === prev) { 21421 this.glyphs.push(new Glyph({})); 21422 continue; 21423 } 21424 const glyph = Glyph.parse(prev, glyf); 21425 this.glyphs.push(glyph); 21426 prev = next; 21427 } 21428 } 21429 getSize() { 21430 return this.glyphs.reduce((a, g) => { 21431 const size = g.getSize(); 21432 return a + (size + 3 & ~3); 21433 }, 0); 21434 } 21435 write() { 21436 const totalSize = this.getSize(); 21437 const glyfTable = new DataView(new ArrayBuffer(totalSize)); 21438 const isLocationLong = totalSize > 0x1fffe; 21439 const offsetSize = isLocationLong ? 4 : 2; 21440 const locaTable = new DataView(new ArrayBuffer((this.glyphs.length + 1) * offsetSize)); 21441 if (isLocationLong) { 21442 locaTable.setUint32(0, 0); 21443 } else { 21444 locaTable.setUint16(0, 0); 21445 } 21446 let pos = 0; 21447 let locaIndex = 0; 21448 for (const glyph of this.glyphs) { 21449 pos += glyph.write(pos, glyfTable); 21450 pos = pos + 3 & ~3; 21451 locaIndex += offsetSize; 21452 if (isLocationLong) { 21453 locaTable.setUint32(locaIndex, pos); 21454 } else { 21455 locaTable.setUint16(locaIndex, pos >> 1); 21456 } 21457 } 21458 return { 21459 isLocationLong, 21460 loca: new Uint8Array(locaTable.buffer), 21461 glyf: new Uint8Array(glyfTable.buffer) 21462 }; 21463 } 21464 scale(factors) { 21465 for (let i = 0, ii = this.glyphs.length; i < ii; i++) { 21466 this.glyphs[i].scale(factors[i]); 21467 } 21468 } 21469} 21470class Glyph { 21471 constructor({ 21472 header = null, 21473 simple = null, 21474 composites = null 21475 }) { 21476 this.header = header; 21477 this.simple = simple; 21478 this.composites = composites; 21479 } 21480 static parse(pos, glyf) { 21481 const [read, header] = GlyphHeader.parse(pos, glyf); 21482 pos += read; 21483 if (header.numberOfContours < 0) { 21484 const composites = []; 21485 while (true) { 21486 const [n, composite] = CompositeGlyph.parse(pos, glyf); 21487 pos += n; 21488 composites.push(composite); 21489 if (!(composite.flags & MORE_COMPONENTS)) { 21490 break; 21491 } 21492 } 21493 return new Glyph({ 21494 header, 21495 composites 21496 }); 21497 } 21498 const simple = SimpleGlyph.parse(pos, glyf, header.numberOfContours); 21499 return new Glyph({ 21500 header, 21501 simple 21502 }); 21503 } 21504 getSize() { 21505 if (!this.header) { 21506 return 0; 21507 } 21508 const size = this.simple ? this.simple.getSize() : this.composites.reduce((a, c) => a + c.getSize(), 0); 21509 return this.header.getSize() + size; 21510 } 21511 write(pos, buf) { 21512 if (!this.header) { 21513 return 0; 21514 } 21515 const spos = pos; 21516 pos += this.header.write(pos, buf); 21517 if (this.simple) { 21518 pos += this.simple.write(pos, buf); 21519 } else { 21520 for (const composite of this.composites) { 21521 pos += composite.write(pos, buf); 21522 } 21523 } 21524 return pos - spos; 21525 } 21526 scale(factor) { 21527 if (!this.header) { 21528 return; 21529 } 21530 const xMiddle = (this.header.xMin + this.header.xMax) / 2; 21531 this.header.scale(xMiddle, factor); 21532 if (this.simple) { 21533 this.simple.scale(xMiddle, factor); 21534 } else { 21535 for (const composite of this.composites) { 21536 composite.scale(xMiddle, factor); 21537 } 21538 } 21539 } 21540} 21541class GlyphHeader { 21542 constructor({ 21543 numberOfContours, 21544 xMin, 21545 yMin, 21546 xMax, 21547 yMax 21548 }) { 21549 this.numberOfContours = numberOfContours; 21550 this.xMin = xMin; 21551 this.yMin = yMin; 21552 this.xMax = xMax; 21553 this.yMax = yMax; 21554 } 21555 static parse(pos, glyf) { 21556 return [10, new GlyphHeader({ 21557 numberOfContours: glyf.getInt16(pos), 21558 xMin: glyf.getInt16(pos + 2), 21559 yMin: glyf.getInt16(pos + 4), 21560 xMax: glyf.getInt16(pos + 6), 21561 yMax: glyf.getInt16(pos + 8) 21562 })]; 21563 } 21564 getSize() { 21565 return 10; 21566 } 21567 write(pos, buf) { 21568 buf.setInt16(pos, this.numberOfContours); 21569 buf.setInt16(pos + 2, this.xMin); 21570 buf.setInt16(pos + 4, this.yMin); 21571 buf.setInt16(pos + 6, this.xMax);
vendor: 10,506 bytes, lines 21572-21920
21572 buf.setInt16(pos + 8, this.yMax); 21573 return 10; 21574 } 21575 scale(x, factor) { 21576 this.xMin = Math.round(x + (this.xMin - x) * factor); 21577 this.xMax = Math.round(x + (this.xMax - x) * factor); 21578 } 21579} 21580class Contour { 21581 constructor({ 21582 flags, 21583 xCoordinates, 21584 yCoordinates 21585 }) { 21586 this.xCoordinates = xCoordinates; 21587 this.yCoordinates = yCoordinates; 21588 this.flags = flags; 21589 } 21590} 21591class SimpleGlyph { 21592 constructor({ 21593 contours, 21594 instructions 21595 }) { 21596 this.contours = contours; 21597 this.instructions = instructions; 21598 } 21599 static parse(pos, glyf, numberOfContours) { 21600 const endPtsOfContours = []; 21601 for (let i = 0; i < numberOfContours; i++) { 21602 const endPt = glyf.getUint16(pos); 21603 pos += 2; 21604 endPtsOfContours.push(endPt); 21605 } 21606 const numberOfPt = endPtsOfContours[numberOfContours - 1] + 1; 21607 const instructionLength = glyf.getUint16(pos); 21608 pos += 2; 21609 const instructions = new Uint8Array(glyf).slice(pos, pos + instructionLength); 21610 pos += instructionLength; 21611 const flags = []; 21612 for (let i = 0; i < numberOfPt; pos++, i++) { 21613 let flag = glyf.getUint8(pos); 21614 flags.push(flag); 21615 if (flag & REPEAT_FLAG) { 21616 const count = glyf.getUint8(++pos); 21617 flag ^= REPEAT_FLAG; 21618 for (let m = 0; m < count; m++) { 21619 flags.push(flag); 21620 } 21621 i += count; 21622 } 21623 } 21624 const allXCoordinates = []; 21625 let xCoordinates = []; 21626 let yCoordinates = []; 21627 let pointFlags = []; 21628 const contours = []; 21629 let endPtsOfContoursIndex = 0; 21630 let lastCoordinate = 0; 21631 for (let i = 0; i < numberOfPt; i++) { 21632 const flag = flags[i]; 21633 if (flag & X_SHORT_VECTOR) { 21634 const x = glyf.getUint8(pos++); 21635 lastCoordinate += flag & X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR ? x : -x; 21636 xCoordinates.push(lastCoordinate); 21637 } else if (flag & X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR) { 21638 xCoordinates.push(lastCoordinate); 21639 } else { 21640 lastCoordinate += glyf.getInt16(pos); 21641 pos += 2; 21642 xCoordinates.push(lastCoordinate); 21643 } 21644 if (endPtsOfContours[endPtsOfContoursIndex] === i) { 21645 endPtsOfContoursIndex++; 21646 allXCoordinates.push(xCoordinates); 21647 xCoordinates = []; 21648 } 21649 } 21650 lastCoordinate = 0; 21651 endPtsOfContoursIndex = 0; 21652 for (let i = 0; i < numberOfPt; i++) { 21653 const flag = flags[i]; 21654 if (flag & Y_SHORT_VECTOR) { 21655 const y = glyf.getUint8(pos++); 21656 lastCoordinate += flag & Y_IS_SAME_OR_POSITIVE_Y_SHORT_VECTOR ? y : -y; 21657 yCoordinates.push(lastCoordinate); 21658 } else if (flag & Y_IS_SAME_OR_POSITIVE_Y_SHORT_VECTOR) { 21659 yCoordinates.push(lastCoordinate); 21660 } else { 21661 lastCoordinate += glyf.getInt16(pos); 21662 pos += 2; 21663 yCoordinates.push(lastCoordinate); 21664 } 21665 pointFlags.push(flag & ON_CURVE_POINT | flag & OVERLAP_SIMPLE); 21666 if (endPtsOfContours[endPtsOfContoursIndex] === i) { 21667 xCoordinates = allXCoordinates[endPtsOfContoursIndex]; 21668 endPtsOfContoursIndex++; 21669 contours.push(new Contour({ 21670 flags: pointFlags, 21671 xCoordinates, 21672 yCoordinates 21673 })); 21674 yCoordinates = []; 21675 pointFlags = []; 21676 } 21677 } 21678 return new SimpleGlyph({ 21679 contours, 21680 instructions 21681 }); 21682 } 21683 getSize() { 21684 let size = this.contours.length * 2 + 2 + this.instructions.length; 21685 let lastX = 0; 21686 let lastY = 0; 21687 for (const contour of this.contours) { 21688 size += contour.flags.length; 21689 for (let i = 0, ii = contour.xCoordinates.length; i < ii; i++) { 21690 const x = contour.xCoordinates[i]; 21691 const y = contour.yCoordinates[i]; 21692 let abs = Math.abs(x - lastX); 21693 if (abs > 255) { 21694 size += 2; 21695 } else if (abs > 0) { 21696 size += 1; 21697 } 21698 lastX = x; 21699 abs = Math.abs(y - lastY); 21700 if (abs > 255) { 21701 size += 2; 21702 } else if (abs > 0) { 21703 size += 1; 21704 } 21705 lastY = y; 21706 } 21707 } 21708 return size; 21709 } 21710 write(pos, buf) { 21711 const spos = pos; 21712 const xCoordinates = []; 21713 const yCoordinates = []; 21714 const flags = []; 21715 let lastX = 0; 21716 let lastY = 0; 21717 for (const contour of this.contours) { 21718 for (let i = 0, ii = contour.xCoordinates.length; i < ii; i++) { 21719 let flag = contour.flags[i]; 21720 const x = contour.xCoordinates[i]; 21721 let delta = x - lastX; 21722 if (delta === 0) { 21723 flag |= X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR; 21724 xCoordinates.push(0); 21725 } else { 21726 const abs = Math.abs(delta); 21727 if (abs <= 255) { 21728 flag |= delta >= 0 ? X_SHORT_VECTOR | X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR : X_SHORT_VECTOR; 21729 xCoordinates.push(abs); 21730 } else { 21731 xCoordinates.push(delta); 21732 } 21733 } 21734 lastX = x; 21735 const y = contour.yCoordinates[i]; 21736 delta = y - lastY; 21737 if (delta === 0) { 21738 flag |= Y_IS_SAME_OR_POSITIVE_Y_SHORT_VECTOR; 21739 yCoordinates.push(0); 21740 } else { 21741 const abs = Math.abs(delta); 21742 if (abs <= 255) { 21743 flag |= delta >= 0 ? Y_SHORT_VECTOR | Y_IS_SAME_OR_POSITIVE_Y_SHORT_VECTOR : Y_SHORT_VECTOR; 21744 yCoordinates.push(abs); 21745 } else { 21746 yCoordinates.push(delta); 21747 } 21748 } 21749 lastY = y; 21750 flags.push(flag); 21751 } 21752 buf.setUint16(pos, xCoordinates.length - 1); 21753 pos += 2; 21754 } 21755 buf.setUint16(pos, this.instructions.length); 21756 pos += 2; 21757 if (this.instructions.length) { 21758 new Uint8Array(buf.buffer, 0, buf.buffer.byteLength).set(this.instructions, pos); 21759 pos += this.instructions.length; 21760 } 21761 for (const flag of flags) { 21762 buf.setUint8(pos++, flag); 21763 } 21764 for (let i = 0, ii = xCoordinates.length; i < ii; i++) { 21765 const x = xCoordinates[i]; 21766 const flag = flags[i]; 21767 if (flag & X_SHORT_VECTOR) { 21768 buf.setUint8(pos++, x); 21769 } else if (!(flag & X_IS_SAME_OR_POSITIVE_X_SHORT_VECTOR)) { 21770 buf.setInt16(pos, x); 21771 pos += 2; 21772 } 21773 } 21774 for (let i = 0, ii = yCoordinates.length; i < ii; i++) { 21775 const y = yCoordinates[i]; 21776 const flag = flags[i]; 21777 if (flag & Y_SHORT_VECTOR) { 21778 buf.setUint8(pos++, y); 21779 } else if (!(flag & Y_IS_SAME_OR_POSITIVE_Y_SHORT_VECTOR)) { 21780 buf.setInt16(pos, y); 21781 pos += 2; 21782 } 21783 } 21784 return pos - spos; 21785 } 21786 scale(x, factor) { 21787 for (const contour of this.contours) { 21788 if (contour.xCoordinates.length === 0) { 21789 continue; 21790 } 21791 for (let i = 0, ii = contour.xCoordinates.length; i < ii; i++) { 21792 contour.xCoordinates[i] = Math.round(x + (contour.xCoordinates[i] - x) * factor); 21793 } 21794 } 21795 } 21796} 21797class CompositeGlyph { 21798 constructor({ 21799 flags, 21800 glyphIndex, 21801 argument1, 21802 argument2, 21803 transf, 21804 instructions 21805 }) { 21806 this.flags = flags; 21807 this.glyphIndex = glyphIndex; 21808 this.argument1 = argument1; 21809 this.argument2 = argument2; 21810 this.transf = transf; 21811 this.instructions = instructions; 21812 } 21813 static parse(pos, glyf) { 21814 const spos = pos; 21815 const transf = []; 21816 let flags = glyf.getUint16(pos); 21817 const glyphIndex = glyf.getUint16(pos + 2); 21818 pos += 4; 21819 let argument1, argument2; 21820 if (flags & ARG_1_AND_2_ARE_WORDS) { 21821 if (flags & ARGS_ARE_XY_VALUES) { 21822 argument1 = glyf.getInt16(pos); 21823 argument2 = glyf.getInt16(pos + 2); 21824 } else { 21825 argument1 = glyf.getUint16(pos); 21826 argument2 = glyf.getUint16(pos + 2); 21827 } 21828 pos += 4; 21829 flags ^= ARG_1_AND_2_ARE_WORDS; 21830 } else { 21831 if (flags & ARGS_ARE_XY_VALUES) { 21832 argument1 = glyf.getInt8(pos); 21833 argument2 = glyf.getInt8(pos + 1); 21834 } else { 21835 argument1 = glyf.getUint8(pos); 21836 argument2 = glyf.getUint8(pos + 1); 21837 } 21838 pos += 2; 21839 } 21840 if (flags & WE_HAVE_A_SCALE) { 21841 transf.push(glyf.getUint16(pos)); 21842 pos += 2; 21843 } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) { 21844 transf.push(glyf.getUint16(pos), glyf.getUint16(pos + 2)); 21845 pos += 4; 21846 } else if (flags & WE_HAVE_A_TWO_BY_TWO) { 21847 transf.push(glyf.getUint16(pos), glyf.getUint16(pos + 2), glyf.getUint16(pos + 4), glyf.getUint16(pos + 6)); 21848 pos += 8; 21849 } 21850 let instructions = null; 21851 if (flags & WE_HAVE_INSTRUCTIONS) { 21852 const instructionLength = glyf.getUint16(pos); 21853 pos += 2; 21854 instructions = new Uint8Array(glyf).slice(pos, pos + instructionLength); 21855 pos += instructionLength; 21856 } 21857 return [pos - spos, new CompositeGlyph({ 21858 flags, 21859 glyphIndex, 21860 argument1, 21861 argument2, 21862 transf, 21863 instructions 21864 })]; 21865 } 21866 getSize() { 21867 let size = 2 + 2 + this.transf.length * 2; 21868 if (this.flags & WE_HAVE_INSTRUCTIONS) { 21869 size += 2 + this.instructions.length; 21870 } 21871 size += 2; 21872 if (this.flags & 2) { 21873 if (!(this.argument1 >= -128 && this.argument1 <= 127 && this.argument2 >= -128 && this.argument2 <= 127)) { 21874 size += 2; 21875 } 21876 } else if (!(this.argument1 >= 0 && this.argument1 <= 255 && this.argument2 >= 0 && this.argument2 <= 255)) { 21877 size += 2; 21878 } 21879 return size; 21880 } 21881 write(pos, buf) { 21882 const spos = pos; 21883 if (this.flags & ARGS_ARE_XY_VALUES) { 21884 if (!(this.argument1 >= -128 && this.argument1 <= 127 && this.argument2 >= -128 && this.argument2 <= 127)) { 21885 this.flags |= ARG_1_AND_2_ARE_WORDS; 21886 } 21887 } else if (!(this.argument1 >= 0 && this.argument1 <= 255 && this.argument2 >= 0 && this.argument2 <= 255)) { 21888 this.flags |= ARG_1_AND_2_ARE_WORDS; 21889 } 21890 buf.setUint16(pos, this.flags); 21891 buf.setUint16(pos + 2, this.glyphIndex); 21892 pos += 4; 21893 if (this.flags & ARG_1_AND_2_ARE_WORDS) { 21894 if (this.flags & ARGS_ARE_XY_VALUES) { 21895 buf.setInt16(pos, this.argument1); 21896 buf.setInt16(pos + 2, this.argument2); 21897 } else { 21898 buf.setUint16(pos, this.argument1); 21899 buf.setUint16(pos + 2, this.argument2); 21900 } 21901 pos += 4; 21902 } else { 21903 buf.setUint8(pos, this.argument1); 21904 buf.setUint8(pos + 1, this.argument2); 21905 pos += 2; 21906 } 21907 if (this.flags & WE_HAVE_INSTRUCTIONS) { 21908 buf.setUint16(pos, this.instructions.length); 21909 pos += 2; 21910 if (this.instructions.length) { 21911 new Uint8Array(buf.buffer, 0, buf.buffer.byteLength).set(this.instructions, pos); 21912 pos += this.instructions.length; 21913 } 21914 } 21915 return pos - spos; 21916 } 21917 scale(x, factor) {} 21918} 21919 21920;// ./src/core/opentype_file_builder.js
vendor: 3,297 bytes, lines 21920-22030
21920 21921 21922 21923function writeInt16(dest, offset, num) { 21924 dest[offset] = num >> 8 & 0xff; 21925 dest[offset + 1] = num & 0xff; 21926} 21927function writeInt32(dest, offset, num) { 21928 dest[offset] = num >> 24 & 0xff; 21929 dest[offset + 1] = num >> 16 & 0xff; 21930 dest[offset + 2] = num >> 8 & 0xff; 21931 dest[offset + 3] = num & 0xff; 21932} 21933function writeData(dest, offset, data) { 21934 if (data instanceof Uint8Array) { 21935 dest.set(data, offset); 21936 } else if (typeof data === "string") { 21937 for (let i = 0, ii = data.length; i < ii; i++) { 21938 dest[offset++] = data.charCodeAt(i) & 0xff; 21939 } 21940 } else { 21941 for (const num of data) { 21942 dest[offset++] = num & 0xff; 21943 } 21944 } 21945} 21946const OTF_HEADER_SIZE = 12; 21947const OTF_TABLE_ENTRY_SIZE = 16; 21948class OpenTypeFileBuilder { 21949 constructor(sfnt) { 21950 this.sfnt = sfnt; 21951 this.tables = Object.create(null); 21952 } 21953 static getSearchParams(entriesCount, entrySize) { 21954 let maxPower2 = 1, 21955 log2 = 0; 21956 while ((maxPower2 ^ entriesCount) > maxPower2) { 21957 maxPower2 <<= 1; 21958 log2++; 21959 } 21960 const searchRange = maxPower2 * entrySize; 21961 return { 21962 range: searchRange, 21963 entry: log2, 21964 rangeShift: entrySize * entriesCount - searchRange 21965 }; 21966 } 21967 toArray() { 21968 let sfnt = this.sfnt; 21969 const tables = this.tables; 21970 const tablesNames = Object.keys(tables); 21971 tablesNames.sort(); 21972 const numTables = tablesNames.length; 21973 let i, j, jj, table, tableName; 21974 let offset = OTF_HEADER_SIZE + numTables * OTF_TABLE_ENTRY_SIZE; 21975 const tableOffsets = [offset]; 21976 for (i = 0; i < numTables; i++) { 21977 table = tables[tablesNames[i]]; 21978 const paddedLength = (table.length + 3 & ~3) >>> 0; 21979 offset += paddedLength; 21980 tableOffsets.push(offset); 21981 } 21982 const file = new Uint8Array(offset); 21983 for (i = 0; i < numTables; i++) { 21984 table = tables[tablesNames[i]]; 21985 writeData(file, tableOffsets[i], table); 21986 } 21987 if (sfnt === "true") { 21988 sfnt = string32(0x00010000); 21989 } 21990 file[0] = sfnt.charCodeAt(0) & 0xff; 21991 file[1] = sfnt.charCodeAt(1) & 0xff; 21992 file[2] = sfnt.charCodeAt(2) & 0xff; 21993 file[3] = sfnt.charCodeAt(3) & 0xff; 21994 writeInt16(file, 4, numTables); 21995 const searchParams = OpenTypeFileBuilder.getSearchParams(numTables, 16); 21996 writeInt16(file, 6, searchParams.range); 21997 writeInt16(file, 8, searchParams.entry); 21998 writeInt16(file, 10, searchParams.rangeShift); 21999 offset = OTF_HEADER_SIZE; 22000 for (i = 0; i < numTables; i++) { 22001 tableName = tablesNames[i]; 22002 file[offset] = tableName.charCodeAt(0) & 0xff; 22003 file[offset + 1] = tableName.charCodeAt(1) & 0xff; 22004 file[offset + 2] = tableName.charCodeAt(2) & 0xff; 22005 file[offset + 3] = tableName.charCodeAt(3) & 0xff; 22006 let checksum = 0; 22007 for (j = tableOffsets[i], jj = tableOffsets[i + 1]; j < jj; j += 4) { 22008 const quad = readUint32(file, j); 22009 checksum = checksum + quad >>> 0; 22010 } 22011 writeInt32(file, offset + 4, checksum); 22012 writeInt32(file, offset + 8, tableOffsets[i]); 22013 writeInt32(file, offset + 12, tables[tableName].length); 22014 offset += OTF_TABLE_ENTRY_SIZE; 22015 } 22016 return file; 22017 } 22018 addTable(tag, data) { 22019 if (tag in this.tables) { 22020 throw new Error("Table " + tag + " already exists"); 22021 } 22022 this.tables[tag] = data; 22023 } 22024} 22025 22026;// ./src/core/type1_parser.js 22027 22028 22029 22030
vendor: 3,855 bytes, lines 22031-22168
22031const HINTING_ENABLED = false; 22032const COMMAND_MAP = { 22033 hstem: [1], 22034 vstem: [3], 22035 vmoveto: [4], 22036 rlineto: [5], 22037 hlineto: [6], 22038 vlineto: [7], 22039 rrcurveto: [8], 22040 callsubr: [10], 22041 flex: [12, 35], 22042 drop: [12, 18], 22043 endchar: [14], 22044 rmoveto: [21], 22045 hmoveto: [22], 22046 vhcurveto: [30], 22047 hvcurveto: [31] 22048}; 22049class Type1CharString { 22050 constructor() { 22051 this.width = 0; 22052 this.lsb = 0; 22053 this.flexing = false; 22054 this.output = []; 22055 this.stack = []; 22056 } 22057 convert(encoded, subrs, seacAnalysisEnabled) { 22058 const count = encoded.length; 22059 let error = false; 22060 let wx, sbx, subrNumber; 22061 for (let i = 0; i < count; i++) { 22062 let value = encoded[i]; 22063 if (value < 32) { 22064 if (value === 12) { 22065 value = (value << 8) + encoded[++i]; 22066 } 22067 switch (value) { 22068 case 1: 22069 if (!HINTING_ENABLED) { 22070 this.stack = []; 22071 break; 22072 } 22073 error = this.executeCommand(2, COMMAND_MAP.hstem); 22074 break; 22075 case 3: 22076 if (!HINTING_ENABLED) { 22077 this.stack = []; 22078 break; 22079 } 22080 error = this.executeCommand(2, COMMAND_MAP.vstem); 22081 break; 22082 case 4: 22083 if (this.flexing) { 22084 if (this.stack.length < 1) { 22085 error = true; 22086 break; 22087 } 22088 const dy = this.stack.pop(); 22089 this.stack.push(0, dy); 22090 break; 22091 } 22092 error = this.executeCommand(1, COMMAND_MAP.vmoveto); 22093 break; 22094 case 5: 22095 error = this.executeCommand(2, COMMAND_MAP.rlineto); 22096 break; 22097 case 6: 22098 error = this.executeCommand(1, COMMAND_MAP.hlineto); 22099 break; 22100 case 7: 22101 error = this.executeCommand(1, COMMAND_MAP.vlineto); 22102 break; 22103 case 8: 22104 error = this.executeCommand(6, COMMAND_MAP.rrcurveto); 22105 break; 22106 case 9: 22107 this.stack = []; 22108 break; 22109 case 10: 22110 if (this.stack.length < 1) { 22111 error = true; 22112 break; 22113 } 22114 subrNumber = this.stack.pop(); 22115 if (!subrs[subrNumber]) { 22116 error = true; 22117 break; 22118 } 22119 error = this.convert(subrs[subrNumber], subrs, seacAnalysisEnabled); 22120 break; 22121 case 11: 22122 return error; 22123 case 13: 22124 if (this.stack.length < 2) { 22125 error = true; 22126 break; 22127 } 22128 wx = this.stack.pop(); 22129 sbx = this.stack.pop(); 22130 this.lsb = sbx; 22131 this.width = wx; 22132 this.stack.push(wx, sbx); 22133 error = this.executeCommand(2, COMMAND_MAP.hmoveto); 22134 break; 22135 case 14: 22136 this.output.push(COMMAND_MAP.endchar[0]); 22137 break; 22138 case 21: 22139 if (this.flexing) { 22140 break; 22141 } 22142 error = this.executeCommand(2, COMMAND_MAP.rmoveto); 22143 break; 22144 case 22: 22145 if (this.flexing) { 22146 this.stack.push(0); 22147 break; 22148 } 22149 error = this.executeCommand(1, COMMAND_MAP.hmoveto); 22150 break; 22151 case 30: 22152 error = this.executeCommand(4, COMMAND_MAP.vhcurveto); 22153 break; 22154 case 31: 22155 error = this.executeCommand(4, COMMAND_MAP.hvcurveto); 22156 break; 22157 case (12 << 8) + 0: 22158 this.stack = []; 22159 break; 22160 case (12 << 8) + 1: 22161 if (!HINTING_ENABLED) { 22162 this.stack = []; 22163 break; 22164 } 22165 error = this.executeCommand(2, COMMAND_MAP.vstem); 22166 break; 22167 case (12 << 8) + 2: 22168 if (!HINTING_ENABLED
vendor: 7,485 bytes, lines 22168-22410
22168) { 22169 this.stack = []; 22170 break; 22171 } 22172 error = this.executeCommand(2, COMMAND_MAP.hstem); 22173 break; 22174 case (12 << 8) + 6: 22175 if (seacAnalysisEnabled) { 22176 const asb = this.stack.at(-5); 22177 this.seac = this.stack.splice(-4, 4); 22178 this.seac[0] += this.lsb - asb; 22179 error = this.executeCommand(0, COMMAND_MAP.endchar); 22180 } else { 22181 error = this.executeCommand(4, COMMAND_MAP.endchar); 22182 } 22183 break; 22184 case (12 << 8) + 7: 22185 if (this.stack.length < 4) { 22186 error = true; 22187 break; 22188 } 22189 this.stack.pop(); 22190 wx = this.stack.pop(); 22191 const sby = this.stack.pop(); 22192 sbx = this.stack.pop(); 22193 this.lsb = sbx; 22194 this.width = wx; 22195 this.stack.push(wx, sbx, sby); 22196 error = this.executeCommand(3, COMMAND_MAP.rmoveto); 22197 break; 22198 case (12 << 8) + 12: 22199 if (this.stack.length < 2) { 22200 error = true; 22201 break; 22202 } 22203 const num2 = this.stack.pop(); 22204 const num1 = this.stack.pop(); 22205 this.stack.push(num1 / num2); 22206 break; 22207 case (12 << 8) + 16: 22208 if (this.stack.length < 2) { 22209 error = true; 22210 break; 22211 } 22212 subrNumber = this.stack.pop(); 22213 const numArgs = this.stack.pop(); 22214 if (subrNumber === 0 && numArgs === 3) { 22215 const flexArgs = this.stack.splice(-17, 17); 22216 this.stack.push(flexArgs[2] + flexArgs[0], flexArgs[3] + flexArgs[1], flexArgs[4], flexArgs[5], flexArgs[6], flexArgs[7], flexArgs[8], flexArgs[9], flexArgs[10], flexArgs[11], flexArgs[12], flexArgs[13], flexArgs[14]); 22217 error = this.executeCommand(13, COMMAND_MAP.flex, true); 22218 this.flexing = false; 22219 this.stack.push(flexArgs[15], flexArgs[16]); 22220 } else if (subrNumber === 1 && numArgs === 0) { 22221 this.flexing = true; 22222 } 22223 break; 22224 case (12 << 8) + 17: 22225 break; 22226 case (12 << 8) + 33: 22227 this.stack = []; 22228 break; 22229 default: 22230 warn('Unknown type 1 charstring command of "' + value + '"'); 22231 break; 22232 } 22233 if (error) { 22234 break; 22235 } 22236 continue; 22237 } else if (value <= 246) { 22238 value -= 139; 22239 } else if (value <= 250) { 22240 value = (value - 247) * 256 + encoded[++i] + 108; 22241 } else if (value <= 254) { 22242 value = -((value - 251) * 256) - encoded[++i] - 108; 22243 } else { 22244 value = (encoded[++i] & 0xff) << 24 | (encoded[++i] & 0xff) << 16 | (encoded[++i] & 0xff) << 8 | (encoded[++i] & 0xff) << 0; 22245 } 22246 this.stack.push(value); 22247 } 22248 return error; 22249 } 22250 executeCommand(howManyArgs, command, keepStack) { 22251 const stackLength = this.stack.length; 22252 if (howManyArgs > stackLength) { 22253 return true; 22254 } 22255 const start = stackLength - howManyArgs; 22256 for (let i = start; i < stackLength; i++) { 22257 let value = this.stack[i]; 22258 if (Number.isInteger(value)) { 22259 this.output.push(28, value >> 8 & 0xff, value & 0xff); 22260 } else { 22261 value = 65536 * value | 0; 22262 this.output.push(255, value >> 24 & 0xff, value >> 16 & 0xff, value >> 8 & 0xff, value & 0xff); 22263 } 22264 } 22265 this.output.push(...command); 22266 if (keepStack) { 22267 this.stack.splice(start, howManyArgs); 22268 } else { 22269 this.stack.length = 0; 22270 } 22271 return false; 22272 } 22273} 22274const EEXEC_ENCRYPT_KEY = 55665; 22275const CHAR_STRS_ENCRYPT_KEY = 4330; 22276function isHexDigit(code) { 22277 return code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102; 22278} 22279function decrypt(data, key, discardNumber) { 22280 if (discardNumber >= data.length) { 22281 return new Uint8Array(0); 22282 } 22283 const c1 = 52845, 22284 c2 = 22719; 22285 let r = key | 0, 22286 i, 22287 j; 22288 for (i = 0; i < discardNumber; i++) { 22289 r = (data[i] + r) * c1 + c2 & (1 << 16) - 1; 22290 } 22291 const count = data.length - discardNumber; 22292 const decrypted = new Uint8Array(count); 22293 for (i = discardNumber, j = 0; j < count; i++, j++) { 22294 const value = data[i]; 22295 decrypted[j] = value ^ r >> 8; 22296 r = (value + r) * c1 + c2 & (1 << 16) - 1; 22297 } 22298 return decrypted; 22299} 22300function decryptAscii(data, key, discardNumber) { 22301 const c1 = 52845, 22302 c2 = 22719; 22303 let r = key | 0; 22304 const count = data.length, 22305 maybeLength = count >>> 1; 22306 const decrypted = new Uint8Array(maybeLength); 22307 let i, j; 22308 for (i = 0, j = 0; i < count; i++) { 22309 const digit1 = data[i]; 22310 if (!isHexDigit(digit1)) { 22311 continue; 22312 } 22313 i++; 22314 let digit2; 22315 while (i < count && !isHexDigit(digit2 = data[i])) { 22316 i++; 22317 } 22318 if (i < count) { 22319 const value = parseInt(String.fromCharCode(digit1, digit2), 16); 22320 decrypted[j++] = value ^ r >> 8; 22321 r = (value + r) * c1 + c2 & (1 << 16) - 1; 22322 } 22323 } 22324 return decrypted.slice(discardNumber, j); 22325} 22326function isSpecial(c) { 22327 return c === 0x2f || c === 0x5b || c === 0x5d || c === 0x7b || c === 0x7d || c === 0x28 || c === 0x29; 22328} 22329class Type1Parser { 22330 constructor(stream, encrypted, seacAnalysisEnabled) { 22331 if (encrypted) { 22332 const data = stream.getBytes(); 22333 const isBinary = !((isHexDigit(data[0]) || isWhiteSpace(data[0])) && isHexDigit(data[1]) && isHexDigit(data[2]) && isHexDigit(data[3]) && isHexDigit(data[4]) && isHexDigit(data[5]) && isHexDigit(data[6]) && isHexDigit(data[7])); 22334 stream = new Stream(isBinary ? decrypt(data, EEXEC_ENCRYPT_KEY, 4) : decryptAscii(data, EEXEC_ENCRYPT_KEY, 4)); 22335 } 22336 this.seacAnalysisEnabled = !!seacAnalysisEnabled; 22337 this.stream = stream; 22338 this.nextChar(); 22339 } 22340 readNumberArray() { 22341 this.getToken(); 22342 const array = []; 22343 while (true) { 22344 const token = this.getToken(); 22345 if (token === null || token === "]" || token === "}") { 22346 break; 22347 } 22348 array.push(parseFloat(token || 0)); 22349 } 22350 return array; 22351 } 22352 readNumber() { 22353 const token = this.getToken(); 22354 return parseFloat(token || 0); 22355 } 22356 readInt() { 22357 const token = this.getToken(); 22358 return parseInt(token || 0, 10) | 0; 22359 } 22360 readBoolean() { 22361 const token = this.getToken(); 22362 return token === "true" ? 1 : 0; 22363 } 22364 nextChar() { 22365 return this.currentChar = this.stream.getByte(); 22366 } 22367 prevChar() { 22368 this.stream.skip(-2); 22369 return this.currentChar = this.stream.getByte(); 22370 } 22371 getToken() { 22372 let comment = false; 22373 let ch = this.currentChar; 22374 while (true) { 22375 if (ch === -1) { 22376 return null; 22377 } 22378 if (comment) { 22379 if (ch === 0x0a || ch === 0x0d) { 22380 comment = false; 22381 } 22382 } else if (ch === 0x25) { 22383 comment = true; 22384 } else if (!isWhiteSpace(ch)) { 22385 break; 22386 } 22387 ch = this.nextChar(); 22388 } 22389 if (isSpecial(ch)) { 22390 this.nextChar(); 22391 return String.fromCharCode(ch); 22392 } 22393 let token = ""; 22394 do { 22395 token += String.fromCharCode(ch); 22396 ch = this.nextChar(); 22397 } while (ch >= 0 && !isWhiteSpace(ch) && !isSpecial(ch)); 22398 return token; 22399 } 22400 readCharStrings(bytes, lenIV) { 22401 if (lenIV === -1) { 22402 return bytes; 22403 } 22404 return decrypt(bytes, CHAR_STRS_ENCRYPT_KEY, lenIV); 22405 } 22406 extractFontProgram(properties) { 22407 const stream = this.stream; 22408 const subrs = [], 22409 charstrings = []; 22410 const privateData =
vendor: 5,695 bytes, lines 22410-22591
22410Object.create(null); 22411 privateData.lenIV = 4; 22412 const program = { 22413 subrs: [], 22414 charstrings: [], 22415 properties: { 22416 privateData 22417 } 22418 }; 22419 let token, length, data, lenIV; 22420 while ((token = this.getToken()) !== null) { 22421 if (token !== "/") { 22422 continue; 22423 } 22424 token = this.getToken(); 22425 switch (token) { 22426 case "CharStrings": 22427 this.getToken(); 22428 this.getToken(); 22429 this.getToken(); 22430 this.getToken(); 22431 while (true) { 22432 token = this.getToken(); 22433 if (token === null || token === "end") { 22434 break; 22435 } 22436 if (token !== "/") { 22437 continue; 22438 } 22439 const glyph = this.getToken(); 22440 length = this.readInt(); 22441 this.getToken(); 22442 data = length > 0 ? stream.getBytes(length) : new Uint8Array(0); 22443 lenIV = program.properties.privateData.lenIV; 22444 const encoded = this.readCharStrings(data, lenIV); 22445 this.nextChar(); 22446 token = this.getToken(); 22447 if (token === "noaccess") { 22448 this.getToken(); 22449 } else if (token === "/") { 22450 this.prevChar(); 22451 } 22452 charstrings.push({ 22453 glyph, 22454 encoded 22455 }); 22456 } 22457 break; 22458 case "Subrs": 22459 this.readInt(); 22460 this.getToken(); 22461 while (this.getToken() === "dup") { 22462 const index = this.readInt(); 22463 length = this.readInt(); 22464 this.getToken(); 22465 data = length > 0 ? stream.getBytes(length) : new Uint8Array(0); 22466 lenIV = program.properties.privateData.lenIV; 22467 const encoded = this.readCharStrings(data, lenIV); 22468 this.nextChar(); 22469 token = this.getToken(); 22470 if (token === "noaccess") { 22471 this.getToken(); 22472 } 22473 subrs[index] = encoded; 22474 } 22475 break; 22476 case "BlueValues": 22477 case "OtherBlues": 22478 case "FamilyBlues": 22479 case "FamilyOtherBlues": 22480 const blueArray = this.readNumberArray(); 22481 if (blueArray.length > 0 && blueArray.length % 2 === 0 && HINTING_ENABLED) { 22482 program.properties.privateData[token] = blueArray; 22483 } 22484 break; 22485 case "StemSnapH": 22486 case "StemSnapV": 22487 program.properties.privateData[token] = this.readNumberArray(); 22488 break; 22489 case "StdHW": 22490 case "StdVW": 22491 program.properties.privateData[token] = this.readNumberArray()[0]; 22492 break; 22493 case "BlueShift": 22494 case "lenIV": 22495 case "BlueFuzz": 22496 case "BlueScale": 22497 case "LanguageGroup": 22498 program.properties.privateData[token] = this.readNumber(); 22499 break; 22500 case "ExpansionFactor": 22501 program.properties.privateData[token] = this.readNumber() || 0.06; 22502 break; 22503 case "ForceBold": 22504 program.properties.privateData[token] = this.readBoolean(); 22505 break; 22506 } 22507 } 22508 for (const { 22509 encoded, 22510 glyph 22511 } of charstrings) { 22512 const charString = new Type1CharString(); 22513 const error = charString.convert(encoded, subrs, this.seacAnalysisEnabled); 22514 let output = charString.output; 22515 if (error) { 22516 output = [14]; 22517 } 22518 const charStringObject = { 22519 glyphName: glyph, 22520 charstring: output, 22521 width: charString.width, 22522 lsb: charString.lsb, 22523 seac: charString.seac 22524 }; 22525 if (glyph === ".notdef") { 22526 program.charstrings.unshift(charStringObject); 22527 } else { 22528 program.charstrings.push(charStringObject); 22529 } 22530 if (properties.builtInEncoding) { 22531 const index = properties.builtInEncoding.indexOf(glyph); 22532 if (index > -1 && properties.widths[index] === undefined && index >= properties.firstChar && index <= properties.lastChar) { 22533 properties.widths[index] = charString.width; 22534 } 22535 } 22536 } 22537 return program; 22538 } 22539 extractFontHeader(properties) { 22540 let token; 22541 while ((token = this.getToken()) !== null) { 22542 if (token !== "/") { 22543 continue; 22544 } 22545 token = this.getToken(); 22546 switch (token) { 22547 case "FontMatrix": 22548 const matrix = this.readNumberArray(); 22549 properties.fontMatrix = matrix; 22550 break; 22551 case "Encoding": 22552 const encodingArg = this.getToken(); 22553 let encoding; 22554 if (!/^\d+$/.test(encodingArg)) { 22555 encoding = getEncoding(encodingArg); 22556 } else { 22557 encoding = []; 22558 const size = parseInt(encodingArg, 10) | 0; 22559 this.getToken(); 22560 for (let j = 0; j < size; j++) { 22561 token = this.getToken(); 22562 while (token !== "dup" && token !== "def") { 22563 token = this.getToken(); 22564 if (token === null) { 22565 return; 22566 } 22567 } 22568 if (token === "def") { 22569 break; 22570 } 22571 const index = this.readInt(); 22572 this.getToken(); 22573 const glyph = this.getToken(); 22574 encoding[index] = glyph; 22575 this.getToken(); 22576 } 22577 } 22578 properties.builtInEncoding = encoding; 22579 break; 22580 case "FontBBox": 22581 const fontBBox = this.readNumberArray(); 22582 properties.ascent = Math.max(fontBBox[3], fontBBox[1]); 22583 properties.descent = Math.min(fontBBox[1], fontBBox[3]); 22584 properties.ascentScaled = true; 22585 break; 22586 } 22587 } 22588 } 22589} 22590 22591;// ./src/core/type1_font.js
vendor: 8,817 bytes, lines 22591-22884
22591 22592 22593 22594 22595 22596 22597 22598function findBlock(streamBytes, signature, startIndex) { 22599 const streamBytesLength = streamBytes.length; 22600 const signatureLength = signature.length; 22601 const scanLength = streamBytesLength - signatureLength; 22602 let i = startIndex, 22603 found = false; 22604 while (i < scanLength) { 22605 let j = 0; 22606 while (j < signatureLength && streamBytes[i + j] === signature[j]) { 22607 j++; 22608 } 22609 if (j >= signatureLength) { 22610 i += j; 22611 while (i < streamBytesLength && isWhiteSpace(streamBytes[i])) { 22612 i++; 22613 } 22614 found = true; 22615 break; 22616 } 22617 i++; 22618 } 22619 return { 22620 found, 22621 length: i 22622 }; 22623} 22624function getHeaderBlock(stream, suggestedLength) { 22625 const EEXEC_SIGNATURE = [0x65, 0x65, 0x78, 0x65, 0x63]; 22626 const streamStartPos = stream.pos; 22627 let headerBytes, headerBytesLength, block; 22628 try { 22629 headerBytes = stream.getBytes(suggestedLength); 22630 headerBytesLength = headerBytes.length; 22631 } catch {} 22632 if (headerBytesLength === suggestedLength) { 22633 block = findBlock(headerBytes, EEXEC_SIGNATURE, suggestedLength - 2 * EEXEC_SIGNATURE.length); 22634 if (block.found && block.length === suggestedLength) { 22635 return { 22636 stream: new Stream(headerBytes), 22637 length: suggestedLength 22638 }; 22639 } 22640 } 22641 warn('Invalid "Length1" property in Type1 font -- trying to recover.'); 22642 stream.pos = streamStartPos; 22643 const SCAN_BLOCK_LENGTH = 2048; 22644 let actualLength; 22645 while (true) { 22646 const scanBytes = stream.peekBytes(SCAN_BLOCK_LENGTH); 22647 block = findBlock(scanBytes, EEXEC_SIGNATURE, 0); 22648 if (block.length === 0) { 22649 break; 22650 } 22651 stream.pos += block.length; 22652 if (block.found) { 22653 actualLength = stream.pos - streamStartPos; 22654 break; 22655 } 22656 } 22657 stream.pos = streamStartPos; 22658 if (actualLength) { 22659 return { 22660 stream: new Stream(stream.getBytes(actualLength)), 22661 length: actualLength 22662 }; 22663 } 22664 warn('Unable to recover "Length1" property in Type1 font -- using as is.'); 22665 return { 22666 stream: new Stream(stream.getBytes(suggestedLength)), 22667 length: suggestedLength 22668 }; 22669} 22670function getEexecBlock(stream, suggestedLength) { 22671 const eexecBytes = stream.getBytes(); 22672 if (eexecBytes.length === 0) { 22673 throw new FormatError("getEexecBlock - no font program found."); 22674 } 22675 return { 22676 stream: new Stream(eexecBytes), 22677 length: eexecBytes.length 22678 }; 22679} 22680class Type1Font { 22681 constructor(name, file, properties) { 22682 const PFB_HEADER_SIZE = 6; 22683 let headerBlockLength = properties.length1; 22684 let eexecBlockLength = properties.length2; 22685 let pfbHeader = file.peekBytes(PFB_HEADER_SIZE); 22686 const pfbHeaderPresent = pfbHeader[0] === 0x80 && pfbHeader[1] === 0x01; 22687 if (pfbHeaderPresent) { 22688 file.skip(PFB_HEADER_SIZE); 22689 headerBlockLength = pfbHeader[5] << 24 | pfbHeader[4] << 16 | pfbHeader[3] << 8 | pfbHeader[2]; 22690 } 22691 const headerBlock = getHeaderBlock(file, headerBlockLength); 22692 const headerBlockParser = new Type1Parser(headerBlock.stream, false, SEAC_ANALYSIS_ENABLED); 22693 headerBlockParser.extractFontHeader(properties); 22694 if (pfbHeaderPresent) { 22695 pfbHeader = file.getBytes(PFB_HEADER_SIZE); 22696 eexecBlockLength = pfbHeader[5] << 24 | pfbHeader[4] << 16 | pfbHeader[3] << 8 | pfbHeader[2]; 22697 } 22698 const eexecBlock = getEexecBlock(file, eexecBlockLength); 22699 const eexecBlockParser = new Type1Parser(eexecBlock.stream, true, SEAC_ANALYSIS_ENABLED); 22700 const data = eexecBlockParser.extractFontProgram(properties); 22701 for (const key in data.properties) { 22702 properties[key] = data.properties[key]; 22703 } 22704 const charstrings = data.charstrings; 22705 const type2Charstrings = this.getType2Charstrings(charstrings); 22706 const subrs = this.getType2Subrs(data.subrs); 22707 this.charstrings = charstrings; 22708 this.data = this.wrap(name, type2Charstrings, this.charstrings, subrs, properties); 22709 this.seacs = this.getSeacs(data.charstrings); 22710 } 22711 get numGlyphs() { 22712 return this.charstrings.length + 1; 22713 } 22714 getCharset() { 22715 const charset = [".notdef"]; 22716 for (const { 22717 glyphName 22718 } of this.charstrings) { 22719 charset.push(glyphName); 22720 } 22721 return charset; 22722 } 22723 getGlyphMapping(properties) { 22724 const charstrings = this.charstrings; 22725 if (properties.composite) { 22726 const charCodeToGlyphId = Object.create(null); 22727 for (let glyphId = 0, charstringsLen = charstrings.length; glyphId < charstringsLen; glyphId++) { 22728 const charCode = properties.cMap.charCodeOf(glyphId); 22729 charCodeToGlyphId[charCode] = glyphId + 1; 22730 } 22731 return charCodeToGlyphId; 22732 } 22733 const glyphNames = [".notdef"]; 22734 let builtInEncoding, glyphId; 22735 for (glyphId = 0; glyphId < charstrings.length; glyphId++) { 22736 glyphNames.push(charstrings[glyphId].glyphName); 22737 } 22738 const encoding = properties.builtInEncoding; 22739 if (encoding) { 22740 builtInEncoding = Object.create(null); 22741 for (const charCode in encoding) { 22742 glyphId = glyphNames.indexOf(encoding[charCode]); 22743 if (glyphId >= 0) { 22744 builtInEncoding[charCode] = glyphId; 22745 } 22746 } 22747 } 22748 return type1FontGlyphMapping(properties, builtInEncoding, glyphNames); 22749 } 22750 hasGlyphId(id) { 22751 if (id < 0 || id >= this.numGlyphs) { 22752 return false; 22753 } 22754 if (id === 0) { 22755 return true; 22756 } 22757 const glyph = this.charstrings[id - 1]; 22758 return glyph.charstring.length > 0; 22759 } 22760 getSeacs(charstrings) { 22761 const seacMap = []; 22762 for (let i = 0, ii = charstrings.length; i < ii; i++) { 22763 const charstring = charstrings[i]; 22764 if (charstring.seac) { 22765 seacMap[i + 1] = charstring.seac; 22766 } 22767 } 22768 return seacMap; 22769 } 22770 getType2Charstrings(type1Charstrings) { 22771 const type2Charstrings = []; 22772 for (const type1Charstring of type1Charstrings) { 22773 type2Charstrings.push(type1Charstring.charstring); 22774 } 22775 return type2Charstrings; 22776 } 22777 getType2Subrs(type1Subrs) { 22778 let bias = 0; 22779 const count = type1Subrs.length; 22780 if (count < 1133) { 22781 bias = 107; 22782 } else if (count < 33769) { 22783 bias = 1131; 22784 } else { 22785 bias = 32768; 22786 } 22787 const type2Subrs = []; 22788 let i; 22789 for (i = 0; i < bias; i++) { 22790 type2Subrs.push([0x0b]); 22791 } 22792 for (i = 0; i < count; i++) { 22793 type2Subrs.push(type1Subrs[i]); 22794 } 22795 return type2Subrs; 22796 } 22797 wrap(name, glyphs, charstrings, subrs, properties) { 22798 const cff = new CFF(); 22799 cff.header = new CFFHeader(1, 0, 4, 4); 22800 cff.names = [name]; 22801 const topDict = new CFFTopDict(); 22802 topDict.setByName("version", 391); 22803 topDict.setByName("Notice", 392); 22804 topDict.setByName("FullName", 393); 22805 topDict.setByName("FamilyName", 394); 22806 topDict.setByName("Weight", 395); 22807 topDict.setByName("Encoding", null); 22808 topDict.setByName("FontMatrix", properties.fontMatrix); 22809 topDict.setByName("FontBBox", properties.bbox); 22810 topDict.setByName("charset", null); 22811 topDict.setByName("CharStrings", null); 22812 topDict.setByName("Private", null); 22813 cff.topDict = topDict; 22814 const strings = new CFFStrings(); 22815 strings.add("Version 0.11"); 22816 strings.add("See original notice"); 22817 strings.add(name); 22818 strings.add(name); 22819 strings.add("Medium"); 22820 cff.strings = strings; 22821 cff.globalSubrIndex = new CFFIndex(); 22822 const count = glyphs.length; 22823 const charsetArray = [".notdef"]; 22824 let i, ii; 22825 for (i = 0; i < count; i++) { 22826 const glyphName = charstrings[i].glyphName; 22827 const index = CFFStandardStrings.indexOf(glyphName); 22828 if (index === -1) { 22829 strings.add(glyphName); 22830 } 22831 charsetArray.push(glyphName); 22832 } 22833 cff.charset = new CFFCharset(false, 0, charsetArray); 22834 const charStringsIndex = new CFFIndex(); 22835 charStringsIndex.add([0x8b, 0x0e]); 22836 for (i = 0; i < count; i++) { 22837 charStringsIndex.add(glyphs[i]); 22838 } 22839 cff.charStrings = charStringsIndex; 22840 const privateDict = new CFFPrivateDict(); 22841 privateDict.setByName("Subrs", null); 22842 const fields = ["BlueValues", "OtherBlues", "FamilyBlues", "FamilyOtherBlues", "StemSnapH", "StemSnapV", "BlueShift", "BlueFuzz", "BlueScale", "LanguageGroup", "ExpansionFactor", "ForceBold", "StdHW", "StdVW"]; 22843 for (i = 0, ii = fields.length; i < ii; i++) { 22844 const field = fields[i]; 22845 if (!(field in properties.privateData)) { 22846 continue; 22847 } 22848 const value = properties.privateData[field]; 22849 if (Array.isArray(value)) { 22850 for (let j = value.length - 1; j > 0; j--) { 22851 value[j] -= value[j - 1]; 22852 } 22853 } 22854 privateDict.setByName(field, value); 22855 } 22856 cff.topDict.privateDict = privateDict; 22857 const subrIndex = new CFFIndex(); 22858 for (i = 0, ii = subrs.length; i < ii; i++) { 22859 subrIndex.add(subrs[i]); 22860 } 22861 privateDict.subrsIndex = subrIndex; 22862 const compiler = new CFFCompiler(cff); 22863 return compiler.compile(); 22864 } 22865} 22866 22867;// ./src/core/fonts.js 22868 22869 22870 22871 22872 22873 22874 22875 22876 22877 22878 22879 22880 22881 22882 22883 22884
22885const PRIVATE_USE_AREAS = [[0xe000, 0xf8ff], [0x100000, 0x10fffd]]; 22886const PDF_GLYPH_SPACE_UNITS = 1000; 22887const EXPORT_DATA_PROPERTIES = ["ascent", "bbox", "black", "bold", "charProcOperatorList", "composite", "cssFontInfo", "data", "defaultVMetrics", "defaultWidth", "descent", "fallbackName", "fontMatrix", "isInvalidPDFjsFont", "isType3Font", "italic", "loadedName", "mimetype", "missingFile", "name", "remeasure", "subtype", "systemFontInfo", "type", "vertical"]; 22888const EXPORT_DATA_EXTRA_PROPERTIES = ["cMap", "defaultEncoding", "differences", "isMonospace", "isSerifFont", "isSymbolicFont", "seacMap", "toFontChar", "toUnicod
vendor: 7,645 bytes, lines 22888-23156
22888e", "vmetrics", "widths"]; 22889function adjustWidths(properties) { 22890 if (!properties.fontMatrix) { 22891 return; 22892 } 22893 if (properties.fontMatrix[0] === FONT_IDENTITY_MATRIX[0]) { 22894 return; 22895 } 22896 const scale = 0.001 / properties.fontMatrix[0]; 22897 const glyphsWidths = properties.widths; 22898 for (const glyph in glyphsWidths) { 22899 glyphsWidths[glyph] *= scale; 22900 } 22901 properties.defaultWidth *= scale; 22902} 22903function adjustTrueTypeToUnicode(properties, isSymbolicFont, nameRecords) { 22904 if (properties.isInternalFont) { 22905 return; 22906 } 22907 if (properties.hasIncludedToUnicodeMap) { 22908 return; 22909 } 22910 if (properties.hasEncoding) { 22911 return; 22912 } 22913 if (properties.toUnicode instanceof IdentityToUnicodeMap) { 22914 return; 22915 } 22916 if (!isSymbolicFont) { 22917 return; 22918 } 22919 if (nameRecords.length === 0) { 22920 return; 22921 } 22922 if (properties.defaultEncoding === WinAnsiEncoding) { 22923 return; 22924 } 22925 for (const r of nameRecords) { 22926 if (!isWinNameRecord(r)) { 22927 return; 22928 } 22929 } 22930 const encoding = WinAnsiEncoding; 22931 const toUnicode = [], 22932 glyphsUnicodeMap = getGlyphsUnicode(); 22933 for (const charCode in encoding) { 22934 const glyphName = encoding[charCode]; 22935 if (glyphName === "") { 22936 continue; 22937 } 22938 const unicode = glyphsUnicodeMap[glyphName]; 22939 if (unicode === undefined) { 22940 continue; 22941 } 22942 toUnicode[charCode] = String.fromCharCode(unicode); 22943 } 22944 if (toUnicode.length > 0) { 22945 properties.toUnicode.amend(toUnicode); 22946 } 22947} 22948function adjustType1ToUnicode(properties, builtInEncoding) { 22949 if (properties.isInternalFont) { 22950 return; 22951 } 22952 if (properties.hasIncludedToUnicodeMap) { 22953 return; 22954 } 22955 if (builtInEncoding === properties.defaultEncoding) { 22956 return; 22957 } 22958 if (properties.toUnicode instanceof IdentityToUnicodeMap) { 22959 return; 22960 } 22961 const toUnicode = [], 22962 glyphsUnicodeMap = getGlyphsUnicode(); 22963 for (const charCode in builtInEncoding) { 22964 if (properties.hasEncoding) { 22965 if (properties.baseEncodingName || properties.differences[charCode] !== undefined) { 22966 continue; 22967 } 22968 } 22969 const glyphName = builtInEncoding[charCode]; 22970 const unicode = getUnicodeForGlyph(glyphName, glyphsUnicodeMap); 22971 if (unicode !== -1) { 22972 toUnicode[charCode] = String.fromCharCode(unicode); 22973 } 22974 } 22975 if (toUnicode.length > 0) { 22976 properties.toUnicode.amend(toUnicode); 22977 } 22978} 22979function amendFallbackToUnicode(properties) { 22980 if (!properties.fallbackToUnicode) { 22981 return; 22982 } 22983 if (properties.toUnicode instanceof IdentityToUnicodeMap) { 22984 return; 22985 } 22986 const toUnicode = []; 22987 for (const charCode in properties.fallbackToUnicode) { 22988 if (properties.toUnicode.has(charCode)) { 22989 continue; 22990 } 22991 toUnicode[charCode] = properties.fallbackToUnicode[charCode]; 22992 } 22993 if (toUnicode.length > 0) { 22994 properties.toUnicode.amend(toUnicode); 22995 } 22996} 22997class fonts_Glyph { 22998 constructor(originalCharCode, fontChar, unicode, accent, width, vmetric, operatorListId, isSpace, isInFont) { 22999 this.originalCharCode = originalCharCode; 23000 this.fontChar = fontChar; 23001 this.unicode = unicode; 23002 this.accent = accent; 23003 this.width = width; 23004 this.vmetric = vmetric; 23005 this.operatorListId = operatorListId; 23006 this.isSpace = isSpace; 23007 this.isInFont = isInFont; 23008 } 23009 get category() { 23010 return shadow(this, "category", getCharUnicodeCategory(this.unicode), true); 23011 } 23012} 23013function int16(b0, b1) { 23014 return (b0 << 8) + b1; 23015} 23016function writeSignedInt16(bytes, index, value) { 23017 bytes[index + 1] = value; 23018 bytes[index] = value >>> 8; 23019} 23020function signedInt16(b0, b1) { 23021 const value = (b0 << 8) + b1; 23022 return value & 1 << 15 ? value - 0x10000 : value; 23023} 23024function writeUint32(bytes, index, value) { 23025 bytes[index + 3] = value & 0xff; 23026 bytes[index + 2] = value >>> 8; 23027 bytes[index + 1] = value >>> 16; 23028 bytes[index] = value >>> 24; 23029} 23030function int32(b0, b1, b2, b3) { 23031 return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3; 23032} 23033function string16(value) { 23034 return String.fromCharCode(value >> 8 & 0xff, value & 0xff); 23035} 23036function safeString16(value) { 23037 if (value > 0x7fff) { 23038 value = 0x7fff; 23039 } else if (value < -0x8000) { 23040 value = -0x8000; 23041 } 23042 return String.fromCharCode(value >> 8 & 0xff, value & 0xff); 23043} 23044function isTrueTypeFile(file) { 23045 const header = file.peekBytes(4); 23046 return readUint32(header, 0) === 0x00010000 || bytesToString(header) === "true"; 23047} 23048function isTrueTypeCollectionFile(file) { 23049 const header = file.peekBytes(4); 23050 return bytesToString(header) === "ttcf"; 23051} 23052function isOpenTypeFile(file) { 23053 const header = file.peekBytes(4); 23054 return bytesToString(header) === "OTTO"; 23055} 23056function isType1File(file) { 23057 const header = file.peekBytes(2); 23058 if (header[0] === 0x25 && header[1] === 0x21) { 23059 return true; 23060 } 23061 if (header[0] === 0x80 && header[1] === 0x01) { 23062 return true; 23063 } 23064 return false; 23065} 23066function isCFFFile(file) { 23067 const header = file.peekBytes(4); 23068 if (header[0] >= 1 && header[3] >= 1 && header[3] <= 4) { 23069 return true; 23070 } 23071 return false; 23072} 23073function getFontFileType(file, { 23074 type, 23075 subtype, 23076 composite 23077}) { 23078 let fileType, fileSubtype; 23079 if (isTrueTypeFile(file) || isTrueTypeCollectionFile(file)) { 23080 fileType = composite ? "CIDFontType2" : "TrueType"; 23081 } else if (isOpenTypeFile(file)) { 23082 fileType = composite ? "CIDFontType2" : "OpenType"; 23083 } else if (isType1File(file)) { 23084 if (composite) { 23085 fileType = "CIDFontType0"; 23086 } else { 23087 fileType = type === "MMType1" ? "MMType1" : "Type1"; 23088 } 23089 } else if (isCFFFile(file)) { 23090 if (composite) { 23091 fileType = "CIDFontType0"; 23092 fileSubtype = "CIDFontType0C"; 23093 } else { 23094 fileType = type === "MMType1" ? "MMType1" : "Type1"; 23095 fileSubtype = "Type1C"; 23096 } 23097 } else { 23098 warn("getFontFileType: Unable to detect correct font file Type/Subtype."); 23099 fileType = type; 23100 fileSubtype = subtype; 23101 } 23102 return [fileType, fileSubtype]; 23103} 23104function applyStandardFontGlyphMap(map, glyphMap) { 23105 for (const charCode in glyphMap) { 23106 map[+charCode] = glyphMap[charCode]; 23107 } 23108} 23109function buildToFontChar(encoding, glyphsUnicodeMap, differences) { 23110 const toFontChar = []; 23111 let unicode; 23112 for (let i = 0, ii = encoding.length; i < ii; i++) { 23113 unicode = getUnicodeForGlyph(encoding[i], glyphsUnicodeMap); 23114 if (unicode !== -1) { 23115 toFontChar[i] = unicode; 23116 } 23117 } 23118 for (const charCode in differences) { 23119 unicode = getUnicodeForGlyph(differences[charCode], glyphsUnicodeMap); 23120 if (unicode !== -1) { 23121 toFontChar[+charCode] = unicode; 23122 } 23123 } 23124 return toFontChar; 23125} 23126function isMacNameRecord(r) { 23127 return r.platform === 1 && r.encoding === 0 && r.language === 0; 23128} 23129function isWinNameRecord(r) { 23130 return r.platform === 3 && r.encoding === 1 && r.language === 0x409; 23131} 23132function convertCidString(charCode, cid, shouldThrow = false) { 23133 switch (cid.length) { 23134 case 1: 23135 return cid.charCodeAt(0); 23136 case 2: 23137 return cid.charCodeAt(0) << 8 | cid.charCodeAt(1); 23138 } 23139 const msg = `Unsupported CID string (charCode ${charCode}): "${cid}".`; 23140 if (shouldThrow) { 23141 throw new FormatError(msg); 23142 } 23143 warn(msg); 23144 return cid; 23145} 23146function adjustMapping(charCodeToGlyphId, hasGlyph, newGlyphZeroId, toUnicode) { 23147 const newMap = Object.create(null); 23148 const toUnicodeExtraMap = new Map(); 23149 const toFontChar = []; 23150 const usedGlyphIds = new Set(); 23151 let privateUseAreaIndex = 0; 23152 const privateUseOffetStart = PRIVATE_USE_AREAS[privateUseAreaIndex][0]; 23153 let nextAvailableFontCharCode = privateUseOffetStart; 23154 let privateUseOffetEnd = PRIVATE_USE_AREAS[privateUseAreaIndex][1]; 23155 const isInPrivateArea = code => PRIVATE_USE_AREAS[0][0] <= code && code <= PRIVATE_USE_AREAS[0][1] || PRIVATE_USE_AREAS[1][0] <= code && code <= PRIVATE_USE_AREAS[1][1]; 23156
vendor: 15,636 bytes, lines 23156-23582
23156for (const originalCharCode in charCodeToGlyphId) { 23157 let glyphId = charCodeToGlyphId[originalCharCode]; 23158 if (!hasGlyph(glyphId)) { 23159 continue; 23160 } 23161 if (nextAvailableFontCharCode > privateUseOffetEnd) { 23162 privateUseAreaIndex++; 23163 if (privateUseAreaIndex >= PRIVATE_USE_AREAS.length) { 23164 warn("Ran out of space in font private use area."); 23165 break; 23166 } 23167 nextAvailableFontCharCode = PRIVATE_USE_AREAS[privateUseAreaIndex][0]; 23168 privateUseOffetEnd = PRIVATE_USE_AREAS[privateUseAreaIndex][1]; 23169 } 23170 const fontCharCode = nextAvailableFontCharCode++; 23171 if (glyphId === 0) { 23172 glyphId = newGlyphZeroId; 23173 } 23174 let unicode = toUnicode.get(originalCharCode); 23175 if (typeof unicode === "string") { 23176 unicode = unicode.codePointAt(0); 23177 } 23178 if (unicode && !isInPrivateArea(unicode) && !usedGlyphIds.has(glyphId)) { 23179 toUnicodeExtraMap.set(unicode, glyphId); 23180 usedGlyphIds.add(glyphId); 23181 } 23182 newMap[fontCharCode] = glyphId; 23183 toFontChar[originalCharCode] = fontCharCode; 23184 } 23185 return { 23186 toFontChar, 23187 charCodeToGlyphId: newMap, 23188 toUnicodeExtraMap, 23189 nextAvailableFontCharCode 23190 }; 23191} 23192function getRanges(glyphs, toUnicodeExtraMap, numGlyphs) { 23193 const codes = []; 23194 for (const charCode in glyphs) { 23195 if (glyphs[charCode] >= numGlyphs) { 23196 continue; 23197 } 23198 codes.push({ 23199 fontCharCode: charCode | 0, 23200 glyphId: glyphs[charCode] 23201 }); 23202 } 23203 if (toUnicodeExtraMap) { 23204 for (const [unicode, glyphId] of toUnicodeExtraMap) { 23205 if (glyphId >= numGlyphs) { 23206 continue; 23207 } 23208 codes.push({ 23209 fontCharCode: unicode, 23210 glyphId 23211 }); 23212 } 23213 } 23214 if (codes.length === 0) { 23215 codes.push({ 23216 fontCharCode: 0, 23217 glyphId: 0 23218 }); 23219 } 23220 codes.sort(function fontGetRangesSort(a, b) { 23221 return a.fontCharCode - b.fontCharCode; 23222 }); 23223 const ranges = []; 23224 const length = codes.length; 23225 for (let n = 0; n < length;) { 23226 const start = codes[n].fontCharCode; 23227 const codeIndices = [codes[n].glyphId]; 23228 ++n; 23229 let end = start; 23230 while (n < length && end + 1 === codes[n].fontCharCode) { 23231 codeIndices.push(codes[n].glyphId); 23232 ++end; 23233 ++n; 23234 if (end === 0xffff) { 23235 break; 23236 } 23237 } 23238 ranges.push([start, end, codeIndices]); 23239 } 23240 return ranges; 23241} 23242function createCmapTable(glyphs, toUnicodeExtraMap, numGlyphs) { 23243 const ranges = getRanges(glyphs, toUnicodeExtraMap, numGlyphs); 23244 const numTables = ranges.at(-1)[1] > 0xffff ? 2 : 1; 23245 let cmap = "\x00\x00" + string16(numTables) + "\x00\x03" + "\x00\x01" + string32(4 + numTables * 8); 23246 let i, ii, j, jj; 23247 for (i = ranges.length - 1; i >= 0; --i) { 23248 if (ranges[i][0] <= 0xffff) { 23249 break; 23250 } 23251 } 23252 const bmpLength = i + 1; 23253 if (ranges[i][0] < 0xffff && ranges[i][1] === 0xffff) { 23254 ranges[i][1] = 0xfffe; 23255 } 23256 const trailingRangesCount = ranges[i][1] < 0xffff ? 1 : 0; 23257 const segCount = bmpLength + trailingRangesCount; 23258 const searchParams = OpenTypeFileBuilder.getSearchParams(segCount, 2); 23259 let startCount = ""; 23260 let endCount = ""; 23261 let idDeltas = ""; 23262 let idRangeOffsets = ""; 23263 let glyphsIds = ""; 23264 let bias = 0; 23265 let range, start, end, codes; 23266 for (i = 0, ii = bmpLength; i < ii; i++) { 23267 range = ranges[i]; 23268 start = range[0]; 23269 end = range[1]; 23270 startCount += string16(start); 23271 endCount += string16(end); 23272 codes = range[2]; 23273 let contiguous = true; 23274 for (j = 1, jj = codes.length; j < jj; ++j) { 23275 if (codes[j] !== codes[j - 1] + 1) { 23276 contiguous = false; 23277 break; 23278 } 23279 } 23280 if (!contiguous) { 23281 const offset = (segCount - i) * 2 + bias * 2; 23282 bias += end - start + 1; 23283 idDeltas += string16(0); 23284 idRangeOffsets += string16(offset); 23285 for (j = 0, jj = codes.length; j < jj; ++j) { 23286 glyphsIds += string16(codes[j]); 23287 } 23288 } else { 23289 const startCode = codes[0]; 23290 idDeltas += string16(startCode - start & 0xffff); 23291 idRangeOffsets += string16(0); 23292 } 23293 } 23294 if (trailingRangesCount > 0) { 23295 endCount += "\xFF\xFF"; 23296 startCount += "\xFF\xFF"; 23297 idDeltas += "\x00\x01"; 23298 idRangeOffsets += "\x00\x00"; 23299 } 23300 const format314 = "\x00\x00" + string16(2 * segCount) + string16(searchParams.range) + string16(searchParams.entry) + string16(searchParams.rangeShift) + endCount + "\x00\x00" + startCount + idDeltas + idRangeOffsets + glyphsIds; 23301 let format31012 = ""; 23302 let header31012 = ""; 23303 if (numTables > 1) { 23304 cmap += "\x00\x03" + "\x00\x0A" + string32(4 + numTables * 8 + 4 + format314.length); 23305 format31012 = ""; 23306 for (i = 0, ii = ranges.length; i < ii; i++) { 23307 range = ranges[i]; 23308 start = range[0]; 23309 codes = range[2]; 23310 let code = codes[0]; 23311 for (j = 1, jj = codes.length; j < jj; ++j) { 23312 if (codes[j] !== codes[j - 1] + 1) { 23313 end = range[0] + j - 1; 23314 format31012 += string32(start) + string32(end) + string32(code); 23315 start = end + 1; 23316 code = codes[j]; 23317 } 23318 } 23319 format31012 += string32(start) + string32(range[1]) + string32(code); 23320 } 23321 header31012 = "\x00\x0C" + "\x00\x00" + string32(format31012.length + 16) + "\x00\x00\x00\x00" + string32(format31012.length / 12); 23322 } 23323 return cmap + "\x00\x04" + string16(format314.length + 4) + format314 + header31012 + format31012; 23324} 23325function validateOS2Table(os2, file) { 23326 file.pos = (file.start || 0) + os2.offset; 23327 const version = file.getUint16(); 23328 file.skip(60); 23329 const selection = file.getUint16(); 23330 if (version < 4 && selection & 0x0300) { 23331 return false; 23332 } 23333 const firstChar = file.getUint16(); 23334 const lastChar = file.getUint16(); 23335 if (firstChar > lastChar) { 23336 return false; 23337 } 23338 file.skip(6); 23339 const usWinAscent = file.getUint16(); 23340 if (usWinAscent === 0) { 23341 return false; 23342 } 23343 os2.data[8] = os2.data[9] = 0; 23344 return true; 23345} 23346function createOS2Table(properties, charstrings, override) { 23347 override ||= { 23348 unitsPerEm: 0, 23349 yMax: 0, 23350 yMin: 0, 23351 ascent: 0, 23352 descent: 0 23353 }; 23354 let ulUnicodeRange1 = 0; 23355 let ulUnicodeRange2 = 0; 23356 let ulUnicodeRange3 = 0; 23357 let ulUnicodeRange4 = 0; 23358 let firstCharIndex = null; 23359 let lastCharIndex = 0; 23360 let position = -1; 23361 if (charstrings) { 23362 for (let code in charstrings) { 23363 code |= 0; 23364 if (firstCharIndex > code || !firstCharIndex) { 23365 firstCharIndex = code; 23366 } 23367 if (lastCharIndex < code) { 23368 lastCharIndex = code; 23369 } 23370 position = getUnicodeRangeFor(code, position); 23371 if (position < 32) { 23372 ulUnicodeRange1 |= 1 << position; 23373 } else if (position < 64) { 23374 ulUnicodeRange2 |= 1 << position - 32; 23375 } else if (position < 96) { 23376 ulUnicodeRange3 |= 1 << position - 64; 23377 } else if (position < 123) { 23378 ulUnicodeRange4 |= 1 << position - 96; 23379 } else { 23380 throw new FormatError("Unicode ranges Bits > 123 are reserved for internal usage"); 23381 } 23382 } 23383 if (lastCharIndex > 0xffff) { 23384 lastCharIndex = 0xffff; 23385 } 23386 } else { 23387 firstCharIndex = 0; 23388 lastCharIndex = 255; 23389 } 23390 const bbox = properties.bbox || [0, 0, 0, 0]; 23391 const unitsPerEm = override.unitsPerEm || (properties.fontMatrix ? 1 / Math.max(...properties.fontMatrix.slice(0, 4).map(Math.abs)) : 1000); 23392 const scale = properties.ascentScaled ? 1.0 : unitsPerEm / PDF_GLYPH_SPACE_UNITS; 23393 const typoAscent = override.ascent || Math.round(scale * (properties.ascent || bbox[3])); 23394 let typoDescent = override.descent || Math.round(scale * (properties.descent || bbox[1])); 23395 if (typoDescent > 0 && properties.descent > 0 && bbox[1] < 0) { 23396 typoDescent = -typoDescent; 23397 } 23398 const winAscent = override.yMax || typoAscent; 23399 const winDescent = -override.yMin || -typoDescent; 23400 return "\x00\x03" + "\x02\x24" + "\x01\xF4" + "\x00\x05" + "\x00\x00" + "\x02\x8A" + "\x02\xBB" + "\x00\x00" + "\x00\x8C" + "\x02\x8A" + "\x02\xBB" + "\x00\x00" + "\x01\xDF" + "\x00\x31" + "\x01\x02" + "\x00\x00" + "\x00\x00\x06" + String.fromCharCode(properties.fixedPitch ? 0x09 : 0x00) + "\x00\x00\x00\x00\x00\x00" + string32(ulUnicodeRange1) + string32(ulUnicodeRange2) + string32(ulUnicodeRange3) + string32(ulUnicodeRange4) + "\x2A\x32\x31\x2A" + string16(properties.italicAngle ? 1 : 0) + string16(firstCharIndex || properties.firstChar) + string16(lastCharIndex || properties.lastChar) + string16(typoAscent) + string16(typoDescent) + "\x00\x64" + string16(winAscent) + string16(winDescent) + "\x00\x00\x00\x00" + "\x00\x00\x00\x00" + string16(properties.xHeight) + string16(properties.capHeight) + string16(0) + string16(firstCharIndex || properties.firstChar) + "\x00\x03"; 23401} 23402function createPostTable(properties) { 23403 const angle = Math.floor(properties.italicAngle * 2 ** 16); 23404 return "\x00\x03\x00\x00" + string32(angle) + "\x00\x00" + "\x00\x00" + string32(properties.fixedPitch ? 1 : 0) + "\x00\x00\x00\x00" + "\x00\x00\x00\x00" + "\x00\x00\x00\x00" + "\x00\x00\x00\x00"; 23405} 23406function createPostscriptName(name) { 23407 return name.replaceAll(/[^\x21-\x7E]|[[\](){}<>/%]/g, "").slice(0, 63); 23408} 23409function createNameTable(name, proto) { 23410 if (!proto) { 23411 proto = [[], []]; 23412 } 23413 const strings = [proto[0][0] || "Original licence", proto[0][1] || name, proto[0][2] || "Unknown", proto[0][3] || "uniqueID", proto[0][4] || name, proto[0][5] || "Version 0.11", proto[0][6] || createPostscriptName(name), proto[0][7] || "Unknown", proto[0][8] || "Unknown", proto[0][9] || "Unknown"]; 23414 const stringsUnicode = []; 23415 let i, ii, j, jj, str; 23416 for (i = 0, ii = strings.length; i < ii; i++) { 23417 str = proto[1][i] || strings[i]; 23418 const strBufUnicode = []; 23419 for (j = 0, jj = str.length; j < jj; j++) { 23420 strBufUnicode.push(string16(str.charCodeAt(j))); 23421 } 23422 stringsUnicode.push(strBufUnicode.join("")); 23423 } 23424 const names = [strings, stringsUnicode]; 23425 const platforms = ["\x00\x01", "\x00\x03"]; 23426 const encodings = ["\x00\x00", "\x00\x01"]; 23427 const languages = ["\x00\x00", "\x04\x09"]; 23428 const namesRecordCount = strings.length * platforms.length; 23429 let nameTable = "\x00\x00" + string16(namesRecordCount) + string16(namesRecordCount * 12 + 6); 23430 let strOffset = 0; 23431 for (i = 0, ii = platforms.length; i < ii; i++) { 23432 const strs = names[i]; 23433 for (j = 0, jj = strs.length; j < jj; j++) { 23434 str = strs[j]; 23435 const nameRecord = platforms[i] + encodings[i] + languages[i] + string16(j) + string16(str.length) + string16(strOffset); 23436 nameTable += nameRecord; 23437 strOffset += str.length; 23438 } 23439 } 23440 nameTable += strings.join("") + stringsUnicode.join(""); 23441 return nameTable; 23442} 23443class Font { 23444 constructor(name, file, properties) { 23445 this.name = name; 23446 this.psName = null; 23447 this.mimetype = null; 23448 this.disableFontFace = false; 23449 this.loadedName = properties.loadedName; 23450 this.isType3Font = properties.isType3Font; 23451 this.missingFile = false; 23452 this.cssFontInfo = properties.cssFontInfo; 23453 this._charsCache = Object.create(null); 23454 this._glyphCache = Object.create(null); 23455 let isSerifFont = !!(properties.flags & FontFlags.Serif); 23456 if (!isSerifFont && !properties.isSimulatedFlags) { 23457 const baseName = name.replaceAll(/[,_]/g, "-").split("-", 1)[0], 23458 serifFonts = getSerifFonts(); 23459 for (const namePart of baseName.split("+")) { 23460 if (serifFonts[namePart]) { 23461 isSerifFont = true; 23462 break; 23463 } 23464 } 23465 } 23466 this.isSerifFont = isSerifFont; 23467 this.isSymbolicFont = !!(properties.flags & FontFlags.Symbolic); 23468 this.isMonospace = !!(properties.flags & FontFlags.FixedPitch); 23469 let { 23470 type, 23471 subtype 23472 } = properties; 23473 this.type = type; 23474 this.subtype = subtype; 23475 this.systemFontInfo = properties.systemFontInfo; 23476 const matches = name.match(/^InvalidPDFjsFont_(.*)_\d+$/); 23477 this.isInvalidPDFjsFont = !!matches; 23478 if (this.isInvalidPDFjsFont) { 23479 this.fallbackName = matches[1]; 23480 } else if (this.isMonospace) { 23481 this.fallbackName = "monospace"; 23482 } else if (this.isSerifFont) { 23483 this.fallbackName = "serif"; 23484 } else { 23485 this.fallbackName = "sans-serif"; 23486 } 23487 if (this.systemFontInfo?.guessFallback) { 23488 this.systemFontInfo.guessFallback = false; 23489 this.systemFontInfo.css += `,${this.fallbackName}`; 23490 } 23491 this.differences = properties.differences; 23492 this.widths = properties.widths; 23493 this.defaultWidth = properties.defaultWidth; 23494 this.composite = properties.composite; 23495 this.cMap = properties.cMap; 23496 this.capHeight = properties.capHeight / PDF_GLYPH_SPACE_UNITS; 23497 this.ascent = properties.ascent / PDF_GLYPH_SPACE_UNITS; 23498 this.descent = properties.descent / PDF_GLYPH_SPACE_UNITS; 23499 this.lineHeight = this.ascent - this.descent; 23500 this.fontMatrix = properties.fontMatrix; 23501 this.bbox = properties.bbox; 23502 this.defaultEncoding = properties.defaultEncoding; 23503 this.toUnicode = properties.toUnicode; 23504 this.toFontChar = []; 23505 if (properties.type === "Type3") { 23506 for (let charCode = 0; charCode < 256; charCode++) { 23507 this.toFontChar[charCode] = this.differences[charCode] || properties.defaultEncoding[charCode]; 23508 } 23509 return; 23510 } 23511 this.cidEncoding = properties.cidEncoding || ""; 23512 this.vertical = !!properties.vertical; 23513 if (this.vertical) { 23514 this.vmetrics = properties.vmetrics; 23515 this.defaultVMetrics = properties.defaultVMetrics; 23516 } 23517 if (!file || file.isEmpty) { 23518 if (file) { 23519 warn('Font file is empty in "' + name + '" (' + this.loadedName + ")"); 23520 } 23521 this.fallbackToSystemFont(properties); 23522 return; 23523 } 23524 [type, subtype] = getFontFileType(file, properties); 23525 if (type !== this.type || subtype !== this.subtype) { 23526 info("Inconsistent font file Type/SubType, expected: " + `${this.type}/${this.subtype} but found: ${type}/${subtype}.`); 23527 } 23528 let data; 23529 try { 23530 switch (type) { 23531 case "MMType1": 23532 info("MMType1 font (" + name + "), falling back to Type1."); 23533 case "Type1": 23534 case "CIDFontType0": 23535 this.mimetype = "font/opentype"; 23536 const cff = subtype === "Type1C" || subtype === "CIDFontType0C" ? new CFFFont(file, properties) : new Type1Font(name, file, properties); 23537 adjustWidths(properties); 23538 data = this.convert(name, cff, properties); 23539 break; 23540 case "OpenType": 23541 case "TrueType": 23542 case "CIDFontType2": 23543 this.mimetype = "font/opentype"; 23544 data = this.checkAndRepair(name, file, properties); 23545 if (this.isOpenType) { 23546 adjustWidths(properties); 23547 type = "OpenType"; 23548 } 23549 break; 23550 default: 23551 throw new FormatError(`Font ${type} is not supported`); 23552 } 23553 } catch (e) { 23554 warn(e); 23555 this.fallbackToSystemFont(properties); 23556 return; 23557 } 23558 amendFallbackToUnicode(properties); 23559 this.data = data; 23560 this.type = type; 23561 this.subtype = subtype; 23562 this.fontMatrix = properties.fontMatrix; 23563 this.widths = properties.widths; 23564 this.defaultWidth = properties.defaultWidth; 23565 this.toUnicode = properties.toUnicode; 23566 this.seacMap = properties.seacMap; 23567 } 23568 get renderer() { 23569 const renderer = FontRendererFactory.create(this, SEAC_ANALYSIS_ENABLED); 23570 return shadow(this, "renderer", renderer); 23571 } 23572 exportData(extraProperties = false) { 23573 const exportDataProperties = extraProperties ? [...EXPORT_DATA_PROPERTIES, ...EXPORT_DATA_EXTRA_PROPERTIES] : EXPORT_DATA_PROPERTIES; 23574 const data = Object.create(null); 23575 let property, value; 23576 for (property of exportDataProperties) { 23577 value = this[property]; 23578 if (value !== undefined) { 23579 data[property] = value; 23580 } 23581 } 23582 return data
vendor: 9,082 bytes, lines 23582-23831
23582; 23583 } 23584 fallbackToSystemFont(properties) { 23585 this.missingFile = true; 23586 const { 23587 name, 23588 type 23589 } = this; 23590 let fontName = normalizeFontName(name); 23591 const stdFontMap = getStdFontMap(), 23592 nonStdFontMap = getNonStdFontMap(); 23593 const isStandardFont = !!stdFontMap[fontName]; 23594 const isMappedToStandardFont = !!(nonStdFontMap[fontName] && stdFontMap[nonStdFontMap[fontName]]); 23595 fontName = stdFontMap[fontName] || nonStdFontMap[fontName] || fontName; 23596 const fontBasicMetricsMap = getFontBasicMetrics(); 23597 const metrics = fontBasicMetricsMap[fontName]; 23598 if (metrics) { 23599 if (isNaN(this.ascent)) { 23600 this.ascent = metrics.ascent / PDF_GLYPH_SPACE_UNITS; 23601 } 23602 if (isNaN(this.descent)) { 23603 this.descent = metrics.descent / PDF_GLYPH_SPACE_UNITS; 23604 } 23605 if (isNaN(this.capHeight)) { 23606 this.capHeight = metrics.capHeight / PDF_GLYPH_SPACE_UNITS; 23607 } 23608 } 23609 this.bold = /bold/gi.test(fontName); 23610 this.italic = /oblique|italic/gi.test(fontName); 23611 this.black = /Black/g.test(name); 23612 const isNarrow = /Narrow/g.test(name); 23613 this.remeasure = (!isStandardFont || isNarrow) && Object.keys(this.widths).length > 0; 23614 if ((isStandardFont || isMappedToStandardFont) && type === "CIDFontType2" && this.cidEncoding.startsWith("Identity-")) { 23615 const cidToGidMap = properties.cidToGidMap; 23616 const map = []; 23617 applyStandardFontGlyphMap(map, getGlyphMapForStandardFonts()); 23618 if (/Arial-?Black/i.test(name)) { 23619 applyStandardFontGlyphMap(map, getSupplementalGlyphMapForArialBlack()); 23620 } else if (/Calibri/i.test(name)) { 23621 applyStandardFontGlyphMap(map, getSupplementalGlyphMapForCalibri()); 23622 } 23623 if (cidToGidMap) { 23624 for (const charCode in map) { 23625 const cid = map[charCode]; 23626 if (cidToGidMap[cid] !== undefined) { 23627 map[+charCode] = cidToGidMap[cid]; 23628 } 23629 } 23630 if (cidToGidMap.length !== this.toUnicode.length && properties.hasIncludedToUnicodeMap && this.toUnicode instanceof IdentityToUnicodeMap) { 23631 this.toUnicode.forEach(function (charCode, unicodeCharCode) { 23632 const cid = map[charCode]; 23633 if (cidToGidMap[cid] === undefined) { 23634 map[+charCode] = unicodeCharCode; 23635 } 23636 }); 23637 } 23638 } 23639 if (!(this.toUnicode instanceof IdentityToUnicodeMap)) { 23640 this.toUnicode.forEach(function (charCode, unicodeCharCode) { 23641 map[+charCode] = unicodeCharCode; 23642 }); 23643 } 23644 this.toFontChar = map; 23645 this.toUnicode = new ToUnicodeMap(map); 23646 } else if (/Symbol/i.test(fontName)) { 23647 this.toFontChar = buildToFontChar(SymbolSetEncoding, getGlyphsUnicode(), this.differences); 23648 } else if (/Dingbats/i.test(fontName)) { 23649 this.toFontChar = buildToFontChar(ZapfDingbatsEncoding, getDingbatsGlyphsUnicode(), this.differences); 23650 } else if (isStandardFont || isMappedToStandardFont) { 23651 const map = buildToFontChar(this.defaultEncoding, getGlyphsUnicode(), this.differences); 23652 if (type === "CIDFontType2" && !this.cidEncoding.startsWith("Identity-") && !(this.toUnicode instanceof IdentityToUnicodeMap)) { 23653 this.toUnicode.forEach(function (charCode, unicodeCharCode) { 23654 map[+charCode] = unicodeCharCode; 23655 }); 23656 } 23657 this.toFontChar = map; 23658 } else { 23659 const glyphsUnicodeMap = getGlyphsUnicode(); 23660 const map = []; 23661 this.toUnicode.forEach((charCode, unicodeCharCode) => { 23662 if (!this.composite) { 23663 const glyphName = this.differences[charCode] || this.defaultEncoding[charCode]; 23664 const unicode = getUnicodeForGlyph(glyphName, glyphsUnicodeMap); 23665 if (unicode !== -1) { 23666 unicodeCharCode = unicode; 23667 } 23668 } 23669 map[+charCode] = unicodeCharCode; 23670 }); 23671 if (this.composite && this.toUnicode instanceof IdentityToUnicodeMap) { 23672 if (/Tahoma|Verdana/i.test(name)) { 23673 applyStandardFontGlyphMap(map, getGlyphMapForStandardFonts()); 23674 } 23675 } 23676 this.toFontChar = map; 23677 } 23678 amendFallbackToUnicode(properties); 23679 this.loadedName = fontName.split("-", 1)[0]; 23680 } 23681 checkAndRepair(name, font, properties) { 23682 const VALID_TABLES = ["OS/2", "cmap", "head", "hhea", "hmtx", "maxp", "name", "post", "loca", "glyf", "fpgm", "prep", "cvt ", "CFF "]; 23683 function readTables(file, numTables) { 23684 const tables = Object.create(null); 23685 tables["OS/2"] = null; 23686 tables.cmap = null; 23687 tables.head = null; 23688 tables.hhea = null; 23689 tables.hmtx = null; 23690 tables.maxp = null; 23691 tables.name = null; 23692 tables.post = null; 23693 for (let i = 0; i < numTables; i++) { 23694 const table = readTableEntry(file); 23695 if (!VALID_TABLES.includes(table.tag)) { 23696 continue; 23697 } 23698 if (table.length === 0) { 23699 continue; 23700 } 23701 tables[table.tag] = table; 23702 } 23703 return tables; 23704 } 23705 function readTableEntry(file) { 23706 const tag = file.getString(4); 23707 const checksum = file.getInt32() >>> 0; 23708 const offset = file.getInt32() >>> 0; 23709 const length = file.getInt32() >>> 0; 23710 const previousPosition = file.pos; 23711 file.pos = file.start || 0; 23712 file.skip(offset); 23713 const data = file.getBytes(length); 23714 file.pos = previousPosition; 23715 if (tag === "head") { 23716 data[8] = data[9] = data[10] = data[11] = 0; 23717 data[17] |= 0x20; 23718 } 23719 return { 23720 tag, 23721 checksum, 23722 length, 23723 offset, 23724 data 23725 }; 23726 } 23727 function readOpenTypeHeader(ttf) { 23728 return { 23729 version: ttf.getString(4), 23730 numTables: ttf.getUint16(), 23731 searchRange: ttf.getUint16(), 23732 entrySelector: ttf.getUint16(), 23733 rangeShift: ttf.getUint16() 23734 }; 23735 } 23736 function readTrueTypeCollectionHeader(ttc) { 23737 const ttcTag = ttc.getString(4); 23738 assert(ttcTag === "ttcf", "Must be a TrueType Collection font."); 23739 const majorVersion = ttc.getUint16(); 23740 const minorVersion = ttc.getUint16(); 23741 const numFonts = ttc.getInt32() >>> 0; 23742 const offsetTable = []; 23743 for (let i = 0; i < numFonts; i++) { 23744 offsetTable.push(ttc.getInt32() >>> 0); 23745 } 23746 const header = { 23747 ttcTag, 23748 majorVersion, 23749 minorVersion, 23750 numFonts, 23751 offsetTable 23752 }; 23753 switch (majorVersion) { 23754 case 1: 23755 return header; 23756 case 2: 23757 header.dsigTag = ttc.getInt32() >>> 0; 23758 header.dsigLength = ttc.getInt32() >>> 0; 23759 header.dsigOffset = ttc.getInt32() >>> 0; 23760 return header; 23761 } 23762 throw new FormatError(`Invalid TrueType Collection majorVersion: ${majorVersion}.`); 23763 } 23764 function readTrueTypeCollectionData(ttc, fontName) { 23765 const { 23766 numFonts, 23767 offsetTable 23768 } = readTrueTypeCollectionHeader(ttc); 23769 const fontNameParts = fontName.split("+"); 23770 let fallbackData; 23771 for (let i = 0; i < numFonts; i++) { 23772 ttc.pos = (ttc.start || 0) + offsetTable[i]; 23773 const potentialHeader = readOpenTypeHeader(ttc); 23774 const potentialTables = readTables(ttc, potentialHeader.numTables); 23775 if (!potentialTables.name) { 23776 throw new FormatError('TrueType Collection font must contain a "name" table.'); 23777 } 23778 const [nameTable] = readNameTable(potentialTables.name); 23779 for (let j = 0, jj = nameTable.length; j < jj; j++) { 23780 for (let k = 0, kk = nameTable[j].length; k < kk; k++) { 23781 const nameEntry = nameTable[j][k]?.replaceAll(/\s/g, ""); 23782 if (!nameEntry) { 23783 continue; 23784 } 23785 if (nameEntry === fontName) { 23786 return { 23787 header: potentialHeader, 23788 tables: potentialTables 23789 }; 23790 } 23791 if (fontNameParts.length < 2) { 23792 continue; 23793 } 23794 for (const part of fontNameParts) { 23795 if (nameEntry === part) { 23796 fallbackData = { 23797 name: part, 23798 header: potentialHeader, 23799 tables: potentialTables 23800 }; 23801 } 23802 } 23803 } 23804 } 23805 } 23806 if (fallbackData) { 23807 warn(`TrueType Collection does not contain "${fontName}" font, ` + `falling back to "${fallbackData.name}" font instead.`); 23808 return { 23809 header: fallbackData.header, 23810 tables: fallbackData.tables 23811 }; 23812 } 23813 throw new FormatError(`TrueType Collection does not contain "${fontName}" font.`); 23814 } 23815 function readCmapTable(cmap, file, isSymbolicFont, hasEncoding) { 23816 if (!cmap) { 23817 warn("No cmap table available."); 23818 return { 23819 platformId: -1, 23820 encodingId: -1, 23821 mappings: [], 23822 hasShortCmap: false 23823 }; 23824 } 23825 let segment; 23826 let start = (file.start || 0) + cmap.offset; 23827 file.pos = start; 23828 file.skip(2); 23829 const numTables = file.getUint16(); 23830 let potentialTable; 23831 let canBreak = false;
vendor: 6,635 bytes, lines 23832-24033
23832 for (let i = 0; i < numTables; i++) { 23833 const platformId = file.getUint16(); 23834 const encodingId = file.getUint16(); 23835 const offset = file.getInt32() >>> 0; 23836 let useTable = false; 23837 if (potentialTable?.platformId === platformId && potentialTable?.encodingId === encodingId) { 23838 continue; 23839 } 23840 if (platformId === 0 && (encodingId === 0 || encodingId === 1 || encodingId === 3)) { 23841 useTable = true; 23842 } else if (platformId === 1 && encodingId === 0) { 23843 useTable = true; 23844 } else if (platformId === 3 && encodingId === 1 && (hasEncoding || !potentialTable)) { 23845 useTable = true; 23846 if (!isSymbolicFont) { 23847 canBreak = true; 23848 } 23849 } else if (isSymbolicFont && platformId === 3 && encodingId === 0) { 23850 useTable = true; 23851 let correctlySorted = true; 23852 if (i < numTables - 1) { 23853 const nextBytes = file.peekBytes(2), 23854 nextPlatformId = int16(nextBytes[0], nextBytes[1]); 23855 if (nextPlatformId < platformId) { 23856 correctlySorted = false; 23857 } 23858 } 23859 if (correctlySorted) { 23860 canBreak = true; 23861 } 23862 } 23863 if (useTable) { 23864 potentialTable = { 23865 platformId, 23866 encodingId, 23867 offset 23868 }; 23869 } 23870 if (canBreak) { 23871 break; 23872 } 23873 } 23874 if (potentialTable) { 23875 file.pos = start + potentialTable.offset; 23876 } 23877 if (!potentialTable || file.peekByte() === -1) { 23878 warn("Could not find a preferred cmap table."); 23879 return { 23880 platformId: -1, 23881 encodingId: -1, 23882 mappings: [], 23883 hasShortCmap: false 23884 }; 23885 } 23886 const format = file.getUint16(); 23887 let hasShortCmap = false; 23888 const mappings = []; 23889 let j, glyphId; 23890 if (format === 0) { 23891 file.skip(2 + 2); 23892 for (j = 0; j < 256; j++) { 23893 const index = file.getByte(); 23894 if (!index) { 23895 continue; 23896 } 23897 mappings.push({ 23898 charCode: j, 23899 glyphId: index 23900 }); 23901 } 23902 hasShortCmap = true; 23903 } else if (format === 2) { 23904 file.skip(2 + 2); 23905 const subHeaderKeys = []; 23906 let maxSubHeaderKey = 0; 23907 for (let i = 0; i < 256; i++) { 23908 const subHeaderKey = file.getUint16() >> 3; 23909 subHeaderKeys.push(subHeaderKey); 23910 maxSubHeaderKey = Math.max(subHeaderKey, maxSubHeaderKey); 23911 } 23912 const subHeaders = []; 23913 for (let i = 0; i <= maxSubHeaderKey; i++) { 23914 subHeaders.push({ 23915 firstCode: file.getUint16(), 23916 entryCount: file.getUint16(), 23917 idDelta: signedInt16(file.getByte(), file.getByte()), 23918 idRangePos: file.pos + file.getUint16() 23919 }); 23920 } 23921 for (let i = 0; i < 256; i++) { 23922 if (subHeaderKeys[i] === 0) { 23923 file.pos = subHeaders[0].idRangePos + 2 * i; 23924 glyphId = file.getUint16(); 23925 mappings.push({ 23926 charCode: i, 23927 glyphId 23928 }); 23929 } else { 23930 const s = subHeaders[subHeaderKeys[i]]; 23931 for (j = 0; j < s.entryCount; j++) { 23932 const charCode = (i << 8) + j + s.firstCode; 23933 file.pos = s.idRangePos + 2 * j; 23934 glyphId = file.getUint16(); 23935 if (glyphId !== 0) { 23936 glyphId = (glyphId + s.idDelta) % 65536; 23937 } 23938 mappings.push({ 23939 charCode, 23940 glyphId 23941 }); 23942 } 23943 } 23944 } 23945 } else if (format === 4) { 23946 file.skip(2 + 2); 23947 const segCount = file.getUint16() >> 1; 23948 file.skip(6); 23949 const segments = []; 23950 let segIndex; 23951 for (segIndex = 0; segIndex < segCount; segIndex++) { 23952 segments.push({ 23953 end: file.getUint16() 23954 }); 23955 } 23956 file.skip(2); 23957 for (segIndex = 0; segIndex < segCount; segIndex++) { 23958 segments[segIndex].start = file.getUint16(); 23959 } 23960 for (segIndex = 0; segIndex < segCount; segIndex++) { 23961 segments[segIndex].delta = file.getUint16(); 23962 } 23963 let offsetsCount = 0, 23964 offsetIndex; 23965 for (segIndex = 0; segIndex < segCount; segIndex++) { 23966 segment = segments[segIndex]; 23967 const rangeOffset = file.getUint16(); 23968 if (!rangeOffset) { 23969 segment.offsetIndex = -1; 23970 continue; 23971 } 23972 offsetIndex = (rangeOffset >> 1) - (segCount - segIndex); 23973 segment.offsetIndex = offsetIndex; 23974 offsetsCount = Math.max(offsetsCount, offsetIndex + segment.end - segment.start + 1); 23975 } 23976 const offsets = []; 23977 for (j = 0; j < offsetsCount; j++) { 23978 offsets.push(file.getUint16()); 23979 } 23980 for (segIndex = 0; segIndex < segCount; segIndex++) { 23981 segment = segments[segIndex]; 23982 start = segment.start; 23983 const end = segment.end; 23984 const delta = segment.delta; 23985 offsetIndex = segment.offsetIndex; 23986 for (j = start; j <= end; j++) { 23987 if (j === 0xffff) { 23988 continue; 23989 } 23990 glyphId = offsetIndex < 0 ? j : offsets[offsetIndex + j - start]; 23991 glyphId = glyphId + delta & 0xffff; 23992 mappings.push({ 23993 charCode: j, 23994 glyphId 23995 }); 23996 } 23997 } 23998 } else if (format === 6) { 23999 file.skip(2 + 2); 24000 const firstCode = file.getUint16(); 24001 const entryCount = file.getUint16(); 24002 for (j = 0; j < entryCount; j++) { 24003 glyphId = file.getUint16(); 24004 const charCode = firstCode + j; 24005 mappings.push({ 24006 charCode, 24007 glyphId 24008 }); 24009 } 24010 } else if (format === 12) { 24011 file.skip(2 + 4 + 4); 24012 const nGroups = file.getInt32() >>> 0; 24013 for (j = 0; j < nGroups; j++) { 24014 const startCharCode = file.getInt32() >>> 0; 24015 const endCharCode = file.getInt32() >>> 0; 24016 let glyphCode = file.getInt32() >>> 0; 24017 for (let charCode = startCharCode; charCode <= endCharCode; charCode++) { 24018 mappings.push({ 24019 charCode, 24020 glyphId: glyphCode++ 24021 }); 24022 } 24023 } 24024 } else { 24025 warn("cmap table has unsupported format: " + format); 24026 return { 24027 platformId: -1, 24028 encodingId: -1, 24029 mappings: [], 24030 hasShortCmap: false 24031 }; 24032 } 24033
24033mappings.sort(function (a, b) { 24034 return a.charCode - b.charCode; 24035 }); 24036 for (let i = 1; i < mappings.length; i++) { 24037 if (mappings[i - 1].charCode === mappings[i].charCode) { 24038 mappings.splice(i, 1); 24039 i--; 24040 } 24041 } 24042 return { 24043 platformId: potentialTable.platformId, 24044 encodingId: potentialTable.encodingId, 24045 m
vendor: 16,570 bytes, lines 24045-24512
24045appings, 24046 hasShortCmap 24047 }; 24048 } 24049 function sanitizeMetrics(file, header, metrics, headTable, numGlyphs, dupFirstEntry) { 24050 if (!header) { 24051 if (metrics) { 24052 metrics.data = null; 24053 } 24054 return; 24055 } 24056 file.pos = (file.start || 0) + header.offset; 24057 file.pos += 4; 24058 file.pos += 2; 24059 file.pos += 2; 24060 file.pos += 2; 24061 file.pos += 2; 24062 file.pos += 2; 24063 file.pos += 2; 24064 file.pos += 2; 24065 file.pos += 2; 24066 file.pos += 2; 24067 const caretOffset = file.getUint16(); 24068 file.pos += 8; 24069 file.pos += 2; 24070 let numOfMetrics = file.getUint16(); 24071 if (caretOffset !== 0) { 24072 const macStyle = int16(headTable.data[44], headTable.data[45]); 24073 if (!(macStyle & 2)) { 24074 header.data[22] = 0; 24075 header.data[23] = 0; 24076 } 24077 } 24078 if (numOfMetrics > numGlyphs) { 24079 info(`The numOfMetrics (${numOfMetrics}) should not be ` + `greater than the numGlyphs (${numGlyphs}).`); 24080 numOfMetrics = numGlyphs; 24081 header.data[34] = (numOfMetrics & 0xff00) >> 8; 24082 header.data[35] = numOfMetrics & 0x00ff; 24083 } 24084 const numOfSidebearings = numGlyphs - numOfMetrics; 24085 const numMissing = numOfSidebearings - (metrics.length - numOfMetrics * 4 >> 1); 24086 if (numMissing > 0) { 24087 const entries = new Uint8Array(metrics.length + numMissing * 2); 24088 entries.set(metrics.data); 24089 if (dupFirstEntry) { 24090 entries[metrics.length] = metrics.data[2]; 24091 entries[metrics.length + 1] = metrics.data[3]; 24092 } 24093 metrics.data = entries; 24094 } 24095 } 24096 function sanitizeGlyph(source, sourceStart, sourceEnd, dest, destStart, hintsValid) { 24097 const glyphProfile = { 24098 length: 0, 24099 sizeOfInstructions: 0 24100 }; 24101 if (sourceStart < 0 || sourceStart >= source.length || sourceEnd > source.length || sourceEnd - sourceStart <= 12) { 24102 return glyphProfile; 24103 } 24104 const glyf = source.subarray(sourceStart, sourceEnd); 24105 const xMin = signedInt16(glyf[2], glyf[3]); 24106 const yMin = signedInt16(glyf[4], glyf[5]); 24107 const xMax = signedInt16(glyf[6], glyf[7]); 24108 const yMax = signedInt16(glyf[8], glyf[9]); 24109 if (xMin > xMax) { 24110 writeSignedInt16(glyf, 2, xMax); 24111 writeSignedInt16(glyf, 6, xMin); 24112 } 24113 if (yMin > yMax) { 24114 writeSignedInt16(glyf, 4, yMax); 24115 writeSignedInt16(glyf, 8, yMin); 24116 } 24117 const contoursCount = signedInt16(glyf[0], glyf[1]); 24118 if (contoursCount < 0) { 24119 if (contoursCount < -1) { 24120 return glyphProfile; 24121 } 24122 dest.set(glyf, destStart); 24123 glyphProfile.length = glyf.length; 24124 return glyphProfile; 24125 } 24126 let i, 24127 j = 10, 24128 flagsCount = 0; 24129 for (i = 0; i < contoursCount; i++) { 24130 const endPoint = glyf[j] << 8 | glyf[j + 1]; 24131 flagsCount = endPoint + 1; 24132 j += 2; 24133 } 24134 const instructionsStart = j; 24135 const instructionsLength = glyf[j] << 8 | glyf[j + 1]; 24136 glyphProfile.sizeOfInstructions = instructionsLength; 24137 j += 2 + instructionsLength; 24138 const instructionsEnd = j; 24139 let coordinatesLength = 0; 24140 for (i = 0; i < flagsCount; i++) { 24141 const flag = glyf[j++]; 24142 if (flag & 0xc0) { 24143 glyf[j - 1] = flag & 0x3f; 24144 } 24145 let xLength = 2; 24146 if (flag & 2) { 24147 xLength = 1; 24148 } else if (flag & 16) { 24149 xLength = 0; 24150 } 24151 let yLength = 2; 24152 if (flag & 4) { 24153 yLength = 1; 24154 } else if (flag & 32) { 24155 yLength = 0; 24156 } 24157 const xyLength = xLength + yLength; 24158 coordinatesLength += xyLength; 24159 if (flag & 8) { 24160 const repeat = glyf[j++]; 24161 if (repeat === 0) { 24162 glyf[j - 1] ^= 8; 24163 } 24164 i += repeat; 24165 coordinatesLength += repeat * xyLength; 24166 } 24167 } 24168 if (coordinatesLength === 0) { 24169 return glyphProfile; 24170 } 24171 let glyphDataLength = j + coordinatesLength; 24172 if (glyphDataLength > glyf.length) { 24173 return glyphProfile; 24174 } 24175 if (!hintsValid && instructionsLength > 0) { 24176 dest.set(glyf.subarray(0, instructionsStart), destStart); 24177 dest.set([0, 0], destStart + instructionsStart); 24178 dest.set(glyf.subarray(instructionsEnd, glyphDataLength), destStart + instructionsStart + 2); 24179 glyphDataLength -= instructionsLength; 24180 if (glyf.length - glyphDataLength > 3) { 24181 glyphDataLength = glyphDataLength + 3 & ~3; 24182 } 24183 glyphProfile.length = glyphDataLength; 24184 return glyphProfile; 24185 } 24186 if (glyf.length - glyphDataLength > 3) { 24187 glyphDataLength = glyphDataLength + 3 & ~3; 24188 dest.set(glyf.subarray(0, glyphDataLength), destStart); 24189 glyphProfile.length = glyphDataLength; 24190 return glyphProfile; 24191 } 24192 dest.set(glyf, destStart); 24193 glyphProfile.length = glyf.length; 24194 return glyphProfile; 24195 } 24196 function sanitizeHead(head, numGlyphs, locaLength) { 24197 const data = head.data; 24198 const version = int32(data[0], data[1], data[2], data[3]); 24199 if (version >> 16 !== 1) { 24200 info("Attempting to fix invalid version in head table: " + version); 24201 data[0] = 0; 24202 data[1] = 1; 24203 data[2] = 0; 24204 data[3] = 0; 24205 } 24206 const indexToLocFormat = int16(data[50], data[51]); 24207 if (indexToLocFormat < 0 || indexToLocFormat > 1) { 24208 info("Attempting to fix invalid indexToLocFormat in head table: " + indexToLocFormat); 24209 const numGlyphsPlusOne = numGlyphs + 1; 24210 if (locaLength === numGlyphsPlusOne << 1) { 24211 data[50] = 0; 24212 data[51] = 0; 24213 } else if (locaLength === numGlyphsPlusOne << 2) { 24214 data[50] = 0; 24215 data[51] = 1; 24216 } else { 24217 throw new FormatError("Could not fix indexToLocFormat: " + indexToLocFormat); 24218 } 24219 } 24220 } 24221 function sanitizeGlyphLocations(loca, glyf, numGlyphs, isGlyphLocationsLong, hintsValid, dupFirstEntry, maxSizeOfInstructions) { 24222 let itemSize, itemDecode, itemEncode; 24223 if (isGlyphLocationsLong) { 24224 itemSize = 4; 24225 itemDecode = function fontItemDecodeLong(data, offset) { 24226 return data[offset] << 24 | data[offset + 1] << 16 | data[offset + 2] << 8 | data[offset + 3]; 24227 }; 24228 itemEncode = function fontItemEncodeLong(data, offset, value) { 24229 data[offset] = value >>> 24 & 0xff; 24230 data[offset + 1] = value >> 16 & 0xff; 24231 data[offset + 2] = value >> 8 & 0xff; 24232 data[offset + 3] = value & 0xff; 24233 }; 24234 } else { 24235 itemSize = 2; 24236 itemDecode = function fontItemDecode(data, offset) { 24237 return data[offset] << 9 | data[offset + 1] << 1; 24238 }; 24239 itemEncode = function fontItemEncode(data, offset, value) { 24240 data[offset] = value >> 9 & 0xff; 24241 data[offset + 1] = value >> 1 & 0xff; 24242 }; 24243 } 24244 const numGlyphsOut = dupFirstEntry ? numGlyphs + 1 : numGlyphs; 24245 const locaDataSize = itemSize * (1 + numGlyphsOut); 24246 const locaData = new Uint8Array(locaDataSize); 24247 locaData.set(loca.data.subarray(0, locaDataSize)); 24248 loca.data = locaData; 24249 const oldGlyfData = glyf.data; 24250 const oldGlyfDataLength = oldGlyfData.length; 24251 const newGlyfData = new Uint8Array(oldGlyfDataLength); 24252 let i, j; 24253 const locaEntries = []; 24254 for (i = 0, j = 0; i < numGlyphs + 1; i++, j += itemSize) { 24255 let offset = itemDecode(locaData, j); 24256 if (offset > oldGlyfDataLength) { 24257 offset = oldGlyfDataLength; 24258 } 24259 locaEntries.push({ 24260 index: i, 24261 offset, 24262 endOffset: 0 24263 }); 24264 } 24265 locaEntries.sort((a, b) => a.offset - b.offset); 24266 for (i = 0; i < numGlyphs; i++) { 24267 locaEntries[i].endOffset = locaEntries[i + 1].offset; 24268 } 24269 locaEntries.sort((a, b) => a.index - b.index); 24270 for (i = 0; i < numGlyphs; i++) { 24271 const { 24272 offset, 24273 endOffset 24274 } = locaEntries[i]; 24275 if (offset !== 0 || endOffset !== 0) { 24276 break; 24277 } 24278 const nextOffset = locaEntries[i + 1].offset; 24279 if (nextOffset === 0) { 24280 continue; 24281 } 24282 locaEntries[i].endOffset = nextOffset; 24283 break; 24284 } 24285 const last = locaEntries.at(-2); 24286 if (last.offset !== 0 && last.endOffset === 0) { 24287 last.endOffset = oldGlyfDataLength; 24288 } 24289 const missingGlyphs = Object.create(null); 24290 let writeOffset = 0; 24291 itemEncode(locaData, 0, writeOffset); 24292 for (i = 0, j = itemSize; i < numGlyphs; i++, j += itemSize) { 24293 const glyphProfile = sanitizeGlyph(oldGlyfData, locaEntries[i].offset, locaEntries[i].endOffset, newGlyfData, writeOffset, hintsValid); 24294 const newLength = glyphProfile.length; 24295 if (newLength === 0) { 24296 missingGlyphs[i] = true; 24297 } 24298 if (glyphProfile.sizeOfInstructions > maxSizeOfInstructions) { 24299 maxSizeOfInstructions = glyphProfile.sizeOfInstructions; 24300 } 24301 writeOffset += newLength; 24302 itemEncode(locaData, j, writeOffset); 24303 } 24304 if (writeOffset === 0) { 24305 const simpleGlyph = new Uint8Array([0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0]); 24306 for (i = 0, j = itemSize; i < numGlyphsOut; i++, j += itemSize) { 24307 itemEncode(locaData, j, simpleGlyph.length); 24308 } 24309 glyf.data = simpleGlyph; 24310 } else if (dupFirstEntry) { 24311 const firstEntryLength = itemDecode(locaData, itemSize); 24312 if (newGlyfData.length > firstEntryLength + writeOffset) { 24313 glyf.data = newGlyfData.subarray(0, firstEntryLength + writeOffset); 24314 } else { 24315 glyf.data = new Uint8Array(firstEntryLength + writeOffset); 24316 glyf.data.set(newGlyfData.subarray(0, writeOffset)); 24317 } 24318 glyf.data.set(newGlyfData.subarray(0, firstEntryLength), writeOffset); 24319 itemEncode(loca.data, locaData.length - itemSize, writeOffset + firstEntryLength); 24320 } else { 24321 glyf.data = newGlyfData.subarray(0, writeOffset); 24322 } 24323 return { 24324 missingGlyphs, 24325 maxSizeOfInstructions 24326 }; 24327 } 24328 function readPostScriptTable(post, propertiesObj, maxpNumGlyphs) { 24329 const start = (font.start || 0) + post.offset; 24330 font.pos = start; 24331 const length = post.length, 24332 end = start + length; 24333 const version = font.getInt32(); 24334 font.skip(28); 24335 let glyphNames; 24336 let valid = true; 24337 let i; 24338 switch (version) { 24339 case 0x00010000: 24340 glyphNames = MacStandardGlyphOrdering; 24341 break; 24342 case 0x00020000: 24343 const numGlyphs = font.getUint16(); 24344 if (numGlyphs !== maxpNumGlyphs) { 24345 valid = false; 24346 break; 24347 } 24348 const glyphNameIndexes = []; 24349 for (i = 0; i < numGlyphs; ++i) { 24350 const index = font.getUint16(); 24351 if (index >= 32768) { 24352 valid = false; 24353 break; 24354 } 24355 glyphNameIndexes.push(index); 24356 } 24357 if (!valid) { 24358 break; 24359 } 24360 const customNames = [], 24361 strBuf = []; 24362 while (font.pos < end) { 24363 const stringLength = font.getByte(); 24364 strBuf.length = stringLength; 24365 for (i = 0; i < stringLength; ++i) { 24366 strBuf[i] = String.fromCharCode(font.getByte()); 24367 } 24368 customNames.push(strBuf.join("")); 24369 } 24370 glyphNames = []; 24371 for (i = 0; i < numGlyphs; ++i) { 24372 const j = glyphNameIndexes[i]; 24373 if (j < 258) { 24374 glyphNames.push(MacStandardGlyphOrdering[j]); 24375 continue; 24376 } 24377 glyphNames.push(customNames[j - 258]); 24378 } 24379 break; 24380 case 0x00030000: 24381 break; 24382 default: 24383 warn("Unknown/unsupported post table version " + version); 24384 valid = false; 24385 if (propertiesObj.defaultEncoding) { 24386 glyphNames = propertiesObj.defaultEncoding; 24387 } 24388 break; 24389 } 24390 propertiesObj.glyphNames = glyphNames; 24391 return valid; 24392 } 24393 function readNameTable(nameTable) { 24394 const start = (font.start || 0) + nameTable.offset; 24395 font.pos = start; 24396 const names = [[], []], 24397 records = []; 24398 const length = nameTable.length, 24399 end = start + length; 24400 const format = font.getUint16(); 24401 const FORMAT_0_HEADER_LENGTH = 6; 24402 if (format !== 0 || length < FORMAT_0_HEADER_LENGTH) { 24403 return [names, records]; 24404 } 24405 const numRecords = font.getUint16(); 24406 const stringsStart = font.getUint16(); 24407 const NAME_RECORD_LENGTH = 12; 24408 let i, ii; 24409 for (i = 0; i < numRecords && font.pos + NAME_RECORD_LENGTH <= end; i++) { 24410 const r = { 24411 platform: font.getUint16(), 24412 encoding: font.getUint16(), 24413 language: font.getUint16(), 24414 name: font.getUint16(), 24415 length: font.getUint16(), 24416 offset: font.getUint16() 24417 }; 24418 if (isMacNameRecord(r) || isWinNameRecord(r)) { 24419 records.push(r); 24420 } 24421 } 24422 for (i = 0, ii = records.length; i < ii; i++) { 24423 const record = records[i]; 24424 if (record.length <= 0) { 24425 continue; 24426 } 24427 const pos = start + stringsStart + record.offset; 24428 if (pos + record.length > end) { 24429 continue; 24430 } 24431 font.pos = pos; 24432 const nameIndex = record.name; 24433 if (record.encoding) { 24434 let str = ""; 24435 for (let j = 0, jj = record.length; j < jj; j += 2) { 24436 str += String.fromCharCode(font.getUint16()); 24437 } 24438 names[1][nameIndex] = str; 24439 } else { 24440 names[0][nameIndex] = font.getString(record.length); 24441 } 24442 } 24443 return [names, records]; 24444 } 24445 const TTOpsStackDeltas = [0, 0, 0, 0, 0, 0, 0, 0, -2, -2, -2, -2, 0, 0, -2, -5, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1, -1, -1, 1, -1, -999, 0, 1, 0, -1, -2, 0, -1, -2, -1, -1, 0, -1, -1, 0, 0, -999, -999, -1, -1, -1, -1, -2, -999, -2, -2, -999, 0, -2, -2, 0, 0, -2, 0, -2, 0, 0, 0, -2, -1, -1, 1, 1, 0, 0, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1, 0, -999, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, -999, -999, -999, -999, -999, -1, -1, -2, -2, 0, 0, 0, 0, -1, -1, -999, -2, -2, 0, 0, -1, -2, -2, 0, 0, 0, -1, -1, -1, -2]; 24446 function sanitizeTTProgram(table, ttContext) { 24447 let data = table.data; 24448 let i = 0, 24449 j, 24450 n, 24451 b, 24452 funcId, 24453 pc, 24454 lastEndf = 0, 24455 lastDeff = 0; 24456 const stack = []; 24457 const callstack = []; 24458 const functionsCalled = []; 24459 let tooComplexToFollowFunctions = ttContext.tooComplexToFollowFunctions; 24460 let inFDEF = false, 24461 ifLevel = 0, 24462 inELSE = 0; 24463 for (let ii = data.length; i < ii;) { 24464 const op = data[i++]; 24465 if (op === 0x40) { 24466 n = data[i++]; 24467 if (inFDEF || inELSE) { 24468 i += n; 24469 } else { 24470 for (j = 0; j < n; j++) { 24471 stack.push(data[i++]); 24472 } 24473 } 24474 } else if (op === 0x41) { 24475 n = data[i++]; 24476 if (inFDEF || inELSE) { 24477 i += n * 2; 24478 } else { 24479 for (j = 0; j < n; j++) { 24480 b = data[i++]; 24481 stack.push(b << 8 | data[i++]); 24482 } 24483 } 24484 } else if ((op & 0xf8) === 0xb0) { 24485 n = op - 0xb0 + 1; 24486 if (inFDEF || inELSE) { 24487 i += n; 24488 } else { 24489 for (j = 0; j < n; j++) { 24490 stack.push(data[i++]); 24491 } 24492 } 24493 } else if ((op & 0xf8) === 0xb8) { 24494 n = op - 0xb8 + 1; 24495 if (inFDEF || inELSE) { 24496 i += n * 2; 24497 } else { 24498 for (j = 0; j < n; j++) { 24499 b = data[i++]; 24500 stack.push(signedInt16(b, data[i++])); 24501 } 24502 } 24503 } else if (op === 0x2b && !tooComplexToFollowFunctions) { 24504 if (!inFDEF && !inELSE) { 24505 funcId = stack.at(-1); 24506 if (isNaN(funcId)) { 24507 info("TT: CALL empty stack (or invalid entry)."); 24508 } else { 24509 ttContext.functionsUsed[funcId] = true; 24510 if (funcId in ttContext.functionsStackDeltas) { 24511 const newStackLength = stack.length + ttContext.functionsStackDeltas[funcId]; 24512 if (newStackLength < 0) {
vendor: 5,842 bytes, lines 24513-24698
24513 warn("TT: CALL invalid functions stack delta."); 24514 ttContext.hintsValid = false; 24515 return; 24516 } 24517 stack.length = newStackLength; 24518 } else if (funcId in ttContext.functionsDefined && !functionsCalled.includes(funcId)) { 24519 callstack.push({ 24520 data, 24521 i, 24522 stackTop: stack.length - 1 24523 }); 24524 functionsCalled.push(funcId); 24525 pc = ttContext.functionsDefined[funcId]; 24526 if (!pc) { 24527 warn("TT: CALL non-existent function"); 24528 ttContext.hintsValid = false; 24529 return; 24530 } 24531 data = pc.data; 24532 i = pc.i; 24533 } 24534 } 24535 } 24536 } else if (op === 0x2c && !tooComplexToFollowFunctions) { 24537 if (inFDEF || inELSE) { 24538 warn("TT: nested FDEFs not allowed"); 24539 tooComplexToFollowFunctions = true; 24540 } 24541 inFDEF = true; 24542 lastDeff = i; 24543 funcId = stack.pop(); 24544 ttContext.functionsDefined[funcId] = { 24545 data, 24546 i 24547 }; 24548 } else if (op === 0x2d) { 24549 if (inFDEF) { 24550 inFDEF = false; 24551 lastEndf = i; 24552 } else { 24553 pc = callstack.pop(); 24554 if (!pc) { 24555 warn("TT: ENDF bad stack"); 24556 ttContext.hintsValid = false; 24557 return; 24558 } 24559 funcId = functionsCalled.pop(); 24560 data = pc.data; 24561 i = pc.i; 24562 ttContext.functionsStackDeltas[funcId] = stack.length - pc.stackTop; 24563 } 24564 } else if (op === 0x89) { 24565 if (inFDEF || inELSE) { 24566 warn("TT: nested IDEFs not allowed"); 24567 tooComplexToFollowFunctions = true; 24568 } 24569 inFDEF = true; 24570 lastDeff = i; 24571 } else if (op === 0x58) { 24572 ++ifLevel; 24573 } else if (op === 0x1b) { 24574 inELSE = ifLevel; 24575 } else if (op === 0x59) { 24576 if (inELSE === ifLevel) { 24577 inELSE = 0; 24578 } 24579 --ifLevel; 24580 } else if (op === 0x1c) { 24581 if (!inFDEF && !inELSE) { 24582 const offset = stack.at(-1); 24583 if (offset > 0) { 24584 i += offset - 1; 24585 } 24586 } 24587 } 24588 if (!inFDEF && !inELSE) { 24589 let stackDelta = 0; 24590 if (op <= 0x8e) { 24591 stackDelta = TTOpsStackDeltas[op]; 24592 } else if (op >= 0xc0 && op <= 0xdf) { 24593 stackDelta = -1; 24594 } else if (op >= 0xe0) { 24595 stackDelta = -2; 24596 } 24597 if (op >= 0x71 && op <= 0x75) { 24598 n = stack.pop(); 24599 if (!isNaN(n)) { 24600 stackDelta = -n * 2; 24601 } 24602 } 24603 while (stackDelta < 0 && stack.length > 0) { 24604 stack.pop(); 24605 stackDelta++; 24606 } 24607 while (stackDelta > 0) { 24608 stack.push(NaN); 24609 stackDelta--; 24610 } 24611 } 24612 } 24613 ttContext.tooComplexToFollowFunctions = tooComplexToFollowFunctions; 24614 const content = [data]; 24615 if (i > data.length) { 24616 content.push(new Uint8Array(i - data.length)); 24617 } 24618 if (lastDeff > lastEndf) { 24619 warn("TT: complementing a missing function tail"); 24620 content.push(new Uint8Array([0x22, 0x2d])); 24621 } 24622 foldTTTable(table, content); 24623 } 24624 function checkInvalidFunctions(ttContext, maxFunctionDefs) { 24625 if (ttContext.tooComplexToFollowFunctions) { 24626 return; 24627 } 24628 if (ttContext.functionsDefined.length > maxFunctionDefs) { 24629 warn("TT: more functions defined than expected"); 24630 ttContext.hintsValid = false; 24631 return; 24632 } 24633 for (let j = 0, jj = ttContext.functionsUsed.length; j < jj; j++) { 24634 if (j > maxFunctionDefs) { 24635 warn("TT: invalid function id: " + j); 24636 ttContext.hintsValid = false; 24637 return; 24638 } 24639 if (ttContext.functionsUsed[j] && !ttContext.functionsDefined[j]) { 24640 warn("TT: undefined function: " + j); 24641 ttContext.hintsValid = false; 24642 return; 24643 } 24644 } 24645 } 24646 function foldTTTable(table, content) { 24647 if (content.length > 1) { 24648 let newLength = 0; 24649 let j, jj; 24650 for (j = 0, jj = content.length; j < jj; j++) { 24651 newLength += content[j].length; 24652 } 24653 newLength = newLength + 3 & ~3; 24654 const result = new Uint8Array(newLength); 24655 let pos = 0; 24656 for (j = 0, jj = content.length; j < jj; j++) { 24657 result.set(content[j], pos); 24658 pos += content[j].length; 24659 } 24660 table.data = result; 24661 table.length = newLength; 24662 } 24663 } 24664 function sanitizeTTPrograms(fpgm, prep, cvt, maxFunctionDefs) { 24665 const ttContext = { 24666 functionsDefined: [], 24667 functionsUsed: [], 24668 functionsStackDeltas: [], 24669 tooComplexToFollowFunctions: false, 24670 hintsValid: true 24671 }; 24672 if (fpgm) { 24673 sanitizeTTProgram(fpgm, ttContext); 24674 } 24675 if (prep) { 24676 sanitizeTTProgram(prep, ttContext); 24677 } 24678 if (fpgm) { 24679 checkInvalidFunctions(ttContext, maxFunctionDefs); 24680 } 24681 if (cvt && cvt.length & 1) { 24682 const cvtData = new Uint8Array(cvt.length + 1); 24683 cvtData.set(cvt.data); 24684 cvt.data = cvtData; 24685 } 24686 return ttContext.hintsValid; 24687 } 24688 font = new Stream(new Uint8Array(font.getBytes())); 24689 let header, tables; 24690 if (isTrueTypeCollectionFile(font)) { 24691 const ttcData = readTrueTypeCollectionData(font, this.name); 24692 header = ttcData.header; 24693 tables = ttcData.tables; 24694 } else { 24695 header = readOpenTypeHeader(font); 24696 tables = readTables(font, header.numTables); 24697 } 24698
24698let cff, cffFile; 24699 const isTrueType = !tables["CFF "]; 24700 if (!isTrueType) { 24701 const isComposite = properties.composite && (properties.cidToGidMap?.length > 0 || !(properties.cMap instanceof IdentityCMap)); 24702 if (header.version === "OTTO" && !isComposite || !tables.head || !tables.hhea || !tables.maxp || !tables.post) { 24703 cffFile = new Stream(tables["CFF "].data); 24704 cff = new CFFFont(cffFile, properties); 24705 adjustWidths(
vendor: 22,732 bytes, lines 24705-25304
24705properties); 24706 return this.convert(name, cff, properties); 24707 } 24708 delete tables.glyf; 24709 delete tables.loca; 24710 delete tables.fpgm; 24711 delete tables.prep; 24712 delete tables["cvt "]; 24713 this.isOpenType = true; 24714 } else { 24715 if (!tables.loca) { 24716 throw new FormatError('Required "loca" table is not found'); 24717 } 24718 if (!tables.glyf) { 24719 warn('Required "glyf" table is not found -- trying to recover.'); 24720 tables.glyf = { 24721 tag: "glyf", 24722 data: new Uint8Array(0) 24723 }; 24724 } 24725 this.isOpenType = false; 24726 } 24727 if (!tables.maxp) { 24728 throw new FormatError('Required "maxp" table is not found'); 24729 } 24730 font.pos = (font.start || 0) + tables.maxp.offset; 24731 let version = font.getInt32(); 24732 const numGlyphs = font.getUint16(); 24733 if (version !== 0x00010000 && version !== 0x00005000) { 24734 if (tables.maxp.length === 6) { 24735 version = 0x0005000; 24736 } else if (tables.maxp.length >= 32) { 24737 version = 0x00010000; 24738 } else { 24739 throw new FormatError(`"maxp" table has a wrong version number`); 24740 } 24741 writeUint32(tables.maxp.data, 0, version); 24742 } 24743 if (properties.scaleFactors?.length === numGlyphs && isTrueType) { 24744 const { 24745 scaleFactors 24746 } = properties; 24747 const isGlyphLocationsLong = int16(tables.head.data[50], tables.head.data[51]); 24748 const glyphs = new GlyfTable({ 24749 glyfTable: tables.glyf.data, 24750 isGlyphLocationsLong, 24751 locaTable: tables.loca.data, 24752 numGlyphs 24753 }); 24754 glyphs.scale(scaleFactors); 24755 const { 24756 glyf, 24757 loca, 24758 isLocationLong 24759 } = glyphs.write(); 24760 tables.glyf.data = glyf; 24761 tables.loca.data = loca; 24762 if (isLocationLong !== !!isGlyphLocationsLong) { 24763 tables.head.data[50] = 0; 24764 tables.head.data[51] = isLocationLong ? 1 : 0; 24765 } 24766 const metrics = tables.hmtx.data; 24767 for (let i = 0; i < numGlyphs; i++) { 24768 const j = 4 * i; 24769 const advanceWidth = Math.round(scaleFactors[i] * int16(metrics[j], metrics[j + 1])); 24770 metrics[j] = advanceWidth >> 8 & 0xff; 24771 metrics[j + 1] = advanceWidth & 0xff; 24772 const lsb = Math.round(scaleFactors[i] * signedInt16(metrics[j + 2], metrics[j + 3])); 24773 writeSignedInt16(metrics, j + 2, lsb); 24774 } 24775 } 24776 let numGlyphsOut = numGlyphs + 1; 24777 let dupFirstEntry = true; 24778 if (numGlyphsOut > 0xffff) { 24779 dupFirstEntry = false; 24780 numGlyphsOut = numGlyphs; 24781 warn("Not enough space in glyfs to duplicate first glyph."); 24782 } 24783 let maxFunctionDefs = 0; 24784 let maxSizeOfInstructions = 0; 24785 if (version >= 0x00010000 && tables.maxp.length >= 32) { 24786 font.pos += 8; 24787 const maxZones = font.getUint16(); 24788 if (maxZones > 2) { 24789 tables.maxp.data[14] = 0; 24790 tables.maxp.data[15] = 2; 24791 } 24792 font.pos += 4; 24793 maxFunctionDefs = font.getUint16(); 24794 font.pos += 4; 24795 maxSizeOfInstructions = font.getUint16(); 24796 } 24797 tables.maxp.data[4] = numGlyphsOut >> 8; 24798 tables.maxp.data[5] = numGlyphsOut & 255; 24799 const hintsValid = sanitizeTTPrograms(tables.fpgm, tables.prep, tables["cvt "], maxFunctionDefs); 24800 if (!hintsValid) { 24801 delete tables.fpgm; 24802 delete tables.prep; 24803 delete tables["cvt "]; 24804 } 24805 sanitizeMetrics(font, tables.hhea, tables.hmtx, tables.head, numGlyphsOut, dupFirstEntry); 24806 if (!tables.head) { 24807 throw new FormatError('Required "head" table is not found'); 24808 } 24809 sanitizeHead(tables.head, numGlyphs, isTrueType ? tables.loca.length : 0); 24810 let missingGlyphs = Object.create(null); 24811 if (isTrueType) { 24812 const isGlyphLocationsLong = int16(tables.head.data[50], tables.head.data[51]); 24813 const glyphsInfo = sanitizeGlyphLocations(tables.loca, tables.glyf, numGlyphs, isGlyphLocationsLong, hintsValid, dupFirstEntry, maxSizeOfInstructions); 24814 missingGlyphs = glyphsInfo.missingGlyphs; 24815 if (version >= 0x00010000 && tables.maxp.length >= 32) { 24816 tables.maxp.data[26] = glyphsInfo.maxSizeOfInstructions >> 8; 24817 tables.maxp.data[27] = glyphsInfo.maxSizeOfInstructions & 255; 24818 } 24819 } 24820 if (!tables.hhea) { 24821 throw new FormatError('Required "hhea" table is not found'); 24822 } 24823 if (tables.hhea.data[10] === 0 && tables.hhea.data[11] === 0) { 24824 tables.hhea.data[10] = 0xff; 24825 tables.hhea.data[11] = 0xff; 24826 } 24827 const metricsOverride = { 24828 unitsPerEm: int16(tables.head.data[18], tables.head.data[19]), 24829 yMax: signedInt16(tables.head.data[42], tables.head.data[43]), 24830 yMin: signedInt16(tables.head.data[38], tables.head.data[39]), 24831 ascent: signedInt16(tables.hhea.data[4], tables.hhea.data[5]), 24832 descent: signedInt16(tables.hhea.data[6], tables.hhea.data[7]), 24833 lineGap: signedInt16(tables.hhea.data[8], tables.hhea.data[9]) 24834 }; 24835 this.ascent = metricsOverride.ascent / metricsOverride.unitsPerEm; 24836 this.descent = metricsOverride.descent / metricsOverride.unitsPerEm; 24837 this.lineGap = metricsOverride.lineGap / metricsOverride.unitsPerEm; 24838 if (this.cssFontInfo?.lineHeight) { 24839 this.lineHeight = this.cssFontInfo.metrics.lineHeight; 24840 this.lineGap = this.cssFontInfo.metrics.lineGap; 24841 } else { 24842 this.lineHeight = this.ascent - this.descent + this.lineGap; 24843 } 24844 if (tables.post) { 24845 readPostScriptTable(tables.post, properties, numGlyphs); 24846 } 24847 tables.post = { 24848 tag: "post", 24849 data: createPostTable(properties) 24850 }; 24851 const charCodeToGlyphId = Object.create(null); 24852 function hasGlyph(glyphId) { 24853 return !missingGlyphs[glyphId]; 24854 } 24855 if (properties.composite) { 24856 const cidToGidMap = properties.cidToGidMap || []; 24857 const isCidToGidMapEmpty = cidToGidMap.length === 0; 24858 properties.cMap.forEach(function (charCode, cid) { 24859 if (typeof cid === "string") { 24860 cid = convertCidString(charCode, cid, true); 24861 } 24862 if (cid > 0xffff) { 24863 throw new FormatError("Max size of CID is 65,535"); 24864 } 24865 let glyphId = -1; 24866 if (isCidToGidMapEmpty) { 24867 glyphId = cid; 24868 } else if (cidToGidMap[cid] !== undefined) { 24869 glyphId = cidToGidMap[cid]; 24870 } 24871 if (glyphId >= 0 && glyphId < numGlyphs && hasGlyph(glyphId)) { 24872 charCodeToGlyphId[charCode] = glyphId; 24873 } 24874 }); 24875 } else { 24876 const cmapTable = readCmapTable(tables.cmap, font, this.isSymbolicFont, properties.hasEncoding); 24877 const cmapPlatformId = cmapTable.platformId; 24878 const cmapEncodingId = cmapTable.encodingId; 24879 const cmapMappings = cmapTable.mappings; 24880 let baseEncoding = [], 24881 forcePostTable = false; 24882 if (properties.hasEncoding && (properties.baseEncodingName === "MacRomanEncoding" || properties.baseEncodingName === "WinAnsiEncoding")) { 24883 baseEncoding = getEncoding(properties.baseEncodingName); 24884 } 24885 if (properties.hasEncoding && !this.isSymbolicFont && (cmapPlatformId === 3 && cmapEncodingId === 1 || cmapPlatformId === 1 && cmapEncodingId === 0)) { 24886 const glyphsUnicodeMap = getGlyphsUnicode(); 24887 for (let charCode = 0; charCode < 256; charCode++) { 24888 let glyphName; 24889 if (this.differences[charCode] !== undefined) { 24890 glyphName = this.differences[charCode]; 24891 } else if (baseEncoding.length && baseEncoding[charCode] !== "") { 24892 glyphName = baseEncoding[charCode]; 24893 } else { 24894 glyphName = StandardEncoding[charCode]; 24895 } 24896 if (!glyphName) { 24897 continue; 24898 } 24899 const standardGlyphName = recoverGlyphName(glyphName, glyphsUnicodeMap); 24900 let unicodeOrCharCode; 24901 if (cmapPlatformId === 3 && cmapEncodingId === 1) { 24902 unicodeOrCharCode = glyphsUnicodeMap[standardGlyphName]; 24903 } else if (cmapPlatformId === 1 && cmapEncodingId === 0) { 24904 unicodeOrCharCode = MacRomanEncoding.indexOf(standardGlyphName); 24905 } 24906 if (unicodeOrCharCode === undefined) { 24907 if (!properties.glyphNames && properties.hasIncludedToUnicodeMap && !(this.toUnicode instanceof IdentityToUnicodeMap)) { 24908 const unicode = this.toUnicode.get(charCode); 24909 if (unicode) { 24910 unicodeOrCharCode = unicode.codePointAt(0); 24911 } 24912 } 24913 if (unicodeOrCharCode === undefined) { 24914 continue; 24915 } 24916 } 24917 for (const mapping of cmapMappings) { 24918 if (mapping.charCode !== unicodeOrCharCode) { 24919 continue; 24920 } 24921 charCodeToGlyphId[charCode] = mapping.glyphId; 24922 break; 24923 } 24924 } 24925 } else if (cmapPlatformId === 0) { 24926 for (const mapping of cmapMappings) { 24927 charCodeToGlyphId[mapping.charCode] = mapping.glyphId; 24928 } 24929 forcePostTable = true; 24930 } else if (cmapPlatformId === 3 && cmapEncodingId === 0) { 24931 for (const mapping of cmapMappings) { 24932 let charCode = mapping.charCode; 24933 if (charCode >= 0xf000 && charCode <= 0xf0ff) { 24934 charCode &= 0xff; 24935 } 24936 charCodeToGlyphId[charCode] = mapping.glyphId; 24937 } 24938 } else { 24939 for (const mapping of cmapMappings) { 24940 charCodeToGlyphId[mapping.charCode] = mapping.glyphId; 24941 } 24942 } 24943 if (properties.glyphNames && (baseEncoding.length || this.differences.length)) { 24944 for (let i = 0; i < 256; ++i) { 24945 if (!forcePostTable && charCodeToGlyphId[i] !== undefined) { 24946 continue; 24947 } 24948 const glyphName = this.differences[i] || baseEncoding[i]; 24949 if (!glyphName) { 24950 continue; 24951 } 24952 const glyphId = properties.glyphNames.indexOf(glyphName); 24953 if (glyphId > 0 && hasGlyph(glyphId)) { 24954 charCodeToGlyphId[i] = glyphId; 24955 } 24956 } 24957 } 24958 } 24959 if (charCodeToGlyphId.length === 0) { 24960 charCodeToGlyphId[0] = 0; 24961 } 24962 let glyphZeroId = numGlyphsOut - 1; 24963 if (!dupFirstEntry) { 24964 glyphZeroId = 0; 24965 } 24966 if (!properties.cssFontInfo) { 24967 const newMapping = adjustMapping(charCodeToGlyphId, hasGlyph, glyphZeroId, this.toUnicode); 24968 this.toFontChar = newMapping.toFontChar; 24969 tables.cmap = { 24970 tag: "cmap", 24971 data: createCmapTable(newMapping.charCodeToGlyphId, newMapping.toUnicodeExtraMap, numGlyphsOut) 24972 }; 24973 if (!tables["OS/2"] || !validateOS2Table(tables["OS/2"], font)) { 24974 tables["OS/2"] = { 24975 tag: "OS/2", 24976 data: createOS2Table(properties, newMapping.charCodeToGlyphId, metricsOverride) 24977 }; 24978 } 24979 } 24980 if (!isTrueType) { 24981 try { 24982 cffFile = new Stream(tables["CFF "].data); 24983 const parser = new CFFParser(cffFile, properties, SEAC_ANALYSIS_ENABLED); 24984 cff = parser.parse(); 24985 cff.duplicateFirstGlyph(); 24986 const compiler = new CFFCompiler(cff); 24987 tables["CFF "].data = compiler.compile(); 24988 } catch { 24989 warn("Failed to compile font " + properties.loadedName); 24990 } 24991 } 24992 if (!tables.name) { 24993 tables.name = { 24994 tag: "name", 24995 data: createNameTable(this.name) 24996 }; 24997 } else { 24998 const [namePrototype, nameRecords] = readNameTable(tables.name); 24999 tables.name.data = createNameTable(name, namePrototype); 25000 this.psName = namePrototype[0][6] || null; 25001 if (!properties.composite) { 25002 adjustTrueTypeToUnicode(properties, this.isSymbolicFont, nameRecords); 25003 } 25004 } 25005 const builder = new OpenTypeFileBuilder(header.version); 25006 for (const tableTag in tables) { 25007 builder.addTable(tableTag, tables[tableTag].data); 25008 } 25009 return builder.toArray(); 25010 } 25011 convert(fontName, font, properties) { 25012 properties.fixedPitch = false; 25013 if (properties.builtInEncoding) { 25014 adjustType1ToUnicode(properties, properties.builtInEncoding); 25015 } 25016 let glyphZeroId = 1; 25017 if (font instanceof CFFFont) { 25018 glyphZeroId = font.numGlyphs - 1; 25019 } 25020 const mapping = font.getGlyphMapping(properties); 25021 let newMapping = null; 25022 let newCharCodeToGlyphId = mapping; 25023 let toUnicodeExtraMap = null; 25024 if (!properties.cssFontInfo) { 25025 newMapping = adjustMapping(mapping, font.hasGlyphId.bind(font), glyphZeroId, this.toUnicode); 25026 this.toFontChar = newMapping.toFontChar; 25027 newCharCodeToGlyphId = newMapping.charCodeToGlyphId; 25028 toUnicodeExtraMap = newMapping.toUnicodeExtraMap; 25029 } 25030 const numGlyphs = font.numGlyphs; 25031 function getCharCodes(charCodeToGlyphId, glyphId) { 25032 let charCodes = null; 25033 for (const charCode in charCodeToGlyphId) { 25034 if (glyphId === charCodeToGlyphId[charCode]) { 25035 (charCodes ||= []).push(charCode | 0); 25036 } 25037 } 25038 return charCodes; 25039 } 25040 function createCharCode(charCodeToGlyphId, glyphId) { 25041 for (const charCode in charCodeToGlyphId) { 25042 if (glyphId === charCodeToGlyphId[charCode]) { 25043 return charCode | 0; 25044 } 25045 } 25046 newMapping.charCodeToGlyphId[newMapping.nextAvailableFontCharCode] = glyphId; 25047 return newMapping.nextAvailableFontCharCode++; 25048 } 25049 const seacs = font.seacs; 25050 if (newMapping && SEAC_ANALYSIS_ENABLED && seacs?.length) { 25051 const matrix = properties.fontMatrix || FONT_IDENTITY_MATRIX; 25052 const charset = font.getCharset(); 25053 const seacMap = Object.create(null); 25054 for (let glyphId in seacs) { 25055 glyphId |= 0; 25056 const seac = seacs[glyphId]; 25057 const baseGlyphName = StandardEncoding[seac[2]]; 25058 const accentGlyphName = StandardEncoding[seac[3]]; 25059 const baseGlyphId = charset.indexOf(baseGlyphName); 25060 const accentGlyphId = charset.indexOf(accentGlyphName); 25061 if (baseGlyphId < 0 || accentGlyphId < 0) { 25062 continue; 25063 } 25064 const accentOffset = { 25065 x: seac[0] * matrix[0] + seac[1] * matrix[2] + matrix[4], 25066 y: seac[0] * matrix[1] + seac[1] * matrix[3] + matrix[5] 25067 }; 25068 const charCodes = getCharCodes(mapping, glyphId); 25069 if (!charCodes) { 25070 continue; 25071 } 25072 for (const charCode of charCodes) { 25073 const charCodeToGlyphId = newMapping.charCodeToGlyphId; 25074 const baseFontCharCode = createCharCode(charCodeToGlyphId, baseGlyphId); 25075 const accentFontCharCode = createCharCode(charCodeToGlyphId, accentGlyphId); 25076 seacMap[charCode] = { 25077 baseFontCharCode, 25078 accentFontCharCode, 25079 accentOffset 25080 }; 25081 } 25082 } 25083 properties.seacMap = seacMap; 25084 } 25085 const unitsPerEm = properties.fontMatrix ? 1 / Math.max(...properties.fontMatrix.slice(0, 4).map(Math.abs)) : 1000; 25086 const builder = new OpenTypeFileBuilder("\x4F\x54\x54\x4F"); 25087 builder.addTable("CFF ", font.data); 25088 builder.addTable("OS/2", createOS2Table(properties, newCharCodeToGlyphId)); 25089 builder.addTable("cmap", createCmapTable(newCharCodeToGlyphId, toUnicodeExtraMap, numGlyphs)); 25090 builder.addTable("head", "\x00\x01\x00\x00" + "\x00\x00\x10\x00" + "\x00\x00\x00\x00" + "\x5F\x0F\x3C\xF5" + "\x00\x00" + safeString16(unitsPerEm) + "\x00\x00\x00\x00\x9e\x0b\x7e\x27" + "\x00\x00\x00\x00\x9e\x0b\x7e\x27" + "\x00\x00" + safeString16(properties.descent) + "\x0F\xFF" + safeString16(properties.ascent) + string16(properties.italicAngle ? 2 : 0) + "\x00\x11" + "\x00\x00" + "\x00\x00" + "\x00\x00"); 25091 builder.addTable("hhea", "\x00\x01\x00\x00" + safeString16(properties.ascent) + safeString16(properties.descent) + "\x00\x00" + "\xFF\xFF" + "\x00\x00" + "\x00\x00" + "\x00\x00" + safeString16(properties.capHeight) + safeString16(Math.tan(properties.italicAngle) * properties.xHeight) + "\x00\x00" + "\x00\x00" + "\x00\x00" + "\x00\x00" + "\x00\x00" + "\x00\x00" + string16(numGlyphs)); 25092 builder.addTable("hmtx", function fontFieldsHmtx() { 25093 const charstrings = font.charstrings; 25094 const cffWidths = font.cff ? font.cff.widths : null; 25095 let hmtx = "\x00\x00\x00\x00"; 25096 for (let i = 1, ii = numGlyphs; i < ii; i++) { 25097 let width = 0; 25098 if (charstrings) { 25099 const charstring = charstrings[i - 1]; 25100 width = "width" in charstring ? charstring.width : 0; 25101 } else if (cffWidths) { 25102 width = Math.ceil(cffWidths[i] || 0); 25103 } 25104 hmtx += string16(width) + string16(0); 25105 } 25106 return hmtx; 25107 }()); 25108 builder.addTable("maxp", "\x00\x00\x50\x00" + string16(numGlyphs)); 25109 builder.addTable("name", createNameTable(fontName)); 25110 builder.addTable("post", createPostTable(properties)); 25111 return builder.toArray(); 25112 } 25113 get _spaceWidth() { 25114 const possibleSpaceReplacements = ["space", "minus", "one", "i", "I"]; 25115 let width; 25116 for (const glyphName of possibleSpaceReplacements) { 25117 if (glyphName in this.widths) { 25118 width = this.widths[glyphName]; 25119 break; 25120 } 25121 const glyphsUnicodeMap = getGlyphsUnicode(); 25122 const glyphUnicode = glyphsUnicodeMap[glyphName]; 25123 let charcode = 0; 25124 if (this.composite && this.cMap.contains(glyphUnicode)) { 25125 charcode = this.cMap.lookup(glyphUnicode); 25126 if (typeof charcode === "string") { 25127 charcode = convertCidString(glyphUnicode, charcode); 25128 } 25129 } 25130 if (!charcode && this.toUnicode) { 25131 charcode = this.toUnicode.charCodeOf(glyphUnicode); 25132 } 25133 if (charcode <= 0) { 25134 charcode = glyphUnicode; 25135 } 25136 width = this.widths[charcode]; 25137 if (width) { 25138 break; 25139 } 25140 } 25141 return shadow(this, "_spaceWidth", width || this.defaultWidth); 25142 } 25143 _charToGlyph(charcode, isSpace = false) { 25144 let glyph = this._glyphCache[charcode]; 25145 if (glyph?.isSpace === isSpace) { 25146 return glyph; 25147 } 25148 let fontCharCode, width, operatorListId; 25149 let widthCode = charcode; 25150 if (this.cMap?.contains(charcode)) { 25151 widthCode = this.cMap.lookup(charcode); 25152 if (typeof widthCode === "string") { 25153 widthCode = convertCidString(charcode, widthCode); 25154 } 25155 } 25156 width = this.widths[widthCode]; 25157 if (typeof width !== "number") { 25158 width = this.defaultWidth; 25159 } 25160 const vmetric = this.vmetrics?.[widthCode]; 25161 let unicode = this.toUnicode.get(charcode) || charcode; 25162 if (typeof unicode === "number") { 25163 unicode = String.fromCharCode(unicode); 25164 } 25165 let isInFont = this.toFontChar[charcode] !== undefined; 25166 fontCharCode = this.toFontChar[charcode] || charcode; 25167 if (this.missingFile) { 25168 const glyphName = this.differences[charcode] || this.defaultEncoding[charcode]; 25169 if ((glyphName === ".notdef" || glyphName === "") && this.type === "Type1") { 25170 fontCharCode = 0x20; 25171 if (glyphName === "") { 25172 width ||= this._spaceWidth; 25173 unicode = String.fromCharCode(fontCharCode); 25174 } 25175 } 25176 fontCharCode = mapSpecialUnicodeValues(fontCharCode); 25177 } 25178 if (this.isType3Font) { 25179 operatorListId = fontCharCode; 25180 } 25181 let accent = null; 25182 if (this.seacMap?.[charcode]) { 25183 isInFont = true; 25184 const seac = this.seacMap[charcode]; 25185 fontCharCode = seac.baseFontCharCode; 25186 accent = { 25187 fontChar: String.fromCodePoint(seac.accentFontCharCode), 25188 offset: seac.accentOffset 25189 }; 25190 } 25191 let fontChar = ""; 25192 if (typeof fontCharCode === "number") { 25193 if (fontCharCode <= 0x10ffff) { 25194 fontChar = String.fromCodePoint(fontCharCode); 25195 } else { 25196 warn(`charToGlyph - invalid fontCharCode: ${fontCharCode}`); 25197 } 25198 } 25199 if (this.missingFile && this.vertical && fontChar.length === 1) { 25200 const vertical = getVerticalPresentationForm()[fontChar.charCodeAt(0)]; 25201 if (vertical) { 25202 fontChar = unicode = String.fromCharCode(vertical); 25203 } 25204 } 25205 glyph = new fonts_Glyph(charcode, fontChar, unicode, accent, width, vmetric, operatorListId, isSpace, isInFont); 25206 return this._glyphCache[charcode] = glyph; 25207 } 25208 charsToGlyphs(chars) { 25209 let glyphs = this._charsCache[chars]; 25210 if (glyphs) { 25211 return glyphs; 25212 } 25213 glyphs = []; 25214 if (this.cMap) { 25215 const c = Object.create(null), 25216 ii = chars.length; 25217 let i = 0; 25218 while (i < ii) { 25219 this.cMap.readCharCode(chars, i, c); 25220 const { 25221 charcode, 25222 length 25223 } = c; 25224 i += length; 25225 const glyph = this._charToGlyph(charcode, length === 1 && chars.charCodeAt(i - 1) === 0x20); 25226 glyphs.push(glyph); 25227 } 25228 } else { 25229 for (let i = 0, ii = chars.length; i < ii; ++i) { 25230 const charcode = chars.charCodeAt(i); 25231 const glyph = this._charToGlyph(charcode, charcode === 0x20); 25232 glyphs.push(glyph); 25233 } 25234 } 25235 return this._charsCache[chars] = glyphs; 25236 } 25237 getCharPositions(chars) { 25238 const positions = []; 25239 if (this.cMap) { 25240 const c = Object.create(null); 25241 let i = 0; 25242 while (i < chars.length) { 25243 this.cMap.readCharCode(chars, i, c); 25244 const length = c.length; 25245 positions.push([i, i + length]); 25246 i += length; 25247 } 25248 } else { 25249 for (let i = 0, ii = chars.length; i < ii; ++i) { 25250 positions.push([i, i + 1]); 25251 } 25252 } 25253 return positions; 25254 } 25255 get glyphCacheValues() { 25256 return Object.values(this._glyphCache); 25257 } 25258 encodeString(str) { 25259 const buffers = []; 25260 const currentBuf = []; 25261 const hasCurrentBufErrors = () => buffers.length % 2 === 1; 25262 const getCharCode = this.toUnicode instanceof IdentityToUnicodeMap ? unicode => this.toUnicode.charCodeOf(unicode) : unicode => this.toUnicode.charCodeOf(String.fromCodePoint(unicode)); 25263 for (let i = 0, ii = str.length; i < ii; i++) { 25264 const unicode = str.codePointAt(i); 25265 if (unicode > 0xd7ff && (unicode < 0xe000 || unicode > 0xfffd)) { 25266 i++; 25267 } 25268 if (this.toUnicode) { 25269 const charCode = getCharCode(unicode); 25270 if (charCode !== -1) { 25271 if (hasCurrentBufErrors()) { 25272 buffers.push(currentBuf.join("")); 25273 currentBuf.length = 0; 25274 } 25275 const charCodeLength = this.cMap ? this.cMap.getCharCodeLength(charCode) : 1; 25276 for (let j = charCodeLength - 1; j >= 0; j--) { 25277 currentBuf.push(String.fromCharCode(charCode >> 8 * j & 0xff)); 25278 } 25279 continue; 25280 } 25281 } 25282 if (!hasCurrentBufErrors()) { 25283 buffers.push(currentBuf.join("")); 25284 currentBuf.length = 0; 25285 } 25286 currentBuf.push(String.fromCodePoint(unicode)); 25287 } 25288 buffers.push(currentBuf.join("")); 25289 return buffers; 25290 } 25291} 25292class ErrorFont { 25293 constructor(error) { 25294 this.error = error; 25295 this.loadedName = "g_font_error"; 25296 this.missingFile = true; 25297 } 25298 charsToGlyphs() { 25299 return []; 25300 } 25301 encodeString(chars) { 25302 return [chars]; 25303 } 25304 exportData(
vendor: 1,578 bytes, lines 25304-25363
25304extraProperties = false) { 25305 return { 25306 error: this.error 25307 }; 25308 } 25309} 25310 25311;// ./src/core/pattern.js 25312 25313 25314 25315 25316const ShadingType = { 25317 FUNCTION_BASED: 1, 25318 AXIAL: 2, 25319 RADIAL: 3, 25320 FREE_FORM_MESH: 4, 25321 LATTICE_FORM_MESH: 5, 25322 COONS_PATCH_MESH: 6, 25323 TENSOR_PATCH_MESH: 7 25324}; 25325class Pattern { 25326 constructor() { 25327 unreachable("Cannot initialize Pattern."); 25328 } 25329 static parseShading(shading, xref, res, pdfFunctionFactory, localColorSpaceCache) { 25330 const dict = shading instanceof BaseStream ? shading.dict : shading; 25331 const type = dict.get("ShadingType"); 25332 try { 25333 switch (type) { 25334 case ShadingType.AXIAL: 25335 case ShadingType.RADIAL: 25336 return new RadialAxialShading(dict, xref, res, pdfFunctionFactory, localColorSpaceCache); 25337 case ShadingType.FREE_FORM_MESH: 25338 case ShadingType.LATTICE_FORM_MESH: 25339 case ShadingType.COONS_PATCH_MESH: 25340 case ShadingType.TENSOR_PATCH_MESH: 25341 return new MeshShading(shading, xref, res, pdfFunctionFactory, localColorSpaceCache); 25342 default: 25343 throw new FormatError("Unsupported ShadingType: " + type); 25344 } 25345 } catch (ex) { 25346 if (ex instanceof MissingDataException) { 25347 throw ex; 25348 } 25349 warn(ex); 25350 return new DummyShading(); 25351 } 25352 } 25353} 25354class BaseShading { 25355 static SMALL_NUMBER = 1e-6; 25356 getIR() { 25357 unreachable("Abstract method `getIR` called."); 25358 } 25359} 25360class RadialAxialShading extends BaseShading { 25361 constructor(dict, xref, resources, pdfFunctionFactory, localColorSpaceCache) { 25362 super(); 25363 this.shadingType = dict.get("ShadingType");
25364 let coordsLen = 0; 25365 if (this.shadingType === ShadingType.AXIAL) { 25366 coordsLen = 4; 25367 } else if (this.shadingType === ShadingType.RADIAL) { 25368 coordsLen = 6; 25369 } 25370 this.coordsArr = dict.getArray("Coords"); 25371 if (!isNumberArray(this.coordsArr, coordsLen)) { 25372 throw new FormatError("RadialAxialShading: Invalid /Coords array."); 25373 } 25374 const cs = ColorSpace.parse({ 25375 cs: dict.getRaw("CS") || dict.getRaw("ColorSpace"), 25376 xref, 25377 resources, 25378 pdfFunctionFactory, 25379 localColorSpaceCache 25380 }); 25381 this.bbox = lookupNormalRect(dict.getArray("BBox"), null); 25382 let t0 = 0.0, 25383 t1 = 1.0; 25384 const domainArr = dict.getArray("Domain"); 25385 if (isNumberArray(domainArr, 2)) { 25386 [t0, t1] = domainArr; 25387 } 25388 let extendStart = false, 25389 extendEnd = false; 25390 const extendArr = dict.getArray("Extend"); 25391 if (isBooleanArray(extendArr, 2)) { 25392 [extendStart, extendEnd] = extendArr; 25393 } 25394 if (this.shadingType === ShadingType.RADIAL && (!extendStart || !extendEnd)) { 25395 const [x1, y1, r1, x2, y2, r2] = this.coordsArr; 25396 const distance = Math.hypot(x1 - x2, y1 - y2); 25397 if (r1 <= r2 + distance && r2 <= r1 + distance) { 25398 warn("Unsupported radial gradient."); 25399 } 25400 } 25401 this.extendStart = extendStart; 25402 this.extendEnd = extendEnd; 25403 const fnObj = dict.getRaw("Function"); 25404 const fn = pdfFunctionFactory.createFromArray(fnObj); 25405 const NUMBER_OF_SAMPLES = 840; 25406 const step = (t1 - t0) / NUMBER_OF_SAMPLES; 25407 const colorStops = this.colorStops = []; 25408 if (t0 >= t1 || step <= 0) { 25409 info("Bad shading domain."); 25410 return; 25411 } 25412 const color = new Float32Array(cs.numComps), 25413 ratio = new Float32Array(1); 25414 let rgbColor; 25415 let iBase = 0; 25416 ratio[0] = t0; 25417 fn(ratio, 0, color, 0); 25418 let rgbBase = cs.getRgb(color, 0); 25419 const cssColorBase = Util.makeHexColor(rgbBase[0], rgbBase[1], rgbBase[2]); 25420 colorStops.push([0, cssColorBase]); 25421 let iPrev = 1; 25422 ratio[0] = t0 + step; 25423 fn(ratio, 0, color, 0); 25424 let rgbPrev = cs.getRgb(color, 0); 25425 let maxSlopeR = rgbPrev[0] - rgbBase[0] + 1; 25426 let maxSlopeG = rgbPrev[1] - rgbBase[1] + 1; 25427 let maxSlopeB = rgbPrev[2] - rgbBase[2] + 1; 25428 let minSlopeR = rgbPrev[0] - rgbBase[0] - 1; 25429 let minSlopeG = rgbPrev[1] - rgbBase[1] - 1; 25430 let minSlopeB = rgbPrev[2] - rgbBase[2] - 1; 25431 for (let i = 2; i < NUMBER_OF_SAMPLES; i++) { 25432 ratio[0] = t0 + i * step; 25433 fn(ratio, 0, color, 0); 25434 rgbColor = cs.getRgb(color, 0); 25435 const run = i - iBase; 25436 maxSlopeR = Math.min(maxSlopeR, (rgbColor[0] - rgbBase[0] + 1) / run); 25437 maxSlopeG = Math.min(maxSlopeG, (rgbColor[1] - rgbBase[1] + 1) / run); 25438 maxSlopeB = Math.min(maxSlopeB, (rgbColor[2] - rgbBase[2] + 1) / run); 25439 minSlopeR = Math.max(minSlopeR, (rgbColor[0] - rgbBase[0] - 1) / run); 25440 minSlopeG = Math.max(minSlopeG, (rgbColor[1] - rgbBase[1] - 1) / run); 25441 minSlopeB = Math.max(minSlopeB, (rgbColor[2] - rgbBase[2] - 1) / run); 25442 const slopesExist = minSlopeR <= maxSlopeR && minSlopeG <= maxSlopeG && minSlopeB <= maxSlopeB; 25443 if (!slopesExist) { 25444 const cssColor = Util.makeHexColor(rgbPrev[0], rgbPrev[1], rgbPrev[2]); 25445 colorStops.push([iPrev / NUMBER_OF_SAMPLES, cssColor]); 25446 maxSlopeR = rgbColor[0] - rgbPrev[0] + 1; 25447 maxSlopeG = rgbColor[1] - rgbPrev[1] + 1; 25448 maxSlopeB = rgbColor[2] - rgbPrev[2] + 1; 25449 minSlopeR = rgbColor[0] - rgbPrev[0] - 1; 25450 minSlopeG = rgbColor[1] - rgbPrev[1] - 1; 25451 minSlopeB = rgbColor[2] - rgbPrev[2] - 1; 25452 iBase = iPrev; 25453 rgbBase = rgbPrev; 25454 } 25455 iPrev = i; 25456 rgbPrev = rgbColor; 25457 } 25458 const cssColor = Util.makeHexColor(rgbPrev[0], rgbPrev[1], rgbPrev[2]); 25459 colorStops.push([1, cssColor]); 25460 let background = "transparent";
vendor: 5,123 bytes, lines 25461-25615
25461 if (dict.has("Background")) { 25462 rgbColor = cs.getRgb(dict.get("Background"), 0); 25463 background = Util.makeHexColor(rgbColor[0], rgbColor[1], rgbColor[2]); 25464 } 25465 if (!extendStart) { 25466 colorStops.unshift([0, background]); 25467 colorStops[1][0] += BaseShading.SMALL_NUMBER; 25468 } 25469 if (!extendEnd) { 25470 colorStops.at(-1)[0] -= BaseShading.SMALL_NUMBER; 25471 colorStops.push([1, background]); 25472 } 25473 this.colorStops = colorStops; 25474 } 25475 getIR() { 25476 const { 25477 coordsArr, 25478 shadingType 25479 } = this; 25480 let type, p0, p1, r0, r1; 25481 if (shadingType === ShadingType.AXIAL) { 25482 p0 = [coordsArr[0], coordsArr[1]]; 25483 p1 = [coordsArr[2], coordsArr[3]]; 25484 r0 = null; 25485 r1 = null; 25486 type = "axial"; 25487 } else if (shadingType === ShadingType.RADIAL) { 25488 p0 = [coordsArr[0], coordsArr[1]]; 25489 p1 = [coordsArr[3], coordsArr[4]]; 25490 r0 = coordsArr[2]; 25491 r1 = coordsArr[5]; 25492 type = "radial"; 25493 } else { 25494 unreachable(`getPattern type unknown: ${shadingType}`); 25495 } 25496 return ["RadialAxial", type, this.bbox, this.colorStops, p0, p1, r0, r1]; 25497 } 25498} 25499class MeshStreamReader { 25500 constructor(stream, context) { 25501 this.stream = stream; 25502 this.context = context; 25503 this.buffer = 0; 25504 this.bufferLength = 0; 25505 const numComps = context.numComps; 25506 this.tmpCompsBuf = new Float32Array(numComps); 25507 const csNumComps = context.colorSpace.numComps; 25508 this.tmpCsCompsBuf = context.colorFn ? new Float32Array(csNumComps) : this.tmpCompsBuf; 25509 } 25510 get hasData() { 25511 if (this.stream.end) { 25512 return this.stream.pos < this.stream.end; 25513 } 25514 if (this.bufferLength > 0) { 25515 return true; 25516 } 25517 const nextByte = this.stream.getByte(); 25518 if (nextByte < 0) { 25519 return false; 25520 } 25521 this.buffer = nextByte; 25522 this.bufferLength = 8; 25523 return true; 25524 } 25525 readBits(n) { 25526 let buffer = this.buffer; 25527 let bufferLength = this.bufferLength; 25528 if (n === 32) { 25529 if (bufferLength === 0) { 25530 return (this.stream.getByte() << 24 | this.stream.getByte() << 16 | this.stream.getByte() << 8 | this.stream.getByte()) >>> 0; 25531 } 25532 buffer = buffer << 24 | this.stream.getByte() << 16 | this.stream.getByte() << 8 | this.stream.getByte(); 25533 const nextByte = this.stream.getByte(); 25534 this.buffer = nextByte & (1 << bufferLength) - 1; 25535 return (buffer << 8 - bufferLength | (nextByte & 0xff) >> bufferLength) >>> 0; 25536 } 25537 if (n === 8 && bufferLength === 0) { 25538 return this.stream.getByte(); 25539 } 25540 while (bufferLength < n) { 25541 buffer = buffer << 8 | this.stream.getByte(); 25542 bufferLength += 8; 25543 } 25544 bufferLength -= n; 25545 this.bufferLength = bufferLength; 25546 this.buffer = buffer & (1 << bufferLength) - 1; 25547 return buffer >> bufferLength; 25548 } 25549 align() { 25550 this.buffer = 0; 25551 this.bufferLength = 0; 25552 } 25553 readFlag() { 25554 return this.readBits(this.context.bitsPerFlag); 25555 } 25556 readCoordinate() { 25557 const bitsPerCoordinate = this.context.bitsPerCoordinate; 25558 const xi = this.readBits(bitsPerCoordinate); 25559 const yi = this.readBits(bitsPerCoordinate); 25560 const decode = this.context.decode; 25561 const scale = bitsPerCoordinate < 32 ? 1 / ((1 << bitsPerCoordinate) - 1) : 2.3283064365386963e-10; 25562 return [xi * scale * (decode[1] - decode[0]) + decode[0], yi * scale * (decode[3] - decode[2]) + decode[2]]; 25563 } 25564 readComponents() { 25565 const numComps = this.context.numComps; 25566 const bitsPerComponent = this.context.bitsPerComponent; 25567 const scale = bitsPerComponent < 32 ? 1 / ((1 << bitsPerComponent) - 1) : 2.3283064365386963e-10; 25568 const decode = this.context.decode; 25569 const components = this.tmpCompsBuf; 25570 for (let i = 0, j = 4; i < numComps; i++, j += 2) { 25571 const ci = this.readBits(bitsPerComponent); 25572 components[i] = ci * scale * (decode[j + 1] - decode[j]) + decode[j]; 25573 } 25574 const color = this.tmpCsCompsBuf; 25575 if (this.context.colorFn) { 25576 this.context.colorFn(components, 0, color, 0); 25577 } 25578 return this.context.colorSpace.getRgb(color, 0); 25579 } 25580} 25581let bCache = Object.create(null); 25582function buildB(count) { 25583 const lut = []; 25584 for (let i = 0; i <= count; i++) { 25585 const t = i / count, 25586 t_ = 1 - t; 25587 lut.push(new Float32Array([t_ ** 3, 3 * t * t_ ** 2, 3 * t ** 2 * t_, t ** 3])); 25588 } 25589 return lut; 25590} 25591function getB(count) { 25592 return bCache[count] ||= buildB(count); 25593} 25594function clearPatternCaches() { 25595 bCache = Object.create(null); 25596} 25597class MeshShading extends BaseShading { 25598 static MIN_SPLIT_PATCH_CHUNKS_AMOUNT = 3; 25599 static MAX_SPLIT_PATCH_CHUNKS_AMOUNT = 20; 25600 static TRIANGLE_DENSITY = 20; 25601 constructor(stream, xref, resources, pdfFunctionFactory, localColorSpaceCache) { 25602 super(); 25603 if (!(stream instanceof BaseStream)) { 25604 throw new FormatError("Mesh data is not a stream"); 25605 } 25606 const dict = stream.dict; 25607 this.shadingType = dict.get("ShadingType"); 25608 this.bbox = lookupNormalRect(dict.getArray("BBox"), null); 25609 const cs = ColorSpace.parse({ 25610 cs: dict.getRaw("CS") || dict.getRaw("ColorSpace"), 25611 xref, 25612 resources, 25613 pdfFunctionFactory, 25614 localColorSpaceCache 25615 });
25616 this.background = dict.has("Background") ? cs.getRgb(dict.get("Background"), 0) : null; 25617 const fnObj = dict.getRaw("Function"); 25618 const fn = fnObj ? pdfFunctionFactory.createFromArray(fnObj
vendor: 11,533 bytes, lines 25618-25978
25618) : null; 25619 this.coords = []; 25620 this.colors = []; 25621 this.figures = []; 25622 const decodeContext = { 25623 bitsPerCoordinate: dict.get("BitsPerCoordinate"), 25624 bitsPerComponent: dict.get("BitsPerComponent"), 25625 bitsPerFlag: dict.get("BitsPerFlag"), 25626 decode: dict.getArray("Decode"), 25627 colorFn: fn, 25628 colorSpace: cs, 25629 numComps: fn ? 1 : cs.numComps 25630 }; 25631 const reader = new MeshStreamReader(stream, decodeContext); 25632 let patchMesh = false; 25633 switch (this.shadingType) { 25634 case ShadingType.FREE_FORM_MESH: 25635 this._decodeType4Shading(reader); 25636 break; 25637 case ShadingType.LATTICE_FORM_MESH: 25638 const verticesPerRow = dict.get("VerticesPerRow") | 0; 25639 if (verticesPerRow < 2) { 25640 throw new FormatError("Invalid VerticesPerRow"); 25641 } 25642 this._decodeType5Shading(reader, verticesPerRow); 25643 break; 25644 case ShadingType.COONS_PATCH_MESH: 25645 this._decodeType6Shading(reader); 25646 patchMesh = true; 25647 break; 25648 case ShadingType.TENSOR_PATCH_MESH: 25649 this._decodeType7Shading(reader); 25650 patchMesh = true; 25651 break; 25652 default: 25653 unreachable("Unsupported mesh type."); 25654 break; 25655 } 25656 if (patchMesh) { 25657 this._updateBounds(); 25658 for (let i = 0, ii = this.figures.length; i < ii; i++) { 25659 this._buildFigureFromPatch(i); 25660 } 25661 } 25662 this._updateBounds(); 25663 this._packData(); 25664 } 25665 _decodeType4Shading(reader) { 25666 const coords = this.coords; 25667 const colors = this.colors; 25668 const operators = []; 25669 const ps = []; 25670 let verticesLeft = 0; 25671 while (reader.hasData) { 25672 const f = reader.readFlag(); 25673 const coord = reader.readCoordinate(); 25674 const color = reader.readComponents(); 25675 if (verticesLeft === 0) { 25676 if (!(0 <= f && f <= 2)) { 25677 throw new FormatError("Unknown type4 flag"); 25678 } 25679 switch (f) { 25680 case 0: 25681 verticesLeft = 3; 25682 break; 25683 case 1: 25684 ps.push(ps.at(-2), ps.at(-1)); 25685 verticesLeft = 1; 25686 break; 25687 case 2: 25688 ps.push(ps.at(-3), ps.at(-1)); 25689 verticesLeft = 1; 25690 break; 25691 } 25692 operators.push(f); 25693 } 25694 ps.push(coords.length); 25695 coords.push(coord); 25696 colors.push(color); 25697 verticesLeft--; 25698 reader.align(); 25699 } 25700 this.figures.push({ 25701 type: "triangles", 25702 coords: new Int32Array(ps), 25703 colors: new Int32Array(ps) 25704 }); 25705 } 25706 _decodeType5Shading(reader, verticesPerRow) { 25707 const coords = this.coords; 25708 const colors = this.colors; 25709 const ps = []; 25710 while (reader.hasData) { 25711 const coord = reader.readCoordinate(); 25712 const color = reader.readComponents(); 25713 ps.push(coords.length); 25714 coords.push(coord); 25715 colors.push(color); 25716 } 25717 this.figures.push({ 25718 type: "lattice", 25719 coords: new Int32Array(ps), 25720 colors: new Int32Array(ps), 25721 verticesPerRow 25722 }); 25723 } 25724 _decodeType6Shading(reader) { 25725 const coords = this.coords; 25726 const colors = this.colors; 25727 const ps = new Int32Array(16); 25728 const cs = new Int32Array(4); 25729 while (reader.hasData) { 25730 const f = reader.readFlag(); 25731 if (!(0 <= f && f <= 3)) { 25732 throw new FormatError("Unknown type6 flag"); 25733 } 25734 const pi = coords.length; 25735 for (let i = 0, ii = f !== 0 ? 8 : 12; i < ii; i++) { 25736 coords.push(reader.readCoordinate()); 25737 } 25738 const ci = colors.length; 25739 for (let i = 0, ii = f !== 0 ? 2 : 4; i < ii; i++) { 25740 colors.push(reader.readComponents()); 25741 } 25742 let tmp1, tmp2, tmp3, tmp4; 25743 switch (f) { 25744 case 0: 25745 ps[12] = pi + 3; 25746 ps[13] = pi + 4; 25747 ps[14] = pi + 5; 25748 ps[15] = pi + 6; 25749 ps[8] = pi + 2; 25750 ps[11] = pi + 7; 25751 ps[4] = pi + 1; 25752 ps[7] = pi + 8; 25753 ps[0] = pi; 25754 ps[1] = pi + 11; 25755 ps[2] = pi + 10; 25756 ps[3] = pi + 9; 25757 cs[2] = ci + 1; 25758 cs[3] = ci + 2; 25759 cs[0] = ci; 25760 cs[1] = ci + 3; 25761 break; 25762 case 1: 25763 tmp1 = ps[12]; 25764 tmp2 = ps[13]; 25765 tmp3 = ps[14]; 25766 tmp4 = ps[15]; 25767 ps[12] = tmp4; 25768 ps[13] = pi + 0; 25769 ps[14] = pi + 1; 25770 ps[15] = pi + 2; 25771 ps[8] = tmp3; 25772 ps[11] = pi + 3; 25773 ps[4] = tmp2; 25774 ps[7] = pi + 4; 25775 ps[0] = tmp1; 25776 ps[1] = pi + 7; 25777 ps[2] = pi + 6; 25778 ps[3] = pi + 5; 25779 tmp1 = cs[2]; 25780 tmp2 = cs[3]; 25781 cs[2] = tmp2; 25782 cs[3] = ci; 25783 cs[0] = tmp1; 25784 cs[1] = ci + 1; 25785 break; 25786 case 2: 25787 tmp1 = ps[15]; 25788 tmp2 = ps[11]; 25789 ps[12] = ps[3]; 25790 ps[13] = pi + 0; 25791 ps[14] = pi + 1; 25792 ps[15] = pi + 2; 25793 ps[8] = ps[7]; 25794 ps[11] = pi + 3; 25795 ps[4] = tmp2; 25796 ps[7] = pi + 4; 25797 ps[0] = tmp1; 25798 ps[1] = pi + 7; 25799 ps[2] = pi + 6; 25800 ps[3] = pi + 5; 25801 tmp1 = cs[3]; 25802 cs[2] = cs[1]; 25803 cs[3] = ci; 25804 cs[0] = tmp1; 25805 cs[1] = ci + 1; 25806 break; 25807 case 3: 25808 ps[12] = ps[0]; 25809 ps[13] = pi + 0; 25810 ps[14] = pi + 1; 25811 ps[15] = pi + 2; 25812 ps[8] = ps[1]; 25813 ps[11] = pi + 3; 25814 ps[4] = ps[2]; 25815 ps[7] = pi + 4; 25816 ps[0] = ps[3]; 25817 ps[1] = pi + 7; 25818 ps[2] = pi + 6; 25819 ps[3] = pi + 5; 25820 cs[2] = cs[0]; 25821 cs[3] = ci; 25822 cs[0] = cs[1]; 25823 cs[1] = ci + 1; 25824 break; 25825 } 25826 ps[5] = coords.length; 25827 coords.push([(-4 * coords[ps[0]][0] - coords[ps[15]][0] + 6 * (coords[ps[4]][0] + coords[ps[1]][0]) - 2 * (coords[ps[12]][0] + coords[ps[3]][0]) + 3 * (coords[ps[13]][0] + coords[ps[7]][0])) / 9, (-4 * coords[ps[0]][1] - coords[ps[15]][1] + 6 * (coords[ps[4]][1] + coords[ps[1]][1]) - 2 * (coords[ps[12]][1] + coords[ps[3]][1]) + 3 * (coords[ps[13]][1] + coords[ps[7]][1])) / 9]); 25828 ps[6] = coords.length; 25829 coords.push([(-4 * coords[ps[3]][0] - coords[ps[12]][0] + 6 * (coords[ps[2]][0] + coords[ps[7]][0]) - 2 * (coords[ps[0]][0] + coords[ps[15]][0]) + 3 * (coords[ps[4]][0] + coords[ps[14]][0])) / 9, (-4 * coords[ps[3]][1] - coords[ps[12]][1] + 6 * (coords[ps[2]][1] + coords[ps[7]][1]) - 2 * (coords[ps[0]][1] + coords[ps[15]][1]) + 3 * (coords[ps[4]][1] + coords[ps[14]][1])) / 9]); 25830 ps[9] = coords.length; 25831 coords.push([(-4 * coords[ps[12]][0] - coords[ps[3]][0] + 6 * (coords[ps[8]][0] + coords[ps[13]][0]) - 2 * (coords[ps[0]][0] + coords[ps[15]][0]) + 3 * (coords[ps[11]][0] + coords[ps[1]][0])) / 9, (-4 * coords[ps[12]][1] - coords[ps[3]][1] + 6 * (coords[ps[8]][1] + coords[ps[13]][1]) - 2 * (coords[ps[0]][1] + coords[ps[15]][1]) + 3 * (coords[ps[11]][1] + coords[ps[1]][1])) / 9]); 25832 ps[10] = coords.length; 25833 coords.push([(-4 * coords[ps[15]][0] - coords[ps[0]][0] + 6 * (coords[ps[11]][0] + coords[ps[14]][0]) - 2 * (coords[ps[12]][0] + coords[ps[3]][0]) + 3 * (coords[ps[2]][0] + coords[ps[8]][0])) / 9, (-4 * coords[ps[15]][1] - coords[ps[0]][1] + 6 * (coords[ps[11]][1] + coords[ps[14]][1]) - 2 * (coords[ps[12]][1] + coords[ps[3]][1]) + 3 * (coords[ps[2]][1] + coords[ps[8]][1])) / 9]); 25834 this.figures.push({ 25835 type: "patch", 25836 coords: new Int32Array(ps), 25837 colors: new Int32Array(cs) 25838 }); 25839 } 25840 } 25841 _decodeType7Shading(reader) { 25842 const coords = this.coords; 25843 const colors = this.colors; 25844 const ps = new Int32Array(16); 25845 const cs = new Int32Array(4); 25846 while (reader.hasData) { 25847 const f = reader.readFlag(); 25848 if (!(0 <= f && f <= 3)) { 25849 throw new FormatError("Unknown type7 flag"); 25850 } 25851 const pi = coords.length; 25852 for (let i = 0, ii = f !== 0 ? 12 : 16; i < ii; i++) { 25853 coords.push(reader.readCoordinate()); 25854 } 25855 const ci = colors.length; 25856 for (let i = 0, ii = f !== 0 ? 2 : 4; i < ii; i++) { 25857 colors.push(reader.readComponents()); 25858 } 25859 let tmp1, tmp2, tmp3, tmp4; 25860 switch (f) { 25861 case 0: 25862 ps[12] = pi + 3; 25863 ps[13] = pi + 4; 25864 ps[14] = pi + 5; 25865 ps[15] = pi + 6; 25866 ps[8] = pi + 2; 25867 ps[9] = pi + 13; 25868 ps[10] = pi + 14; 25869 ps[11] = pi + 7; 25870 ps[4] = pi + 1; 25871 ps[5] = pi + 12; 25872 ps[6] = pi + 15; 25873 ps[7] = pi + 8; 25874 ps[0] = pi; 25875 ps[1] = pi + 11; 25876 ps[2] = pi + 10; 25877 ps[3] = pi + 9; 25878 cs[2] = ci + 1; 25879 cs[3] = ci + 2; 25880 cs[0] = ci; 25881 cs[1] = ci + 3; 25882 break; 25883 case 1: 25884 tmp1 = ps[12]; 25885 tmp2 = ps[13]; 25886 tmp3 = ps[14]; 25887 tmp4 = ps[15]; 25888 ps[12] = tmp4; 25889 ps[13] = pi + 0; 25890 ps[14] = pi + 1; 25891 ps[15] = pi + 2; 25892 ps[8] = tmp3; 25893 ps[9] = pi + 9; 25894 ps[10] = pi + 10; 25895 ps[11] = pi + 3; 25896 ps[4] = tmp2; 25897 ps[5] = pi + 8; 25898 ps[6] = pi + 11; 25899 ps[7] = pi + 4; 25900 ps[0] = tmp1; 25901 ps[1] = pi + 7; 25902 ps[2] = pi + 6; 25903 ps[3] = pi + 5; 25904 tmp1 = cs[2]; 25905 tmp2 = cs[3]; 25906 cs[2] = tmp2; 25907 cs[3] = ci; 25908 cs[0] = tmp1; 25909 cs[1] = ci + 1; 25910 break; 25911 case 2: 25912 tmp1 = ps[15]; 25913 tmp2 = ps[11]; 25914 ps[12] = ps[3]; 25915 ps[13] = pi + 0; 25916 ps[14] = pi + 1; 25917 ps[15] = pi + 2; 25918 ps[8] = ps[7]; 25919 ps[9] = pi + 9; 25920 ps[10] = pi + 10; 25921 ps[11] = pi + 3; 25922 ps[4] = tmp2; 25923 ps[5] = pi + 8; 25924 ps[6] = pi + 11; 25925 ps[7] = pi + 4; 25926 ps[0] = tmp1; 25927 ps[1] = pi + 7; 25928 ps[2] = pi + 6; 25929 ps[3] = pi + 5; 25930 tmp1 = cs[3]; 25931 cs[2] = cs[1]; 25932 cs[3] = ci; 25933 cs[0] = tmp1; 25934 cs[1] = ci + 1; 25935 break; 25936 case 3: 25937 ps[12] = ps[0]; 25938 ps[13] = pi + 0; 25939 ps[14] = pi + 1; 25940 ps[15] = pi + 2; 25941 ps[8] = ps[1]; 25942 ps[9] = pi + 9; 25943 ps[10] = pi + 10; 25944 ps[11] = pi + 3; 25945 ps[4] = ps[2]; 25946 ps[5] = pi + 8; 25947 ps[6] = pi + 11; 25948 ps[7] = pi + 4; 25949 ps[0] = ps[3]; 25950 ps[1] = pi + 7; 25951 ps[2] = pi + 6; 25952 ps[3] = pi + 5; 25953 cs[2] = cs[0]; 25954 cs[3] = ci; 25955 cs[0] = cs[1]; 25956 cs[1] = ci + 1; 25957 break; 25958 } 25959 this.figures.push({ 25960 type: "patch", 25961 coords: new Int32Array(ps), 25962 colors: new Int32Array(cs) 25963 }); 25964 } 25965 } 25966 _buildFigureFromPatch(index) { 25967 const figure = this.figures[index]; 25968 assert(figure.type === "patch", "Unexpected patch mesh figure"); 25969 const coords = this.coords, 25970 colors = this.colors; 25971 const pi = figure.coords; 25972 const ci = figure.colors; 25973 const figureMinX = Math.min(coords[pi[0]][0], coords[pi[3]][0], coords[pi[12]][0], coords[pi[15]][0]); 25974 const figureMinY = Math.min(coords[pi[0]][1], coords[pi[3]][1], coords[pi[12]][1], coords[pi[15]][1]); 25975 const figureMaxX = Math.max(coords[pi[0]][0], coords[pi[3]][0], coords[pi[12]][0], coords[pi[15]][0]); 25976 const figureMaxY = Math.max(coords[pi[0]][1], coords[pi[3]][1], coords[pi[12]][1], coords[pi[15]][1]); 25977 let splitXBy = Math.ceil((figureMaxX - figureMinX) * MeshShading.TRIANGLE_DENSITY / (this.bounds[2] - this.bounds[0])); 25978 splitXBy = Math
25978.max(MeshShading.MIN_SPLIT_PATCH_CHUNKS_AMOUNT, Math.min(MeshShading.MAX_SPLIT_PATCH_CHUNKS_AMOUNT, splitXBy)); 25979 let splitYBy = Math.ceil((figureMaxY - figureMinY) * MeshShading.TRIANGLE_DENSITY / (this.bounds[3] - this.bounds[1])); 25980 splitYBy = Math.max(MeshShading.MIN_SPLIT_PATCH_CHUNKS_AMOUNT, Math.min(MeshShading.MAX_SPLIT_PATCH_CHUNKS_AMOUNT, splitYBy)
vendor: 8,344 bytes, lines 25980-26125
25980); 25981 const verticesPerRow = splitXBy + 1; 25982 const figureCoords = new Int32Array((splitYBy + 1) * verticesPerRow); 25983 const figureColors = new Int32Array((splitYBy + 1) * verticesPerRow); 25984 let k = 0; 25985 const cl = new Uint8Array(3), 25986 cr = new Uint8Array(3); 25987 const c0 = colors[ci[0]], 25988 c1 = colors[ci[1]], 25989 c2 = colors[ci[2]], 25990 c3 = colors[ci[3]]; 25991 const bRow = getB(splitYBy), 25992 bCol = getB(splitXBy); 25993 for (let row = 0; row <= splitYBy; row++) { 25994 cl[0] = (c0[0] * (splitYBy - row) + c2[0] * row) / splitYBy | 0; 25995 cl[1] = (c0[1] * (splitYBy - row) + c2[1] * row) / splitYBy | 0; 25996 cl[2] = (c0[2] * (splitYBy - row) + c2[2] * row) / splitYBy | 0; 25997 cr[0] = (c1[0] * (splitYBy - row) + c3[0] * row) / splitYBy | 0; 25998 cr[1] = (c1[1] * (splitYBy - row) + c3[1] * row) / splitYBy | 0; 25999 cr[2] = (c1[2] * (splitYBy - row) + c3[2] * row) / splitYBy | 0; 26000 for (let col = 0; col <= splitXBy; col++, k++) { 26001 if ((row === 0 || row === splitYBy) && (col === 0 || col === splitXBy)) { 26002 continue; 26003 } 26004 let x = 0, 26005 y = 0; 26006 let q = 0; 26007 for (let i = 0; i <= 3; i++) { 26008 for (let j = 0; j <= 3; j++, q++) { 26009 const m = bRow[row][i] * bCol[col][j]; 26010 x += coords[pi[q]][0] * m; 26011 y += coords[pi[q]][1] * m; 26012 } 26013 } 26014 figureCoords[k] = coords.length; 26015 coords.push([x, y]); 26016 figureColors[k] = colors.length; 26017 const newColor = new Uint8Array(3); 26018 newColor[0] = (cl[0] * (splitXBy - col) + cr[0] * col) / splitXBy | 0; 26019 newColor[1] = (cl[1] * (splitXBy - col) + cr[1] * col) / splitXBy | 0; 26020 newColor[2] = (cl[2] * (splitXBy - col) + cr[2] * col) / splitXBy | 0; 26021 colors.push(newColor); 26022 } 26023 } 26024 figureCoords[0] = pi[0]; 26025 figureColors[0] = ci[0]; 26026 figureCoords[splitXBy] = pi[3]; 26027 figureColors[splitXBy] = ci[1]; 26028 figureCoords[verticesPerRow * splitYBy] = pi[12]; 26029 figureColors[verticesPerRow * splitYBy] = ci[2]; 26030 figureCoords[verticesPerRow * splitYBy + splitXBy] = pi[15]; 26031 figureColors[verticesPerRow * splitYBy + splitXBy] = ci[3]; 26032 this.figures[index] = { 26033 type: "lattice", 26034 coords: figureCoords, 26035 colors: figureColors, 26036 verticesPerRow 26037 }; 26038 } 26039 _updateBounds() { 26040 let minX = this.coords[0][0], 26041 minY = this.coords[0][1], 26042 maxX = minX, 26043 maxY = minY; 26044 for (let i = 1, ii = this.coords.length; i < ii; i++) { 26045 const x = this.coords[i][0], 26046 y = this.coords[i][1]; 26047 minX = minX > x ? x : minX; 26048 minY = minY > y ? y : minY; 26049 maxX = maxX < x ? x : maxX; 26050 maxY = maxY < y ? y : maxY; 26051 } 26052 this.bounds = [minX, minY, maxX, maxY]; 26053 } 26054 _packData() { 26055 let i, ii, j, jj; 26056 const coords = this.coords; 26057 const coordsPacked = new Float32Array(coords.length * 2); 26058 for (i = 0, j = 0, ii = coords.length; i < ii; i++) { 26059 const xy = coords[i]; 26060 coordsPacked[j++] = xy[0]; 26061 coordsPacked[j++] = xy[1]; 26062 } 26063 this.coords = coordsPacked; 26064 const colors = this.colors; 26065 const colorsPacked = new Uint8Array(colors.length * 3); 26066 for (i = 0, j = 0, ii = colors.length; i < ii; i++) { 26067 const c = colors[i]; 26068 colorsPacked[j++] = c[0]; 26069 colorsPacked[j++] = c[1]; 26070 colorsPacked[j++] = c[2]; 26071 } 26072 this.colors = colorsPacked; 26073 const figures = this.figures; 26074 for (i = 0, ii = figures.length; i < ii; i++) { 26075 const figure = figures[i], 26076 ps = figure.coords, 26077 cs = figure.colors; 26078 for (j = 0, jj = ps.length; j < jj; j++) { 26079 ps[j] *= 2; 26080 cs[j] *= 3; 26081 } 26082 } 26083 } 26084 getIR() { 26085 const { 26086 bounds 26087 } = this; 26088 if (bounds[2] - bounds[0] === 0 || bounds[3] - bounds[1] === 0) { 26089 throw new FormatError(`Invalid MeshShading bounds: [${bounds}].`); 26090 } 26091 return ["Mesh", this.shadingType, this.coords, this.colors, this.figures, bounds, this.bbox, this.background]; 26092 } 26093} 26094class DummyShading extends BaseShading { 26095 getIR() { 26096 return ["Dummy"]; 26097 } 26098} 26099function getTilingPatternIR(operatorList, dict, color) { 26100 const matrix = lookupMatrix(dict.getArray("Matrix"), IDENTITY_MATRIX); 26101 const bbox = lookupNormalRect(dict.getArray("BBox"), null); 26102 if (!bbox || bbox[2] - bbox[0] === 0 || bbox[3] - bbox[1] === 0) { 26103 throw new FormatError(`Invalid getTilingPatternIR /BBox array.`); 26104 } 26105 const xstep = dict.get("XStep"); 26106 if (typeof xstep !== "number") { 26107 throw new FormatError(`Invalid getTilingPatternIR /XStep value.`); 26108 } 26109 const ystep = dict.get("YStep"); 26110 if (typeof ystep !== "number") { 26111 throw new FormatError(`Invalid getTilingPatternIR /YStep value.`); 26112 } 26113 const paintType = dict.get("PaintType"); 26114 if (!Number.isInteger(paintType)) { 26115 throw new FormatError(`Invalid getTilingPatternIR /PaintType value.`); 26116 } 26117 const tilingType = dict.get("TilingType"); 26118 if (!Number.isInteger(tilingType)) { 26119 throw new FormatError(`Invalid getTilingPatternIR /TilingType value.`); 26120 } 26121 return ["TilingPattern", color, operatorList, matrix, bbox, xstep, ystep, paintType, tilingType]; 26122} 26123 26124;// ./src/core/calibri_factors.js 26125const CalibriBoldFactors = [1.3877, 1, 1, 1, 0.97801, 0.92482, 0.89552, 0.91133, 0.81988, 0.97566, 0.98152, 0.93548, 0.93548, 1.2798, 0.85284, 0.92794, 1, 0.96134, 1.54657, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.82845, 0.82845, 0.85284, 0.85284, 0.85284, 0.75859, 0.92138, 0.83908, 0.7762, 0.73293, 0.87289, 0.73133, 0.7514, 0.81921, 0.87356, 0.95958, 0.59526, 0.75727, 0.69225, 1.04924, 0.9121, 0.86943, 0.79795, 0.88198, 0.77958, 0.70864, 0.81055, 0.90399, 0.88653, 0.96017, 0.82577, 0.77892, 0.78257, 0.97507, 1.54657, 0.97507, 0.85284, 0.89552, 0.90176, 0.88762, 0.8785, 0.75241, 0.8785, 0.90518, 0.95015, 0.77618, 0.8785, 0.88401, 0.91916, 0.86304, 0.88401, 0.91488, 0.8785, 0.8801, 0.8785, 0.8785, 0.91343, 0.7173, 1.04106, 0.8785, 0.85075, 0.95794, 0.82616, 0.85162, 0.79492, 0.88331, 1.69808, 0.88331, 0.85284, 0.97801, 0.89552, 0.91133, 0.89552, 0.91133, 1.7801, 0.89552, 1.24487, 1.13254, 1.12401, 0.96839, 0.85284, 0.68787, 0.70645, 0.85592, 0.90747, 1.01466, 1.0088, 0.90323, 1, 1.07463, 1, 0.91056, 0.75806, 1.19118, 0.96839, 0.78864, 0.82845, 0.84133, 0.75859, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.77539, 0.73293, 0.73133, 0.73133, 0.73133, 0.73133, 0.95958, 0.95958, 0.95958, 0.95958, 0.88506, 0.9121, 0.86943, 0.86943, 0.86943, 0.86943, 0.86943, 0.85284, 0.87508, 0.90399, 0.90399, 0.90399, 0.90399, 0.77892, 0.79795, 0.90807, 0.88762, 0.88762, 0.88762, 0.88762, 0.88762, 0.88762, 0.8715, 0.75241, 0.90518, 0.90518, 0.90518, 0.90518, 0.88401, 0.88401, 0.88401, 0.88401, 0.8785, 0.8785, 0.8801, 0.8801, 0.8801, 0.8801, 0.8801, 0.90747, 0.89049, 0.8785, 0.8785, 0.8785, 0.8785, 0.85162, 0.8785, 0.85162, 0.83908, 0.88762, 0.83908, 0.88762, 0.83908, 0.88762, 0.73293, 0.75241, 0.73293, 0.75241, 0.73293, 0.75241, 0.73293, 0.75241, 0.87289, 0.83016, 0.88506, 0.93125, 0.73133, 0.90518, 0.73133, 0.90518, 0.73133, 0.90518, 0.73133, 0.90518, 0.73133, 0.90518, 0.81921, 0.77618, 0.81921, 0.77618, 0.81921, 0.77618, 1, 1, 0.87356, 0.8785, 0.91075, 0.89608, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.76229, 0.90167, 0.59526, 0.91916, 1, 1, 0.86304, 0.69225, 0.88401, 1, 1, 0.70424, 0.79468, 0.91926, 0.88175, 0.70823, 0.94903, 0.9121, 0.8785, 1, 1, 0.9121, 0.8785, 0.87802, 0.88656, 0.8785, 0.86943, 0.8801, 0.86943, 0.8801, 0.86943, 0.8801, 0.87402, 0.89291, 0.77958, 0.91343, 1, 1, 0.77958, 0.91343, 0.70864, 0.7173, 0.70864, 0.7173, 0.70864, 0.7173, 0.70864, 0.7173, 1, 1, 0.81055, 0.75841, 0.81055, 1.06452, 0.90399, 0.8785, 0.90399, 0.8785, 0.90399, 0.8785, 0.90399, 0.8785, 0.90399, 0.8785, 0.90399, 0.8785, 0.96017, 0.95794, 0.77892, 0.85162, 0.77892, 0.78257, 0.79492, 0.78257, 0.79492, 0.78257, 0.79492, 0.9297, 0.56892, 0.83908, 0.88762, 0.77539, 0.8715, 0.87508, 0.89049, 1, 1, 0.81055, 1.04106, 1.20528, 1.20528, 1, 1.15543, 0.70674, 0.98387, 0.94721, 1.33431, 1.45894, 0.95161, 1.06303, 0.83908, 0.80352, 0.57184, 0.6965, 0.56289, 0.82001, 0.56029, 0.81235, 1.02988, 0.83908, 0.7762, 0.68156, 0.80367, 0.73133, 0.78257, 0.87356, 0.86943, 0.95958, 0.75727, 0.89019, 1.04924, 0.9121, 0.7648, 0.86943, 0.87356, 0.79795, 0.78275, 0.81055, 0.77892,
vendor: 2,277 bytes, lines 26125-26130
261250.9762, 0.82577, 0.99819, 0.84896, 0.95958, 0.77892, 0.96108, 1.01407, 0.89049, 1.02988, 0.94211, 0.96108, 0.8936, 0.84021, 0.87842, 0.96399, 0.79109, 0.89049, 1.00813, 1.02988, 0.86077, 0.87445, 0.92099, 0.84723, 0.86513, 0.8801, 0.75638, 0.85714, 0.78216, 0.79586, 0.87965, 0.94211, 0.97747, 0.78287, 0.97926, 0.84971, 1.02988, 0.94211, 0.8801, 0.94211, 0.84971, 0.73133, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90264, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90518, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90548, 1, 1, 1, 1, 1, 1, 0.96017, 0.95794, 0.96017, 0.95794, 0.96017, 0.95794, 0.77892, 0.85162, 1, 1, 0.89552, 0.90527, 1, 0.90363, 0.92794, 0.92794, 0.92794, 0.92794, 0.87012, 0.87012, 0.87012, 0.89552, 0.89552, 1.42259, 0.71143, 1.06152, 1, 1, 1.03372, 1.03372, 0.97171, 1.4956, 2.2807, 0.93835, 0.83406, 0.91133, 0.84107, 0.91133, 1, 1, 1, 0.72021, 1, 1.23108, 0.83489, 0.88525, 0.88525, 0.81499, 0.90527, 1.81055, 0.90527, 1.81055, 1.31006, 1.53711, 0.94434, 1.08696, 1, 0.95018, 0.77192, 0.85284, 0.90747, 1.17534, 0.69825, 0.9716, 1.37077, 0.90747, 0.90747, 0.85356, 0.90747, 0.90747, 1.44947, 0.85284, 0.8941, 0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 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, 0.99862, 0.99862, 1, 1, 1, 1, 1, 1.08004, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90727, 0.90727, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26126const CalibriBoldMetrics = { 26127 lineHeight: 1.2207, 26128 lineGap: 0.2207 26129}; 26130const CalibriBoldItalicFactors = [1.3877, 1, 1, 1, 0.97801, 0.92482, 0.89552, 0.91133, 0.81988, 0.97566, 0.98152, 0.93548, 0.93548, 1.2798, 0.85284, 0.92794, 1, 0.96134, 1.56239, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.82845, 0.82845, 0.85284, 0.85284, 0.85284, 0.75859, 0.92138, 0.83908, 0.7762, 0.71805, 0.87289, 0.73133, 0.7514, 0.81921, 0.87356, 0.95958, 0.59526, 0.75727, 0.69225, 1.04924, 0.90872, 0.85938, 0.79795, 0.87068, 0.77958, 0.69766, 0.81055, 0.90399, 0.88653, 0.96068, 0.82577, 0.77892,
vendor: 1,685 bytes, line 26130
261300.78257, 0.97507, 1.529, 0.97507, 0.85284, 0.89552, 0.90176, 0.94908, 0.86411, 0.74012, 0.86411, 0.88323, 0.95015, 0.86411, 0.86331, 0.88401, 0.91916, 0.86304, 0.88401, 0.9039, 0.86331, 0.86331, 0.86411, 0.86411, 0.90464, 0.70852, 1.04106, 0.86331, 0.84372, 0.95794, 0.82616, 0.84548, 0.79492, 0.88331, 1.69808, 0.88331, 0.85284, 0.97801, 0.89552, 0.91133, 0.89552, 0.91133, 1.7801, 0.89552, 1.24487, 1.13254, 1.19129, 0.96839, 0.85284, 0.68787, 0.70645, 0.85592, 0.90747, 1.01466, 1.0088, 0.90323, 1, 1.07463, 1, 0.91056, 0.75806, 1.19118, 0.96839, 0.78864, 0.82845, 0.84133, 0.75859, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.83908, 0.77539, 0.71805, 0.73133, 0.73133, 0.73133, 0.73133, 0.95958, 0.95958, 0.95958, 0.95958, 0.88506, 0.90872, 0.85938, 0.85938, 0.85938, 0.85938, 0.85938, 0.85284, 0.87068, 0.90399, 0.90399, 0.90399, 0.90399, 0.77892, 0.79795, 0.90807, 0.94908, 0.94908, 0.94908, 0.94908, 0.94908, 0.94908, 0.85887, 0.74012, 0.88323, 0.88323, 0.88323, 0.88323, 0.88401, 0.88401, 0.88401, 0.88401, 0.8785, 0.86331, 0.86331, 0.86331, 0.86331, 0.86331, 0.86331, 0.90747, 0.89049, 0.86331, 0.86331, 0.86331, 0.86331, 0.84548, 0.86411, 0.84548, 0.83908, 0.94908, 0.83908, 0.94908, 0.83908, 0.94908, 0.71805, 0.74012, 0.71805, 0.74012, 0.71805, 0.74012, 0.71805, 0.74012, 0.87289, 0.79538, 0.88506, 0.92726, 0.73133, 0.88323, 0.73133, 0.88323, 0.73133, 0.88323, 0.73133, 0.88323, 0.73133, 0.88323, 0.81921, 0.86411, 0.81921, 0.86411, 0.81921, 0.86411, 1, 1, 0.87356, 0.86331, 0.91075, 0.8777, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.95958, 0.88401, 0.76467, 0.90167, 0.59526, 0.91916, 1, 1, 0.86304, 0.69225, 0.88401, 1, 1, 0.70424, 0.7
vendor: 3,143 bytes, lines 26130-26135
261307312, 0.91926, 0.88175, 0.70823, 0.94903, 0.90872, 0.86331, 1, 1, 0.90872, 0.86331, 0.86906, 0.88116, 0.86331, 0.85938, 0.86331, 0.85938, 0.86331, 0.85938, 0.86331, 0.87402, 0.86549, 0.77958, 0.90464, 1, 1, 0.77958, 0.90464, 0.69766, 0.70852, 0.69766, 0.70852, 0.69766, 0.70852, 0.69766, 0.70852, 1, 1, 0.81055, 0.75841, 0.81055, 1.06452, 0.90399, 0.86331, 0.90399, 0.86331, 0.90399, 0.86331, 0.90399, 0.86331, 0.90399, 0.86331, 0.90399, 0.86331, 0.96068, 0.95794, 0.77892, 0.84548, 0.77892, 0.78257, 0.79492, 0.78257, 0.79492, 0.78257, 0.79492, 0.9297, 0.56892, 0.83908, 0.94908, 0.77539, 0.85887, 0.87068, 0.89049, 1, 1, 0.81055, 1.04106, 1.20528, 1.20528, 1, 1.15543, 0.70088, 0.98387, 0.94721, 1.33431, 1.45894, 0.95161, 1.48387, 0.83908, 0.80352, 0.57118, 0.6965, 0.56347, 0.79179, 0.55853, 0.80346, 1.02988, 0.83908, 0.7762, 0.67174, 0.86036, 0.73133, 0.78257, 0.87356, 0.86441, 0.95958, 0.75727, 0.89019, 1.04924, 0.90872, 0.74889, 0.85938, 0.87891, 0.79795, 0.7957, 0.81055, 0.77892, 0.97447, 0.82577, 0.97466, 0.87179, 0.95958, 0.77892, 0.94252, 0.95612, 0.8753, 1.02988, 0.92733, 0.94252, 0.87411, 0.84021, 0.8728, 0.95612, 0.74081, 0.8753, 1.02189, 1.02988, 0.84814, 0.87445, 0.91822, 0.84723, 0.85668, 0.86331, 0.81344, 0.87581, 0.76422, 0.82046, 0.96057, 0.92733, 0.99375, 0.78022, 0.95452, 0.86015, 1.02988, 0.92733, 0.86331, 0.92733, 0.86015, 0.73133, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90631, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.88323, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.85174, 1, 1, 1, 1, 1, 1, 0.96068, 0.95794, 0.96068, 0.95794, 0.96068, 0.95794, 0.77892, 0.84548, 1, 1, 0.89552, 0.90527, 1, 0.90363, 0.92794, 0.92794, 0.92794, 0.89807, 0.87012, 0.87012, 0.87012, 0.89552, 0.89552, 1.42259, 0.71094, 1.06152, 1, 1, 1.03372, 1.03372, 0.97171, 1.4956, 2.2807, 0.92972, 0.83406, 0.91133, 0.83326, 0.91133, 1, 1, 1, 0.72021, 1, 1.23108, 0.83489, 0.88525, 0.88525, 0.81499, 0.90616, 1.81055, 0.90527, 1.81055, 1.3107, 1.53711, 0.94434, 1.08696, 1, 0.95018, 0.77192, 0.85284, 0.90747, 1.17534, 0.69825, 0.9716, 1.37077, 0.90747, 0.90747, 0.85356, 0.90747, 0.90747, 1.44947, 0.85284, 0.8941, 0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 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, 0.99862, 0.99862, 1, 1, 1, 1, 1, 1.08004, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90727, 0.90727, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26131const CalibriBoldItalicMetrics = { 26132 lineHeight: 1.2207, 26133 lineGap: 0.2207 26134}; 26135const CalibriItalicFactors = [1.3877, 1, 1, 1, 1.17223, 1.1293, 0.89552, 0.91133, 0.80395, 1.02269, 1.15601, 0.91056, 0.91056, 1.2798, 0.85284, 0.89807, 1, 0.90861, 1.39543, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.96309, 0.96309, 0.85284, 0.85284, 0.85284, 0.83319, 0.88071, 0.8675, 0.81552, 0.72346, 0.85193, 0.73206, 0.7522, 0.81105, 0.86275, 0.90685, 0.6377, 0.77892,
vendor: 3,657 bytes, line 26135
261350.75593, 1.02638, 0.89249, 0.84118, 0.77452, 0.85374, 0.75186, 0.67789, 0.79776, 0.88844, 0.85066, 0.94309, 0.77818, 0.7306, 0.76659, 1.10369, 1.38313, 1.10369, 1.06139, 0.89552, 0.8739, 0.9245, 0.9245, 0.83203, 0.9245, 0.85865, 1.09842, 0.9245, 0.9245, 1.03297, 1.07692, 0.90918, 1.03297, 0.94959, 0.9245, 0.92274, 0.9245, 0.9245, 1.02933, 0.77832, 1.20562, 0.9245, 0.8916, 0.98986, 0.86621, 0.89453, 0.79004, 0.94152, 1.77256, 0.94152, 0.85284, 0.97801, 0.89552, 0.91133, 0.89552, 0.91133, 1.91729, 0.89552, 1.17889, 1.13254, 1.16359, 0.92098, 0.85284, 0.68787, 0.71353, 0.84737, 0.90747, 1.0088, 1.0044, 0.87683, 1, 1.09091, 1, 0.92229, 0.739, 1.15642, 0.92098, 0.76288, 0.80504, 0.80972, 0.75859, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.76318, 0.72346, 0.73206, 0.73206, 0.73206, 0.73206, 0.90685, 0.90685, 0.90685, 0.90685, 0.86477, 0.89249, 0.84118, 0.84118, 0.84118, 0.84118, 0.84118, 0.85284, 0.84557, 0.88844, 0.88844, 0.88844, 0.88844, 0.7306, 0.77452, 0.86331, 0.9245, 0.9245, 0.9245, 0.9245, 0.9245, 0.9245, 0.84843, 0.83203, 0.85865, 0.85865, 0.85865, 0.85865, 0.82601, 0.82601, 0.82601, 0.82601, 0.94469, 0.9245, 0.92274, 0.92274, 0.92274, 0.92274, 0.92274, 0.90747, 0.86651, 0.9245, 0.9245, 0.9245, 0.9245, 0.89453, 0.9245, 0.89453, 0.8675, 0.9245, 0.8675, 0.9245, 0.8675, 0.9245, 0.72346, 0.83203, 0.72346, 0.83203, 0.72346, 0.83203, 0.72346, 0.83203, 0.85193, 0.8875, 0.86477, 0.99034, 0.73206, 0.85865, 0.73206, 0.85865, 0.73206, 0.85865, 0.73206, 0.85865, 0.73206, 0.85865, 0.81105, 0.9245, 0.81105, 0.9245, 0.81105, 0.9245, 1, 1, 0.86275, 0.9245, 0.90872, 0.93591, 0.90685, 0.82601, 0.90685, 0.82601, 0.90685, 0.82601, 0.90685, 1.03297, 0.90685, 0.82601, 0.77896, 1.05611, 0.6377, 1.07692, 1, 1, 0.90918, 0.75593, 1.03297, 1, 1, 0.76032, 0.9375, 0.98156, 0.93407, 0.77261, 1.11429, 0.89249, 0.9245, 1, 1, 0.89249, 0.9245, 0.92534, 0.86698, 0.9245, 0.84118, 0.92274, 0.84118, 0.92274, 0.84118, 0.92274, 0.8667, 0.86291, 0.75186, 1.02933, 1, 1, 0.75186, 1.02933, 0.67789, 0.77832, 0.67789, 0.77832, 0.67789, 0.77832, 0.67789, 0.77832, 1, 1, 0.79776, 0.97655, 0.79776, 1.23023, 0.88844, 0.9245, 0.88844, 0.9245, 0.88844, 0.9245, 0.88844, 0.9245, 0.88844, 0.9245, 0.88844, 0.9245, 0.94309, 0.98986, 0.7306, 0.89453, 0.7306, 0.76659, 0.79004, 0.76659, 0.79004, 0.76659, 0.79004, 1.09231, 0.54873, 0.8675, 0.9245, 0.76318, 0.84843, 0.84557, 0.86651, 1, 1, 0.79776, 1.20562, 1.18622, 1.18622, 1, 1.1437, 0.67009, 0.96334, 0.93695, 1.35191, 1.40909, 0.95161, 1.48387, 0.8675, 0.90861, 0.6192, 0.7363, 0.64824, 0.82411, 0.56321, 0.85696, 1.23516, 0.8675, 0.81552, 0.7286, 0.84134, 0.73206, 0.76659, 0.86275, 0.84369, 0.90685, 0.77892, 0.85871, 1.02638, 0.89249, 0.75828, 0.84118, 0.85984, 0.77452, 0.76466, 0.79776, 0.7306, 0.90782, 0.77818, 0.903, 0.87291, 0.90685, 0.7306, 0.99058, 1.03667, 0.94635, 1.23516, 0.9849, 0.99058, 0.92393, 0.8916, 0.942, 1.03667, 0.75026, 0.94635, 1.0297, 1.23516, 0.90918, 0.94048, 0.98217, 0.89746, 0.84153, 0.92274, 0.82507, 0.88832, 0.84438, 0.88178, 1.03525, 0.9849, 1.00225, 0.78086, 0.97248, 0.89404, 1.23516, 0.9849, 0.92274, 0.9849, 0.89404, 0.73206, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.89693, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.85865, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.90933, 1, 1, 1, 1, 1, 1, 0.94309, 0.98986, 0.94309, 0.98986, 0.94309, 0.98986, 0.7306, 0.89453, 1, 1, 0.89552, 0.90527, 1, 0.90186, 1.12308, 1.12308, 1.12308, 1.12308, 1.2566, 1.2566, 1.2566, 0.89552, 0.89552, 1.42259, 0.68994, 1.03809, 1, 1, 1.0176, 1.01
vendor: 1,221 bytes, lines 26135-26140
2613576, 1.11523, 1.4956, 2.01462, 0.97858, 0.82616, 0.91133, 0.83437, 0.91133, 1, 1, 1, 0.70508, 1, 1.23108, 0.79801, 0.84426, 0.84426, 0.774, 0.90572, 1.81055, 0.90749, 1.81055, 1.28809, 1.55469, 0.94434, 1.07806, 1, 0.97094, 0.7589, 0.85284, 0.90747, 1.19658, 0.69825, 0.97622, 1.33512, 0.90747, 0.90747, 0.85284, 0.90747, 0.90747, 1.44947, 0.85284, 0.8941, 0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 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, 0.99862, 0.99862, 1, 1, 1, 1, 1, 1.0336, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.05859, 1.05859, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26136const CalibriItalicMetrics = { 26137 lineHeight: 1.2207, 26138 lineGap: 0.2207 26139}; 26140const CalibriRegularFactors = [1.3877, 1, 1, 1, 1.17223, 1.1293, 0.89552, 0.91133, 0.80395, 1.02269, 1.15601, 0.91056, 0.91056, 1.2798, 0.85284, 0.89807, 1, 0.90861, 1.39016, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.91133, 0.96309, 0.96309, 0.85284, 0.85284, 0.85284, 0.83319, 0.88071, 0.8675, 0.81552, 0.73834, 0.85193, 0.73206, 0.7522, 0.81105, 0.86275, 0.90685, 0.6377, 0.77892,
vendor: 3,690 bytes, line 26140
261400.75593, 1.02638, 0.89385, 0.85122, 0.77452, 0.86503, 0.75186, 0.68887, 0.79776, 0.88844, 0.85066, 0.94258, 0.77818, 0.7306, 0.76659, 1.10369, 1.39016, 1.10369, 1.06139, 0.89552, 0.8739, 0.86128, 0.94469, 0.8457, 0.94469, 0.89464, 1.09842, 0.84636, 0.94469, 1.03297, 1.07692, 0.90918, 1.03297, 0.95897, 0.94469, 0.9482, 0.94469, 0.94469, 1.04692, 0.78223, 1.20562, 0.94469, 0.90332, 0.98986, 0.86621, 0.90527, 0.79004, 0.94152, 1.77256, 0.94152, 0.85284, 0.97801, 0.89552, 0.91133, 0.89552, 0.91133, 1.91729, 0.89552, 1.17889, 1.13254, 1.08707, 0.92098, 0.85284, 0.68787, 0.71353, 0.84737, 0.90747, 1.0088, 1.0044, 0.87683, 1, 1.09091, 1, 0.92229, 0.739, 1.15642, 0.92098, 0.76288, 0.80504, 0.80972, 0.75859, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.8675, 0.76318, 0.73834, 0.73206, 0.73206, 0.73206, 0.73206, 0.90685, 0.90685, 0.90685, 0.90685, 0.86477, 0.89385, 0.85122, 0.85122, 0.85122, 0.85122, 0.85122, 0.85284, 0.85311, 0.88844, 0.88844, 0.88844, 0.88844, 0.7306, 0.77452, 0.86331, 0.86128, 0.86128, 0.86128, 0.86128, 0.86128, 0.86128, 0.8693, 0.8457, 0.89464, 0.89464, 0.89464, 0.89464, 0.82601, 0.82601, 0.82601, 0.82601, 0.94469, 0.94469, 0.9482, 0.9482, 0.9482, 0.9482, 0.9482, 0.90747, 0.86651, 0.94469, 0.94469, 0.94469, 0.94469, 0.90527, 0.94469, 0.90527, 0.8675, 0.86128, 0.8675, 0.86128, 0.8675, 0.86128, 0.73834, 0.8457, 0.73834, 0.8457, 0.73834, 0.8457, 0.73834, 0.8457, 0.85193, 0.92454, 0.86477, 0.9921, 0.73206, 0.89464, 0.73206, 0.89464, 0.73206, 0.89464, 0.73206, 0.89464, 0.73206, 0.89464, 0.81105, 0.84636, 0.81105, 0.84636, 0.81105, 0.84636, 1, 1, 0.86275, 0.94469, 0.90872, 0.95786, 0.90685, 0.82601, 0.90685, 0.82601, 0.90685, 0.82601, 0.90685, 1.03297, 0.90685, 0.82601, 0.77741, 1.05611, 0.6377, 1.07692, 1, 1, 0.90918, 0.75593, 1.03297, 1, 1, 0.76032, 0.90452, 0.98156, 1.11842, 0.77261, 1.11429, 0.89385, 0.94469, 1, 1, 0.89385, 0.94469, 0.95877, 0.86901, 0.94469, 0.85122, 0.9482, 0.85122, 0.9482, 0.85122, 0.9482, 0.8667, 0.90016, 0.75186, 1.04692, 1, 1, 0.75186, 1.04692, 0.68887, 0.78223, 0.68887, 0.78223, 0.68887, 0.78223, 0.68887, 0.78223, 1, 1, 0.79776, 0.92188, 0.79776, 1.23023, 0.88844, 0.94469, 0.88844, 0.94469, 0.88844, 0.94469, 0.88844, 0.94469, 0.88844, 0.94469, 0.88844, 0.94469, 0.94258, 0.98986, 0.7306, 0.90527, 0.7306, 0.76659, 0.79004, 0.76659, 0.79004, 0.76659, 0.79004, 1.09231, 0.54873, 0.8675, 0.86128, 0.76318, 0.8693, 0.85311, 0.86651, 1, 1, 0.79776, 1.20562, 1.18622, 1.18622, 1, 1.1437, 0.67742, 0.96334, 0.93695, 1.35191, 1.40909, 0.95161, 1.48387, 0.86686, 0.90861, 0.62267, 0.74359, 0.65649, 0.85498, 0.56963, 0.88254, 1.23516, 0.8675, 0.81552, 0.75443, 0.84503, 0.73206, 0.76659, 0.86275, 0.85122, 0.90685, 0.77892, 0.85746, 1.02638, 0.89385, 0.75657, 0.85122, 0.86275, 0.77452, 0.74171, 0.79776, 0.7306, 0.95165, 0.77818, 0.89772, 0.88831, 0.90685, 0.7306, 0.98142, 1.02191, 0.96576, 1.23516, 0.99018, 0.98142, 0.9236, 0.89258, 0.94035, 1.02191, 0.78848, 0.96576, 0.9561, 1.23516, 0.90918, 0.92578, 0.95424, 0.89746, 0.83969, 0.9482, 0.80113, 0.89442, 0.85208, 0.86155, 0.98022, 0.99018, 1.00452, 0.81209, 0.99247, 0.89181, 1.23516, 0.99018, 0.9482, 0.99018, 0.89181, 0.73206, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.88844, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.89464, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.96766, 1, 1, 1, 1, 1, 1, 0.94258, 0.98986, 0.94258, 0.98986, 0.94258, 0.98986, 0.7306, 0.90527, 1, 1, 0.89552, 0.90527, 1, 0.90186, 1.12308, 1.12308, 1.12308, 1.12308, 1.2566, 1.2566, 1.2566, 0.89552, 0.89552, 1.42259, 0.69043, 1.03809, 1, 1, 1.0176, 1.01
vendor: 56,964 bytes, lines 26140-26184
2614076, 1.11523, 1.4956, 2.01462, 0.99331, 0.82616, 0.91133, 0.84286, 0.91133, 1, 1, 1, 0.70508, 1, 1.23108, 0.79801, 0.84426, 0.84426, 0.774, 0.90527, 1.81055, 0.90527, 1.81055, 1.28809, 1.55469, 0.94434, 1.07806, 1, 0.97094, 0.7589, 0.85284, 0.90747, 1.19658, 0.69825, 0.97622, 1.33512, 0.90747, 0.90747, 0.85356, 0.90747, 0.90747, 1.44947, 0.85284, 0.8941, 0.8941, 0.70572, 0.8, 0.70572, 0.70572, 0.70572, 0.70572, 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, 0.99862, 0.99862, 1, 1, 1, 1, 1, 1.0336, 0.91027, 1, 1, 1, 0.99862, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.05859, 1.05859, 1, 1, 1, 1.07185, 0.99413, 0.96334, 1.08065, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26141const CalibriRegularMetrics = { 26142 lineHeight: 1.2207, 26143 lineGap: 0.2207 26144}; 26145 26146;// ./src/core/helvetica_factors.js 26147const HelveticaBoldFactors = [0.76116, 1, 1, 1.0006, 0.99998, 0.99974, 0.99973, 0.99973, 0.99982, 0.99977, 1.00087, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006, 0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1, 1.00003, 1.00003, 1.00003, 1.00026, 0.9999, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006, 0.99973, 0.99977, 1.00026, 0.99999, 0.99977, 1.00022, 1.00001, 1.00022, 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, 1.00001, 1.00001, 1.00026, 0.99998, 1.0006, 0.99998, 1.00003, 0.99973, 0.99998, 0.99973, 1.00026, 0.99973, 1.00026, 0.99973, 0.99998, 1.00026, 1.00026, 1.0006, 1.0006, 0.99973, 1.0006, 0.99982, 1.00026, 1.00026, 1.00026, 1.00026, 0.99959, 0.99973, 0.99998, 1.00026, 0.99973, 1.00022, 0.99973, 0.99973, 1, 0.99959, 1.00077, 0.99959, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973, 0.99973, 1.00077, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973, 1.00003, 1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1, 0.99973, 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002, 1.00002, 1.00026, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1, 0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, 1.0006, 1.0006, 1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99982, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.06409, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 0.99973, 1.00026, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 1.03374, 0.99977, 1.00026, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.00042, 0.99973, 0.99973, 1.0006, 0.99977, 0.99973, 0.99973, 1.00026, 1.0006, 1.00026, 1.0006, 1.00026, 1.03828, 1.00026, 0.99999, 1.00026, 1.0006, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.9993, 0.9998, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1, 1.00016, 0.99977, 0.99959, 0.99977, 0.99959, 0.99977, 0.99959, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00026, 0.99998, 1.00026, 0.8121, 1.00026, 0.99998, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 1.00016, 1.00022, 1.00001, 0.99973, 1.00001, 1.00026, 1, 1.00026, 1, 1.00026, 1, 1.0006, 0.99973, 0.99977, 0.99973, 1, 0.99982, 1.00022, 1.00026, 1.00001, 0.99973, 1.00026, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 1.00034, 0.99977, 1, 0.99997, 1.00026, 1.00078, 1.00036, 0.99973, 1.00013, 1.0006, 0.99977, 0.99977, 0.99988, 0.85148, 1.00001, 1.00026, 0.99977, 1.00022, 1.0006, 0.99977, 1.00001, 0.99999, 0.99977, 1.00069, 1.00022, 0.99977, 1.00001, 0.99984, 1.00026, 1.00001, 1.00024, 1.00001, 0.9999, 1, 1.0006, 1.00001, 1.00041, 0.99962, 1.00026, 1.0006, 0.99995, 1.00041, 0.99942, 0.99973, 0.99927, 1.00082, 0.99902, 1.00026, 1.00087, 1.0006, 1.00069, 0.99973, 0.99867, 0.99973, 0.9993, 1.00026, 1.00049, 1.00056, 1, 0.99988, 0.99935, 0.99995, 0.99954, 1.00055, 0.99945, 1.00032, 1.0006, 0.99995, 1.00026, 0.99995, 1.00032, 1.00001, 1.00008, 0.99971, 1.00019, 0.9994, 1.00001, 1.0006, 1.00044, 0.99973, 1.00023, 1.00047, 1, 0.99942, 0.99561, 0.99989, 1.00035, 0.99977, 1.00035, 0.99977, 1.00019, 0.99944, 1.00001, 1.00021, 0.99926, 1.00035, 1.00035, 0.99942, 1.00048, 0.99999, 0.99977, 1.00022, 1.00035, 1.00001, 0.99977, 1.00026, 0.99989, 1.00057, 1.00001, 0.99936, 1.00052, 1.00012, 0.99996, 1.00043, 1, 1.00035, 0.9994, 0.99976, 1.00035, 0.99973, 1.00052, 1.00041, 1.00119, 1.00037, 0.99973, 1.00002, 0.99986, 1.00041, 1.00041, 0.99902, 0.9996, 1.00034, 0.99999, 1.00026, 0.99999, 1.00026, 0.99973, 1.00052, 0.99973, 1, 0.99973, 1.00041, 1.00075, 0.9994, 1.0003, 0.99999, 1, 1.00041, 0.99955, 1, 0.99915, 0.99973, 0.99973, 1.00026, 1.00119, 0.99955, 0.99973, 1.0006, 0.99911, 1.0006, 1.00026, 0.99972, 1.00026, 0.99902, 1.00041, 0.99973, 0.99999, 1, 1, 1.00038, 1.0005, 1.00016, 1.00022, 1.00016, 1.00022, 1.00016, 1.00022, 1.00001, 0.99973, 1, 1, 0.99973, 1, 1, 0.99955, 1.0006, 1.0006, 1.0006, 1.0006, 1, 1, 1, 0.99973, 0.99973, 0.99972, 1, 1, 1.00106, 0.99999, 0.99998, 0.99998, 0.99999, 0.99998, 1.66475, 1, 0.99973, 0.99973, 1.00023, 0.99973, 0.99971, 1.00047, 1.00023, 1, 0.99991, 0.99984, 1.00002, 1.00002, 1.00002, 1.00002, 1, 1, 1, 1, 1, 1, 1, 0.99972, 1, 1.20985, 1.39713, 1.00003, 1.00031, 1.00015, 1, 0.99561, 1.00027, 1.00031, 1.00031, 0.99915, 1.00031, 1.00031, 0.99999, 1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.40579, 1.40579, 1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, 1.00026, 1.00026, 0.99972, 0.99999, 0.99999, 0.99999, 0.99999, 1.40483, 1, 0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, 1, 1, 1, 1, 1, 1, 0.99998, 0.99998, 0.99998, 0.99998, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26148const HelveticaBoldMetrics = { 26149 lineHeight: 1.2, 26150 lineGap: 0.2 26151}; 26152const HelveticaBoldItalicFactors = [0.76116, 1, 1, 1.0006, 0.99998, 0.99974, 0.99973, 0.99973, 0.99982, 0.99977, 1.00087, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006, 0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1, 1.00003, 1.00003, 1.00003, 1.00026, 0.9999, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006, 0.99973, 0.99977, 1.00026, 0.99999, 0.99977, 1.00022, 1.00001, 1.00022, 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, 1.00001, 1.00001, 1.00026, 0.99998, 1.0006, 0.99998, 1.00003, 0.99973, 0.99998, 0.99973, 1.00026, 0.99973, 1.00026, 0.99973, 0.99998, 1.00026, 1.00026, 1.0006, 1.0006, 0.99973, 1.0006, 0.99982, 1.00026, 1.00026, 1.00026, 1.00026, 0.99959, 0.99973, 0.99998, 1.00026, 0.99973, 1.00022, 0.99973, 0.99973, 1, 0.99959, 1.00077, 0.99959, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973, 0.99973, 1.00077, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973, 1.00003, 1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1, 0.99973, 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002, 1.00002, 1.00026, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 0.99977, 1, 0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, 1.0006, 1.0006, 1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99982, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 1.06409, 1.00026, 1.00026, 1.00026, 1.00026, 1.00026, 0.99973, 1.00026, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 1.0044, 0.99977, 1.00026, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99971, 0.99973, 0.99973, 1.0006, 0.99977, 0.99973, 0.99973, 1.00026, 1.0006, 1.00026, 1.0006, 1.00026, 1.01011, 1.00026, 0.99999, 1.00026, 1.0006, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.9993, 0.9998, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1.00022, 1.00026, 1, 1.00016, 0.99977, 0.99959, 0.99977, 0.99959, 0.99977, 0.99959, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00026, 0.99998, 1.00026, 0.8121, 1.00026, 0.99998, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 0.99977, 1.00026, 1.00016, 1.00022, 1.00001, 0.99973, 1.00001, 1.00026, 1, 1.00026, 1, 1.00026, 1, 1.0006, 0.99973, 0.99977, 0.99973, 1, 0.99982, 1.00022, 1.00026, 1.00001, 0.99973, 1.00026, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99977, 1, 1, 1.00026, 0.99969, 0.99972, 0.99981, 0.9998, 1.0006, 0.99977, 0.99977, 1.00022, 0.91155, 1.00001, 1.00026, 0.99977, 1.00022, 1.0006, 0.99977, 1.00001, 0.99999, 0.99977, 0.99966, 1.00022, 1.00032, 1.00001, 0.99944, 1.00026, 1.00001, 0.99968, 1.00001, 1.00047, 1, 1.0006, 1.00001, 0.99981, 1.00101, 1.00026, 1.0006, 0.99948, 0.99981, 1.00064, 0.99973, 0.99942, 1.00101, 1.00061, 1.00026, 1.00069, 1.0006, 1.00014, 0.99973, 1.01322, 0.99973, 1.00065, 1.00026, 1.00012, 0.99923, 1, 1.00064, 1.00076, 0.99948, 1.00055, 1.00063, 1.00007, 0.99943, 1.0006, 0.99948, 1.00026, 0.99948, 0.99943, 1.00001, 1.00001, 1.00029, 1.00038, 1.00035, 1.00001, 1.0006, 1.0006, 0.99973, 0.99978, 1.00001, 1.00057, 0.99989, 0.99967, 0.99964, 0.99967, 0.99977, 0.99999, 0.99977, 1.00038, 0.99977, 1.00001, 0.99973, 1.00066, 0.99967, 0.99967, 1.00041, 0.99998, 0.99999, 0.99977, 1.00022, 0.99967, 1.00001, 0.99977, 1.00026, 0.99964, 1.00031, 1.00001, 0.99999, 0.99999, 1, 1.00023, 1, 1, 0.99999, 1.00035, 1.00001, 0.99999, 0.99973, 0.99977, 0.99999, 1.00058, 0.99973, 0.99973, 0.99955, 0.9995, 1.00026, 1.00026, 1.00032, 0.99989, 1.00034, 0.99999, 1.00026, 1.00026, 1.00026, 0.99973, 0.45998, 0.99973, 1.00026, 0.99973, 1.00001, 0.99999, 0.99982, 0.99994, 0.99996, 1, 1.00042, 1.00044, 1.00029, 1.00023, 0.99973, 0.99973, 1.00026, 0.99949, 1.00002, 0.99973, 1.0006, 1.0006, 1.0006, 0.99975, 1.00026, 1.00026, 1.00032, 0.98685, 0.99973, 1.00026, 1, 1, 0.99966, 1.00044, 1.00016, 1.00022, 1.00016, 1.00022, 1.00016, 1.00022, 1.00001, 0.99973, 1, 1, 0.99973, 1, 1, 0.99955, 1.0006, 1.0006, 1.0006, 1.0006, 1, 1, 1, 0.99973, 0.99973, 0.99972, 1, 1, 1.00106, 0.99999, 0.99998, 0.99998, 0.99999, 0.99998, 1.66475, 1, 0.99973, 0.99973, 1, 0.99973, 0.99971, 0.99978, 1, 1, 0.99991, 0.99984, 1.00002, 1.00002, 1.00002, 1.00002, 1.00098, 1, 1, 1, 1.00049, 1, 1, 0.99972, 1, 1.20985, 1.39713, 1.00003, 1.00031, 1.00015, 1, 0.99561, 1.00027, 1.00031, 1.00031, 0.99915, 1.00031, 1.00031, 0.99999, 1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.40579, 1.40579, 1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, 1.00026, 1.00026, 0.99972, 0.99999, 0.99999, 0.99999, 0.99999, 1.40483, 1, 0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, 1, 1, 1, 1, 1, 1, 0.99998, 0.99998, 0.99998, 0.99998, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26153const HelveticaBoldItalicMetrics = { 26154 lineHeight: 1.35, 26155 lineGap: 0.2 26156}; 26157const HelveticaItalicFactors = [0.76116, 1, 1, 1.0006, 1.0006, 1.00006, 0.99973, 0.99973, 0.99982, 1.00001, 1.00043, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006, 0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1, 1.00003, 1.00003, 1.00003, 0.99973, 0.99987, 1.00001, 1.00001, 0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006, 1, 1.00001, 0.99973, 0.99999, 0.99977, 1.00022, 1.00001, 1.00022, 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, 1.00001, 1.00001, 1.00026, 1.0006, 1.0006, 1.0006, 0.99949, 0.99973, 0.99998, 0.99973, 0.99973, 1, 0.99973, 0.99973, 1.0006, 0.99973, 0.99973, 0.99924, 0.99924, 1, 0.99924, 0.99999, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1, 1.0006, 0.99973, 1, 0.99977, 1, 1, 1, 1.00005, 1.0009, 1.00005, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973, 0.99973, 1.0009, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973, 1.00003, 1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1, 0.9998, 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002, 1.00002, 1.00026, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1, 0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, 1.0006, 1.0006, 1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99982, 1, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.06409, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 1, 0.99973, 1, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 0.99977, 1, 0.99977, 1, 0.99977, 1, 0.99977, 1, 0.99977, 1.0288, 0.99977, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99924, 1.0006, 1.0006, 0.99946, 1.00034, 1, 0.99924, 1.00001, 1, 1, 0.99973, 0.99924, 0.99973, 0.99924, 0.99973, 1.06311, 0.99973, 1.00024, 0.99973, 0.99924, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.00041, 0.9998, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1, 1.00016, 0.99977, 0.99998, 0.99977, 0.99998, 0.99977, 0.99998, 1.00001, 1, 1.00001, 1, 1.00001, 1, 1.00001, 1, 1.00026, 1.0006, 1.00026, 0.89547, 1.00026, 1.0006, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.00016, 0.99977, 1.00001, 1, 1.00001, 1.00026, 1, 1.00026, 1, 1.00026, 1, 0.99924, 0.99973, 1.00001, 0.99973, 1, 0.99982, 1.00022, 1.00026, 1.00001, 1, 1.00026, 1.0006, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 1.00001, 1, 1.00054, 0.99977, 1.00084, 1.00007, 0.99973, 1.00013, 0.99924, 1.00001, 1.00001, 0.99945, 0.91221, 1.00001, 1.00026, 0.99977, 1.00022, 1.0006, 1.00001, 1.00001, 0.99999, 0.99977, 0.99933, 1.00022, 1.00054, 1.00001, 1.00065, 1.00026, 1.00001, 1.0001, 1.00001, 1.00052, 1, 1.0006, 1.00001, 0.99945, 0.99897, 0.99968, 0.99924, 1.00036, 0.99945, 0.99949, 1, 1.0006, 0.99897, 0.99918, 0.99968, 0.99911, 0.99924, 1, 0.99962, 1.01487, 1, 1.0005, 0.99973, 1.00012, 1.00043, 1, 0.99995, 0.99994, 1.00036, 0.99947, 1.00019, 1.00063, 1.00025, 0.99924, 1.00036, 0.99973, 1.00036, 1.00025, 1.00001, 1.00001, 1.00027, 1.0001, 1.00068, 1.00001, 1.0006, 1.0006, 1, 1.00008, 0.99957, 0.99972, 0.9994, 0.99954, 0.99975, 1.00051, 1.00001, 1.00019, 1.00001, 1.0001, 0.99986, 1.00001, 1.00001, 1.00038, 0.99954, 0.99954, 0.9994, 1.00066, 0.99999, 0.99977, 1.00022, 1.00054, 1.00001, 0.99977, 1.00026, 0.99975, 1.0001, 1.00001, 0.99993, 0.9995, 0.99955, 1.00016, 0.99978, 0.99974, 1.00019, 1.00022, 0.99955, 1.00053, 0.99973, 1.00089, 1.00005, 0.99967, 1.00048, 0.99973, 1.00002, 1.00034, 0.99973, 0.99973, 0.99964, 1.00006, 1.00066, 0.99947, 0.99973, 0.98894, 0.99973, 1, 0.44898, 1, 0.99946, 1, 1.00039, 1.00082, 0.99991, 0.99991, 0.99985, 1.00022, 1.00023, 1.00061, 1.00006, 0.99966, 0.99973, 0.99973, 0.99973, 1.00019, 1.0008, 1, 0.99924, 0.99924, 0.99924, 0.99983, 1.00044, 0.99973, 0.99964, 0.98332, 1, 0.99973, 1, 1, 0.99962, 0.99895, 1.00016, 0.99977, 1.00016, 0.99977, 1.00016, 0.99977, 1.00001, 1, 1, 1, 0.99973, 1, 1, 0.99955, 0.99924, 0.99924, 0.99924, 0.99924, 0.99998, 0.99998, 0.99998, 0.99973, 0.99973, 0.99972, 1, 1, 1.00267, 0.99999, 0.99998, 0.99998, 1, 0.99998, 1.66475, 1, 0.99973, 0.99973, 1.00023, 0.99973, 1.00423, 0.99925, 0.99999, 1, 0.99991, 0.99984, 1.00002, 1.00002, 1.00002, 1.00002, 1.00049, 1, 1.00245, 1, 1, 1, 1, 0.96329, 1, 1.20985, 1.39713, 1.00003, 0.8254, 1.00015, 1, 1.00035, 1.00027, 1.00031, 1.00031, 1.00003, 1.00031, 1.00031, 0.99999, 1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.40579, 1.40579, 1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, 1.00026, 1.00026, 0.95317, 0.99999, 0.99999, 0.99999, 0.99999, 1.40483, 1, 0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, 1, 1, 1, 1, 1, 1, 0.99998, 0.99998, 0.99998, 0.99998, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26158const HelveticaItalicMetrics = { 26159 lineHeight: 1.35, 26160 lineGap: 0.2 26161}; 26162const HelveticaRegularFactors = [0.76116, 1, 1, 1.0006, 1.0006, 1.00006, 0.99973, 0.99973, 0.99982, 1.00001, 1.00043, 0.99998, 0.99998, 0.99959, 1.00003, 1.0006, 0.99998, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1, 1.00003, 1.00003, 1.00003, 0.99973, 0.99987, 1.00001, 1.00001, 0.99977, 0.99977, 1.00001, 1.00026, 1.00022, 0.99977, 1.0006, 1, 1.00001, 0.99973, 0.99999, 0.99977, 1.00022, 1.00001, 1.00022, 0.99977, 1.00001, 1.00026, 0.99977, 1.00001, 1.00016, 1.00001, 1.00001, 1.00026, 1.0006, 1.0006, 1.0006, 0.99949, 0.99973, 0.99998, 0.99973, 0.99973, 1, 0.99973, 0.99973, 1.0006, 0.99973, 0.99973, 0.99924, 0.99924, 1, 0.99924, 0.99999, 0.99973, 0.99973, 0.99973, 0.99973, 0.99998, 1, 1.0006, 0.99973, 1, 0.99977, 1, 1, 1, 1.00005, 1.0009, 1.00005, 1.00003, 0.99998, 0.99973, 0.99973, 0.99973, 0.99973, 1.0009, 0.99973, 0.99998, 1.00025, 0.99968, 0.99973, 1.00003, 1.00025, 0.60299, 1.00024, 1.06409, 1, 1, 0.99998, 1, 0.9998, 1.0006, 0.99998, 1, 0.99936, 0.99973, 1.00002, 1.00002, 1.00002, 1.00026, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1.00001, 1, 0.99977, 1.00001, 1.00001, 1.00001, 1.00001, 1.0006, 1.0006, 1.0006, 1.0006, 0.99977, 0.99977, 1.00022, 1.00022, 1.00022, 1.00022, 1.00022, 1.00003, 1.00022, 0.99977, 0.99977, 0.99977, 0.99977, 1.00001, 1.00001, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99982, 1, 0.99973, 0.99973, 0.99973, 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 0.99973, 1.06409, 1.00026, 0.99973, 0.99973, 0.99973, 0.99973, 1, 0.99973, 1, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 0.99977, 1, 0.99977, 1, 0.99977, 1, 0.99977, 1, 0.99977, 1.04596, 0.99977, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00001, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 1.0006, 0.99924, 1.0006, 1.0006, 1.00019, 1.00034, 1, 0.99924, 1.00001, 1, 1, 0.99973, 0.99924, 0.99973, 0.99924, 0.99973, 1.02572, 0.99973, 1.00005, 0.99973, 0.99924, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99999, 0.9998, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1.00022, 0.99973, 1, 1.00016, 0.99977, 0.99998, 0.99977, 0.99998, 0.99977, 0.99998, 1.00001, 1, 1.00001, 1, 1.00001, 1, 1.00001, 1, 1.00026, 1.0006, 1.00026, 0.84533, 1.00026, 1.0006, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 0.99977, 0.99973, 1.00016, 0.99977, 1.00001, 1, 1.00001, 1.00026, 1, 1.00026, 1, 1.00026, 1, 0.99924, 0.99973, 1.00001, 0.99973, 1, 0.99982, 1.00022, 1.00026, 1.00001, 1, 1.00026, 1.0006, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99998, 0.99928, 1, 0.99977, 1.00013, 1.00055, 0.99947, 0.99945, 0.99941, 0.99924, 1.00001, 1.00001, 1.0004, 0.91621, 1.00001, 1.00026, 0.99977, 1.00022, 1.0006, 1.00001, 1.00005, 0.99999, 0.99977, 1.00015, 1.00022, 0.99977, 1.00001, 0.99973, 1.00026, 1.00001, 1.00019, 1.00001, 0.99946, 1, 1.0006, 1.00001, 0.99978, 1.00045, 0.99973, 0.99924, 1.00023, 0.99978, 0.99966, 1, 1.00065, 1.00045, 1.00019, 0.99973, 0.99973, 0.99924, 1, 1, 0.96499, 1, 1.00055, 0.99973, 1.00008, 1.00027, 1, 0.9997, 0.99995, 1.00023, 0.99933, 1.00019, 1.00015, 1.00031, 0.99924, 1.00023, 0.99973, 1.00023, 1.00031, 1.00001, 0.99928, 1.00029, 1.00092, 1.00035, 1.00001, 1.0006, 1.0006, 1, 0.99988, 0.99975, 1, 1.00082, 0.99561, 0.9996, 1.00035, 1.00001, 0.99962, 1.00001, 1.00092, 0.99964, 1.00001, 0.99963, 0.99999, 1.00035, 1.00035, 1.00082, 0.99962, 0.99999, 0.99977, 1.00022, 1.00035, 1.00001, 0.99977, 1.00026, 0.9996, 0.99967, 1.00001, 1.00034, 1.00074, 1.00054, 1.00053, 1.00063, 0.99971, 0.99962, 1.00035, 0.99975, 0.99977, 0.99973, 1.00043, 0.99953, 1.0007, 0.99915, 0.99973, 1.00008, 0.99892, 1.00073, 1.00073, 1.00114, 0.99915, 1.00073, 0.99955, 0.99973, 1.00092, 0.99973, 1, 0.99998, 1, 1.0003, 1, 1.00043, 1.00001, 0.99969, 1.0003, 1, 1.00035, 1.00001, 0.9995, 1, 1.00092, 0.99973, 0.99973, 0.99973, 1.0007, 0.9995, 1, 0.99924, 1.0006, 0.99924, 0.99972, 1.00062, 0.99973, 1.00114, 1.00073, 1, 0.99955, 1, 1, 1.00047, 0.99968, 1.00016, 0.99977, 1.00016, 0.99977, 1.00016, 0.99977, 1.00001, 1, 1, 1, 0.99973, 1, 1, 0.99955, 0.99924, 0.99924, 0.99924, 0.99924, 0.99998, 0.99998, 0.99998, 0.99973, 0.99973, 0.99972, 1, 1, 1.00267, 0.99999, 0.99998, 0.99998, 1, 0.99998, 1.66475, 1, 0.99973, 0.99973, 1.00023, 0.99973, 0.99971, 0.99925, 1.00023, 1, 0.99991, 0.99984, 1.00002, 1.00002, 1.00002, 1.00002, 1, 1, 1, 1, 1, 1, 1, 0.96329, 1, 1.20985, 1.39713, 1.00003, 0.8254, 1.00015, 1, 1.00035, 1.00027, 1.00031, 1.00031, 0.99915, 1.00031, 1.00031, 0.99999, 1.00003, 0.99999, 0.99999, 1.41144, 1.6, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.41144, 1.40579, 1.40579, 1.36625, 0.99999, 1, 0.99861, 0.99861, 1, 1.00026, 1.00026, 1.00026, 1.00026, 0.95317, 0.99999, 0.99999, 0.99999, 0.99999, 1.40483, 1, 0.99977, 1.00054, 1, 1, 0.99953, 0.99962, 1.00042, 0.9995, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26163const HelveticaRegularMetrics = { 26164 lineHeight: 1.2, 26165 lineGap: 0.2 26166}; 26167 26168;// ./src/core/liberationsans_widths.js 26169const LiberationSansBoldWidths = [365, 0, 333, 278, 333, 474, 556, 556, 889, 722, 238, 333, 333, 389, 584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 333, 333, 584, 584, 584, 611, 975, 722, 722, 722, 722, 667, 611, 778, 722, 278, 556, 722, 611, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, 611, 333, 278, 333, 584, 556, 333, 556, 611, 556, 611, 556, 333, 611, 611, 278, 278, 556, 278, 889, 611, 611, 611, 611, 389, 556, 333, 611, 556, 778, 556, 556, 500, 389, 280, 389, 584, 333, 556, 556, 556, 556, 280, 556, 333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576, 556, 278, 333, 333, 365, 556, 834, 834, 834, 611, 722, 722, 722, 722, 722, 722, 1000, 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, 667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 556, 556, 556, 556, 556, 278, 278, 278, 278, 611, 611, 611, 611, 611, 611, 611, 549, 611, 611, 611, 611, 611, 556, 611, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 719, 722, 611, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 611, 778, 611, 778, 611, 778, 611, 722, 611, 722, 611, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 785, 556, 556, 278, 722, 556, 556, 611, 278, 611, 278, 611, 385, 611, 479, 611, 278, 722, 611, 722, 611, 722, 611, 708, 723, 611, 778, 611, 778, 611, 778, 611, 1000, 944, 722, 389, 722, 389, 722, 389, 667, 556, 667, 556, 667, 556, 667, 556, 611, 333, 611, 479, 611, 333, 722, 611, 722, 611, 722, 611, 722, 611, 722, 611, 722, 611, 944, 778, 667, 556, 667, 611, 500, 611, 500, 611, 500, 278, 556, 722, 556, 1000, 889, 778, 611, 667, 556, 611, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 465, 722, 333, 853, 906, 474, 825, 927, 838, 278, 722, 722, 601, 719, 667, 611, 722, 778, 278, 722, 667, 833, 722, 644, 778, 722, 667, 600, 611, 667, 821, 667, 809, 802, 278, 667, 615, 451, 611, 278, 582, 615, 610, 556, 606, 475, 460, 611, 541, 278, 558, 556, 612, 556, 445, 611, 766, 619, 520, 684, 446, 582, 715, 576, 753, 845, 278, 582, 611, 582, 845, 667, 669, 885, 567, 711, 667, 278, 276, 556, 1094, 1062, 875, 610, 722, 622, 719, 722, 719, 722, 567, 712, 667, 904, 626, 719, 719, 610, 702, 833, 722, 778, 719, 667, 722, 611, 622, 854, 667, 730, 703, 1005, 1019, 870, 979, 719, 711, 1031, 719, 556, 618, 615, 417, 635, 556, 709, 497, 615, 615, 500, 635, 740, 604, 611, 604, 611, 556, 490, 556, 875, 556, 615, 581, 833, 844, 729, 854, 615, 552, 854, 583, 556, 556, 611, 417, 552, 556, 278, 281, 278, 969, 906, 611, 500, 615, 556, 604, 778, 611, 487, 447, 944, 778, 944, 778, 944, 778, 667, 556, 333, 333, 556, 1000, 1000, 552, 278, 278, 278, 278, 500, 500, 500, 556, 556, 350, 1000, 1000, 240, 479, 333, 333, 604, 333, 167, 396, 556, 556, 1094, 556, 885, 489, 1115, 1000, 768, 600, 834, 834, 834, 834, 1000, 500, 1000, 500, 1000, 500, 500, 494, 612, 823, 713, 584, 549, 713, 979, 722, 274, 549, 549, 583, 549, 549, 604, 584, 604, 604, 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354, 1000, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052, 917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 611, 611, 333, 333, 333, 333, 333, 333, 333, 333, 222, 222, 333, 333, 333, 333, 333, 333, 333, 333]; 26170const LiberationSansBoldMapping = [-1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537, 538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901, 902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813, 7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218, 8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243, 8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453, 8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593, 8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730, 8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976, 8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516, 9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560, 9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571, 9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604, 9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644, 9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786, 9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836, 61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]; 26171const LiberationSansBoldItalicWidths = [365, 0, 333, 278, 333, 474, 556, 556, 889, 722, 238, 333, 333, 389, 584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 333, 333, 584, 584, 584, 611, 975, 722, 722, 722, 722, 667, 611, 778, 722, 278, 556, 722, 611, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, 611, 333, 278, 333, 584, 556, 333, 556, 611, 556, 611, 556, 333, 611, 611, 278, 278, 556, 278, 889, 611, 611, 611, 611, 389, 556, 333, 611, 556, 778, 556, 556, 500, 389, 280, 389, 584, 333, 556, 556, 556, 556, 280, 556, 333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576, 556, 278, 333, 333, 365, 556, 834, 834, 834, 611, 722, 722, 722, 722, 722, 722, 1000, 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, 667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 556, 556, 556, 556, 556, 278, 278, 278, 278, 611, 611, 611, 611, 611, 611, 611, 549, 611, 611, 611, 611, 611, 556, 611, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 740, 722, 611, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 611, 778, 611, 778, 611, 778, 611, 722, 611, 722, 611, 278, 278, 278, 278, 278, 278, 278, 278, 278, 278, 782, 556, 556, 278, 722, 556, 556, 611, 278, 611, 278, 611, 396, 611, 479, 611, 278, 722, 611, 722, 611, 722, 611, 708, 723, 611, 778, 611, 778, 611, 778, 611, 1000, 944, 722, 389, 722, 389, 722, 389, 667, 556, 667, 556, 667, 556, 667, 556, 611, 333, 611, 479, 611, 333, 722, 611, 722, 611, 722, 611, 722, 611, 722, 611, 722, 611, 944, 778, 667, 556, 667, 611, 500, 611, 500, 611, 500, 278, 556, 722, 556, 1000, 889, 778, 611, 667, 556, 611, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 722, 333, 854, 906, 473, 844, 930, 847, 278, 722, 722, 610, 671, 667, 611, 722, 778, 278, 722, 667, 833, 722, 657, 778, 718, 667, 590, 611, 667, 822, 667, 829, 781, 278, 667, 620, 479, 611, 278, 591, 620, 621, 556, 610, 479, 492, 611, 558, 278, 566, 556, 603, 556, 450, 611, 712, 605, 532, 664, 409, 591, 704, 578, 773, 834, 278, 591, 611, 591, 834, 667, 667, 886, 614, 719, 667, 278, 278, 556, 1094, 1042, 854, 622, 719, 677, 719, 722, 708, 722, 614, 722, 667, 927, 643, 719, 719, 615, 687, 833, 722, 778, 719, 667, 722, 611, 677, 781, 667, 729, 708, 979, 989, 854, 1000, 708, 719, 1042, 729, 556, 619, 604, 534, 618, 556, 736, 510, 611, 611, 507, 622, 740, 604, 611, 611, 611, 556, 889, 556, 885, 556, 646, 583, 889, 935, 707, 854, 594, 552, 865, 589, 556, 556, 611, 469, 563, 556, 278, 278, 278, 969, 906, 611, 507, 619, 556, 611, 778, 611, 575, 467, 944, 778, 944, 778, 944, 778, 667, 556, 333, 333, 556, 1000, 1000, 552, 278, 278, 278, 278, 500, 500, 500, 556, 556, 350, 1000, 1000, 240, 479, 333, 333, 604, 333, 167, 396, 556, 556, 1104, 556, 885, 516, 1146, 1000, 768, 600, 834, 834, 834, 834, 999, 500, 1000, 500, 1000, 500, 500, 494, 612, 823, 713, 584, 549, 713, 979, 722, 274, 549, 549, 583, 549, 549, 604, 584, 604, 604, 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354, 1000, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052, 917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 611, 611, 333, 333, 333, 333, 333, 333, 333, 333, 222, 222, 333, 333, 333, 333, 333, 333, 333, 333]; 26172const LiberationSansBoldItalicMapping = [-1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537, 538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901, 902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813, 7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218, 8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243, 8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453, 8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593, 8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730, 8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976, 8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516, 9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560, 9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571, 9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604, 9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644, 9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786, 9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836, 61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]; 26173const LiberationSansItalicWidths = [365, 0, 333, 278, 278, 355, 556, 556, 889, 667, 191, 333, 333, 389, 584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 278, 278, 584, 584, 584, 556, 1015, 667, 667, 722, 722, 667, 611, 778, 722, 278, 500, 667, 556, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, 611, 278, 278, 278, 469, 556, 333, 556, 556, 500, 556, 556, 278, 556, 556, 222, 222, 500, 222, 833, 556, 556, 556, 556, 333, 500, 278, 556, 500, 722, 500, 500, 500, 334, 260, 334, 584, 333, 556, 556, 556, 556, 260, 556, 333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576, 537, 278, 333, 333, 365, 556, 834, 834, 834, 611, 667, 667, 667, 667, 667, 667, 1000, 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, 667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 500, 556, 556, 556, 556, 278, 278, 278, 278, 556, 556, 556, 556, 556, 556, 556, 549, 611, 556, 556, 556, 556, 500, 556, 500, 667, 556, 667, 556, 667, 556, 722, 500, 722, 500, 722, 500, 722, 500, 722, 625, 722, 556, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 556, 778, 556, 778, 556, 778, 556, 722, 556, 722, 556, 278, 278, 278, 278, 278, 278, 278, 222, 278, 278, 733, 444, 500, 222, 667, 500, 500, 556, 222, 556, 222, 556, 281, 556, 400, 556, 222, 722, 556, 722, 556, 722, 556, 615, 723, 556, 778, 556, 778, 556, 778, 556, 1000, 944, 722, 333, 722, 333, 722, 333, 667, 500, 667, 500, 667, 500, 667, 500, 611, 278, 611, 354, 611, 278, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 944, 722, 667, 500, 667, 611, 500, 611, 500, 611, 500, 222, 556, 667, 556, 1000, 889, 778, 611, 667, 500, 611, 278, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 667, 278, 789, 846, 389, 794, 865, 775, 222, 667, 667, 570, 671, 667, 611, 722, 778, 278, 667, 667, 833, 722, 648, 778, 725, 667, 600, 611, 667, 837, 667, 831, 761, 278, 667, 570, 439, 555, 222, 550, 570, 571, 500, 556, 439, 463, 555, 542, 222, 500, 492, 548, 500, 447, 556, 670, 573, 486, 603, 374, 550, 652, 546, 728, 779, 222, 550, 556, 550, 779, 667, 667, 843, 544, 708, 667, 278, 278, 500, 1066, 982, 844, 589, 715, 639, 724, 667, 651, 667, 544, 704, 667, 917, 614, 715, 715, 589, 686, 833, 722, 778, 725, 667, 722, 611, 639, 795, 667, 727, 673, 920, 923, 805, 886, 651, 694, 1022, 682, 556, 562, 522, 493, 553, 556, 688, 465, 556, 556, 472, 564, 686, 550, 556, 556, 556, 500, 833, 500, 835, 500, 572, 518, 830, 851, 621, 736, 526, 492, 752, 534, 556, 556, 556, 378, 496, 500, 222, 222, 222, 910, 828, 556, 472, 565, 500, 556, 778, 556, 492, 339, 944, 722, 944, 722, 944, 722, 667, 500, 333, 333, 556, 1000, 1000, 552, 222, 222, 222, 222, 333, 333, 333, 556, 556, 350, 1000, 1000, 188, 354, 333, 333, 500, 333, 167, 365, 556, 556, 1094, 556, 885, 323, 1083, 1000, 768, 600, 834, 834, 834, 834, 1000, 500, 998, 500, 1000, 500, 500, 494, 612, 823, 713, 584, 549, 713, 979, 719, 274, 549, 549, 584, 549, 549, 604, 584, 604, 604, 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354, 1000, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052, 917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 500, 500, 333, 333, 333, 333, 333, 333, 333, 333, 222, 222, 294, 294, 324, 324, 316, 328, 398, 285]; 26174const LiberationSansItalicMapping = [-1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537, 538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901, 902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813, 7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218, 8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243, 8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453, 8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593, 8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730, 8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976, 8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516, 9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560, 9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571, 9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604, 9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644, 9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786, 9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836, 61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]; 26175const LiberationSansRegularWidths = [365, 0, 333, 278, 278, 355, 556, 556, 889, 667, 191, 333, 333, 389, 584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 278, 278, 584, 584, 584, 556, 1015, 667, 667, 722, 722, 667, 611, 778, 722, 278, 500, 667, 556, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, 611, 278, 278, 278, 469, 556, 333, 556, 556, 500, 556, 556, 278, 556, 556, 222, 222, 500, 222, 833, 556, 556, 556, 556, 333, 500, 278, 556, 500, 722, 500, 500, 500, 334, 260, 334, 584, 333, 556, 556, 556, 556, 260, 556, 333, 737, 370, 556, 584, 737, 552, 400, 549, 333, 333, 333, 576, 537, 278, 333, 333, 365, 556, 834, 834, 834, 611, 667, 667, 667, 667, 667, 667, 1000, 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, 667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 500, 556, 556, 556, 556, 278, 278, 278, 278, 556, 556, 556, 556, 556, 556, 556, 549, 611, 556, 556, 556, 556, 500, 556, 500, 667, 556, 667, 556, 667, 556, 722, 500, 722, 500, 722, 500, 722, 500, 722, 615, 722, 556, 667, 556, 667, 556, 667, 556, 667, 556, 667, 556, 778, 556, 778, 556, 778, 556, 778, 556, 722, 556, 722, 556, 278, 278, 278, 278, 278, 278, 278, 222, 278, 278, 735, 444, 500, 222, 667, 500, 500, 556, 222, 556, 222, 556, 292, 556, 334, 556, 222, 722, 556, 722, 556, 722, 556, 604, 723, 556, 778, 556, 778, 556, 778, 556, 1000, 944, 722, 333, 722, 333, 722, 333, 667, 500, 667, 500, 667, 500, 667, 500, 611, 278, 611, 375, 611, 278, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 722, 556, 944, 722, 667, 500, 667, 611, 500, 611, 500, 611, 500, 222, 556, 667, 556, 1000, 889, 778, 611, 667, 500, 611, 278, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 333, 667, 278, 784, 838, 384, 774, 855, 752, 222, 667, 667, 551, 668, 667, 611, 722, 778, 278, 667, 668, 833, 722, 650, 778, 722, 667, 618, 611, 667, 798, 667, 835, 748, 278, 667, 578, 446, 556, 222, 547, 578, 575, 500, 557, 446, 441, 556, 556, 222, 500, 500, 576, 500, 448, 556, 690, 569, 482, 617, 395, 547, 648, 525, 713, 781, 222, 547, 556, 547, 781, 667, 667, 865, 542, 719, 667, 278, 278, 500, 1057, 1010, 854, 583, 722, 635, 719, 667, 656, 667, 542, 677, 667, 923, 604, 719, 719, 583, 656, 833, 722, 778, 719, 667, 722, 611, 635, 760, 667, 740, 667, 917, 938, 792, 885, 656, 719, 1010, 722, 556, 573, 531, 365, 583, 556, 669, 458, 559, 559, 438, 583, 688, 552, 556, 542, 556, 500, 458, 500, 823, 500, 573, 521, 802, 823, 625, 719, 521, 510, 750, 542, 556, 556, 556, 365, 510, 500, 222, 278, 222, 906, 812, 556, 438, 559, 500, 552, 778, 556, 489, 411, 944, 722, 944, 722, 944, 722, 667, 500, 333, 333, 556, 1000, 1000, 552, 222, 222, 222, 222, 333, 333, 333, 556, 556, 350, 1000, 1000, 188, 354, 333, 333, 500, 333, 167, 365, 556, 556, 1094, 556, 885, 323, 1073, 1000, 768, 600, 834, 834, 834, 834, 1000, 500, 1000, 500, 1000, 500, 500, 494, 612, 823, 713, 584, 549, 713, 979, 719, 274, 549, 549, 583, 549, 549, 604, 584, 604, 604, 708, 625, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 708, 729, 604, 604, 354, 354, 1000, 990, 990, 990, 990, 494, 604, 604, 604, 604, 354, 1021, 1052, 917, 750, 750, 531, 656, 594, 510, 500, 750, 750, 500, 500, 333, 333, 333, 333, 333, 333, 333, 333, 222, 222, 294, 294, 324, 324, 316, 328, 398, 285]; 26176const LiberationSansRegularMapping = [-1, -1, -1, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 402, 506, 507, 508, 509, 510, 511, 536, 537, 538, 539, 710, 711, 713, 728, 729, 730, 731, 732, 733, 900, 901, 902, 903, 904, 905, 906, 908, 910, 911, 912, 913, 914, 915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1138, 1139, 1168, 1169, 7808, 7809, 7810, 7811, 7812, 7813, 7922, 7923, 8208, 8209, 8211, 8212, 8213, 8215, 8216, 8217, 8218, 8219, 8220, 8221, 8222, 8224, 8225, 8226, 8230, 8240, 8242, 8243, 8249, 8250, 8252, 8254, 8260, 8319, 8355, 8356, 8359, 8364, 8453, 8467, 8470, 8482, 8486, 8494, 8539, 8540, 8541, 8542, 8592, 8593, 8594, 8595, 8596, 8597, 8616, 8706, 8710, 8719, 8721, 8722, 8730, 8734, 8735, 8745, 8747, 8776, 8800, 8801, 8804, 8805, 8962, 8976, 8992, 8993, 9472, 9474, 9484, 9488, 9492, 9496, 9500, 9508, 9516, 9524, 9532, 9552, 9553, 9554, 9555, 9556, 9557, 9558, 9559, 9560, 9561, 9562, 9563, 9564, 9565, 9566, 9567, 9568, 9569, 9570, 9571, 9572, 9573, 9574, 9575, 9576, 9577, 9578, 9579, 9580, 9600, 9604, 9608, 9612, 9616, 9617, 9618, 9619, 9632, 9633, 9642, 9643, 9644, 9650, 9658, 9660, 9668, 9674, 9675, 9679, 9688, 9689, 9702, 9786, 9787, 9788, 9792, 9794, 9824, 9827, 9829, 9830, 9834, 9835, 9836, 61441, 61442, 61445, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1]; 26177 26178;// ./src/core/myriadpro_factors.js 26179const MyriadProBoldFactors = [1.36898, 1, 1, 0.72706, 0.80479, 0.83734, 0.98894, 0.99793, 0.9897, 0.93884, 0.86209, 0.94292, 0.94292, 1.16661, 1.02058, 0.93582, 0.96694, 0.93582, 1.19137, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.99793, 0.78076, 0.78076, 1.02058, 1.02058, 1.02058, 0.72851, 0.78966, 0.90838, 0.83637, 0.82391, 0.96376, 0.80061, 0.86275, 0.8768, 0.95407, 1.0258, 0.73901, 0.85022, 0.83655, 1.0156, 0.95546, 0.92179, 0.87107, 0.92179, 0.82114, 0.8096, 0.89713, 0.94438, 0.95353, 0.94083, 0.91905, 0.90406, 0.9446, 0.94292, 1.18777, 0.94292, 1.02058, 0.89903, 0.90088, 0.94938, 0.97898, 0.81093, 0.97571, 0.94938, 1.024, 0.9577, 0.95933, 0.98621, 1.0474, 0.97455, 0.98981, 0.9672, 0.95933, 0.9446, 0.97898, 0.97407, 0.97646, 0.78036, 1.10208, 0.95442, 0.95298, 0.97579, 0.9332, 0.94039, 0.938, 0.80687, 1.01149, 0.80687, 1.02058, 0.80479, 0.99793, 0.99793, 0.99793, 0.99793, 1.01149, 1.00872, 0.90088, 0.91882, 1.0213, 0.8361, 1.02058, 0.62295, 0.54324, 0.89022, 1.08595, 1, 1, 0.90088, 1, 0.97455, 0.93582, 0.90088, 1, 1.05686, 0.8361, 0.99642, 0.99642, 0.99642, 0.72851, 0.90838, 0.90838, 0.90838, 0.90838, 0.90838, 0.90838, 0.868, 0.82391, 0.80061, 0.80061, 0.80061, 0.80061, 1.0258, 1.0258, 1.0258, 1.0258, 0.97484, 0.95546, 0.92179, 0.92179, 0.92179, 0.92179, 0.92179, 1.02058, 0.92179, 0.94438, 0.94438, 0.94438, 0.94438, 0.90406, 0.86958, 0.98225, 0.94938, 0.94938, 0.94938, 0.94938, 0.94938, 0.94938, 0.9031, 0.81093, 0.94938, 0.94938, 0.94938, 0.94938, 0.98621, 0.98621, 0.98621, 0.98621, 0.93969, 0.95933, 0.9446, 0.9446, 0.9446, 0.9446, 0.9446, 1.08595, 0.9446, 0.95442, 0.95442, 0.95442, 0.95442, 0.94039, 0.97898, 0.94039, 0.90838, 0.94938, 0.90838, 0.94938, 0.90838, 0.94938, 0.82391, 0.81093, 0.82391, 0.81093, 0.82391, 0.81093, 0.82391, 0.81093, 0.96376, 0.84313, 0.97484, 0.97571, 0.80061, 0.94938, 0.80061, 0.94938, 0.80061, 0.94938, 0.80061, 0.94938, 0.80061, 0.94938, 0.8768, 0.9577, 0.8768, 0.9577, 0.8768, 0.9577, 1, 1, 0.95407, 0.95933, 0.97069, 0.95933, 1.0258, 0.98621, 1.0258, 0.98621, 1.0258, 0.98621, 1.0258, 0.98621, 1.0258, 0.98621, 0.887, 1.01591, 0.73901, 1.0474, 1, 1, 0.97455, 0.83655, 0.98981, 1, 1, 0.83655, 0.73977, 0.83655, 0.73903, 0.84638, 1.033, 0.95546, 0.95933, 1, 1, 0.95546, 0.95933, 0.8271, 0.95417, 0.95933, 0.92179, 0.9446, 0.92179, 0.9446, 0.92179, 0.9446, 0.936, 0.91964, 0.82114, 0.97646, 1, 1, 0.82114, 0.97646, 0.8096, 0.78036, 0.8096, 0.78036, 1, 1, 0.8096, 0.78036, 1, 1, 0.89713, 0.77452, 0.89713, 1.10208, 0.94438, 0.95442, 0.94438, 0.95442, 0.94438, 0.95442, 0.94438, 0.95442, 0.94438, 0.95442, 0.94438, 0.95442, 0.94083, 0.97579, 0.90406, 0.94039, 0.90406, 0.9446, 0.938, 0.9446, 0.938, 0.9446, 0.938, 1, 0.99793, 0.90838, 0.94938, 0.868, 0.9031, 0.92179, 0.9446, 1, 1, 0.89713, 1.10208, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90989, 0.9358, 0.91945, 0.83181, 0.75261, 0.87992, 0.82976, 0.96034, 0.83689, 0.97268, 1.0078, 0.90838, 0.83637, 0.8019, 0.90157, 0.80061, 0.9446, 0.95407, 0.92436, 1.0258, 0.85022, 0.97153, 1.0156, 0.95546, 0.89192, 0.92179, 0.92361, 0.87107, 0.96318, 0.89713, 0.93704, 0.95638, 0.91905, 0.91709, 0.92796, 1.0258, 0.93704, 0.94836, 1.0373, 0.95933, 1.0078, 0.95871, 0.94836, 0.96174, 0.92601, 0.9498, 0.98607, 0.95776, 0.95933, 1.05453, 1.0078, 0.98275, 0.9314, 0.95617, 0.91701, 1.05993, 0.9446, 0.78367, 0.9553, 1, 0.86832, 1.0128, 0.95871, 0.99394, 0.87548, 0.96361, 0.86774, 1.0078, 0.95871, 0.9446, 0.95871, 0.86774, 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, 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, 0.94083, 0.97579, 0.94083, 0.97579, 0.94083, 0.97579, 0.90406, 0.94039, 0.96694, 1, 0.89903, 1, 1, 1, 0.93582, 0.93582, 0.93582, 1, 0.908, 0.908, 0.918, 0.94219, 0.94219, 0.96544, 1, 1.285, 1, 1, 0.81079, 0.81079, 1, 1, 0.74854, 1, 1, 1, 1, 0.99793, 1, 1, 1, 0.65, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.17173, 1, 0.80535, 0.76169, 1.02058, 1.0732, 1.05486, 1, 1, 1.30692, 1.08595, 1.08595, 1, 1.08595, 1.08595, 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, 1, 1, 1, 1, 1, 1.16161, 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]; 26180const MyriadProBoldMetrics = { 26181 lineHeight: 1.2, 26182 lineGap: 0.2 26183}; 26184const MyriadProBoldItalicFactors = [1.36898, 1, 1, 0.66227, 0.80779, 0.81625, 0.97276, 0.97276, 0.97733, 0.92222, 0.83266, 0.94292, 0.94292, 1.16148, 1.02058, 0.93582, 0.96694, 0.93582, 1.17337, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.97276, 0.78076, 0.78076, 1.02058, 1.02058, 1.02058, 0.71541, 0.76813, 0.85576, 0.80591, 0.80729, 0.94299, 0.77512, 0.83655, 0.86523, 0.92222, 0.9862
vendor: 1,447 bytes, line 26184
261841, 0.71743, 0.81698, 0.79726, 0.98558, 0.92222, 0.90637, 0.83809, 0.90637, 0.80729, 0.76463, 0.86275, 0.90699, 0.91605, 0.9154, 0.85308, 0.85458, 0.90531, 0.94292, 1.21296, 0.94292, 1.02058, 0.89903, 1.18616, 0.99613, 0.91677, 0.78216, 0.91677, 0.90083, 0.98796, 0.9135, 0.92168, 0.95381, 0.98981, 0.95298, 0.95381, 0.93459, 0.92168, 0.91513, 0.92004, 0.91677, 0.95077, 0.748, 1.04502, 0.91677, 0.92061, 0.94236, 0.89544, 0.89364, 0.9, 0.80687, 0.8578, 0.80687, 1.02058, 0.80779, 0.97276, 0.97276, 0.97276, 0.97276, 0.8578, 0.99973, 1.18616, 0.91339, 1.08074, 0.82891, 1.02058, 0.55509, 0.71526, 0.89022, 1.08595, 1, 1, 1.18616, 1, 0.96736, 0.93582, 1.18616, 1, 1.04864, 0.82711, 0.99043, 0.99043, 0.99043, 0.71541, 0.85576, 0.85576, 0.85576, 0.85576, 0.85576, 0.85576, 0.845, 0.80729, 0.77512, 0.77512, 0.77512, 0.77512, 0.98621, 0.98621, 0.98621, 0.98621, 0.95961, 0.92222, 0.90637, 0.90637, 0.90637, 0.90637, 0.90637, 1.02058, 0.90251, 0.90699, 0.90699, 0.90699, 0.90699, 0.85458, 0.83659, 0.94951, 0.99613, 0.99613, 0.99613, 0.99613, 0.99613, 0.99613, 0.85811, 0.78216, 0.90083, 0.90083, 0.90083, 0.90083, 0.95381, 0.95381, 0.95381, 0.95381, 0.9135, 0.92168, 0.91513, 0.91513, 0.91513, 0.91513, 0.91513, 1.08595, 0.91677, 0.91677, 0.91677, 0.91677, 0.91677, 0.89364, 0.92332, 0.89364, 0.85576, 0.99613, 0.85576, 0.99613, 0.85576, 0.99613, 0.80729, 0.78216, 0.80729, 0.78216, 0.80729, 0.78216, 0.80729, 0.78216, 0.94299, 0.76783, 0.95961, 0.916
vendor: 38,091 bytes, lines 26184-26420
2618477, 0.77512, 0.90083, 0.77512, 0.90083, 0.77512, 0.90083, 0.77512, 0.90083, 0.77512, 0.90083, 0.86523, 0.9135, 0.86523, 0.9135, 0.86523, 0.9135, 1, 1, 0.92222, 0.92168, 0.92222, 0.92168, 0.98621, 0.95381, 0.98621, 0.95381, 0.98621, 0.95381, 0.98621, 0.95381, 0.98621, 0.95381, 0.86036, 0.97096, 0.71743, 0.98981, 1, 1, 0.95298, 0.79726, 0.95381, 1, 1, 0.79726, 0.6894, 0.79726, 0.74321, 0.81691, 1.0006, 0.92222, 0.92168, 1, 1, 0.92222, 0.92168, 0.79464, 0.92098, 0.92168, 0.90637, 0.91513, 0.90637, 0.91513, 0.90637, 0.91513, 0.909, 0.87514, 0.80729, 0.95077, 1, 1, 0.80729, 0.95077, 0.76463, 0.748, 0.76463, 0.748, 1, 1, 0.76463, 0.748, 1, 1, 0.86275, 0.72651, 0.86275, 1.04502, 0.90699, 0.91677, 0.90699, 0.91677, 0.90699, 0.91677, 0.90699, 0.91677, 0.90699, 0.91677, 0.90699, 0.91677, 0.9154, 0.94236, 0.85458, 0.89364, 0.85458, 0.90531, 0.9, 0.90531, 0.9, 0.90531, 0.9, 1, 0.97276, 0.85576, 0.99613, 0.845, 0.85811, 0.90251, 0.91677, 1, 1, 0.86275, 1.04502, 1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.18616, 1.00899, 1.30628, 0.85576, 0.80178, 0.66862, 0.7927, 0.69323, 0.88127, 0.72459, 0.89711, 0.95381, 0.85576, 0.80591, 0.7805, 0.94729, 0.77512, 0.90531, 0.92222, 0.90637, 0.98621, 0.81698, 0.92655, 0.98558, 0.92222, 0.85359, 0.90637, 0.90976, 0.83809, 0.94523, 0.86275, 0.83509, 0.93157, 0.85308, 0.83392, 0.92346, 0.98621, 0.83509, 0.92886, 0.91324, 0.92168, 0.95381, 0.90646, 0.92886, 0.90557, 0.86847, 0.90276, 0.91324, 0.86842, 0.92168, 0.99531, 0.95381, 0.9224, 0.85408, 0.92699, 0.86847, 1.0051, 0.91513, 0.80487, 0.93481, 1, 0.88159, 1.05214, 0.90646, 0.97355, 0.81539, 0.89398, 0.85923, 0.95381, 0.90646, 0.91513, 0.90646, 0.85923, 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, 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, 0.9154, 0.94236, 0.9154, 0.94236, 0.9154, 0.94236, 0.85458, 0.89364, 0.96694, 1, 0.89903, 1, 1, 1, 0.91782, 0.91782, 0.91782, 1, 0.896, 0.896, 0.896, 0.9332, 0.9332, 0.95973, 1, 1.26, 1, 1, 0.80479, 0.80178, 1, 1, 0.85633, 1, 1, 1, 1, 0.97276, 1, 1, 1, 0.698, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.14542, 1, 0.79199, 0.78694, 1.02058, 1.03493, 1.05486, 1, 1, 1.23026, 1.08595, 1.08595, 1, 1.08595, 1.08595, 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, 1, 1, 1, 1, 1, 1.20006, 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]; 26185const MyriadProBoldItalicMetrics = { 26186 lineHeight: 1.2, 26187 lineGap: 0.2 26188}; 26189const MyriadProItalicFactors = [1.36898, 1, 1, 0.65507, 0.84943, 0.85639, 0.88465, 0.88465, 0.86936, 0.88307, 0.86948, 0.85283, 0.85283, 1.06383, 1.02058, 0.75945, 0.9219, 0.75945, 1.17337, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.88465, 0.75945, 0.75945, 1.02058, 1.02058, 1.02058, 0.69046, 0.70926, 0.85158, 0.77812, 0.76852, 0.89591, 0.70466, 0.76125, 0.80094, 0.86822, 0.83864, 0.728, 0.77212, 0.79475, 0.93637, 0.87514, 0.8588, 0.76013, 0.8588, 0.72421, 0.69866, 0.77598, 0.85991, 0.80811, 0.87832, 0.78112, 0.77512, 0.8562, 1.0222, 1.18417, 1.0222, 1.27014, 0.89903, 1.15012, 0.93859, 0.94399, 0.846, 0.94399, 0.81453, 1.0186, 0.94219, 0.96017, 1.03075, 1.02175, 0.912, 1.03075, 0.96998, 0.96017, 0.93859, 0.94399, 0.94399, 0.95493, 0.746, 1.12658, 0.94578, 0.91, 0.979, 0.882, 0.882, 0.83, 0.85034, 0.83537, 0.85034, 1.02058, 0.70869, 0.88465, 0.88465, 0.88465, 0.88465, 0.83537, 0.90083, 1.15012, 0.9161, 0.94565, 0.73541, 1.02058, 0.53609, 0.69353, 0.79519, 1.08595, 1, 1, 1.15012, 1, 0.91974, 0.75945, 1.15012, 1, 0.9446, 0.73361, 0.9005, 0.9005, 0.9005, 0.62864, 0.85158, 0.85158, 0.85158, 0.85158, 0.85158, 0.85158, 0.773, 0.76852, 0.70466, 0.70466, 0.70466, 0.70466, 0.83864, 0.83864, 0.83864, 0.83864, 0.90561, 0.87514, 0.8588, 0.8588, 0.8588, 0.8588, 0.8588, 1.02058, 0.85751, 0.85991, 0.85991, 0.85991, 0.85991, 0.77512, 0.76013, 0.88075, 0.93859, 0.93859, 0.93859, 0.93859, 0.93859, 0.93859, 0.8075, 0.846, 0.81453, 0.81453, 0.81453, 0.81453, 0.82424, 0.82424, 0.82424, 0.82424, 0.9278, 0.96017, 0.93859, 0.93859, 0.93859, 0.93859, 0.93859, 1.08595, 0.8562, 0.94578, 0.94578, 0.94578, 0.94578, 0.882, 0.94578, 0.882, 0.85158, 0.93859, 0.85158, 0.93859, 0.85158, 0.93859, 0.76852, 0.846, 0.76852, 0.846, 0.76852, 0.846, 0.76852, 0.846, 0.89591, 0.8544, 0.90561, 0.94399, 0.70466, 0.81453, 0.70466, 0.81453, 0.70466, 0.81453, 0.70466, 0.81453, 0.70466, 0.81453, 0.80094, 0.94219, 0.80094, 0.94219, 0.80094, 0.94219, 1, 1, 0.86822, 0.96017, 0.86822, 0.96017, 0.83864, 0.82424, 0.83864, 0.82424, 0.83864, 0.82424, 0.83864, 1.03075, 0.83864, 0.82424, 0.81402, 1.02738, 0.728, 1.02175, 1, 1, 0.912, 0.79475, 1.03075, 1, 1, 0.79475, 0.83911, 0.79475, 0.66266, 0.80553, 1.06676, 0.87514, 0.96017, 1, 1, 0.87514, 0.96017, 0.86865, 0.87396, 0.96017, 0.8588, 0.93859, 0.8588, 0.93859, 0.8588, 0.93859, 0.867, 0.84759, 0.72421, 0.95493, 1, 1, 0.72421, 0.95493, 0.69866, 0.746, 0.69866, 0.746, 1, 1, 0.69866, 0.746, 1, 1, 0.77598, 0.88417, 0.77598, 1.12658, 0.85991, 0.94578, 0.85991, 0.94578, 0.85991, 0.94578, 0.85991, 0.94578, 0.85991, 0.94578, 0.85991, 0.94578, 0.87832, 0.979, 0.77512, 0.882, 0.77512, 0.8562, 0.83, 0.8562, 0.83, 0.8562, 0.83, 1, 0.88465, 0.85158, 0.93859, 0.773, 0.8075, 0.85751, 0.8562, 1, 1, 0.77598, 1.12658, 1.15012, 1.15012, 1.15012, 1.15012, 1.15012, 1.15313, 1.15012, 1.15012, 1.15012, 1.08106, 1.03901, 0.85158, 0.77025, 0.62264, 0.7646, 0.65351, 0.86026, 0.69461, 0.89947, 1.03075, 0.85158, 0.77812, 0.76449, 0.88836, 0.70466, 0.8562, 0.86822, 0.8588, 0.83864, 0.77212, 0.85308, 0.93637, 0.87514, 0.82352, 0.8588, 0.85701, 0.76013, 0.89058, 0.77598, 0.8156, 0.82565, 0.78112, 0.77899, 0.89386, 0.83864, 0.8156, 0.9486, 0.92388, 0.96186, 1.03075, 0.91123, 0.9486, 0.93298, 0.878, 0.93942, 0.92388, 0.84596, 0.96186, 0.95119, 1.03075, 0.922, 0.88787, 0.95829, 0.88, 0.93559, 0.93859, 0.78815, 0.93758, 1, 0.89217, 1.03737, 0.91123, 0.93969, 0.77487, 0.85769, 0.86799, 1.03075, 0.91123, 0.93859, 0.91123, 0.86799, 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, 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, 0.87832, 0.979, 0.87832, 0.979, 0.87832, 0.979, 0.77512, 0.882, 0.9219, 1, 0.89903, 1, 1, 1, 0.87321, 0.87321, 0.87321, 1, 1.027, 1.027, 1.027, 0.86847, 0.86847, 0.79121, 1, 1.124, 1, 1, 0.73572, 0.73572, 1, 1, 0.85034, 1, 1, 1, 1, 0.88465, 1, 1, 1, 0.669, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.04828, 1, 0.74948, 0.75187, 1.02058, 0.98391, 1.02119, 1, 1, 1.06233, 1.08595, 1.08595, 1, 1.08595, 1.08595, 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, 1, 1, 1, 1, 1, 1.05233, 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]; 26190const MyriadProItalicMetrics = { 26191 lineHeight: 1.2, 26192 lineGap: 0.2 26193}; 26194const MyriadProRegularFactors = [1.36898, 1, 1, 0.76305, 0.82784, 0.94935, 0.89364, 0.92241, 0.89073, 0.90706, 0.98472, 0.85283, 0.85283, 1.0664, 1.02058, 0.74505, 0.9219, 0.74505, 1.23456, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.92241, 0.74505, 0.74505, 1.02058, 1.02058, 1.02058, 0.73002, 0.72601, 0.91755, 0.8126, 0.80314, 0.92222, 0.73764, 0.79726, 0.83051, 0.90284, 0.86023, 0.74, 0.8126, 0.84869, 0.96518, 0.91115, 0.8858, 0.79761, 0.8858, 0.74498, 0.73914, 0.81363, 0.89591, 0.83659, 0.89633, 0.85608, 0.8111, 0.90531, 1.0222, 1.22736, 1.0222, 1.27014, 0.89903, 0.90088, 0.86667, 1.0231, 0.896, 1.01411, 0.90083, 1.05099, 1.00512, 0.99793, 1.05326, 1.09377, 0.938, 1.06226, 1.00119, 0.99793, 0.98714, 1.0231, 1.01231, 0.98196, 0.792, 1.19137, 0.99074, 0.962, 1.01915, 0.926, 0.942, 0.856, 0.85034, 0.92006, 0.85034, 1.02058, 0.69067, 0.92241, 0.92241, 0.92241, 0.92241, 0.92006, 0.9332, 0.90088, 0.91882, 0.93484, 0.75339, 1.02058, 0.56866, 0.54324, 0.79519, 1.08595, 1, 1, 0.90088, 1, 0.95325, 0.74505, 0.90088, 1, 0.97198, 0.75339, 0.91009, 0.91009, 0.91009, 0.66466, 0.91755, 0.91755, 0.91755, 0.91755, 0.91755, 0.91755, 0.788, 0.80314, 0.73764, 0.73764, 0.73764, 0.73764, 0.86023, 0.86023, 0.86023, 0.86023, 0.92915, 0.91115, 0.8858, 0.8858, 0.8858, 0.8858, 0.8858, 1.02058, 0.8858, 0.89591, 0.89591, 0.89591, 0.89591, 0.8111, 0.79611, 0.89713, 0.86667, 0.86667, 0.86667, 0.86667, 0.86667, 0.86667, 0.86936, 0.896, 0.90083, 0.90083, 0.90083, 0.90083, 0.84224, 0.84224, 0.84224, 0.84224, 0.97276, 0.99793, 0.98714, 0.98714, 0.98714, 0.98714, 0.98714, 1.08595, 0.89876, 0.99074, 0.99074, 0.99074, 0.99074, 0.942, 1.0231, 0.942, 0.91755, 0.86667, 0.91755, 0.86667, 0.91755, 0.86667, 0.80314, 0.896, 0.80314, 0.896, 0.80314, 0.896, 0.80314, 0.896, 0.92222, 0.93372, 0.92915, 1.01411, 0.73764, 0.90083, 0.73764, 0.90083, 0.73764, 0.90083, 0.73764, 0.90083, 0.73764, 0.90083, 0.83051, 1.00512, 0.83051, 1.00512, 0.83051, 1.00512, 1, 1, 0.90284, 0.99793, 0.90976, 0.99793, 0.86023, 0.84224, 0.86023, 0.84224, 0.86023, 0.84224, 0.86023, 1.05326, 0.86023, 0.84224, 0.82873, 1.07469, 0.74, 1.09377, 1, 1, 0.938, 0.84869, 1.06226, 1, 1, 0.84869, 0.83704, 0.84869, 0.81441, 0.85588, 1.08927, 0.91115, 0.99793, 1, 1, 0.91115, 0.99793, 0.91887, 0.90991, 0.99793, 0.8858, 0.98714, 0.8858, 0.98714, 0.8858, 0.98714, 0.894, 0.91434, 0.74498, 0.98196, 1, 1, 0.74498, 0.98196, 0.73914, 0.792, 0.73914, 0.792, 1, 1, 0.73914, 0.792, 1, 1, 0.81363, 0.904, 0.81363, 1.19137, 0.89591, 0.99074, 0.89591, 0.99074, 0.89591, 0.99074, 0.89591, 0.99074, 0.89591, 0.99074, 0.89591, 0.99074, 0.89633, 1.01915, 0.8111, 0.942, 0.8111, 0.90531, 0.856, 0.90531, 0.856, 0.90531, 0.856, 1, 0.92241, 0.91755, 0.86667, 0.788, 0.86936, 0.8858, 0.89876, 1, 1, 0.81363, 1.19137, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90088, 0.90388, 1.03901, 0.92138, 0.78105, 0.7154, 0.86169, 0.80513, 0.94007, 0.82528, 0.98612, 1.06226, 0.91755, 0.8126, 0.81884, 0.92819, 0.73764, 0.90531, 0.90284, 0.8858, 0.86023, 0.8126, 0.91172, 0.96518, 0.91115, 0.83089, 0.8858, 0.87791, 0.79761, 0.89297, 0.81363, 0.88157, 0.89992, 0.85608, 0.81992, 0.94307, 0.86023, 0.88157, 0.95308, 0.98699, 0.99793, 1.06226, 0.95817, 0.95308, 0.97358, 0.928, 0.98088, 0.98699, 0.92761, 0.99793, 0.96017, 1.06226, 0.986, 0.944, 0.95978, 0.938, 0.96705, 0.98714, 0.80442, 0.98972, 1, 0.89762, 1.04552, 0.95817, 0.99007, 0.87064, 0.91879, 0.88888, 1.06226, 0.95817, 0.98714, 0.95817, 0.88888, 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, 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, 0.89633, 1.01915, 0.89633, 1.01915, 0.89633, 1.01915, 0.8111, 0.942, 0.9219, 1, 0.89903, 1, 1, 1, 0.93173, 0.93173, 0.93173, 1, 1.06304, 1.06304, 1.06904, 0.89903, 0.89903, 0.80549, 1, 1.156, 1, 1, 0.76575, 0.76575, 1, 1, 0.72458, 1, 1, 1, 1, 0.92241, 1, 1, 1, 0.619, 1, 1.36145, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.07257, 1, 0.74705, 0.71119, 1.02058, 1.024, 1.02119, 1, 1, 1.1536, 1.08595, 1.08595, 1, 1.08595, 1.08595, 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, 1, 1, 1, 1, 1, 1.05638, 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]; 26195const MyriadProRegularMetrics = { 26196 lineHeight: 1.2, 26197 lineGap: 0.2 26198}; 26199 26200;// ./src/core/segoeui_factors.js 26201const SegoeuiBoldFactors = [1.76738, 1, 1, 0.99297, 0.9824, 1.04016, 1.06497, 1.03424, 0.97529, 1.17647, 1.23203, 1.1085, 1.1085, 1.16939, 1.2107, 0.9754, 1.21408, 0.9754, 1.59578, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 1.03424, 0.81378, 0.81378, 1.2107, 1.2107, 1.2107, 0.71703, 0.97847, 0.97363, 0.88776, 0.8641, 1.02096, 0.79795, 0.85132, 0.914, 1.06085, 1.1406, 0.8007, 0.89858, 0.83693, 1.14889, 1.09398, 0.97489, 0.92094, 0.97489, 0.90399, 0.84041, 0.95923, 1.00135, 1, 1.06467, 0.98243, 0.90996, 0.99361, 1.1085, 1.56942, 1.1085, 1.2107, 0.74627, 0.94282, 0.96752, 1.01519, 0.86304, 1.01359, 0.97278, 1.15103, 1.01359, 0.98561, 1.02285, 1.02285, 1.00527, 1.02285, 1.0302, 0.99041, 1.0008, 1.01519, 1.01359, 1.02258, 0.79104, 1.16862, 0.99041, 0.97454, 1.02511, 0.99298, 0.96752, 0.95801, 0.94856, 1.16579, 0.94856, 1.2107, 0.9824, 1.03424, 1.03424, 1, 1.03424, 1.16579, 0.8727, 1.3871, 1.18622, 1.10818, 1.04478, 1.2107, 1.18622, 0.75155, 0.94994, 1.28826, 1.21408, 1.21408, 0.91056, 1, 0.91572, 0.9754, 0.64663, 1.18328, 1.24866, 1.04478, 1.14169, 1.15749, 1.17389, 0.71703, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.93506, 0.8641, 0.79795, 0.79795, 0.79795, 0.79795, 1.1406, 1.1406, 1.1406, 1.1406, 1.02096, 1.09398, 0.97426, 0.97426, 0.97426, 0.97426, 0.97426, 1.2107, 0.97489, 1.00135, 1.00135, 1.00135, 1.00135, 0.90996, 0.92094, 1.02798, 0.96752, 0.96752, 0.96752, 0.96752, 0.96752, 0.96752, 0.93136, 0.86304, 0.97278, 0.97278, 0.97278, 0.97278, 1.02285, 1.02285, 1.02285, 1.02285, 0.97122, 0.99041, 1, 1, 1, 1, 1, 1.28826, 1.0008, 0.99041, 0.99041, 0.99041, 0.99041, 0.96752, 1.01519, 0.96752, 0.97363, 0.96752, 0.97363, 0.96752, 0.97363, 0.96752, 0.8641, 0.86304, 0.8641, 0.86304, 0.8641, 0.86304, 0.8641, 0.86304, 1.02096, 1.03057, 1.02096, 1.03517, 0.79795, 0.97278, 0.79795, 0.97278, 0.79795, 0.97278, 0.79795, 0.97278, 0.79795, 0.97278, 0.914, 1.01359, 0.914, 1.01359, 0.914, 1.01359, 1, 1, 1.06085, 0.98561, 1.06085, 1.00879, 1.1406, 1.02285, 1.1406, 1.02285, 1.1406, 1.02285, 1.1406, 1.02285, 1.1406, 1.02285, 0.97138, 1.08692, 0.8007, 1.02285, 1, 1, 1.00527, 0.83693, 1.02285, 1, 1, 0.83693, 0.9455, 0.83693, 0.90418, 0.83693, 1.13005, 1.09398, 0.99041, 1, 1, 1.09398, 0.99041, 0.96692, 1.09251, 0.99041, 0.97489, 1.0008, 0.97489, 1.0008, 0.97489, 1.0008, 0.93994, 0.97931, 0.90399, 1.02258, 1, 1, 0.90399, 1.02258, 0.84041, 0.79104, 0.84041, 0.79104, 0.84041, 0.79104, 0.84041, 0.79104, 1, 1, 0.95923, 1.07034, 0.95923, 1.16862, 1.00135, 0.99041, 1.00135, 0.99041, 1.00135, 0.99041, 1.00135, 0.99041, 1.00135, 0.99041, 1.00135, 0.99041, 1.06467, 1.02511, 0.90996, 0.96752, 0.90996, 0.99361, 0.95801, 0.99361, 0.95801, 0.99361, 0.95801, 1.07733, 1.03424, 0.97363, 0.96752, 0.93506, 0.93136, 0.97489, 1.0008, 1, 1, 0.95923, 1.16862, 1.15103, 1.15103, 1.01173, 1.03959, 0.75953, 0.81378, 0.79912, 1.15103, 1.21994, 0.95161, 0.87815, 1.01149, 0.81525, 0.7676, 0.98167, 1.01134, 1.02546, 0.84097, 1.03089, 1.18102, 0.97363, 0.88776, 0.85134, 0.97826, 0.79795, 0.99361, 1.06085, 0.97489, 1.1406, 0.89858, 1.0388, 1.14889, 1.09398, 0.86039, 0.97489, 1.0595, 0.92094, 0.94793, 0.95923, 0.90996, 0.99346, 0.98243, 1.02112, 0.95493, 1.1406, 0.90996, 1.03574, 1.02597, 1.0008, 1.18102, 1.06628, 1.03574, 1.0192, 1.01932, 1.00886, 0.97531, 1.0106, 1.0008, 1.13189, 1.18102, 1.02277, 0.98683, 1.0016, 0.99561, 1.07237, 1.0008, 0.90434, 0.99921, 0.93803, 0.8965, 1.23085, 1.06628, 1.04983, 0.96268, 1.0499, 0.98439, 1.18102, 1.06628, 1.0008, 1.06628, 0.98439, 0.79795, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.09466, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.97278, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.02065, 1, 1, 1, 1, 1, 1, 1.06467, 1.02511, 1.06467, 1.02511, 1.06467, 1.02511, 0.90996, 0.96752, 1, 1.21408, 0.89903, 1, 1, 0.75155, 1.04394, 1.04394, 1.04394, 1.04394, 0.98633, 0.98633, 0.98633, 0.73047, 0.73047, 1.20642, 0.91211, 1.25635, 1.222, 1.02956, 1.03372, 1.03372, 0.96039, 1.24633, 1, 1.12454, 0.93503, 1.03424, 1.19687, 1.03424, 1, 1, 1, 0.771, 1, 1, 1.15749, 1.15749, 1.15749, 1.10948, 0.86279, 0.94434, 0.86279, 0.94434, 0.86182, 1, 1, 1.16897, 1, 0.96085, 0.90137, 1.2107, 1.18416, 1.13973, 0.69825, 0.9716, 2.10339, 1.29004, 1.29004, 1.21172, 1.29004, 1.29004, 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.42603, 1, 0.99862, 0.99862, 1, 0.87025, 0.87025, 0.87025, 0.87025, 1.18874, 1.42603, 1, 1.42603, 1.42603, 0.99862, 1, 1, 1, 1, 1, 1.2886, 1.04315, 1.15296, 1.34163, 1, 1, 1, 1.09193, 1.09193, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26202const SegoeuiBoldMetrics = { 26203 lineHeight: 1.33008, 26204 lineGap: 0 26205}; 26206const SegoeuiBoldItalicFactors = [1.76738, 1, 1, 0.98946, 1.03959, 1.04016, 1.02809, 1.036, 0.97639, 1.10953, 1.23203, 1.11144, 1.11144, 1.16939, 1.21237, 0.9754, 1.21261, 0.9754, 1.59754, 1.036, 1.036, 1.036, 1.036, 1.036, 1.036, 1.036, 1.036, 1.036, 1.036, 0.81378, 0.81378, 1.21237, 1.21237, 1.21237, 0.73541, 0.97847, 0.97363, 0.89723, 0.87897, 1.0426, 0.79429, 0.85292, 0.91149, 1.05815, 1.1406, 0.79631, 0.90128, 0.83853, 1.04396, 1.10615, 0.97552, 0.94436, 0.97552, 0.88641, 0.80527, 0.96083, 1.00135, 1, 1.06777, 0.9817, 0.91142, 0.99361, 1.11144, 1.57293, 1.11144, 1.21237, 0.74627, 1.31818, 1.06585, 0.97042, 0.83055, 0.97042, 0.93503, 1.1261, 0.97042, 0.97922, 1.14236, 0.94552, 1.01054, 1.14236, 1.02471, 0.97922, 0.94165, 0.97042, 0.97042, 1.0276, 0.78929, 1.1261, 0.97922, 0.95874, 1.02197, 0.98507, 0.96752, 0.97168, 0.95107, 1.16579, 0.95107, 1.21237, 1.03959, 1.036, 1.036, 1, 1.036, 1.16579, 0.87357, 1.31818, 1.18754, 1.26781, 1.05356, 1.21237, 1.18622, 0.79487, 0.94994, 1.29004, 1.24047, 1.24047, 1.31818, 1, 0.91484, 0.9754, 1.31818, 1.1349, 1.24866, 1.05356, 1.13934, 1.15574, 1.17389, 0.73541, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.97363, 0.94385, 0.87897, 0.79429, 0.79429, 0.79429, 0.79429, 1.1406, 1.1406, 1.1406, 1.1406, 1.0426, 1.10615, 0.97552, 0.97552, 0.97552, 0.97552, 0.97552, 1.21237, 0.97552, 1.00135, 1.00135, 1.00135, 1.00135, 0.91142, 0.94436, 0.98721, 1.06585, 1.06585, 1.06585, 1.06585, 1.06585, 1.06585, 0.96705, 0.83055, 0.93503, 0.93503, 0.93503, 0.93503, 1.14236, 1.14236, 1.14236, 1.14236, 0.93125, 0.97922, 0.94165, 0.94165, 0.94165, 0.94165, 0.94165, 1.29004, 0.94165, 0.97922, 0.97922, 0.97922, 0.97922, 0.96752, 0.97042, 0.96752, 0.97363, 1.06585, 0.97363, 1.06585, 0.97363, 1.06585, 0.87897, 0.83055, 0.87897, 0.83055, 0.87897, 0.83055, 0.87897, 0.83055, 1.0426, 1.0033, 1.0426, 0.97042, 0.79429, 0.93503, 0.79429, 0.93503, 0.79429, 0.93503, 0.79429, 0.93503, 0.79429, 0.93503, 0.91149, 0.97042, 0.91149, 0.97042, 0.91149, 0.97042, 1, 1, 1.05815, 0.97922, 1.05815, 0.97922, 1.1406, 1.14236, 1.1406, 1.14236, 1.1406, 1.14236, 1.1406, 1.14236, 1.1406, 1.14236, 0.97441, 1.04302, 0.79631, 1.01582, 1, 1, 1.01054, 0.83853, 1.14236, 1, 1, 0.83853, 1.09125, 0.83853, 0.90418, 0.83853, 1.19508, 1.10615, 0.97922, 1, 1, 1.10615, 0.97922, 1.01034, 1.10466, 0.97922, 0.97552, 0.94165, 0.97552, 0.94165, 0.97552, 0.94165, 0.91602, 0.91981, 0.88641, 1.0276, 1, 1, 0.88641, 1.0276, 0.80527, 0.78929, 0.80527, 0.78929, 0.80527, 0.78929, 0.80527, 0.78929, 1, 1, 0.96083, 1.05403, 0.95923, 1.16862, 1.00135, 0.97922, 1.00135, 0.97922, 1.00135, 0.97922, 1.00135, 0.97922, 1.00135, 0.97922, 1.00135, 0.97922, 1.06777, 1.02197, 0.91142, 0.96752, 0.91142, 0.99361, 0.97168, 0.99361, 0.97168, 0.99361, 0.97168, 1.23199, 1.036, 0.97363, 1.06585, 0.94385, 0.96705, 0.97552, 0.94165, 1, 1, 0.96083, 1.1261, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 1.31818, 0.95161, 1.27126, 1.00811, 0.83284, 0.77702, 0.99137, 0.95253, 1.0347, 0.86142, 1.07205, 1.14236, 0.97363, 0.89723, 0.86869, 1.09818, 0.79429, 0.99361, 1.05815, 0.97552, 1.1406, 0.90128, 1.06662, 1.04396, 1.10615, 0.84918, 0.97552, 1.04694, 0.94436, 0.98015, 0.96083, 0.91142, 1.00356, 0.9817, 1.01945, 0.98999, 1.1406, 0.91142, 1.04961, 0.9898, 1.00639, 1.14236, 1.07514, 1.04961, 0.99607, 1.02897, 1.008, 0.9898, 0.95134, 1.00639, 1.11121, 1.14236, 1.00518, 0.97981, 1.02186, 1, 1.08578, 0.94165, 0.99314, 0.98387, 0.93028, 0.93377, 1.35125, 1.07514, 1.10687, 0.93491, 1.04232, 1.00351, 1.14236, 1.07514, 0.94165, 1.07514, 1.00351, 0.79429, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.09097, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.93503, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.96609, 1, 1, 1, 1, 1, 1, 1.06777, 1.02197, 1.06777, 1.02197, 1.06777, 1.02197, 0.91142, 0.96752, 1, 1.21261, 0.89903, 1, 1, 0.75155, 1.04745, 1.04745, 1.04745, 1.04394, 0.98633, 0.98633, 0.98633, 0.72959, 0.72959, 1.20502, 0.91406, 1.26514, 1.222, 1.02956, 1.03372, 1.03372, 0.96039, 1.24633, 1, 1.09125, 0.93327, 1.03336, 1.16541, 1.036, 1, 1, 1, 0.771, 1, 1, 1.15574, 1.15574, 1.15574, 1.15574, 0.86364, 0.94434, 0.86279, 0.94434, 0.86224, 1, 1, 1.16798, 1, 0.96085, 0.90068, 1.21237, 1.18416, 1.13904, 0.69825, 0.9716, 2.10339, 1.29004, 1.29004, 1.21339, 1.29004, 1.29004, 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.42603, 1, 0.99862, 0.99862, 1, 0.87025, 0.87025, 0.87025, 0.87025, 1.18775, 1.42603, 1, 1.42603, 1.42603, 0.99862, 1, 1, 1, 1, 1, 1.2886, 1.04315, 1.15296, 1.34163, 1, 1, 1, 1.13269, 1.13269, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26207const SegoeuiBoldItalicMetrics = { 26208 lineHeight: 1.33008, 26209 lineGap: 0 26210}; 26211const SegoeuiItalicFactors = [1.76738, 1, 1, 0.98946, 1.14763, 1.05365, 1.06234, 0.96927, 0.92586, 1.15373, 1.18414, 0.91349, 0.91349, 1.07403, 1.17308, 0.78383, 1.20088, 0.78383, 1.42531, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.78383, 0.78383, 1.17308, 1.17308, 1.17308, 0.77349, 0.94565, 0.94729, 0.85944, 0.88506, 0.9858, 0.74817, 0.80016, 0.88449, 0.98039, 0.95782, 0.69238, 0.89898, 0.83231, 0.98183, 1.03989, 0.96924, 0.86237, 0.96924, 0.80595, 0.74524, 0.86091, 0.95402, 0.94143, 0.98448, 0.8858, 0.83089, 0.93285, 1.0949, 1.39016, 1.0949, 1.45994, 0.74627, 1.04839, 0.97454, 0.97454, 0.87207, 0.97454, 0.87533, 1.06151, 0.97454, 1.00176, 1.16484, 1.08132, 0.98047, 1.16484, 1.02989, 1.01054, 0.96225, 0.97454, 0.97454, 1.06598, 0.79004, 1.16344, 1.00351, 0.94629, 0.9973, 0.91016, 0.96777, 0.9043, 0.91082, 0.92481, 0.91082, 1.17308, 0.95748, 0.96927, 0.96927, 1, 0.96927, 0.92481, 0.80597, 1.04839, 1.23393, 1.1781, 0.9245, 1.17308, 1.20808, 0.63218, 0.94261, 1.24822, 1.09971, 1.09971, 1.04839, 1, 0.85273, 0.78032, 1.04839, 1.09971, 1.22326, 0.9245, 1.09836, 1.13525, 1.15222, 0.70424, 0.94729, 0.94729, 0.94729, 0.94729, 0.94729, 0.94729, 0.85498, 0.88506, 0.74817, 0.74817, 0.74817, 0.74817, 0.95782, 0.95782, 0.95782, 0.95782, 0.9858, 1.03989, 0.96924, 0.96924, 0.96924, 0.96924, 0.96924, 1.17308, 0.96924, 0.95402, 0.95402, 0.95402, 0.95402, 0.83089, 0.86237, 0.88409, 0.97454, 0.97454, 0.97454, 0.97454, 0.97454, 0.97454, 0.92916, 0.87207, 0.87533, 0.87533, 0.87533, 0.87533, 0.93146, 0.93146, 0.93146, 0.93146, 0.93854, 1.01054, 0.96225, 0.96225, 0.96225, 0.96225, 0.96225, 1.24822, 0.8761, 1.00351, 1.00351, 1.00351, 1.00351, 0.96777, 0.97454, 0.96777, 0.94729, 0.97454, 0.94729, 0.97454, 0.94729, 0.97454, 0.88506, 0.87207, 0.88506, 0.87207, 0.88506, 0.87207, 0.88506, 0.87207, 0.9858, 0.95391, 0.9858, 0.97454, 0.74817, 0.87533, 0.74817, 0.87533, 0.74817, 0.87533, 0.74817, 0.87533, 0.74817, 0.87533, 0.88449, 0.97454, 0.88449, 0.97454, 0.88449, 0.97454, 1, 1, 0.98039, 1.00176, 0.98039, 1.00176, 0.95782, 0.93146, 0.95782, 0.93146, 0.95782, 0.93146, 0.95782, 1.16484, 0.95782, 0.93146, 0.84421, 1.12761, 0.69238, 1.08132, 1, 1, 0.98047, 0.83231, 1.16484, 1, 1, 0.84723, 1.04861, 0.84723, 0.78755, 0.83231, 1.23736, 1.03989, 1.01054, 1, 1, 1.03989, 1.01054, 0.9857, 1.03849, 1.01054, 0.96924, 0.96225, 0.96924, 0.96225, 0.96924, 0.96225, 0.92383, 0.90171, 0.80595, 1.06598, 1, 1, 0.80595, 1.06598, 0.74524, 0.79004, 0.74524, 0.79004, 0.74524, 0.79004, 0.74524, 0.79004, 1, 1, 0.86091, 1.02759, 0.85771, 1.16344, 0.95402, 1.00351, 0.95402, 1.00351, 0.95402, 1.00351, 0.95402, 1.00351, 0.95402, 1.00351, 0.95402, 1.00351, 0.98448, 0.9973, 0.83089, 0.96777, 0.83089, 0.93285, 0.9043, 0.93285, 0.9043, 0.93285, 0.9043, 1.31868, 0.96927, 0.94729, 0.97454, 0.85498, 0.92916, 0.96924, 0.8761, 1, 1, 0.86091, 1.16344, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 1.04839, 0.81965, 0.81965, 0.94729, 0.78032, 0.71022, 0.90883, 0.84171, 0.99877, 0.77596, 1.05734, 1.2, 0.94729, 0.85944, 0.82791, 0.9607, 0.74817, 0.93285, 0.98039, 0.96924, 0.95782, 0.89898, 0.98316, 0.98183, 1.03989, 0.78614, 0.96924, 0.97642, 0.86237, 0.86075, 0.86091, 0.83089, 0.90082, 0.8858, 0.97296, 1.01284, 0.95782, 0.83089, 1.0976, 1.04, 1.03342, 1.2, 1.0675, 1.0976, 0.98205, 1.03809, 1.05097, 1.04, 0.95364, 1.03342, 1.05401, 1.2, 1.02148, 1.0119, 1.04724, 1.0127, 1.02732, 0.96225, 0.8965, 0.97783, 0.93574, 0.94818, 1.30679, 1.0675, 1.11826, 0.99821, 1.0557, 1.0326, 1.2, 1.0675, 0.96225, 1.0675, 1.0326, 0.74817, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.03754, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.87533, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.98705, 1, 1, 1, 1, 1, 1, 0.98448, 0.9973, 0.98448, 0.9973, 0.98448, 0.9973, 0.83089, 0.96777, 1, 1.20088, 0.89903, 1, 1, 0.75155, 0.94945, 0.94945, 0.94945, 0.94945, 1.12317, 1.12317, 1.12317, 0.67603, 0.67603, 1.15621, 0.73584, 1.21191, 1.22135, 1.06483, 0.94868, 0.94868, 0.95996, 1.24633, 1, 1.07497, 0.87709, 0.96927, 1.01473, 0.96927, 1, 1, 1, 0.77295, 1, 1, 1.09836, 1.09836, 1.09836, 1.01522, 0.86321, 0.94434, 0.8649, 0.94434, 0.86182, 1, 1, 1.083, 1, 0.91578, 0.86438, 1.17308, 1.18416, 1.14589, 0.69825, 0.97622, 1.96791, 1.24822, 1.24822, 1.17308, 1.24822, 1.24822, 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.42603, 1, 0.99862, 0.99862, 1, 0.87025, 0.87025, 0.87025, 0.87025, 1.17984, 1.42603, 1, 1.42603, 1.42603, 0.99862, 1, 1, 1, 1, 1, 1.2886, 1.04315, 1.15296, 1.34163, 1, 1, 1, 1.10742, 1.10742, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26212const SegoeuiItalicMetrics = { 26213 lineHeight: 1.33008, 26214 lineGap: 0 26215}; 26216const SegoeuiRegularFactors = [1.76738, 1, 1, 0.98594, 1.02285, 1.10454, 1.06234, 0.96927, 0.92037, 1.19985, 1.2046, 0.90616, 0.90616, 1.07152, 1.1714, 0.78032, 1.20088, 0.78032, 1.40246, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.96927, 0.78032, 0.78032, 1.1714, 1.1714, 1.1714, 0.80597, 0.94084, 0.96706, 0.85944, 0.85734, 0.97093, 0.75842, 0.79936, 0.88198, 0.9831, 0.95782, 0.71387, 0.86969, 0.84636, 1.07796, 1.03584, 0.96924, 0.83968, 0.96924, 0.82826, 0.79649, 0.85771, 0.95132, 0.93119, 0.98965, 0.88433, 0.8287, 0.93365, 1.08612, 1.3638, 1.08612, 1.45786, 0.74627, 0.80499, 0.91484, 1.05707, 0.92383, 1.05882, 0.9403, 1.12654, 1.05882, 1.01756, 1.09011, 1.09011, 0.99414, 1.09011, 1.034, 1.01756, 1.05356, 1.05707, 1.05882, 1.04399, 0.84863, 1.21968, 1.01756, 0.95801, 1.00068, 0.91797, 0.96777, 0.9043, 0.90351, 0.92105, 0.90351, 1.1714, 0.85337, 0.96927, 0.96927, 0.99912, 0.96927, 0.92105, 0.80597, 1.2434, 1.20808, 1.05937, 0.90957, 1.1714, 1.20808, 0.75155, 0.94261, 1.24644, 1.09971, 1.09971, 0.84751, 1, 0.85273, 0.78032, 0.61584, 1.05425, 1.17914, 0.90957, 1.08665, 1.11593, 1.14169, 0.73381, 0.96706, 0.96706, 0.96706, 0.96706, 0.96706, 0.96706, 0.86035, 0.85734, 0.75842, 0.75842, 0.75842, 0.75842, 0.95782, 0.95782, 0.95782, 0.95782, 0.97093, 1.03584, 0.96924, 0.96924, 0.96924, 0.96924, 0.96924, 1.1714, 0.96924, 0.95132, 0.95132, 0.95132, 0.95132, 0.8287, 0.83968, 0.89049, 0.91484, 0.91484, 0.91484, 0.91484, 0.91484, 0.91484, 0.93575, 0.92383, 0.9403, 0.9403, 0.9403, 0.9403, 0.8717, 0.8717, 0.8717, 0.8717, 1.00527, 1.01756, 1.05356, 1.05356, 1.05356, 1.05356, 1.05356, 1.24644, 0.95923, 1.01756, 1.01756, 1.01756, 1.01756, 0.96777, 1.05707, 0.96777, 0.96706, 0.91484, 0.96706, 0.91484, 0.96706, 0.91484, 0.85734, 0.92383, 0.85734, 0.92383, 0.85734, 0.92383, 0.85734, 0.92383, 0.97093, 1.0969, 0.97093, 1.05882, 0.75842, 0.9403, 0.75842, 0.9403, 0.75842, 0.9403, 0.75842, 0.9403, 0.75842, 0.9403, 0.88198, 1.05882, 0.88198, 1.05882, 0.88198, 1.05882, 1, 1, 0.9831, 1.01756, 0.9831, 1.01756, 0.95782, 0.8717, 0.95782, 0.8717, 0.95782, 0.8717, 0.95782, 1.09011, 0.95782, 0.8717, 0.84784, 1.11551, 0.71387, 1.09011, 1, 1, 0.99414, 0.84636, 1.09011, 1, 1, 0.84636, 1.0536, 0.84636, 0.94298, 0.84636, 1.23297, 1.03584, 1.01756, 1, 1, 1.03584, 1.01756, 1.00323, 1.03444, 1.01756, 0.96924, 1.05356, 0.96924, 1.05356, 0.96924, 1.05356, 0.93066, 0.98293, 0.82826, 1.04399, 1, 1, 0.82826, 1.04399, 0.79649, 0.84863, 0.79649, 0.84863, 0.79649, 0.84863, 0.79649, 0.84863, 1, 1, 0.85771, 1.17318, 0.85771, 1.21968, 0.95132, 1.01756, 0.95132, 1.01756, 0.95132, 1.01756, 0.95132, 1.01756, 0.95132, 1.01756, 0.95132, 1.01756, 0.98965, 1.00068, 0.8287, 0.96777, 0.8287, 0.93365, 0.9043, 0.93365, 0.9043, 0.93365, 0.9043, 1.08571, 0.96927, 0.96706, 0.91484, 0.86035, 0.93575, 0.96924, 0.95923, 1, 1, 0.85771, 1.21968, 1.11437, 1.11437, 0.93109, 0.91202, 0.60411, 0.84164, 0.55572, 1.01173, 0.97361, 0.81818, 0.81818, 0.96635, 0.78032, 0.72727, 0.92366, 0.98601, 1.03405, 0.77968, 1.09799, 1.2, 0.96706, 0.85944, 0.85638, 0.96491, 0.75842, 0.93365, 0.9831, 0.96924, 0.95782, 0.86969, 0.94152, 1.07796, 1.03584, 0.78437, 0.96924, 0.98715, 0.83968, 0.83491, 0.85771, 0.8287, 0.94492, 0.88433, 0.9287, 1.0098, 0.95782, 0.8287, 1.0625, 0.98248, 1.03424, 1.2, 1.01071, 1.0625, 0.95246, 1.03809, 1.04912, 0.98248, 1.00221, 1.03424, 1.05443, 1.2, 1.04785, 0.99609, 1.00169, 1.05176, 0.99346, 1.05356, 0.9087, 1.03004, 0.95542, 0.93117, 1.23362, 1.01071, 1.07831, 1.02512, 1.05205, 1.03502, 1.2, 1.01071, 1.05356, 1.01071, 1.03502, 0.75842, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.03719, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0.9403, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1.04021, 1, 1, 1, 1, 1, 1, 0.98965, 1.00068, 0.98965, 1.00068, 0.98965, 1.00068, 0.8287, 0.96777, 1, 1.20088, 0.89903, 1, 1, 0.75155, 1.03077, 1.03077, 1.03077, 1.03077, 1.13196, 1.13196, 1.13196, 0.67428, 0.67428, 1.16039, 0.73291, 1.20996, 1.22135, 1.06483, 0.94868, 0.94868, 0.95996, 1.24633, 1, 1.07497, 0.87796, 0.96927, 1.01518, 0.96927, 1, 1, 1, 0.77295, 1, 1, 1.10539, 1.10539, 1.11358, 1.06967, 0.86279, 0.94434, 0.86279, 0.94434, 0.86182, 1, 1, 1.083, 1, 0.91578, 0.86507, 1.1714, 1.18416, 1.14589, 0.69825, 0.97622, 1.9697, 1.24822, 1.24822, 1.17238, 1.24822, 1.24822, 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.42603, 1, 0.99862, 0.99862, 1, 0.87025, 0.87025, 0.87025, 0.87025, 1.18083, 1.42603, 1, 1.42603, 1.42603, 0.99862, 1, 1, 1, 1, 1, 1.2886, 1.04315, 1.15296, 1.34163, 1, 1, 1, 1.10938, 1.10938, 1, 1, 1, 1.05425, 1.09971, 1.09971, 1.09971, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]; 26217const SegoeuiRegularMetrics = { 26218 lineHeight: 1.33008, 26219 lineGap: 0 26220}; 26221 26222;// ./src/core/xfa_fonts.js 26223 26224 26225 26226 26227 26228 26229 26230 26231const getXFAFontMap = getLookupTableFactory(function (t) { 26232 t["MyriadPro-Regular"] = t["PdfJS-Fallback-Regular"] = { 26233 name: "LiberationSans-Regular", 26234 factors: MyriadProRegularFactors, 26235 baseWidths: LiberationSansRegularWidths, 26236 baseMapping: LiberationSansRegularMapping, 26237 metrics: MyriadProRegularMetrics 26238 }; 26239 t["MyriadPro-Bold"] = t["PdfJS-Fallback-Bold"] = { 26240 name: "LiberationSans-Bold", 26241 factors: MyriadProBoldFactors, 26242 baseWidths: LiberationSansBoldWidths, 26243 baseMapping: LiberationSansBoldMapping, 26244 metrics: MyriadProBoldMetrics 26245 }; 26246 t["MyriadPro-It"] = t["MyriadPro-Italic"] = t["PdfJS-Fallback-Italic"] = { 26247 name: "LiberationSans-Italic", 26248 factors: MyriadProItalicFactors, 26249 baseWidths: LiberationSansItalicWidths, 26250 baseMapping: LiberationSansItalicMapping, 26251 metrics: MyriadProItalicMetrics 26252 }; 26253 t["MyriadPro-BoldIt"] = t["MyriadPro-BoldItalic"] = t["PdfJS-Fallback-BoldItalic"] = { 26254 name: "LiberationSans-BoldItalic", 26255 factors: MyriadProBoldItalicFactors, 26256 baseWidths: LiberationSansBoldItalicWidths, 26257 baseMapping: LiberationSansBoldItalicMapping, 26258 metrics: MyriadProBoldItalicMetrics 26259 }; 26260 t.ArialMT = t.Arial = t["Arial-Regular"] = { 26261 name: "LiberationSans-Regular", 26262 baseWidths: LiberationSansRegularWidths, 26263 baseMapping: LiberationSansRegularMapping 26264 }; 26265 t["Arial-BoldMT"] = t["Arial-Bold"] = { 26266 name: "LiberationSans-Bold", 26267 baseWidths: LiberationSansBoldWidths, 26268 baseMapping: LiberationSansBoldMapping 26269 }; 26270 t["Arial-ItalicMT"] = t["Arial-Italic"] = { 26271 name: "LiberationSans-Italic", 26272 baseWidths: LiberationSansItalicWidths, 26273 baseMapping: LiberationSansItalicMapping 26274 }; 26275 t["Arial-BoldItalicMT"] = t["Arial-BoldItalic"] = { 26276 name: "LiberationSans-BoldItalic", 26277 baseWidths: LiberationSansBoldItalicWidths, 26278 baseMapping: LiberationSansBoldItalicMapping 26279 }; 26280 t["Calibri-Regular"] = { 26281 name: "LiberationSans-Regular", 26282 factors: CalibriRegularFactors, 26283 baseWidths: LiberationSansRegularWidths, 26284 baseMapping: LiberationSansRegularMapping, 26285 metrics: CalibriRegularMetrics 26286 }; 26287 t["Calibri-Bold"] = { 26288 name: "LiberationSans-Bold", 26289 factors: CalibriBoldFactors, 26290 baseWidths: LiberationSansBoldWidths, 26291 baseMapping: LiberationSansBoldMapping, 26292 metrics: CalibriBoldMetrics 26293 }; 26294 t["Calibri-Italic"] = { 26295 name: "LiberationSans-Italic", 26296 factors: CalibriItalicFactors, 26297 baseWidths: LiberationSansItalicWidths, 26298 baseMapping: LiberationSansItalicMapping, 26299 metrics: CalibriItalicMetrics 26300 }; 26301 t["Calibri-BoldItalic"] = { 26302 name: "LiberationSans-BoldItalic", 26303 factors: CalibriBoldItalicFactors, 26304 baseWidths: LiberationSansBoldItalicWidths, 26305 baseMapping: LiberationSansBoldItalicMapping, 26306 metrics: CalibriBoldItalicMetrics 26307 }; 26308 t["Segoeui-Regular"] = { 26309 name: "LiberationSans-Regular", 26310 factors: SegoeuiRegularFactors, 26311 baseWidths: LiberationSansRegularWidths, 26312 baseMapping: LiberationSansRegularMapping, 26313 metrics: SegoeuiRegularMetrics 26314 }; 26315 t["Segoeui-Bold"] = { 26316 name: "LiberationSans-Bold", 26317 factors: SegoeuiBoldFactors, 26318 baseWidths: LiberationSansBoldWidths, 26319 baseMapping: LiberationSansBoldMapping, 26320 metrics: SegoeuiBoldMetrics 26321 }; 26322 t["Segoeui-Italic"] = { 26323 name: "LiberationSans-Italic", 26324 factors: SegoeuiItalicFactors, 26325 baseWidths: LiberationSansItalicWidths, 26326 baseMapping: LiberationSansItalicMapping, 26327 metrics: SegoeuiItalicMetrics 26328 }; 26329 t["Segoeui-BoldItalic"] = { 26330 name: "LiberationSans-BoldItalic", 26331 factors: SegoeuiBoldItalicFactors, 26332 baseWidths: LiberationSansBoldItalicWidths, 26333 baseMapping: LiberationSansBoldItalicMapping, 26334 metrics: SegoeuiBoldItalicMetrics 26335 }; 26336 t["Helvetica-Regular"] = t.Helvetica = { 26337 name: "LiberationSans-Regular", 26338 factors: HelveticaRegularFactors, 26339 baseWidths: LiberationSansRegularWidths, 26340 baseMapping: LiberationSansRegularMapping, 26341 metrics: HelveticaRegularMetrics 26342 }; 26343 t["Helvetica-Bold"] = { 26344 name: "LiberationSans-Bold", 26345 factors: HelveticaBoldFactors, 26346 baseWidths: LiberationSansBoldWidths, 26347 baseMapping: LiberationSansBoldMapping, 26348 metrics: HelveticaBoldMetrics 26349 }; 26350 t["Helvetica-Italic"] = { 26351 name: "LiberationSans-Italic", 26352 factors: HelveticaItalicFactors, 26353 baseWidths: LiberationSansItalicWidths, 26354 baseMapping: LiberationSansItalicMapping, 26355 metrics: HelveticaItalicMetrics 26356 }; 26357 t["Helvetica-BoldItalic"] = { 26358 name: "LiberationSans-BoldItalic", 26359 factors: HelveticaBoldItalicFactors, 26360 baseWidths: LiberationSansBoldItalicWidths, 26361 baseMapping: LiberationSansBoldItalicMapping, 26362 metrics: HelveticaBoldItalicMetrics 26363 }; 26364}); 26365function getXfaFontName(name) { 26366 const fontName = normalizeFontName(name); 26367 const fontMap = getXFAFontMap(); 26368 return fontMap[fontName]; 26369} 26370function getXfaFontWidths(name) { 26371 const info = getXfaFontName(name); 26372 if (!info) { 26373 return null; 26374 } 26375 const { 26376 baseWidths, 26377 baseMapping, 26378 factors 26379 } = info; 26380 const rescaledBaseWidths = !factors ? baseWidths : baseWidths.map((w, i) => w * factors[i]); 26381 let currentCode = -2; 26382 let currentArray; 26383 const newWidths = []; 26384 for (const [unicode, glyphIndex] of baseMapping.map((charUnicode, index) => [charUnicode, index]).sort(([unicode1], [unicode2]) => unicode1 - unicode2)) { 26385 if (unicode === -1) { 26386 continue; 26387 } 26388 if (unicode === currentCode + 1) { 26389 currentArray.push(rescaledBaseWidths[glyphIndex]); 26390 currentCode += 1; 26391 } else { 26392 currentCode = unicode; 26393 currentArray = [rescaledBaseWidths[glyphIndex]]; 26394 newWidths.push(unicode, currentArray); 26395 } 26396 } 26397 return newWidths; 26398} 26399function getXfaFontDict(name) { 26400 const widths = getXfaFontWidths(name); 26401 const dict = new Dict(null); 26402 dict.set("BaseFont", Name.get(name)); 26403 dict.set("Type", Name.get("Font")); 26404 dict.set("Subtype", Name.get("CIDFontType2")); 26405 dict.set("Encoding", Name.get("Identity-H")); 26406 dict.set("CIDToGIDMap", Name.get("Identity")); 26407 dict.set("W", widths); 26408 dict.set("FirstChar", widths[0]); 26409 dict.set("LastChar", widths.at(-2) + widths.at(-1).length - 1); 26410 const descriptor = new Dict(null); 26411 dict.set("FontDescriptor", descriptor); 26412 const systemInfo = new Dict(null); 26413 systemInfo.set("Ordering", "Identity"); 26414 systemInfo.set("Registry", "Adobe"); 26415 systemInfo.set("Supplement", 0); 26416 dict.set("CIDSystemInfo", systemInfo); 26417 return dict; 26418} 26419 26420;// ./src/core/p
26420s_parser.js
vendor: 5,083 bytes, lines 26420-26611
26420 26421 26422 26423 26424class PostScriptParser { 26425 constructor(lexer) { 26426 this.lexer = lexer; 26427 this.operators = []; 26428 this.token = null; 26429 this.prev = null; 26430 } 26431 nextToken() { 26432 this.prev = this.token; 26433 this.token = this.lexer.getToken(); 26434 } 26435 accept(type) { 26436 if (this.token.type === type) { 26437 this.nextToken(); 26438 return true; 26439 } 26440 return false; 26441 } 26442 expect(type) { 26443 if (this.accept(type)) { 26444 return true; 26445 } 26446 throw new FormatError(`Unexpected symbol: found ${this.token.type} expected ${type}.`); 26447 } 26448 parse() { 26449 this.nextToken(); 26450 this.expect(PostScriptTokenTypes.LBRACE); 26451 this.parseBlock(); 26452 this.expect(PostScriptTokenTypes.RBRACE); 26453 return this.operators; 26454 } 26455 parseBlock() { 26456 while (true) { 26457 if (this.accept(PostScriptTokenTypes.NUMBER)) { 26458 this.operators.push(this.prev.value); 26459 } else if (this.accept(PostScriptTokenTypes.OPERATOR)) { 26460 this.operators.push(this.prev.value); 26461 } else if (this.accept(PostScriptTokenTypes.LBRACE)) { 26462 this.parseCondition(); 26463 } else { 26464 return; 26465 } 26466 } 26467 } 26468 parseCondition() { 26469 const conditionLocation = this.operators.length; 26470 this.operators.push(null, null); 26471 this.parseBlock(); 26472 this.expect(PostScriptTokenTypes.RBRACE); 26473 if (this.accept(PostScriptTokenTypes.IF)) { 26474 this.operators[conditionLocation] = this.operators.length; 26475 this.operators[conditionLocation + 1] = "jz"; 26476 } else if (this.accept(PostScriptTokenTypes.LBRACE)) { 26477 const jumpLocation = this.operators.length; 26478 this.operators.push(null, null); 26479 const endOfTrue = this.operators.length; 26480 this.parseBlock(); 26481 this.expect(PostScriptTokenTypes.RBRACE); 26482 this.expect(PostScriptTokenTypes.IFELSE); 26483 this.operators[jumpLocation] = this.operators.length; 26484 this.operators[jumpLocation + 1] = "j"; 26485 this.operators[conditionLocation] = endOfTrue; 26486 this.operators[conditionLocation + 1] = "jz"; 26487 } else { 26488 throw new FormatError("PS Function: error parsing conditional."); 26489 } 26490 } 26491} 26492const PostScriptTokenTypes = { 26493 LBRACE: 0, 26494 RBRACE: 1, 26495 NUMBER: 2, 26496 OPERATOR: 3, 26497 IF: 4, 26498 IFELSE: 5 26499}; 26500class PostScriptToken { 26501 static get opCache() { 26502 return shadow(this, "opCache", Object.create(null)); 26503 } 26504 constructor(type, value) { 26505 this.type = type; 26506 this.value = value; 26507 } 26508 static getOperator(op) { 26509 return PostScriptToken.opCache[op] ||= new PostScriptToken(PostScriptTokenTypes.OPERATOR, op); 26510 } 26511 static get LBRACE() { 26512 return shadow(this, "LBRACE", new PostScriptToken(PostScriptTokenTypes.LBRACE, "{")); 26513 } 26514 static get RBRACE() { 26515 return shadow(this, "RBRACE", new PostScriptToken(PostScriptTokenTypes.RBRACE, "}")); 26516 } 26517 static get IF() { 26518 return shadow(this, "IF", new PostScriptToken(PostScriptTokenTypes.IF, "IF")); 26519 } 26520 static get IFELSE() { 26521 return shadow(this, "IFELSE", new PostScriptToken(PostScriptTokenTypes.IFELSE, "IFELSE")); 26522 } 26523} 26524class PostScriptLexer { 26525 constructor(stream) { 26526 this.stream = stream; 26527 this.nextChar(); 26528 this.strBuf = []; 26529 } 26530 nextChar() { 26531 return this.currentChar = this.stream.getByte(); 26532 } 26533 getToken() { 26534 let comment = false; 26535 let ch = this.currentChar; 26536 while (true) { 26537 if (ch < 0) { 26538 return EOF; 26539 } 26540 if (comment) { 26541 if (ch === 0x0a || ch === 0x0d) { 26542 comment = false; 26543 } 26544 } else if (ch === 0x25) { 26545 comment = true; 26546 } else if (!isWhiteSpace(ch)) { 26547 break; 26548 } 26549 ch = this.nextChar(); 26550 } 26551 switch (ch | 0) { 26552 case 0x30: 26553 case 0x31: 26554 case 0x32: 26555 case 0x33: 26556 case 0x34: 26557 case 0x35: 26558 case 0x36: 26559 case 0x37: 26560 case 0x38: 26561 case 0x39: 26562 case 0x2b: 26563 case 0x2d: 26564 case 0x2e: 26565 return new PostScriptToken(PostScriptTokenTypes.NUMBER, this.getNumber()); 26566 case 0x7b: 26567 this.nextChar(); 26568 return PostScriptToken.LBRACE; 26569 case 0x7d: 26570 this.nextChar(); 26571 return PostScriptToken.RBRACE; 26572 } 26573 const strBuf = this.strBuf; 26574 strBuf.length = 0; 26575 strBuf[0] = String.fromCharCode(ch); 26576 while ((ch = this.nextChar()) >= 0 && (ch >= 0x41 && ch <= 0x5a || ch >= 0x61 && ch <= 0x7a)) { 26577 strBuf.push(String.fromCharCode(ch)); 26578 } 26579 const str = strBuf.join(""); 26580 switch (str.toLowerCase()) { 26581 case "if": 26582 return PostScriptToken.IF; 26583 case "ifelse": 26584 return PostScriptToken.IFELSE; 26585 default: 26586 return PostScriptToken.getOperator(str); 26587 } 26588 } 26589 getNumber() { 26590 let ch = this.currentChar; 26591 const strBuf = this.strBuf; 26592 strBuf.length = 0; 26593 strBuf[0] = String.fromCharCode(ch); 26594 while ((ch = this.nextChar()) >= 0) { 26595 if (ch >= 0x30 && ch <= 0x39 || ch === 0x2d || ch === 0x2e) { 26596 strBuf.push(String.fromCharCode(ch)); 26597 } else { 26598 break; 26599 } 26600 } 26601 const value = parseFloat(strBuf.join("")); 26602 if (isNaN(value)) { 26603 throw new FormatError(`Invalid floating point number: ${value}`); 26604 } 26605 return value; 26606 } 26607} 26608 26609;// ./src/core/image_utils.js 26610 26611
vendor: 3,763 bytes, lines 26612-26763
26612class BaseLocalCache { 26613 constructor(options) { 26614 this._onlyRefs = options?.onlyRefs === true; 26615 if (!this._onlyRefs) { 26616 this._nameRefMap = new Map(); 26617 this._imageMap = new Map(); 26618 } 26619 this._imageCache = new RefSetCache(); 26620 } 26621 getByName(name) { 26622 if (this._onlyRefs) { 26623 unreachable("Should not call `getByName` method."); 26624 } 26625 const ref = this._nameRefMap.get(name); 26626 if (ref) { 26627 return this.getByRef(ref); 26628 } 26629 return this._imageMap.get(name) || null; 26630 } 26631 getByRef(ref) { 26632 return this._imageCache.get(ref) || null; 26633 } 26634 set(name, ref, data) { 26635 unreachable("Abstract method `set` called."); 26636 } 26637} 26638class LocalImageCache extends BaseLocalCache { 26639 set(name, ref = null, data) { 26640 if (typeof name !== "string") { 26641 throw new Error('LocalImageCache.set - expected "name" argument.'); 26642 } 26643 if (ref) { 26644 if (this._imageCache.has(ref)) { 26645 return; 26646 } 26647 this._nameRefMap.set(name, ref); 26648 this._imageCache.put(ref, data); 26649 return; 26650 } 26651 if (this._imageMap.has(name)) { 26652 return; 26653 } 26654 this._imageMap.set(name, data); 26655 } 26656} 26657class LocalColorSpaceCache extends BaseLocalCache { 26658 set(name = null, ref = null, data) { 26659 if (typeof name !== "string" && !ref) { 26660 throw new Error('LocalColorSpaceCache.set - expected "name" and/or "ref" argument.'); 26661 } 26662 if (ref) { 26663 if (this._imageCache.has(ref)) { 26664 return; 26665 } 26666 if (name !== null) { 26667 this._nameRefMap.set(name, ref); 26668 } 26669 this._imageCache.put(ref, data); 26670 return; 26671 } 26672 if (this._imageMap.has(name)) { 26673 return; 26674 } 26675 this._imageMap.set(name, data); 26676 } 26677} 26678class LocalFunctionCache extends BaseLocalCache { 26679 constructor(options) { 26680 super({ 26681 onlyRefs: true 26682 }); 26683 } 26684 set(name = null, ref, data) { 26685 if (!ref) { 26686 throw new Error('LocalFunctionCache.set - expected "ref" argument.'); 26687 } 26688 if (this._imageCache.has(ref)) { 26689 return; 26690 } 26691 this._imageCache.put(ref, data); 26692 } 26693} 26694class LocalGStateCache extends BaseLocalCache { 26695 set(name, ref = null, data) { 26696 if (typeof name !== "string") { 26697 throw new Error('LocalGStateCache.set - expected "name" argument.'); 26698 } 26699 if (ref) { 26700 if (this._imageCache.has(ref)) { 26701 return; 26702 } 26703 this._nameRefMap.set(name, ref); 26704 this._imageCache.put(ref, data); 26705 return; 26706 } 26707 if (this._imageMap.has(name)) { 26708 return; 26709 } 26710 this._imageMap.set(name, data); 26711 } 26712} 26713class LocalTilingPatternCache extends BaseLocalCache { 26714 constructor(options) { 26715 super({ 26716 onlyRefs: true 26717 }); 26718 } 26719 set(name = null, ref, data) { 26720 if (!ref) { 26721 throw new Error('LocalTilingPatternCache.set - expected "ref" argument.'); 26722 } 26723 if (this._imageCache.has(ref)) { 26724 return; 26725 } 26726 this._imageCache.put(ref, data); 26727 } 26728} 26729class RegionalImageCache extends BaseLocalCache { 26730 constructor(options) { 26731 super({ 26732 onlyRefs: true 26733 }); 26734 } 26735 set(name = null, ref, data) { 26736 if (!ref) { 26737 throw new Error('RegionalImageCache.set - expected "ref" argument.'); 26738 } 26739 if (this._imageCache.has(ref)) { 26740 return; 26741 } 26742 this._imageCache.put(ref, data); 26743 } 26744} 26745class GlobalImageCache { 26746 static NUM_PAGES_THRESHOLD = 2; 26747 static MIN_IMAGES_TO_CACHE = 10; 26748 static MAX_BYTE_SIZE = 5 * MAX_IMAGE_SIZE_TO_CACHE; 26749 #decodeFailedSet = new RefSet(); 26750 constructor() { 26751 this._refCache = new RefSetCache(); 26752 this._imageCache = new RefSetCache(); 26753 } 26754 get #byteSize() { 26755 let byteSize = 0; 26756 for (const imageData of this._imageCache) { 26757 byteSize += imageData.byteSize; 26758 } 26759 return byteSize; 26760 } 26761 get #cacheLimitReached() { 26762 if (this._imageCache.size < GlobalImageCache.MIN_IMAGES_TO_CACHE) { 26763 return false;
vendor: 4,250 bytes, lines 26764-26934
26764 } 26765 if (this.#byteSize < GlobalImageCache.MAX_BYTE_SIZE) { 26766 return false; 26767 } 26768 return true; 26769 } 26770 shouldCache(ref, pageIndex) { 26771 let pageIndexSet = this._refCache.get(ref); 26772 if (!pageIndexSet) { 26773 pageIndexSet = new Set(); 26774 this._refCache.put(ref, pageIndexSet); 26775 } 26776 pageIndexSet.add(pageIndex); 26777 if (pageIndexSet.size < GlobalImageCache.NUM_PAGES_THRESHOLD) { 26778 return false; 26779 } 26780 if (!this._imageCache.has(ref) && this.#cacheLimitReached) { 26781 return false; 26782 } 26783 return true; 26784 } 26785 addDecodeFailed(ref) { 26786 this.#decodeFailedSet.put(ref); 26787 } 26788 hasDecodeFailed(ref) { 26789 return this.#decodeFailedSet.has(ref); 26790 } 26791 addByteSize(ref, byteSize) { 26792 const imageData = this._imageCache.get(ref); 26793 if (!imageData) { 26794 return; 26795 } 26796 if (imageData.byteSize) { 26797 return; 26798 } 26799 imageData.byteSize = byteSize; 26800 } 26801 getData(ref, pageIndex) { 26802 const pageIndexSet = this._refCache.get(ref); 26803 if (!pageIndexSet) { 26804 return null; 26805 } 26806 if (pageIndexSet.size < GlobalImageCache.NUM_PAGES_THRESHOLD) { 26807 return null; 26808 } 26809 const imageData = this._imageCache.get(ref); 26810 if (!imageData) { 26811 return null; 26812 } 26813 pageIndexSet.add(pageIndex); 26814 return imageData; 26815 } 26816 setData(ref, data) { 26817 if (!this._refCache.has(ref)) { 26818 throw new Error('GlobalImageCache.setData - expected "shouldCache" to have been called.'); 26819 } 26820 if (this._imageCache.has(ref)) { 26821 return; 26822 } 26823 if (this.#cacheLimitReached) { 26824 warn("GlobalImageCache.setData - cache limit reached."); 26825 return; 26826 } 26827 this._imageCache.put(ref, data); 26828 } 26829 clear(onlyData = false) { 26830 if (!onlyData) { 26831 this.#decodeFailedSet.clear(); 26832 this._refCache.clear(); 26833 } 26834 this._imageCache.clear(); 26835 } 26836} 26837 26838;// ./src/core/function.js 26839 26840 26841 26842 26843 26844 26845class PDFFunctionFactory { 26846 constructor({ 26847 xref, 26848 isEvalSupported = true 26849 }) { 26850 this.xref = xref; 26851 // Odoo: don't support scripting 26852 this.isEvalSupported = false; 26853 } 26854 create(fn) { 26855 const cachedFunction = this.getCached(fn); 26856 if (cachedFunction) { 26857 return cachedFunction; 26858 } 26859 const parsedFunction = PDFFunction.parse({ 26860 xref: this.xref, 26861 isEvalSupported: this.isEvalSupported, 26862 fn: fn instanceof Ref ? this.xref.fetch(fn) : fn 26863 }); 26864 this._cache(fn, parsedFunction); 26865 return parsedFunction; 26866 } 26867 createFromArray(fnObj) { 26868 const cachedFunction = this.getCached(fnObj); 26869 if (cachedFunction) { 26870 return cachedFunction; 26871 } 26872 const parsedFunction = PDFFunction.parseArray({ 26873 xref: this.xref, 26874 isEvalSupported: this.isEvalSupported, 26875 fnObj: fnObj instanceof Ref ? this.xref.fetch(fnObj) : fnObj 26876 }); 26877 this._cache(fnObj, parsedFunction); 26878 return parsedFunction; 26879 } 26880 getCached(cacheKey) { 26881 let fnRef; 26882 if (cacheKey instanceof Ref) { 26883 fnRef = cacheKey; 26884 } else if (cacheKey instanceof Dict) { 26885 fnRef = cacheKey.objId; 26886 } else if (cacheKey instanceof BaseStream) { 26887 fnRef = cacheKey.dict?.objId; 26888 } 26889 if (fnRef) { 26890 const localFunction = this._localFunctionCache.getByRef(fnRef); 26891 if (localFunction) { 26892 return localFunction; 26893 } 26894 } 26895 return null; 26896 } 26897 _cache(cacheKey, parsedFunction) { 26898 if (!parsedFunction) { 26899 throw new Error('PDFFunctionFactory._cache - expected "parsedFunction" argument.'); 26900 } 26901 let fnRef; 26902 if (cacheKey instanceof Ref) { 26903 fnRef = cacheKey; 26904 } else if (cacheKey instanceof Dict) { 26905 fnRef = cacheKey.objId; 26906 } else if (cacheKey instanceof BaseStream) { 26907 fnRef = cacheKey.dict?.objId; 26908 } 26909 if (fnRef) { 26910 this._localFunctionCache.set(null, fnRef, parsedFunction); 26911 } 26912 } 26913 get _localFunctionCache() { 26914 return shadow(this, "_localFunctionCache", new LocalFunctionCache()); 26915 } 26916} 26917function toNumberArray(arr) { 26918 if (!Array.isArray(arr)) { 26919 return null; 26920 } 26921 if (!isNumberArray(arr, null)) { 26922 return arr.map(x => +x); 26923 } 26924 return arr; 26925} 26926class PDFFunction { 26927 static getSampleArray(size, outputSize, bps, stream) { 26928 let i, ii; 26929 let length = 1; 26930 for (i = 0, ii = size.length; i < ii; i++) { 26931 length *= size[i]; 26932 } 26933 length *= outputSize; 26934 const array = new Array(length);
vendor: 7,468 bytes, lines 26935-27198
26935 let codeSize = 0; 26936 let codeBuf = 0; 26937 const sampleMul = 1.0 / (2.0 ** bps - 1); 26938 const strBytes = stream.getBytes((length * bps + 7) / 8); 26939 let strIdx = 0; 26940 for (i = 0; i < length; i++) { 26941 while (codeSize < bps) { 26942 codeBuf <<= 8; 26943 codeBuf |= strBytes[strIdx++]; 26944 codeSize += 8; 26945 } 26946 codeSize -= bps; 26947 array[i] = (codeBuf >> codeSize) * sampleMul; 26948 codeBuf &= (1 << codeSize) - 1; 26949 } 26950 return array; 26951 } 26952 static parse({ 26953 xref, 26954 isEvalSupported, 26955 fn 26956 }) { 26957 const dict = fn.dict || fn; 26958 const typeNum = dict.get("FunctionType"); 26959 switch (typeNum) { 26960 case 0: 26961 return this.constructSampled({ 26962 xref, 26963 isEvalSupported, 26964 fn, 26965 dict 26966 }); 26967 case 1: 26968 break; 26969 case 2: 26970 return this.constructInterpolated({ 26971 xref, 26972 isEvalSupported, 26973 dict 26974 }); 26975 case 3: 26976 return this.constructStiched({ 26977 xref, 26978 isEvalSupported, 26979 dict 26980 }); 26981 case 4: 26982 return this.constructPostScript({ 26983 xref, 26984 isEvalSupported, 26985 fn, 26986 dict 26987 }); 26988 } 26989 throw new FormatError("Unknown type of function"); 26990 } 26991 static parseArray({ 26992 xref, 26993 isEvalSupported, 26994 fnObj 26995 }) { 26996 if (!Array.isArray(fnObj)) { 26997 return this.parse({ 26998 xref, 26999 isEvalSupported, 27000 fn: fnObj 27001 }); 27002 } 27003 const fnArray = []; 27004 for (const fn of fnObj) { 27005 fnArray.push(this.parse({ 27006 xref, 27007 isEvalSupported, 27008 fn: xref.fetchIfRef(fn) 27009 })); 27010 } 27011 return function (src, srcOffset, dest, destOffset) { 27012 for (let i = 0, ii = fnArray.length; i < ii; i++) { 27013 fnArray[i](src, srcOffset, dest, destOffset + i); 27014 } 27015 }; 27016 } 27017 static constructSampled({ 27018 xref, 27019 isEvalSupported, 27020 fn, 27021 dict 27022 }) { 27023 function toMultiArray(arr) { 27024 const inputLength = arr.length; 27025 const out = []; 27026 let index = 0; 27027 for (let i = 0; i < inputLength; i += 2) { 27028 out[index++] = [arr[i], arr[i + 1]]; 27029 } 27030 return out; 27031 } 27032 function interpolate(x, xmin, xmax, ymin, ymax) { 27033 return ymin + (x - xmin) * ((ymax - ymin) / (xmax - xmin)); 27034 } 27035 let domain = toNumberArray(dict.getArray("Domain")); 27036 let range = toNumberArray(dict.getArray("Range")); 27037 if (!domain || !range) { 27038 throw new FormatError("No domain or range"); 27039 } 27040 const inputSize = domain.length / 2; 27041 const outputSize = range.length / 2; 27042 domain = toMultiArray(domain); 27043 range = toMultiArray(range); 27044 const size = toNumberArray(dict.getArray("Size")); 27045 const bps = dict.get("BitsPerSample"); 27046 const order = dict.get("Order") || 1; 27047 if (order !== 1) { 27048 info("No support for cubic spline interpolation: " + order); 27049 } 27050 let encode = toNumberArray(dict.getArray("Encode")); 27051 if (!encode) { 27052 encode = []; 27053 for (let i = 0; i < inputSize; ++i) { 27054 encode.push([0, size[i] - 1]); 27055 } 27056 } else { 27057 encode = toMultiArray(encode); 27058 } 27059 let decode = toNumberArray(dict.getArray("Decode")); 27060 decode = !decode ? range : toMultiArray(decode); 27061 const samples = this.getSampleArray(size, outputSize, bps, fn); 27062 return function constructSampledFn(src, srcOffset, dest, destOffset) { 27063 const cubeVertices = 1 << inputSize; 27064 const cubeN = new Float64Array(cubeVertices); 27065 const cubeVertex = new Uint32Array(cubeVertices); 27066 let i, j; 27067 for (j = 0; j < cubeVertices; j++) { 27068 cubeN[j] = 1; 27069 } 27070 let k = outputSize, 27071 pos = 1; 27072 for (i = 0; i < inputSize; ++i) { 27073 const domain_2i = domain[i][0]; 27074 const domain_2i_1 = domain[i][1]; 27075 const xi = Math.min(Math.max(src[srcOffset + i], domain_2i), domain_2i_1); 27076 let e = interpolate(xi, domain_2i, domain_2i_1, encode[i][0], encode[i][1]); 27077 const size_i = size[i]; 27078 e = Math.min(Math.max(e, 0), size_i - 1); 27079 const e0 = e < size_i - 1 ? Math.floor(e) : e - 1; 27080 const n0 = e0 + 1 - e; 27081 const n1 = e - e0; 27082 const offset0 = e0 * k; 27083 const offset1 = offset0 + k; 27084 for (j = 0; j < cubeVertices; j++) { 27085 if (j & pos) { 27086 cubeN[j] *= n1; 27087 cubeVertex[j] += offset1; 27088 } else { 27089 cubeN[j] *= n0; 27090 cubeVertex[j] += offset0; 27091 } 27092 } 27093 k *= size_i; 27094 pos <<= 1; 27095 } 27096 for (j = 0; j < outputSize; ++j) { 27097 let rj = 0; 27098 for (i = 0; i < cubeVertices; i++) { 27099 rj += samples[cubeVertex[i] + j] * cubeN[i]; 27100 } 27101 rj = interpolate(rj, 0, 1, decode[j][0], decode[j][1]); 27102 dest[destOffset + j] = Math.min(Math.max(rj, range[j][0]), range[j][1]); 27103 } 27104 }; 27105 } 27106 static constructInterpolated({ 27107 xref, 27108 isEvalSupported, 27109 dict 27110 }) { 27111 const c0 = toNumberArray(dict.getArray("C0")) || [0]; 27112 const c1 = toNumberArray(dict.getArray("C1")) || [1]; 27113 const n = dict.get("N"); 27114 const diff = []; 27115 for (let i = 0, ii = c0.length; i < ii; ++i) { 27116 diff.push(c1[i] - c0[i]); 27117 } 27118 const length = diff.length; 27119 return function constructInterpolatedFn(src, srcOffset, dest, destOffset) { 27120 const x = n === 1 ? src[srcOffset] : src[srcOffset] ** n; 27121 for (let j = 0; j < length; ++j) { 27122 dest[destOffset + j] = c0[j] + x * diff[j]; 27123 } 27124 }; 27125 } 27126 static constructStiched({ 27127 xref, 27128 isEvalSupported, 27129 dict 27130 }) { 27131 const domain = toNumberArray(dict.getArray("Domain")); 27132 if (!domain) { 27133 throw new FormatError("No domain"); 27134 } 27135 const inputSize = domain.length / 2; 27136 if (inputSize !== 1) { 27137 throw new FormatError("Bad domain for stiched function"); 27138 } 27139 const fns = []; 27140 for (const fn of dict.get("Functions")) { 27141 fns.push(this.parse({ 27142 xref, 27143 isEvalSupported, 27144 fn: xref.fetchIfRef(fn) 27145 })); 27146 } 27147 const bounds = toNumberArray(dict.getArray("Bounds")); 27148 const encode = toNumberArray(dict.getArray("Encode")); 27149 const tmpBuf = new Float32Array(1); 27150 return function constructStichedFn(src, srcOffset, dest, destOffset) { 27151 const clip = function constructStichedFromIRClip(v, min, max) { 27152 if (v > max) { 27153 v = max; 27154 } else if (v < min) { 27155 v = min; 27156 } 27157 return v; 27158 }; 27159 const v = clip(src[srcOffset], domain[0], domain[1]); 27160 const length = bounds.length; 27161 let i; 27162 for (i = 0; i < length; ++i) { 27163 if (v < bounds[i]) { 27164 break; 27165 } 27166 } 27167 let dmin = domain[0]; 27168 if (i > 0) { 27169 dmin = bounds[i - 1]; 27170 } 27171 let dmax = domain[1]; 27172 if (i < bounds.length) { 27173 dmax = bounds[i]; 27174 } 27175 const rmin = encode[2 * i]; 27176 const rmax = encode[2 * i + 1]; 27177 tmpBuf[0] = dmin === dmax ? rmin : rmin + (v - dmin) * (rmax - rmin) / (dmax - dmin); 27178 fns[i](tmpBuf, 0, dest, destOffset); 27179 }; 27180 } 27181 static constructPostScript({ 27182 xref, 27183 isEvalSupported, 27184 fn, 27185 dict 27186 }) { 27187 const domain = toNumberArray(dict.getArray("Domain")); 27188 const range = toNumberArray(dict.getArray("Range")); 27189 if (!domain) { 27190 throw new FormatError("No domain."); 27191 } 27192 if (!range) { 27193 throw new FormatError("No range."); 27194 } 27195 const lexer = new PostScriptLexer(fn); 27196 const parser = new PostScriptParser(lexer); 27197 const code = parser.parse(); 27198 if (
vendor: 21,370 bytes, lines 27198-27888
27198isEvalSupported && FeatureTest.isEvalSupported) { 27199 const compiled = new PostScriptCompiler().compile(code, domain, range); 27200 if (compiled) { 27201 return new Function("src", "srcOffset", "dest", "destOffset", compiled); 27202 } 27203 } 27204 info("Unable to compile PS function"); 27205 const numOutputs = range.length >> 1; 27206 const numInputs = domain.length >> 1; 27207 const evaluator = new PostScriptEvaluator(code); 27208 const cache = Object.create(null); 27209 const MAX_CACHE_SIZE = 2048 * 4; 27210 let cache_available = MAX_CACHE_SIZE; 27211 const tmpBuf = new Float32Array(numInputs); 27212 return function constructPostScriptFn(src, srcOffset, dest, destOffset) { 27213 let i, value; 27214 let key = ""; 27215 const input = tmpBuf; 27216 for (i = 0; i < numInputs; i++) { 27217 value = src[srcOffset + i]; 27218 input[i] = value; 27219 key += value + "_"; 27220 } 27221 const cachedValue = cache[key]; 27222 if (cachedValue !== undefined) { 27223 dest.set(cachedValue, destOffset); 27224 return; 27225 } 27226 const output = new Float32Array(numOutputs); 27227 const stack = evaluator.execute(input); 27228 const stackIndex = stack.length - numOutputs; 27229 for (i = 0; i < numOutputs; i++) { 27230 value = stack[stackIndex + i]; 27231 let bound = range[i * 2]; 27232 if (value < bound) { 27233 value = bound; 27234 } else { 27235 bound = range[i * 2 + 1]; 27236 if (value > bound) { 27237 value = bound; 27238 } 27239 } 27240 output[i] = value; 27241 } 27242 if (cache_available > 0) { 27243 cache_available--; 27244 cache[key] = output; 27245 } 27246 dest.set(output, destOffset); 27247 }; 27248 } 27249} 27250function isPDFFunction(v) { 27251 let fnDict; 27252 if (v instanceof Dict) { 27253 fnDict = v; 27254 } else if (v instanceof BaseStream) { 27255 fnDict = v.dict; 27256 } else { 27257 return false; 27258 } 27259 return fnDict.has("FunctionType"); 27260} 27261class PostScriptStack { 27262 static MAX_STACK_SIZE = 100; 27263 constructor(initialStack) { 27264 this.stack = initialStack ? Array.from(initialStack) : []; 27265 } 27266 push(value) { 27267 if (this.stack.length >= PostScriptStack.MAX_STACK_SIZE) { 27268 throw new Error("PostScript function stack overflow."); 27269 } 27270 this.stack.push(value); 27271 } 27272 pop() { 27273 if (this.stack.length <= 0) { 27274 throw new Error("PostScript function stack underflow."); 27275 } 27276 return this.stack.pop(); 27277 } 27278 copy(n) { 27279 if (this.stack.length + n >= PostScriptStack.MAX_STACK_SIZE) { 27280 throw new Error("PostScript function stack overflow."); 27281 } 27282 const stack = this.stack; 27283 for (let i = stack.length - n, j = n - 1; j >= 0; j--, i++) { 27284 stack.push(stack[i]); 27285 } 27286 } 27287 index(n) { 27288 this.push(this.stack[this.stack.length - n - 1]); 27289 } 27290 roll(n, p) { 27291 const stack = this.stack; 27292 const l = stack.length - n; 27293 const r = stack.length - 1; 27294 const c = l + (p - Math.floor(p / n) * n); 27295 for (let i = l, j = r; i < j; i++, j--) { 27296 const t = stack[i]; 27297 stack[i] = stack[j]; 27298 stack[j] = t; 27299 } 27300 for (let i = l, j = c - 1; i < j; i++, j--) { 27301 const t = stack[i]; 27302 stack[i] = stack[j]; 27303 stack[j] = t; 27304 } 27305 for (let i = c, j = r; i < j; i++, j--) { 27306 const t = stack[i]; 27307 stack[i] = stack[j]; 27308 stack[j] = t; 27309 } 27310 } 27311} 27312class PostScriptEvaluator { 27313 constructor(operators) { 27314 this.operators = operators; 27315 } 27316 execute(initialStack) { 27317 const stack = new PostScriptStack(initialStack); 27318 let counter = 0; 27319 const operators = this.operators; 27320 const length = operators.length; 27321 let operator, a, b; 27322 while (counter < length) { 27323 operator = operators[counter++]; 27324 if (typeof operator === "number") { 27325 stack.push(operator); 27326 continue; 27327 } 27328 switch (operator) { 27329 case "jz": 27330 b = stack.pop(); 27331 a = stack.pop(); 27332 if (!a) { 27333 counter = b; 27334 } 27335 break; 27336 case "j": 27337 a = stack.pop(); 27338 counter = a; 27339 break; 27340 case "abs": 27341 a = stack.pop(); 27342 stack.push(Math.abs(a)); 27343 break; 27344 case "add": 27345 b = stack.pop(); 27346 a = stack.pop(); 27347 stack.push(a + b); 27348 break; 27349 case "and": 27350 b = stack.pop(); 27351 a = stack.pop(); 27352 if (typeof a === "boolean" && typeof b === "boolean") { 27353 stack.push(a && b); 27354 } else { 27355 stack.push(a & b); 27356 } 27357 break; 27358 case "atan": 27359 b = stack.pop(); 27360 a = stack.pop(); 27361 a = Math.atan2(a, b) / Math.PI * 180; 27362 if (a < 0) { 27363 a += 360; 27364 } 27365 stack.push(a); 27366 break; 27367 case "bitshift": 27368 b = stack.pop(); 27369 a = stack.pop(); 27370 if (a > 0) { 27371 stack.push(a << b); 27372 } else { 27373 stack.push(a >> b); 27374 } 27375 break; 27376 case "ceiling": 27377 a = stack.pop(); 27378 stack.push(Math.ceil(a)); 27379 break; 27380 case "copy": 27381 a = stack.pop(); 27382 stack.copy(a); 27383 break; 27384 case "cos": 27385 a = stack.pop(); 27386 stack.push(Math.cos(a % 360 / 180 * Math.PI)); 27387 break; 27388 case "cvi": 27389 a = stack.pop() | 0; 27390 stack.push(a); 27391 break; 27392 case "cvr": 27393 break; 27394 case "div": 27395 b = stack.pop(); 27396 a = stack.pop(); 27397 stack.push(a / b); 27398 break; 27399 case "dup": 27400 stack.copy(1); 27401 break; 27402 case "eq": 27403 b = stack.pop(); 27404 a = stack.pop(); 27405 stack.push(a === b); 27406 break; 27407 case "exch": 27408 stack.roll(2, 1); 27409 break; 27410 case "exp": 27411 b = stack.pop(); 27412 a = stack.pop(); 27413 stack.push(a ** b); 27414 break; 27415 case "false": 27416 stack.push(false); 27417 break; 27418 case "floor": 27419 a = stack.pop(); 27420 stack.push(Math.floor(a)); 27421 break; 27422 case "ge": 27423 b = stack.pop(); 27424 a = stack.pop(); 27425 stack.push(a >= b); 27426 break; 27427 case "gt": 27428 b = stack.pop(); 27429 a = stack.pop(); 27430 stack.push(a > b); 27431 break; 27432 case "idiv": 27433 b = stack.pop(); 27434 a = stack.pop(); 27435 stack.push(a / b | 0); 27436 break; 27437 case "index": 27438 a = stack.pop(); 27439 stack.index(a); 27440 break; 27441 case "le": 27442 b = stack.pop(); 27443 a = stack.pop(); 27444 stack.push(a <= b); 27445 break; 27446 case "ln": 27447 a = stack.pop(); 27448 stack.push(Math.log(a)); 27449 break; 27450 case "log": 27451 a = stack.pop(); 27452 stack.push(Math.log10(a)); 27453 break; 27454 case "lt": 27455 b = stack.pop(); 27456 a = stack.pop(); 27457 stack.push(a < b); 27458 break; 27459 case "mod": 27460 b = stack.pop(); 27461 a = stack.pop(); 27462 stack.push(a % b); 27463 break; 27464 case "mul": 27465 b = stack.pop(); 27466 a = stack.pop(); 27467 stack.push(a * b); 27468 break; 27469 case "ne": 27470 b = stack.pop(); 27471 a = stack.pop(); 27472 stack.push(a !== b); 27473 break; 27474 case "neg": 27475 a = stack.pop(); 27476 stack.push(-a); 27477 break; 27478 case "not": 27479 a = stack.pop(); 27480 if (typeof a === "boolean") { 27481 stack.push(!a); 27482 } else { 27483 stack.push(~a); 27484 } 27485 break; 27486 case "or": 27487 b = stack.pop(); 27488 a = stack.pop(); 27489 if (typeof a === "boolean" && typeof b === "boolean") { 27490 stack.push(a || b); 27491 } else { 27492 stack.push(a | b); 27493 } 27494 break; 27495 case "pop": 27496 stack.pop(); 27497 break; 27498 case "roll": 27499 b = stack.pop(); 27500 a = stack.pop(); 27501 stack.roll(a, b); 27502 break; 27503 case "round": 27504 a = stack.pop(); 27505 stack.push(Math.round(a)); 27506 break; 27507 case "sin": 27508 a = stack.pop(); 27509 stack.push(Math.sin(a % 360 / 180 * Math.PI)); 27510 break; 27511 case "sqrt": 27512 a = stack.pop(); 27513 stack.push(Math.sqrt(a)); 27514 break; 27515 case "sub": 27516 b = stack.pop(); 27517 a = stack.pop(); 27518 stack.push(a - b); 27519 break; 27520 case "true": 27521 stack.push(true); 27522 break; 27523 case "truncate": 27524 a = stack.pop(); 27525 a = a < 0 ? Math.ceil(a) : Math.floor(a); 27526 stack.push(a); 27527 break; 27528 case "xor": 27529 b = stack.pop(); 27530 a = stack.pop(); 27531 if (typeof a === "boolean" && typeof b === "boolean") { 27532 stack.push(a !== b); 27533 } else { 27534 stack.push(a ^ b); 27535 } 27536 break; 27537 default: 27538 throw new FormatError(`Unknown operator ${operator}`); 27539 } 27540 } 27541 return stack.stack; 27542 } 27543} 27544class AstNode { 27545 constructor(type) { 27546 this.type = type; 27547 } 27548 visit(visitor) { 27549 unreachable("abstract method"); 27550 } 27551} 27552class AstArgument extends AstNode { 27553 constructor(index, min, max) { 27554 super("args"); 27555 this.index = index; 27556 this.min = min; 27557 this.max = max; 27558 } 27559 visit(visitor) { 27560 visitor.visitArgument(this); 27561 } 27562} 27563class AstLiteral extends AstNode { 27564 constructor(number) { 27565 super("literal"); 27566 this.number = number; 27567 this.min = number; 27568 this.max = number; 27569 } 27570 visit(visitor) { 27571 visitor.visitLiteral(this); 27572 } 27573} 27574class AstBinaryOperation extends AstNode { 27575 constructor(op, arg1, arg2, min, max) { 27576 super("binary"); 27577 this.op = op; 27578 this.arg1 = arg1; 27579 this.arg2 = arg2; 27580 this.min = min; 27581 this.max = max; 27582 } 27583 visit(visitor) { 27584 visitor.visitBinaryOperation(this); 27585 } 27586} 27587class AstMin extends AstNode { 27588 constructor(arg, max) { 27589 super("max"); 27590 this.arg = arg; 27591 this.min = arg.min; 27592 this.max = max; 27593 } 27594 visit(visitor) { 27595 visitor.visitMin(this); 27596 } 27597} 27598class AstVariable extends AstNode { 27599 constructor(index, min, max) { 27600 super("var"); 27601 this.index = index; 27602 this.min = min; 27603 this.max = max; 27604 } 27605 visit(visitor) { 27606 visitor.visitVariable(this); 27607 } 27608} 27609class AstVariableDefinition extends AstNode { 27610 constructor(variable, arg) { 27611 super("definition"); 27612 this.variable = variable; 27613 this.arg = arg; 27614 } 27615 visit(visitor) { 27616 visitor.visitVariableDefinition(this); 27617 } 27618} 27619class ExpressionBuilderVisitor { 27620 constructor() { 27621 this.parts = []; 27622 } 27623 visitArgument(arg) { 27624 this.parts.push("Math.max(", arg.min, ", Math.min(", arg.max, ", src[srcOffset + ", arg.index, "]))"); 27625 } 27626 visitVariable(variable) { 27627 this.parts.push("v", variable.index); 27628 } 27629 visitLiteral(literal) { 27630 this.parts.push(literal.number); 27631 } 27632 visitBinaryOperation(operation) { 27633 this.parts.push("("); 27634 operation.arg1.visit(this); 27635 this.parts.push(" ", operation.op, " "); 27636 operation.arg2.visit(this); 27637 this.parts.push(")"); 27638 } 27639 visitVariableDefinition(definition) { 27640 this.parts.push("var "); 27641 definition.variable.visit(this); 27642 this.parts.push(" = "); 27643 definition.arg.visit(this); 27644 this.parts.push(";"); 27645 } 27646 visitMin(max) { 27647 this.parts.push("Math.min("); 27648 max.arg.visit(this); 27649 this.parts.push(", ", max.max, ")"); 27650 } 27651 toString() { 27652 return this.parts.join(""); 27653 } 27654} 27655function buildAddOperation(num1, num2) { 27656 if (num2.type === "literal" && num2.number === 0) { 27657 return num1; 27658 } 27659 if (num1.type === "literal" && num1.number === 0) { 27660 return num2; 27661 } 27662 if (num2.type === "literal" && num1.type === "literal") { 27663 return new AstLiteral(num1.number + num2.number); 27664 } 27665 return new AstBinaryOperation("+", num1, num2, num1.min + num2.min, num1.max + num2.max); 27666} 27667function buildMulOperation(num1, num2) { 27668 if (num2.type === "literal") { 27669 if (num2.number === 0) { 27670 return new AstLiteral(0); 27671 } else if (num2.number === 1) { 27672 return num1; 27673 } else if (num1.type === "literal") { 27674 return new AstLiteral(num1.number * num2.number); 27675 } 27676 } 27677 if (num1.type === "literal") { 27678 if (num1.number === 0) { 27679 return new AstLiteral(0); 27680 } else if (num1.number === 1) { 27681 return num2; 27682 } 27683 } 27684 const min = Math.min(num1.min * num2.min, num1.min * num2.max, num1.max * num2.min, num1.max * num2.max); 27685 const max = Math.max(num1.min * num2.min, num1.min * num2.max, num1.max * num2.min, num1.max * num2.max); 27686 return new AstBinaryOperation("*", num1, num2, min, max); 27687} 27688function buildSubOperation(num1, num2) { 27689 if (num2.type === "literal") { 27690 if (num2.number === 0) { 27691 return num1; 27692 } else if (num1.type === "literal") { 27693 return new AstLiteral(num1.number - num2.number); 27694 } 27695 } 27696 if (num2.type === "binary" && num2.op === "-" && num1.type === "literal" && num1.number === 1 && num2.arg1.type === "literal" && num2.arg1.number === 1) { 27697 return num2.arg2; 27698 } 27699 return new AstBinaryOperation("-", num1, num2, num1.min - num2.max, num1.max - num2.min); 27700} 27701function buildMinOperation(num1, max) { 27702 if (num1.min >= max) { 27703 return new AstLiteral(max); 27704 } else if (num1.max <= max) { 27705 return num1; 27706 } 27707 return new AstMin(num1, max); 27708} 27709class PostScriptCompiler { 27710 compile(code, domain, range) { 27711 const stack = []; 27712 const instructions = []; 27713 const inputSize = domain.length >> 1, 27714 outputSize = range.length >> 1; 27715 let lastRegister = 0; 27716 let n, j; 27717 let num1, num2, ast1, ast2, tmpVar, item; 27718 for (let i = 0; i < inputSize; i++) { 27719 stack.push(new AstArgument(i, domain[i * 2], domain[i * 2 + 1])); 27720 } 27721 for (let i = 0, ii = code.length; i < ii; i++) { 27722 item = code[i]; 27723 if (typeof item === "number") { 27724 stack.push(new AstLiteral(item)); 27725 continue; 27726 } 27727 switch (item) { 27728 case "add": 27729 if (stack.length < 2) { 27730 return null; 27731 } 27732 num2 = stack.pop(); 27733 num1 = stack.pop(); 27734 stack.push(buildAddOperation(num1, num2)); 27735 break; 27736 case "cvr": 27737 if (stack.length < 1) { 27738 return null; 27739 } 27740 break; 27741 case "mul": 27742 if (stack.length < 2) { 27743 return null; 27744 } 27745 num2 = stack.pop(); 27746 num1 = stack.pop(); 27747 stack.push(buildMulOperation(num1, num2)); 27748 break; 27749 case "sub": 27750 if (stack.length < 2) { 27751 return null; 27752 } 27753 num2 = stack.pop(); 27754 num1 = stack.pop(); 27755 stack.push(buildSubOperation(num1, num2)); 27756 break; 27757 case "exch": 27758 if (stack.length < 2) { 27759 return null; 27760 } 27761 ast1 = stack.pop(); 27762 ast2 = stack.pop(); 27763 stack.push(ast1, ast2); 27764 break; 27765 case "pop": 27766 if (stack.length < 1) { 27767 return null; 27768 } 27769 stack.pop(); 27770 break; 27771 case "index": 27772 if (stack.length < 1) { 27773 return null; 27774 } 27775 num1 = stack.pop(); 27776 if (num1.type !== "literal") { 27777 return null; 27778 } 27779 n = num1.number; 27780 if (n < 0 || !Number.isInteger(n) || stack.length < n) { 27781 return null; 27782 } 27783 ast1 = stack[stack.length - n - 1]; 27784 if (ast1.type === "literal" || ast1.type === "var") { 27785 stack.push(ast1); 27786 break; 27787 } 27788 tmpVar = new AstVariable(lastRegister++, ast1.min, ast1.max); 27789 stack[stack.length - n - 1] = tmpVar; 27790 stack.push(tmpVar); 27791 instructions.push(new AstVariableDefinition(tmpVar, ast1)); 27792 break; 27793 case "dup": 27794 if (stack.length < 1) { 27795 return null; 27796 } 27797 if (typeof code[i + 1] === "number" && code[i + 2] === "gt" && code[i + 3] === i + 7 && code[i + 4] === "jz" && code[i + 5] === "pop" && code[i + 6] === code[i + 1]) { 27798 num1 = stack.pop(); 27799 stack.push(buildMinOperation(num1, code[i + 1])); 27800 i += 6; 27801 break; 27802 } 27803 ast1 = stack.at(-1); 27804 if (ast1.type === "literal" || ast1.type === "var") { 27805 stack.push(ast1); 27806 break; 27807 } 27808 tmpVar = new AstVariable(lastRegister++, ast1.min, ast1.max); 27809 stack[stack.length - 1] = tmpVar; 27810 stack.push(tmpVar); 27811 instructions.push(new AstVariableDefinition(tmpVar, ast1)); 27812 break; 27813 case "roll": 27814 if (stack.length < 2) { 27815 return null; 27816 } 27817 num2 = stack.pop(); 27818 num1 = stack.pop(); 27819 if (num2.type !== "literal" || num1.type !== "literal") { 27820 return null; 27821 } 27822 j = num2.number; 27823 n = num1.number; 27824 if (n <= 0 || !Number.isInteger(n) || !Number.isInteger(j) || stack.length < n) { 27825 return null; 27826 } 27827 j = (j % n + n) % n; 27828 if (j === 0) { 27829 break; 27830 } 27831 stack.push(...stack.splice(stack.length - n, n - j)); 27832 break; 27833 default: 27834 return null; 27835 } 27836 } 27837 if (stack.length !== outputSize) { 27838 return null; 27839 } 27840 const result = []; 27841 for (const instruction of instructions) { 27842 const statementBuilder = new ExpressionBuilderVisitor(); 27843 instruction.visit(statementBuilder); 27844 result.push(statementBuilder.toString()); 27845 } 27846 for (let i = 0, ii = stack.length; i < ii; i++) { 27847 const expr = stack[i], 27848 statementBuilder = new ExpressionBuilderVisitor(); 27849 expr.visit(statementBuilder); 27850 const min = range[i * 2], 27851 max = range[i * 2 + 1]; 27852 const out = [statementBuilder.toString()]; 27853 if (min > expr.min) { 27854 out.unshift("Math.max(", min, ", "); 27855 out.push(")"); 27856 } 27857 if (max < expr.max) { 27858 out.unshift("Math.min(", max, ", "); 27859 out.push(")"); 27860 } 27861 out.unshift("dest[destOffset + ", i, "] = "); 27862 out.push(";"); 27863 result.push(out.join("")); 27864 } 27865 return result.join("\n"); 27866 } 27867} 27868 27869;// ./src/core/bidi.js 27870 27871const baseTypes = ["BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "S", "B", "S", "WS", "B", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "B", "B", "B", "S", "WS", "ON", "ON", "ET", "ET", "ET", "ON", "ON", "ON", "ON", "ON", "ES", "CS", "ES", "CS", "CS", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "CS", "ON", "ON", "ON", "ON", "ON", "ON", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "ON", "ON", "ON", "ON", "ON", "ON", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "ON", "ON", "ON", "ON", "BN", "BN", "BN", "BN", "BN", "BN", "B", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "BN", "CS", "ON", "ET", "ET", "ET", "ET", "ON", "ON", "ON", "ON", "L", "ON", "ON", "BN", "ON", "ON", "ET", "ET", "EN", "EN", "ON", "L", "ON", "ON", "ON", "EN", "L", "ON", "ON", "ON", "ON", "ON", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "ON", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "L", "ON", "L", "L", "L", "L", "L", "L", "L", "L"]; 27872const arabicTypes = ["AN", "AN", "AN", "AN", "AN", "AN", "ON", "ON", "AL", "ET", "ET", "AL", "CS", "AL", "ON", "ON", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AL", "AL", "", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "AN", "ET", "AN", "AN", "AL", "AL", "AL", "NSM", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "AL", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AN", "ON", "NSM", "NSM", "NSM", "NSM", "NSM", "NSM", "AL", "AL", "NSM", "NSM", "ON", "NSM", "NSM", "NSM", "NSM", "AL", "AL", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "EN", "AL", "AL", "AL", "AL", "AL", "AL"]; 27873function isOdd(i) { 27874 return (i & 1) !== 0; 27875} 27876function isEven(i) { 27877 return (i & 1) === 0; 27878} 27879function findUnequal(arr, start, value) { 27880 let j, jj; 27881 for (j = start, jj = arr.length; j < jj; ++j) { 27882 if (arr[j] !== value) { 27883 return j; 27884 } 27885 } 27886 return j; 27887} 27888function
vendor: 417 bytes, lines 27888-27905
27888setValues(arr, start, end, value) { 27889 for (let j = start; j < end; ++j) { 27890 arr[j] = value; 27891 } 27892} 27893function reverseValues(arr, start, end) { 27894 for (let i = start, j = end - 1; i < j; ++i, --j) { 27895 const temp = arr[i]; 27896 arr[i] = arr[j]; 27897 arr[j] = temp; 27898 } 27899} 27900function createBidiText(str, isLTR, vertical = false) { 27901 let dir = "ltr"; 27902 if (vertical) { 27903 dir = "ttb"; 27904 } else if (!isLTR) { 27905 dir = "rtl";
vendor: 4,194 bytes, lines 27906-28073
27906 } 27907 return { 27908 str, 27909 dir 27910 }; 27911} 27912const chars = []; 27913const types = []; 27914function bidi(str, startLevel = -1, vertical = false) { 27915 let isLTR = true; 27916 const strLength = str.length; 27917 if (strLength === 0 || vertical) { 27918 return createBidiText(str, isLTR, vertical); 27919 } 27920 chars.length = strLength; 27921 types.length = strLength; 27922 let numBidi = 0; 27923 let i, ii; 27924 for (i = 0; i < strLength; ++i) { 27925 chars[i] = str.charAt(i); 27926 const charCode = str.charCodeAt(i); 27927 let charType = "L"; 27928 if (charCode <= 0x00ff) { 27929 charType = baseTypes[charCode]; 27930 } else if (0x0590 <= charCode && charCode <= 0x05f4) { 27931 charType = "R"; 27932 } else if (0x0600 <= charCode && charCode <= 0x06ff) { 27933 charType = arabicTypes[charCode & 0xff]; 27934 if (!charType) { 27935 warn("Bidi: invalid Unicode character " + charCode.toString(16)); 27936 } 27937 } else if (0x0700 <= charCode && charCode <= 0x08ac || 0xfb50 <= charCode && charCode <= 0xfdff || 0xfe70 <= charCode && charCode <= 0xfeff) { 27938 charType = "AL"; 27939 } 27940 if (charType === "R" || charType === "AL" || charType === "AN") { 27941 numBidi++; 27942 } 27943 types[i] = charType; 27944 } 27945 if (numBidi === 0) { 27946 isLTR = true; 27947 return createBidiText(str, isLTR); 27948 } 27949 if (startLevel === -1) { 27950 if (numBidi / strLength < 0.3 && strLength > 4) { 27951 isLTR = true; 27952 startLevel = 0; 27953 } else { 27954 isLTR = false; 27955 startLevel = 1; 27956 } 27957 } 27958 const levels = []; 27959 for (i = 0; i < strLength; ++i) { 27960 levels[i] = startLevel; 27961 } 27962 const e = isOdd(startLevel) ? "R" : "L"; 27963 const sor = e; 27964 const eor = sor; 27965 let lastType = sor; 27966 for (i = 0; i < strLength; ++i) { 27967 if (types[i] === "NSM") { 27968 types[i] = lastType; 27969 } else { 27970 lastType = types[i]; 27971 } 27972 } 27973 lastType = sor; 27974 let t; 27975 for (i = 0; i < strLength; ++i) { 27976 t = types[i]; 27977 if (t === "EN") { 27978 types[i] = lastType === "AL" ? "AN" : "EN"; 27979 } else if (t === "R" || t === "L" || t === "AL") { 27980 lastType = t; 27981 } 27982 } 27983 for (i = 0; i < strLength; ++i) { 27984 t = types[i]; 27985 if (t === "AL") { 27986 types[i] = "R"; 27987 } 27988 } 27989 for (i = 1; i < strLength - 1; ++i) { 27990 if (types[i] === "ES" && types[i - 1] === "EN" && types[i + 1] === "EN") { 27991 types[i] = "EN"; 27992 } 27993 if (types[i] === "CS" && (types[i - 1] === "EN" || types[i - 1] === "AN") && types[i + 1] === types[i - 1]) { 27994 types[i] = types[i - 1]; 27995 } 27996 } 27997 for (i = 0; i < strLength; ++i) { 27998 if (types[i] === "EN") { 27999 for (let j = i - 1; j >= 0; --j) { 28000 if (types[j] !== "ET") { 28001 break; 28002 } 28003 types[j] = "EN"; 28004 } 28005 for (let j = i + 1; j < strLength; ++j) { 28006 if (types[j] !== "ET") { 28007 break; 28008 } 28009 types[j] = "EN"; 28010 } 28011 } 28012 } 28013 for (i = 0; i < strLength; ++i) { 28014 t = types[i]; 28015 if (t === "WS" || t === "ES" || t === "ET" || t === "CS") { 28016 types[i] = "ON"; 28017 } 28018 } 28019 lastType = sor; 28020 for (i = 0; i < strLength; ++i) { 28021 t = types[i]; 28022 if (t === "EN") { 28023 types[i] = lastType === "L" ? "L" : "EN"; 28024 } else if (t === "R" || t === "L") { 28025 lastType = t; 28026 } 28027 } 28028 for (i = 0; i < strLength; ++i) { 28029 if (types[i] === "ON") { 28030 const end = findUnequal(types, i + 1, "ON"); 28031 let before = sor; 28032 if (i > 0) { 28033 before = types[i - 1]; 28034 } 28035 let after = eor; 28036 if (end + 1 < strLength) { 28037 after = types[end + 1]; 28038 } 28039 if (before !== "L") { 28040 before = "R"; 28041 } 28042 if (after !== "L") { 28043 after = "R"; 28044 } 28045 if (before === after) { 28046 setValues(types, i, end, before); 28047 } 28048 i = end - 1; 28049 } 28050 } 28051 for (i = 0; i < strLength; ++i) { 28052 if (types[i] === "ON") { 28053 types[i] = e; 28054 } 28055 } 28056 for (i = 0; i < strLength; ++i) { 28057 t = types[i]; 28058 if (isEven(levels[i])) { 28059 if (t === "R") { 28060 levels[i] += 1; 28061 } else if (t === "AN" || t === "EN") { 28062 levels[i] += 2; 28063 } 28064 } else if (t === "L" || t === "AN" || t === "EN") { 28065 levels[i] += 1; 28066 } 28067 } 28068 let highestLevel = -1; 28069 let lowestOddLevel = 99; 28070 let level; 28071 for (i = 0, ii = levels.length; i < ii; ++i) { 28072 level = levels[i]; 28073 if (highestLevel < level) {
vendor: 763 bytes, lines 28074-28105
28074 highestLevel = level; 28075 } 28076 if (lowestOddLevel > level && isOdd(level)) { 28077 lowestOddLevel = level; 28078 } 28079 } 28080 for (level = highestLevel; level >= lowestOddLevel; --level) { 28081 let start = -1; 28082 for (i = 0, ii = levels.length; i < ii; ++i) { 28083 if (levels[i] < level) { 28084 if (start >= 0) { 28085 reverseValues(chars, start, i); 28086 start = -1; 28087 } 28088 } else if (start < 0) { 28089 start = i; 28090 } 28091 } 28092 if (start >= 0) { 28093 reverseValues(chars, start, levels.length); 28094 } 28095 } 28096 for (i = 0, ii = chars.length; i < ii; ++i) { 28097 const ch = chars[i]; 28098 if (ch === "<" || ch === ">") { 28099 chars[i] = ""; 28100 } 28101 } 28102 return createBidiText(chars.join(""), isLTR); 28103} 28104 28105;// ./src/core/font_substitutions.js
vendor: 7,960 bytes, lines 28105-28370
28105 28106 28107 28108 28109const NORMAL = { 28110 style: "normal", 28111 weight: "normal" 28112}; 28113const BOLD = { 28114 style: "normal", 28115 weight: "bold" 28116}; 28117const ITALIC = { 28118 style: "italic", 28119 weight: "normal" 28120}; 28121const BOLDITALIC = { 28122 style: "italic", 28123 weight: "bold" 28124}; 28125const substitutionMap = new Map([["Times-Roman", { 28126 local: ["Times New Roman", "Times-Roman", "Times", "Liberation Serif", "Nimbus Roman", "Nimbus Roman L", "Tinos", "Thorndale", "TeX Gyre Termes", "FreeSerif", "Linux Libertine O", "Libertinus Serif", "DejaVu Serif", "Bitstream Vera Serif", "Ubuntu"], 28127 style: NORMAL, 28128 ultimate: "serif" 28129}], ["Times-Bold", { 28130 alias: "Times-Roman", 28131 style: BOLD, 28132 ultimate: "serif" 28133}], ["Times-Italic", { 28134 alias: "Times-Roman", 28135 style: ITALIC, 28136 ultimate: "serif" 28137}], ["Times-BoldItalic", { 28138 alias: "Times-Roman", 28139 style: BOLDITALIC, 28140 ultimate: "serif" 28141}], ["Helvetica", { 28142 local: ["Helvetica", "Helvetica Neue", "Arial", "Arial Nova", "Liberation Sans", "Arimo", "Nimbus Sans", "Nimbus Sans L", "A030", "TeX Gyre Heros", "FreeSans", "DejaVu Sans", "Albany", "Bitstream Vera Sans", "Arial Unicode MS", "Microsoft Sans Serif", "Apple Symbols", "Cantarell"], 28143 path: "LiberationSans-Regular.ttf", 28144 style: NORMAL, 28145 ultimate: "sans-serif" 28146}], ["Helvetica-Bold", { 28147 alias: "Helvetica", 28148 path: "LiberationSans-Bold.ttf", 28149 style: BOLD, 28150 ultimate: "sans-serif" 28151}], ["Helvetica-Oblique", { 28152 alias: "Helvetica", 28153 path: "LiberationSans-Italic.ttf", 28154 style: ITALIC, 28155 ultimate: "sans-serif" 28156}], ["Helvetica-BoldOblique", { 28157 alias: "Helvetica", 28158 path: "LiberationSans-BoldItalic.ttf", 28159 style: BOLDITALIC, 28160 ultimate: "sans-serif" 28161}], ["Courier", { 28162 local: ["Courier", "Courier New", "Liberation Mono", "Nimbus Mono", "Nimbus Mono L", "Cousine", "Cumberland", "TeX Gyre Cursor", "FreeMono", "Linux Libertine Mono O", "Libertinus Mono"], 28163 style: NORMAL, 28164 ultimate: "monospace" 28165}], ["Courier-Bold", { 28166 alias: "Courier", 28167 style: BOLD, 28168 ultimate: "monospace" 28169}], ["Courier-Oblique", { 28170 alias: "Courier", 28171 style: ITALIC, 28172 ultimate: "monospace" 28173}], ["Courier-BoldOblique", { 28174 alias: "Courier", 28175 style: BOLDITALIC, 28176 ultimate: "monospace" 28177}], ["ArialBlack", { 28178 local: ["Arial Black"], 28179 style: { 28180 style: "normal", 28181 weight: "900" 28182 }, 28183 fallback: "Helvetica-Bold" 28184}], ["ArialBlack-Bold", { 28185 alias: "ArialBlack" 28186}], ["ArialBlack-Italic", { 28187 alias: "ArialBlack", 28188 style: { 28189 style: "italic", 28190 weight: "900" 28191 }, 28192 fallback: "Helvetica-BoldOblique" 28193}], ["ArialBlack-BoldItalic", { 28194 alias: "ArialBlack-Italic" 28195}], ["ArialNarrow", { 28196 local: ["Arial Narrow", "Liberation Sans Narrow", "Helvetica Condensed", "Nimbus Sans Narrow", "TeX Gyre Heros Cn"], 28197 style: NORMAL, 28198 fallback: "Helvetica" 28199}], ["ArialNarrow-Bold", { 28200 alias: "ArialNarrow", 28201 style: BOLD, 28202 fallback: "Helvetica-Bold" 28203}], ["ArialNarrow-Italic", { 28204 alias: "ArialNarrow", 28205 style: ITALIC, 28206 fallback: "Helvetica-Oblique" 28207}], ["ArialNarrow-BoldItalic", { 28208 alias: "ArialNarrow", 28209 style: BOLDITALIC, 28210 fallback: "Helvetica-BoldOblique" 28211}], ["Calibri", { 28212 local: ["Calibri", "Carlito"], 28213 style: NORMAL, 28214 fallback: "Helvetica" 28215}], ["Calibri-Bold", { 28216 alias: "Calibri", 28217 style: BOLD, 28218 fallback: "Helvetica-Bold" 28219}], ["Calibri-Italic", { 28220 alias: "Calibri", 28221 style: ITALIC, 28222 fallback: "Helvetica-Oblique" 28223}], ["Calibri-BoldItalic", { 28224 alias: "Calibri", 28225 style: BOLDITALIC, 28226 fallback: "Helvetica-BoldOblique" 28227}], ["Wingdings", { 28228 local: ["Wingdings", "URW Dingbats"], 28229 style: NORMAL 28230}], ["Wingdings-Regular", { 28231 alias: "Wingdings" 28232}], ["Wingdings-Bold", { 28233 alias: "Wingdings" 28234}]]); 28235const fontAliases = new Map([["Arial-Black", "ArialBlack"]]); 28236function getStyleToAppend(style) { 28237 switch (style) { 28238 case BOLD: 28239 return "Bold"; 28240 case ITALIC: 28241 return "Italic"; 28242 case BOLDITALIC: 28243 return "Bold Italic"; 28244 default: 28245 if (style?.weight === "bold") { 28246 return "Bold"; 28247 } 28248 if (style?.style === "italic") { 28249 return "Italic"; 28250 } 28251 } 28252 return ""; 28253} 28254function getFamilyName(str) { 28255 const keywords = new Set(["thin", "extralight", "ultralight", "demilight", "semilight", "light", "book", "regular", "normal", "medium", "demibold", "semibold", "bold", "extrabold", "ultrabold", "black", "heavy", "extrablack", "ultrablack", "roman", "italic", "oblique", "ultracondensed", "extracondensed", "condensed", "semicondensed", "normal", "semiexpanded", "expanded", "extraexpanded", "ultraexpanded", "bolditalic"]); 28256 return str.split(/[- ,+]+/g).filter(tok => !keywords.has(tok.toLowerCase())).join(" "); 28257} 28258function generateFont({ 28259 alias, 28260 local, 28261 path, 28262 fallback, 28263 style, 28264 ultimate 28265}, src, localFontPath, useFallback = true, usePath = true, append = "") { 28266 const result = { 28267 style: null, 28268 ultimate: null 28269 }; 28270 if (local) { 28271 const extra = append ? ` ${append}` : ""; 28272 for (const name of local) { 28273 src.push(`local(${name}${extra})`); 28274 } 28275 } 28276 if (alias) { 28277 const substitution = substitutionMap.get(alias); 28278 const aliasAppend = append || getStyleToAppend(style); 28279 Object.assign(result, generateFont(substitution, src, localFontPath, useFallback && !fallback, usePath && !path, aliasAppend)); 28280 } 28281 if (style) { 28282 result.style = style; 28283 } 28284 if (ultimate) { 28285 result.ultimate = ultimate; 28286 } 28287 if (useFallback && fallback) { 28288 const fallbackInfo = substitutionMap.get(fallback); 28289 const { 28290 ultimate: fallbackUltimate 28291 } = generateFont(fallbackInfo, src, localFontPath, useFallback, usePath && !path, append); 28292 result.ultimate ||= fallbackUltimate; 28293 } 28294 if (usePath && path && localFontPath) { 28295 src.push(`url(${localFontPath}${path})`); 28296 } 28297 return result; 28298} 28299function getFontSubstitution(systemFontCache, idFactory, localFontPath, baseFontName, standardFontName, type) { 28300 if (baseFontName.startsWith("InvalidPDFjsFont_")) { 28301 return null; 28302 } 28303 if ((type === "TrueType" || type === "Type1") && /^[A-Z]{6}\+/.test(baseFontName)) { 28304 baseFontName = baseFontName.slice(7); 28305 } 28306 baseFontName = normalizeFontName(baseFontName); 28307 const key = baseFontName; 28308 let substitutionInfo = systemFontCache.get(key); 28309 if (substitutionInfo) { 28310 return substitutionInfo; 28311 } 28312 let substitution = substitutionMap.get(baseFontName); 28313 if (!substitution) { 28314 for (const [alias, subst] of fontAliases) { 28315 if (baseFontName.startsWith(alias)) { 28316 baseFontName = `${subst}${baseFontName.substring(alias.length)}`; 28317 substitution = substitutionMap.get(baseFontName); 28318 break; 28319 } 28320 } 28321 } 28322 let mustAddBaseFont = false; 28323 if (!substitution) { 28324 substitution = substitutionMap.get(standardFontName); 28325 mustAddBaseFont = true; 28326 } 28327 const loadedName = `${idFactory.getDocId()}_s${idFactory.createFontId()}`; 28328 if (!substitution) { 28329 if (!validateFontName(baseFontName)) { 28330 warn(`Cannot substitute the font because of its name: ${baseFontName}`); 28331 systemFontCache.set(key, null); 28332 return null; 28333 } 28334 const bold = /bold/gi.test(baseFontName); 28335 const italic = /oblique|italic/gi.test(baseFontName); 28336 const style = bold && italic && BOLDITALIC || bold && BOLD || italic && ITALIC || NORMAL; 28337 substitutionInfo = { 28338 css: `"${getFamilyName(baseFontName)}",${loadedName}`, 28339 guessFallback: true, 28340 loadedName, 28341 baseFontName, 28342 src: `local(${baseFontName})`, 28343 style 28344 }; 28345 systemFontCache.set(key, substitutionInfo); 28346 return substitutionInfo; 28347 } 28348 const src = []; 28349 if (mustAddBaseFont && validateFontName(baseFontName)) { 28350 src.push(`local(${baseFontName})`); 28351 } 28352 const { 28353 style, 28354 ultimate 28355 } = generateFont(substitution, src, localFontPath); 28356 const guessFallback = ultimate === null; 28357 const fallback = guessFallback ? "" : `,${ultimate}`; 28358 substitutionInfo = { 28359 css: `"${getFamilyName(baseFontName)}",${loadedName}${fallback}`, 28360 guessFallback, 28361 loadedName, 28362 baseFontName, 28363 src: src.join(","), 28364 style 28365 }; 28366 systemFontCache.set(key, substitutionInfo); 28367 return substitutionInfo; 28368} 28369 28370;// ./src/
vendor: 2,273 bytes, lines 28370-28441
28370core/image_resizer.js 28371 28372const MIN_IMAGE_DIM = 2048; 28373const MAX_IMAGE_DIM = 65537; 28374const MAX_ERROR = 128; 28375class ImageResizer { 28376 static #goodSquareLength = MIN_IMAGE_DIM; 28377 static #isChrome = false; 28378 constructor(imgData, isMask) { 28379 this._imgData = imgData; 28380 this._isMask = isMask; 28381 } 28382 static get canUseImageDecoder() { 28383 return shadow(this, "canUseImageDecoder", this.#isChrome || typeof ImageDecoder === "undefined" ? Promise.resolve(false) : ImageDecoder.isTypeSupported("image/bmp")); 28384 } 28385 static needsToBeResized(width, height) { 28386 if (width <= this.#goodSquareLength && height <= this.#goodSquareLength) { 28387 return false; 28388 } 28389 const { 28390 MAX_DIM 28391 } = this; 28392 if (width > MAX_DIM || height > MAX_DIM) { 28393 return true; 28394 } 28395 const area = width * height; 28396 if (this._hasMaxArea) { 28397 return area > this.MAX_AREA; 28398 } 28399 if (area < this.#goodSquareLength ** 2) { 28400 return false; 28401 } 28402 if (this._areGoodDims(width, height)) { 28403 this.#goodSquareLength = Math.max(this.#goodSquareLength, Math.floor(Math.sqrt(width * height))); 28404 return false; 28405 } 28406 this.#goodSquareLength = this._guessMax(this.#goodSquareLength, MAX_DIM, MAX_ERROR, 0); 28407 const maxArea = this.MAX_AREA = this.#goodSquareLength ** 2; 28408 return area > maxArea; 28409 } 28410 static get MAX_DIM() { 28411 return shadow(this, "MAX_DIM", this._guessMax(MIN_IMAGE_DIM, MAX_IMAGE_DIM, 0, 1)); 28412 } 28413 static get MAX_AREA() { 28414 this._hasMaxArea = true; 28415 return shadow(this, "MAX_AREA", this._guessMax(this.#goodSquareLength, this.MAX_DIM, MAX_ERROR, 0) ** 2); 28416 } 28417 static set MAX_AREA(area) { 28418 if (area >= 0) { 28419 this._hasMaxArea = true; 28420 shadow(this, "MAX_AREA", area); 28421 } 28422 } 28423 static setMaxArea(area) { 28424 if (!this._hasMaxArea) { 28425 this.MAX_AREA = area >> 2; 28426 } 28427 } 28428 static setOptions(opts) { 28429 this.setMaxArea(opts.maxArea ?? -1); 28430 this.#isChrome = opts.isChrome ?? false; 28431 } 28432 static _areGoodDims(width, height) { 28433 try { 28434 const canvas = new OffscreenCanvas(width, height); 28435 const ctx = canvas.getContext("2d"); 28436 ctx.fillRect(0, 0, 1, 1); 28437 const opacity = ctx.getImageData(0, 0, 1, 1).data[3]; 28438 canvas.width = canvas.height = 1; 28439 return opacity !== 0; 28440 } catch { 28441 return false;
vendor: 2,615 bytes, lines 28442-28528
28442 } 28443 } 28444 static _guessMax(start, end, tolerance, defaultHeight) { 28445 while (start + tolerance + 1 < end) { 28446 const middle = Math.floor((start + end) / 2); 28447 const height = defaultHeight || middle; 28448 if (this._areGoodDims(middle, height)) { 28449 start = middle; 28450 } else { 28451 end = middle; 28452 } 28453 } 28454 return start; 28455 } 28456 static async createImage(imgData, isMask = false) { 28457 return new ImageResizer(imgData, isMask)._createImage(); 28458 } 28459 async _createImage() { 28460 const data = this._encodeBMP(); 28461 let decoder, imagePromise; 28462 if (await ImageResizer.canUseImageDecoder) { 28463 decoder = new ImageDecoder({ 28464 data, 28465 type: "image/bmp", 28466 preferAnimation: false, 28467 transfer: [data.buffer] 28468 }); 28469 imagePromise = decoder.decode().catch(reason => { 28470 warn(`BMP image decoding failed: ${reason}`); 28471 return createImageBitmap(new Blob([this._encodeBMP().buffer], { 28472 type: "image/bmp" 28473 })); 28474 }).finally(() => { 28475 decoder.close(); 28476 }); 28477 } else { 28478 imagePromise = createImageBitmap(new Blob([data.buffer], { 28479 type: "image/bmp" 28480 })); 28481 } 28482 const { 28483 MAX_AREA, 28484 MAX_DIM 28485 } = ImageResizer; 28486 const { 28487 _imgData: imgData 28488 } = this; 28489 const { 28490 width, 28491 height 28492 } = imgData; 28493 const minFactor = Math.max(width / MAX_DIM, height / MAX_DIM, Math.sqrt(width * height / MAX_AREA)); 28494 const firstFactor = Math.max(minFactor, 2); 28495 const factor = Math.round(10 * (minFactor + 1.25)) / 10 / firstFactor; 28496 const N = Math.floor(Math.log2(factor)); 28497 const steps = new Array(N + 2).fill(2); 28498 steps[0] = firstFactor; 28499 steps.splice(-1, 1, factor / (1 << N)); 28500 let newWidth = width; 28501 let newHeight = height; 28502 const result = await imagePromise; 28503 let bitmap = result.image || result; 28504 for (const step of steps) { 28505 const prevWidth = newWidth; 28506 const prevHeight = newHeight; 28507 newWidth = Math.floor(newWidth / step) - 1; 28508 newHeight = Math.floor(newHeight / step) - 1; 28509 const canvas = new OffscreenCanvas(newWidth, newHeight); 28510 const ctx = canvas.getContext("2d"); 28511 ctx.drawImage(bitmap, 0, 0, prevWidth, prevHeight, 0, 0, newWidth, newHeight); 28512 bitmap.close(); 28513 bitmap = canvas.transferToImageBitmap(); 28514 } 28515 imgData.data = null; 28516 imgData.bitmap = bitmap; 28517 imgData.width = newWidth; 28518 imgData.height = newHeight; 28519 return imgData; 28520 } 28521 _encodeBMP() { 28522 const { 28523 width, 28524 height, 28525 kind 28526 } = this._imgData; 28527 let data = this._imgData.data; 28528 let bitPerPixel;
vendor: 4,860 bytes, lines 28529-28682
28529 let colorTable = new Uint8Array(0); 28530 let maskTable = colorTable; 28531 let compression = 0; 28532 switch (kind) { 28533 case ImageKind.GRAYSCALE_1BPP: 28534 { 28535 bitPerPixel = 1; 28536 colorTable = new Uint8Array(this._isMask ? [255, 255, 255, 255, 0, 0, 0, 0] : [0, 0, 0, 0, 255, 255, 255, 255]); 28537 const rowLen = width + 7 >> 3; 28538 const rowSize = rowLen + 3 & -4; 28539 if (rowLen !== rowSize) { 28540 const newData = new Uint8Array(rowSize * height); 28541 let k = 0; 28542 for (let i = 0, ii = height * rowLen; i < ii; i += rowLen, k += rowSize) { 28543 newData.set(data.subarray(i, i + rowLen), k); 28544 } 28545 data = newData; 28546 } 28547 break; 28548 } 28549 case ImageKind.RGB_24BPP: 28550 { 28551 bitPerPixel = 24; 28552 if (width & 3) { 28553 const rowLen = 3 * width; 28554 const rowSize = rowLen + 3 & -4; 28555 const extraLen = rowSize - rowLen; 28556 const newData = new Uint8Array(rowSize * height); 28557 let k = 0; 28558 for (let i = 0, ii = height * rowLen; i < ii; i += rowLen) { 28559 const row = data.subarray(i, i + rowLen); 28560 for (let j = 0; j < rowLen; j += 3) { 28561 newData[k++] = row[j + 2]; 28562 newData[k++] = row[j + 1]; 28563 newData[k++] = row[j]; 28564 } 28565 k += extraLen; 28566 } 28567 data = newData; 28568 } else { 28569 for (let i = 0, ii = data.length; i < ii; i += 3) { 28570 const tmp = data[i]; 28571 data[i] = data[i + 2]; 28572 data[i + 2] = tmp; 28573 } 28574 } 28575 break; 28576 } 28577 case ImageKind.RGBA_32BPP: 28578 bitPerPixel = 32; 28579 compression = 3; 28580 maskTable = new Uint8Array(4 + 4 + 4 + 4 + 52); 28581 const view = new DataView(maskTable.buffer); 28582 if (FeatureTest.isLittleEndian) { 28583 view.setUint32(0, 0x000000ff, true); 28584 view.setUint32(4, 0x0000ff00, true); 28585 view.setUint32(8, 0x00ff0000, true); 28586 view.setUint32(12, 0xff000000, true); 28587 } else { 28588 view.setUint32(0, 0xff000000, true); 28589 view.setUint32(4, 0x00ff0000, true); 28590 view.setUint32(8, 0x0000ff00, true); 28591 view.setUint32(12, 0x000000ff, true); 28592 } 28593 break; 28594 default: 28595 throw new Error("invalid format"); 28596 } 28597 let i = 0; 28598 const headerLength = 40 + maskTable.length; 28599 const fileLength = 14 + headerLength + colorTable.length + data.length; 28600 const bmpData = new Uint8Array(fileLength); 28601 const view = new DataView(bmpData.buffer); 28602 view.setUint16(i, 0x4d42, true); 28603 i += 2; 28604 view.setUint32(i, fileLength, true); 28605 i += 4; 28606 view.setUint32(i, 0, true); 28607 i += 4; 28608 view.setUint32(i, 14 + headerLength + colorTable.length, true); 28609 i += 4; 28610 view.setUint32(i, headerLength, true); 28611 i += 4; 28612 view.setInt32(i, width, true); 28613 i += 4; 28614 view.setInt32(i, -height, true); 28615 i += 4; 28616 view.setUint16(i, 1, true); 28617 i += 2; 28618 view.setUint16(i, bitPerPixel, true); 28619 i += 2; 28620 view.setUint32(i, compression, true); 28621 i += 4; 28622 view.setUint32(i, 0, true); 28623 i += 4; 28624 view.setInt32(i, 0, true); 28625 i += 4; 28626 view.setInt32(i, 0, true); 28627 i += 4; 28628 view.setUint32(i, colorTable.length / 4, true); 28629 i += 4; 28630 view.setUint32(i, 0, true); 28631 i += 4; 28632 bmpData.set(maskTable, i); 28633 i += maskTable.length; 28634 bmpData.set(colorTable, i); 28635 i += colorTable.length; 28636 bmpData.set(data, i); 28637 return bmpData; 28638 } 28639} 28640 28641;// ./src/shared/murmurhash3.js 28642const SEED = 0xc3d2e1f0; 28643const MASK_HIGH = 0xffff0000; 28644const MASK_LOW = 0xffff; 28645class MurmurHash3_64 { 28646 constructor(seed) { 28647 this.h1 = seed ? seed & 0xffffffff : SEED; 28648 this.h2 = seed ? seed & 0xffffffff : SEED; 28649 } 28650 update(input) { 28651 let data, length; 28652 if (typeof input === "string") { 28653 data = new Uint8Array(input.length * 2); 28654 length = 0; 28655 for (let i = 0, ii = input.length; i < ii; i++) { 28656 const code = input.charCodeAt(i); 28657 if (code <= 0xff) { 28658 data[length++] = code; 28659 } else { 28660 data[length++] = code >>> 8; 28661 data[length++] = code & 0xff; 28662 } 28663 } 28664 } else if (ArrayBuffer.isView(input)) { 28665 data = input.slice(); 28666 length = data.byteLength; 28667 } else { 28668 throw new Error("Invalid data format, must be a string or TypedArray."); 28669 } 28670 const blockCounts = length >> 2; 28671 const tailLength = length - blockCounts * 4; 28672 const dataUint32 = new Uint32Array(data.buffer, 0, blockCounts); 28673 let k1 = 0, 28674 k2 = 0; 28675 let h1 = this.h1, 28676 h2 = this.h2; 28677 const C1 = 0xcc9e2d51, 28678 C2 = 0x1b873593; 28679 const C1_LOW = C1 & MASK_LOW, 28680 C2_LOW = C2 & MASK_LOW; 28681 for (let i = 0; i < blockCounts; i++) { 28682 if (i & 1) {
vendor: 1,604 bytes, lines 28683-28730
28683 k1 = dataUint32[i]; 28684 k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW; 28685 k1 = k1 << 15 | k1 >>> 17; 28686 k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW; 28687 h1 ^= k1; 28688 h1 = h1 << 13 | h1 >>> 19; 28689 h1 = h1 * 5 + 0xe6546b64; 28690 } else { 28691 k2 = dataUint32[i]; 28692 k2 = k2 * C1 & MASK_HIGH | k2 * C1_LOW & MASK_LOW; 28693 k2 = k2 << 15 | k2 >>> 17; 28694 k2 = k2 * C2 & MASK_HIGH | k2 * C2_LOW & MASK_LOW; 28695 h2 ^= k2; 28696 h2 = h2 << 13 | h2 >>> 19; 28697 h2 = h2 * 5 + 0xe6546b64; 28698 } 28699 } 28700 k1 = 0; 28701 switch (tailLength) { 28702 case 3: 28703 k1 ^= data[blockCounts * 4 + 2] << 16; 28704 case 2: 28705 k1 ^= data[blockCounts * 4 + 1] << 8; 28706 case 1: 28707 k1 ^= data[blockCounts * 4]; 28708 k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW; 28709 k1 = k1 << 15 | k1 >>> 17; 28710 k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW; 28711 if (blockCounts & 1) { 28712 h1 ^= k1; 28713 } else { 28714 h2 ^= k1; 28715 } 28716 } 28717 this.h1 = h1; 28718 this.h2 = h2; 28719 } 28720 hexdigest() { 28721 let h1 = this.h1, 28722 h2 = this.h2; 28723 h1 ^= h2 >>> 1; 28724 h1 = h1 * 0xed558ccd & MASK_HIGH | h1 * 0x8ccd & MASK_LOW; 28725 h2 = h2 * 0xff51afd7 & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xafd7ed55 & MASK_HIGH) >>> 16; 28726 h1 ^= h2 >>> 1; 28727 h1 = h1 * 0x1a85ec53 & MASK_HIGH | h1 * 0xec53 & MASK_LOW; 28728 h2 = h2 * 0xc4ceb9fe & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xb9fe1a85 & MASK_HIGH) >>> 16; 28729 h1 ^= h2 >>> 1; 28730 return (h1 >>> 0).toString(16).padStart(8, "0") + (h2 >>> 0).toString(16).padStart(8, "0")
vendor: 12,172 bytes, lines 28730-29053
28730; 28731 } 28732} 28733 28734;// ./src/core/operator_list.js 28735 28736function addState(parentState, pattern, checkFn, iterateFn, processFn) { 28737 let state = parentState; 28738 for (let i = 0, ii = pattern.length - 1; i < ii; i++) { 28739 const item = pattern[i]; 28740 state = state[item] ||= []; 28741 } 28742 state[pattern.at(-1)] = { 28743 checkFn, 28744 iterateFn, 28745 processFn 28746 }; 28747} 28748const InitialState = []; 28749addState(InitialState, [OPS.save, OPS.transform, OPS.paintInlineImageXObject, OPS.restore], null, function iterateInlineImageGroup(context, i) { 28750 const fnArray = context.fnArray; 28751 const iFirstSave = context.iCurr - 3; 28752 const pos = (i - iFirstSave) % 4; 28753 switch (pos) { 28754 case 0: 28755 return fnArray[i] === OPS.save; 28756 case 1: 28757 return fnArray[i] === OPS.transform; 28758 case 2: 28759 return fnArray[i] === OPS.paintInlineImageXObject; 28760 case 3: 28761 return fnArray[i] === OPS.restore; 28762 } 28763 throw new Error(`iterateInlineImageGroup - invalid pos: ${pos}`); 28764}, function foundInlineImageGroup(context, i) { 28765 const MIN_IMAGES_IN_INLINE_IMAGES_BLOCK = 10; 28766 const MAX_IMAGES_IN_INLINE_IMAGES_BLOCK = 200; 28767 const MAX_WIDTH = 1000; 28768 const IMAGE_PADDING = 1; 28769 const fnArray = context.fnArray, 28770 argsArray = context.argsArray; 28771 const curr = context.iCurr; 28772 const iFirstSave = curr - 3; 28773 const iFirstTransform = curr - 2; 28774 const iFirstPIIXO = curr - 1; 28775 const count = Math.min(Math.floor((i - iFirstSave) / 4), MAX_IMAGES_IN_INLINE_IMAGES_BLOCK); 28776 if (count < MIN_IMAGES_IN_INLINE_IMAGES_BLOCK) { 28777 return i - (i - iFirstSave) % 4; 28778 } 28779 let maxX = 0; 28780 const map = []; 28781 let maxLineHeight = 0; 28782 let currentX = IMAGE_PADDING, 28783 currentY = IMAGE_PADDING; 28784 for (let q = 0; q < count; q++) { 28785 const transform = argsArray[iFirstTransform + (q << 2)]; 28786 const img = argsArray[iFirstPIIXO + (q << 2)][0]; 28787 if (currentX + img.width > MAX_WIDTH) { 28788 maxX = Math.max(maxX, currentX); 28789 currentY += maxLineHeight + 2 * IMAGE_PADDING; 28790 currentX = 0; 28791 maxLineHeight = 0; 28792 } 28793 map.push({ 28794 transform, 28795 x: currentX, 28796 y: currentY, 28797 w: img.width, 28798 h: img.height 28799 }); 28800 currentX += img.width + 2 * IMAGE_PADDING; 28801 maxLineHeight = Math.max(maxLineHeight, img.height); 28802 } 28803 const imgWidth = Math.max(maxX, currentX) + IMAGE_PADDING; 28804 const imgHeight = currentY + maxLineHeight + IMAGE_PADDING; 28805 const imgData = new Uint8Array(imgWidth * imgHeight * 4); 28806 const imgRowSize = imgWidth << 2; 28807 for (let q = 0; q < count; q++) { 28808 const data = argsArray[iFirstPIIXO + (q << 2)][0].data; 28809 const rowSize = map[q].w << 2; 28810 let dataOffset = 0; 28811 let offset = map[q].x + map[q].y * imgWidth << 2; 28812 imgData.set(data.subarray(0, rowSize), offset - imgRowSize); 28813 for (let k = 0, kk = map[q].h; k < kk; k++) { 28814 imgData.set(data.subarray(dataOffset, dataOffset + rowSize), offset); 28815 dataOffset += rowSize; 28816 offset += imgRowSize; 28817 } 28818 imgData.set(data.subarray(dataOffset - rowSize, dataOffset), offset); 28819 while (offset >= 0) { 28820 data[offset - 4] = data[offset]; 28821 data[offset - 3] = data[offset + 1]; 28822 data[offset - 2] = data[offset + 2]; 28823 data[offset - 1] = data[offset + 3]; 28824 data[offset + rowSize] = data[offset + rowSize - 4]; 28825 data[offset + rowSize + 1] = data[offset + rowSize - 3]; 28826 data[offset + rowSize + 2] = data[offset + rowSize - 2]; 28827 data[offset + rowSize + 3] = data[offset + rowSize - 1]; 28828 offset -= imgRowSize; 28829 } 28830 } 28831 const img = { 28832 width: imgWidth, 28833 height: imgHeight 28834 }; 28835 if (context.isOffscreenCanvasSupported) { 28836 const canvas = new OffscreenCanvas(imgWidth, imgHeight); 28837 const ctx = canvas.getContext("2d"); 28838 ctx.putImageData(new ImageData(new Uint8ClampedArray(imgData.buffer), imgWidth, imgHeight), 0, 0); 28839 img.bitmap = canvas.transferToImageBitmap(); 28840 img.data = null; 28841 } else { 28842 img.kind = ImageKind.RGBA_32BPP; 28843 img.data = imgData; 28844 } 28845 fnArray.splice(iFirstSave, count * 4, OPS.paintInlineImageXObjectGroup); 28846 argsArray.splice(iFirstSave, count * 4, [img, map]); 28847 return iFirstSave + 1; 28848}); 28849addState(InitialState, [OPS.save, OPS.transform, OPS.paintImageMaskXObject, OPS.restore], null, function iterateImageMaskGroup(context, i) { 28850 const fnArray = context.fnArray; 28851 const iFirstSave = context.iCurr - 3; 28852 const pos = (i - iFirstSave) % 4; 28853 switch (pos) { 28854 case 0: 28855 return fnArray[i] === OPS.save; 28856 case 1: 28857 return fnArray[i] === OPS.transform; 28858 case 2: 28859 return fnArray[i] === OPS.paintImageMaskXObject; 28860 case 3: 28861 return fnArray[i] === OPS.restore; 28862 } 28863 throw new Error(`iterateImageMaskGroup - invalid pos: ${pos}`); 28864}, function foundImageMaskGroup(context, i) { 28865 const MIN_IMAGES_IN_MASKS_BLOCK = 10; 28866 const MAX_IMAGES_IN_MASKS_BLOCK = 100; 28867 const MAX_SAME_IMAGES_IN_MASKS_BLOCK = 1000; 28868 const fnArray = context.fnArray, 28869 argsArray = context.argsArray; 28870 const curr = context.iCurr; 28871 const iFirstSave = curr - 3; 28872 const iFirstTransform = curr - 2; 28873 const iFirstPIMXO = curr - 1; 28874 let count = Math.floor((i - iFirstSave) / 4); 28875 if (count < MIN_IMAGES_IN_MASKS_BLOCK) { 28876 return i - (i - iFirstSave) % 4; 28877 } 28878 let isSameImage = false; 28879 let iTransform, transformArgs; 28880 const firstPIMXOArg0 = argsArray[iFirstPIMXO][0]; 28881 const firstTransformArg0 = argsArray[iFirstTransform][0], 28882 firstTransformArg1 = argsArray[iFirstTransform][1], 28883 firstTransformArg2 = argsArray[iFirstTransform][2], 28884 firstTransformArg3 = argsArray[iFirstTransform][3]; 28885 if (firstTransformArg1 === firstTransformArg2) { 28886 isSameImage = true; 28887 iTransform = iFirstTransform + 4; 28888 let iPIMXO = iFirstPIMXO + 4; 28889 for (let q = 1; q < count; q++, iTransform += 4, iPIMXO += 4) { 28890 transformArgs = argsArray[iTransform]; 28891 if (argsArray[iPIMXO][0] !== firstPIMXOArg0 || transformArgs[0] !== firstTransformArg0 || transformArgs[1] !== firstTransformArg1 || transformArgs[2] !== firstTransformArg2 || transformArgs[3] !== firstTransformArg3) { 28892 if (q < MIN_IMAGES_IN_MASKS_BLOCK) { 28893 isSameImage = false; 28894 } else { 28895 count = q; 28896 } 28897 break; 28898 } 28899 } 28900 } 28901 if (isSameImage) { 28902 count = Math.min(count, MAX_SAME_IMAGES_IN_MASKS_BLOCK); 28903 const positions = new Float32Array(count * 2); 28904 iTransform = iFirstTransform; 28905 for (let q = 0; q < count; q++, iTransform += 4) { 28906 transformArgs = argsArray[iTransform]; 28907 positions[q << 1] = transformArgs[4]; 28908 positions[(q << 1) + 1] = transformArgs[5]; 28909 } 28910 fnArray.splice(iFirstSave, count * 4, OPS.paintImageMaskXObjectRepeat); 28911 argsArray.splice(iFirstSave, count * 4, [firstPIMXOArg0, firstTransformArg0, firstTransformArg1, firstTransformArg2, firstTransformArg3, positions]); 28912 } else { 28913 count = Math.min(count, MAX_IMAGES_IN_MASKS_BLOCK); 28914 const images = []; 28915 for (let q = 0; q < count; q++) { 28916 transformArgs = argsArray[iFirstTransform + (q << 2)]; 28917 const maskParams = argsArray[iFirstPIMXO + (q << 2)][0]; 28918 images.push({ 28919 data: maskParams.data, 28920 width: maskParams.width, 28921 height: maskParams.height, 28922 interpolate: maskParams.interpolate, 28923 count: maskParams.count, 28924 transform: transformArgs 28925 }); 28926 } 28927 fnArray.splice(iFirstSave, count * 4, OPS.paintImageMaskXObjectGroup); 28928 argsArray.splice(iFirstSave, count * 4, [images]); 28929 } 28930 return iFirstSave + 1; 28931}); 28932addState(InitialState, [OPS.save, OPS.transform, OPS.paintImageXObject, OPS.restore], function (context) { 28933 const argsArray = context.argsArray; 28934 const iFirstTransform = context.iCurr - 2; 28935 return argsArray[iFirstTransform][1] === 0 && argsArray[iFirstTransform][2] === 0; 28936}, function iterateImageGroup(context, i) { 28937 const fnArray = context.fnArray, 28938 argsArray = context.argsArray; 28939 const iFirstSave = context.iCurr - 3; 28940 const pos = (i - iFirstSave) % 4; 28941 switch (pos) { 28942 case 0: 28943 return fnArray[i] === OPS.save; 28944 case 1: 28945 if (fnArray[i] !== OPS.transform) { 28946 return false; 28947 } 28948 const iFirstTransform = context.iCurr - 2; 28949 const firstTransformArg0 = argsArray[iFirstTransform][0]; 28950 const firstTransformArg3 = argsArray[iFirstTransform][3]; 28951 if (argsArray[i][0] !== firstTransformArg0 || argsArray[i][1] !== 0 || argsArray[i][2] !== 0 || argsArray[i][3] !== firstTransformArg3) { 28952 return false; 28953 } 28954 return true; 28955 case 2: 28956 if (fnArray[i] !== OPS.paintImageXObject) { 28957 return false; 28958 } 28959 const iFirstPIXO = context.iCurr - 1; 28960 const firstPIXOArg0 = argsArray[iFirstPIXO][0]; 28961 if (argsArray[i][0] !== firstPIXOArg0) { 28962 return false; 28963 } 28964 return true; 28965 case 3: 28966 return fnArray[i] === OPS.restore; 28967 } 28968 throw new Error(`iterateImageGroup - invalid pos: ${pos}`); 28969}, function (context, i) { 28970 const MIN_IMAGES_IN_BLOCK = 3; 28971 const MAX_IMAGES_IN_BLOCK = 1000; 28972 const fnArray = context.fnArray, 28973 argsArray = context.argsArray; 28974 const curr = context.iCurr; 28975 const iFirstSave = curr - 3; 28976 const iFirstTransform = curr - 2; 28977 const iFirstPIXO = curr - 1; 28978 const firstPIXOArg0 = argsArray[iFirstPIXO][0]; 28979 const firstTransformArg0 = argsArray[iFirstTransform][0]; 28980 const firstTransformArg3 = argsArray[iFirstTransform][3]; 28981 const count = Math.min(Math.floor((i - iFirstSave) / 4), MAX_IMAGES_IN_BLOCK); 28982 if (count < MIN_IMAGES_IN_BLOCK) { 28983 return i - (i - iFirstSave) % 4; 28984 } 28985 const positions = new Float32Array(count * 2); 28986 let iTransform = iFirstTransform; 28987 for (let q = 0; q < count; q++, iTransform += 4) { 28988 const transformArgs = argsArray[iTransform]; 28989 positions[q << 1] = transformArgs[4]; 28990 positions[(q << 1) + 1] = transformArgs[5]; 28991 } 28992 const args = [firstPIXOArg0, firstTransformArg0, firstTransformArg3, positions]; 28993 fnArray.splice(iFirstSave, count * 4, OPS.paintImageXObjectRepeat); 28994 argsArray.splice(iFirstSave, count * 4, args); 28995 return iFirstSave + 1; 28996}); 28997addState(InitialState, [OPS.beginText, OPS.setFont, OPS.setTextMatrix, OPS.showText, OPS.endText], null, function iterateShowTextGroup(context, i) { 28998 const fnArray = context.fnArray, 28999 argsArray = context.argsArray; 29000 const iFirstSave = context.iCurr - 4; 29001 const pos = (i - iFirstSave) % 5; 29002 switch (pos) { 29003 case 0: 29004 return fnArray[i] === OPS.beginText; 29005 case 1: 29006 return fnArray[i] === OPS.setFont; 29007 case 2: 29008 return fnArray[i] === OPS.setTextMatrix; 29009 case 3: 29010 if (fnArray[i] !== OPS.showText) { 29011 return false; 29012 } 29013 const iFirstSetFont = context.iCurr - 3; 29014 const firstSetFontArg0 = argsArray[iFirstSetFont][0]; 29015 const firstSetFontArg1 = argsArray[iFirstSetFont][1]; 29016 if (argsArray[i][0] !== firstSetFontArg0 || argsArray[i][1] !== firstSetFontArg1) { 29017 return false; 29018 } 29019 return true; 29020 case 4: 29021 return fnArray[i] === OPS.endText; 29022 } 29023 throw new Error(`iterateShowTextGroup - invalid pos: ${pos}`); 29024}, function (context, i) { 29025 const MIN_CHARS_IN_BLOCK = 3; 29026 const MAX_CHARS_IN_BLOCK = 1000; 29027 const fnArray = context.fnArray, 29028 argsArray = context.argsArray; 29029 const curr = context.iCurr; 29030 const iFirstBeginText = curr - 4; 29031 const iFirstSetFont = curr - 3; 29032 const iFirstSetTextMatrix = curr - 2; 29033 const iFirstShowText = curr - 1; 29034 const iFirstEndText = curr; 29035 const firstSetFontArg0 = argsArray[iFirstSetFont][0]; 29036 const firstSetFontArg1 = argsArray[iFirstSetFont][1]; 29037 let count = Math.min(Math.floor((i - iFirstBeginText) / 5), MAX_CHARS_IN_BLOCK); 29038 if (count < MIN_CHARS_IN_BLOCK) { 29039 return i - (i - iFirstBeginText) % 5; 29040 } 29041 let iFirst = iFirstBeginText; 29042 if (iFirstBeginText >= 4 && fnArray[iFirstBeginText - 4] === fnArray[iFirstSetFont] && fnArray[iFirstBeginText - 3] === fnArray[iFirstSetTextMatrix] && fnArray[iFirstBeginText - 2] === fnArray[iFirstShowText] && fnArray[iFirstBeginText - 1] === fnArray[iFirstEndText] && argsArray[iFirstBeginText - 4][0] === firstSetFontArg0 && argsArray[iFirstBeginText - 4][1] === firstSetFontArg1) { 29043 count++; 29044 iFirst -= 5; 29045 } 29046 let iEndText = iFirst + 4; 29047 for (let q = 1; q < count; q++) { 29048 fnArray.splice(iEndText, 3); 29049 argsArray.splice(iEndText, 3); 29050 iEndText += 2; 29051 } 29052 return iEndText + 1; 29053});
vendor: 3,600 bytes, lines 29054-29191
29054class NullOptimizer { 29055 constructor(queue) { 29056 this.queue = queue; 29057 } 29058 _optimize() {} 29059 push(fn, args) { 29060 this.queue.fnArray.push(fn); 29061 this.queue.argsArray.push(args); 29062 this._optimize(); 29063 } 29064 flush() {} 29065 reset() {} 29066} 29067class QueueOptimizer extends NullOptimizer { 29068 constructor(queue) { 29069 super(queue); 29070 this.state = null; 29071 this.context = { 29072 iCurr: 0, 29073 fnArray: queue.fnArray, 29074 argsArray: queue.argsArray, 29075 isOffscreenCanvasSupported: false 29076 }; 29077 this.match = null; 29078 this.lastProcessed = 0; 29079 } 29080 set isOffscreenCanvasSupported(value) { 29081 this.context.isOffscreenCanvasSupported = value; 29082 } 29083 _optimize() { 29084 const fnArray = this.queue.fnArray; 29085 let i = this.lastProcessed, 29086 ii = fnArray.length; 29087 let state = this.state; 29088 let match = this.match; 29089 if (!state && !match && i + 1 === ii && !InitialState[fnArray[i]]) { 29090 this.lastProcessed = ii; 29091 return; 29092 } 29093 const context = this.context; 29094 while (i < ii) { 29095 if (match) { 29096 const iterate = (0, match.iterateFn)(context, i); 29097 if (iterate) { 29098 i++; 29099 continue; 29100 } 29101 i = (0, match.processFn)(context, i + 1); 29102 ii = fnArray.length; 29103 match = null; 29104 state = null; 29105 if (i >= ii) { 29106 break; 29107 } 29108 } 29109 state = (state || InitialState)[fnArray[i]]; 29110 if (!state || Array.isArray(state)) { 29111 i++; 29112 continue; 29113 } 29114 context.iCurr = i; 29115 i++; 29116 if (state.checkFn && !(0, state.checkFn)(context)) { 29117 state = null; 29118 continue; 29119 } 29120 match = state; 29121 state = null; 29122 } 29123 this.state = state; 29124 this.match = match; 29125 this.lastProcessed = i; 29126 } 29127 flush() { 29128 while (this.match) { 29129 const length = this.queue.fnArray.length; 29130 this.lastProcessed = (0, this.match.processFn)(this.context, length); 29131 this.match = null; 29132 this.state = null; 29133 this._optimize(); 29134 } 29135 } 29136 reset() { 29137 this.state = null; 29138 this.match = null; 29139 this.lastProcessed = 0; 29140 } 29141} 29142class OperatorList { 29143 static CHUNK_SIZE = 1000; 29144 static CHUNK_SIZE_ABOUT = this.CHUNK_SIZE - 5; 29145 constructor(intent = 0, streamSink) { 29146 this._streamSink = streamSink; 29147 this.fnArray = []; 29148 this.argsArray = []; 29149 this.optimizer = streamSink && !(intent & RenderingIntentFlag.OPLIST) ? new QueueOptimizer(this) : new NullOptimizer(this); 29150 this.dependencies = new Set(); 29151 this._totalLength = 0; 29152 this.weight = 0; 29153 this._resolved = streamSink ? null : Promise.resolve(); 29154 } 29155 set isOffscreenCanvasSupported(value) { 29156 this.optimizer.isOffscreenCanvasSupported = value; 29157 } 29158 get length() { 29159 return this.argsArray.length; 29160 } 29161 get ready() { 29162 return this._resolved || this._streamSink.ready; 29163 } 29164 get totalLength() { 29165 return this._totalLength + this.length; 29166 } 29167 addOp(fn, args) { 29168 this.optimizer.push(fn, args); 29169 this.weight++; 29170 if (this._streamSink) { 29171 if (this.weight >= OperatorList.CHUNK_SIZE) { 29172 this.flush(); 29173 } else if (this.weight >= OperatorList.CHUNK_SIZE_ABOUT && (fn === OPS.restore || fn === OPS.endText)) { 29174 this.flush(); 29175 } 29176 } 29177 } 29178 addImageOps(fn, args, optionalContent) { 29179 if (optionalContent !== undefined) { 29180 this.addOp(OPS.beginMarkedContentProps, ["OC", optionalContent]); 29181 } 29182 this.addOp(fn, args); 29183 if (optionalContent !== undefined) { 29184 this.addOp(OPS.endMarkedContent, []); 29185 } 29186 } 29187 addDependency(dependency) { 29188 if (this.dependencies.has(dependency)) { 29189 return; 29190 } 29191 this.dependencies.add(dependency);
vendor: 6,286 bytes, lines 29192-29417
29192 this.addOp(OPS.dependency, [dependency]); 29193 } 29194 addDependencies(dependencies) { 29195 for (const dependency of dependencies) { 29196 this.addDependency(dependency); 29197 } 29198 } 29199 addOpList(opList) { 29200 if (!(opList instanceof OperatorList)) { 29201 warn('addOpList - ignoring invalid "opList" parameter.'); 29202 return; 29203 } 29204 for (const dependency of opList.dependencies) { 29205 this.dependencies.add(dependency); 29206 } 29207 for (let i = 0, ii = opList.length; i < ii; i++) { 29208 this.addOp(opList.fnArray[i], opList.argsArray[i]); 29209 } 29210 } 29211 getIR() { 29212 return { 29213 fnArray: this.fnArray, 29214 argsArray: this.argsArray, 29215 length: this.length 29216 }; 29217 } 29218 get _transfers() { 29219 const transfers = []; 29220 const { 29221 fnArray, 29222 argsArray, 29223 length 29224 } = this; 29225 for (let i = 0; i < length; i++) { 29226 switch (fnArray[i]) { 29227 case OPS.paintInlineImageXObject: 29228 case OPS.paintInlineImageXObjectGroup: 29229 case OPS.paintImageMaskXObject: 29230 const arg = argsArray[i][0]; 29231 if (!arg.cached && arg.data?.buffer instanceof ArrayBuffer) { 29232 transfers.push(arg.data.buffer); 29233 } 29234 break; 29235 } 29236 } 29237 return transfers; 29238 } 29239 flush(lastChunk = false, separateAnnots = null) { 29240 this.optimizer.flush(); 29241 const length = this.length; 29242 this._totalLength += length; 29243 this._streamSink.enqueue({ 29244 fnArray: this.fnArray, 29245 argsArray: this.argsArray, 29246 lastChunk, 29247 separateAnnots, 29248 length 29249 }, 1, this._transfers); 29250 this.dependencies.clear(); 29251 this.fnArray.length = 0; 29252 this.argsArray.length = 0; 29253 this.weight = 0; 29254 this.optimizer.reset(); 29255 } 29256} 29257 29258;// ./src/core/image.js 29259 29260 29261 29262 29263 29264 29265 29266 29267 29268function decodeAndClamp(value, addend, coefficient, max) { 29269 value = addend + value * coefficient; 29270 if (value < 0) { 29271 value = 0; 29272 } else if (value > max) { 29273 value = max; 29274 } 29275 return value; 29276} 29277function resizeImageMask(src, bpc, w1, h1, w2, h2) { 29278 const length = w2 * h2; 29279 let dest; 29280 if (bpc <= 8) { 29281 dest = new Uint8Array(length); 29282 } else if (bpc <= 16) { 29283 dest = new Uint16Array(length); 29284 } else { 29285 dest = new Uint32Array(length); 29286 } 29287 const xRatio = w1 / w2; 29288 const yRatio = h1 / h2; 29289 let i, 29290 j, 29291 py, 29292 newIndex = 0, 29293 oldIndex; 29294 const xScaled = new Uint16Array(w2); 29295 const w1Scanline = w1; 29296 for (i = 0; i < w2; i++) { 29297 xScaled[i] = Math.floor(i * xRatio); 29298 } 29299 for (i = 0; i < h2; i++) { 29300 py = Math.floor(i * yRatio) * w1Scanline; 29301 for (j = 0; j < w2; j++) { 29302 oldIndex = py + xScaled[j]; 29303 dest[newIndex++] = src[oldIndex]; 29304 } 29305 } 29306 return dest; 29307} 29308class PDFImage { 29309 constructor({ 29310 xref, 29311 res, 29312 image, 29313 isInline = false, 29314 smask = null, 29315 mask = null, 29316 isMask = false, 29317 pdfFunctionFactory, 29318 localColorSpaceCache 29319 }) { 29320 this.image = image; 29321 const dict = image.dict; 29322 const filter = dict.get("F", "Filter"); 29323 let filterName; 29324 if (filter instanceof Name) { 29325 filterName = filter.name; 29326 } else if (Array.isArray(filter)) { 29327 const filterZero = xref.fetchIfRef(filter[0]); 29328 if (filterZero instanceof Name) { 29329 filterName = filterZero.name; 29330 } 29331 } 29332 switch (filterName) { 29333 case "JPXDecode": 29334 ({ 29335 width: image.width, 29336 height: image.height, 29337 componentsCount: image.numComps, 29338 bitsPerComponent: image.bitsPerComponent 29339 } = JpxImage.parseImageProperties(image.stream)); 29340 image.stream.reset(); 29341 this.jpxDecoderOptions = { 29342 numComponents: 0, 29343 isIndexedColormap: false, 29344 smaskInData: dict.has("SMaskInData") 29345 }; 29346 break; 29347 case "JBIG2Decode": 29348 image.bitsPerComponent = 1; 29349 image.numComps = 1; 29350 break; 29351 } 29352 let width = dict.get("W", "Width"); 29353 let height = dict.get("H", "Height"); 29354 if (Number.isInteger(image.width) && image.width > 0 && Number.isInteger(image.height) && image.height > 0 && (image.width !== width || image.height !== height)) { 29355 warn("PDFImage - using the Width/Height of the image data, " + "rather than the image dictionary."); 29356 width = image.width; 29357 height = image.height; 29358 } 29359 if (width < 1 || height < 1) { 29360 throw new FormatError(`Invalid image width: ${width} or height: ${height}`); 29361 } 29362 this.width = width; 29363 this.height = height; 29364 this.interpolate = dict.get("I", "Interpolate"); 29365 this.imageMask = dict.get("IM", "ImageMask") || false; 29366 this.matte = dict.get("Matte") || false; 29367 let bitsPerComponent = image.bitsPerComponent; 29368 if (!bitsPerComponent) { 29369 bitsPerComponent = dict.get("BPC", "BitsPerComponent"); 29370 if (!bitsPerComponent) { 29371 if (this.imageMask) { 29372 bitsPerComponent = 1; 29373 } else { 29374 throw new FormatError(`Bits per component missing in image: ${this.imageMask}`); 29375 } 29376 } 29377 } 29378 this.bpc = bitsPerComponent; 29379 if (!this.imageMask) { 29380 let colorSpace = dict.getRaw("CS") || dict.getRaw("ColorSpace"); 29381 const hasColorSpace = !!colorSpace; 29382 if (!hasColorSpace) { 29383 if (this.jpxDecoderOptions) { 29384 colorSpace = Name.get("DeviceRGBA"); 29385 } else { 29386 switch (image.numComps) { 29387 case 1: 29388 colorSpace = Name.get("DeviceGray"); 29389 break; 29390 case 3: 29391 colorSpace = Name.get("DeviceRGB"); 29392 break; 29393 case 4: 29394 colorSpace = Name.get("DeviceCMYK"); 29395 break; 29396 default: 29397 throw new Error(`Images with ${image.numComps} color components not supported.`); 29398 } 29399 } 29400 } else if (this.jpxDecoderOptions?.smaskInData) { 29401 colorSpace = Name.get("DeviceRGBA"); 29402 } 29403 this.colorSpace = ColorSpace.parse({ 29404 cs: colorSpace, 29405 xref, 29406 resources: isInline ? res : null, 29407 pdfFunctionFactory, 29408 localColorSpaceCache 29409 }); 29410 this.numComps = this.colorSpace.numComps; 29411 if (this.jpxDecoderOptions) { 29412 this.jpxDecoderOptions.numComponents = hasColorSpace ? this.numComp : 0; 29413 this.jpxDecoderOptions.isIndexedColormap = this.colorSpace.name === "Indexed"; 29414 } 29415 } 29416 this.decode = dict.getArray("D", "Decode"); 29417 this.needsDecode = false;
vendor: 4,859 bytes, lines 29418-29600
29418 if (this.decode && (this.colorSpace && !this.colorSpace.isDefaultDecode(this.decode, bitsPerComponent) || isMask && !ColorSpace.isDefaultDecode(this.decode, 1))) { 29419 this.needsDecode = true; 29420 const max = (1 << bitsPerComponent) - 1; 29421 this.decodeCoefficients = []; 29422 this.decodeAddends = []; 29423 const isIndexed = this.colorSpace?.name === "Indexed"; 29424 for (let i = 0, j = 0; i < this.decode.length; i += 2, ++j) { 29425 const dmin = this.decode[i]; 29426 const dmax = this.decode[i + 1]; 29427 this.decodeCoefficients[j] = isIndexed ? (dmax - dmin) / max : dmax - dmin; 29428 this.decodeAddends[j] = isIndexed ? dmin : max * dmin; 29429 } 29430 } 29431 if (smask) { 29432 this.smask = new PDFImage({ 29433 xref, 29434 res, 29435 image: smask, 29436 isInline, 29437 pdfFunctionFactory, 29438 localColorSpaceCache 29439 }); 29440 } else if (mask) { 29441 if (mask instanceof BaseStream) { 29442 const maskDict = mask.dict, 29443 imageMask = maskDict.get("IM", "ImageMask"); 29444 if (!imageMask) { 29445 warn("Ignoring /Mask in image without /ImageMask."); 29446 } else { 29447 this.mask = new PDFImage({ 29448 xref, 29449 res, 29450 image: mask, 29451 isInline, 29452 isMask: true, 29453 pdfFunctionFactory, 29454 localColorSpaceCache 29455 }); 29456 } 29457 } else { 29458 this.mask = mask; 29459 } 29460 } 29461 } 29462 static async buildImage({ 29463 xref, 29464 res, 29465 image, 29466 isInline = false, 29467 pdfFunctionFactory, 29468 localColorSpaceCache 29469 }) { 29470 const imageData = image; 29471 let smaskData = null; 29472 let maskData = null; 29473 const smask = image.dict.get("SMask"); 29474 const mask = image.dict.get("Mask"); 29475 if (smask) { 29476 if (smask instanceof BaseStream) { 29477 smaskData = smask; 29478 } else { 29479 warn("Unsupported /SMask format."); 29480 } 29481 } else if (mask) { 29482 if (mask instanceof BaseStream || Array.isArray(mask)) { 29483 maskData = mask; 29484 } else { 29485 warn("Unsupported /Mask format."); 29486 } 29487 } 29488 return new PDFImage({ 29489 xref, 29490 res, 29491 image: imageData, 29492 isInline, 29493 smask: smaskData, 29494 mask: maskData, 29495 pdfFunctionFactory, 29496 localColorSpaceCache 29497 }); 29498 } 29499 static createRawMask({ 29500 imgArray, 29501 width, 29502 height, 29503 imageIsFromDecodeStream, 29504 inverseDecode, 29505 interpolate 29506 }) { 29507 const computedLength = (width + 7 >> 3) * height; 29508 const actualLength = imgArray.byteLength; 29509 const haveFullData = computedLength === actualLength; 29510 let data, i; 29511 if (imageIsFromDecodeStream && (!inverseDecode || haveFullData)) { 29512 data = imgArray; 29513 } else if (!inverseDecode) { 29514 data = new Uint8Array(imgArray); 29515 } else { 29516 data = new Uint8Array(computedLength); 29517 data.set(imgArray); 29518 data.fill(0xff, actualLength); 29519 } 29520 if (inverseDecode) { 29521 for (i = 0; i < actualLength; i++) { 29522 data[i] ^= 0xff; 29523 } 29524 } 29525 return { 29526 data, 29527 width, 29528 height, 29529 interpolate 29530 }; 29531 } 29532 static async createMask({ 29533 imgArray, 29534 width, 29535 height, 29536 imageIsFromDecodeStream, 29537 inverseDecode, 29538 interpolate, 29539 isOffscreenCanvasSupported = false 29540 }) { 29541 const isSingleOpaquePixel = width === 1 && height === 1 && inverseDecode === (imgArray.length === 0 || !!(imgArray[0] & 128)); 29542 if (isSingleOpaquePixel) { 29543 return { 29544 isSingleOpaquePixel 29545 }; 29546 } 29547 if (isOffscreenCanvasSupported) { 29548 if (ImageResizer.needsToBeResized(width, height)) { 29549 const data = new Uint8ClampedArray(width * height * 4); 29550 convertBlackAndWhiteToRGBA({ 29551 src: imgArray, 29552 dest: data, 29553 width, 29554 height, 29555 nonBlackColor: 0, 29556 inverseDecode 29557 }); 29558 return ImageResizer.createImage({ 29559 kind: ImageKind.RGBA_32BPP, 29560 data, 29561 width, 29562 height, 29563 interpolate 29564 }); 29565 } 29566 const canvas = new OffscreenCanvas(width, height); 29567 const ctx = canvas.getContext("2d"); 29568 const imgData = ctx.createImageData(width, height); 29569 convertBlackAndWhiteToRGBA({ 29570 src: imgArray, 29571 dest: imgData.data, 29572 width, 29573 height, 29574 nonBlackColor: 0, 29575 inverseDecode 29576 }); 29577 ctx.putImageData(imgData, 0, 0); 29578 const bitmap = canvas.transferToImageBitmap(); 29579 return { 29580 data: null, 29581 width, 29582 height, 29583 interpolate, 29584 bitmap 29585 }; 29586 } 29587 return this.createRawMask({ 29588 imgArray, 29589 width, 29590 height, 29591 inverseDecode, 29592 imageIsFromDecodeStream, 29593 interpolate 29594 }); 29595 } 29596 get drawWidth() { 29597 return Math.max(this.width, this.smask?.width || 0, this.mask?.width || 0); 29598 } 29599 get drawHeight() { 29600 return Math.max(this.height, this.smask?.height || 0, this.mask?.height || 0
29600); 29601 } 29602 decodeBuffer(buffer) { 29603 const bpc = this.bpc; 29604 const numComps = this.numComps; 29605 const decodeAddends = this.decodeAddends; 29606 const decodeCoefficients = this.decodeCoefficients; 29607 const max = (1 << bpc) - 1; 29608 let i, ii; 29609 if (bpc === 1) { 29610 for (i = 0, ii = buffer.length; i < ii; i++) { 29611 buffer[i] = +!buffer[i]; 29612 } 29613 return; 29614 } 29615 let index = 0; 29616 for (i = 0, ii = this.width * this.height; i < ii; i++) { 29617 for (let j = 0; j < numComps; j++) { 29618 buffer[index] = decodeAndClamp(buffer[index], decodeAddends[j], decodeCoefficients[j]
vendor: 13,520 bytes, lines 29618-30070
29618, max); 29619 index++; 29620 } 29621 } 29622 } 29623 getComponents(buffer) { 29624 const bpc = this.bpc; 29625 if (bpc === 8) { 29626 return buffer; 29627 } 29628 const width = this.width; 29629 const height = this.height; 29630 const numComps = this.numComps; 29631 const length = width * height * numComps; 29632 let bufferPos = 0; 29633 let output; 29634 if (bpc <= 8) { 29635 output = new Uint8Array(length); 29636 } else if (bpc <= 16) { 29637 output = new Uint16Array(length); 29638 } else { 29639 output = new Uint32Array(length); 29640 } 29641 const rowComps = width * numComps; 29642 const max = (1 << bpc) - 1; 29643 let i = 0, 29644 ii, 29645 buf; 29646 if (bpc === 1) { 29647 let mask, loop1End, loop2End; 29648 for (let j = 0; j < height; j++) { 29649 loop1End = i + (rowComps & ~7); 29650 loop2End = i + rowComps; 29651 while (i < loop1End) { 29652 buf = buffer[bufferPos++]; 29653 output[i] = buf >> 7 & 1; 29654 output[i + 1] = buf >> 6 & 1; 29655 output[i + 2] = buf >> 5 & 1; 29656 output[i + 3] = buf >> 4 & 1; 29657 output[i + 4] = buf >> 3 & 1; 29658 output[i + 5] = buf >> 2 & 1; 29659 output[i + 6] = buf >> 1 & 1; 29660 output[i + 7] = buf & 1; 29661 i += 8; 29662 } 29663 if (i < loop2End) { 29664 buf = buffer[bufferPos++]; 29665 mask = 128; 29666 while (i < loop2End) { 29667 output[i++] = +!!(buf & mask); 29668 mask >>= 1; 29669 } 29670 } 29671 } 29672 } else { 29673 let bits = 0; 29674 buf = 0; 29675 for (i = 0, ii = length; i < ii; ++i) { 29676 if (i % rowComps === 0) { 29677 buf = 0; 29678 bits = 0; 29679 } 29680 while (bits < bpc) { 29681 buf = buf << 8 | buffer[bufferPos++]; 29682 bits += 8; 29683 } 29684 const remainingBits = bits - bpc; 29685 let value = buf >> remainingBits; 29686 if (value < 0) { 29687 value = 0; 29688 } else if (value > max) { 29689 value = max; 29690 } 29691 output[i] = value; 29692 buf &= (1 << remainingBits) - 1; 29693 bits = remainingBits; 29694 } 29695 } 29696 return output; 29697 } 29698 async fillOpacity(rgbaBuf, width, height, actualHeight, image) { 29699 const smask = this.smask; 29700 const mask = this.mask; 29701 let alphaBuf, sw, sh, i, ii, j; 29702 if (smask) { 29703 sw = smask.width; 29704 sh = smask.height; 29705 alphaBuf = new Uint8ClampedArray(sw * sh); 29706 await smask.fillGrayBuffer(alphaBuf); 29707 if (sw !== width || sh !== height) { 29708 alphaBuf = resizeImageMask(alphaBuf, smask.bpc, sw, sh, width, height); 29709 } 29710 } else if (mask) { 29711 if (mask instanceof PDFImage) { 29712 sw = mask.width; 29713 sh = mask.height; 29714 alphaBuf = new Uint8ClampedArray(sw * sh); 29715 mask.numComps = 1; 29716 await mask.fillGrayBuffer(alphaBuf); 29717 for (i = 0, ii = sw * sh; i < ii; ++i) { 29718 alphaBuf[i] = 255 - alphaBuf[i]; 29719 } 29720 if (sw !== width || sh !== height) { 29721 alphaBuf = resizeImageMask(alphaBuf, mask.bpc, sw, sh, width, height); 29722 } 29723 } else if (Array.isArray(mask)) { 29724 alphaBuf = new Uint8ClampedArray(width * height); 29725 const numComps = this.numComps; 29726 for (i = 0, ii = width * height; i < ii; ++i) { 29727 let opacity = 0; 29728 const imageOffset = i * numComps; 29729 for (j = 0; j < numComps; ++j) { 29730 const color = image[imageOffset + j]; 29731 const maskOffset = j * 2; 29732 if (color < mask[maskOffset] || color > mask[maskOffset + 1]) { 29733 opacity = 255; 29734 break; 29735 } 29736 } 29737 alphaBuf[i] = opacity; 29738 } 29739 } else { 29740 throw new FormatError("Unknown mask format."); 29741 } 29742 } 29743 if (alphaBuf) { 29744 for (i = 0, j = 3, ii = width * actualHeight; i < ii; ++i, j += 4) { 29745 rgbaBuf[j] = alphaBuf[i]; 29746 } 29747 } else { 29748 for (i = 0, j = 3, ii = width * actualHeight; i < ii; ++i, j += 4) { 29749 rgbaBuf[j] = 255; 29750 } 29751 } 29752 } 29753 undoPreblend(buffer, width, height) { 29754 const matte = this.smask?.matte; 29755 if (!matte) { 29756 return; 29757 } 29758 const matteRgb = this.colorSpace.getRgb(matte, 0); 29759 const matteR = matteRgb[0]; 29760 const matteG = matteRgb[1]; 29761 const matteB = matteRgb[2]; 29762 const length = width * height * 4; 29763 for (let i = 0; i < length; i += 4) { 29764 const alpha = buffer[i + 3]; 29765 if (alpha === 0) { 29766 buffer[i] = 255; 29767 buffer[i + 1] = 255; 29768 buffer[i + 2] = 255; 29769 continue; 29770 } 29771 const k = 255 / alpha; 29772 buffer[i] = (buffer[i] - matteR) * k + matteR; 29773 buffer[i + 1] = (buffer[i + 1] - matteG) * k + matteG; 29774 buffer[i + 2] = (buffer[i + 2] - matteB) * k + matteB; 29775 } 29776 } 29777 async createImageData(forceRGBA = false, isOffscreenCanvasSupported = false) { 29778 const drawWidth = this.drawWidth; 29779 const drawHeight = this.drawHeight; 29780 const imgData = { 29781 width: drawWidth, 29782 height: drawHeight, 29783 interpolate: this.interpolate, 29784 kind: 0, 29785 data: null 29786 }; 29787 const numComps = this.numComps; 29788 const originalWidth = this.width; 29789 const originalHeight = this.height; 29790 const bpc = this.bpc; 29791 const rowBytes = originalWidth * numComps * bpc + 7 >> 3; 29792 const mustBeResized = isOffscreenCanvasSupported && ImageResizer.needsToBeResized(drawWidth, drawHeight); 29793 if (!this.smask && !this.mask && this.colorSpace.name === "DeviceRGBA") { 29794 imgData.kind = ImageKind.RGBA_32BPP; 29795 const imgArray = imgData.data = await this.getImageBytes(originalHeight * originalWidth * 4, {}); 29796 if (isOffscreenCanvasSupported) { 29797 if (!mustBeResized) { 29798 return this.createBitmap(ImageKind.RGBA_32BPP, drawWidth, drawHeight, imgArray); 29799 } 29800 return ImageResizer.createImage(imgData, false); 29801 } 29802 return imgData; 29803 } 29804 if (!forceRGBA) { 29805 let kind; 29806 if (this.colorSpace.name === "DeviceGray" && bpc === 1) { 29807 kind = ImageKind.GRAYSCALE_1BPP; 29808 } else if (this.colorSpace.name === "DeviceRGB" && bpc === 8 && !this.needsDecode) { 29809 kind = ImageKind.RGB_24BPP; 29810 } 29811 if (kind && !this.smask && !this.mask && drawWidth === originalWidth && drawHeight === originalHeight) { 29812 const image = await this.#getImage(originalWidth, originalHeight); 29813 if (image) { 29814 return image; 29815 } 29816 const data = await this.getImageBytes(originalHeight * rowBytes, {}); 29817 if (isOffscreenCanvasSupported) { 29818 if (mustBeResized) { 29819 return ImageResizer.createImage({ 29820 data, 29821 kind, 29822 width: drawWidth, 29823 height: drawHeight, 29824 interpolate: this.interpolate 29825 }, this.needsDecode); 29826 } 29827 return this.createBitmap(kind, originalWidth, originalHeight, data); 29828 } 29829 imgData.kind = kind; 29830 imgData.data = data; 29831 if (this.needsDecode) { 29832 assert(kind === ImageKind.GRAYSCALE_1BPP, "PDFImage.createImageData: The image must be grayscale."); 29833 const buffer = imgData.data; 29834 for (let i = 0, ii = buffer.length; i < ii; i++) { 29835 buffer[i] ^= 0xff; 29836 } 29837 } 29838 return imgData; 29839 } 29840 if (this.image instanceof JpegStream && !this.smask && !this.mask && !this.needsDecode) { 29841 let imageLength = originalHeight * rowBytes; 29842 if (isOffscreenCanvasSupported && !mustBeResized) { 29843 let isHandled = false; 29844 switch (this.colorSpace.name) { 29845 case "DeviceGray": 29846 imageLength *= 4; 29847 isHandled = true; 29848 break; 29849 case "DeviceRGB": 29850 imageLength = imageLength / 3 * 4; 29851 isHandled = true; 29852 break; 29853 case "DeviceCMYK": 29854 isHandled = true; 29855 break; 29856 } 29857 if (isHandled) { 29858 const image = await this.#getImage(drawWidth, drawHeight); 29859 if (image) { 29860 return image; 29861 } 29862 const rgba = await this.getImageBytes(imageLength, { 29863 drawWidth, 29864 drawHeight, 29865 forceRGBA: true 29866 }); 29867 return this.createBitmap(ImageKind.RGBA_32BPP, drawWidth, drawHeight, rgba); 29868 } 29869 } else { 29870 switch (this.colorSpace.name) { 29871 case "DeviceGray": 29872 imageLength *= 3; 29873 case "DeviceRGB": 29874 case "DeviceCMYK": 29875 imgData.kind = ImageKind.RGB_24BPP; 29876 imgData.data = await this.getImageBytes(imageLength, { 29877 drawWidth, 29878 drawHeight, 29879 forceRGB: true 29880 }); 29881 if (mustBeResized) { 29882 return ImageResizer.createImage(imgData); 29883 } 29884 return imgData; 29885 } 29886 } 29887 } 29888 } 29889 const imgArray = await this.getImageBytes(originalHeight * rowBytes, { 29890 internal: true 29891 }); 29892 const actualHeight = 0 | imgArray.length / rowBytes * drawHeight / originalHeight; 29893 const comps = this.getComponents(imgArray); 29894 let alpha01, maybeUndoPreblend; 29895 let canvas, ctx, canvasImgData, data; 29896 if (isOffscreenCanvasSupported && !mustBeResized) { 29897 canvas = new OffscreenCanvas(drawWidth, drawHeight); 29898 ctx = canvas.getContext("2d"); 29899 canvasImgData = ctx.createImageData(drawWidth, drawHeight); 29900 data = canvasImgData.data; 29901 } 29902 imgData.kind = ImageKind.RGBA_32BPP; 29903 if (!forceRGBA && !this.smask && !this.mask) { 29904 if (!isOffscreenCanvasSupported || mustBeResized) { 29905 imgData.kind = ImageKind.RGB_24BPP; 29906 data = new Uint8ClampedArray(drawWidth * drawHeight * 3); 29907 alpha01 = 0; 29908 } else { 29909 const arr = new Uint32Array(data.buffer); 29910 arr.fill(FeatureTest.isLittleEndian ? 0xff000000 : 0x000000ff); 29911 alpha01 = 1; 29912 } 29913 maybeUndoPreblend = false; 29914 } else { 29915 if (!isOffscreenCanvasSupported || mustBeResized) { 29916 data = new Uint8ClampedArray(drawWidth * drawHeight * 4); 29917 } 29918 alpha01 = 1; 29919 maybeUndoPreblend = true; 29920 await this.fillOpacity(data, drawWidth, drawHeight, actualHeight, comps); 29921 } 29922 if (this.needsDecode) { 29923 this.decodeBuffer(comps); 29924 } 29925 this.colorSpace.fillRgb(data, originalWidth, originalHeight, drawWidth, drawHeight, actualHeight, bpc, comps, alpha01); 29926 if (maybeUndoPreblend) { 29927 this.undoPreblend(data, drawWidth, actualHeight); 29928 } 29929 if (isOffscreenCanvasSupported && !mustBeResized) { 29930 ctx.putImageData(canvasImgData, 0, 0); 29931 const bitmap = canvas.transferToImageBitmap(); 29932 return { 29933 data: null, 29934 width: drawWidth, 29935 height: drawHeight, 29936 bitmap, 29937 interpolate: this.interpolate 29938 }; 29939 } 29940 imgData.data = data; 29941 if (mustBeResized) { 29942 return ImageResizer.createImage(imgData); 29943 } 29944 return imgData; 29945 } 29946 async fillGrayBuffer(buffer) { 29947 const numComps = this.numComps; 29948 if (numComps !== 1) { 29949 throw new FormatError(`Reading gray scale from a color image: ${numComps}`); 29950 } 29951 const width = this.width; 29952 const height = this.height; 29953 const bpc = this.bpc; 29954 const rowBytes = width * numComps * bpc + 7 >> 3; 29955 const imgArray = await this.getImageBytes(height * rowBytes, { 29956 internal: true 29957 }); 29958 const comps = this.getComponents(imgArray); 29959 let i, length; 29960 if (bpc === 1) { 29961 length = width * height; 29962 if (this.needsDecode) { 29963 for (i = 0; i < length; ++i) { 29964 buffer[i] = comps[i] - 1 & 255; 29965 } 29966 } else { 29967 for (i = 0; i < length; ++i) { 29968 buffer[i] = -comps[i] & 255; 29969 } 29970 } 29971 return; 29972 } 29973 if (this.needsDecode) { 29974 this.decodeBuffer(comps); 29975 } 29976 length = width * height; 29977 const scale = 255 / ((1 << bpc) - 1); 29978 for (i = 0; i < length; ++i) { 29979 buffer[i] = scale * comps[i]; 29980 } 29981 } 29982 createBitmap(kind, width, height, src) { 29983 const canvas = new OffscreenCanvas(width, height); 29984 const ctx = canvas.getContext("2d"); 29985 let imgData; 29986 if (kind === ImageKind.RGBA_32BPP) { 29987 imgData = new ImageData(src, width, height); 29988 } else { 29989 imgData = ctx.createImageData(width, height); 29990 convertToRGBA({ 29991 kind, 29992 src, 29993 dest: new Uint32Array(imgData.data.buffer), 29994 width, 29995 height, 29996 inverseDecode: this.needsDecode 29997 }); 29998 } 29999 ctx.putImageData(imgData, 0, 0); 30000 const bitmap = canvas.transferToImageBitmap(); 30001 return { 30002 data: null, 30003 width, 30004 height, 30005 bitmap, 30006 interpolate: this.interpolate 30007 }; 30008 } 30009 async #getImage(width, height) { 30010 const bitmap = await this.image.getTransferableImage(); 30011 if (!bitmap) { 30012 return null; 30013 } 30014 return { 30015 data: null, 30016 width, 30017 height, 30018 bitmap, 30019 interpolate: this.interpolate 30020 }; 30021 } 30022 async getImageBytes(length, { 30023 drawWidth, 30024 drawHeight, 30025 forceRGBA = false, 30026 forceRGB = false, 30027 internal = false 30028 }) { 30029 this.image.reset(); 30030 this.image.drawWidth = drawWidth || this.width; 30031 this.image.drawHeight = drawHeight || this.height; 30032 this.image.forceRGBA = !!forceRGBA; 30033 this.image.forceRGB = !!forceRGB; 30034 const imageBytes = await this.image.getImageData(length, this.jpxDecoderOptions); 30035 if (internal || this.image instanceof DecodeStream) { 30036 return imageBytes; 30037 } 30038 assert(imageBytes instanceof Uint8Array, 'PDFImage.getImageBytes: Unsupported "imageBytes" type.'); 30039 return new Uint8Array(imageBytes); 30040 } 30041} 30042 30043;// ./src/core/evaluator.js 30044 30045 30046 30047 30048 30049 30050 30051 30052 30053 30054 30055 30056 30057 30058 30059 30060 30061 30062 30063 30064 30065 30066 30067 30068 30069 30070
vendor: 11,339 bytes, lines 30071-30453
30071const DefaultPartialEvaluatorOptions = Object.freeze({ 30072 maxImageSize: -1, 30073 disableFontFace: false, 30074 ignoreErrors: false, 30075 isEvalSupported: true, 30076 isOffscreenCanvasSupported: false, 30077 isChrome: false, 30078 canvasMaxAreaInBytes: -1, 30079 fontExtraProperties: false, 30080 useSystemFonts: true, 30081 cMapUrl: null, 30082 standardFontDataUrl: null 30083}); 30084const PatternType = { 30085 TILING: 1, 30086 SHADING: 2 30087}; 30088const TEXT_CHUNK_BATCH_SIZE = 10; 30089const deferred = Promise.resolve(); 30090function normalizeBlendMode(value, parsingArray = false) { 30091 if (Array.isArray(value)) { 30092 for (const val of value) { 30093 const maybeBM = normalizeBlendMode(val, true); 30094 if (maybeBM) { 30095 return maybeBM; 30096 } 30097 } 30098 warn(`Unsupported blend mode Array: ${value}`); 30099 return "source-over"; 30100 } 30101 if (!(value instanceof Name)) { 30102 if (parsingArray) { 30103 return null; 30104 } 30105 return "source-over"; 30106 } 30107 switch (value.name) { 30108 case "Normal": 30109 case "Compatible": 30110 return "source-over"; 30111 case "Multiply": 30112 return "multiply"; 30113 case "Screen": 30114 return "screen"; 30115 case "Overlay": 30116 return "overlay"; 30117 case "Darken": 30118 return "darken"; 30119 case "Lighten": 30120 return "lighten"; 30121 case "ColorDodge": 30122 return "color-dodge"; 30123 case "ColorBurn": 30124 return "color-burn"; 30125 case "HardLight": 30126 return "hard-light"; 30127 case "SoftLight": 30128 return "soft-light"; 30129 case "Difference": 30130 return "difference"; 30131 case "Exclusion": 30132 return "exclusion"; 30133 case "Hue": 30134 return "hue"; 30135 case "Saturation": 30136 return "saturation"; 30137 case "Color": 30138 return "color"; 30139 case "Luminosity": 30140 return "luminosity"; 30141 } 30142 if (parsingArray) { 30143 return null; 30144 } 30145 warn(`Unsupported blend mode: ${value.name}`); 30146 return "source-over"; 30147} 30148function addLocallyCachedImageOps(opList, data) { 30149 if (data.objId) { 30150 opList.addDependency(data.objId); 30151 } 30152 opList.addImageOps(data.fn, data.args, data.optionalContent); 30153 if (data.fn === OPS.paintImageMaskXObject && data.args[0]?.count > 0) { 30154 data.args[0].count++; 30155 } 30156} 30157class TimeSlotManager { 30158 static TIME_SLOT_DURATION_MS = 20; 30159 static CHECK_TIME_EVERY = 100; 30160 constructor() { 30161 this.reset(); 30162 } 30163 check() { 30164 if (++this.checked < TimeSlotManager.CHECK_TIME_EVERY) { 30165 return false; 30166 } 30167 this.checked = 0; 30168 return this.endTime <= Date.now(); 30169 } 30170 reset() { 30171 this.endTime = Date.now() + TimeSlotManager.TIME_SLOT_DURATION_MS; 30172 this.checked = 0; 30173 } 30174} 30175class PartialEvaluator { 30176 constructor({ 30177 xref, 30178 handler, 30179 pageIndex, 30180 idFactory, 30181 fontCache, 30182 builtInCMapCache, 30183 standardFontDataCache, 30184 globalImageCache, 30185 systemFontCache, 30186 options = null 30187 }) { 30188 this.xref = xref; 30189 this.handler = handler; 30190 this.pageIndex = pageIndex; 30191 this.idFactory = idFactory; 30192 this.fontCache = fontCache; 30193 this.builtInCMapCache = builtInCMapCache; 30194 this.standardFontDataCache = standardFontDataCache; 30195 this.globalImageCache = globalImageCache; 30196 this.systemFontCache = systemFontCache; 30197 this.options = options || DefaultPartialEvaluatorOptions; 30198 this.type3FontRefs = null; 30199 this._regionalImageCache = new RegionalImageCache(); 30200 this._fetchBuiltInCMapBound = this.fetchBuiltInCMap.bind(this); 30201 ImageResizer.setOptions({ 30202 isChrome: this.options.isChrome, 30203 maxArea: this.options.canvasMaxAreaInBytes 30204 }); 30205 } 30206 get _pdfFunctionFactory() { 30207 const pdfFunctionFactory = new PDFFunctionFactory({ 30208 xref: this.xref, 30209 isEvalSupported: this.options.isEvalSupported 30210 }); 30211 return shadow(this, "_pdfFunctionFactory", pdfFunctionFactory); 30212 } 30213 get parsingType3Font() { 30214 return !!this.type3FontRefs; 30215 } 30216 clone(newOptions = null) { 30217 const newEvaluator = Object.create(this); 30218 newEvaluator.options = Object.assign(Object.create(null), this.options, newOptions); 30219 return newEvaluator; 30220 } 30221 hasBlendModes(resources, nonBlendModesSet) { 30222 if (!(resources instanceof Dict)) { 30223 return false; 30224 } 30225 if (resources.objId && nonBlendModesSet.has(resources.objId)) { 30226 return false; 30227 } 30228 const processed = new RefSet(nonBlendModesSet); 30229 if (resources.objId) { 30230 processed.put(resources.objId); 30231 } 30232 const nodes = [resources], 30233 xref = this.xref; 30234 while (nodes.length) { 30235 const node = nodes.shift(); 30236 const graphicStates = node.get("ExtGState"); 30237 if (graphicStates instanceof Dict) { 30238 for (let graphicState of graphicStates.getRawValues()) { 30239 if (graphicState instanceof Ref) { 30240 if (processed.has(graphicState)) { 30241 continue; 30242 } 30243 try { 30244 graphicState = xref.fetch(graphicState); 30245 } catch (ex) { 30246 processed.put(graphicState); 30247 info(`hasBlendModes - ignoring ExtGState: "${ex}".`); 30248 continue; 30249 } 30250 } 30251 if (!(graphicState instanceof Dict)) { 30252 continue; 30253 } 30254 if (graphicState.objId) { 30255 processed.put(graphicState.objId); 30256 } 30257 const bm = graphicState.get("BM"); 30258 if (bm instanceof Name) { 30259 if (bm.name !== "Normal") { 30260 return true; 30261 } 30262 continue; 30263 } 30264 if (bm !== undefined && Array.isArray(bm)) { 30265 for (const element of bm) { 30266 if (element instanceof Name && element.name !== "Normal") { 30267 return true; 30268 } 30269 } 30270 } 30271 } 30272 } 30273 const xObjects = node.get("XObject"); 30274 if (!(xObjects instanceof Dict)) { 30275 continue; 30276 } 30277 for (let xObject of xObjects.getRawValues()) { 30278 if (xObject instanceof Ref) { 30279 if (processed.has(xObject)) { 30280 continue; 30281 } 30282 try { 30283 xObject = xref.fetch(xObject); 30284 } catch (ex) { 30285 processed.put(xObject); 30286 info(`hasBlendModes - ignoring XObject: "${ex}".`); 30287 continue; 30288 } 30289 } 30290 if (!(xObject instanceof BaseStream)) { 30291 continue; 30292 } 30293 if (xObject.dict.objId) { 30294 processed.put(xObject.dict.objId); 30295 } 30296 const xResources = xObject.dict.get("Resources"); 30297 if (!(xResources instanceof Dict)) { 30298 continue; 30299 } 30300 if (xResources.objId && processed.has(xResources.objId)) { 30301 continue; 30302 } 30303 nodes.push(xResources); 30304 if (xResources.objId) { 30305 processed.put(xResources.objId); 30306 } 30307 } 30308 } 30309 for (const ref of processed) { 30310 nonBlendModesSet.put(ref); 30311 } 30312 return false; 30313 } 30314 async fetchBuiltInCMap(name) { 30315 const cachedData = this.builtInCMapCache.get(name); 30316 if (cachedData) { 30317 return cachedData; 30318 } 30319 let data; 30320 if (this.options.cMapUrl !== null) { 30321 const url = `${this.options.cMapUrl}${name}.bcmap`; 30322 const response = await fetch(url); 30323 if (!response.ok) { 30324 throw new Error(`fetchBuiltInCMap: failed to fetch file "${url}" with "${response.statusText}".`); 30325 } 30326 data = { 30327 cMapData: new Uint8Array(await response.arrayBuffer()), 30328 isCompressed: true 30329 }; 30330 } else { 30331 data = await this.handler.sendWithPromise("FetchBuiltInCMap", { 30332 name 30333 }); 30334 } 30335 this.builtInCMapCache.set(name, data); 30336 return data; 30337 } 30338 async fetchStandardFontData(name) { 30339 const cachedData = this.standardFontDataCache.get(name); 30340 if (cachedData) { 30341 return new Stream(cachedData); 30342 } 30343 if (this.options.useSystemFonts && name !== "Symbol" && name !== "ZapfDingbats") { 30344 return null; 30345 } 30346 const standardFontNameToFileName = getFontNameToFileMap(), 30347 filename = standardFontNameToFileName[name]; 30348 let data; 30349 if (this.options.standardFontDataUrl !== null) { 30350 const url = `${this.options.standardFontDataUrl}${filename}`; 30351 const response = await fetch(url); 30352 if (!response.ok) { 30353 warn(`fetchStandardFontData: failed to fetch file "${url}" with "${response.statusText}".`); 30354 } else { 30355 data = new Uint8Array(await response.arrayBuffer()); 30356 } 30357 } else { 30358 try { 30359 data = await this.handler.sendWithPromise("FetchStandardFontData", { 30360 filename 30361 }); 30362 } catch (e) { 30363 warn(`fetchStandardFontData: failed to fetch file "${filename}" with "${e}".`); 30364 } 30365 } 30366 if (!data) { 30367 return null; 30368 } 30369 this.standardFontDataCache.set(name, data); 30370 return new Stream(data); 30371 } 30372 async buildFormXObject(resources, xobj, smask, operatorList, task, initialState, localColorSpaceCache) { 30373 const dict = xobj.dict; 30374 const matrix = lookupMatrix(dict.getArray("Matrix"), null); 30375 const bbox = lookupNormalRect(dict.getArray("BBox"), null); 30376 let optionalContent, groupOptions; 30377 if (dict.has("OC")) { 30378 optionalContent = await this.parseMarkedContentProps(dict.get("OC"), resources); 30379 } 30380 if (optionalContent !== undefined) { 30381 operatorList.addOp(OPS.beginMarkedContentProps, ["OC", optionalContent]); 30382 } 30383 const group = dict.get("Group"); 30384 if (group) { 30385 groupOptions = { 30386 matrix, 30387 bbox, 30388 smask, 30389 isolated: false, 30390 knockout: false 30391 }; 30392 const groupSubtype = group.get("S"); 30393 let colorSpace = null; 30394 if (isName(groupSubtype, "Transparency")) { 30395 groupOptions.isolated = group.get("I") || false; 30396 groupOptions.knockout = group.get("K") || false; 30397 if (group.has("CS")) { 30398 const cs = group.getRaw("CS"); 30399 const cachedColorSpace = ColorSpace.getCached(cs, this.xref, localColorSpaceCache); 30400 if (cachedColorSpace) { 30401 colorSpace = cachedColorSpace; 30402 } else { 30403 colorSpace = await this.parseColorSpace({ 30404 cs, 30405 resources, 30406 localColorSpaceCache 30407 }); 30408 } 30409 } 30410 } 30411 if (smask?.backdrop) { 30412 colorSpace ||= ColorSpace.singletons.rgb; 30413 smask.backdrop = colorSpace.getRgb(smask.backdrop, 0); 30414 } 30415 operatorList.addOp(OPS.beginGroup, [groupOptions]); 30416 } 30417 const args = group ? [matrix, null] : [matrix, bbox]; 30418 operatorList.addOp(OPS.paintFormXObjectBegin, args); 30419 await this.getOperatorList({ 30420 stream: xobj, 30421 task, 30422 resources: dict.get("Resources") || resources, 30423 operatorList, 30424 initialState 30425 }); 30426 operatorList.addOp(OPS.paintFormXObjectEnd, []); 30427 if (group) { 30428 operatorList.addOp(OPS.endGroup, [groupOptions]); 30429 } 30430 if (optionalContent !== undefined) { 30431 operatorList.addOp(OPS.endMarkedContent, []); 30432 } 30433 } 30434 _sendImgData(objId, imgData, cacheGlobally = false) { 30435 const transfers = imgData ? [imgData.bitmap || imgData.data.buffer] : null; 30436 if (this.parsingType3Font || cacheGlobally) { 30437 return this.handler.send("commonobj", [objId, "Image", imgData], transfers); 30438 } 30439 return this.handler.send("obj", [objId, this.pageIndex, "Image", imgData], transfers); 30440 } 30441 async buildPaintImageXObject({ 30442 resources, 30443 image, 30444 isInline = false, 30445 operatorList, 30446 cacheKey, 30447 localImageCache, 30448 localColorSpaceCache 30449 }) { 30450 const dict = image.dict; 30451 const imageRef = dict.objId; 30452 const w = dict.get("W", "Width"); 30453 const h = dict.get("H", "Height");
vendor: 1,048 bytes, lines 30454-30482
30454 if (!(w && typeof w === "number") || !(h && typeof h === "number")) { 30455 warn("Image dimensions are missing, or not numbers."); 30456 return; 30457 } 30458 const maxImageSize = this.options.maxImageSize; 30459 if (maxImageSize !== -1 && w * h > maxImageSize) { 30460 const msg = "Image exceeded maximum allowed size and was removed."; 30461 if (this.options.ignoreErrors) { 30462 warn(msg); 30463 return; 30464 } 30465 throw new Error(msg); 30466 } 30467 let optionalContent; 30468 if (dict.has("OC")) { 30469 optionalContent = await this.parseMarkedContentProps(dict.get("OC"), resources); 30470 } 30471 const imageMask = dict.get("IM", "ImageMask") || false; 30472 let imgData, args; 30473 if (imageMask) { 30474 const interpolate = dict.get("I", "Interpolate"); 30475 const bitStrideLength = w + 7 >> 3; 30476 const imgArray = image.getBytes(bitStrideLength * h); 30477 const decode = dict.getArray("D", "Decode"); 30478 if (this.parsingType3Font) { 30479 imgData = PDFImage.createRawMask({ 30480 imgArray, 30481 width: w, 30482 height: h,
30483 imageIsFromDecodeStream: image instanceof DecodeStream, 30484 inverseDecode: decode?.[0] > 0, 30485 interpolate 30486 }); 30487 imgData.cached = !!cacheKey; 30488 args = [imgData]; 30489 operatorList.addImageOps(OPS.paintImageMaskXObject, args, optionalContent); 30490 if (cacheKey) { 30491 const cacheData = { 30492 fn: OPS.paintImageMaskXObject, 30493 args, 30494 optionalContent 30495 }; 30496 localImageCache.set(cacheKey, imageRef, cacheData); 30497 if (imageRef) { 30498 this._regionalImageCache.set(null, imageRef, cacheData); 30499 } 30500 } 30501 return; 30502 } 30503 imgData = await PDFImage.createMask({ 30504 imgArray, 30505 width: w, 30506 height: h, 30507 imageIsFromDecodeStream: image instanceof DecodeStream, 30508 inverseDecode: decode?.[0] > 0, 30509 interpolate, 30510 isOffscreenCanvasSupported: this.options.isOffscreenCanvasSupported 30511 }); 30512 if (imgData.isSingleOpaquePixel) { 30513 operatorList.addImageOps(OPS.paintSolidColorImageMask, [], optionalContent); 30514 if (cacheKey) { 30515 const cacheData = { 30516 fn: OPS.paintSolidColorImageMask, 30517 args: [], 30518 optionalContent 30519 }; 30520 localImageCache.set(cacheKey, imageRef, cacheData); 30521 if (imageRef) { 30522 this._regionalImageCache.set(null, imageRef, cacheData); 30523 } 30524 } 30525 return; 30526 } 30527 const objId = `mask_${this.idFactory.createObjId()}`; 30528 operatorList.addDependency(objId); 30529 imgData.dataLen = imgData.bitmap ? imgData.width * imgData.height * 4 : imgData.data.length; 30530 this._sendImgData(objId, imgData); 30531 args = [{ 30532 data: objId, 30533 width: imgData.width, 30534 height: imgData.height, 30535 interpolate: imgData.interpolate, 30536 count: 1 30537 }]; 30538 operatorList.addImageOps(OPS.paintImageMaskXObject, args, optionalContent); 30539 if (cacheKey) { 30540 const cacheData = { 30541 objId, 30542 fn: OPS.paintImageMaskXObject, 30543 args, 30544 optionalContent 30545 }; 30546 localImageCache.set(cacheKey, imageRef, cacheData); 30547 if (imageRef) { 30548 this._regionalImageCache.set(null, imageRef, cacheData); 30549 } 30550 } 30551 return; 30552 } 30553 const SMALL_IMAGE_DIMENSIONS = 200; 30554 if (isInline && w + h < SMALL_IMAGE_DIMENSIONS && !dict.has("SMask") && !dict.has("Mask")) { 30555 try { 30556 const imageObj = new PDFImage({ 30557 xref: this.xref, 30558 res: resources, 30559 image, 30560 isInline, 30561 pdfFunctionFactory: this._pdfFunctionFactory, 30562 localColorSpaceCache 30563 }); 30564 imgData = await imageObj.createImageData(true, false); 30565 operatorList.isOffscreenCanvasSupported = this.options.isOffscreenCanvasSupported; 30566 operatorList.addImageOps(OPS.paintInlineImageXObject, [imgData], optionalContent); 30567 } catch (reason) { 30568 const msg = `Unable to decode inline image: "${reason}".`; 30569 if (!this.options.ignoreErrors) { 30570 throw new Error(msg); 30571 } 30572 warn(msg); 30573 } 30574 return; 30575 } 30576 let objId = `img_${this.idFactory.createObjId()}`, 30577 cacheGlobally = false; 30578 if (this.parsingType3Font) { 30579 objId = `${this.idFactory.getDocId()}_type3_${objId}`; 30580 } else if (cacheKey && imageRef) { 30581 cacheGlobally = this.globalImageCache.shouldCache(imageRef, this.pageIndex); 30582 if (cacheGlobally) { 30583 assert(!isInline, "Cannot cache an inline image globally."); 30584 objId = `${this.idFactory.getDocId()}_${objId}`; 30585 } 30586 } 30587 operatorList.addDependency(objId); 30588 args = [objId, w, h]; 30589 operatorList.addImageOps(OPS.paintImageXObject, args, optionalContent); 30590 if (cacheGlobally) { 30591 if (this.globalImageCache.hasDecodeFailed(imageRef)) { 30592 this.globalImageCache.setData(imageRef, { 30593 objId, 30594 fn: OPS.paintImageXObject, 30595 args, 30596 optionalContent, 30597 byteSize: 0 30598 }); 30599 this._sendImgData(objId, null, cacheGlobally); 30600 return; 30601 } 30602 if (w * h > 250000 || dict.has("SMask") || dict.has("Mask")) {
vendor: 4,130 bytes, lines 30603-30731
30603 const localLength = await this.handler.sendWithPromise("commonobj", [objId, "CopyLocalImage", { 30604 imageRef 30605 }]); 30606 if (localLength) { 30607 this.globalImageCache.setData(imageRef, { 30608 objId, 30609 fn: OPS.paintImageXObject, 30610 args, 30611 optionalContent, 30612 byteSize: 0 30613 }); 30614 this.globalImageCache.addByteSize(imageRef, localLength); 30615 return; 30616 } 30617 } 30618 } 30619 PDFImage.buildImage({ 30620 xref: this.xref, 30621 res: resources, 30622 image, 30623 isInline, 30624 pdfFunctionFactory: this._pdfFunctionFactory, 30625 localColorSpaceCache 30626 }).then(async imageObj => { 30627 imgData = await imageObj.createImageData(false, this.options.isOffscreenCanvasSupported); 30628 imgData.dataLen = imgData.bitmap ? imgData.width * imgData.height * 4 : imgData.data.length; 30629 imgData.ref = imageRef; 30630 if (cacheGlobally) { 30631 this.globalImageCache.addByteSize(imageRef, imgData.dataLen); 30632 } 30633 return this._sendImgData(objId, imgData, cacheGlobally); 30634 }).catch(reason => { 30635 warn(`Unable to decode image "${objId}": "${reason}".`); 30636 if (imageRef) { 30637 this.globalImageCache.addDecodeFailed(imageRef); 30638 } 30639 return this._sendImgData(objId, null, cacheGlobally); 30640 }); 30641 if (cacheKey) { 30642 const cacheData = { 30643 objId, 30644 fn: OPS.paintImageXObject, 30645 args, 30646 optionalContent 30647 }; 30648 localImageCache.set(cacheKey, imageRef, cacheData); 30649 if (imageRef) { 30650 this._regionalImageCache.set(null, imageRef, cacheData); 30651 if (cacheGlobally) { 30652 this.globalImageCache.setData(imageRef, { 30653 objId, 30654 fn: OPS.paintImageXObject, 30655 args, 30656 optionalContent, 30657 byteSize: 0 30658 }); 30659 } 30660 } 30661 } 30662 } 30663 handleSMask(smask, resources, operatorList, task, stateManager, localColorSpaceCache) { 30664 const smaskContent = smask.get("G"); 30665 const smaskOptions = { 30666 subtype: smask.get("S").name, 30667 backdrop: smask.get("BC") 30668 }; 30669 const transferObj = smask.get("TR"); 30670 if (isPDFFunction(transferObj)) { 30671 const transferFn = this._pdfFunctionFactory.create(transferObj); 30672 const transferMap = new Uint8Array(256); 30673 const tmp = new Float32Array(1); 30674 for (let i = 0; i < 256; i++) { 30675 tmp[0] = i / 255; 30676 transferFn(tmp, 0, tmp, 0); 30677 transferMap[i] = tmp[0] * 255 | 0; 30678 } 30679 smaskOptions.transferMap = transferMap; 30680 } 30681 return this.buildFormXObject(resources, smaskContent, smaskOptions, operatorList, task, stateManager.state.clone(), localColorSpaceCache); 30682 } 30683 handleTransferFunction(tr) { 30684 let transferArray; 30685 if (Array.isArray(tr)) { 30686 transferArray = tr; 30687 } else if (isPDFFunction(tr)) { 30688 transferArray = [tr]; 30689 } else { 30690 return null; 30691 } 30692 const transferMaps = []; 30693 let numFns = 0, 30694 numEffectfulFns = 0; 30695 for (const entry of transferArray) { 30696 const transferObj = this.xref.fetchIfRef(entry); 30697 numFns++; 30698 if (isName(transferObj, "Identity")) { 30699 transferMaps.push(null); 30700 continue; 30701 } else if (!isPDFFunction(transferObj)) { 30702 return null; 30703 } 30704 const transferFn = this._pdfFunctionFactory.create(transferObj); 30705 const transferMap = new Uint8Array(256), 30706 tmp = new Float32Array(1); 30707 for (let j = 0; j < 256; j++) { 30708 tmp[0] = j / 255; 30709 transferFn(tmp, 0, tmp, 0); 30710 transferMap[j] = tmp[0] * 255 | 0; 30711 } 30712 transferMaps.push(transferMap); 30713 numEffectfulFns++; 30714 } 30715 if (!(numFns === 1 || numFns === 4)) { 30716 return null; 30717 } 30718 if (numEffectfulFns === 0) { 30719 return null; 30720 } 30721 return transferMaps; 30722 } 30723 handleTilingType(fn, color, resources, pattern, patternDict, operatorList, task, localTilingPatternCache) { 30724 const tilingOpList = new OperatorList(); 30725 const patternResources = Dict.merge({ 30726 xref: this.xref, 30727 dictArray: [patternDict.get("Resources"), resources] 30728 }); 30729 return this.getOperatorList({ 30730 stream: pattern, 30731 task,
30732 resources: patternResources, 30733 operatorList: tilingOpList 30734 }).then(function () { 30735 const operatorListIR = tilingOpList.getIR(); 30736 const tilingPatternIR = getTilingPatternIR(operatorListIR, patternDict, color); 30737 operatorList.addDependencies(tilingOpList.dependencies); 30738 operatorList.addOp(fn, tilingPatternIR); 30739 if (patternDict.objId) { 30740 localTilingPatternCache.set(null, patternDict.objId, { 30741 operatorListIR, 30742 dict: patternDict 30743 }); 30744 } 30745 }).catch(reason => { 30746 if (reason instanceof AbortException) { 30747 return; 30748 } 30749 if (this.options.ignoreErrors) { 30750 warn(`handleTilingType - ignoring pattern: "${reason}".`); 30751 return; 30752 } 30753 throw reason; 30754 }); 30755 } 30756 async handleSetFont(resources, fontArgs, fontRef, operatorList, task, state, fallbackFontDict = null, cssFontInfo = null) { 30757 const fontName = fontArgs?.[0] instanceof Name ? fontArgs[0].name : null; 30758 let translated = await this.loadFont(fontName, fontRef, resources, fallbackFontDict, cssFontInfo); 30759 if (translated.font.isType3Font) { 30760 try { 30761 await translated.loadType3Data(this, resources, task); 30762 operatorList.addDependencies(translated.type3Dependencies); 30763 } catch (reason) { 30764 translated = new TranslatedFont({ 30765 loadedName: "g_font_error", 30766 font: new ErrorFont(`Type3 font load error: ${reason}`), 30767 dict: translated.font, 30768 evaluatorOptions: this.options 30769 }); 30770 } 30771 } 30772 state.font = translated.font; 30773 translated.send(this.handler); 30774 return translated.loadedName; 30775 }
vendor: 36,739 bytes, lines 30776-31824
30776 handleText(chars, state) { 30777 const font = state.font; 30778 const glyphs = font.charsToGlyphs(chars); 30779 if (font.data) { 30780 const isAddToPathSet = !!(state.textRenderingMode & TextRenderingMode.ADD_TO_PATH_FLAG); 30781 if (isAddToPathSet || state.fillColorSpace.name === "Pattern" || font.disableFontFace || this.options.disableFontFace) { 30782 PartialEvaluator.buildFontPaths(font, glyphs, this.handler, this.options); 30783 } 30784 } 30785 return glyphs; 30786 } 30787 ensureStateFont(state) { 30788 if (state.font) { 30789 return; 30790 } 30791 const reason = new FormatError("Missing setFont (Tf) operator before text rendering operator."); 30792 if (this.options.ignoreErrors) { 30793 warn(`ensureStateFont: "${reason}".`); 30794 return; 30795 } 30796 throw reason; 30797 } 30798 async setGState({ 30799 resources, 30800 gState, 30801 operatorList, 30802 cacheKey, 30803 task, 30804 stateManager, 30805 localGStateCache, 30806 localColorSpaceCache 30807 }) { 30808 const gStateRef = gState.objId; 30809 let isSimpleGState = true; 30810 const gStateObj = []; 30811 let promise = Promise.resolve(); 30812 for (const key of gState.getKeys()) { 30813 const value = gState.get(key); 30814 switch (key) { 30815 case "Type": 30816 break; 30817 case "LW": 30818 case "LC": 30819 case "LJ": 30820 case "ML": 30821 case "D": 30822 case "RI": 30823 case "FL": 30824 case "CA": 30825 case "ca": 30826 gStateObj.push([key, value]); 30827 break; 30828 case "Font": 30829 isSimpleGState = false; 30830 promise = promise.then(() => this.handleSetFont(resources, null, value[0], operatorList, task, stateManager.state).then(function (loadedName) { 30831 operatorList.addDependency(loadedName); 30832 gStateObj.push([key, [loadedName, value[1]]]); 30833 })); 30834 break; 30835 case "BM": 30836 gStateObj.push([key, normalizeBlendMode(value)]); 30837 break; 30838 case "SMask": 30839 if (isName(value, "None")) { 30840 gStateObj.push([key, false]); 30841 break; 30842 } 30843 if (value instanceof Dict) { 30844 isSimpleGState = false; 30845 promise = promise.then(() => this.handleSMask(value, resources, operatorList, task, stateManager, localColorSpaceCache)); 30846 gStateObj.push([key, true]); 30847 } else { 30848 warn("Unsupported SMask type"); 30849 } 30850 break; 30851 case "TR": 30852 const transferMaps = this.handleTransferFunction(value); 30853 gStateObj.push([key, transferMaps]); 30854 break; 30855 case "OP": 30856 case "op": 30857 case "OPM": 30858 case "BG": 30859 case "BG2": 30860 case "UCR": 30861 case "UCR2": 30862 case "TR2": 30863 case "HT": 30864 case "SM": 30865 case "SA": 30866 case "AIS": 30867 case "TK": 30868 info("graphic state operator " + key); 30869 break; 30870 default: 30871 info("Unknown graphic state operator " + key); 30872 break; 30873 } 30874 } 30875 await promise; 30876 if (gStateObj.length > 0) { 30877 operatorList.addOp(OPS.setGState, [gStateObj]); 30878 } 30879 if (isSimpleGState) { 30880 localGStateCache.set(cacheKey, gStateRef, gStateObj); 30881 } 30882 } 30883 loadFont(fontName, font, resources, fallbackFontDict = null, cssFontInfo = null) { 30884 const errorFont = async () => { 30885 return new TranslatedFont({ 30886 loadedName: "g_font_error", 30887 font: new ErrorFont(`Font "${fontName}" is not available.`), 30888 dict: font, 30889 evaluatorOptions: this.options 30890 }); 30891 }; 30892 let fontRef; 30893 if (font) { 30894 if (font instanceof Ref) { 30895 fontRef = font; 30896 } 30897 } else { 30898 const fontRes = resources.get("Font"); 30899 if (fontRes) { 30900 fontRef = fontRes.getRaw(fontName); 30901 } 30902 } 30903 if (fontRef) { 30904 if (this.type3FontRefs?.has(fontRef)) { 30905 return errorFont(); 30906 } 30907 if (this.fontCache.has(fontRef)) { 30908 return this.fontCache.get(fontRef); 30909 } 30910 try { 30911 font = this.xref.fetchIfRef(fontRef); 30912 } catch (ex) { 30913 warn(`loadFont - lookup failed: "${ex}".`); 30914 } 30915 } 30916 if (!(font instanceof Dict)) { 30917 if (!this.options.ignoreErrors && !this.parsingType3Font) { 30918 warn(`Font "${fontName}" is not available.`); 30919 return errorFont(); 30920 } 30921 warn(`Font "${fontName}" is not available -- attempting to fallback to a default font.`); 30922 font = fallbackFontDict || PartialEvaluator.fallbackFontDict; 30923 } 30924 if (font.cacheKey && this.fontCache.has(font.cacheKey)) { 30925 return this.fontCache.get(font.cacheKey); 30926 } 30927 const { 30928 promise, 30929 resolve 30930 } = Promise.withResolvers(); 30931 let preEvaluatedFont; 30932 try { 30933 preEvaluatedFont = this.preEvaluateFont(font); 30934 preEvaluatedFont.cssFontInfo = cssFontInfo; 30935 } catch (reason) { 30936 warn(`loadFont - preEvaluateFont failed: "${reason}".`); 30937 return errorFont(); 30938 } 30939 const { 30940 descriptor, 30941 hash 30942 } = preEvaluatedFont; 30943 const fontRefIsRef = fontRef instanceof Ref; 30944 let fontID; 30945 if (hash && descriptor instanceof Dict) { 30946 const fontAliases = descriptor.fontAliases ||= Object.create(null); 30947 if (fontAliases[hash]) { 30948 const aliasFontRef = fontAliases[hash].aliasRef; 30949 if (fontRefIsRef && aliasFontRef && this.fontCache.has(aliasFontRef)) { 30950 this.fontCache.putAlias(fontRef, aliasFontRef); 30951 return this.fontCache.get(fontRef); 30952 } 30953 } else { 30954 fontAliases[hash] = { 30955 fontID: this.idFactory.createFontId() 30956 }; 30957 } 30958 if (fontRefIsRef) { 30959 fontAliases[hash].aliasRef = fontRef; 30960 } 30961 fontID = fontAliases[hash].fontID; 30962 } else { 30963 fontID = this.idFactory.createFontId(); 30964 } 30965 assert(fontID?.startsWith("f"), 'The "fontID" must be (correctly) defined.'); 30966 if (fontRefIsRef) { 30967 this.fontCache.put(fontRef, promise); 30968 } else { 30969 font.cacheKey = `cacheKey_${fontID}`; 30970 this.fontCache.put(font.cacheKey, promise); 30971 } 30972 font.loadedName = `${this.idFactory.getDocId()}_${fontID}`; 30973 this.translateFont(preEvaluatedFont).then(translatedFont => { 30974 resolve(new TranslatedFont({ 30975 loadedName: font.loadedName, 30976 font: translatedFont, 30977 dict: font, 30978 evaluatorOptions: this.options 30979 })); 30980 }).catch(reason => { 30981 warn(`loadFont - translateFont failed: "${reason}".`); 30982 resolve(new TranslatedFont({ 30983 loadedName: font.loadedName, 30984 font: new ErrorFont(reason instanceof Error ? reason.message : reason), 30985 dict: font, 30986 evaluatorOptions: this.options 30987 })); 30988 }); 30989 return promise; 30990 } 30991 buildPath(operatorList, fn, args, parsingText = false) { 30992 const lastIndex = operatorList.length - 1; 30993 if (!args) { 30994 args = []; 30995 } 30996 if (lastIndex < 0 || operatorList.fnArray[lastIndex] !== OPS.constructPath) { 30997 if (parsingText) { 30998 warn(`Encountered path operator "${fn}" inside of a text object.`); 30999 operatorList.addOp(OPS.save, null); 31000 } 31001 let minMax; 31002 switch (fn) { 31003 case OPS.rectangle: 31004 const x = args[0] + args[2]; 31005 const y = args[1] + args[3]; 31006 minMax = [Math.min(args[0], x), Math.min(args[1], y), Math.max(args[0], x), Math.max(args[1], y)]; 31007 break; 31008 case OPS.moveTo: 31009 case OPS.lineTo: 31010 minMax = [args[0], args[1], args[0], args[1]]; 31011 break; 31012 default: 31013 minMax = [Infinity, Infinity, -Infinity, -Infinity]; 31014 break; 31015 } 31016 operatorList.addOp(OPS.constructPath, [[fn], args, minMax]); 31017 if (parsingText) { 31018 operatorList.addOp(OPS.restore, null); 31019 } 31020 } else { 31021 const opArgs = operatorList.argsArray[lastIndex]; 31022 opArgs[0].push(fn); 31023 opArgs[1].push(...args); 31024 const minMax = opArgs[2]; 31025 switch (fn) { 31026 case OPS.rectangle: 31027 const x = args[0] + args[2]; 31028 const y = args[1] + args[3]; 31029 minMax[0] = Math.min(minMax[0], args[0], x); 31030 minMax[1] = Math.min(minMax[1], args[1], y); 31031 minMax[2] = Math.max(minMax[2], args[0], x); 31032 minMax[3] = Math.max(minMax[3], args[1], y); 31033 break; 31034 case OPS.moveTo: 31035 case OPS.lineTo: 31036 minMax[0] = Math.min(minMax[0], args[0]); 31037 minMax[1] = Math.min(minMax[1], args[1]); 31038 minMax[2] = Math.max(minMax[2], args[0]); 31039 minMax[3] = Math.max(minMax[3], args[1]); 31040 break; 31041 } 31042 } 31043 } 31044 parseColorSpace({ 31045 cs, 31046 resources, 31047 localColorSpaceCache 31048 }) { 31049 return ColorSpace.parseAsync({ 31050 cs, 31051 xref: this.xref, 31052 resources, 31053 pdfFunctionFactory: this._pdfFunctionFactory, 31054 localColorSpaceCache 31055 }).catch(reason => { 31056 if (reason instanceof AbortException) { 31057 return null; 31058 } 31059 if (this.options.ignoreErrors) { 31060 warn(`parseColorSpace - ignoring ColorSpace: "${reason}".`); 31061 return null; 31062 } 31063 throw reason; 31064 }); 31065 } 31066 parseShading({ 31067 shading, 31068 resources, 31069 localColorSpaceCache, 31070 localShadingPatternCache 31071 }) { 31072 let id = localShadingPatternCache.get(shading); 31073 if (id) { 31074 return id; 31075 } 31076 let patternIR; 31077 try { 31078 const shadingFill = Pattern.parseShading(shading, this.xref, resources, this._pdfFunctionFactory, localColorSpaceCache); 31079 patternIR = shadingFill.getIR(); 31080 } catch (reason) { 31081 if (reason instanceof AbortException) { 31082 return null; 31083 } 31084 if (this.options.ignoreErrors) { 31085 warn(`parseShading - ignoring shading: "${reason}".`); 31086 localShadingPatternCache.set(shading, null); 31087 return null; 31088 } 31089 throw reason; 31090 } 31091 id = `pattern_${this.idFactory.createObjId()}`; 31092 if (this.parsingType3Font) { 31093 id = `${this.idFactory.getDocId()}_type3_${id}`; 31094 } 31095 localShadingPatternCache.set(shading, id); 31096 if (this.parsingType3Font) { 31097 this.handler.send("commonobj", [id, "Pattern", patternIR]); 31098 } else { 31099 this.handler.send("obj", [id, this.pageIndex, "Pattern", patternIR]); 31100 } 31101 return id; 31102 } 31103 handleColorN(operatorList, fn, args, cs, patterns, resources, task, localColorSpaceCache, localTilingPatternCache, localShadingPatternCache) { 31104 const patternName = args.pop(); 31105 if (patternName instanceof Name) { 31106 const rawPattern = patterns.getRaw(patternName.name); 31107 const localTilingPattern = rawPattern instanceof Ref && localTilingPatternCache.getByRef(rawPattern); 31108 if (localTilingPattern) { 31109 try { 31110 const color = cs.base ? cs.base.getRgb(args, 0) : null; 31111 const tilingPatternIR = getTilingPatternIR(localTilingPattern.operatorListIR, localTilingPattern.dict, color); 31112 operatorList.addOp(fn, tilingPatternIR); 31113 return undefined; 31114 } catch {} 31115 } 31116 const pattern = this.xref.fetchIfRef(rawPattern); 31117 if (pattern) { 31118 const dict = pattern instanceof BaseStream ? pattern.dict : pattern; 31119 const typeNum = dict.get("PatternType"); 31120 if (typeNum === PatternType.TILING) { 31121 const color = cs.base ? cs.base.getRgb(args, 0) : null; 31122 return this.handleTilingType(fn, color, resources, pattern, dict, operatorList, task, localTilingPatternCache); 31123 } else if (typeNum === PatternType.SHADING) { 31124 const shading = dict.get("Shading"); 31125 const objId = this.parseShading({ 31126 shading, 31127 resources, 31128 localColorSpaceCache, 31129 localShadingPatternCache 31130 }); 31131 if (objId) { 31132 const matrix = lookupMatrix(dict.getArray("Matrix"), null); 31133 operatorList.addOp(fn, ["Shading", objId, matrix]); 31134 } 31135 return undefined; 31136 } 31137 throw new FormatError(`Unknown PatternType: ${typeNum}`); 31138 } 31139 } 31140 throw new FormatError(`Unknown PatternName: ${patternName}`); 31141 } 31142 _parseVisibilityExpression(array, nestingCounter, currentResult) { 31143 const MAX_NESTING = 10; 31144 if (++nestingCounter > MAX_NESTING) { 31145 warn("Visibility expression is too deeply nested"); 31146 return; 31147 } 31148 const length = array.length; 31149 const operator = this.xref.fetchIfRef(array[0]); 31150 if (length < 2 || !(operator instanceof Name)) { 31151 warn("Invalid visibility expression"); 31152 return; 31153 } 31154 switch (operator.name) { 31155 case "And": 31156 case "Or": 31157 case "Not": 31158 currentResult.push(operator.name); 31159 break; 31160 default: 31161 warn(`Invalid operator ${operator.name} in visibility expression`); 31162 return; 31163 } 31164 for (let i = 1; i < length; i++) { 31165 const raw = array[i]; 31166 const object = this.xref.fetchIfRef(raw); 31167 if (Array.isArray(object)) { 31168 const nestedResult = []; 31169 currentResult.push(nestedResult); 31170 this._parseVisibilityExpression(object, nestingCounter, nestedResult); 31171 } else if (raw instanceof Ref) { 31172 currentResult.push(raw.toString()); 31173 } 31174 } 31175 } 31176 async parseMarkedContentProps(contentProperties, resources) { 31177 let optionalContent; 31178 if (contentProperties instanceof Name) { 31179 const properties = resources.get("Properties"); 31180 optionalContent = properties.get(contentProperties.name); 31181 } else if (contentProperties instanceof Dict) { 31182 optionalContent = contentProperties; 31183 } else { 31184 throw new FormatError("Optional content properties malformed."); 31185 } 31186 const optionalContentType = optionalContent.get("Type")?.name; 31187 if (optionalContentType === "OCG") { 31188 return { 31189 type: optionalContentType, 31190 id: optionalContent.objId 31191 }; 31192 } else if (optionalContentType === "OCMD") { 31193 const expression = optionalContent.get("VE"); 31194 if (Array.isArray(expression)) { 31195 const result = []; 31196 this._parseVisibilityExpression(expression, 0, result); 31197 if (result.length > 0) { 31198 return { 31199 type: "OCMD", 31200 expression: result 31201 }; 31202 } 31203 } 31204 const optionalContentGroups = optionalContent.get("OCGs"); 31205 if (Array.isArray(optionalContentGroups) || optionalContentGroups instanceof Dict) { 31206 const groupIds = []; 31207 if (Array.isArray(optionalContentGroups)) { 31208 for (const ocg of optionalContentGroups) { 31209 groupIds.push(ocg.toString()); 31210 } 31211 } else { 31212 groupIds.push(optionalContentGroups.objId); 31213 } 31214 return { 31215 type: optionalContentType, 31216 ids: groupIds, 31217 policy: optionalContent.get("P") instanceof Name ? optionalContent.get("P").name : null, 31218 expression: null 31219 }; 31220 } else if (optionalContentGroups instanceof Ref) { 31221 return { 31222 type: optionalContentType, 31223 id: optionalContentGroups.toString() 31224 }; 31225 } 31226 } 31227 return null; 31228 } 31229 getOperatorList({ 31230 stream, 31231 task, 31232 resources, 31233 operatorList, 31234 initialState = null, 31235 fallbackFontDict = null 31236 }) { 31237 resources ||= Dict.empty; 31238 initialState ||= new EvalState(); 31239 if (!operatorList) { 31240 throw new Error('getOperatorList: missing "operatorList" parameter'); 31241 } 31242 const self = this; 31243 const xref = this.xref; 31244 let parsingText = false; 31245 const localImageCache = new LocalImageCache(); 31246 const localColorSpaceCache = new LocalColorSpaceCache(); 31247 const localGStateCache = new LocalGStateCache(); 31248 const localTilingPatternCache = new LocalTilingPatternCache(); 31249 const localShadingPatternCache = new Map(); 31250 const xobjs = resources.get("XObject") || Dict.empty; 31251 const patterns = resources.get("Pattern") || Dict.empty; 31252 const stateManager = new StateManager(initialState); 31253 const preprocessor = new EvaluatorPreprocessor(stream, xref, stateManager); 31254 const timeSlotManager = new TimeSlotManager(); 31255 function closePendingRestoreOPS(argument) { 31256 for (let i = 0, ii = preprocessor.savedStatesDepth; i < ii; i++) { 31257 operatorList.addOp(OPS.restore, []); 31258 } 31259 } 31260 return new Promise(function promiseBody(resolve, reject) { 31261 const next = function (promise) { 31262 Promise.all([promise, operatorList.ready]).then(function () { 31263 try { 31264 promiseBody(resolve, reject); 31265 } catch (ex) { 31266 reject(ex); 31267 } 31268 }, reject); 31269 }; 31270 task.ensureNotTerminated(); 31271 timeSlotManager.reset(); 31272 const operation = {}; 31273 let stop, i, ii, cs, name, isValidName; 31274 while (!(stop = timeSlotManager.check())) { 31275 operation.args = null; 31276 if (!preprocessor.read(operation)) { 31277 break; 31278 } 31279 let args = operation.args; 31280 let fn = operation.fn; 31281 switch (fn | 0) { 31282 case OPS.paintXObject: 31283 isValidName = args[0] instanceof Name; 31284 name = args[0].name; 31285 if (isValidName) { 31286 const localImage = localImageCache.getByName(name); 31287 if (localImage) { 31288 addLocallyCachedImageOps(operatorList, localImage); 31289 args = null; 31290 continue; 31291 } 31292 } 31293 next(new Promise(function (resolveXObject, rejectXObject) { 31294 if (!isValidName) { 31295 throw new FormatError("XObject must be referred to by name."); 31296 } 31297 let xobj = xobjs.getRaw(name); 31298 if (xobj instanceof Ref) { 31299 const localImage = localImageCache.getByRef(xobj) || self._regionalImageCache.getByRef(xobj); 31300 if (localImage) { 31301 addLocallyCachedImageOps(operatorList, localImage); 31302 resolveXObject(); 31303 return; 31304 } 31305 const globalImage = self.globalImageCache.getData(xobj, self.pageIndex); 31306 if (globalImage) { 31307 operatorList.addDependency(globalImage.objId); 31308 operatorList.addImageOps(globalImage.fn, globalImage.args, globalImage.optionalContent); 31309 resolveXObject(); 31310 return; 31311 } 31312 xobj = xref.fetch(xobj); 31313 } 31314 if (!(xobj instanceof BaseStream)) { 31315 throw new FormatError("XObject should be a stream"); 31316 } 31317 const type = xobj.dict.get("Subtype"); 31318 if (!(type instanceof Name)) { 31319 throw new FormatError("XObject should have a Name subtype"); 31320 } 31321 if (type.name === "Form") { 31322 stateManager.save(); 31323 self.buildFormXObject(resources, xobj, null, operatorList, task, stateManager.state.clone(), localColorSpaceCache).then(function () { 31324 stateManager.restore(); 31325 resolveXObject(); 31326 }, rejectXObject); 31327 return; 31328 } else if (type.name === "Image") { 31329 self.buildPaintImageXObject({ 31330 resources, 31331 image: xobj, 31332 operatorList, 31333 cacheKey: name, 31334 localImageCache, 31335 localColorSpaceCache 31336 }).then(resolveXObject, rejectXObject); 31337 return; 31338 } else if (type.name === "PS") { 31339 info("Ignored XObject subtype PS"); 31340 } else { 31341 throw new FormatError(`Unhandled XObject subtype ${type.name}`); 31342 } 31343 resolveXObject(); 31344 }).catch(function (reason) { 31345 if (reason instanceof AbortException) { 31346 return; 31347 } 31348 if (self.options.ignoreErrors) { 31349 warn(`getOperatorList - ignoring XObject: "${reason}".`); 31350 return; 31351 } 31352 throw reason; 31353 })); 31354 return; 31355 case OPS.setFont: 31356 var fontSize = args[1]; 31357 next(self.handleSetFont(resources, args, null, operatorList, task, stateManager.state, fallbackFontDict).then(function (loadedName) { 31358 operatorList.addDependency(loadedName); 31359 operatorList.addOp(OPS.setFont, [loadedName, fontSize]); 31360 })); 31361 return; 31362 case OPS.beginText: 31363 parsingText = true; 31364 break; 31365 case OPS.endText: 31366 parsingText = false; 31367 break; 31368 case OPS.endInlineImage: 31369 var cacheKey = args[0].cacheKey; 31370 if (cacheKey) { 31371 const localImage = localImageCache.getByName(cacheKey); 31372 if (localImage) { 31373 addLocallyCachedImageOps(operatorList, localImage); 31374 args = null; 31375 continue; 31376 } 31377 } 31378 next(self.buildPaintImageXObject({ 31379 resources, 31380 image: args[0], 31381 isInline: true, 31382 operatorList, 31383 cacheKey, 31384 localImageCache, 31385 localColorSpaceCache 31386 })); 31387 return; 31388 case OPS.showText: 31389 if (!stateManager.state.font) { 31390 self.ensureStateFont(stateManager.state); 31391 continue; 31392 } 31393 args[0] = self.handleText(args[0], stateManager.state); 31394 break; 31395 case OPS.showSpacedText: 31396 if (!stateManager.state.font) { 31397 self.ensureStateFont(stateManager.state); 31398 continue; 31399 } 31400 var combinedGlyphs = []; 31401 var state = stateManager.state; 31402 for (const arrItem of args[0]) { 31403 if (typeof arrItem === "string") { 31404 combinedGlyphs.push(...self.handleText(arrItem, state)); 31405 } else if (typeof arrItem === "number") { 31406 combinedGlyphs.push(arrItem); 31407 } 31408 } 31409 args[0] = combinedGlyphs; 31410 fn = OPS.showText; 31411 break; 31412 case OPS.nextLineShowText: 31413 if (!stateManager.state.font) { 31414 self.ensureStateFont(stateManager.state); 31415 continue; 31416 } 31417 operatorList.addOp(OPS.nextLine); 31418 args[0] = self.handleText(args[0], stateManager.state); 31419 fn = OPS.showText; 31420 break; 31421 case OPS.nextLineSetSpacingShowText: 31422 if (!stateManager.state.font) { 31423 self.ensureStateFont(stateManager.state); 31424 continue; 31425 } 31426 operatorList.addOp(OPS.nextLine); 31427 operatorList.addOp(OPS.setWordSpacing, [args.shift()]); 31428 operatorList.addOp(OPS.setCharSpacing, [args.shift()]); 31429 args[0] = self.handleText(args[0], stateManager.state); 31430 fn = OPS.showText; 31431 break; 31432 case OPS.setTextRenderingMode: 31433 stateManager.state.textRenderingMode = args[0]; 31434 break; 31435 case OPS.setFillColorSpace: 31436 { 31437 const cachedColorSpace = ColorSpace.getCached(args[0], xref, localColorSpaceCache); 31438 if (cachedColorSpace) { 31439 stateManager.state.fillColorSpace = cachedColorSpace; 31440 continue; 31441 } 31442 next(self.parseColorSpace({ 31443 cs: args[0], 31444 resources, 31445 localColorSpaceCache 31446 }).then(function (colorSpace) { 31447 stateManager.state.fillColorSpace = colorSpace || ColorSpace.singletons.gray; 31448 })); 31449 return; 31450 } 31451 case OPS.setStrokeColorSpace: 31452 { 31453 const cachedColorSpace = ColorSpace.getCached(args[0], xref, localColorSpaceCache); 31454 if (cachedColorSpace) { 31455 stateManager.state.strokeColorSpace = cachedColorSpace; 31456 continue; 31457 } 31458 next(self.parseColorSpace({ 31459 cs: args[0], 31460 resources, 31461 localColorSpaceCache 31462 }).then(function (colorSpace) { 31463 stateManager.state.strokeColorSpace = colorSpace || ColorSpace.singletons.gray; 31464 })); 31465 return; 31466 } 31467 case OPS.setFillColor: 31468 cs = stateManager.state.fillColorSpace; 31469 args = cs.getRgb(args, 0); 31470 fn = OPS.setFillRGBColor; 31471 break; 31472 case OPS.setStrokeColor: 31473 cs = stateManager.state.strokeColorSpace; 31474 args = cs.getRgb(args, 0); 31475 fn = OPS.setStrokeRGBColor; 31476 break; 31477 case OPS.setFillGray: 31478 stateManager.state.fillColorSpace = ColorSpace.singletons.gray; 31479 args = ColorSpace.singletons.gray.getRgb(args, 0); 31480 fn = OPS.setFillRGBColor; 31481 break; 31482 case OPS.setStrokeGray: 31483 stateManager.state.strokeColorSpace = ColorSpace.singletons.gray; 31484 args = ColorSpace.singletons.gray.getRgb(args, 0); 31485 fn = OPS.setStrokeRGBColor; 31486 break; 31487 case OPS.setFillCMYKColor: 31488 stateManager.state.fillColorSpace = ColorSpace.singletons.cmyk; 31489 args = ColorSpace.singletons.cmyk.getRgb(args, 0); 31490 fn = OPS.setFillRGBColor; 31491 break; 31492 case OPS.setStrokeCMYKColor: 31493 stateManager.state.strokeColorSpace = ColorSpace.singletons.cmyk; 31494 args = ColorSpace.singletons.cmyk.getRgb(args, 0); 31495 fn = OPS.setStrokeRGBColor; 31496 break; 31497 case OPS.setFillRGBColor: 31498 stateManager.state.fillColorSpace = ColorSpace.singletons.rgb; 31499 args = ColorSpace.singletons.rgb.getRgb(args, 0); 31500 break; 31501 case OPS.setStrokeRGBColor: 31502 stateManager.state.strokeColorSpace = ColorSpace.singletons.rgb; 31503 args = ColorSpace.singletons.rgb.getRgb(args, 0); 31504 break; 31505 case OPS.setFillColorN: 31506 cs = stateManager.state.patternFillColorSpace; 31507 if (!cs) { 31508 if (isNumberArray(args, null)) { 31509 args = ColorSpace.singletons.gray.getRgb(args, 0); 31510 fn = OPS.setFillRGBColor; 31511 break; 31512 } 31513 args = []; 31514 fn = OPS.setFillTransparent; 31515 break; 31516 } 31517 if (cs.name === "Pattern") { 31518 next(self.handleColorN(operatorList, OPS.setFillColorN, args, cs, patterns, resources, task, localColorSpaceCache, localTilingPatternCache, localShadingPatternCache)); 31519 return; 31520 } 31521 args = cs.getRgb(args, 0); 31522 fn = OPS.setFillRGBColor; 31523 break; 31524 case OPS.setStrokeColorN: 31525 cs = stateManager.state.patternStrokeColorSpace; 31526 if (!cs) { 31527 if (isNumberArray(args, null)) { 31528 args = ColorSpace.singletons.gray.getRgb(args, 0); 31529 fn = OPS.setStrokeRGBColor; 31530 break; 31531 } 31532 args = []; 31533 fn = OPS.setStrokeTransparent; 31534 break; 31535 } 31536 if (cs.name === "Pattern") { 31537 next(self.handleColorN(operatorList, OPS.setStrokeColorN, args, cs, patterns, resources, task, localColorSpaceCache, localTilingPatternCache, localShadingPatternCache)); 31538 return; 31539 } 31540 args = cs.getRgb(args, 0); 31541 fn = OPS.setStrokeRGBColor; 31542 break; 31543 case OPS.shadingFill: 31544 let shading; 31545 try { 31546 const shadingRes = resources.get("Shading"); 31547 if (!shadingRes) { 31548 throw new FormatError("No shading resource found"); 31549 } 31550 shading = shadingRes.get(args[0].name); 31551 if (!shading) { 31552 throw new FormatError("No shading object found"); 31553 } 31554 } catch (reason) { 31555 if (reason instanceof AbortException) { 31556 continue; 31557 } 31558 if (self.options.ignoreErrors) { 31559 warn(`getOperatorList - ignoring Shading: "${reason}".`); 31560 continue; 31561 } 31562 throw reason; 31563 } 31564 const patternId = self.parseShading({ 31565 shading, 31566 resources, 31567 localColorSpaceCache, 31568 localShadingPatternCache 31569 }); 31570 if (!patternId) { 31571 continue; 31572 } 31573 args = [patternId]; 31574 fn = OPS.shadingFill; 31575 break; 31576 case OPS.setGState: 31577 isValidName = args[0] instanceof Name; 31578 name = args[0].name; 31579 if (isValidName) { 31580 const localGStateObj = localGStateCache.getByName(name); 31581 if (localGStateObj) { 31582 if (localGStateObj.length > 0) { 31583 operatorList.addOp(OPS.setGState, [localGStateObj]); 31584 } 31585 args = null; 31586 continue; 31587 } 31588 } 31589 next(new Promise(function (resolveGState, rejectGState) { 31590 if (!isValidName) { 31591 throw new FormatError("GState must be referred to by name."); 31592 } 31593 const extGState = resources.get("ExtGState"); 31594 if (!(extGState instanceof Dict)) { 31595 throw new FormatError("ExtGState should be a dictionary."); 31596 } 31597 const gState = extGState.get(name); 31598 if (!(gState instanceof Dict)) { 31599 throw new FormatError("GState should be a dictionary."); 31600 } 31601 self.setGState({ 31602 resources, 31603 gState, 31604 operatorList, 31605 cacheKey: name, 31606 task, 31607 stateManager, 31608 localGStateCache, 31609 localColorSpaceCache 31610 }).then(resolveGState, rejectGState); 31611 }).catch(function (reason) { 31612 if (reason instanceof AbortException) { 31613 return; 31614 } 31615 if (self.options.ignoreErrors) { 31616 warn(`getOperatorList - ignoring ExtGState: "${reason}".`); 31617 return; 31618 } 31619 throw reason; 31620 })); 31621 return; 31622 case OPS.moveTo: 31623 case OPS.lineTo: 31624 case OPS.curveTo: 31625 case OPS.curveTo2: 31626 case OPS.curveTo3: 31627 case OPS.closePath: 31628 case OPS.rectangle: 31629 self.buildPath(operatorList, fn, args, parsingText); 31630 continue; 31631 case OPS.markPoint: 31632 case OPS.markPointProps: 31633 case OPS.beginCompat: 31634 case OPS.endCompat: 31635 continue; 31636 case OPS.beginMarkedContentProps: 31637 if (!(args[0] instanceof Name)) { 31638 warn(`Expected name for beginMarkedContentProps arg0=${args[0]}`); 31639 operatorList.addOp(OPS.beginMarkedContentProps, ["OC", null]); 31640 continue; 31641 } 31642 if (args[0].name === "OC") { 31643 next(self.parseMarkedContentProps(args[1], resources).then(data => { 31644 operatorList.addOp(OPS.beginMarkedContentProps, ["OC", data]); 31645 }).catch(reason => { 31646 if (reason instanceof AbortException) { 31647 return; 31648 } 31649 if (self.options.ignoreErrors) { 31650 warn(`getOperatorList - ignoring beginMarkedContentProps: "${reason}".`); 31651 operatorList.addOp(OPS.beginMarkedContentProps, ["OC", null]); 31652 return; 31653 } 31654 throw reason; 31655 })); 31656 return; 31657 } 31658 args = [args[0].name, args[1] instanceof Dict ? args[1].get("MCID") : null]; 31659 break; 31660 case OPS.beginMarkedContent: 31661 case OPS.endMarkedContent: 31662 default: 31663 if (args !== null) { 31664 for (i = 0, ii = args.length; i < ii; i++) { 31665 if (args[i] instanceof Dict) { 31666 break; 31667 } 31668 } 31669 if (i < ii) { 31670 warn("getOperatorList - ignoring operator: " + fn); 31671 continue; 31672 } 31673 } 31674 } 31675 operatorList.addOp(fn, args); 31676 } 31677 if (stop) { 31678 next(deferred); 31679 return; 31680 } 31681 closePendingRestoreOPS(); 31682 resolve(); 31683 }).catch(reason => { 31684 if (reason instanceof AbortException) { 31685 return; 31686 } 31687 if (this.options.ignoreErrors) { 31688 warn(`getOperatorList - ignoring errors during "${task.name}" ` + `task: "${reason}".`); 31689 closePendingRestoreOPS(); 31690 return; 31691 } 31692 throw reason; 31693 }); 31694 } 31695 getTextContent({ 31696 stream, 31697 task, 31698 resources, 31699 stateManager = null, 31700 includeMarkedContent = false, 31701 sink, 31702 seenStyles = new Set(), 31703 viewBox, 31704 lang = null, 31705 markedContentData = null, 31706 disableNormalization = false, 31707 keepWhiteSpace = false 31708 }) { 31709 resources ||= Dict.empty; 31710 stateManager ||= new StateManager(new TextState()); 31711 if (includeMarkedContent) { 31712 markedContentData ||= { 31713 level: 0 31714 }; 31715 } 31716 const textContent = { 31717 items: [], 31718 styles: Object.create(null), 31719 lang 31720 }; 31721 const textContentItem = { 31722 initialized: false, 31723 str: [], 31724 totalWidth: 0, 31725 totalHeight: 0, 31726 width: 0, 31727 height: 0, 31728 vertical: false, 31729 prevTransform: null, 31730 textAdvanceScale: 0, 31731 spaceInFlowMin: 0, 31732 spaceInFlowMax: 0, 31733 trackingSpaceMin: Infinity, 31734 negativeSpaceMax: -Infinity, 31735 notASpace: -Infinity, 31736 transform: null, 31737 fontName: null, 31738 hasEOL: false 31739 }; 31740 const twoLastChars = [" ", " "]; 31741 let twoLastCharsPos = 0; 31742 function saveLastChar(char) { 31743 const nextPos = (twoLastCharsPos + 1) % 2; 31744 const ret = twoLastChars[twoLastCharsPos] !== " " && twoLastChars[nextPos] === " "; 31745 twoLastChars[twoLastCharsPos] = char; 31746 twoLastCharsPos = nextPos; 31747 return !keepWhiteSpace && ret; 31748 } 31749 function shouldAddWhitepsace() { 31750 return !keepWhiteSpace && twoLastChars[twoLastCharsPos] !== " " && twoLastChars[(twoLastCharsPos + 1) % 2] === " "; 31751 } 31752 function resetLastChars() { 31753 twoLastChars[0] = twoLastChars[1] = " "; 31754 twoLastCharsPos = 0; 31755 } 31756 const TRACKING_SPACE_FACTOR = 0.102; 31757 const NOT_A_SPACE_FACTOR = 0.03; 31758 const NEGATIVE_SPACE_FACTOR = -0.2; 31759 const SPACE_IN_FLOW_MIN_FACTOR = 0.102; 31760 const SPACE_IN_FLOW_MAX_FACTOR = 0.6; 31761 const VERTICAL_SHIFT_RATIO = 0.25; 31762 const self = this; 31763 const xref = this.xref; 31764 const showSpacedTextBuffer = []; 31765 let xobjs = null; 31766 const emptyXObjectCache = new LocalImageCache(); 31767 const emptyGStateCache = new LocalGStateCache(); 31768 const preprocessor = new EvaluatorPreprocessor(stream, xref, stateManager); 31769 let textState; 31770 function pushWhitespace({ 31771 width = 0, 31772 height = 0, 31773 transform = textContentItem.prevTransform, 31774 fontName = textContentItem.fontName 31775 }) { 31776 textContent.items.push({ 31777 str: " ", 31778 dir: "ltr", 31779 width, 31780 height, 31781 transform, 31782 fontName, 31783 hasEOL: false 31784 }); 31785 } 31786 function getCurrentTextTransform() { 31787 const font = textState.font; 31788 const tsm = [textState.fontSize * textState.textHScale, 0, 0, textState.fontSize, 0, textState.textRise]; 31789 if (font.isType3Font && (textState.fontSize <= 1 || font.isCharBBox) && !isArrayEqual(textState.fontMatrix, FONT_IDENTITY_MATRIX)) { 31790 const glyphHeight = font.bbox[3] - font.bbox[1]; 31791 if (glyphHeight > 0) { 31792 tsm[3] *= glyphHeight * textState.fontMatrix[3]; 31793 } 31794 } 31795 return Util.transform(textState.ctm, Util.transform(textState.textMatrix, tsm)); 31796 } 31797 function ensureTextContentItem() { 31798 if (textContentItem.initialized) { 31799 return textContentItem; 31800 } 31801 const { 31802 font, 31803 loadedName 31804 } = textState; 31805 if (!seenStyles.has(loadedName)) { 31806 seenStyles.add(loadedName); 31807 textContent.styles[loadedName] = { 31808 fontFamily: font.fallbackName, 31809 ascent: font.ascent, 31810 descent: font.descent, 31811 vertical: font.vertical 31812 }; 31813 if (self.options.fontExtraProperties && font.systemFontInfo) { 31814 const style = textContent.styles[loadedName]; 31815 style.fontSubstitution = font.systemFontInfo.css; 31816 style.fontSubstitutionLoadedName = font.systemFontInfo.loadedName; 31817 } 31818 } 31819 textContentItem.fontName = loadedName; 31820 const trm = textContentItem.transform = getCurrentTextTransform(); 31821 if (!font.vertical) { 31822 textContentItem.width = textContentItem.totalWidth = 0; 31823 textContentItem.height = textContentItem.totalHeight = Math.hypot(trm[2], trm[3]); 31824 textContentItem.vertical = false;
vendor: 1,088 bytes, lines 31825-31848
31825 } else { 31826 textContentItem.width = textContentItem.totalWidth = Math.hypot(trm[0], trm[1]); 31827 textContentItem.height = textContentItem.totalHeight = 0; 31828 textContentItem.vertical = true; 31829 } 31830 const scaleLineX = Math.hypot(textState.textLineMatrix[0], textState.textLineMatrix[1]); 31831 const scaleCtmX = Math.hypot(textState.ctm[0], textState.ctm[1]); 31832 textContentItem.textAdvanceScale = scaleCtmX * scaleLineX; 31833 const { 31834 fontSize 31835 } = textState; 31836 textContentItem.trackingSpaceMin = fontSize * TRACKING_SPACE_FACTOR; 31837 textContentItem.notASpace = fontSize * NOT_A_SPACE_FACTOR; 31838 textContentItem.negativeSpaceMax = fontSize * NEGATIVE_SPACE_FACTOR; 31839 textContentItem.spaceInFlowMin = fontSize * SPACE_IN_FLOW_MIN_FACTOR; 31840 textContentItem.spaceInFlowMax = fontSize * SPACE_IN_FLOW_MAX_FACTOR; 31841 textContentItem.hasEOL = false; 31842 textContentItem.initialized = true; 31843 return textContentItem; 31844 } 31845 function updateAdvanceScale() { 31846 if (!textContentItem.initialized) { 31847 return; 31848 }
vendor: 26,612 bytes, lines 31849-32580
31849 const scaleLineX = Math.hypot(textState.textLineMatrix[0], textState.textLineMatrix[1]); 31850 const scaleCtmX = Math.hypot(textState.ctm[0], textState.ctm[1]); 31851 const scaleFactor = scaleCtmX * scaleLineX; 31852 if (scaleFactor === textContentItem.textAdvanceScale) { 31853 return; 31854 } 31855 if (!textContentItem.vertical) { 31856 textContentItem.totalWidth += textContentItem.width * textContentItem.textAdvanceScale; 31857 textContentItem.width = 0; 31858 } else { 31859 textContentItem.totalHeight += textContentItem.height * textContentItem.textAdvanceScale; 31860 textContentItem.height = 0; 31861 } 31862 textContentItem.textAdvanceScale = scaleFactor; 31863 } 31864 function runBidiTransform(textChunk) { 31865 let text = textChunk.str.join(""); 31866 if (!disableNormalization) { 31867 text = normalizeUnicode(text); 31868 } 31869 const bidiResult = bidi(text, -1, textChunk.vertical); 31870 return { 31871 str: bidiResult.str, 31872 dir: bidiResult.dir, 31873 width: Math.abs(textChunk.totalWidth), 31874 height: Math.abs(textChunk.totalHeight), 31875 transform: textChunk.transform, 31876 fontName: textChunk.fontName, 31877 hasEOL: textChunk.hasEOL 31878 }; 31879 } 31880 async function handleSetFont(fontName, fontRef) { 31881 const translated = await self.loadFont(fontName, fontRef, resources); 31882 if (translated.font.isType3Font) { 31883 try { 31884 await translated.loadType3Data(self, resources, task); 31885 } catch {} 31886 } 31887 textState.loadedName = translated.loadedName; 31888 textState.font = translated.font; 31889 textState.fontMatrix = translated.font.fontMatrix || FONT_IDENTITY_MATRIX; 31890 } 31891 function applyInverseRotation(x, y, matrix) { 31892 const scale = Math.hypot(matrix[0], matrix[1]); 31893 return [(matrix[0] * x + matrix[1] * y) / scale, (matrix[2] * x + matrix[3] * y) / scale]; 31894 } 31895 function compareWithLastPosition(glyphWidth) { 31896 const currentTransform = getCurrentTextTransform(); 31897 let posX = currentTransform[4]; 31898 let posY = currentTransform[5]; 31899 if (textState.font?.vertical) { 31900 if (posX < viewBox[0] || posX > viewBox[2] || posY + glyphWidth < viewBox[1] || posY > viewBox[3]) { 31901 return false; 31902 } 31903 } else if (posX + glyphWidth < viewBox[0] || posX > viewBox[2] || posY < viewBox[1] || posY > viewBox[3]) { 31904 return false; 31905 } 31906 if (!textState.font || !textContentItem.prevTransform) { 31907 return true; 31908 } 31909 let lastPosX = textContentItem.prevTransform[4]; 31910 let lastPosY = textContentItem.prevTransform[5]; 31911 if (lastPosX === posX && lastPosY === posY) { 31912 return true; 31913 } 31914 let rotate = -1; 31915 if (currentTransform[0] && currentTransform[1] === 0 && currentTransform[2] === 0) { 31916 rotate = currentTransform[0] > 0 ? 0 : 180; 31917 } else if (currentTransform[1] && currentTransform[0] === 0 && currentTransform[3] === 0) { 31918 rotate = currentTransform[1] > 0 ? 90 : 270; 31919 } 31920 switch (rotate) { 31921 case 0: 31922 break; 31923 case 90: 31924 [posX, posY] = [posY, posX]; 31925 [lastPosX, lastPosY] = [lastPosY, lastPosX]; 31926 break; 31927 case 180: 31928 [posX, posY, lastPosX, lastPosY] = [-posX, -posY, -lastPosX, -lastPosY]; 31929 break; 31930 case 270: 31931 [posX, posY] = [-posY, -posX]; 31932 [lastPosX, lastPosY] = [-lastPosY, -lastPosX]; 31933 break; 31934 default: 31935 [posX, posY] = applyInverseRotation(posX, posY, currentTransform); 31936 [lastPosX, lastPosY] = applyInverseRotation(lastPosX, lastPosY, textContentItem.prevTransform); 31937 } 31938 if (textState.font.vertical) { 31939 const advanceY = (lastPosY - posY) / textContentItem.textAdvanceScale; 31940 const advanceX = posX - lastPosX; 31941 const textOrientation = Math.sign(textContentItem.height); 31942 if (advanceY < textOrientation * textContentItem.negativeSpaceMax) { 31943 if (Math.abs(advanceX) > 0.5 * textContentItem.width) { 31944 appendEOL(); 31945 return true; 31946 } 31947 resetLastChars(); 31948 flushTextContentItem(); 31949 return true; 31950 } 31951 if (Math.abs(advanceX) > textContentItem.width) { 31952 appendEOL(); 31953 return true; 31954 } 31955 if (advanceY <= textOrientation * textContentItem.notASpace) { 31956 resetLastChars(); 31957 } 31958 if (advanceY <= textOrientation * textContentItem.trackingSpaceMin) { 31959 if (shouldAddWhitepsace()) { 31960 resetLastChars(); 31961 flushTextContentItem(); 31962 pushWhitespace({ 31963 height: Math.abs(advanceY) 31964 }); 31965 } else { 31966 textContentItem.height += advanceY; 31967 } 31968 } else if (!addFakeSpaces(advanceY, textContentItem.prevTransform, textOrientation)) { 31969 if (textContentItem.str.length === 0) { 31970 resetLastChars(); 31971 pushWhitespace({ 31972 height: Math.abs(advanceY) 31973 }); 31974 } else { 31975 textContentItem.height += advanceY; 31976 } 31977 } 31978 if (Math.abs(advanceX) > textContentItem.width * VERTICAL_SHIFT_RATIO) { 31979 flushTextContentItem(); 31980 } 31981 return true; 31982 } 31983 const advanceX = (posX - lastPosX) / textContentItem.textAdvanceScale; 31984 const advanceY = posY - lastPosY; 31985 const textOrientation = Math.sign(textContentItem.width); 31986 if (advanceX < textOrientation * textContentItem.negativeSpaceMax) { 31987 if (Math.abs(advanceY) > 0.5 * textContentItem.height) { 31988 appendEOL(); 31989 return true; 31990 } 31991 resetLastChars(); 31992 flushTextContentItem(); 31993 return true; 31994 } 31995 if (Math.abs(advanceY) > textContentItem.height) { 31996 appendEOL(); 31997 return true; 31998 } 31999 if (advanceX <= textOrientation * textContentItem.notASpace) { 32000 resetLastChars(); 32001 } 32002 if (advanceX <= textOrientation * textContentItem.trackingSpaceMin) { 32003 if (shouldAddWhitepsace()) { 32004 resetLastChars(); 32005 flushTextContentItem(); 32006 pushWhitespace({ 32007 width: Math.abs(advanceX) 32008 }); 32009 } else { 32010 textContentItem.width += advanceX; 32011 } 32012 } else if (!addFakeSpaces(advanceX, textContentItem.prevTransform, textOrientation)) { 32013 if (textContentItem.str.length === 0) { 32014 resetLastChars(); 32015 pushWhitespace({ 32016 width: Math.abs(advanceX) 32017 }); 32018 } else { 32019 textContentItem.width += advanceX; 32020 } 32021 } 32022 if (Math.abs(advanceY) > textContentItem.height * VERTICAL_SHIFT_RATIO) { 32023 flushTextContentItem(); 32024 } 32025 return true; 32026 } 32027 function buildTextContentItem({ 32028 chars, 32029 extraSpacing 32030 }) { 32031 const font = textState.font; 32032 if (!chars) { 32033 const charSpacing = textState.charSpacing + extraSpacing; 32034 if (charSpacing) { 32035 if (!font.vertical) { 32036 textState.translateTextMatrix(charSpacing * textState.textHScale, 0); 32037 } else { 32038 textState.translateTextMatrix(0, -charSpacing); 32039 } 32040 } 32041 if (keepWhiteSpace) { 32042 compareWithLastPosition(0); 32043 } 32044 return; 32045 } 32046 const glyphs = font.charsToGlyphs(chars); 32047 const scale = textState.fontMatrix[0] * textState.fontSize; 32048 for (let i = 0, ii = glyphs.length; i < ii; i++) { 32049 const glyph = glyphs[i]; 32050 const { 32051 category 32052 } = glyph; 32053 if (category.isInvisibleFormatMark) { 32054 continue; 32055 } 32056 let charSpacing = textState.charSpacing + (i + 1 === ii ? extraSpacing : 0); 32057 let glyphWidth = glyph.width; 32058 if (font.vertical) { 32059 glyphWidth = glyph.vmetric ? glyph.vmetric[0] : -glyphWidth; 32060 } 32061 let scaledDim = glyphWidth * scale; 32062 if (!keepWhiteSpace && category.isWhitespace) { 32063 if (!font.vertical) { 32064 charSpacing += scaledDim + textState.wordSpacing; 32065 textState.translateTextMatrix(charSpacing * textState.textHScale, 0); 32066 } else { 32067 charSpacing += -scaledDim + textState.wordSpacing; 32068 textState.translateTextMatrix(0, -charSpacing); 32069 } 32070 saveLastChar(" "); 32071 continue; 32072 } 32073 if (!category.isZeroWidthDiacritic && !compareWithLastPosition(scaledDim)) { 32074 if (!font.vertical) { 32075 textState.translateTextMatrix(scaledDim * textState.textHScale, 0); 32076 } else { 32077 textState.translateTextMatrix(0, scaledDim); 32078 } 32079 continue; 32080 } 32081 const textChunk = ensureTextContentItem(); 32082 if (category.isZeroWidthDiacritic) { 32083 scaledDim = 0; 32084 } 32085 if (!font.vertical) { 32086 scaledDim *= textState.textHScale; 32087 textState.translateTextMatrix(scaledDim, 0); 32088 textChunk.width += scaledDim; 32089 } else { 32090 textState.translateTextMatrix(0, scaledDim); 32091 scaledDim = Math.abs(scaledDim); 32092 textChunk.height += scaledDim; 32093 } 32094 if (scaledDim) { 32095 textChunk.prevTransform = getCurrentTextTransform(); 32096 } 32097 const glyphUnicode = glyph.unicode; 32098 if (saveLastChar(glyphUnicode)) { 32099 textChunk.str.push(" "); 32100 } 32101 textChunk.str.push(glyphUnicode); 32102 if (charSpacing) { 32103 if (!font.vertical) { 32104 textState.translateTextMatrix(charSpacing * textState.textHScale, 0); 32105 } else { 32106 textState.translateTextMatrix(0, -charSpacing); 32107 } 32108 } 32109 } 32110 } 32111 function appendEOL() { 32112 resetLastChars(); 32113 if (textContentItem.initialized) { 32114 textContentItem.hasEOL = true; 32115 flushTextContentItem(); 32116 } else { 32117 textContent.items.push({ 32118 str: "", 32119 dir: "ltr", 32120 width: 0, 32121 height: 0, 32122 transform: getCurrentTextTransform(), 32123 fontName: textState.loadedName, 32124 hasEOL: true 32125 }); 32126 } 32127 } 32128 function addFakeSpaces(width, transf, textOrientation) { 32129 if (textOrientation * textContentItem.spaceInFlowMin <= width && width <= textOrientation * textContentItem.spaceInFlowMax) { 32130 if (textContentItem.initialized) { 32131 resetLastChars(); 32132 textContentItem.str.push(" "); 32133 } 32134 return false; 32135 } 32136 const fontName = textContentItem.fontName; 32137 let height = 0; 32138 if (textContentItem.vertical) { 32139 height = width; 32140 width = 0; 32141 } 32142 flushTextContentItem(); 32143 resetLastChars(); 32144 pushWhitespace({ 32145 width: Math.abs(width), 32146 height: Math.abs(height), 32147 transform: transf || getCurrentTextTransform(), 32148 fontName 32149 }); 32150 return true; 32151 } 32152 function flushTextContentItem() { 32153 if (!textContentItem.initialized || !textContentItem.str) { 32154 return; 32155 } 32156 if (!textContentItem.vertical) { 32157 textContentItem.totalWidth += textContentItem.width * textContentItem.textAdvanceScale; 32158 } else { 32159 textContentItem.totalHeight += textContentItem.height * textContentItem.textAdvanceScale; 32160 } 32161 textContent.items.push(runBidiTransform(textContentItem)); 32162 textContentItem.initialized = false; 32163 textContentItem.str.length = 0; 32164 } 32165 function enqueueChunk(batch = false) { 32166 const length = textContent.items.length; 32167 if (length === 0) { 32168 return; 32169 } 32170 if (batch && length < TEXT_CHUNK_BATCH_SIZE) { 32171 return; 32172 } 32173 sink.enqueue(textContent, length); 32174 textContent.items = []; 32175 textContent.styles = Object.create(null); 32176 } 32177 const timeSlotManager = new TimeSlotManager(); 32178 return new Promise(function promiseBody(resolve, reject) { 32179 const next = function (promise) { 32180 enqueueChunk(true); 32181 Promise.all([promise, sink.ready]).then(function () { 32182 try { 32183 promiseBody(resolve, reject); 32184 } catch (ex) { 32185 reject(ex); 32186 } 32187 }, reject); 32188 }; 32189 task.ensureNotTerminated(); 32190 timeSlotManager.reset(); 32191 const operation = {}; 32192 let stop, 32193 args = []; 32194 while (!(stop = timeSlotManager.check())) { 32195 args.length = 0; 32196 operation.args = args; 32197 if (!preprocessor.read(operation)) { 32198 break; 32199 } 32200 const previousState = textState; 32201 textState = stateManager.state; 32202 const fn = operation.fn; 32203 args = operation.args; 32204 switch (fn | 0) { 32205 case OPS.setFont: 32206 var fontNameArg = args[0].name, 32207 fontSizeArg = args[1]; 32208 if (textState.font && fontNameArg === textState.fontName && fontSizeArg === textState.fontSize) { 32209 break; 32210 } 32211 flushTextContentItem(); 32212 textState.fontName = fontNameArg; 32213 textState.fontSize = fontSizeArg; 32214 next(handleSetFont(fontNameArg, null)); 32215 return; 32216 case OPS.setTextRise: 32217 textState.textRise = args[0]; 32218 break; 32219 case OPS.setHScale: 32220 textState.textHScale = args[0] / 100; 32221 break; 32222 case OPS.setLeading: 32223 textState.leading = args[0]; 32224 break; 32225 case OPS.moveText: 32226 textState.translateTextLineMatrix(args[0], args[1]); 32227 textState.textMatrix = textState.textLineMatrix.slice(); 32228 break; 32229 case OPS.setLeadingMoveText: 32230 textState.leading = -args[1]; 32231 textState.translateTextLineMatrix(args[0], args[1]); 32232 textState.textMatrix = textState.textLineMatrix.slice(); 32233 break; 32234 case OPS.nextLine: 32235 textState.carriageReturn(); 32236 break; 32237 case OPS.setTextMatrix: 32238 textState.setTextMatrix(args[0], args[1], args[2], args[3], args[4], args[5]); 32239 textState.setTextLineMatrix(args[0], args[1], args[2], args[3], args[4], args[5]); 32240 updateAdvanceScale(); 32241 break; 32242 case OPS.setCharSpacing: 32243 textState.charSpacing = args[0]; 32244 break; 32245 case OPS.setWordSpacing: 32246 textState.wordSpacing = args[0]; 32247 break; 32248 case OPS.beginText: 32249 textState.textMatrix = IDENTITY_MATRIX.slice(); 32250 textState.textLineMatrix = IDENTITY_MATRIX.slice(); 32251 break; 32252 case OPS.showSpacedText: 32253 if (!stateManager.state.font) { 32254 self.ensureStateFont(stateManager.state); 32255 continue; 32256 } 32257 const spaceFactor = (textState.font.vertical ? 1 : -1) * textState.fontSize / 1000; 32258 const elements = args[0]; 32259 for (let i = 0, ii = elements.length; i < ii; i++) { 32260 const item = elements[i]; 32261 if (typeof item === "string") { 32262 showSpacedTextBuffer.push(item); 32263 } else if (typeof item === "number" && item !== 0) { 32264 const str = showSpacedTextBuffer.join(""); 32265 showSpacedTextBuffer.length = 0; 32266 buildTextContentItem({ 32267 chars: str, 32268 extraSpacing: item * spaceFactor 32269 }); 32270 } 32271 } 32272 if (showSpacedTextBuffer.length > 0) { 32273 const str = showSpacedTextBuffer.join(""); 32274 showSpacedTextBuffer.length = 0; 32275 buildTextContentItem({ 32276 chars: str, 32277 extraSpacing: 0 32278 }); 32279 } 32280 break; 32281 case OPS.showText: 32282 if (!stateManager.state.font) { 32283 self.ensureStateFont(stateManager.state); 32284 continue; 32285 } 32286 buildTextContentItem({ 32287 chars: args[0], 32288 extraSpacing: 0 32289 }); 32290 break; 32291 case OPS.nextLineShowText: 32292 if (!stateManager.state.font) { 32293 self.ensureStateFont(stateManager.state); 32294 continue; 32295 } 32296 textState.carriageReturn(); 32297 buildTextContentItem({ 32298 chars: args[0], 32299 extraSpacing: 0 32300 }); 32301 break; 32302 case OPS.nextLineSetSpacingShowText: 32303 if (!stateManager.state.font) { 32304 self.ensureStateFont(stateManager.state); 32305 continue; 32306 } 32307 textState.wordSpacing = args[0]; 32308 textState.charSpacing = args[1]; 32309 textState.carriageReturn(); 32310 buildTextContentItem({ 32311 chars: args[2], 32312 extraSpacing: 0 32313 }); 32314 break; 32315 case OPS.paintXObject: 32316 flushTextContentItem(); 32317 if (!xobjs) { 32318 xobjs = resources.get("XObject") || Dict.empty; 32319 } 32320 var isValidName = args[0] instanceof Name; 32321 var name = args[0].name; 32322 if (isValidName && emptyXObjectCache.getByName(name)) { 32323 break; 32324 } 32325 next(new Promise(function (resolveXObject, rejectXObject) { 32326 if (!isValidName) { 32327 throw new FormatError("XObject must be referred to by name."); 32328 } 32329 let xobj = xobjs.getRaw(name); 32330 if (xobj instanceof Ref) { 32331 if (emptyXObjectCache.getByRef(xobj)) { 32332 resolveXObject(); 32333 return; 32334 } 32335 const globalImage = self.globalImageCache.getData(xobj, self.pageIndex); 32336 if (globalImage) { 32337 resolveXObject(); 32338 return; 32339 } 32340 xobj = xref.fetch(xobj); 32341 } 32342 if (!(xobj instanceof BaseStream)) { 32343 throw new FormatError("XObject should be a stream"); 32344 } 32345 const type = xobj.dict.get("Subtype"); 32346 if (!(type instanceof Name)) { 32347 throw new FormatError("XObject should have a Name subtype"); 32348 } 32349 if (type.name !== "Form") { 32350 emptyXObjectCache.set(name, xobj.dict.objId, true); 32351 resolveXObject(); 32352 return; 32353 } 32354 const currentState = stateManager.state.clone(); 32355 const xObjStateManager = new StateManager(currentState); 32356 const matrix = lookupMatrix(xobj.dict.getArray("Matrix"), null); 32357 if (matrix) { 32358 xObjStateManager.transform(matrix); 32359 } 32360 enqueueChunk(); 32361 const sinkWrapper = { 32362 enqueueInvoked: false, 32363 enqueue(chunk, size) { 32364 this.enqueueInvoked = true; 32365 sink.enqueue(chunk, size); 32366 }, 32367 get desiredSize() { 32368 return sink.desiredSize; 32369 }, 32370 get ready() { 32371 return sink.ready; 32372 } 32373 }; 32374 self.getTextContent({ 32375 stream: xobj, 32376 task, 32377 resources: xobj.dict.get("Resources") || resources, 32378 stateManager: xObjStateManager, 32379 includeMarkedContent, 32380 sink: sinkWrapper, 32381 seenStyles, 32382 viewBox, 32383 lang, 32384 markedContentData, 32385 disableNormalization, 32386 keepWhiteSpace 32387 }).then(function () { 32388 if (!sinkWrapper.enqueueInvoked) { 32389 emptyXObjectCache.set(name, xobj.dict.objId, true); 32390 } 32391 resolveXObject(); 32392 }, rejectXObject); 32393 }).catch(function (reason) { 32394 if (reason instanceof AbortException) { 32395 return; 32396 } 32397 if (self.options.ignoreErrors) { 32398 warn(`getTextContent - ignoring XObject: "${reason}".`); 32399 return; 32400 } 32401 throw reason; 32402 })); 32403 return; 32404 case OPS.setGState: 32405 isValidName = args[0] instanceof Name; 32406 name = args[0].name; 32407 if (isValidName && emptyGStateCache.getByName(name)) { 32408 break; 32409 } 32410 next(new Promise(function (resolveGState, rejectGState) { 32411 if (!isValidName) { 32412 throw new FormatError("GState must be referred to by name."); 32413 } 32414 const extGState = resources.get("ExtGState"); 32415 if (!(extGState instanceof Dict)) { 32416 throw new FormatError("ExtGState should be a dictionary."); 32417 } 32418 const gState = extGState.get(name); 32419 if (!(gState instanceof Dict)) { 32420 throw new FormatError("GState should be a dictionary."); 32421 } 32422 const gStateFont = gState.get("Font"); 32423 if (!gStateFont) { 32424 emptyGStateCache.set(name, gState.objId, true); 32425 resolveGState(); 32426 return; 32427 } 32428 flushTextContentItem(); 32429 textState.fontName = null; 32430 textState.fontSize = gStateFont[1]; 32431 handleSetFont(null, gStateFont[0]).then(resolveGState, rejectGState); 32432 }).catch(function (reason) { 32433 if (reason instanceof AbortException) { 32434 return; 32435 } 32436 if (self.options.ignoreErrors) { 32437 warn(`getTextContent - ignoring ExtGState: "${reason}".`); 32438 return; 32439 } 32440 throw reason; 32441 })); 32442 return; 32443 case OPS.beginMarkedContent: 32444 flushTextContentItem(); 32445 if (includeMarkedContent) { 32446 markedContentData.level++; 32447 textContent.items.push({ 32448 type: "beginMarkedContent", 32449 tag: args[0] instanceof Name ? args[0].name : null 32450 }); 32451 } 32452 break; 32453 case OPS.beginMarkedContentProps: 32454 flushTextContentItem(); 32455 if (includeMarkedContent) { 32456 markedContentData.level++; 32457 let mcid = null; 32458 if (args[1] instanceof Dict) { 32459 mcid = args[1].get("MCID"); 32460 } 32461 textContent.items.push({ 32462 type: "beginMarkedContentProps", 32463 id: Number.isInteger(mcid) ? `${self.idFactory.getPageObjId()}_mc${mcid}` : null, 32464 tag: args[0] instanceof Name ? args[0].name : null 32465 }); 32466 } 32467 break; 32468 case OPS.endMarkedContent: 32469 flushTextContentItem(); 32470 if (includeMarkedContent) { 32471 if (markedContentData.level === 0) { 32472 break; 32473 } 32474 markedContentData.level--; 32475 textContent.items.push({ 32476 type: "endMarkedContent" 32477 }); 32478 } 32479 break; 32480 case OPS.restore: 32481 if (previousState && (previousState.font !== textState.font || previousState.fontSize !== textState.fontSize || previousState.fontName !== textState.fontName)) { 32482 flushTextContentItem(); 32483 } 32484 break; 32485 } 32486 if (textContent.items.length >= sink.desiredSize) { 32487 stop = true; 32488 break; 32489 } 32490 } 32491 if (stop) { 32492 next(deferred); 32493 return; 32494 } 32495 flushTextContentItem(); 32496 enqueueChunk(); 32497 resolve(); 32498 }).catch(reason => { 32499 if (reason instanceof AbortException) { 32500 return; 32501 } 32502 if (this.options.ignoreErrors) { 32503 warn(`getTextContent - ignoring errors during "${task.name}" ` + `task: "${reason}".`); 32504 flushTextContentItem(); 32505 enqueueChunk(); 32506 return; 32507 } 32508 throw reason; 32509 }); 32510 } 32511 async extractDataStructures(dict, properties) { 32512 const xref = this.xref; 32513 let cidToGidBytes; 32514 const toUnicodePromise = this.readToUnicode(properties.toUnicode); 32515 if (properties.composite) { 32516 const cidSystemInfo = dict.get("CIDSystemInfo"); 32517 if (cidSystemInfo instanceof Dict) { 32518 properties.cidSystemInfo = { 32519 registry: stringToPDFString(cidSystemInfo.get("Registry")), 32520 ordering: stringToPDFString(cidSystemInfo.get("Ordering")), 32521 supplement: cidSystemInfo.get("Supplement") 32522 }; 32523 } 32524 try { 32525 const cidToGidMap = dict.get("CIDToGIDMap"); 32526 if (cidToGidMap instanceof BaseStream) { 32527 cidToGidBytes = cidToGidMap.getBytes(); 32528 } 32529 } catch (ex) { 32530 if (!this.options.ignoreErrors) { 32531 throw ex; 32532 } 32533 warn(`extractDataStructures - ignoring CIDToGIDMap data: "${ex}".`); 32534 } 32535 } 32536 const differences = []; 32537 let baseEncodingName = null; 32538 let encoding; 32539 if (dict.has("Encoding")) { 32540 encoding = dict.get("Encoding"); 32541 if (encoding instanceof Dict) { 32542 baseEncodingName = encoding.get("BaseEncoding"); 32543 baseEncodingName = baseEncodingName instanceof Name ? baseEncodingName.name : null; 32544 if (encoding.has("Differences")) { 32545 const diffEncoding = encoding.get("Differences"); 32546 let index = 0; 32547 for (const entry of diffEncoding) { 32548 const data = xref.fetchIfRef(entry); 32549 if (typeof data === "number") { 32550 index = data; 32551 } else if (data instanceof Name) { 32552 differences[index++] = data.name; 32553 } else { 32554 throw new FormatError(`Invalid entry in 'Differences' array: ${data}`); 32555 } 32556 } 32557 } 32558 } else if (encoding instanceof Name) { 32559 baseEncodingName = encoding.name; 32560 } else { 32561 const msg = "Encoding is not a Name nor a Dict"; 32562 if (!this.options.ignoreErrors) { 32563 throw new FormatError(msg); 32564 } 32565 warn(msg); 32566 } 32567 if (baseEncodingName !== "MacRomanEncoding" && baseEncodingName !== "MacExpertEncoding" && baseEncodingName !== "WinAnsiEncoding") { 32568 baseEncodingName = null; 32569 } 32570 } 32571 const nonEmbeddedFont = !properties.file || properties.isInternalFont, 32572 isSymbolsFontName = getSymbolsFonts()[properties.name]; 32573 if (baseEncodingName && nonEmbeddedFont && isSymbolsFontName) { 32574 baseEncodingName = null; 32575 } 32576 if (baseEncodingName) { 32577 properties.defaultEncoding = getEncoding(baseEncodingName); 32578 } else { 32579 const isSymbolicFont = !!(properties.flags & FontFlags.Symbolic); 32580 const isNonsymbolicFont = !!(properties.flags & FontFlags.Nonsymbolic);
vendor: 11,568 bytes, lines 32580-32910
32580 32581 encoding = StandardEncoding; 32582 if (properties.type === "TrueType" && !isNonsymbolicFont) { 32583 encoding = WinAnsiEncoding; 32584 } 32585 if (isSymbolicFont || isSymbolsFontName) { 32586 encoding = MacRomanEncoding; 32587 if (nonEmbeddedFont) { 32588 if (/Symbol/i.test(properties.name)) { 32589 encoding = SymbolSetEncoding; 32590 } else if (/Dingbats/i.test(properties.name)) { 32591 encoding = ZapfDingbatsEncoding; 32592 } else if (/Wingdings/i.test(properties.name)) { 32593 encoding = WinAnsiEncoding; 32594 } 32595 } 32596 } 32597 properties.defaultEncoding = encoding; 32598 } 32599 properties.differences = differences; 32600 properties.baseEncodingName = baseEncodingName; 32601 properties.hasEncoding = !!baseEncodingName || differences.length > 0; 32602 properties.dict = dict; 32603 properties.toUnicode = await toUnicodePromise; 32604 const builtToUnicode = await this.buildToUnicode(properties); 32605 properties.toUnicode = builtToUnicode; 32606 if (cidToGidBytes) { 32607 properties.cidToGidMap = this.readCidToGidMap(cidToGidBytes, builtToUnicode); 32608 } 32609 return properties; 32610 } 32611 _simpleFontToUnicode(properties, forceGlyphs = false) { 32612 assert(!properties.composite, "Must be a simple font."); 32613 const toUnicode = []; 32614 const encoding = properties.defaultEncoding.slice(); 32615 const baseEncodingName = properties.baseEncodingName; 32616 const differences = properties.differences; 32617 for (const charcode in differences) { 32618 const glyphName = differences[charcode]; 32619 if (glyphName === ".notdef") { 32620 continue; 32621 } 32622 encoding[charcode] = glyphName; 32623 } 32624 const glyphsUnicodeMap = getGlyphsUnicode(); 32625 for (const charcode in encoding) { 32626 let glyphName = encoding[charcode]; 32627 if (glyphName === "") { 32628 continue; 32629 } 32630 let unicode = glyphsUnicodeMap[glyphName]; 32631 if (unicode !== undefined) { 32632 toUnicode[charcode] = String.fromCharCode(unicode); 32633 continue; 32634 } 32635 let code = 0; 32636 switch (glyphName[0]) { 32637 case "G": 32638 if (glyphName.length === 3) { 32639 code = parseInt(glyphName.substring(1), 16); 32640 } 32641 break; 32642 case "g": 32643 if (glyphName.length === 5) { 32644 code = parseInt(glyphName.substring(1), 16); 32645 } 32646 break; 32647 case "C": 32648 case "c": 32649 if (glyphName.length >= 3 && glyphName.length <= 4) { 32650 const codeStr = glyphName.substring(1); 32651 if (forceGlyphs) { 32652 code = parseInt(codeStr, 16); 32653 break; 32654 } 32655 code = +codeStr; 32656 if (Number.isNaN(code) && Number.isInteger(parseInt(codeStr, 16))) { 32657 return this._simpleFontToUnicode(properties, true); 32658 } 32659 } 32660 break; 32661 case "u": 32662 unicode = getUnicodeForGlyph(glyphName, glyphsUnicodeMap); 32663 if (unicode !== -1) { 32664 code = unicode; 32665 } 32666 break; 32667 default: 32668 switch (glyphName) { 32669 case "f_h": 32670 case "f_t": 32671 case "T_h": 32672 toUnicode[charcode] = glyphName.replaceAll("_", ""); 32673 continue; 32674 } 32675 break; 32676 } 32677 if (code > 0 && code <= 0x10ffff && Number.isInteger(code)) { 32678 if (baseEncodingName && code === +charcode) { 32679 const baseEncoding = getEncoding(baseEncodingName); 32680 if (baseEncoding && (glyphName = baseEncoding[charcode])) { 32681 toUnicode[charcode] = String.fromCharCode(glyphsUnicodeMap[glyphName]); 32682 continue; 32683 } 32684 } 32685 toUnicode[charcode] = String.fromCodePoint(code); 32686 } 32687 } 32688 return toUnicode; 32689 } 32690 async buildToUnicode(properties) { 32691 properties.hasIncludedToUnicodeMap = properties.toUnicode?.length > 0; 32692 if (properties.hasIncludedToUnicodeMap) { 32693 if (!properties.composite && properties.hasEncoding) { 32694 properties.fallbackToUnicode = this._simpleFontToUnicode(properties); 32695 } 32696 return properties.toUnicode; 32697 } 32698 if (!properties.composite) { 32699 return new ToUnicodeMap(this._simpleFontToUnicode(properties)); 32700 } 32701 if (properties.composite && (properties.cMap.builtInCMap && !(properties.cMap instanceof IdentityCMap) || properties.cidSystemInfo?.registry === "Adobe" && (properties.cidSystemInfo.ordering === "GB1" || properties.cidSystemInfo.ordering === "CNS1" || properties.cidSystemInfo.ordering === "Japan1" || properties.cidSystemInfo.ordering === "Korea1"))) { 32702 const { 32703 registry, 32704 ordering 32705 } = properties.cidSystemInfo; 32706 const ucs2CMapName = Name.get(`${registry}-${ordering}-UCS2`); 32707 const ucs2CMap = await CMapFactory.create({ 32708 encoding: ucs2CMapName, 32709 fetchBuiltInCMap: this._fetchBuiltInCMapBound, 32710 useCMap: null 32711 }); 32712 const toUnicode = [], 32713 buf = []; 32714 properties.cMap.forEach(function (charcode, cid) { 32715 if (cid > 0xffff) { 32716 throw new FormatError("Max size of CID is 65,535"); 32717 } 32718 const ucs2 = ucs2CMap.lookup(cid); 32719 if (ucs2) { 32720 buf.length = 0; 32721 for (let i = 0, ii = ucs2.length; i < ii; i += 2) { 32722 buf.push((ucs2.charCodeAt(i) << 8) + ucs2.charCodeAt(i + 1)); 32723 } 32724 toUnicode[charcode] = String.fromCharCode(...buf); 32725 } 32726 }); 32727 return new ToUnicodeMap(toUnicode); 32728 } 32729 return new IdentityToUnicodeMap(properties.firstChar, properties.lastChar); 32730 } 32731 async readToUnicode(cmapObj) { 32732 if (!cmapObj) { 32733 return null; 32734 } 32735 if (cmapObj instanceof Name) { 32736 const cmap = await CMapFactory.create({ 32737 encoding: cmapObj, 32738 fetchBuiltInCMap: this._fetchBuiltInCMapBound, 32739 useCMap: null 32740 }); 32741 if (cmap instanceof IdentityCMap) { 32742 return new IdentityToUnicodeMap(0, 0xffff); 32743 } 32744 return new ToUnicodeMap(cmap.getMap()); 32745 } 32746 if (cmapObj instanceof BaseStream) { 32747 try { 32748 const cmap = await CMapFactory.create({ 32749 encoding: cmapObj, 32750 fetchBuiltInCMap: this._fetchBuiltInCMapBound, 32751 useCMap: null 32752 }); 32753 if (cmap instanceof IdentityCMap) { 32754 return new IdentityToUnicodeMap(0, 0xffff); 32755 } 32756 const map = new Array(cmap.length); 32757 cmap.forEach(function (charCode, token) { 32758 if (typeof token === "number") { 32759 map[charCode] = String.fromCodePoint(token); 32760 return; 32761 } 32762 if (token.length % 2 !== 0) { 32763 token = "\u0000" + token; 32764 } 32765 const str = []; 32766 for (let k = 0; k < token.length; k += 2) { 32767 const w1 = token.charCodeAt(k) << 8 | token.charCodeAt(k + 1); 32768 if ((w1 & 0xf800) !== 0xd800) { 32769 str.push(w1); 32770 continue; 32771 } 32772 k += 2; 32773 const w2 = token.charCodeAt(k) << 8 | token.charCodeAt(k + 1); 32774 str.push(((w1 & 0x3ff) << 10) + (w2 & 0x3ff) + 0x10000); 32775 } 32776 map[charCode] = String.fromCodePoint(...str); 32777 }); 32778 return new ToUnicodeMap(map); 32779 } catch (reason) { 32780 if (reason instanceof AbortException) { 32781 return null; 32782 } 32783 if (this.options.ignoreErrors) { 32784 warn(`readToUnicode - ignoring ToUnicode data: "${reason}".`); 32785 return null; 32786 } 32787 throw reason; 32788 } 32789 } 32790 return null; 32791 } 32792 readCidToGidMap(glyphsData, toUnicode) { 32793 const result = []; 32794 for (let j = 0, jj = glyphsData.length; j < jj; j++) { 32795 const glyphID = glyphsData[j++] << 8 | glyphsData[j]; 32796 const code = j >> 1; 32797 if (glyphID === 0 && !toUnicode.has(code)) { 32798 continue; 32799 } 32800 result[code] = glyphID; 32801 } 32802 return result; 32803 } 32804 extractWidths(dict, descriptor, properties) { 32805 const xref = this.xref; 32806 let glyphsWidths = []; 32807 let defaultWidth = 0; 32808 const glyphsVMetrics = []; 32809 let defaultVMetrics; 32810 if (properties.composite) { 32811 const dw = dict.get("DW"); 32812 defaultWidth = typeof dw === "number" ? Math.ceil(dw) : 1000; 32813 const widths = dict.get("W"); 32814 if (Array.isArray(widths)) { 32815 for (let i = 0, ii = widths.length; i < ii; i++) { 32816 let start = xref.fetchIfRef(widths[i++]); 32817 if (!Number.isInteger(start)) { 32818 break; 32819 } 32820 const code = xref.fetchIfRef(widths[i]); 32821 if (Array.isArray(code)) { 32822 for (const c of code) { 32823 const width = xref.fetchIfRef(c); 32824 if (typeof width === "number") { 32825 glyphsWidths[start] = width; 32826 } 32827 start++; 32828 } 32829 } else if (Number.isInteger(code)) { 32830 const width = xref.fetchIfRef(widths[++i]); 32831 if (typeof width !== "number") { 32832 continue; 32833 } 32834 for (let j = start; j <= code; j++) { 32835 glyphsWidths[j] = width; 32836 } 32837 } else { 32838 break; 32839 } 32840 } 32841 } 32842 if (properties.vertical) { 32843 const dw2 = dict.getArray("DW2"); 32844 let vmetrics = isNumberArray(dw2, 2) ? dw2 : [880, -1000]; 32845 defaultVMetrics = [vmetrics[1], defaultWidth * 0.5, vmetrics[0]]; 32846 vmetrics = dict.get("W2"); 32847 if (Array.isArray(vmetrics)) { 32848 for (let i = 0, ii = vmetrics.length; i < ii; i++) { 32849 let start = xref.fetchIfRef(vmetrics[i++]); 32850 if (!Number.isInteger(start)) { 32851 break; 32852 } 32853 const code = xref.fetchIfRef(vmetrics[i]); 32854 if (Array.isArray(code)) { 32855 for (let j = 0, jj = code.length; j < jj; j++) { 32856 const vmetric = [xref.fetchIfRef(code[j++]), xref.fetchIfRef(code[j++]), xref.fetchIfRef(code[j])]; 32857 if (isNumberArray(vmetric, null)) { 32858 glyphsVMetrics[start] = vmetric; 32859 } 32860 start++; 32861 } 32862 } else if (Number.isInteger(code)) { 32863 const vmetric = [xref.fetchIfRef(vmetrics[++i]), xref.fetchIfRef(vmetrics[++i]), xref.fetchIfRef(vmetrics[++i])]; 32864 if (!isNumberArray(vmetric, null)) { 32865 continue; 32866 } 32867 for (let j = start; j <= code; j++) { 32868 glyphsVMetrics[j] = vmetric; 32869 } 32870 } else { 32871 break; 32872 } 32873 } 32874 } 32875 } 32876 } else { 32877 const widths = dict.get("Widths"); 32878 if (Array.isArray(widths)) { 32879 let j = properties.firstChar; 32880 for (const w of widths) { 32881 const width = xref.fetchIfRef(w); 32882 if (typeof width === "number") { 32883 glyphsWidths[j] = width; 32884 } 32885 j++; 32886 } 32887 const missingWidth = descriptor.get("MissingWidth"); 32888 defaultWidth = typeof missingWidth === "number" ? missingWidth : 0; 32889 } else { 32890 const baseFontName = dict.get("BaseFont"); 32891 if (baseFontName instanceof Name) { 32892 const metrics = this.getBaseFontMetrics(baseFontName.name); 32893 glyphsWidths = this.buildCharCodeToWidth(metrics.widths, properties); 32894 defaultWidth = metrics.defaultWidth; 32895 } 32896 } 32897 } 32898 let isMonospace = true; 32899 let firstWidth = defaultWidth; 32900 for (const glyph in glyphsWidths) { 32901 const glyphWidth = glyphsWidths[glyph]; 32902 if (!glyphWidth) { 32903 continue; 32904 } 32905 if (!firstWidth) { 32906 firstWidth = glyphWidth; 32907 continue; 32908 } 32909 if (firstWidth !== glyphWidth) { 32910 isMonospace = false;
vendor: 6,433 bytes, lines 32911-33102
32911 break; 32912 } 32913 } 32914 if (isMonospace) { 32915 properties.flags |= FontFlags.FixedPitch; 32916 } else { 32917 properties.flags &= ~FontFlags.FixedPitch; 32918 } 32919 properties.defaultWidth = defaultWidth; 32920 properties.widths = glyphsWidths; 32921 properties.defaultVMetrics = defaultVMetrics; 32922 properties.vmetrics = glyphsVMetrics; 32923 } 32924 isSerifFont(baseFontName) { 32925 const fontNameWoStyle = baseFontName.split("-", 1)[0]; 32926 return fontNameWoStyle in getSerifFonts() || /serif/gi.test(fontNameWoStyle); 32927 } 32928 getBaseFontMetrics(name) { 32929 let defaultWidth = 0; 32930 let widths = Object.create(null); 32931 let monospace = false; 32932 const stdFontMap = getStdFontMap(); 32933 let lookupName = stdFontMap[name] || name; 32934 const Metrics = getMetrics(); 32935 if (!(lookupName in Metrics)) { 32936 lookupName = this.isSerifFont(name) ? "Times-Roman" : "Helvetica"; 32937 } 32938 const glyphWidths = Metrics[lookupName]; 32939 if (typeof glyphWidths === "number") { 32940 defaultWidth = glyphWidths; 32941 monospace = true; 32942 } else { 32943 widths = glyphWidths(); 32944 } 32945 return { 32946 defaultWidth, 32947 monospace, 32948 widths 32949 }; 32950 } 32951 buildCharCodeToWidth(widthsByGlyphName, properties) { 32952 const widths = Object.create(null); 32953 const differences = properties.differences; 32954 const encoding = properties.defaultEncoding; 32955 for (let charCode = 0; charCode < 256; charCode++) { 32956 if (charCode in differences && widthsByGlyphName[differences[charCode]]) { 32957 widths[charCode] = widthsByGlyphName[differences[charCode]]; 32958 continue; 32959 } 32960 if (charCode in encoding && widthsByGlyphName[encoding[charCode]]) { 32961 widths[charCode] = widthsByGlyphName[encoding[charCode]]; 32962 continue; 32963 } 32964 } 32965 return widths; 32966 } 32967 preEvaluateFont(dict) { 32968 const baseDict = dict; 32969 let type = dict.get("Subtype"); 32970 if (!(type instanceof Name)) { 32971 throw new FormatError("invalid font Subtype"); 32972 } 32973 let composite = false; 32974 let hash; 32975 if (type.name === "Type0") { 32976 const df = dict.get("DescendantFonts"); 32977 if (!df) { 32978 throw new FormatError("Descendant fonts are not specified"); 32979 } 32980 dict = Array.isArray(df) ? this.xref.fetchIfRef(df[0]) : df; 32981 if (!(dict instanceof Dict)) { 32982 throw new FormatError("Descendant font is not a dictionary."); 32983 } 32984 type = dict.get("Subtype"); 32985 if (!(type instanceof Name)) { 32986 throw new FormatError("invalid font Subtype"); 32987 } 32988 composite = true; 32989 } 32990 let firstChar = dict.get("FirstChar"); 32991 if (!Number.isInteger(firstChar)) { 32992 firstChar = 0; 32993 } 32994 let lastChar = dict.get("LastChar"); 32995 if (!Number.isInteger(lastChar)) { 32996 lastChar = composite ? 0xffff : 0xff; 32997 } 32998 const descriptor = dict.get("FontDescriptor"); 32999 const toUnicode = dict.get("ToUnicode") || baseDict.get("ToUnicode"); 33000 if (descriptor) { 33001 hash = new MurmurHash3_64(); 33002 const encoding = baseDict.getRaw("Encoding"); 33003 if (encoding instanceof Name) { 33004 hash.update(encoding.name); 33005 } else if (encoding instanceof Ref) { 33006 hash.update(encoding.toString()); 33007 } else if (encoding instanceof Dict) { 33008 for (const entry of encoding.getRawValues()) { 33009 if (entry instanceof Name) { 33010 hash.update(entry.name); 33011 } else if (entry instanceof Ref) { 33012 hash.update(entry.toString()); 33013 } else if (Array.isArray(entry)) { 33014 const diffLength = entry.length, 33015 diffBuf = new Array(diffLength); 33016 for (let j = 0; j < diffLength; j++) { 33017 const diffEntry = entry[j]; 33018 if (diffEntry instanceof Name) { 33019 diffBuf[j] = diffEntry.name; 33020 } else if (typeof diffEntry === "number" || diffEntry instanceof Ref) { 33021 diffBuf[j] = diffEntry.toString(); 33022 } 33023 } 33024 hash.update(diffBuf.join()); 33025 } 33026 } 33027 } 33028 hash.update(`${firstChar}-${lastChar}`); 33029 if (toUnicode instanceof BaseStream) { 33030 const stream = toUnicode.str || toUnicode; 33031 const uint8array = stream.buffer ? new Uint8Array(stream.buffer.buffer, 0, stream.bufferLength) : new Uint8Array(stream.bytes.buffer, stream.start, stream.end - stream.start); 33032 hash.update(uint8array); 33033 } else if (toUnicode instanceof Name) { 33034 hash.update(toUnicode.name); 33035 } 33036 const widths = dict.get("Widths") || baseDict.get("Widths"); 33037 if (Array.isArray(widths)) { 33038 const widthsBuf = []; 33039 for (const entry of widths) { 33040 if (typeof entry === "number" || entry instanceof Ref) { 33041 widthsBuf.push(entry.toString()); 33042 } 33043 } 33044 hash.update(widthsBuf.join()); 33045 } 33046 if (composite) { 33047 hash.update("compositeFont"); 33048 const compositeWidths = dict.get("W") || baseDict.get("W"); 33049 if (Array.isArray(compositeWidths)) { 33050 const widthsBuf = []; 33051 for (const entry of compositeWidths) { 33052 if (typeof entry === "number" || entry instanceof Ref) { 33053 widthsBuf.push(entry.toString()); 33054 } else if (Array.isArray(entry)) { 33055 const subWidthsBuf = []; 33056 for (const element of entry) { 33057 if (typeof element === "number" || element instanceof Ref) { 33058 subWidthsBuf.push(element.toString()); 33059 } 33060 } 33061 widthsBuf.push(`[${subWidthsBuf.join()}]`); 33062 } 33063 } 33064 hash.update(widthsBuf.join()); 33065 } 33066 const cidToGidMap = dict.getRaw("CIDToGIDMap") || baseDict.getRaw("CIDToGIDMap"); 33067 if (cidToGidMap instanceof Name) { 33068 hash.update(cidToGidMap.name); 33069 } else if (cidToGidMap instanceof Ref) { 33070 hash.update(cidToGidMap.toString()); 33071 } else if (cidToGidMap instanceof BaseStream) { 33072 hash.update(cidToGidMap.peekBytes()); 33073 } 33074 } 33075 } 33076 return { 33077 descriptor, 33078 dict, 33079 baseDict, 33080 composite, 33081 type: type.name, 33082 firstChar, 33083 lastChar, 33084 toUnicode, 33085 hash: hash ? hash.hexdigest() : "" 33086 }; 33087 } 33088 async translateFont({ 33089 descriptor, 33090 dict, 33091 baseDict, 33092 composite, 33093 type, 33094 firstChar, 33095 lastChar, 33096 toUnicode, 33097 cssFontInfo 33098 }) { 33099 const isType3Font = type === "Type3"; 33100 if (!descriptor) { 33101 if (isType3Font) { 33102
vendor: 8,755 bytes, lines 33102-33348
33102const bbox = lookupNormalRect(dict.getArray("FontBBox"), [0, 0, 0, 0]); 33103 descriptor = new Dict(null); 33104 descriptor.set("FontName", Name.get(type)); 33105 descriptor.set("FontBBox", bbox); 33106 } else { 33107 let baseFontName = dict.get("BaseFont"); 33108 if (!(baseFontName instanceof Name)) { 33109 throw new FormatError("Base font is not specified"); 33110 } 33111 baseFontName = baseFontName.name.replaceAll(/[,_]/g, "-"); 33112 const metrics = this.getBaseFontMetrics(baseFontName); 33113 const fontNameWoStyle = baseFontName.split("-", 1)[0]; 33114 const flags = (this.isSerifFont(fontNameWoStyle) ? FontFlags.Serif : 0) | (metrics.monospace ? FontFlags.FixedPitch : 0) | (getSymbolsFonts()[fontNameWoStyle] ? FontFlags.Symbolic : FontFlags.Nonsymbolic); 33115 const properties = { 33116 type, 33117 name: baseFontName, 33118 loadedName: baseDict.loadedName, 33119 systemFontInfo: null, 33120 widths: metrics.widths, 33121 defaultWidth: metrics.defaultWidth, 33122 isSimulatedFlags: true, 33123 flags, 33124 firstChar, 33125 lastChar, 33126 toUnicode, 33127 xHeight: 0, 33128 capHeight: 0, 33129 italicAngle: 0, 33130 isType3Font 33131 }; 33132 const widths = dict.get("Widths"); 33133 const standardFontName = getStandardFontName(baseFontName); 33134 let file = null; 33135 if (standardFontName) { 33136 file = await this.fetchStandardFontData(standardFontName); 33137 properties.isInternalFont = !!file; 33138 } 33139 if (!properties.isInternalFont && this.options.useSystemFonts) { 33140 properties.systemFontInfo = getFontSubstitution(this.systemFontCache, this.idFactory, this.options.standardFontDataUrl, baseFontName, standardFontName, type); 33141 } 33142 const newProperties = await this.extractDataStructures(dict, properties); 33143 if (Array.isArray(widths)) { 33144 const glyphWidths = []; 33145 let j = firstChar; 33146 for (const w of widths) { 33147 const width = this.xref.fetchIfRef(w); 33148 if (typeof width === "number") { 33149 glyphWidths[j] = width; 33150 } 33151 j++; 33152 } 33153 newProperties.widths = glyphWidths; 33154 } else { 33155 newProperties.widths = this.buildCharCodeToWidth(metrics.widths, newProperties); 33156 } 33157 return new Font(baseFontName, file, newProperties); 33158 } 33159 } 33160 let fontName = descriptor.get("FontName"); 33161 let baseFont = dict.get("BaseFont"); 33162 if (typeof fontName === "string") { 33163 fontName = Name.get(fontName); 33164 } 33165 if (typeof baseFont === "string") { 33166 baseFont = Name.get(baseFont); 33167 } 33168 const fontNameStr = fontName?.name; 33169 const baseFontStr = baseFont?.name; 33170 if (!isType3Font && fontNameStr !== baseFontStr) { 33171 info(`The FontDescriptor's FontName is "${fontNameStr}" but ` + `should be the same as the Font's BaseFont "${baseFontStr}".`); 33172 if (fontNameStr && baseFontStr && (baseFontStr.startsWith(fontNameStr) || !isKnownFontName(fontNameStr) && isKnownFontName(baseFontStr))) { 33173 fontName = null; 33174 } 33175 } 33176 fontName ||= baseFont; 33177 if (!(fontName instanceof Name)) { 33178 throw new FormatError("invalid font name"); 33179 } 33180 let fontFile, subtype, length1, length2, length3; 33181 try { 33182 fontFile = descriptor.get("FontFile", "FontFile2", "FontFile3"); 33183 if (fontFile) { 33184 if (!(fontFile instanceof BaseStream)) { 33185 throw new FormatError("FontFile should be a stream"); 33186 } else if (fontFile.isEmpty) { 33187 throw new FormatError("FontFile is empty"); 33188 } 33189 } 33190 } catch (ex) { 33191 if (!this.options.ignoreErrors) { 33192 throw ex; 33193 } 33194 warn(`translateFont - fetching "${fontName.name}" font file: "${ex}".`); 33195 fontFile = null; 33196 } 33197 let isInternalFont = false; 33198 let glyphScaleFactors = null; 33199 let systemFontInfo = null; 33200 if (fontFile) { 33201 if (fontFile.dict) { 33202 const subtypeEntry = fontFile.dict.get("Subtype"); 33203 if (subtypeEntry instanceof Name) { 33204 subtype = subtypeEntry.name; 33205 } 33206 length1 = fontFile.dict.get("Length1"); 33207 length2 = fontFile.dict.get("Length2"); 33208 length3 = fontFile.dict.get("Length3"); 33209 } 33210 } else if (cssFontInfo) { 33211 const standardFontName = getXfaFontName(fontName.name); 33212 if (standardFontName) { 33213 cssFontInfo.fontFamily = `${cssFontInfo.fontFamily}-PdfJS-XFA`; 33214 cssFontInfo.metrics = standardFontName.metrics || null; 33215 glyphScaleFactors = standardFontName.factors || null; 33216 fontFile = await this.fetchStandardFontData(standardFontName.name); 33217 isInternalFont = !!fontFile; 33218 baseDict = dict = getXfaFontDict(fontName.name); 33219 composite = true; 33220 } 33221 } else if (!isType3Font) { 33222 const standardFontName = getStandardFontName(fontName.name); 33223 if (standardFontName) { 33224 fontFile = await this.fetchStandardFontData(standardFontName); 33225 isInternalFont = !!fontFile; 33226 } 33227 if (!isInternalFont && this.options.useSystemFonts) { 33228 systemFontInfo = getFontSubstitution(this.systemFontCache, this.idFactory, this.options.standardFontDataUrl, fontName.name, standardFontName, type); 33229 } 33230 } 33231 const fontMatrix = lookupMatrix(dict.getArray("FontMatrix"), FONT_IDENTITY_MATRIX); 33232 const bbox = lookupNormalRect(descriptor.getArray("FontBBox") || dict.getArray("FontBBox"), undefined); 33233 let ascent = descriptor.get("Ascent"); 33234 if (typeof ascent !== "number") { 33235 ascent = undefined; 33236 } 33237 let descent = descriptor.get("Descent"); 33238 if (typeof descent !== "number") { 33239 descent = undefined; 33240 } 33241 let xHeight = descriptor.get("XHeight"); 33242 if (typeof xHeight !== "number") { 33243 xHeight = 0; 33244 } 33245 let capHeight = descriptor.get("CapHeight"); 33246 if (typeof capHeight !== "number") { 33247 capHeight = 0; 33248 } 33249 let flags = descriptor.get("Flags"); 33250 if (!Number.isInteger(flags)) { 33251 flags = 0; 33252 } 33253 let italicAngle = descriptor.get("ItalicAngle"); 33254 if (typeof italicAngle !== "number") { 33255 italicAngle = 0; 33256 } 33257 const properties = { 33258 type, 33259 name: fontName.name, 33260 subtype, 33261 file: fontFile, 33262 length1, 33263 length2, 33264 length3, 33265 isInternalFont, 33266 loadedName: baseDict.loadedName, 33267 composite, 33268 fixedPitch: false, 33269 fontMatrix, 33270 firstChar, 33271 lastChar, 33272 toUnicode, 33273 bbox, 33274 ascent, 33275 descent, 33276 xHeight, 33277 capHeight, 33278 flags, 33279 italicAngle, 33280 isType3Font, 33281 cssFontInfo, 33282 scaleFactors: glyphScaleFactors, 33283 systemFontInfo 33284 }; 33285 if (composite) { 33286 const cidEncoding = baseDict.get("Encoding"); 33287 if (cidEncoding instanceof Name) { 33288 properties.cidEncoding = cidEncoding.name; 33289 } 33290 const cMap = await CMapFactory.create({ 33291 encoding: cidEncoding, 33292 fetchBuiltInCMap: this._fetchBuiltInCMapBound, 33293 useCMap: null 33294 }); 33295 properties.cMap = cMap; 33296 properties.vertical = properties.cMap.vertical; 33297 } 33298 const newProperties = await this.extractDataStructures(dict, properties); 33299 this.extractWidths(dict, descriptor, newProperties); 33300 return new Font(fontName.name, fontFile, newProperties); 33301 } 33302 static buildFontPaths(font, glyphs, handler, evaluatorOptions) { 33303 function buildPath(fontChar) { 33304 const glyphName = `${font.loadedName}_path_${fontChar}`; 33305 try { 33306 if (font.renderer.hasBuiltPath(fontChar)) { 33307 return; 33308 } 33309 handler.send("commonobj", [glyphName, "FontPath", font.renderer.getPathJs(fontChar)]); 33310 } catch (reason) { 33311 if (evaluatorOptions.ignoreErrors) { 33312 warn(`buildFontPaths - ignoring ${glyphName} glyph: "${reason}".`); 33313 return; 33314 } 33315 throw reason; 33316 } 33317 } 33318 for (const glyph of glyphs) { 33319 buildPath(glyph.fontChar); 33320 const accent = glyph.accent; 33321 if (accent?.fontChar) { 33322 buildPath(accent.fontChar); 33323 } 33324 } 33325 } 33326 static get fallbackFontDict() { 33327 const dict = new Dict(); 33328 dict.set("BaseFont", Name.get("Helvetica")); 33329 dict.set("Type", Name.get("FallbackType")); 33330 dict.set("Subtype", Name.get("FallbackType")); 33331 dict.set("Encoding", Name.get("WinAnsiEncoding")); 33332 return shadow(this, "fallbackFontDict", dict); 33333 } 33334} 33335class TranslatedFont { 33336 constructor({ 33337 loadedName, 33338 font, 33339 dict, 33340 evaluatorOptions 33341 }) { 33342 this.loadedName = loadedName; 33343 this.font = font; 33344 this.dict = dict; 33345 this._evaluatorOptions = evaluatorOptions || DefaultPartialEvaluatorOptions; 33346 this.type3Loaded = null; 33347 this.type3Dependencies = font.isType3Font ? new Set() : null; 33348 this.sent = false;
vendor: 4,870 bytes, lines 33349-33482
33349 } 33350 send(handler) { 33351 if (this.sent) { 33352 return; 33353 } 33354 this.sent = true; 33355 handler.send("commonobj", [this.loadedName, "Font", this.font.exportData(this._evaluatorOptions.fontExtraProperties)]); 33356 } 33357 fallback(handler) { 33358 if (!this.font.data) { 33359 return; 33360 } 33361 this.font.disableFontFace = true; 33362 PartialEvaluator.buildFontPaths(this.font, this.font.glyphCacheValues, handler, this._evaluatorOptions); 33363 } 33364 loadType3Data(evaluator, resources, task) { 33365 if (this.type3Loaded) { 33366 return this.type3Loaded; 33367 } 33368 if (!this.font.isType3Font) { 33369 throw new Error("Must be a Type3 font."); 33370 } 33371 const type3Evaluator = evaluator.clone({ 33372 ignoreErrors: false 33373 }); 33374 const type3FontRefs = new RefSet(evaluator.type3FontRefs); 33375 if (this.dict.objId && !type3FontRefs.has(this.dict.objId)) { 33376 type3FontRefs.put(this.dict.objId); 33377 } 33378 type3Evaluator.type3FontRefs = type3FontRefs; 33379 const translatedFont = this.font, 33380 type3Dependencies = this.type3Dependencies; 33381 let loadCharProcsPromise = Promise.resolve(); 33382 const charProcs = this.dict.get("CharProcs"); 33383 const fontResources = this.dict.get("Resources") || resources; 33384 const charProcOperatorList = Object.create(null); 33385 const fontBBox = Util.normalizeRect(translatedFont.bbox || [0, 0, 0, 0]), 33386 width = fontBBox[2] - fontBBox[0], 33387 height = fontBBox[3] - fontBBox[1]; 33388 const fontBBoxSize = Math.hypot(width, height); 33389 for (const key of charProcs.getKeys()) { 33390 loadCharProcsPromise = loadCharProcsPromise.then(() => { 33391 const glyphStream = charProcs.get(key); 33392 const operatorList = new OperatorList(); 33393 return type3Evaluator.getOperatorList({ 33394 stream: glyphStream, 33395 task, 33396 resources: fontResources, 33397 operatorList 33398 }).then(() => { 33399 if (operatorList.fnArray[0] === OPS.setCharWidthAndBounds) { 33400 this._removeType3ColorOperators(operatorList, fontBBoxSize); 33401 } 33402 charProcOperatorList[key] = operatorList.getIR(); 33403 for (const dependency of operatorList.dependencies) { 33404 type3Dependencies.add(dependency); 33405 } 33406 }).catch(function (reason) { 33407 warn(`Type3 font resource "${key}" is not available.`); 33408 const dummyOperatorList = new OperatorList(); 33409 charProcOperatorList[key] = dummyOperatorList.getIR(); 33410 }); 33411 }); 33412 } 33413 this.type3Loaded = loadCharProcsPromise.then(() => { 33414 translatedFont.charProcOperatorList = charProcOperatorList; 33415 if (this._bbox) { 33416 translatedFont.isCharBBox = true; 33417 translatedFont.bbox = this._bbox; 33418 } 33419 }); 33420 return this.type3Loaded; 33421 } 33422 _removeType3ColorOperators(operatorList, fontBBoxSize = NaN) { 33423 const charBBox = Util.normalizeRect(operatorList.argsArray[0].slice(2)), 33424 width = charBBox[2] - charBBox[0], 33425 height = charBBox[3] - charBBox[1]; 33426 const charBBoxSize = Math.hypot(width, height); 33427 if (width === 0 || height === 0) { 33428 operatorList.fnArray.splice(0, 1); 33429 operatorList.argsArray.splice(0, 1); 33430 } else if (fontBBoxSize === 0 || Math.round(charBBoxSize / fontBBoxSize) >= 10) { 33431 if (!this._bbox) { 33432 this._bbox = [Infinity, Infinity, -Infinity, -Infinity]; 33433 } 33434 this._bbox[0] = Math.min(this._bbox[0], charBBox[0]); 33435 this._bbox[1] = Math.min(this._bbox[1], charBBox[1]); 33436 this._bbox[2] = Math.max(this._bbox[2], charBBox[2]); 33437 this._bbox[3] = Math.max(this._bbox[3], charBBox[3]); 33438 } 33439 let i = 0, 33440 ii = operatorList.length; 33441 while (i < ii) { 33442 switch (operatorList.fnArray[i]) { 33443 case OPS.setCharWidthAndBounds: 33444 break; 33445 case OPS.setStrokeColorSpace: 33446 case OPS.setFillColorSpace: 33447 case OPS.setStrokeColor: 33448 case OPS.setStrokeColorN: 33449 case OPS.setFillColor: 33450 case OPS.setFillColorN: 33451 case OPS.setStrokeGray: 33452 case OPS.setFillGray: 33453 case OPS.setStrokeRGBColor: 33454 case OPS.setFillRGBColor: 33455 case OPS.setStrokeCMYKColor: 33456 case OPS.setFillCMYKColor: 33457 case OPS.shadingFill: 33458 case OPS.setRenderingIntent: 33459 operatorList.fnArray.splice(i, 1); 33460 operatorList.argsArray.splice(i, 1); 33461 ii--; 33462 continue; 33463 case OPS.setGState: 33464 const [gStateObj] = operatorList.argsArray[i]; 33465 let j = 0, 33466 jj = gStateObj.length; 33467 while (j < jj) { 33468 const [gStateKey] = gStateObj[j]; 33469 switch (gStateKey) { 33470 case "TR": 33471 case "TR2": 33472 case "HT": 33473 case "BG": 33474 case "BG2": 33475 case "UCR": 33476 case "UCR2": 33477 gStateObj.splice(j, 1); 33478 jj--; 33479 continue; 33480 } 33481 j++; 33482 }
vendor: 2,088 bytes, lines 33482-33570
33482 33483 break; 33484 } 33485 i++; 33486 } 33487 } 33488} 33489class StateManager { 33490 constructor(initialState = new EvalState()) { 33491 this.state = initialState; 33492 this.stateStack = []; 33493 } 33494 save() { 33495 const old = this.state; 33496 this.stateStack.push(this.state); 33497 this.state = old.clone(); 33498 } 33499 restore() { 33500 const prev = this.stateStack.pop(); 33501 if (prev) { 33502 this.state = prev; 33503 } 33504 } 33505 transform(args) { 33506 this.state.ctm = Util.transform(this.state.ctm, args); 33507 } 33508} 33509class TextState { 33510 constructor() { 33511 this.ctm = new Float32Array(IDENTITY_MATRIX); 33512 this.fontName = null; 33513 this.fontSize = 0; 33514 this.loadedName = null; 33515 this.font = null; 33516 this.fontMatrix = FONT_IDENTITY_MATRIX; 33517 this.textMatrix = IDENTITY_MATRIX.slice(); 33518 this.textLineMatrix = IDENTITY_MATRIX.slice(); 33519 this.charSpacing = 0; 33520 this.wordSpacing = 0; 33521 this.leading = 0; 33522 this.textHScale = 1; 33523 this.textRise = 0; 33524 } 33525 setTextMatrix(a, b, c, d, e, f) { 33526 const m = this.textMatrix; 33527 m[0] = a; 33528 m[1] = b; 33529 m[2] = c; 33530 m[3] = d; 33531 m[4] = e; 33532 m[5] = f; 33533 } 33534 setTextLineMatrix(a, b, c, d, e, f) { 33535 const m = this.textLineMatrix; 33536 m[0] = a; 33537 m[1] = b; 33538 m[2] = c; 33539 m[3] = d; 33540 m[4] = e; 33541 m[5] = f; 33542 } 33543 translateTextMatrix(x, y) { 33544 const m = this.textMatrix; 33545 m[4] = m[0] * x + m[2] * y + m[4]; 33546 m[5] = m[1] * x + m[3] * y + m[5]; 33547 } 33548 translateTextLineMatrix(x, y) { 33549 const m = this.textLineMatrix; 33550 m[4] = m[0] * x + m[2] * y + m[4]; 33551 m[5] = m[1] * x + m[3] * y + m[5]; 33552 } 33553 carriageReturn() { 33554 this.translateTextLineMatrix(0, -this.leading); 33555 this.textMatrix = this.textLineMatrix.slice(); 33556 } 33557 clone() { 33558 const clone = Object.create(this); 33559 clone.textMatrix = this.textMatrix.slice(); 33560 clone.textLineMatrix = this.textLineMatrix.slice(); 33561 clone.fontMatrix = this.fontMatrix.slice(); 33562 return clone; 33563 } 33564} 33565class EvalState { 33566 constructor() { 33567 this.ctm = new Float32Array(IDENTITY_MATRIX); 33568 this.font = null; 33569 this.textRenderingMode = TextRenderingMode.FILL; 33570 this._fillColorSpace =
vendor: 8,071 bytes, lines 33570-33970
33570ColorSpace.singletons.gray; 33571 this._strokeColorSpace = ColorSpace.singletons.gray; 33572 this.patternFillColorSpace = null; 33573 this.patternStrokeColorSpace = null; 33574 } 33575 get fillColorSpace() { 33576 return this._fillColorSpace; 33577 } 33578 set fillColorSpace(colorSpace) { 33579 this._fillColorSpace = this.patternFillColorSpace = colorSpace; 33580 } 33581 get strokeColorSpace() { 33582 return this._strokeColorSpace; 33583 } 33584 set strokeColorSpace(colorSpace) { 33585 this._strokeColorSpace = this.patternStrokeColorSpace = colorSpace; 33586 } 33587 clone() { 33588 return Object.create(this); 33589 } 33590} 33591class EvaluatorPreprocessor { 33592 static get opMap() { 33593 return shadow(this, "opMap", Object.assign(Object.create(null), { 33594 w: { 33595 id: OPS.setLineWidth, 33596 numArgs: 1, 33597 variableArgs: false 33598 }, 33599 J: { 33600 id: OPS.setLineCap, 33601 numArgs: 1, 33602 variableArgs: false 33603 }, 33604 j: { 33605 id: OPS.setLineJoin, 33606 numArgs: 1, 33607 variableArgs: false 33608 }, 33609 M: { 33610 id: OPS.setMiterLimit, 33611 numArgs: 1, 33612 variableArgs: false 33613 }, 33614 d: { 33615 id: OPS.setDash, 33616 numArgs: 2, 33617 variableArgs: false 33618 }, 33619 ri: { 33620 id: OPS.setRenderingIntent, 33621 numArgs: 1, 33622 variableArgs: false 33623 }, 33624 i: { 33625 id: OPS.setFlatness, 33626 numArgs: 1, 33627 variableArgs: false 33628 }, 33629 gs: { 33630 id: OPS.setGState, 33631 numArgs: 1, 33632 variableArgs: false 33633 }, 33634 q: { 33635 id: OPS.save, 33636 numArgs: 0, 33637 variableArgs: false 33638 }, 33639 Q: { 33640 id: OPS.restore, 33641 numArgs: 0, 33642 variableArgs: false 33643 }, 33644 cm: { 33645 id: OPS.transform, 33646 numArgs: 6, 33647 variableArgs: false 33648 }, 33649 m: { 33650 id: OPS.moveTo, 33651 numArgs: 2, 33652 variableArgs: false 33653 }, 33654 l: { 33655 id: OPS.lineTo, 33656 numArgs: 2, 33657 variableArgs: false 33658 }, 33659 c: { 33660 id: OPS.curveTo, 33661 numArgs: 6, 33662 variableArgs: false 33663 }, 33664 v: { 33665 id: OPS.curveTo2, 33666 numArgs: 4, 33667 variableArgs: false 33668 }, 33669 y: { 33670 id: OPS.curveTo3, 33671 numArgs: 4, 33672 variableArgs: false 33673 }, 33674 h: { 33675 id: OPS.closePath, 33676 numArgs: 0, 33677 variableArgs: false 33678 }, 33679 re: { 33680 id: OPS.rectangle, 33681 numArgs: 4, 33682 variableArgs: false 33683 }, 33684 S: { 33685 id: OPS.stroke, 33686 numArgs: 0, 33687 variableArgs: false 33688 }, 33689 s: { 33690 id: OPS.closeStroke, 33691 numArgs: 0, 33692 variableArgs: false 33693 }, 33694 f: { 33695 id: OPS.fill, 33696 numArgs: 0, 33697 variableArgs: false 33698 }, 33699 F: { 33700 id: OPS.fill, 33701 numArgs: 0, 33702 variableArgs: false 33703 }, 33704 "f*": { 33705 id: OPS.eoFill, 33706 numArgs: 0, 33707 variableArgs: false 33708 }, 33709 B: { 33710 id: OPS.fillStroke, 33711 numArgs: 0, 33712 variableArgs: false 33713 }, 33714 "B*": { 33715 id: OPS.eoFillStroke, 33716 numArgs: 0, 33717 variableArgs: false 33718 }, 33719 b: { 33720 id: OPS.closeFillStroke, 33721 numArgs: 0, 33722 variableArgs: false 33723 }, 33724 "b*": { 33725 id: OPS.closeEOFillStroke, 33726 numArgs: 0, 33727 variableArgs: false 33728 }, 33729 n: { 33730 id: OPS.endPath, 33731 numArgs: 0, 33732 variableArgs: false 33733 }, 33734 W: { 33735 id: OPS.clip, 33736 numArgs: 0, 33737 variableArgs: false 33738 }, 33739 "W*": { 33740 id: OPS.eoClip, 33741 numArgs: 0, 33742 variableArgs: false 33743 }, 33744 BT: { 33745 id: OPS.beginText, 33746 numArgs: 0, 33747 variableArgs: false 33748 }, 33749 ET: { 33750 id: OPS.endText, 33751 numArgs: 0, 33752 variableArgs: false 33753 }, 33754 Tc: { 33755 id: OPS.setCharSpacing, 33756 numArgs: 1, 33757 variableArgs: false 33758 }, 33759 Tw: { 33760 id: OPS.setWordSpacing, 33761 numArgs: 1, 33762 variableArgs: false 33763 }, 33764 Tz: { 33765 id: OPS.setHScale, 33766 numArgs: 1, 33767 variableArgs: false 33768 }, 33769 TL: { 33770 id: OPS.setLeading, 33771 numArgs: 1, 33772 variableArgs: false 33773 }, 33774 Tf: { 33775 id: OPS.setFont, 33776 numArgs: 2, 33777 variableArgs: false 33778 }, 33779 Tr: { 33780 id: OPS.setTextRenderingMode, 33781 numArgs: 1, 33782 variableArgs: false 33783 }, 33784 Ts: { 33785 id: OPS.setTextRise, 33786 numArgs: 1, 33787 variableArgs: false 33788 }, 33789 Td: { 33790 id: OPS.moveText, 33791 numArgs: 2, 33792 variableArgs: false 33793 }, 33794 TD: { 33795 id: OPS.setLeadingMoveText, 33796 numArgs: 2, 33797 variableArgs: false 33798 }, 33799 Tm: { 33800 id: OPS.setTextMatrix, 33801 numArgs: 6, 33802 variableArgs: false 33803 }, 33804 "T*": { 33805 id: OPS.nextLine, 33806 numArgs: 0, 33807 variableArgs: false 33808 }, 33809 Tj: { 33810 id: OPS.showText, 33811 numArgs: 1, 33812 variableArgs: false 33813 }, 33814 TJ: { 33815 id: OPS.showSpacedText, 33816 numArgs: 1, 33817 variableArgs: false 33818 }, 33819 "'": { 33820 id: OPS.nextLineShowText, 33821 numArgs: 1, 33822 variableArgs: false 33823 }, 33824 '"': { 33825 id: OPS.nextLineSetSpacingShowText, 33826 numArgs: 3, 33827 variableArgs: false 33828 }, 33829 d0: { 33830 id: OPS.setCharWidth, 33831 numArgs: 2, 33832 variableArgs: false 33833 }, 33834 d1: { 33835 id: OPS.setCharWidthAndBounds, 33836 numArgs: 6, 33837 variableArgs: false 33838 }, 33839 CS: { 33840 id: OPS.setStrokeColorSpace, 33841 numArgs: 1, 33842 variableArgs: false 33843 }, 33844 cs: { 33845 id: OPS.setFillColorSpace, 33846 numArgs: 1, 33847 variableArgs: false 33848 }, 33849 SC: { 33850 id: OPS.setStrokeColor, 33851 numArgs: 4, 33852 variableArgs: true 33853 }, 33854 SCN: { 33855 id: OPS.setStrokeColorN, 33856 numArgs: 33, 33857 variableArgs: true 33858 }, 33859 sc: { 33860 id: OPS.setFillColor, 33861 numArgs: 4, 33862 variableArgs: true 33863 }, 33864 scn: { 33865 id: OPS.setFillColorN, 33866 numArgs: 33, 33867 variableArgs: true 33868 }, 33869 G: { 33870 id: OPS.setStrokeGray, 33871 numArgs: 1, 33872 variableArgs: false 33873 }, 33874 g: { 33875 id: OPS.setFillGray, 33876 numArgs: 1, 33877 variableArgs: false 33878 }, 33879 RG: { 33880 id: OPS.setStrokeRGBColor, 33881 numArgs: 3, 33882 variableArgs: false 33883 }, 33884 rg: { 33885 id: OPS.setFillRGBColor, 33886 numArgs: 3, 33887 variableArgs: false 33888 }, 33889 K: { 33890 id: OPS.setStrokeCMYKColor, 33891 numArgs: 4, 33892 variableArgs: false 33893 }, 33894 k: { 33895 id: OPS.setFillCMYKColor, 33896 numArgs: 4, 33897 variableArgs: false 33898 }, 33899 sh: { 33900 id: OPS.shadingFill, 33901 numArgs: 1, 33902 variableArgs: false 33903 }, 33904 BI: { 33905 id: OPS.beginInlineImage, 33906 numArgs: 0, 33907 variableArgs: false 33908 }, 33909 ID: { 33910 id: OPS.beginImageData, 33911 numArgs: 0, 33912 variableArgs: false 33913 }, 33914 EI: { 33915 id: OPS.endInlineImage, 33916 numArgs: 1, 33917 variableArgs: false 33918 }, 33919 Do: { 33920 id: OPS.paintXObject, 33921 numArgs: 1, 33922 variableArgs: false 33923 }, 33924 MP: { 33925 id: OPS.markPoint, 33926 numArgs: 1, 33927 variableArgs: false 33928 }, 33929 DP: { 33930 id: OPS.markPointProps, 33931 numArgs: 2, 33932 variableArgs: false 33933 }, 33934 BMC: { 33935 id: OPS.beginMarkedContent, 33936 numArgs: 1, 33937 variableArgs: false 33938 }, 33939 BDC: { 33940 id: OPS.beginMarkedContentProps, 33941 numArgs: 2, 33942 variableArgs: false 33943 }, 33944 EMC: { 33945 id: OPS.endMarkedContent, 33946 numArgs: 0, 33947 variableArgs: false 33948 }, 33949 BX: { 33950 id: OPS.beginCompat, 33951 numArgs: 0, 33952 variableArgs: false 33953 }, 33954 EX: { 33955 id: OPS.endCompat, 33956 numArgs: 0, 33957 variableArgs: false 33958 }, 33959 BM: null, 33960 BD: null, 33961 true: null, 33962 fa: null, 33963 fal: null, 33964 fals: null, 33965 false: null, 33966 nu: null, 33967 nul: null, 33968 null: null 33969 })); 33970 }
vendor: 4,517 bytes, lines 33971-34131
33971 static MAX_INVALID_PATH_OPS = 10; 33972 constructor(stream, xref, stateManager = new StateManager()) { 33973 this.parser = new Parser({ 33974 lexer: new Lexer(stream, EvaluatorPreprocessor.opMap), 33975 xref 33976 }); 33977 this.stateManager = stateManager; 33978 this.nonProcessedArgs = []; 33979 this._isPathOp = false; 33980 this._numInvalidPathOPS = 0; 33981 } 33982 get savedStatesDepth() { 33983 return this.stateManager.stateStack.length; 33984 } 33985 read(operation) { 33986 let args = operation.args; 33987 while (true) { 33988 const obj = this.parser.getObj(); 33989 if (obj instanceof Cmd) { 33990 const cmd = obj.cmd; 33991 const opSpec = EvaluatorPreprocessor.opMap[cmd]; 33992 if (!opSpec) { 33993 warn(`Unknown command "${cmd}".`); 33994 continue; 33995 } 33996 const fn = opSpec.id; 33997 const numArgs = opSpec.numArgs; 33998 let argsLength = args !== null ? args.length : 0; 33999 if (!this._isPathOp) { 34000 this._numInvalidPathOPS = 0; 34001 } 34002 this._isPathOp = fn >= OPS.moveTo && fn <= OPS.endPath; 34003 if (!opSpec.variableArgs) { 34004 if (argsLength !== numArgs) { 34005 const nonProcessedArgs = this.nonProcessedArgs; 34006 while (argsLength > numArgs) { 34007 nonProcessedArgs.push(args.shift()); 34008 argsLength--; 34009 } 34010 while (argsLength < numArgs && nonProcessedArgs.length !== 0) { 34011 if (args === null) { 34012 args = []; 34013 } 34014 args.unshift(nonProcessedArgs.pop()); 34015 argsLength++; 34016 } 34017 } 34018 if (argsLength < numArgs) { 34019 const partialMsg = `command ${cmd}: expected ${numArgs} args, ` + `but received ${argsLength} args.`; 34020 if (this._isPathOp && ++this._numInvalidPathOPS > EvaluatorPreprocessor.MAX_INVALID_PATH_OPS) { 34021 throw new FormatError(`Invalid ${partialMsg}`); 34022 } 34023 warn(`Skipping ${partialMsg}`); 34024 if (args !== null) { 34025 args.length = 0; 34026 } 34027 continue; 34028 } 34029 } else if (argsLength > numArgs) { 34030 info(`Command ${cmd}: expected [0, ${numArgs}] args, ` + `but received ${argsLength} args.`); 34031 } 34032 this.preprocessCommand(fn, args); 34033 operation.fn = fn; 34034 operation.args = args; 34035 return true; 34036 } 34037 if (obj === EOF) { 34038 return false; 34039 } 34040 if (obj !== null) { 34041 if (args === null) { 34042 args = []; 34043 } 34044 args.push(obj); 34045 if (args.length > 33) { 34046 throw new FormatError("Too many arguments"); 34047 } 34048 } 34049 } 34050 } 34051 preprocessCommand(fn, args) { 34052 switch (fn | 0) { 34053 case OPS.save: 34054 this.stateManager.save(); 34055 break; 34056 case OPS.restore: 34057 this.stateManager.restore(); 34058 break; 34059 case OPS.transform: 34060 this.stateManager.transform(args); 34061 break; 34062 } 34063 } 34064} 34065 34066;// ./src/core/default_appearance.js 34067 34068 34069 34070 34071 34072 34073 34074 34075class DefaultAppearanceEvaluator extends EvaluatorPreprocessor { 34076 constructor(str) { 34077 super(new StringStream(str)); 34078 } 34079 parse() { 34080 const operation = { 34081 fn: 0, 34082 args: [] 34083 }; 34084 const result = { 34085 fontSize: 0, 34086 fontName: "", 34087 fontColor: new Uint8ClampedArray(3) 34088 }; 34089 try { 34090 while (true) { 34091 operation.args.length = 0; 34092 if (!this.read(operation)) { 34093 break; 34094 } 34095 if (this.savedStatesDepth !== 0) { 34096 continue; 34097 } 34098 const { 34099 fn, 34100 args 34101 } = operation; 34102 switch (fn | 0) { 34103 case OPS.setFont: 34104 const [fontName, fontSize] = args; 34105 if (fontName instanceof Name) { 34106 result.fontName = fontName.name; 34107 } 34108 if (typeof fontSize === "number" && fontSize > 0) { 34109 result.fontSize = fontSize; 34110 } 34111 break; 34112 case OPS.setFillRGBColor: 34113 ColorSpace.singletons.rgb.getRgbItem(args, 0, result.fontColor, 0); 34114 break; 34115 case OPS.setFillGray: 34116 ColorSpace.singletons.gray.getRgbItem(args, 0, result.fontColor, 0); 34117 break; 34118 case OPS.setFillCMYKColor: 34119 ColorSpace.singletons.cmyk.getRgbItem(args, 0, result.fontColor, 0); 34120 break; 34121 } 34122 } 34123 } catch (reason) { 34124 warn(`parseDefaultAppearance - ignoring errors: "${reason}".`); 34125 } 34126 return result; 34127 } 34128} 34129function parseDefaultAppearance(str) { 34130 return new DefaultAppearanceEvaluator(str).parse(); 34131}
vendor: 26,659 bytes, lines 34132-35021
34132class AppearanceStreamEvaluator extends EvaluatorPreprocessor { 34133 constructor(stream, evaluatorOptions, xref) { 34134 super(stream); 34135 this.stream = stream; 34136 this.evaluatorOptions = evaluatorOptions; 34137 this.xref = xref; 34138 this.resources = stream.dict?.get("Resources"); 34139 } 34140 parse() { 34141 const operation = { 34142 fn: 0, 34143 args: [] 34144 }; 34145 let result = { 34146 scaleFactor: 1, 34147 fontSize: 0, 34148 fontName: "", 34149 fontColor: new Uint8ClampedArray(3), 34150 fillColorSpace: ColorSpace.singletons.gray 34151 }; 34152 let breakLoop = false; 34153 const stack = []; 34154 try { 34155 while (true) { 34156 operation.args.length = 0; 34157 if (breakLoop || !this.read(operation)) { 34158 break; 34159 } 34160 const { 34161 fn, 34162 args 34163 } = operation; 34164 switch (fn | 0) { 34165 case OPS.save: 34166 stack.push({ 34167 scaleFactor: result.scaleFactor, 34168 fontSize: result.fontSize, 34169 fontName: result.fontName, 34170 fontColor: result.fontColor.slice(), 34171 fillColorSpace: result.fillColorSpace 34172 }); 34173 break; 34174 case OPS.restore: 34175 result = stack.pop() || result; 34176 break; 34177 case OPS.setTextMatrix: 34178 result.scaleFactor *= Math.hypot(args[0], args[1]); 34179 break; 34180 case OPS.setFont: 34181 const [fontName, fontSize] = args; 34182 if (fontName instanceof Name) { 34183 result.fontName = fontName.name; 34184 } 34185 if (typeof fontSize === "number" && fontSize > 0) { 34186 result.fontSize = fontSize * result.scaleFactor; 34187 } 34188 break; 34189 case OPS.setFillColorSpace: 34190 result.fillColorSpace = ColorSpace.parse({ 34191 cs: args[0], 34192 xref: this.xref, 34193 resources: this.resources, 34194 pdfFunctionFactory: this._pdfFunctionFactory, 34195 localColorSpaceCache: this._localColorSpaceCache 34196 }); 34197 break; 34198 case OPS.setFillColor: 34199 const cs = result.fillColorSpace; 34200 cs.getRgbItem(args, 0, result.fontColor, 0); 34201 break; 34202 case OPS.setFillRGBColor: 34203 ColorSpace.singletons.rgb.getRgbItem(args, 0, result.fontColor, 0); 34204 break; 34205 case OPS.setFillGray: 34206 ColorSpace.singletons.gray.getRgbItem(args, 0, result.fontColor, 0); 34207 break; 34208 case OPS.setFillCMYKColor: 34209 ColorSpace.singletons.cmyk.getRgbItem(args, 0, result.fontColor, 0); 34210 break; 34211 case OPS.showText: 34212 case OPS.showSpacedText: 34213 case OPS.nextLineShowText: 34214 case OPS.nextLineSetSpacingShowText: 34215 breakLoop = true; 34216 break; 34217 } 34218 } 34219 } catch (reason) { 34220 warn(`parseAppearanceStream - ignoring errors: "${reason}".`); 34221 } 34222 this.stream.reset(); 34223 delete result.scaleFactor; 34224 delete result.fillColorSpace; 34225 return result; 34226 } 34227 get _localColorSpaceCache() { 34228 return shadow(this, "_localColorSpaceCache", new LocalColorSpaceCache()); 34229 } 34230 get _pdfFunctionFactory() { 34231 const pdfFunctionFactory = new PDFFunctionFactory({ 34232 xref: this.xref, 34233 isEvalSupported: this.evaluatorOptions.isEvalSupported 34234 }); 34235 return shadow(this, "_pdfFunctionFactory", pdfFunctionFactory); 34236 } 34237} 34238function parseAppearanceStream(stream, evaluatorOptions, xref) { 34239 return new AppearanceStreamEvaluator(stream, evaluatorOptions, xref).parse(); 34240} 34241function getPdfColor(color, isFill) { 34242 if (color[0] === color[1] && color[1] === color[2]) { 34243 const gray = color[0] / 255; 34244 return `${numberToString(gray)} ${isFill ? "g" : "G"}`; 34245 } 34246 return Array.from(color, c => numberToString(c / 255)).join(" ") + ` ${isFill ? "rg" : "RG"}`; 34247} 34248function createDefaultAppearance({ 34249 fontSize, 34250 fontName, 34251 fontColor 34252}) { 34253 return `/${escapePDFName(fontName)} ${fontSize} Tf ${getPdfColor(fontColor, true)}`; 34254} 34255class FakeUnicodeFont { 34256 constructor(xref, fontFamily) { 34257 this.xref = xref; 34258 this.widths = null; 34259 this.firstChar = Infinity; 34260 this.lastChar = -Infinity; 34261 this.fontFamily = fontFamily; 34262 const canvas = new OffscreenCanvas(1, 1); 34263 this.ctxMeasure = canvas.getContext("2d", { 34264 willReadFrequently: true 34265 }); 34266 if (!FakeUnicodeFont._fontNameId) { 34267 FakeUnicodeFont._fontNameId = 1; 34268 } 34269 this.fontName = Name.get(`InvalidPDFjsFont_${fontFamily}_${FakeUnicodeFont._fontNameId++}`); 34270 } 34271 get fontDescriptorRef() { 34272 if (!FakeUnicodeFont._fontDescriptorRef) { 34273 const fontDescriptor = new Dict(this.xref); 34274 fontDescriptor.set("Type", Name.get("FontDescriptor")); 34275 fontDescriptor.set("FontName", this.fontName); 34276 fontDescriptor.set("FontFamily", "MyriadPro Regular"); 34277 fontDescriptor.set("FontBBox", [0, 0, 0, 0]); 34278 fontDescriptor.set("FontStretch", Name.get("Normal")); 34279 fontDescriptor.set("FontWeight", 400); 34280 fontDescriptor.set("ItalicAngle", 0); 34281 FakeUnicodeFont._fontDescriptorRef = this.xref.getNewPersistentRef(fontDescriptor); 34282 } 34283 return FakeUnicodeFont._fontDescriptorRef; 34284 } 34285 get descendantFontRef() { 34286 const descendantFont = new Dict(this.xref); 34287 descendantFont.set("BaseFont", this.fontName); 34288 descendantFont.set("Type", Name.get("Font")); 34289 descendantFont.set("Subtype", Name.get("CIDFontType0")); 34290 descendantFont.set("CIDToGIDMap", Name.get("Identity")); 34291 descendantFont.set("FirstChar", this.firstChar); 34292 descendantFont.set("LastChar", this.lastChar); 34293 descendantFont.set("FontDescriptor", this.fontDescriptorRef); 34294 descendantFont.set("DW", 1000); 34295 const widths = []; 34296 const chars = [...this.widths.entries()].sort(); 34297 let currentChar = null; 34298 let currentWidths = null; 34299 for (const [char, width] of chars) { 34300 if (!currentChar) { 34301 currentChar = char; 34302 currentWidths = [width]; 34303 continue; 34304 } 34305 if (char === currentChar + currentWidths.length) { 34306 currentWidths.push(width); 34307 } else { 34308 widths.push(currentChar, currentWidths); 34309 currentChar = char; 34310 currentWidths = [width]; 34311 } 34312 } 34313 if (currentChar) { 34314 widths.push(currentChar, currentWidths); 34315 } 34316 descendantFont.set("W", widths); 34317 const cidSystemInfo = new Dict(this.xref); 34318 cidSystemInfo.set("Ordering", "Identity"); 34319 cidSystemInfo.set("Registry", "Adobe"); 34320 cidSystemInfo.set("Supplement", 0); 34321 descendantFont.set("CIDSystemInfo", cidSystemInfo); 34322 return this.xref.getNewPersistentRef(descendantFont); 34323 } 34324 get baseFontRef() { 34325 const baseFont = new Dict(this.xref); 34326 baseFont.set("BaseFont", this.fontName); 34327 baseFont.set("Type", Name.get("Font")); 34328 baseFont.set("Subtype", Name.get("Type0")); 34329 baseFont.set("Encoding", Name.get("Identity-H")); 34330 baseFont.set("DescendantFonts", [this.descendantFontRef]); 34331 baseFont.set("ToUnicode", Name.get("Identity-H")); 34332 return this.xref.getNewPersistentRef(baseFont); 34333 } 34334 get resources() { 34335 const resources = new Dict(this.xref); 34336 const font = new Dict(this.xref); 34337 font.set(this.fontName.name, this.baseFontRef); 34338 resources.set("Font", font); 34339 return resources; 34340 } 34341 _createContext() { 34342 this.widths = new Map(); 34343 this.ctxMeasure.font = `1000px ${this.fontFamily}`; 34344 return this.ctxMeasure; 34345 } 34346 createFontResources(text) { 34347 const ctx = this._createContext(); 34348 for (const line of text.split(/\r\n?|\n/)) { 34349 for (const char of line.split("")) { 34350 const code = char.charCodeAt(0); 34351 if (this.widths.has(code)) { 34352 continue; 34353 } 34354 const metrics = ctx.measureText(char); 34355 const width = Math.ceil(metrics.width); 34356 this.widths.set(code, width); 34357 this.firstChar = Math.min(code, this.firstChar); 34358 this.lastChar = Math.max(code, this.lastChar); 34359 } 34360 } 34361 return this.resources; 34362 } 34363 static getFirstPositionInfo(rect, rotation, fontSize) { 34364 const [x1, y1, x2, y2] = rect; 34365 let w = x2 - x1; 34366 let h = y2 - y1; 34367 if (rotation % 180 !== 0) { 34368 [w, h] = [h, w]; 34369 } 34370 const lineHeight = LINE_FACTOR * fontSize; 34371 const lineDescent = LINE_DESCENT_FACTOR * fontSize; 34372 return { 34373 coords: [0, h + lineDescent - lineHeight], 34374 bbox: [0, 0, w, h], 34375 matrix: rotation !== 0 ? getRotationMatrix(rotation, h, lineHeight) : undefined 34376 }; 34377 } 34378 createAppearance(text, rect, rotation, fontSize, bgColor, strokeAlpha) { 34379 const ctx = this._createContext(); 34380 const lines = []; 34381 let maxWidth = -Infinity; 34382 for (const line of text.split(/\r\n?|\n/)) { 34383 lines.push(line); 34384 const lineWidth = ctx.measureText(line).width; 34385 maxWidth = Math.max(maxWidth, lineWidth); 34386 for (const code of codePointIter(line)) { 34387 const char = String.fromCodePoint(code); 34388 let width = this.widths.get(code); 34389 if (width === undefined) { 34390 const metrics = ctx.measureText(char); 34391 width = Math.ceil(metrics.width); 34392 this.widths.set(code, width); 34393 this.firstChar = Math.min(code, this.firstChar); 34394 this.lastChar = Math.max(code, this.lastChar); 34395 } 34396 } 34397 } 34398 maxWidth *= fontSize / 1000; 34399 const [x1, y1, x2, y2] = rect; 34400 let w = x2 - x1; 34401 let h = y2 - y1; 34402 if (rotation % 180 !== 0) { 34403 [w, h] = [h, w]; 34404 } 34405 let hscale = 1; 34406 if (maxWidth > w) { 34407 hscale = w / maxWidth; 34408 } 34409 let vscale = 1; 34410 const lineHeight = LINE_FACTOR * fontSize; 34411 const lineDescent = LINE_DESCENT_FACTOR * fontSize; 34412 const maxHeight = lineHeight * lines.length; 34413 if (maxHeight > h) { 34414 vscale = h / maxHeight; 34415 } 34416 const fscale = Math.min(hscale, vscale); 34417 const newFontSize = fontSize * fscale; 34418 const buffer = ["q", `0 0 ${numberToString(w)} ${numberToString(h)} re W n`, `BT`, `1 0 0 1 0 ${numberToString(h + lineDescent)} Tm 0 Tc ${getPdfColor(bgColor, true)}`, `/${this.fontName.name} ${numberToString(newFontSize)} Tf`]; 34419 const { 34420 resources 34421 } = this; 34422 strokeAlpha = typeof strokeAlpha === "number" && strokeAlpha >= 0 && strokeAlpha <= 1 ? strokeAlpha : 1; 34423 if (strokeAlpha !== 1) { 34424 buffer.push("/R0 gs"); 34425 const extGState = new Dict(this.xref); 34426 const r0 = new Dict(this.xref); 34427 r0.set("ca", strokeAlpha); 34428 r0.set("CA", strokeAlpha); 34429 r0.set("Type", Name.get("ExtGState")); 34430 extGState.set("R0", r0); 34431 resources.set("ExtGState", extGState); 34432 } 34433 const vShift = numberToString(lineHeight); 34434 for (const line of lines) { 34435 buffer.push(`0 -${vShift} Td <${stringToUTF16HexString(line)}> Tj`); 34436 } 34437 buffer.push("ET", "Q"); 34438 const appearance = buffer.join("\n"); 34439 const appearanceStreamDict = new Dict(this.xref); 34440 appearanceStreamDict.set("Subtype", Name.get("Form")); 34441 appearanceStreamDict.set("Type", Name.get("XObject")); 34442 appearanceStreamDict.set("BBox", [0, 0, w, h]); 34443 appearanceStreamDict.set("Length", appearance.length); 34444 appearanceStreamDict.set("Resources", resources); 34445 if (rotation) { 34446 const matrix = getRotationMatrix(rotation, w, h); 34447 appearanceStreamDict.set("Matrix", matrix); 34448 } 34449 const ap = new StringStream(appearance); 34450 ap.dict = appearanceStreamDict; 34451 return ap; 34452 } 34453} 34454 34455;// ./src/core/name_number_tree.js 34456 34457 34458class NameOrNumberTree { 34459 constructor(root, xref, type) { 34460 this.root = root; 34461 this.xref = xref; 34462 this._type = type; 34463 } 34464 getAll() { 34465 const map = new Map(); 34466 if (!this.root) { 34467 return map; 34468 } 34469 const xref = this.xref; 34470 const processed = new RefSet(); 34471 processed.put(this.root); 34472 const queue = [this.root]; 34473 while (queue.length > 0) { 34474 const obj = xref.fetchIfRef(queue.shift()); 34475 if (!(obj instanceof Dict)) { 34476 continue; 34477 } 34478 if (obj.has("Kids")) { 34479 const kids = obj.get("Kids"); 34480 if (!Array.isArray(kids)) { 34481 continue; 34482 } 34483 for (const kid of kids) { 34484 if (processed.has(kid)) { 34485 throw new FormatError(`Duplicate entry in "${this._type}" tree.`); 34486 } 34487 queue.push(kid); 34488 processed.put(kid); 34489 } 34490 continue; 34491 } 34492 const entries = obj.get(this._type); 34493 if (!Array.isArray(entries)) { 34494 continue; 34495 } 34496 for (let i = 0, ii = entries.length; i < ii; i += 2) { 34497 map.set(xref.fetchIfRef(entries[i]), xref.fetchIfRef(entries[i + 1])); 34498 } 34499 } 34500 return map; 34501 } 34502 getRaw(key) { 34503 if (!this.root) { 34504 return null; 34505 } 34506 const xref = this.xref; 34507 let kidsOrEntries = xref.fetchIfRef(this.root); 34508 let loopCount = 0; 34509 const MAX_LEVELS = 10; 34510 while (kidsOrEntries.has("Kids")) { 34511 if (++loopCount > MAX_LEVELS) { 34512 warn(`Search depth limit reached for "${this._type}" tree.`); 34513 return null; 34514 } 34515 const kids = kidsOrEntries.get("Kids"); 34516 if (!Array.isArray(kids)) { 34517 return null; 34518 } 34519 let l = 0, 34520 r = kids.length - 1; 34521 while (l <= r) { 34522 const m = l + r >> 1; 34523 const kid = xref.fetchIfRef(kids[m]); 34524 const limits = kid.get("Limits"); 34525 if (key < xref.fetchIfRef(limits[0])) { 34526 r = m - 1; 34527 } else if (key > xref.fetchIfRef(limits[1])) { 34528 l = m + 1; 34529 } else { 34530 kidsOrEntries = kid; 34531 break; 34532 } 34533 } 34534 if (l > r) { 34535 return null; 34536 } 34537 } 34538 const entries = kidsOrEntries.get(this._type); 34539 if (Array.isArray(entries)) { 34540 let l = 0, 34541 r = entries.length - 2; 34542 while (l <= r) { 34543 const tmp = l + r >> 1, 34544 m = tmp + (tmp & 1); 34545 const currentKey = xref.fetchIfRef(entries[m]); 34546 if (key < currentKey) { 34547 r = m - 2; 34548 } else if (key > currentKey) { 34549 l = m + 2; 34550 } else { 34551 return entries[m + 1]; 34552 } 34553 } 34554 } 34555 return null; 34556 } 34557 get(key) { 34558 return this.xref.fetchIfRef(this.getRaw(key)); 34559 } 34560} 34561class NameTree extends NameOrNumberTree { 34562 constructor(root, xref) { 34563 super(root, xref, "Names"); 34564 } 34565} 34566class NumberTree extends NameOrNumberTree { 34567 constructor(root, xref) { 34568 super(root, xref, "Nums"); 34569 } 34570} 34571 34572;// ./src/core/cleanup_helper.js 34573 34574 34575 34576 34577function clearGlobalCaches() { 34578 clearPatternCaches(); 34579 clearPrimitiveCaches(); 34580 clearUnicodeCaches(); 34581 JpxImage.cleanup(); 34582} 34583 34584;// ./src/core/file_spec.js 34585 34586 34587 34588function pickPlatformItem(dict) { 34589 if (!(dict instanceof Dict)) { 34590 return null; 34591 } 34592 if (dict.has("UF")) { 34593 return dict.get("UF"); 34594 } else if (dict.has("F")) { 34595 return dict.get("F"); 34596 } else if (dict.has("Unix")) { 34597 return dict.get("Unix"); 34598 } else if (dict.has("Mac")) { 34599 return dict.get("Mac"); 34600 } else if (dict.has("DOS")) { 34601 return dict.get("DOS"); 34602 } 34603 return null; 34604} 34605function stripPath(str) { 34606 return str.substring(str.lastIndexOf("/") + 1); 34607} 34608class FileSpec { 34609 #contentAvailable = false; 34610 constructor(root, xref, skipContent = false) { 34611 if (!(root instanceof Dict)) { 34612 return; 34613 } 34614 this.xref = xref; 34615 this.root = root; 34616 if (root.has("FS")) { 34617 this.fs = root.get("FS"); 34618 } 34619 if (root.has("RF")) { 34620 warn("Related file specifications are not supported"); 34621 } 34622 if (!skipContent) { 34623 if (root.has("EF")) { 34624 this.#contentAvailable = true; 34625 } else { 34626 warn("Non-embedded file specifications are not supported"); 34627 } 34628 } 34629 } 34630 get filename() { 34631 let filename = ""; 34632 const item = pickPlatformItem(this.root); 34633 if (item && typeof item === "string") { 34634 filename = stringToPDFString(item).replaceAll("\\\\", "\\").replaceAll("\\/", "/").replaceAll("\\", "/"); 34635 } 34636 return shadow(this, "filename", filename || "unnamed"); 34637 } 34638 get content() { 34639 if (!this.#contentAvailable) { 34640 return null; 34641 } 34642 this._contentRef ||= pickPlatformItem(this.root?.get("EF")); 34643 let content = null; 34644 if (this._contentRef) { 34645 const fileObj = this.xref.fetchIfRef(this._contentRef); 34646 if (fileObj instanceof BaseStream) { 34647 content = fileObj.getBytes(); 34648 } else { 34649 warn("Embedded file specification points to non-existing/invalid content"); 34650 } 34651 } else { 34652 warn("Embedded file specification does not have any content"); 34653 } 34654 return content; 34655 } 34656 get description() { 34657 let description = ""; 34658 const desc = this.root?.get("Desc"); 34659 if (desc && typeof desc === "string") { 34660 description = stringToPDFString(desc); 34661 } 34662 return shadow(this, "description", description); 34663 } 34664 get serializable() { 34665 return { 34666 rawFilename: this.filename, 34667 filename: stripPath(this.filename), 34668 content: this.content, 34669 description: this.description 34670 }; 34671 } 34672} 34673 34674;// ./src/core/xml_parser.js 34675 34676const XMLParserErrorCode = { 34677 NoError: 0, 34678 EndOfDocument: -1, 34679 UnterminatedCdat: -2, 34680 UnterminatedXmlDeclaration: -3, 34681 UnterminatedDoctypeDeclaration: -4, 34682 UnterminatedComment: -5, 34683 MalformedElement: -6, 34684 OutOfMemory: -7, 34685 UnterminatedAttributeValue: -8, 34686 UnterminatedElement: -9, 34687 ElementNeverBegun: -10 34688}; 34689function isWhitespace(s, index) { 34690 const ch = s[index]; 34691 return ch === " " || ch === "\n" || ch === "\r" || ch === "\t"; 34692} 34693function isWhitespaceString(s) { 34694 for (let i = 0, ii = s.length; i < ii; i++) { 34695 if (!isWhitespace(s, i)) { 34696 return false; 34697 } 34698 } 34699 return true; 34700} 34701class XMLParserBase { 34702 _resolveEntities(s) { 34703 return s.replaceAll(/&([^;]+);/g, (all, entity) => { 34704 if (entity.substring(0, 2) === "#x") { 34705 return String.fromCodePoint(parseInt(entity.substring(2), 16)); 34706 } else if (entity.substring(0, 1) === "#") { 34707 return String.fromCodePoint(parseInt(entity.substring(1), 10)); 34708 } 34709 switch (entity) { 34710 case "lt": 34711 return "<"; 34712 case "gt": 34713 return ">"; 34714 case "amp": 34715 return "&"; 34716 case "quot": 34717 return '"'; 34718 case "apos": 34719 return "'"; 34720 } 34721 return this.onResolveEntity(entity); 34722 }); 34723 } 34724 _parseContent(s, start) { 34725 const attributes = []; 34726 let pos = start; 34727 function skipWs() { 34728 while (pos < s.length && isWhitespace(s, pos)) { 34729 ++pos; 34730 } 34731 } 34732 while (pos < s.length && !isWhitespace(s, pos) && s[pos] !== ">" && s[pos] !== "/") { 34733 ++pos; 34734 } 34735 const name = s.substring(start, pos); 34736 skipWs(); 34737 while (pos < s.length && s[pos] !== ">" && s[pos] !== "/" && s[pos] !== "?") { 34738 skipWs(); 34739 let attrName = "", 34740 attrValue = ""; 34741 while (pos < s.length && !isWhitespace(s, pos) && s[pos] !== "=") { 34742 attrName += s[pos]; 34743 ++pos; 34744 } 34745 skipWs(); 34746 if (s[pos] !== "=") { 34747 return null; 34748 } 34749 ++pos; 34750 skipWs(); 34751 const attrEndChar = s[pos]; 34752 if (attrEndChar !== '"' && attrEndChar !== "'") { 34753 return null; 34754 } 34755 const attrEndIndex = s.indexOf(attrEndChar, ++pos); 34756 if (attrEndIndex < 0) { 34757 return null; 34758 } 34759 attrValue = s.substring(pos, attrEndIndex); 34760 attributes.push({ 34761 name: attrName, 34762 value: this._resolveEntities(attrValue) 34763 }); 34764 pos = attrEndIndex + 1; 34765 skipWs(); 34766 } 34767 return { 34768 name, 34769 attributes, 34770 parsed: pos - start 34771 }; 34772 } 34773 _parseProcessingInstruction(s, start) { 34774 let pos = start; 34775 function skipWs() { 34776 while (pos < s.length && isWhitespace(s, pos)) { 34777 ++pos; 34778 } 34779 } 34780 while (pos < s.length && !isWhitespace(s, pos) && s[pos] !== ">" && s[pos] !== "?" && s[pos] !== "/") { 34781 ++pos; 34782 } 34783 const name = s.substring(start, pos); 34784 skipWs(); 34785 const attrStart = pos; 34786 while (pos < s.length && (s[pos] !== "?" || s[pos + 1] !== ">")) { 34787 ++pos; 34788 } 34789 const value = s.substring(attrStart, pos); 34790 return { 34791 name, 34792 value, 34793 parsed: pos - start 34794 }; 34795 } 34796 parseXml(s) { 34797 let i = 0; 34798 while (i < s.length) { 34799 const ch = s[i]; 34800 let j = i; 34801 if (ch === "<") { 34802 ++j; 34803 const ch2 = s[j]; 34804 let q; 34805 switch (ch2) { 34806 case "/": 34807 ++j; 34808 q = s.indexOf(">", j); 34809 if (q < 0) { 34810 this.onError(XMLParserErrorCode.UnterminatedElement); 34811 return; 34812 } 34813 this.onEndElement(s.substring(j, q)); 34814 j = q + 1; 34815 break; 34816 case "?": 34817 ++j; 34818 const pi = this._parseProcessingInstruction(s, j); 34819 if (s.substring(j + pi.parsed, j + pi.parsed + 2) !== "?>") { 34820 this.onError(XMLParserErrorCode.UnterminatedXmlDeclaration); 34821 return; 34822 } 34823 this.onPi(pi.name, pi.value); 34824 j += pi.parsed + 2; 34825 break; 34826 case "!": 34827 if (s.substring(j + 1, j + 3) === "--") { 34828 q = s.indexOf("-->", j + 3); 34829 if (q < 0) { 34830 this.onError(XMLParserErrorCode.UnterminatedComment); 34831 return; 34832 } 34833 this.onComment(s.substring(j + 3, q)); 34834 j = q + 3; 34835 } else if (s.substring(j + 1, j + 8) === "[CDATA[") { 34836 q = s.indexOf("]]>", j + 8); 34837 if (q < 0) { 34838 this.onError(XMLParserErrorCode.UnterminatedCdat); 34839 return; 34840 } 34841 this.onCdata(s.substring(j + 8, q)); 34842 j = q + 3; 34843 } else if (s.substring(j + 1, j + 8) === "DOCTYPE") { 34844 const q2 = s.indexOf("[", j + 8); 34845 let complexDoctype = false; 34846 q = s.indexOf(">", j + 8); 34847 if (q < 0) { 34848 this.onError(XMLParserErrorCode.UnterminatedDoctypeDeclaration); 34849 return; 34850 } 34851 if (q2 > 0 && q > q2) { 34852 q = s.indexOf("]>", j + 8); 34853 if (q < 0) { 34854 this.onError(XMLParserErrorCode.UnterminatedDoctypeDeclaration); 34855 return; 34856 } 34857 complexDoctype = true; 34858 } 34859 const doctypeContent = s.substring(j + 8, q + (complexDoctype ? 1 : 0)); 34860 this.onDoctype(doctypeContent); 34861 j = q + (complexDoctype ? 2 : 1); 34862 } else { 34863 this.onError(XMLParserErrorCode.MalformedElement); 34864 return; 34865 } 34866 break; 34867 default: 34868 const content = this._parseContent(s, j); 34869 if (content === null) { 34870 this.onError(XMLParserErrorCode.MalformedElement); 34871 return; 34872 } 34873 let isClosed = false; 34874 if (s.substring(j + content.parsed, j + content.parsed + 2) === "/>") { 34875 isClosed = true; 34876 } else if (s.substring(j + content.parsed, j + content.parsed + 1) !== ">") { 34877 this.onError(XMLParserErrorCode.UnterminatedElement); 34878 return; 34879 } 34880 this.onBeginElement(content.name, content.attributes, isClosed); 34881 j += content.parsed + (isClosed ? 2 : 1); 34882 break; 34883 } 34884 } else { 34885 while (j < s.length && s[j] !== "<") { 34886 j++; 34887 } 34888 const text = s.substring(i, j); 34889 this.onText(this._resolveEntities(text)); 34890 } 34891 i = j; 34892 } 34893 } 34894 onResolveEntity(name) { 34895 return `&${name};`; 34896 } 34897 onPi(name, value) {} 34898 onComment(text) {} 34899 onCdata(text) {} 34900 onDoctype(doctypeContent) {} 34901 onText(text) {} 34902 onBeginElement(name, attributes, isEmpty) {} 34903 onEndElement(name) {} 34904 onError(code) {} 34905} 34906class SimpleDOMNode { 34907 constructor(nodeName, nodeValue) { 34908 this.nodeName = nodeName; 34909 this.nodeValue = nodeValue; 34910 Object.defineProperty(this, "parentNode", { 34911 value: null, 34912 writable: true 34913 }); 34914 } 34915 get firstChild() { 34916 return this.childNodes?.[0]; 34917 } 34918 get nextSibling() { 34919 const childNodes = this.parentNode.childNodes; 34920 if (!childNodes) { 34921 return undefined; 34922 } 34923 const index = childNodes.indexOf(this); 34924 if (index === -1) { 34925 return undefined; 34926 } 34927 return childNodes[index + 1]; 34928 } 34929 get textContent() { 34930 if (!this.childNodes) { 34931 return this.nodeValue || ""; 34932 } 34933 return this.childNodes.map(function (child) { 34934 return child.textContent; 34935 }).join(""); 34936 } 34937 get children() { 34938 return this.childNodes || []; 34939 } 34940 hasChildNodes() { 34941 return this.childNodes?.length > 0; 34942 } 34943 searchNode(paths, pos) { 34944 if (pos >= paths.length) { 34945 return this; 34946 } 34947 const component = paths[pos]; 34948 if (component.name.startsWith("#") && pos < paths.length - 1) { 34949 return this.searchNode(paths, pos + 1); 34950 } 34951 const stack = []; 34952 let node = this; 34953 while (true) { 34954 if (component.name === node.nodeName) { 34955 if (component.pos === 0) { 34956 const res = node.searchNode(paths, pos + 1); 34957 if (res !== null) { 34958 return res; 34959 } 34960 } else if (stack.length === 0) { 34961 return null; 34962 } else { 34963 const [parent] = stack.pop(); 34964 let siblingPos = 0; 34965 for (const child of parent.childNodes) { 34966 if (component.name === child.nodeName) { 34967 if (siblingPos === component.pos) { 34968 return child.searchNode(paths, pos + 1); 34969 } 34970 siblingPos++; 34971 } 34972 } 34973 return node.searchNode(paths, pos + 1); 34974 } 34975 } 34976 if (node.childNodes?.length > 0) { 34977 stack.push([node, 0]); 34978 node = node.childNodes[0]; 34979 } else if (stack.length === 0) { 34980 return null; 34981 } else { 34982 while (stack.length !== 0) { 34983 const [parent, currentPos] = stack.pop(); 34984 const newPos = currentPos + 1; 34985 if (newPos < parent.childNodes.length) { 34986 stack.push([parent, newPos]); 34987 node = parent.childNodes[newPos]; 34988 break; 34989 } 34990 } 34991 if (stack.length === 0) { 34992 return null; 34993 } 34994 } 34995 } 34996 } 34997 dump(buffer) { 34998 if (this.nodeName === "#text") { 34999 buffer.push(encodeToXmlString(this.nodeValue)); 35000 return; 35001 } 35002 buffer.push(`<${this.nodeName}`); 35003 if (this.attributes) { 35004 for (const attribute of this.attributes) { 35005 buffer.push(` ${attribute.name}="${encodeToXmlString(attribute.value)}"`); 35006 } 35007 } 35008 if (this.hasChildNodes()) { 35009 buffer.push(">"); 35010 for (const child of this.childNodes) { 35011 child.dump(buffer); 35012 } 35013 buffer.push(`</${this.nodeName}>`); 35014 } else if (this.nodeValue) { 35015 buffer.push(`>${encodeToXmlString(this.nodeValue)}</${this.nodeName}>`); 35016 } else { 35017 buffer.push("/>"); 35018 } 35019 } 35020} 35021class SimpleXMLParser extends XMLParserBase {
vendor: 4,951 bytes, lines 35022-35200
35022 constructor({ 35023 hasAttributes = false, 35024 lowerCaseName = false 35025 }) { 35026 super(); 35027 this._currentFragment = null; 35028 this._stack = null; 35029 this._errorCode = XMLParserErrorCode.NoError; 35030 this._hasAttributes = hasAttributes; 35031 this._lowerCaseName = lowerCaseName; 35032 } 35033 parseFromString(data) { 35034 this._currentFragment = []; 35035 this._stack = []; 35036 this._errorCode = XMLParserErrorCode.NoError; 35037 this.parseXml(data); 35038 if (this._errorCode !== XMLParserErrorCode.NoError) { 35039 return undefined; 35040 } 35041 const [documentElement] = this._currentFragment; 35042 if (!documentElement) { 35043 return undefined; 35044 } 35045 return { 35046 documentElement 35047 }; 35048 } 35049 onText(text) { 35050 if (isWhitespaceString(text)) { 35051 return; 35052 } 35053 const node = new SimpleDOMNode("#text", text); 35054 this._currentFragment.push(node); 35055 } 35056 onCdata(text) { 35057 const node = new SimpleDOMNode("#text", text); 35058 this._currentFragment.push(node); 35059 } 35060 onBeginElement(name, attributes, isEmpty) { 35061 if (this._lowerCaseName) { 35062 name = name.toLowerCase(); 35063 } 35064 const node = new SimpleDOMNode(name); 35065 node.childNodes = []; 35066 if (this._hasAttributes) { 35067 node.attributes = attributes; 35068 } 35069 this._currentFragment.push(node); 35070 if (isEmpty) { 35071 return; 35072 } 35073 this._stack.push(this._currentFragment); 35074 this._currentFragment = node.childNodes; 35075 } 35076 onEndElement(name) { 35077 this._currentFragment = this._stack.pop() || []; 35078 const lastElement = this._currentFragment.at(-1); 35079 if (!lastElement) { 35080 return null; 35081 } 35082 for (const childNode of lastElement.childNodes) { 35083 childNode.parentNode = lastElement; 35084 } 35085 return lastElement; 35086 } 35087 onError(code) { 35088 this._errorCode = code; 35089 } 35090} 35091 35092;// ./src/core/metadata_parser.js 35093 35094class MetadataParser { 35095 constructor(data) { 35096 data = this._repair(data); 35097 const parser = new SimpleXMLParser({ 35098 lowerCaseName: true 35099 }); 35100 const xmlDocument = parser.parseFromString(data); 35101 this._metadataMap = new Map(); 35102 this._data = data; 35103 if (xmlDocument) { 35104 this._parse(xmlDocument); 35105 } 35106 } 35107 _repair(data) { 35108 return data.replace(/^[^<]+/, "").replaceAll(/>\\376\\377([^<]+)/g, function (all, codes) { 35109 const bytes = codes.replaceAll(/\\([0-3])([0-7])([0-7])/g, function (code, d1, d2, d3) { 35110 return String.fromCharCode(d1 * 64 + d2 * 8 + d3 * 1); 35111 }).replaceAll(/&(amp|apos|gt|lt|quot);/g, function (str, name) { 35112 switch (name) { 35113 case "amp": 35114 return "&"; 35115 case "apos": 35116 return "'"; 35117 case "gt": 35118 return ">"; 35119 case "lt": 35120 return "<"; 35121 case "quot": 35122 return '"'; 35123 } 35124 throw new Error(`_repair: ${name} isn't defined.`); 35125 }); 35126 const charBuf = [">"]; 35127 for (let i = 0, ii = bytes.length; i < ii; i += 2) { 35128 const code = bytes.charCodeAt(i) * 256 + bytes.charCodeAt(i + 1); 35129 if (code >= 32 && code < 127 && code !== 60 && code !== 62 && code !== 38) { 35130 charBuf.push(String.fromCharCode(code)); 35131 } else { 35132 charBuf.push("&#x" + (0x10000 + code).toString(16).substring(1) + ";"); 35133 } 35134 } 35135 return charBuf.join(""); 35136 }); 35137 } 35138 _getSequence(entry) { 35139 const name = entry.nodeName; 35140 if (name !== "rdf:bag" && name !== "rdf:seq" && name !== "rdf:alt") { 35141 return null; 35142 } 35143 return entry.childNodes.filter(node => node.nodeName === "rdf:li"); 35144 } 35145 _parseArray(entry) { 35146 if (!entry.hasChildNodes()) { 35147 return; 35148 } 35149 const [seqNode] = entry.childNodes; 35150 const sequence = this._getSequence(seqNode) || []; 35151 this._metadataMap.set(entry.nodeName, sequence.map(node => node.textContent.trim())); 35152 } 35153 _parse(xmlDocument) { 35154 let rdf = xmlDocument.documentElement; 35155 if (rdf.nodeName !== "rdf:rdf") { 35156 rdf = rdf.firstChild; 35157 while (rdf && rdf.nodeName !== "rdf:rdf") { 35158 rdf = rdf.nextSibling; 35159 } 35160 } 35161 if (!rdf || rdf.nodeName !== "rdf:rdf" || !rdf.hasChildNodes()) { 35162 return; 35163 } 35164 for (const desc of rdf.childNodes) { 35165 if (desc.nodeName !== "rdf:description") { 35166 continue; 35167 } 35168 for (const entry of desc.childNodes) { 35169 const name = entry.nodeName; 35170 switch (name) { 35171 case "#text": 35172 continue; 35173 case "dc:creator": 35174 case "dc:subject": 35175 this._parseArray(entry); 35176 continue; 35177 } 35178 this._metadataMap.set(name, entry.textContent.trim()); 35179 } 35180 } 35181 } 35182 get serializable() { 35183 return { 35184 parsedData: this._metadataMap, 35185 rawData: this._data 35186 }; 35187 } 35188} 35189 35190;// ./src/core/decrypt_stream.js 35191 35192const chunkSize = 512; 35193class DecryptStream extends DecodeStream { 35194 constructor(str, maybeLength, decrypt) { 35195 super(maybeLength); 35196 this.str = str; 35197 this.dict = str.dict; 35198 this.decrypt = decrypt; 35199 this.nextChunk = null; 35200 this.initialized = false;
vendor: 1,563 bytes, lines 35201-35268
35201 } 35202 readBlock() { 35203 let chunk; 35204 if (this.initialized) { 35205 chunk = this.nextChunk; 35206 } else { 35207 chunk = this.str.getBytes(chunkSize); 35208 this.initialized = true; 35209 } 35210 if (!chunk || chunk.length === 0) { 35211 this.eof = true; 35212 return; 35213 } 35214 this.nextChunk = this.str.getBytes(chunkSize); 35215 const hasMoreData = this.nextChunk?.length > 0; 35216 const decrypt = this.decrypt; 35217 chunk = decrypt(chunk, !hasMoreData); 35218 const bufferLength = this.bufferLength, 35219 newLength = bufferLength + chunk.length, 35220 buffer = this.ensureBuffer(newLength); 35221 buffer.set(chunk, bufferLength); 35222 this.bufferLength = newLength; 35223 } 35224} 35225 35226;// ./src/core/crypto.js 35227 35228 35229 35230class ARCFourCipher { 35231 constructor(key) { 35232 this.a = 0; 35233 this.b = 0; 35234 const s = new Uint8Array(256); 35235 const keyLength = key.length; 35236 for (let i = 0; i < 256; ++i) { 35237 s[i] = i; 35238 } 35239 for (let i = 0, j = 0; i < 256; ++i) { 35240 const tmp = s[i]; 35241 j = j + tmp + key[i % keyLength] & 0xff; 35242 s[i] = s[j]; 35243 s[j] = tmp; 35244 } 35245 this.s = s; 35246 } 35247 encryptBlock(data) { 35248 let a = this.a, 35249 b = this.b; 35250 const s = this.s; 35251 const n = data.length; 35252 const output = new Uint8Array(n); 35253 for (let i = 0; i < n; ++i) { 35254 a = a + 1 & 0xff; 35255 const tmp = s[a]; 35256 b = b + tmp & 0xff; 35257 const tmp2 = s[b]; 35258 s[a] = tmp2; 35259 s[b] = tmp; 35260 output[i] = data[i] ^ s[tmp + tmp2 & 0xff]; 35261 } 35262 this.a = a; 35263 this.b = b; 35264 return output; 35265 } 35266 decryptBlock(data) { 35267 return this.encryptBlock(data); 35268 }
vendor: 3,121 bytes, lines 35269-35341
35269 encrypt(data) { 35270 return this.encryptBlock(data); 35271 } 35272} 35273const calculateMD5 = function calculateMD5Closure() { 35274 const r = new Uint8Array([7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21]); 35275 const k = new Int32Array([-680876936, -389564586, 606105819, -1044525330, -176418897, 1200080426, -1473231341, -45705983, 1770035416, -1958414417, -42063, -1990404162, 1804603682, -40341101, -1502002290, 1236535329, -165796510, -1069501632, 643717713, -373897302, -701558691, 38016083, -660478335, -405537848, 568446438, -1019803690, -187363961, 1163531501, -1444681467, -51403784, 1735328473, -1926607734, -378558, -2022574463, 1839030562, -35309556, -1530992060, 1272893353, -155497632, -1094730640, 681279174, -358537222, -722521979, 76029189, -640364487, -421815835, 530742520, -995338651, -198630844, 1126891415, -1416354905, -57434055, 1700485571, -1894986606, -1051523, -2054922799, 1873313359, -30611744, -1560198380, 1309151649, -145523070, -1120210379, 718787259, -343485551]); 35276 function hash(data, offset, length) { 35277 let h0 = 1732584193, 35278 h1 = -271733879, 35279 h2 = -1732584194, 35280 h3 = 271733878; 35281 const paddedLength = length + 72 & ~63; 35282 const padded = new Uint8Array(paddedLength); 35283 let i, j; 35284 for (i = 0; i < length; ++i) { 35285 padded[i] = data[offset++]; 35286 } 35287 padded[i++] = 0x80; 35288 const n = paddedLength - 8; 35289 while (i < n) { 35290 padded[i++] = 0; 35291 } 35292 padded[i++] = length << 3 & 0xff; 35293 padded[i++] = length >> 5 & 0xff; 35294 padded[i++] = length >> 13 & 0xff; 35295 padded[i++] = length >> 21 & 0xff; 35296 padded[i++] = length >>> 29 & 0xff; 35297 padded[i++] = 0; 35298 padded[i++] = 0; 35299 padded[i++] = 0; 35300 const w = new Int32Array(16); 35301 for (i = 0; i < paddedLength;) { 35302 for (j = 0; j < 16; ++j, i += 4) { 35303 w[j] = padded[i] | padded[i + 1] << 8 | padded[i + 2] << 16 | padded[i + 3] << 24; 35304 } 35305 let a = h0, 35306 b = h1, 35307 c = h2, 35308 d = h3, 35309 f, 35310 g; 35311 for (j = 0; j < 64; ++j) { 35312 if (j < 16) { 35313 f = b & c | ~b & d; 35314 g = j; 35315 } else if (j < 32) { 35316 f = d & b | ~d & c; 35317 g = 5 * j + 1 & 15; 35318 } else if (j < 48) { 35319 f = b ^ c ^ d; 35320 g = 3 * j + 5 & 15; 35321 } else { 35322 f = c ^ (b | ~d); 35323 g = 7 * j & 15; 35324 } 35325 const tmp = d, 35326 rotateArg = a + f + k[j] + w[g] | 0, 35327 rotate = r[j]; 35328 d = c; 35329 c = b; 35330 b = b + (rotateArg << rotate | rotateArg >>> 32 - rotate) | 0; 35331 a = tmp; 35332 } 35333 h0 = h0 + a | 0; 35334 h1 = h1 + b | 0; 35335 h2 = h2 + c | 0; 35336 h3 = h3 + d | 0; 35337 } 35338 return new Uint8Array([h0 & 0xFF, h0 >> 8 & 0xFF, h0 >> 16 & 0xFF, h0 >>> 24 & 0xFF, h1 & 0xFF, h1 >> 8 & 0xFF, h1 >> 16 & 0xFF, h1 >>> 24 & 0xFF, h2 & 0xFF, h2 >> 8 & 0xFF, h2 >> 16 & 0xFF, h2 >>> 24 & 0xFF, h3 & 0xFF, h3 >> 8 & 0xFF, h3 >> 16 & 0xFF, h3 >>> 24 & 0xFF]); 35339 } 35340 return hash; 35341}()
vendor: 13,747 bytes, lines 35341-35716
35341; 35342class Word64 { 35343 constructor(highInteger, lowInteger) { 35344 this.high = highInteger | 0; 35345 this.low = lowInteger | 0; 35346 } 35347 and(word) { 35348 this.high &= word.high; 35349 this.low &= word.low; 35350 } 35351 xor(word) { 35352 this.high ^= word.high; 35353 this.low ^= word.low; 35354 } 35355 or(word) { 35356 this.high |= word.high; 35357 this.low |= word.low; 35358 } 35359 shiftRight(places) { 35360 if (places >= 32) { 35361 this.low = this.high >>> places - 32 | 0; 35362 this.high = 0; 35363 } else { 35364 this.low = this.low >>> places | this.high << 32 - places; 35365 this.high = this.high >>> places | 0; 35366 } 35367 } 35368 shiftLeft(places) { 35369 if (places >= 32) { 35370 this.high = this.low << places - 32; 35371 this.low = 0; 35372 } else { 35373 this.high = this.high << places | this.low >>> 32 - places; 35374 this.low <<= places; 35375 } 35376 } 35377 rotateRight(places) { 35378 let low, high; 35379 if (places & 32) { 35380 high = this.low; 35381 low = this.high; 35382 } else { 35383 low = this.low; 35384 high = this.high; 35385 } 35386 places &= 31; 35387 this.low = low >>> places | high << 32 - places; 35388 this.high = high >>> places | low << 32 - places; 35389 } 35390 not() { 35391 this.high = ~this.high; 35392 this.low = ~this.low; 35393 } 35394 add(word) { 35395 const lowAdd = (this.low >>> 0) + (word.low >>> 0); 35396 let highAdd = (this.high >>> 0) + (word.high >>> 0); 35397 if (lowAdd > 0xffffffff) { 35398 highAdd += 1; 35399 } 35400 this.low = lowAdd | 0; 35401 this.high = highAdd | 0; 35402 } 35403 copyTo(bytes, offset) { 35404 bytes[offset] = this.high >>> 24 & 0xff; 35405 bytes[offset + 1] = this.high >> 16 & 0xff; 35406 bytes[offset + 2] = this.high >> 8 & 0xff; 35407 bytes[offset + 3] = this.high & 0xff; 35408 bytes[offset + 4] = this.low >>> 24 & 0xff; 35409 bytes[offset + 5] = this.low >> 16 & 0xff; 35410 bytes[offset + 6] = this.low >> 8 & 0xff; 35411 bytes[offset + 7] = this.low & 0xff; 35412 } 35413 assign(word) { 35414 this.high = word.high; 35415 this.low = word.low; 35416 } 35417} 35418const calculateSHA256 = function calculateSHA256Closure() { 35419 function rotr(x, n) { 35420 return x >>> n | x << 32 - n; 35421 } 35422 function ch(x, y, z) { 35423 return x & y ^ ~x & z; 35424 } 35425 function maj(x, y, z) { 35426 return x & y ^ x & z ^ y & z; 35427 } 35428 function sigma(x) { 35429 return rotr(x, 2) ^ rotr(x, 13) ^ rotr(x, 22); 35430 } 35431 function sigmaPrime(x) { 35432 return rotr(x, 6) ^ rotr(x, 11) ^ rotr(x, 25); 35433 } 35434 function littleSigma(x) { 35435 return rotr(x, 7) ^ rotr(x, 18) ^ x >>> 3; 35436 } 35437 function littleSigmaPrime(x) { 35438 return rotr(x, 17) ^ rotr(x, 19) ^ x >>> 10; 35439 } 35440 const k = [0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2]; 35441 function hash(data, offset, length) { 35442 let h0 = 0x6a09e667, 35443 h1 = 0xbb67ae85, 35444 h2 = 0x3c6ef372, 35445 h3 = 0xa54ff53a, 35446 h4 = 0x510e527f, 35447 h5 = 0x9b05688c, 35448 h6 = 0x1f83d9ab, 35449 h7 = 0x5be0cd19; 35450 const paddedLength = Math.ceil((length + 9) / 64) * 64; 35451 const padded = new Uint8Array(paddedLength); 35452 let i, j; 35453 for (i = 0; i < length; ++i) { 35454 padded[i] = data[offset++]; 35455 } 35456 padded[i++] = 0x80; 35457 const n = paddedLength - 8; 35458 while (i < n) { 35459 padded[i++] = 0; 35460 } 35461 padded[i++] = 0; 35462 padded[i++] = 0; 35463 padded[i++] = 0; 35464 padded[i++] = length >>> 29 & 0xff; 35465 padded[i++] = length >> 21 & 0xff; 35466 padded[i++] = length >> 13 & 0xff; 35467 padded[i++] = length >> 5 & 0xff; 35468 padded[i++] = length << 3 & 0xff; 35469 const w = new Uint32Array(64); 35470 for (i = 0; i < paddedLength;) { 35471 for (j = 0; j < 16; ++j) { 35472 w[j] = padded[i] << 24 | padded[i + 1] << 16 | padded[i + 2] << 8 | padded[i + 3]; 35473 i += 4; 35474 } 35475 for (j = 16; j < 64; ++j) { 35476 w[j] = littleSigmaPrime(w[j - 2]) + w[j - 7] + littleSigma(w[j - 15]) + w[j - 16] | 0; 35477 } 35478 let a = h0, 35479 b = h1, 35480 c = h2, 35481 d = h3, 35482 e = h4, 35483 f = h5, 35484 g = h6, 35485 h = h7, 35486 t1, 35487 t2; 35488 for (j = 0; j < 64; ++j) { 35489 t1 = h + sigmaPrime(e) + ch(e, f, g) + k[j] + w[j]; 35490 t2 = sigma(a) + maj(a, b, c); 35491 h = g; 35492 g = f; 35493 f = e; 35494 e = d + t1 | 0; 35495 d = c; 35496 c = b; 35497 b = a; 35498 a = t1 + t2 | 0; 35499 } 35500 h0 = h0 + a | 0; 35501 h1 = h1 + b | 0; 35502 h2 = h2 + c | 0; 35503 h3 = h3 + d | 0; 35504 h4 = h4 + e | 0; 35505 h5 = h5 + f | 0; 35506 h6 = h6 + g | 0; 35507 h7 = h7 + h | 0; 35508 } 35509 return new Uint8Array([h0 >> 24 & 0xFF, h0 >> 16 & 0xFF, h0 >> 8 & 0xFF, h0 & 0xFF, h1 >> 24 & 0xFF, h1 >> 16 & 0xFF, h1 >> 8 & 0xFF, h1 & 0xFF, h2 >> 24 & 0xFF, h2 >> 16 & 0xFF, h2 >> 8 & 0xFF, h2 & 0xFF, h3 >> 24 & 0xFF, h3 >> 16 & 0xFF, h3 >> 8 & 0xFF, h3 & 0xFF, h4 >> 24 & 0xFF, h4 >> 16 & 0xFF, h4 >> 8 & 0xFF, h4 & 0xFF, h5 >> 24 & 0xFF, h5 >> 16 & 0xFF, h5 >> 8 & 0xFF, h5 & 0xFF, h6 >> 24 & 0xFF, h6 >> 16 & 0xFF, h6 >> 8 & 0xFF, h6 & 0xFF, h7 >> 24 & 0xFF, h7 >> 16 & 0xFF, h7 >> 8 & 0xFF, h7 & 0xFF]); 35510 } 35511 return hash; 35512}(); 35513const calculateSHA512 = function calculateSHA512Closure() { 35514 function ch(result, x, y, z, tmp) { 35515 result.assign(x); 35516 result.and(y); 35517 tmp.assign(x); 35518 tmp.not(); 35519 tmp.and(z); 35520 result.xor(tmp); 35521 } 35522 function maj(result, x, y, z, tmp) { 35523 result.assign(x); 35524 result.and(y); 35525 tmp.assign(x); 35526 tmp.and(z); 35527 result.xor(tmp); 35528 tmp.assign(y); 35529 tmp.and(z); 35530 result.xor(tmp); 35531 } 35532 function sigma(result, x, tmp) { 35533 result.assign(x); 35534 result.rotateRight(28); 35535 tmp.assign(x); 35536 tmp.rotateRight(34); 35537 result.xor(tmp); 35538 tmp.assign(x); 35539 tmp.rotateRight(39); 35540 result.xor(tmp); 35541 } 35542 function sigmaPrime(result, x, tmp) { 35543 result.assign(x); 35544 result.rotateRight(14); 35545 tmp.assign(x); 35546 tmp.rotateRight(18); 35547 result.xor(tmp); 35548 tmp.assign(x); 35549 tmp.rotateRight(41); 35550 result.xor(tmp); 35551 } 35552 function littleSigma(result, x, tmp) { 35553 result.assign(x); 35554 result.rotateRight(1); 35555 tmp.assign(x); 35556 tmp.rotateRight(8); 35557 result.xor(tmp); 35558 tmp.assign(x); 35559 tmp.shiftRight(7); 35560 result.xor(tmp); 35561 } 35562 function littleSigmaPrime(result, x, tmp) { 35563 result.assign(x); 35564 result.rotateRight(19); 35565 tmp.assign(x); 35566 tmp.rotateRight(61); 35567 result.xor(tmp); 35568 tmp.assign(x); 35569 tmp.shiftRight(6); 35570 result.xor(tmp); 35571 } 35572 const k = [new Word64(0x428a2f98, 0xd728ae22), new Word64(0x71374491, 0x23ef65cd), new Word64(0xb5c0fbcf, 0xec4d3b2f), new Word64(0xe9b5dba5, 0x8189dbbc), new Word64(0x3956c25b, 0xf348b538), new Word64(0x59f111f1, 0xb605d019), new Word64(0x923f82a4, 0xaf194f9b), new Word64(0xab1c5ed5, 0xda6d8118), new Word64(0xd807aa98, 0xa3030242), new Word64(0x12835b01, 0x45706fbe), new Word64(0x243185be, 0x4ee4b28c), new Word64(0x550c7dc3, 0xd5ffb4e2), new Word64(0x72be5d74, 0xf27b896f), new Word64(0x80deb1fe, 0x3b1696b1), new Word64(0x9bdc06a7, 0x25c71235), new Word64(0xc19bf174, 0xcf692694), new Word64(0xe49b69c1, 0x9ef14ad2), new Word64(0xefbe4786, 0x384f25e3), new Word64(0x0fc19dc6, 0x8b8cd5b5), new Word64(0x240ca1cc, 0x77ac9c65), new Word64(0x2de92c6f, 0x592b0275), new Word64(0x4a7484aa, 0x6ea6e483), new Word64(0x5cb0a9dc, 0xbd41fbd4), new Word64(0x76f988da, 0x831153b5), new Word64(0x983e5152, 0xee66dfab), new Word64(0xa831c66d, 0x2db43210), new Word64(0xb00327c8, 0x98fb213f), new Word64(0xbf597fc7, 0xbeef0ee4), new Word64(0xc6e00bf3, 0x3da88fc2), new Word64(0xd5a79147, 0x930aa725), new Word64(0x06ca6351, 0xe003826f), new Word64(0x14292967, 0x0a0e6e70), new Word64(0x27b70a85, 0x46d22ffc), new Word64(0x2e1b2138, 0x5c26c926), new Word64(0x4d2c6dfc, 0x5ac42aed), new Word64(0x53380d13, 0x9d95b3df), new Word64(0x650a7354, 0x8baf63de), new Word64(0x766a0abb, 0x3c77b2a8), new Word64(0x81c2c92e, 0x47edaee6), new Word64(0x92722c85, 0x1482353b), new Word64(0xa2bfe8a1, 0x4cf10364), new Word64(0xa81a664b, 0xbc423001), new Word64(0xc24b8b70, 0xd0f89791), new Word64(0xc76c51a3, 0x0654be30), new Word64(0xd192e819, 0xd6ef5218), new Word64(0xd6990624, 0x5565a910), new Word64(0xf40e3585, 0x5771202a), new Word64(0x106aa070, 0x32bbd1b8), new Word64(0x19a4c116, 0xb8d2d0c8), new Word64(0x1e376c08, 0x5141ab53), new Word64(0x2748774c, 0xdf8eeb99), new Word64(0x34b0bcb5, 0xe19b48a8), new Word64(0x391c0cb3, 0xc5c95a63), new Word64(0x4ed8aa4a, 0xe3418acb), new Word64(0x5b9cca4f, 0x7763e373), new Word64(0x682e6ff3, 0xd6b2b8a3), new Word64(0x748f82ee, 0x5defb2fc), new Word64(0x78a5636f, 0x43172f60), new Word64(0x84c87814, 0xa1f0ab72), new Word64(0x8cc70208, 0x1a6439ec), new Word64(0x90befffa, 0x23631e28), new Word64(0xa4506ceb, 0xde82bde9), new Word64(0xbef9a3f7, 0xb2c67915), new Word64(0xc67178f2, 0xe372532b), new Word64(0xca273ece, 0xea26619c), new Word64(0xd186b8c7, 0x21c0c207), new Word64(0xeada7dd6, 0xcde0eb1e), new Word64(0xf57d4f7f, 0xee6ed178), new Word64(0x06f067aa, 0x72176fba), new Word64(0x0a637dc5, 0xa2c898a6), new Word64(0x113f9804, 0xbef90dae), new Word64(0x1b710b35, 0x131c471b), new Word64(0x28db77f5, 0x23047d84), new Word64(0x32caab7b, 0x40c72493), new Word64(0x3c9ebe0a, 0x15c9bebc), new Word64(0x431d67c4, 0x9c100d4c), new Word64(0x4cc5d4be, 0xcb3e42b6), new Word64(0x597f299c, 0xfc657e2a), new Word64(0x5fcb6fab, 0x3ad6faec), new Word64(0x6c44198c, 0x4a475817)]; 35573 function hash(data, offset, length, mode384 = false) { 35574 let h0, h1, h2, h3, h4, h5, h6, h7; 35575 if (!mode384) { 35576 h0 = new Word64(0x6a09e667, 0xf3bcc908); 35577 h1 = new Word64(0xbb67ae85, 0x84caa73b); 35578 h2 = new Word64(0x3c6ef372, 0xfe94f82b); 35579 h3 = new Word64(0xa54ff53a, 0x5f1d36f1); 35580 h4 = new Word64(0x510e527f, 0xade682d1); 35581 h5 = new Word64(0x9b05688c, 0x2b3e6c1f); 35582 h6 = new Word64(0x1f83d9ab, 0xfb41bd6b); 35583 h7 = new Word64(0x5be0cd19, 0x137e2179); 35584 } else { 35585 h0 = new Word64(0xcbbb9d5d, 0xc1059ed8); 35586 h1 = new Word64(0x629a292a, 0x367cd507); 35587 h2 = new Word64(0x9159015a, 0x3070dd17); 35588 h3 = new Word64(0x152fecd8, 0xf70e5939); 35589 h4 = new Word64(0x67332667, 0xffc00b31); 35590 h5 = new Word64(0x8eb44a87, 0x68581511); 35591 h6 = new Word64(0xdb0c2e0d, 0x64f98fa7); 35592 h7 = new Word64(0x47b5481d, 0xbefa4fa4); 35593 } 35594 const paddedLength = Math.ceil((length + 17) / 128) * 128; 35595 const padded = new Uint8Array(paddedLength); 35596 let i, j; 35597 for (i = 0; i < length; ++i) { 35598 padded[i] = data[offset++]; 35599 } 35600 padded[i++] = 0x80; 35601 const n = paddedLength - 16; 35602 while (i < n) { 35603 padded[i++] = 0; 35604 } 35605 padded[i++] = 0; 35606 padded[i++] = 0; 35607 padded[i++] = 0; 35608 padded[i++] = 0; 35609 padded[i++] = 0; 35610 padded[i++] = 0; 35611 padded[i++] = 0; 35612 padded[i++] = 0; 35613 padded[i++] = 0; 35614 padded[i++] = 0; 35615 padded[i++] = 0; 35616 padded[i++] = length >>> 29 & 0xff; 35617 padded[i++] = length >> 21 & 0xff; 35618 padded[i++] = length >> 13 & 0xff; 35619 padded[i++] = length >> 5 & 0xff; 35620 padded[i++] = length << 3 & 0xff; 35621 const w = new Array(80); 35622 for (i = 0; i < 80; i++) { 35623 w[i] = new Word64(0, 0); 35624 } 35625 let a = new Word64(0, 0), 35626 b = new Word64(0, 0), 35627 c = new Word64(0, 0); 35628 let d = new Word64(0, 0), 35629 e = new Word64(0, 0), 35630 f = new Word64(0, 0); 35631 let g = new Word64(0, 0), 35632 h = new Word64(0, 0); 35633 const t1 = new Word64(0, 0), 35634 t2 = new Word64(0, 0); 35635 const tmp1 = new Word64(0, 0), 35636 tmp2 = new Word64(0, 0); 35637 let tmp3; 35638 for (i = 0; i < paddedLength;) { 35639 for (j = 0; j < 16; ++j) { 35640 w[j].high = padded[i] << 24 | padded[i + 1] << 16 | padded[i + 2] << 8 | padded[i + 3]; 35641 w[j].low = padded[i + 4] << 24 | padded[i + 5] << 16 | padded[i + 6] << 8 | padded[i + 7]; 35642 i += 8; 35643 } 35644 for (j = 16; j < 80; ++j) { 35645 tmp3 = w[j]; 35646 littleSigmaPrime(tmp3, w[j - 2], tmp2); 35647 tmp3.add(w[j - 7]); 35648 littleSigma(tmp1, w[j - 15], tmp2); 35649 tmp3.add(tmp1); 35650 tmp3.add(w[j - 16]); 35651 } 35652 a.assign(h0); 35653 b.assign(h1); 35654 c.assign(h2); 35655 d.assign(h3); 35656 e.assign(h4); 35657 f.assign(h5); 35658 g.assign(h6); 35659 h.assign(h7); 35660 for (j = 0; j < 80; ++j) { 35661 t1.assign(h); 35662 sigmaPrime(tmp1, e, tmp2); 35663 t1.add(tmp1); 35664 ch(tmp1, e, f, g, tmp2); 35665 t1.add(tmp1); 35666 t1.add(k[j]); 35667 t1.add(w[j]); 35668 sigma(t2, a, tmp2); 35669 maj(tmp1, a, b, c, tmp2); 35670 t2.add(tmp1); 35671 tmp3 = h; 35672 h = g; 35673 g = f; 35674 f = e; 35675 d.add(t1); 35676 e = d; 35677 d = c; 35678 c = b; 35679 b = a; 35680 tmp3.assign(t1); 35681 tmp3.add(t2); 35682 a = tmp3; 35683 } 35684 h0.add(a); 35685 h1.add(b); 35686 h2.add(c); 35687 h3.add(d); 35688 h4.add(e); 35689 h5.add(f); 35690 h6.add(g); 35691 h7.add(h); 35692 } 35693 let result; 35694 if (!mode384) { 35695 result = new Uint8Array(64); 35696 h0.copyTo(result, 0); 35697 h1.copyTo(result, 8); 35698 h2.copyTo(result, 16); 35699 h3.copyTo(result, 24); 35700 h4.copyTo(result, 32); 35701 h5.copyTo(result, 40); 35702 h6.copyTo(result, 48); 35703 h7.copyTo(result, 56); 35704 } else { 35705 result = new Uint8Array(48); 35706 h0.copyTo(result, 0); 35707 h1.copyTo(result, 8); 35708 h2.copyTo(result, 16); 35709 h3.copyTo(result, 24); 35710 h4.copyTo(result, 32); 35711 h5.copyTo(result, 40); 35712 } 35713 return result; 35714 } 35715 return hash; 35716}();
35717function calculateSHA384(data, offset, length) { 35718 return calculateSHA512(data, offset, length, true); 35719} 35720class NullCipher { 35721 decryptBlock(data) { 35722 return data; 35723 } 35724 encrypt(data) { 35725 return data; 35726 } 35727} 35728class AESBaseCipher { 35729 constructor() { 35730 this._s = new Uint8Array([0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, 0x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, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d]); 35732 this._mix = new Uint32Array([0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927, 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45, 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb, 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381, 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf, 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66, 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28, 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012, 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec, 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e, 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd, 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7, 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89, 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a
35732750, 0x5ffdaa5b, 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815, 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f, 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa, 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8, 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36, 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c, 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742, 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea, 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4, 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e, 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360, 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502, 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87, 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd, 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3, 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621, 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f, 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55, 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26, 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844, 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba, 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480, 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce, 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67, 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929, 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713, 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed, 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f, 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3]); 35733 this._mixCol = new Uint8Array(256); 35734 for (let i = 0; i < 256; i++) { 35735 this._mixCol[i] = i < 128 ? i << 1 : i << 1 ^ 0x1b; 35736 } 35737 this.buffer = new Uint8Array(16); 35738 this.bufferPosition = 0; 35739 } 35740 _expandKey(cipherKey) { 35741 unreachable
vendor: 9,146 bytes, lines 35741-36026
35741("Cannot call `_expandKey` on the base class"); 35742 } 35743 _decrypt(input, key) { 35744 let t, u, v; 35745 const state = new Uint8Array(16); 35746 state.set(input); 35747 for (let j = 0, k = this._keySize; j < 16; ++j, ++k) { 35748 state[j] ^= key[k]; 35749 } 35750 for (let i = this._cyclesOfRepetition - 1; i >= 1; --i) { 35751 t = state[13]; 35752 state[13] = state[9]; 35753 state[9] = state[5]; 35754 state[5] = state[1]; 35755 state[1] = t; 35756 t = state[14]; 35757 u = state[10]; 35758 state[14] = state[6]; 35759 state[10] = state[2]; 35760 state[6] = t; 35761 state[2] = u; 35762 t = state[15]; 35763 u = state[11]; 35764 v = state[7]; 35765 state[15] = state[3]; 35766 state[11] = t; 35767 state[7] = u; 35768 state[3] = v; 35769 for (let j = 0; j < 16; ++j) { 35770 state[j] = this._inv_s[state[j]]; 35771 } 35772 for (let j = 0, k = i * 16; j < 16; ++j, ++k) { 35773 state[j] ^= key[k]; 35774 } 35775 for (let j = 0; j < 16; j += 4) { 35776 const s0 = this._mix[state[j]]; 35777 const s1 = this._mix[state[j + 1]]; 35778 const s2 = this._mix[state[j + 2]]; 35779 const s3 = this._mix[state[j + 3]]; 35780 t = s0 ^ s1 >>> 8 ^ s1 << 24 ^ s2 >>> 16 ^ s2 << 16 ^ s3 >>> 24 ^ s3 << 8; 35781 state[j] = t >>> 24 & 0xff; 35782 state[j + 1] = t >> 16 & 0xff; 35783 state[j + 2] = t >> 8 & 0xff; 35784 state[j + 3] = t & 0xff; 35785 } 35786 } 35787 t = state[13]; 35788 state[13] = state[9]; 35789 state[9] = state[5]; 35790 state[5] = state[1]; 35791 state[1] = t; 35792 t = state[14]; 35793 u = state[10]; 35794 state[14] = state[6]; 35795 state[10] = state[2]; 35796 state[6] = t; 35797 state[2] = u; 35798 t = state[15]; 35799 u = state[11]; 35800 v = state[7]; 35801 state[15] = state[3]; 35802 state[11] = t; 35803 state[7] = u; 35804 state[3] = v; 35805 for (let j = 0; j < 16; ++j) { 35806 state[j] = this._inv_s[state[j]]; 35807 state[j] ^= key[j]; 35808 } 35809 return state; 35810 } 35811 _encrypt(input, key) { 35812 const s = this._s; 35813 let t, u, v; 35814 const state = new Uint8Array(16); 35815 state.set(input); 35816 for (let j = 0; j < 16; ++j) { 35817 state[j] ^= key[j]; 35818 } 35819 for (let i = 1; i < this._cyclesOfRepetition; i++) { 35820 for (let j = 0; j < 16; ++j) { 35821 state[j] = s[state[j]]; 35822 } 35823 v = state[1]; 35824 state[1] = state[5]; 35825 state[5] = state[9]; 35826 state[9] = state[13]; 35827 state[13] = v; 35828 v = state[2]; 35829 u = state[6]; 35830 state[2] = state[10]; 35831 state[6] = state[14]; 35832 state[10] = v; 35833 state[14] = u; 35834 v = state[3]; 35835 u = state[7]; 35836 t = state[11]; 35837 state[3] = state[15]; 35838 state[7] = v; 35839 state[11] = u; 35840 state[15] = t; 35841 for (let j = 0; j < 16; j += 4) { 35842 const s0 = state[j + 0]; 35843 const s1 = state[j + 1]; 35844 const s2 = state[j + 2]; 35845 const s3 = state[j + 3]; 35846 t = s0 ^ s1 ^ s2 ^ s3; 35847 state[j + 0] ^= t ^ this._mixCol[s0 ^ s1]; 35848 state[j + 1] ^= t ^ this._mixCol[s1 ^ s2]; 35849 state[j + 2] ^= t ^ this._mixCol[s2 ^ s3]; 35850 state[j + 3] ^= t ^ this._mixCol[s3 ^ s0]; 35851 } 35852 for (let j = 0, k = i * 16; j < 16; ++j, ++k) { 35853 state[j] ^= key[k]; 35854 } 35855 } 35856 for (let j = 0; j < 16; ++j) { 35857 state[j] = s[state[j]]; 35858 } 35859 v = state[1]; 35860 state[1] = state[5]; 35861 state[5] = state[9]; 35862 state[9] = state[13]; 35863 state[13] = v; 35864 v = state[2]; 35865 u = state[6]; 35866 state[2] = state[10]; 35867 state[6] = state[14]; 35868 state[10] = v; 35869 state[14] = u; 35870 v = state[3]; 35871 u = state[7]; 35872 t = state[11]; 35873 state[3] = state[15]; 35874 state[7] = v; 35875 state[11] = u; 35876 state[15] = t; 35877 for (let j = 0, k = this._keySize; j < 16; ++j, ++k) { 35878 state[j] ^= key[k]; 35879 } 35880 return state; 35881 } 35882 _decryptBlock2(data, finalize) { 35883 const sourceLength = data.length; 35884 let buffer = this.buffer, 35885 bufferLength = this.bufferPosition; 35886 const result = []; 35887 let iv = this.iv; 35888 for (let i = 0; i < sourceLength; ++i) { 35889 buffer[bufferLength] = data[i]; 35890 ++bufferLength; 35891 if (bufferLength < 16) { 35892 continue; 35893 } 35894 const plain = this._decrypt(buffer, this._key); 35895 for (let j = 0; j < 16; ++j) { 35896 plain[j] ^= iv[j]; 35897 } 35898 iv = buffer; 35899 result.push(plain); 35900 buffer = new Uint8Array(16); 35901 bufferLength = 0; 35902 } 35903 this.buffer = buffer; 35904 this.bufferLength = bufferLength; 35905 this.iv = iv; 35906 if (result.length === 0) { 35907 return new Uint8Array(0); 35908 } 35909 let outputLength = 16 * result.length; 35910 if (finalize) { 35911 const lastBlock = result.at(-1); 35912 let psLen = lastBlock[15]; 35913 if (psLen <= 16) { 35914 for (let i = 15, ii = 16 - psLen; i >= ii; --i) { 35915 if (lastBlock[i] !== psLen) { 35916 psLen = 0; 35917 break; 35918 } 35919 } 35920 outputLength -= psLen; 35921 result[result.length - 1] = lastBlock.subarray(0, 16 - psLen); 35922 } 35923 } 35924 const output = new Uint8Array(outputLength); 35925 for (let i = 0, j = 0, ii = result.length; i < ii; ++i, j += 16) { 35926 output.set(result[i], j); 35927 } 35928 return output; 35929 } 35930 decryptBlock(data, finalize, iv = null) { 35931 const sourceLength = data.length; 35932 const buffer = this.buffer; 35933 let bufferLength = this.bufferPosition; 35934 if (iv) { 35935 this.iv = iv; 35936 } else { 35937 for (let i = 0; bufferLength < 16 && i < sourceLength; ++i, ++bufferLength) { 35938 buffer[bufferLength] = data[i]; 35939 } 35940 if (bufferLength < 16) { 35941 this.bufferLength = bufferLength; 35942 return new Uint8Array(0); 35943 } 35944 this.iv = buffer; 35945 data = data.subarray(16); 35946 } 35947 this.buffer = new Uint8Array(16); 35948 this.bufferLength = 0; 35949 this.decryptBlock = this._decryptBlock2; 35950 return this.decryptBlock(data, finalize); 35951 } 35952 encrypt(data, iv) { 35953 const sourceLength = data.length; 35954 let buffer = this.buffer, 35955 bufferLength = this.bufferPosition; 35956 const result = []; 35957 if (!iv) { 35958 iv = new Uint8Array(16); 35959 } 35960 for (let i = 0; i < sourceLength; ++i) { 35961 buffer[bufferLength] = data[i]; 35962 ++bufferLength; 35963 if (bufferLength < 16) { 35964 continue; 35965 } 35966 for (let j = 0; j < 16; ++j) { 35967 buffer[j] ^= iv[j]; 35968 } 35969 const cipher = this._encrypt(buffer, this._key); 35970 iv = cipher; 35971 result.push(cipher); 35972 buffer = new Uint8Array(16); 35973 bufferLength = 0; 35974 } 35975 this.buffer = buffer; 35976 this.bufferLength = bufferLength; 35977 this.iv = iv; 35978 if (result.length === 0) { 35979 return new Uint8Array(0); 35980 } 35981 const outputLength = 16 * result.length; 35982 const output = new Uint8Array(outputLength); 35983 for (let i = 0, j = 0, ii = result.length; i < ii; ++i, j += 16) { 35984 output.set(result[i], j); 35985 } 35986 return output; 35987 } 35988} 35989class AES128Cipher extends AESBaseCipher { 35990 constructor(key) { 35991 super(); 35992 this._cyclesOfRepetition = 10; 35993 this._keySize = 160; 35994 this._rcon = new Uint8Array([0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d]); 35995 this._key = this._expandKey(key); 35996 } 35997 _expandKey(cipherKey) { 35998 const b = 176; 35999 const s = this._s; 36000 const rcon = this._rcon; 36001 const result = new Uint8Array(b); 36002 result.set(cipherKey); 36003 for (let j = 16, i = 1; j < b; ++i) { 36004 let t1 = result[j - 3]; 36005 let t2 = result[j - 2]; 36006 let t3 = result[j - 1]; 36007 let t4 = result[j - 4]; 36008 t1 = s[t1]; 36009 t2 = s[t2]; 36010 t3 = s[t3]; 36011 t4 = s[t4]; 36012 t1 ^= rcon[i]; 36013 for (let n = 0; n < 4; ++n) { 36014 result[j] = t1 ^= result[j - 16]; 36015 j++; 36016 result[j] = t2 ^= result[j - 16]; 36017 j++; 36018 result[j] = t3 ^= result[j - 16]; 36019 j++; 36020 result[j] = t4 ^= result[j - 16]; 36021 j++; 36022 } 36023 } 36024 return result; 36025 } 36026}
vendor: 4,925 bytes, lines 36027-36160
36027class AES256Cipher extends AESBaseCipher { 36028 constructor(key) { 36029 super(); 36030 this._cyclesOfRepetition = 14; 36031 this._keySize = 224; 36032 this._key = this._expandKey(key); 36033 } 36034 _expandKey(cipherKey) { 36035 const b = 240; 36036 const s = this._s; 36037 const result = new Uint8Array(b); 36038 result.set(cipherKey); 36039 let r = 1; 36040 let t1, t2, t3, t4; 36041 for (let j = 32, i = 1; j < b; ++i) { 36042 if (j % 32 === 16) { 36043 t1 = s[t1]; 36044 t2 = s[t2]; 36045 t3 = s[t3]; 36046 t4 = s[t4]; 36047 } else if (j % 32 === 0) { 36048 t1 = result[j - 3]; 36049 t2 = result[j - 2]; 36050 t3 = result[j - 1]; 36051 t4 = result[j - 4]; 36052 t1 = s[t1]; 36053 t2 = s[t2]; 36054 t3 = s[t3]; 36055 t4 = s[t4]; 36056 t1 ^= r; 36057 if ((r <<= 1) >= 256) { 36058 r = (r ^ 0x1b) & 0xff; 36059 } 36060 } 36061 for (let n = 0; n < 4; ++n) { 36062 result[j] = t1 ^= result[j - 32]; 36063 j++; 36064 result[j] = t2 ^= result[j - 32]; 36065 j++; 36066 result[j] = t3 ^= result[j - 32]; 36067 j++; 36068 result[j] = t4 ^= result[j - 32]; 36069 j++; 36070 } 36071 } 36072 return result; 36073 } 36074} 36075class PDF17 { 36076 checkOwnerPassword(password, ownerValidationSalt, userBytes, ownerPassword) { 36077 const hashData = new Uint8Array(password.length + 56); 36078 hashData.set(password, 0); 36079 hashData.set(ownerValidationSalt, password.length); 36080 hashData.set(userBytes, password.length + ownerValidationSalt.length); 36081 const result = calculateSHA256(hashData, 0, hashData.length); 36082 return isArrayEqual(result, ownerPassword); 36083 } 36084 checkUserPassword(password, userValidationSalt, userPassword) { 36085 const hashData = new Uint8Array(password.length + 8); 36086 hashData.set(password, 0); 36087 hashData.set(userValidationSalt, password.length); 36088 const result = calculateSHA256(hashData, 0, hashData.length); 36089 return isArrayEqual(result, userPassword); 36090 } 36091 getOwnerKey(password, ownerKeySalt, userBytes, ownerEncryption) { 36092 const hashData = new Uint8Array(password.length + 56); 36093 hashData.set(password, 0); 36094 hashData.set(ownerKeySalt, password.length); 36095 hashData.set(userBytes, password.length + ownerKeySalt.length); 36096 const key = calculateSHA256(hashData, 0, hashData.length); 36097 const cipher = new AES256Cipher(key); 36098 return cipher.decryptBlock(ownerEncryption, false, new Uint8Array(16)); 36099 } 36100 getUserKey(password, userKeySalt, userEncryption) { 36101 const hashData = new Uint8Array(password.length + 8); 36102 hashData.set(password, 0); 36103 hashData.set(userKeySalt, password.length); 36104 const key = calculateSHA256(hashData, 0, hashData.length); 36105 const cipher = new AES256Cipher(key); 36106 return cipher.decryptBlock(userEncryption, false, new Uint8Array(16)); 36107 } 36108} 36109class PDF20 { 36110 _hash(password, input, userBytes) { 36111 let k = calculateSHA256(input, 0, input.length).subarray(0, 32); 36112 let e = [0]; 36113 let i = 0; 36114 while (i < 64 || e.at(-1) > i - 32) { 36115 const combinedLength = password.length + k.length + userBytes.length, 36116 combinedArray = new Uint8Array(combinedLength); 36117 let writeOffset = 0; 36118 combinedArray.set(password, writeOffset); 36119 writeOffset += password.length; 36120 combinedArray.set(k, writeOffset); 36121 writeOffset += k.length; 36122 combinedArray.set(userBytes, writeOffset); 36123 const k1 = new Uint8Array(combinedLength * 64); 36124 for (let j = 0, pos = 0; j < 64; j++, pos += combinedLength) { 36125 k1.set(combinedArray, pos); 36126 } 36127 const cipher = new AES128Cipher(k.subarray(0, 16)); 36128 e = cipher.encrypt(k1, k.subarray(16, 32)); 36129 const remainder = e.slice(0, 16).reduce((a, b) => a + b, 0) % 3; 36130 if (remainder === 0) { 36131 k = calculateSHA256(e, 0, e.length); 36132 } else if (remainder === 1) { 36133 k = calculateSHA384(e, 0, e.length); 36134 } else if (remainder === 2) { 36135 k = calculateSHA512(e, 0, e.length); 36136 } 36137 i++; 36138 } 36139 return k.subarray(0, 32); 36140 } 36141 checkOwnerPassword(password, ownerValidationSalt, userBytes, ownerPassword) { 36142 const hashData = new Uint8Array(password.length + 56); 36143 hashData.set(password, 0); 36144 hashData.set(ownerValidationSalt, password.length); 36145 hashData.set(userBytes, password.length + ownerValidationSalt.length); 36146 const result = this._hash(password, hashData, userBytes); 36147 return isArrayEqual(result, ownerPassword); 36148 } 36149 checkUserPassword(password, userValidationSalt, userPassword) { 36150 const hashData = new Uint8Array(password.length + 8); 36151 hashData.set(password, 0); 36152 hashData.set(userValidationSalt, password.length); 36153 const result = this._hash(password, hashData, []); 36154 return isArrayEqual(result, userPassword); 36155 } 36156 getOwnerKey(password, ownerKeySalt, userBytes, ownerEncryption) { 36157 const hashData = new Uint8Array(password.length + 56); 36158 hashData.set(password, 0); 36159 hashData.set(ownerKeySalt, password.length); 36160 hashData.set(userBytes, password.length + ownerKeySalt.length);
36161 const key = this._hash(password, hashData, userBytes); 36162 const cipher = new AES256Cipher(key); 36163 return cipher.decryptBlock(ownerEncryption, false, new Uint8Array(16)); 36164 } 36165 getUserKey(password, userKeySalt, userEncryption) { 36166 const hashData = new Uint8Array(password.length + 8); 36167 hashData.set(password, 0); 36168 hashData.set(userKeySalt, password.length); 36169 const key = this._hash(password, hashData, []); 36170 const cipher = new AES256Cipher(key); 36171 return cipher.decryptBlock(userEncryption, false, new Uint8Array(16)); 36172 } 36173} 36174class CipherTransform { 36175 constructor(stringCipherConstructor, streamCipherConstructor) { 36176 this.StringCipherConstructor = stringCipherConstructor; 36177 this.StreamCipherConstructor = streamCipherConstructor; 36178 } 36179 createStream(stream, length) { 36180 const cipher = new this.StreamCipherConstructor(); 36181 return new DecryptStream(stream, length, function cipherTransformDecryptStream(data, finalize) { 36182 return cipher.decryptBlock(data, finalize); 36183 }); 36184 } 36185 decryptString(s) { 36186 const cipher = new this.StringCipherConstructor(); 36187 let data = stringToBytes(s); 36188 data = cipher.decryptBlock(data, true); 36189 return bytesToString(data); 36190 } 36191 encryptString(s) { 36192 const cipher = new this.StringCipherConstructor(); 36193 if (cipher instanceof AESBaseCipher) { 36194 const strLen = s.length; 36195 const pad = 16 - strLen % 16; 36196 s += String.fromCharCode(pad).repeat(pad); 36197 const iv = new Uint8Array(16); 36198 if (typeof crypto !== "undefined") { 36199 crypto.getRandomValues(iv); 36200 } else { 36201 for (let i = 0; i < 16; i++) { 36202 iv[i] = Math.floor(256 * Math.random()); 36203 } 36204 } 36205 let data = stringToBytes(s); 36206 data = cipher.encrypt(data, iv); 36207 const buf = new Uint8Array(16 + data.length); 36208 buf.set(iv); 36209 buf.set(data, 16); 36210 return bytesToString(buf); 36211 } 36212 let data = stringToBytes(s); 36213 data = cipher.encrypt(data); 36214 return bytesToString(data); 36215 } 36216} 36217class CipherTransformFactory { 36218 static #defaultPasswordBytes = new Uint8Array([0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41, 0x64, 0x00, 0x4e, 0x56, 0xff, 0xfa, 0x01, 0x08, 0x2e, 0x2e, 0x00, 0xb6, 0xd0, 0x68, 0x3e, 0x80, 0x2f, 0x0c, 0xa9, 0xfe, 0x64, 0x53, 0x69, 0x7a]); 36219 #createEncryptionKey20(revision, password, ownerPassword, ownerValidationSalt, ownerKeySalt, uBytes, userPassword, userValidationSalt, userKeySalt, ownerEncryption, userEncryption, perms) { 36220 if (password) { 36221 const passwordLength = Math.min(127, password.length); 36222 password = password.subarray(0, passwordLength); 36223 } else { 36224 password = []; 36225 } 36226 const pdfAlgorithm = revision === 6 ? new PDF20() : new PDF17(); 36227 if (pdfAlgorithm.checkUserPassword(password, userValidationSalt, userPassword)) { 36228 return pdfAlgorithm.getUserKey(password, userKeySalt, userEncryption); 36229 } else if (password.length && pdfAlgorithm.checkOwnerPassword(password, ownerValidationSalt, uBytes, ownerPassword)) { 36230 return pdfAlgorithm.getOwnerKey(password, ownerKeySalt, uBytes, ownerEncryption); 36231 } 36232 return null; 36233 } 36234 #prepareKeyData(fileId, password, ownerPassword, userPassword, flags, revision, keyLength, encryptMetadata) { 36235 const hashDataSize = 40 + ownerPassword.length + fileId.length; 36236 const hashData = new Uint8Array(hashDataSize); 36237 let i = 0, 36238 j, 36239 n; 36240 if (password) { 36241 n = Math.min(32, password.length); 36242 for (; i < n; ++i) { 36243 hashData[i] = password[i]; 36244 } 36245 } 36246 j = 0; 36247 while (i < 32) { 36248 hashData[i++] = CipherTransformFactory.#defaultPasswordBytes[j++]; 36249 } 36250 for (j = 0, n = ownerPassword.length; j < n; ++j) { 36251 hashData[i++] = ownerPassword[j]; 36252 } 36253 hashData[i++] = flags & 0xff; 36254 hashData[i++] = flags >> 8 & 0xff; 36255 hashData[i++] = flags >> 16 & 0xff; 36256 hashData[i++] = flags >>> 24 & 0xff; 36257 for (j = 0, n = fileId.length; j < n; ++j) { 36258 hashData[i++] = fileId[j]; 36259 } 36260 if (revision >= 4 && !encryptMetadata) { 36261 hashData[i++] = 0xff; 36262 hashData[i++] = 0xff; 36263 hashData[i++] = 0xff; 36264 hashData[i++] = 0xff; 36265 } 36266 let hash = calculateMD5(hashData, 0, i);
vendor: 40,897 bytes, lines 36267-37642
36267 const keyLengthInBytes = keyLength >> 3; 36268 if (revision >= 3) { 36269 for (j = 0; j < 50; ++j) { 36270 hash = calculateMD5(hash, 0, keyLengthInBytes); 36271 } 36272 } 36273 const encryptionKey = hash.subarray(0, keyLengthInBytes); 36274 let cipher, checkData; 36275 if (revision >= 3) { 36276 for (i = 0; i < 32; ++i) { 36277 hashData[i] = CipherTransformFactory.#defaultPasswordBytes[i]; 36278 } 36279 for (j = 0, n = fileId.length; j < n; ++j) { 36280 hashData[i++] = fileId[j]; 36281 } 36282 cipher = new ARCFourCipher(encryptionKey); 36283 checkData = cipher.encryptBlock(calculateMD5(hashData, 0, i)); 36284 n = encryptionKey.length; 36285 const derivedKey = new Uint8Array(n); 36286 for (j = 1; j <= 19; ++j) { 36287 for (let k = 0; k < n; ++k) { 36288 derivedKey[k] = encryptionKey[k] ^ j; 36289 } 36290 cipher = new ARCFourCipher(derivedKey); 36291 checkData = cipher.encryptBlock(checkData); 36292 } 36293 for (j = 0, n = checkData.length; j < n; ++j) { 36294 if (userPassword[j] !== checkData[j]) { 36295 return null; 36296 } 36297 } 36298 } else { 36299 cipher = new ARCFourCipher(encryptionKey); 36300 checkData = cipher.encryptBlock(CipherTransformFactory.#defaultPasswordBytes); 36301 for (j = 0, n = checkData.length; j < n; ++j) { 36302 if (userPassword[j] !== checkData[j]) { 36303 return null; 36304 } 36305 } 36306 } 36307 return encryptionKey; 36308 } 36309 #decodeUserPassword(password, ownerPassword, revision, keyLength) { 36310 const hashData = new Uint8Array(32); 36311 let i = 0; 36312 const n = Math.min(32, password.length); 36313 for (; i < n; ++i) { 36314 hashData[i] = password[i]; 36315 } 36316 let j = 0; 36317 while (i < 32) { 36318 hashData[i++] = CipherTransformFactory.#defaultPasswordBytes[j++]; 36319 } 36320 let hash = calculateMD5(hashData, 0, i); 36321 const keyLengthInBytes = keyLength >> 3; 36322 if (revision >= 3) { 36323 for (j = 0; j < 50; ++j) { 36324 hash = calculateMD5(hash, 0, hash.length); 36325 } 36326 } 36327 let cipher, userPassword; 36328 if (revision >= 3) { 36329 userPassword = ownerPassword; 36330 const derivedKey = new Uint8Array(keyLengthInBytes); 36331 for (j = 19; j >= 0; j--) { 36332 for (let k = 0; k < keyLengthInBytes; ++k) { 36333 derivedKey[k] = hash[k] ^ j; 36334 } 36335 cipher = new ARCFourCipher(derivedKey); 36336 userPassword = cipher.encryptBlock(userPassword); 36337 } 36338 } else { 36339 cipher = new ARCFourCipher(hash.subarray(0, keyLengthInBytes)); 36340 userPassword = cipher.encryptBlock(ownerPassword); 36341 } 36342 return userPassword; 36343 } 36344 #buildObjectKey(num, gen, encryptionKey, isAes = false) { 36345 const key = new Uint8Array(encryptionKey.length + 9); 36346 const n = encryptionKey.length; 36347 let i; 36348 for (i = 0; i < n; ++i) { 36349 key[i] = encryptionKey[i]; 36350 } 36351 key[i++] = num & 0xff; 36352 key[i++] = num >> 8 & 0xff; 36353 key[i++] = num >> 16 & 0xff; 36354 key[i++] = gen & 0xff; 36355 key[i++] = gen >> 8 & 0xff; 36356 if (isAes) { 36357 key[i++] = 0x73; 36358 key[i++] = 0x41; 36359 key[i++] = 0x6c; 36360 key[i++] = 0x54; 36361 } 36362 const hash = calculateMD5(key, 0, i); 36363 return hash.subarray(0, Math.min(encryptionKey.length + 5, 16)); 36364 } 36365 #buildCipherConstructor(cf, name, num, gen, key) { 36366 if (!(name instanceof Name)) { 36367 throw new FormatError("Invalid crypt filter name."); 36368 } 36369 const self = this; 36370 const cryptFilter = cf.get(name.name); 36371 const cfm = cryptFilter?.get("CFM"); 36372 if (!cfm || cfm.name === "None") { 36373 return function () { 36374 return new NullCipher(); 36375 }; 36376 } 36377 if (cfm.name === "V2") { 36378 return function () { 36379 return new ARCFourCipher(self.#buildObjectKey(num, gen, key, false)); 36380 }; 36381 } 36382 if (cfm.name === "AESV2") { 36383 return function () { 36384 return new AES128Cipher(self.#buildObjectKey(num, gen, key, true)); 36385 }; 36386 } 36387 if (cfm.name === "AESV3") { 36388 return function () { 36389 return new AES256Cipher(key); 36390 }; 36391 } 36392 throw new FormatError("Unknown crypto method"); 36393 } 36394 constructor(dict, fileId, password) { 36395 const filter = dict.get("Filter"); 36396 if (!isName(filter, "Standard")) { 36397 throw new FormatError("unknown encryption method"); 36398 } 36399 this.filterName = filter.name; 36400 this.dict = dict; 36401 const algorithm = dict.get("V"); 36402 if (!Number.isInteger(algorithm) || algorithm !== 1 && algorithm !== 2 && algorithm !== 4 && algorithm !== 5) { 36403 throw new FormatError("unsupported encryption algorithm"); 36404 } 36405 this.algorithm = algorithm; 36406 let keyLength = dict.get("Length"); 36407 if (!keyLength) { 36408 if (algorithm <= 3) { 36409 keyLength = 40; 36410 } else { 36411 const cfDict = dict.get("CF"); 36412 const streamCryptoName = dict.get("StmF"); 36413 if (cfDict instanceof Dict && streamCryptoName instanceof Name) { 36414 cfDict.suppressEncryption = true; 36415 const handlerDict = cfDict.get(streamCryptoName.name); 36416 keyLength = handlerDict?.get("Length") || 128; 36417 if (keyLength < 40) { 36418 keyLength <<= 3; 36419 } 36420 } 36421 } 36422 } 36423 if (!Number.isInteger(keyLength) || keyLength < 40 || keyLength % 8 !== 0) { 36424 throw new FormatError("invalid key length"); 36425 } 36426 const ownerBytes = stringToBytes(dict.get("O")), 36427 userBytes = stringToBytes(dict.get("U")); 36428 const ownerPassword = ownerBytes.subarray(0, 32); 36429 const userPassword = userBytes.subarray(0, 32); 36430 const flags = dict.get("P"); 36431 const revision = dict.get("R"); 36432 const encryptMetadata = (algorithm === 4 || algorithm === 5) && dict.get("EncryptMetadata") !== false; 36433 this.encryptMetadata = encryptMetadata; 36434 const fileIdBytes = stringToBytes(fileId); 36435 let passwordBytes; 36436 if (password) { 36437 if (revision === 6) { 36438 try { 36439 password = utf8StringToString(password); 36440 } catch { 36441 warn("CipherTransformFactory: Unable to convert UTF8 encoded password."); 36442 } 36443 } 36444 passwordBytes = stringToBytes(password); 36445 } 36446 let encryptionKey; 36447 if (algorithm !== 5) { 36448 encryptionKey = this.#prepareKeyData(fileIdBytes, passwordBytes, ownerPassword, userPassword, flags, revision, keyLength, encryptMetadata); 36449 } else { 36450 const ownerValidationSalt = ownerBytes.subarray(32, 40); 36451 const ownerKeySalt = ownerBytes.subarray(40, 48); 36452 const uBytes = userBytes.subarray(0, 48); 36453 const userValidationSalt = userBytes.subarray(32, 40); 36454 const userKeySalt = userBytes.subarray(40, 48); 36455 const ownerEncryption = stringToBytes(dict.get("OE")); 36456 const userEncryption = stringToBytes(dict.get("UE")); 36457 const perms = stringToBytes(dict.get("Perms")); 36458 encryptionKey = this.#createEncryptionKey20(revision, passwordBytes, ownerPassword, ownerValidationSalt, ownerKeySalt, uBytes, userPassword, userValidationSalt, userKeySalt, ownerEncryption, userEncryption, perms); 36459 } 36460 if (!encryptionKey && !password) { 36461 throw new PasswordException("No password given", PasswordResponses.NEED_PASSWORD); 36462 } else if (!encryptionKey && password) { 36463 const decodedPassword = this.#decodeUserPassword(passwordBytes, ownerPassword, revision, keyLength); 36464 encryptionKey = this.#prepareKeyData(fileIdBytes, decodedPassword, ownerPassword, userPassword, flags, revision, keyLength, encryptMetadata); 36465 } 36466 if (!encryptionKey) { 36467 throw new PasswordException("Incorrect Password", PasswordResponses.INCORRECT_PASSWORD); 36468 } 36469 this.encryptionKey = encryptionKey; 36470 if (algorithm >= 4) { 36471 const cf = dict.get("CF"); 36472 if (cf instanceof Dict) { 36473 cf.suppressEncryption = true; 36474 } 36475 this.cf = cf; 36476 this.stmf = dict.get("StmF") || Name.get("Identity"); 36477 this.strf = dict.get("StrF") || Name.get("Identity"); 36478 this.eff = dict.get("EFF") || this.stmf; 36479 } 36480 } 36481 createCipherTransform(num, gen) { 36482 if (this.algorithm === 4 || this.algorithm === 5) { 36483 return new CipherTransform(this.#buildCipherConstructor(this.cf, this.strf, num, gen, this.encryptionKey), this.#buildCipherConstructor(this.cf, this.stmf, num, gen, this.encryptionKey)); 36484 } 36485 const key = this.#buildObjectKey(num, gen, this.encryptionKey, false); 36486 const cipherConstructor = function () { 36487 return new ARCFourCipher(key); 36488 }; 36489 return new CipherTransform(cipherConstructor, cipherConstructor); 36490 } 36491} 36492 36493;// ./src/core/writer.js 36494 36495 36496 36497 36498 36499 36500 36501async function writeObject(ref, obj, buffer, { 36502 encrypt = null 36503}) { 36504 const transform = encrypt?.createCipherTransform(ref.num, ref.gen); 36505 buffer.push(`${ref.num} ${ref.gen} obj\n`); 36506 if (obj instanceof Dict) { 36507 await writeDict(obj, buffer, transform); 36508 } else if (obj instanceof BaseStream) { 36509 await writeStream(obj, buffer, transform); 36510 } else if (Array.isArray(obj) || ArrayBuffer.isView(obj)) { 36511 await writeArray(obj, buffer, transform); 36512 } 36513 buffer.push("\nendobj\n"); 36514} 36515async function writeDict(dict, buffer, transform) { 36516 buffer.push("<<"); 36517 for (const key of dict.getKeys()) { 36518 buffer.push(` /${escapePDFName(key)} `); 36519 await writeValue(dict.getRaw(key), buffer, transform); 36520 } 36521 buffer.push(">>"); 36522} 36523async function writeStream(stream, buffer, transform) { 36524 let bytes = stream.getBytes(); 36525 const { 36526 dict 36527 } = stream; 36528 const [filter, params] = await Promise.all([dict.getAsync("Filter"), dict.getAsync("DecodeParms")]); 36529 const filterZero = Array.isArray(filter) ? await dict.xref.fetchIfRefAsync(filter[0]) : filter; 36530 const isFilterZeroFlateDecode = isName(filterZero, "FlateDecode"); 36531 const MIN_LENGTH_FOR_COMPRESSING = 256; 36532 if (bytes.length >= MIN_LENGTH_FOR_COMPRESSING || isFilterZeroFlateDecode) { 36533 try { 36534 const cs = new CompressionStream("deflate"); 36535 const writer = cs.writable.getWriter(); 36536 await writer.ready; 36537 writer.write(bytes).then(async () => { 36538 await writer.ready; 36539 await writer.close(); 36540 }).catch(() => {}); 36541 const buf = await new Response(cs.readable).arrayBuffer(); 36542 bytes = new Uint8Array(buf); 36543 let newFilter, newParams; 36544 if (!filter) { 36545 newFilter = Name.get("FlateDecode"); 36546 } else if (!isFilterZeroFlateDecode) { 36547 newFilter = Array.isArray(filter) ? [Name.get("FlateDecode"), ...filter] : [Name.get("FlateDecode"), filter]; 36548 if (params) { 36549 newParams = Array.isArray(params) ? [null, ...params] : [null, params]; 36550 } 36551 } 36552 if (newFilter) { 36553 dict.set("Filter", newFilter); 36554 } 36555 if (newParams) { 36556 dict.set("DecodeParms", newParams); 36557 } 36558 } catch (ex) { 36559 info(`writeStream - cannot compress data: "${ex}".`); 36560 } 36561 } 36562 let string = bytesToString(bytes); 36563 if (transform) { 36564 string = transform.encryptString(string); 36565 } 36566 dict.set("Length", string.length); 36567 await writeDict(dict, buffer, transform); 36568 buffer.push(" stream\n", string, "\nendstream"); 36569} 36570async function writeArray(array, buffer, transform) { 36571 buffer.push("["); 36572 let first = true; 36573 for (const val of array) { 36574 if (!first) { 36575 buffer.push(" "); 36576 } else { 36577 first = false; 36578 } 36579 await writeValue(val, buffer, transform); 36580 } 36581 buffer.push("]"); 36582} 36583async function writeValue(value, buffer, transform) { 36584 if (value instanceof Name) { 36585 buffer.push(`/${escapePDFName(value.name)}`); 36586 } else if (value instanceof Ref) { 36587 buffer.push(`${value.num} ${value.gen} R`); 36588 } else if (Array.isArray(value) || ArrayBuffer.isView(value)) { 36589 await writeArray(value, buffer, transform); 36590 } else if (typeof value === "string") { 36591 if (transform) { 36592 value = transform.encryptString(value); 36593 } 36594 buffer.push(`(${escapeString(value)})`); 36595 } else if (typeof value === "number") { 36596 buffer.push(numberToString(value)); 36597 } else if (typeof value === "boolean") { 36598 buffer.push(value.toString()); 36599 } else if (value instanceof Dict) { 36600 await writeDict(value, buffer, transform); 36601 } else if (value instanceof BaseStream) { 36602 await writeStream(value, buffer, transform); 36603 } else if (value === null) { 36604 buffer.push("null"); 36605 } else { 36606 warn(`Unhandled value in writer: ${typeof value}, please file a bug.`); 36607 } 36608} 36609function writeInt(number, size, offset, buffer) { 36610 for (let i = size + offset - 1; i > offset - 1; i--) { 36611 buffer[i] = number & 0xff; 36612 number >>= 8; 36613 } 36614 return offset + size; 36615} 36616function writeString(string, offset, buffer) { 36617 for (let i = 0, len = string.length; i < len; i++) { 36618 buffer[offset + i] = string.charCodeAt(i) & 0xff; 36619 } 36620} 36621function computeMD5(filesize, xrefInfo) { 36622 const time = Math.floor(Date.now() / 1000); 36623 const filename = xrefInfo.filename || ""; 36624 const md5Buffer = [time.toString(), filename, filesize.toString()]; 36625 let md5BufferLen = md5Buffer.reduce((a, str) => a + str.length, 0); 36626 for (const value of Object.values(xrefInfo.info)) { 36627 md5Buffer.push(value); 36628 md5BufferLen += value.length; 36629 } 36630 const array = new Uint8Array(md5BufferLen); 36631 let offset = 0; 36632 for (const str of md5Buffer) { 36633 writeString(str, offset, array); 36634 offset += str.length; 36635 } 36636 return bytesToString(calculateMD5(array)); 36637} 36638function writeXFADataForAcroform(str, newRefs) { 36639 const xml = new SimpleXMLParser({ 36640 hasAttributes: true 36641 }).parseFromString(str); 36642 for (const { 36643 xfa 36644 } of newRefs) { 36645 if (!xfa) { 36646 continue; 36647 } 36648 const { 36649 path, 36650 value 36651 } = xfa; 36652 if (!path) { 36653 continue; 36654 } 36655 const nodePath = parseXFAPath(path); 36656 let node = xml.documentElement.searchNode(nodePath, 0); 36657 if (!node && nodePath.length > 1) { 36658 node = xml.documentElement.searchNode([nodePath.at(-1)], 0); 36659 } 36660 if (node) { 36661 node.childNodes = Array.isArray(value) ? value.map(val => new SimpleDOMNode("value", val)) : [new SimpleDOMNode("#text", value)]; 36662 } else { 36663 warn(`Node not found for path: ${path}`); 36664 } 36665 } 36666 const buffer = []; 36667 xml.documentElement.dump(buffer); 36668 return buffer.join(""); 36669} 36670async function updateAcroform({ 36671 xref, 36672 acroForm, 36673 acroFormRef, 36674 hasXfa, 36675 hasXfaDatasetsEntry, 36676 xfaDatasetsRef, 36677 needAppearances, 36678 newRefs 36679}) { 36680 if (hasXfa && !hasXfaDatasetsEntry && !xfaDatasetsRef) { 36681 warn("XFA - Cannot save it"); 36682 } 36683 if (!needAppearances && (!hasXfa || !xfaDatasetsRef || hasXfaDatasetsEntry)) { 36684 return; 36685 } 36686 const dict = acroForm.clone(); 36687 if (hasXfa && !hasXfaDatasetsEntry) { 36688 const newXfa = acroForm.get("XFA").slice(); 36689 newXfa.splice(2, 0, "datasets"); 36690 newXfa.splice(3, 0, xfaDatasetsRef); 36691 dict.set("XFA", newXfa); 36692 } 36693 if (needAppearances) { 36694 dict.set("NeedAppearances", true); 36695 } 36696 const buffer = []; 36697 await writeObject(acroFormRef, dict, buffer, xref); 36698 newRefs.push({ 36699 ref: acroFormRef, 36700 data: buffer.join("") 36701 }); 36702} 36703function updateXFA({ 36704 xfaData, 36705 xfaDatasetsRef, 36706 newRefs, 36707 xref 36708}) { 36709 if (xfaData === null) { 36710 const datasets = xref.fetchIfRef(xfaDatasetsRef); 36711 xfaData = writeXFADataForAcroform(datasets.getString(), newRefs); 36712 } 36713 const encrypt = xref.encrypt; 36714 if (encrypt) { 36715 const transform = encrypt.createCipherTransform(xfaDatasetsRef.num, xfaDatasetsRef.gen); 36716 xfaData = transform.encryptString(xfaData); 36717 } 36718 const data = `${xfaDatasetsRef.num} ${xfaDatasetsRef.gen} obj\n` + `<< /Type /EmbeddedFile /Length ${xfaData.length}>>\nstream\n` + xfaData + "\nendstream\nendobj\n"; 36719 newRefs.push({ 36720 ref: xfaDatasetsRef, 36721 data 36722 }); 36723} 36724async function getXRefTable(xrefInfo, baseOffset, newRefs, newXref, buffer) { 36725 buffer.push("xref\n"); 36726 const indexes = getIndexes(newRefs); 36727 let indexesPosition = 0; 36728 for (const { 36729 ref, 36730 data 36731 } of newRefs) { 36732 if (ref.num === indexes[indexesPosition]) { 36733 buffer.push(`${indexes[indexesPosition]} ${indexes[indexesPosition + 1]}\n`); 36734 indexesPosition += 2; 36735 } 36736 if (data !== null) { 36737 buffer.push(`${baseOffset.toString().padStart(10, "0")} ${Math.min(ref.gen, 0xffff).toString().padStart(5, "0")} n\r\n`); 36738 baseOffset += data.length; 36739 } else { 36740 buffer.push(`0000000000 ${Math.min(ref.gen + 1, 0xffff).toString().padStart(5, "0")} f\r\n`); 36741 } 36742 } 36743 computeIDs(baseOffset, xrefInfo, newXref); 36744 buffer.push("trailer\n"); 36745 await writeDict(newXref, buffer); 36746 buffer.push("\nstartxref\n", baseOffset.toString(), "\n%%EOF\n"); 36747} 36748function getIndexes(newRefs) { 36749 const indexes = []; 36750 for (const { 36751 ref 36752 } of newRefs) { 36753 if (ref.num === indexes.at(-2) + indexes.at(-1)) { 36754 indexes[indexes.length - 1] += 1; 36755 } else { 36756 indexes.push(ref.num, 1); 36757 } 36758 } 36759 return indexes; 36760} 36761async function getXRefStreamTable(xrefInfo, baseOffset, newRefs, newXref, buffer) { 36762 const xrefTableData = []; 36763 let maxOffset = 0; 36764 let maxGen = 0; 36765 for (const { 36766 ref, 36767 data 36768 } of newRefs) { 36769 let gen; 36770 maxOffset = Math.max(maxOffset, baseOffset); 36771 if (data !== null) { 36772 gen = Math.min(ref.gen, 0xffff); 36773 xrefTableData.push([1, baseOffset, gen]); 36774 baseOffset += data.length; 36775 } else { 36776 gen = Math.min(ref.gen + 1, 0xffff); 36777 xrefTableData.push([0, 0, gen]); 36778 } 36779 maxGen = Math.max(maxGen, gen); 36780 } 36781 newXref.set("Index", getIndexes(newRefs)); 36782 const offsetSize = getSizeInBytes(maxOffset); 36783 const maxGenSize = getSizeInBytes(maxGen); 36784 const sizes = [1, offsetSize, maxGenSize]; 36785 newXref.set("W", sizes); 36786 computeIDs(baseOffset, xrefInfo, newXref); 36787 const structSize = sizes.reduce((a, x) => a + x, 0); 36788 const data = new Uint8Array(structSize * xrefTableData.length); 36789 const stream = new Stream(data); 36790 stream.dict = newXref; 36791 let offset = 0; 36792 for (const [type, objOffset, gen] of xrefTableData) { 36793 offset = writeInt(type, sizes[0], offset, data); 36794 offset = writeInt(objOffset, sizes[1], offset, data); 36795 offset = writeInt(gen, sizes[2], offset, data); 36796 } 36797 await writeObject(xrefInfo.newRef, stream, buffer, {}); 36798 buffer.push("startxref\n", baseOffset.toString(), "\n%%EOF\n"); 36799} 36800function computeIDs(baseOffset, xrefInfo, newXref) { 36801 if (Array.isArray(xrefInfo.fileIds) && xrefInfo.fileIds.length > 0) { 36802 const md5 = computeMD5(baseOffset, xrefInfo); 36803 newXref.set("ID", [xrefInfo.fileIds[0], md5]); 36804 } 36805} 36806function getTrailerDict(xrefInfo, newRefs, useXrefStream) { 36807 const newXref = new Dict(null); 36808 newXref.set("Prev", xrefInfo.startXRef); 36809 const refForXrefTable = xrefInfo.newRef; 36810 if (useXrefStream) { 36811 newRefs.push({ 36812 ref: refForXrefTable, 36813 data: "" 36814 }); 36815 newXref.set("Size", refForXrefTable.num + 1); 36816 newXref.set("Type", Name.get("XRef")); 36817 } else { 36818 newXref.set("Size", refForXrefTable.num); 36819 } 36820 if (xrefInfo.rootRef !== null) { 36821 newXref.set("Root", xrefInfo.rootRef); 36822 } 36823 if (xrefInfo.infoRef !== null) { 36824 newXref.set("Info", xrefInfo.infoRef); 36825 } 36826 if (xrefInfo.encryptRef !== null) { 36827 newXref.set("Encrypt", xrefInfo.encryptRef); 36828 } 36829 return newXref; 36830} 36831async function incrementalUpdate({ 36832 originalData, 36833 xrefInfo, 36834 newRefs, 36835 xref = null, 36836 hasXfa = false, 36837 xfaDatasetsRef = null, 36838 hasXfaDatasetsEntry = false, 36839 needAppearances, 36840 acroFormRef = null, 36841 acroForm = null, 36842 xfaData = null, 36843 useXrefStream = false 36844}) { 36845 await updateAcroform({ 36846 xref, 36847 acroForm, 36848 acroFormRef, 36849 hasXfa, 36850 hasXfaDatasetsEntry, 36851 xfaDatasetsRef, 36852 needAppearances, 36853 newRefs 36854 }); 36855 if (hasXfa) { 36856 updateXFA({ 36857 xfaData, 36858 xfaDatasetsRef, 36859 newRefs, 36860 xref 36861 }); 36862 } 36863 const buffer = []; 36864 let baseOffset = originalData.length; 36865 const lastByte = originalData.at(-1); 36866 if (lastByte !== 0x0a && lastByte !== 0x0d) { 36867 buffer.push("\n"); 36868 baseOffset += 1; 36869 } 36870 const newXref = getTrailerDict(xrefInfo, newRefs, useXrefStream); 36871 newRefs = newRefs.sort((a, b) => a.ref.num - b.ref.num); 36872 for (const { 36873 data 36874 } of newRefs) { 36875 if (data !== null) { 36876 buffer.push(data); 36877 } 36878 } 36879 await (useXrefStream ? getXRefStreamTable(xrefInfo, baseOffset, newRefs, newXref, buffer) : getXRefTable(xrefInfo, baseOffset, newRefs, newXref, buffer)); 36880 const totalLength = buffer.reduce((a, str) => a + str.length, originalData.length); 36881 const array = new Uint8Array(totalLength); 36882 array.set(originalData); 36883 let offset = originalData.length; 36884 for (const str of buffer) { 36885 writeString(str, offset, array); 36886 offset += str.length; 36887 } 36888 return array; 36889} 36890 36891;// ./src/core/struct_tree.js 36892 36893 36894 36895 36896 36897const MAX_DEPTH = 40; 36898const StructElementType = { 36899 PAGE_CONTENT: 1, 36900 STREAM_CONTENT: 2, 36901 OBJECT: 3, 36902 ANNOTATION: 4, 36903 ELEMENT: 5 36904}; 36905class StructTreeRoot { 36906 constructor(rootDict, rootRef) { 36907 this.dict = rootDict; 36908 this.ref = rootRef instanceof Ref ? rootRef : null; 36909 this.roleMap = new Map(); 36910 this.structParentIds = null; 36911 } 36912 init() { 36913 this.readRoleMap(); 36914 } 36915 #addIdToPage(pageRef, id, type) { 36916 if (!(pageRef instanceof Ref) || id < 0) { 36917 return; 36918 } 36919 this.structParentIds ||= new RefSetCache(); 36920 let ids = this.structParentIds.get(pageRef); 36921 if (!ids) { 36922 ids = []; 36923 this.structParentIds.put(pageRef, ids); 36924 } 36925 ids.push([id, type]); 36926 } 36927 addAnnotationIdToPage(pageRef, id) { 36928 this.#addIdToPage(pageRef, id, StructElementType.ANNOTATION); 36929 } 36930 readRoleMap() { 36931 const roleMapDict = this.dict.get("RoleMap"); 36932 if (!(roleMapDict instanceof Dict)) { 36933 return; 36934 } 36935 roleMapDict.forEach((key, value) => { 36936 if (!(value instanceof Name)) { 36937 return; 36938 } 36939 this.roleMap.set(key, value.name); 36940 }); 36941 } 36942 static async canCreateStructureTree({ 36943 catalogRef, 36944 pdfManager, 36945 newAnnotationsByPage 36946 }) { 36947 if (!(catalogRef instanceof Ref)) { 36948 warn("Cannot save the struct tree: no catalog reference."); 36949 return false; 36950 } 36951 let nextKey = 0; 36952 let hasNothingToUpdate = true; 36953 for (const [pageIndex, elements] of newAnnotationsByPage) { 36954 const { 36955 ref: pageRef 36956 } = await pdfManager.getPage(pageIndex); 36957 if (!(pageRef instanceof Ref)) { 36958 warn(`Cannot save the struct tree: page ${pageIndex} has no ref.`); 36959 hasNothingToUpdate = true; 36960 break; 36961 } 36962 for (const element of elements) { 36963 if (element.accessibilityData?.type) { 36964 element.parentTreeId = nextKey++; 36965 hasNothingToUpdate = false; 36966 } 36967 } 36968 } 36969 if (hasNothingToUpdate) { 36970 for (const elements of newAnnotationsByPage.values()) { 36971 for (const element of elements) { 36972 delete element.parentTreeId; 36973 } 36974 } 36975 return false; 36976 } 36977 return true; 36978 } 36979 static async createStructureTree({ 36980 newAnnotationsByPage, 36981 xref, 36982 catalogRef, 36983 pdfManager, 36984 newRefs 36985 }) { 36986 const root = pdfManager.catalog.cloneDict(); 36987 const cache = new RefSetCache(); 36988 cache.put(catalogRef, root); 36989 const structTreeRootRef = xref.getNewTemporaryRef(); 36990 root.set("StructTreeRoot", structTreeRootRef); 36991 const structTreeRoot = new Dict(xref); 36992 structTreeRoot.set("Type", Name.get("StructTreeRoot")); 36993 const parentTreeRef = xref.getNewTemporaryRef(); 36994 structTreeRoot.set("ParentTree", parentTreeRef); 36995 const kids = []; 36996 structTreeRoot.set("K", kids); 36997 cache.put(structTreeRootRef, structTreeRoot); 36998 const parentTree = new Dict(xref); 36999 const nums = []; 37000 parentTree.set("Nums", nums); 37001 const nextKey = await this.#writeKids({ 37002 newAnnotationsByPage, 37003 structTreeRootRef, 37004 structTreeRoot: null, 37005 kids, 37006 nums, 37007 xref, 37008 pdfManager, 37009 newRefs, 37010 cache 37011 }); 37012 structTreeRoot.set("ParentTreeNextKey", nextKey); 37013 cache.put(parentTreeRef, parentTree); 37014 const buffer = []; 37015 for (const [ref, obj] of cache.items()) { 37016 buffer.length = 0; 37017 await writeObject(ref, obj, buffer, xref); 37018 newRefs.push({ 37019 ref, 37020 data: buffer.join("") 37021 }); 37022 } 37023 } 37024 async canUpdateStructTree({ 37025 pdfManager, 37026 xref, 37027 newAnnotationsByPage 37028 }) { 37029 if (!this.ref) { 37030 warn("Cannot update the struct tree: no root reference."); 37031 return false; 37032 } 37033 let nextKey = this.dict.get("ParentTreeNextKey"); 37034 if (!Number.isInteger(nextKey) || nextKey < 0) { 37035 warn("Cannot update the struct tree: invalid next key."); 37036 return false; 37037 } 37038 const parentTree = this.dict.get("ParentTree"); 37039 if (!(parentTree instanceof Dict)) { 37040 warn("Cannot update the struct tree: ParentTree isn't a dict."); 37041 return false; 37042 } 37043 const nums = parentTree.get("Nums"); 37044 if (!Array.isArray(nums)) { 37045 warn("Cannot update the struct tree: nums isn't an array."); 37046 return false; 37047 } 37048 const numberTree = new NumberTree(parentTree, xref); 37049 for (const pageIndex of newAnnotationsByPage.keys()) { 37050 const { 37051 pageDict 37052 } = await pdfManager.getPage(pageIndex); 37053 if (!pageDict.has("StructParents")) { 37054 continue; 37055 } 37056 const id = pageDict.get("StructParents"); 37057 if (!Number.isInteger(id) || !Array.isArray(numberTree.get(id))) { 37058 warn(`Cannot save the struct tree: page ${pageIndex} has a wrong id.`); 37059 return false; 37060 } 37061 } 37062 let hasNothingToUpdate = true; 37063 for (const [pageIndex, elements] of newAnnotationsByPage) { 37064 const { 37065 pageDict 37066 } = await pdfManager.getPage(pageIndex); 37067 StructTreeRoot.#collectParents({ 37068 elements, 37069 xref: this.dict.xref, 37070 pageDict, 37071 numberTree 37072 }); 37073 for (const element of elements) { 37074 if (element.accessibilityData?.type) { 37075 if (!(element.accessibilityData.structParent >= 0)) { 37076 element.parentTreeId = nextKey++; 37077 } 37078 hasNothingToUpdate = false; 37079 } 37080 } 37081 } 37082 if (hasNothingToUpdate) { 37083 for (const elements of newAnnotationsByPage.values()) { 37084 for (const element of elements) { 37085 delete element.parentTreeId; 37086 delete element.structTreeParent; 37087 } 37088 } 37089 return false; 37090 } 37091 return true; 37092 } 37093 async updateStructureTree({ 37094 newAnnotationsByPage, 37095 pdfManager, 37096 newRefs 37097 }) { 37098 const xref = this.dict.xref; 37099 const structTreeRoot = this.dict.clone(); 37100 const structTreeRootRef = this.ref; 37101 const cache = new RefSetCache(); 37102 cache.put(structTreeRootRef, structTreeRoot); 37103 let parentTreeRef = structTreeRoot.getRaw("ParentTree"); 37104 let parentTree; 37105 if (parentTreeRef instanceof Ref) { 37106 parentTree = xref.fetch(parentTreeRef); 37107 } else { 37108 parentTree = parentTreeRef; 37109 parentTreeRef = xref.getNewTemporaryRef(); 37110 structTreeRoot.set("ParentTree", parentTreeRef); 37111 } 37112 parentTree = parentTree.clone(); 37113 cache.put(parentTreeRef, parentTree); 37114 let nums = parentTree.getRaw("Nums"); 37115 let numsRef = null; 37116 if (nums instanceof Ref) { 37117 numsRef = nums; 37118 nums = xref.fetch(numsRef); 37119 } 37120 nums = nums.slice(); 37121 if (!numsRef) { 37122 parentTree.set("Nums", nums); 37123 } 37124 const newNextKey = await StructTreeRoot.#writeKids({ 37125 newAnnotationsByPage, 37126 structTreeRootRef, 37127 structTreeRoot: this, 37128 kids: null, 37129 nums, 37130 xref, 37131 pdfManager, 37132 newRefs, 37133 cache 37134 }); 37135 if (newNextKey === -1) { 37136 return; 37137 } 37138 structTreeRoot.set("ParentTreeNextKey", newNextKey); 37139 if (numsRef) { 37140 cache.put(numsRef, nums); 37141 } 37142 const buffer = []; 37143 for (const [ref, obj] of cache.items()) { 37144 buffer.length = 0; 37145 await writeObject(ref, obj, buffer, xref); 37146 newRefs.push({ 37147 ref, 37148 data: buffer.join("") 37149 }); 37150 } 37151 } 37152 static async #writeKids({ 37153 newAnnotationsByPage, 37154 structTreeRootRef, 37155 structTreeRoot, 37156 kids, 37157 nums, 37158 xref, 37159 pdfManager, 37160 newRefs, 37161 cache 37162 }) { 37163 const objr = Name.get("OBJR"); 37164 let nextKey = -1; 37165 let structTreePageObjs; 37166 const buffer = []; 37167 for (const [pageIndex, elements] of newAnnotationsByPage) { 37168 const page = await pdfManager.getPage(pageIndex); 37169 const { 37170 ref: pageRef 37171 } = page; 37172 const isPageRef = pageRef instanceof Ref; 37173 for (const { 37174 accessibilityData, 37175 ref, 37176 parentTreeId, 37177 structTreeParent 37178 } of elements) { 37179 if (!accessibilityData?.type) { 37180 continue; 37181 } 37182 const { 37183 structParent 37184 } = accessibilityData; 37185 if (structTreeRoot && Number.isInteger(structParent) && structParent >= 0) { 37186 let objs = (structTreePageObjs ||= new Map()).get(pageIndex); 37187 if (objs === undefined) { 37188 const structTreePage = new StructTreePage(structTreeRoot, page.pageDict); 37189 objs = structTreePage.collectObjects(pageRef); 37190 structTreePageObjs.set(pageIndex, objs); 37191 } 37192 const objRef = objs?.get(structParent); 37193 if (objRef) { 37194 const tagDict = xref.fetch(objRef).clone(); 37195 StructTreeRoot.#writeProperties(tagDict, accessibilityData); 37196 buffer.length = 0; 37197 await writeObject(objRef, tagDict, buffer, xref); 37198 newRefs.push({ 37199 ref: objRef, 37200 data: buffer.join("") 37201 }); 37202 continue; 37203 } 37204 } 37205 nextKey = Math.max(nextKey, parentTreeId); 37206 const tagRef = xref.getNewTemporaryRef(); 37207 const tagDict = new Dict(xref); 37208 StructTreeRoot.#writeProperties(tagDict, accessibilityData); 37209 await this.#updateParentTag({ 37210 structTreeParent, 37211 tagDict, 37212 newTagRef: tagRef, 37213 structTreeRootRef, 37214 fallbackKids: kids, 37215 xref, 37216 cache 37217 }); 37218 const objDict = new Dict(xref); 37219 tagDict.set("K", objDict); 37220 objDict.set("Type", objr); 37221 if (isPageRef) { 37222 objDict.set("Pg", pageRef); 37223 } 37224 objDict.set("Obj", ref); 37225 cache.put(tagRef, tagDict); 37226 nums.push(parentTreeId, tagRef); 37227 } 37228 } 37229 return nextKey + 1; 37230 } 37231 static #writeProperties(tagDict, { 37232 type, 37233 title, 37234 lang, 37235 alt, 37236 expanded, 37237 actualText 37238 }) { 37239 tagDict.set("S", Name.get(type)); 37240 if (title) { 37241 tagDict.set("T", stringToAsciiOrUTF16BE(title)); 37242 } 37243 if (lang) { 37244 tagDict.set("Lang", stringToAsciiOrUTF16BE(lang)); 37245 } 37246 if (alt) { 37247 tagDict.set("Alt", stringToAsciiOrUTF16BE(alt)); 37248 } 37249 if (expanded) { 37250 tagDict.set("E", stringToAsciiOrUTF16BE(expanded)); 37251 } 37252 if (actualText) { 37253 tagDict.set("ActualText", stringToAsciiOrUTF16BE(actualText)); 37254 } 37255 } 37256 static #collectParents({ 37257 elements, 37258 xref, 37259 pageDict, 37260 numberTree 37261 }) { 37262 const idToElements = new Map(); 37263 for (const element of elements) { 37264 if (element.structTreeParentId) { 37265 const id = parseInt(element.structTreeParentId.split("_mc")[1], 10); 37266 let elems = idToElements.get(id); 37267 if (!elems) { 37268 elems = []; 37269 idToElements.set(id, elems); 37270 } 37271 elems.push(element); 37272 } 37273 } 37274 const id = pageDict.get("StructParents"); 37275 if (!Number.isInteger(id)) { 37276 return; 37277 } 37278 const parentArray = numberTree.get(id); 37279 const updateElement = (kid, pageKid, kidRef) => { 37280 const elems = idToElements.get(kid); 37281 if (elems) { 37282 const parentRef = pageKid.getRaw("P"); 37283 const parentDict = xref.fetchIfRef(parentRef); 37284 if (parentRef instanceof Ref && parentDict instanceof Dict) { 37285 const params = { 37286 ref: kidRef, 37287 dict: pageKid 37288 }; 37289 for (const element of elems) { 37290 element.structTreeParent = params; 37291 } 37292 } 37293 return true; 37294 } 37295 return false; 37296 }; 37297 for (const kidRef of parentArray) { 37298 if (!(kidRef instanceof Ref)) { 37299 continue; 37300 } 37301 const pageKid = xref.fetch(kidRef); 37302 const k = pageKid.get("K"); 37303 if (Number.isInteger(k)) { 37304 updateElement(k, pageKid, kidRef); 37305 continue; 37306 } 37307 if (!Array.isArray(k)) { 37308 continue; 37309 } 37310 for (let kid of k) { 37311 kid = xref.fetchIfRef(kid); 37312 if (Number.isInteger(kid) && updateElement(kid, pageKid, kidRef)) { 37313 break; 37314 } 37315 if (!(kid instanceof Dict)) { 37316 continue; 37317 } 37318 if (!isName(kid.get("Type"), "MCR")) { 37319 break; 37320 } 37321 const mcid = kid.get("MCID"); 37322 if (Number.isInteger(mcid) && updateElement(mcid, pageKid, kidRef)) { 37323 break; 37324 } 37325 } 37326 } 37327 } 37328 static async #updateParentTag({ 37329 structTreeParent, 37330 tagDict, 37331 newTagRef, 37332 structTreeRootRef, 37333 fallbackKids, 37334 xref, 37335 cache 37336 }) { 37337 let ref = null; 37338 let parentRef; 37339 if (structTreeParent) { 37340 ({ 37341 ref 37342 } = structTreeParent); 37343 parentRef = structTreeParent.dict.getRaw("P") || structTreeRootRef; 37344 } else { 37345 parentRef = structTreeRootRef; 37346 } 37347 tagDict.set("P", parentRef); 37348 const parentDict = xref.fetchIfRef(parentRef); 37349 if (!parentDict) { 37350 fallbackKids.push(newTagRef); 37351 return; 37352 } 37353 let cachedParentDict = cache.get(parentRef); 37354 if (!cachedParentDict) { 37355 cachedParentDict = parentDict.clone(); 37356 cache.put(parentRef, cachedParentDict); 37357 } 37358 const parentKidsRaw = cachedParentDict.getRaw("K"); 37359 let cachedParentKids = parentKidsRaw instanceof Ref ? cache.get(parentKidsRaw) : null; 37360 if (!cachedParentKids) { 37361 cachedParentKids = xref.fetchIfRef(parentKidsRaw); 37362 cachedParentKids = Array.isArray(cachedParentKids) ? cachedParentKids.slice() : [parentKidsRaw]; 37363 const parentKidsRef = xref.getNewTemporaryRef(); 37364 cachedParentDict.set("K", parentKidsRef); 37365 cache.put(parentKidsRef, cachedParentKids); 37366 } 37367 const index = cachedParentKids.indexOf(ref); 37368 cachedParentKids.splice(index >= 0 ? index + 1 : cachedParentKids.length, 0, newTagRef); 37369 } 37370} 37371class StructElementNode { 37372 constructor(tree, dict) { 37373 this.tree = tree; 37374 this.dict = dict; 37375 this.kids = []; 37376 this.parseKids(); 37377 } 37378 get role() { 37379 const nameObj = this.dict.get("S"); 37380 const name = nameObj instanceof Name ? nameObj.name : ""; 37381 const { 37382 root 37383 } = this.tree; 37384 if (root.roleMap.has(name)) { 37385 return root.roleMap.get(name); 37386 } 37387 return name; 37388 } 37389 parseKids() { 37390 let pageObjId = null; 37391 const objRef = this.dict.getRaw("Pg"); 37392 if (objRef instanceof Ref) { 37393 pageObjId = objRef.toString(); 37394 } 37395 const kids = this.dict.get("K"); 37396 if (Array.isArray(kids)) { 37397 for (const kid of kids) { 37398 const element = this.parseKid(pageObjId, kid); 37399 if (element) { 37400 this.kids.push(element); 37401 } 37402 } 37403 } else { 37404 const element = this.parseKid(pageObjId, kids); 37405 if (element) { 37406 this.kids.push(element); 37407 } 37408 } 37409 } 37410 parseKid(pageObjId, kid) { 37411 if (Number.isInteger(kid)) { 37412 if (this.tree.pageDict.objId !== pageObjId) { 37413 return null; 37414 } 37415 return new StructElement({ 37416 type: StructElementType.PAGE_CONTENT, 37417 mcid: kid, 37418 pageObjId 37419 }); 37420 } 37421 let kidDict = null; 37422 if (kid instanceof Ref) { 37423 kidDict = this.dict.xref.fetch(kid); 37424 } else if (kid instanceof Dict) { 37425 kidDict = kid; 37426 } 37427 if (!kidDict) { 37428 return null; 37429 } 37430 const pageRef = kidDict.getRaw("Pg"); 37431 if (pageRef instanceof Ref) { 37432 pageObjId = pageRef.toString(); 37433 } 37434 const type = kidDict.get("Type") instanceof Name ? kidDict.get("Type").name : null; 37435 if (type === "MCR") { 37436 if (this.tree.pageDict.objId !== pageObjId) { 37437 return null; 37438 } 37439 const kidRef = kidDict.getRaw("Stm"); 37440 return new StructElement({ 37441 type: StructElementType.STREAM_CONTENT, 37442 refObjId: kidRef instanceof Ref ? kidRef.toString() : null, 37443 pageObjId, 37444 mcid: kidDict.get("MCID") 37445 }); 37446 } 37447 if (type === "OBJR") { 37448 if (this.tree.pageDict.objId !== pageObjId) { 37449 return null; 37450 } 37451 const kidRef = kidDict.getRaw("Obj"); 37452 return new StructElement({ 37453 type: StructElementType.OBJECT, 37454 refObjId: kidRef instanceof Ref ? kidRef.toString() : null, 37455 pageObjId 37456 }); 37457 } 37458 return new StructElement({ 37459 type: StructElementType.ELEMENT, 37460 dict: kidDict 37461 }); 37462 } 37463} 37464class StructElement { 37465 constructor({ 37466 type, 37467 dict = null, 37468 mcid = null, 37469 pageObjId = null, 37470 refObjId = null 37471 }) { 37472 this.type = type; 37473 this.dict = dict; 37474 this.mcid = mcid; 37475 this.pageObjId = pageObjId; 37476 this.refObjId = refObjId; 37477 this.parentNode = null; 37478 } 37479} 37480class StructTreePage { 37481 constructor(structTreeRoot, pageDict) { 37482 this.root = structTreeRoot; 37483 this.rootDict = structTreeRoot ? structTreeRoot.dict : null; 37484 this.pageDict = pageDict; 37485 this.nodes = []; 37486 } 37487 collectObjects(pageRef) { 37488 if (!this.root || !this.rootDict || !(pageRef instanceof Ref)) { 37489 return null; 37490 } 37491 const parentTree = this.rootDict.get("ParentTree"); 37492 if (!parentTree) { 37493 return null; 37494 } 37495 const ids = this.root.structParentIds?.get(pageRef); 37496 if (!ids) { 37497 return null; 37498 } 37499 const map = new Map(); 37500 const numberTree = new NumberTree(parentTree, this.rootDict.xref); 37501 for (const [elemId] of ids) { 37502 const obj = numberTree.getRaw(elemId); 37503 if (obj instanceof Ref) { 37504 map.set(elemId, obj); 37505 } 37506 } 37507 return map; 37508 } 37509 parse(pageRef) { 37510 if (!this.root || !this.rootDict || !(pageRef instanceof Ref)) { 37511 return; 37512 } 37513 const parentTree = this.rootDict.get("ParentTree"); 37514 if (!parentTree) { 37515 return; 37516 } 37517 const id = this.pageDict.get("StructParents"); 37518 const ids = this.root.structParentIds?.get(pageRef); 37519 if (!Number.isInteger(id) && !ids) { 37520 return; 37521 } 37522 const map = new Map(); 37523 const numberTree = new NumberTree(parentTree, this.rootDict.xref); 37524 if (Number.isInteger(id)) { 37525 const parentArray = numberTree.get(id); 37526 if (Array.isArray(parentArray)) { 37527 for (const ref of parentArray) { 37528 if (ref instanceof Ref) { 37529 this.addNode(this.rootDict.xref.fetch(ref), map); 37530 } 37531 } 37532 } 37533 } 37534 if (!ids) { 37535 return; 37536 } 37537 for (const [elemId, type] of ids) { 37538 const obj = numberTree.get(elemId); 37539 if (obj) { 37540 const elem = this.addNode(this.rootDict.xref.fetchIfRef(obj), map); 37541 if (elem?.kids?.length === 1 && elem.kids[0].type === StructElementType.OBJECT) { 37542 elem.kids[0].type = type; 37543 } 37544 } 37545 } 37546 } 37547 addNode(dict, map, level = 0) { 37548 if (level > MAX_DEPTH) { 37549 warn("StructTree MAX_DEPTH reached."); 37550 return null; 37551 } 37552 if (!(dict instanceof Dict)) { 37553 return null; 37554 } 37555 if (map.has(dict)) { 37556 return map.get(dict); 37557 } 37558 const element = new StructElementNode(this, dict); 37559 map.set(dict, element); 37560 const parent = dict.get("P"); 37561 if (!parent || isName(parent.get("Type"), "StructTreeRoot")) { 37562 if (!this.addTopLevelNode(dict, element)) { 37563 map.delete(dict); 37564 } 37565 return element; 37566 } 37567 const parentNode = this.addNode(parent, map, level + 1); 37568 if (!parentNode) { 37569 return element; 37570 } 37571 let save = false; 37572 for (const kid of parentNode.kids) { 37573 if (kid.type === StructElementType.ELEMENT && kid.dict === dict) { 37574 kid.parentNode = element; 37575 save = true; 37576 } 37577 } 37578 if (!save) { 37579 map.delete(dict); 37580 } 37581 return element; 37582 } 37583 addTopLevelNode(dict, element) { 37584 const obj = this.rootDict.get("K"); 37585 if (!obj) { 37586 return false; 37587 } 37588 if (obj instanceof Dict) { 37589 if (obj.objId !== dict.objId) { 37590 return false; 37591 } 37592 this.nodes[0] = element; 37593 return true; 37594 } 37595 if (!Array.isArray(obj)) { 37596 return true; 37597 } 37598 let save = false; 37599 for (let i = 0; i < obj.length; i++) { 37600 const kidRef = obj[i]; 37601 if (kidRef?.toString() === dict.objId) { 37602 this.nodes[i] = element; 37603 save = true; 37604 } 37605 } 37606 return save; 37607 } 37608 get serializable() { 37609 function nodeToSerializable(node, parent, level = 0) { 37610 if (level > MAX_DEPTH) { 37611 warn("StructTree too deep to be fully serialized."); 37612 return; 37613 } 37614 const obj = Object.create(null); 37615 obj.role = node.role; 37616 obj.children = []; 37617 parent.children.push(obj); 37618 let alt = node.dict.get("Alt"); 37619 if (typeof alt !== "string") { 37620 alt = node.dict.get("ActualText"); 37621 } 37622 if (typeof alt === "string") { 37623 obj.alt = stringToPDFString(alt); 37624 } 37625 const a = node.dict.get("A"); 37626 if (a instanceof Dict) { 37627 const bbox = lookupNormalRect(a.getArray("BBox"), null); 37628 if (bbox) { 37629 obj.bbox = bbox; 37630 } else { 37631 const width = a.get("Width"); 37632 const height = a.get("Height"); 37633 if (typeof width === "number" && width > 0 && typeof height === "number" && height > 0) { 37634 obj.bbox = [0, 0, width, height]; 37635 } 37636 } 37637 } 37638 const lang = node.dict.get("Lang"); 37639 if (typeof lang === "string") { 37640 obj.lang = stringToPDFString(lang); 37641 } 37642 for (const kid of node.kids) {
vendor: 3,984 bytes, lines 37643-37797
37643 const kidElement = kid.type === StructElementType.ELEMENT ? kid.parentNode : null; 37644 if (kidElement) { 37645 nodeToSerializable(kidElement, obj, level + 1); 37646 continue; 37647 } else if (kid.type === StructElementType.PAGE_CONTENT || kid.type === StructElementType.STREAM_CONTENT) { 37648 obj.children.push({ 37649 type: "content", 37650 id: `p${kid.pageObjId}_mc${kid.mcid}` 37651 }); 37652 } else if (kid.type === StructElementType.OBJECT) { 37653 obj.children.push({ 37654 type: "object", 37655 id: kid.refObjId 37656 }); 37657 } else if (kid.type === StructElementType.ANNOTATION) { 37658 obj.children.push({ 37659 type: "annotation", 37660 id: `${AnnotationPrefix}${kid.refObjId}` 37661 }); 37662 } 37663 } 37664 } 37665 const root = Object.create(null); 37666 root.children = []; 37667 root.role = "Root"; 37668 for (const child of this.nodes) { 37669 if (!child) { 37670 continue; 37671 } 37672 nodeToSerializable(child, root); 37673 } 37674 return root; 37675 } 37676} 37677 37678;// ./src/core/catalog.js 37679 37680 37681 37682 37683 37684 37685 37686 37687 37688 37689 37690function isValidExplicitDest(dest) { 37691 if (!Array.isArray(dest) || dest.length < 2) { 37692 return false; 37693 } 37694 const [page, zoom, ...args] = dest; 37695 if (!(page instanceof Ref) && !Number.isInteger(page)) { 37696 return false; 37697 } 37698 if (!(zoom instanceof Name)) { 37699 return false; 37700 } 37701 const argsLen = args.length; 37702 let allowNull = true; 37703 switch (zoom.name) { 37704 case "XYZ": 37705 if (argsLen < 2 || argsLen > 3) { 37706 return false; 37707 } 37708 break; 37709 case "Fit": 37710 case "FitB": 37711 return argsLen === 0; 37712 case "FitH": 37713 case "FitBH": 37714 case "FitV": 37715 case "FitBV": 37716 if (argsLen > 1) { 37717 return false; 37718 } 37719 break; 37720 case "FitR": 37721 if (argsLen !== 4) { 37722 return false; 37723 } 37724 allowNull = false; 37725 break; 37726 default: 37727 return false; 37728 } 37729 for (const arg of args) { 37730 if (!(typeof arg === "number" || allowNull && arg === null)) { 37731 return false; 37732 } 37733 } 37734 return true; 37735} 37736function fetchDest(dest) { 37737 if (dest instanceof Dict) { 37738 dest = dest.get("D"); 37739 } 37740 return isValidExplicitDest(dest) ? dest : null; 37741} 37742function fetchRemoteDest(action) { 37743 let dest = action.get("D"); 37744 if (dest) { 37745 if (dest instanceof Name) { 37746 dest = dest.name; 37747 } 37748 if (typeof dest === "string") { 37749 return stringToPDFString(dest); 37750 } else if (isValidExplicitDest(dest)) { 37751 return JSON.stringify(dest); 37752 } 37753 } 37754 return null; 37755} 37756class Catalog { 37757 constructor(pdfManager, xref) { 37758 this.pdfManager = pdfManager; 37759 this.xref = xref; 37760 this._catDict = xref.getCatalogObj(); 37761 if (!(this._catDict instanceof Dict)) { 37762 throw new FormatError("Catalog object is not a dictionary."); 37763 } 37764 this.toplevelPagesDict; 37765 this._actualNumPages = null; 37766 this.fontCache = new RefSetCache(); 37767 this.builtInCMapCache = new Map(); 37768 this.standardFontDataCache = new Map(); 37769 this.globalImageCache = new GlobalImageCache(); 37770 this.pageKidsCountCache = new RefSetCache(); 37771 this.pageIndexCache = new RefSetCache(); 37772 this.pageDictCache = new RefSetCache(); 37773 this.nonBlendModesSet = new RefSet(); 37774 this.systemFontCache = new Map(); 37775 } 37776 cloneDict() { 37777 return this._catDict.clone(); 37778 } 37779 get version() { 37780 const version = this._catDict.get("Version"); 37781 if (version instanceof Name) { 37782 if (PDF_VERSION_REGEXP.test(version.name)) { 37783 return shadow(this, "version", version.name); 37784 } 37785 warn(`Invalid PDF catalog version: ${version.name}`); 37786 } 37787 return shadow(this, "version", null); 37788 } 37789 get lang() { 37790 const lang = this._catDict.get("Lang"); 37791 return shadow(this, "lang", lang && typeof lang === "string" ? stringToPDFString(lang) : null); 37792 } 37793 get needsRendering() { 37794 const needsRendering = this._catDict.get("NeedsRendering"); 37795 return shadow(this, "needsRendering", typeof needsRendering === "boolean" ? needsRendering : false); 37796 } 37797 get collection() {
vendor: 22,482 bytes, lines 37798-38565
37798 let collection = null; 37799 try { 37800 const obj = this._catDict.get("Collection"); 37801 if (obj instanceof Dict && obj.size > 0) { 37802 collection = obj; 37803 } 37804 } catch (ex) { 37805 if (ex instanceof MissingDataException) { 37806 throw ex; 37807 } 37808 info("Cannot fetch Collection entry; assuming no collection is present."); 37809 } 37810 return shadow(this, "collection", collection); 37811 } 37812 get acroForm() { 37813 let acroForm = null; 37814 try { 37815 const obj = this._catDict.get("AcroForm"); 37816 if (obj instanceof Dict && obj.size > 0) { 37817 acroForm = obj; 37818 } 37819 } catch (ex) { 37820 if (ex instanceof MissingDataException) { 37821 throw ex; 37822 } 37823 info("Cannot fetch AcroForm entry; assuming no forms are present."); 37824 } 37825 return shadow(this, "acroForm", acroForm); 37826 } 37827 get acroFormRef() { 37828 const value = this._catDict.getRaw("AcroForm"); 37829 return shadow(this, "acroFormRef", value instanceof Ref ? value : null); 37830 } 37831 get metadata() { 37832 const streamRef = this._catDict.getRaw("Metadata"); 37833 if (!(streamRef instanceof Ref)) { 37834 return shadow(this, "metadata", null); 37835 } 37836 let metadata = null; 37837 try { 37838 const stream = this.xref.fetch(streamRef, !this.xref.encrypt?.encryptMetadata); 37839 if (stream instanceof BaseStream && stream.dict instanceof Dict) { 37840 const type = stream.dict.get("Type"); 37841 const subtype = stream.dict.get("Subtype"); 37842 if (isName(type, "Metadata") && isName(subtype, "XML")) { 37843 const data = stringToUTF8String(stream.getString()); 37844 if (data) { 37845 metadata = new MetadataParser(data).serializable; 37846 } 37847 } 37848 } 37849 } catch (ex) { 37850 if (ex instanceof MissingDataException) { 37851 throw ex; 37852 } 37853 info(`Skipping invalid Metadata: "${ex}".`); 37854 } 37855 return shadow(this, "metadata", metadata); 37856 } 37857 get markInfo() { 37858 let markInfo = null; 37859 try { 37860 markInfo = this._readMarkInfo(); 37861 } catch (ex) { 37862 if (ex instanceof MissingDataException) { 37863 throw ex; 37864 } 37865 warn("Unable to read mark info."); 37866 } 37867 return shadow(this, "markInfo", markInfo); 37868 } 37869 _readMarkInfo() { 37870 const obj = this._catDict.get("MarkInfo"); 37871 if (!(obj instanceof Dict)) { 37872 return null; 37873 } 37874 const markInfo = { 37875 Marked: false, 37876 UserProperties: false, 37877 Suspects: false 37878 }; 37879 for (const key in markInfo) { 37880 const value = obj.get(key); 37881 if (typeof value === "boolean") { 37882 markInfo[key] = value; 37883 } 37884 } 37885 return markInfo; 37886 } 37887 get structTreeRoot() { 37888 let structTree = null; 37889 try { 37890 structTree = this._readStructTreeRoot(); 37891 } catch (ex) { 37892 if (ex instanceof MissingDataException) { 37893 throw ex; 37894 } 37895 warn("Unable read to structTreeRoot info."); 37896 } 37897 return shadow(this, "structTreeRoot", structTree); 37898 } 37899 _readStructTreeRoot() { 37900 const rawObj = this._catDict.getRaw("StructTreeRoot"); 37901 const obj = this.xref.fetchIfRef(rawObj); 37902 if (!(obj instanceof Dict)) { 37903 return null; 37904 } 37905 const root = new StructTreeRoot(obj, rawObj); 37906 root.init(); 37907 return root; 37908 } 37909 get toplevelPagesDict() { 37910 const pagesObj = this._catDict.get("Pages"); 37911 if (!(pagesObj instanceof Dict)) { 37912 throw new FormatError("Invalid top-level pages dictionary."); 37913 } 37914 return shadow(this, "toplevelPagesDict", pagesObj); 37915 } 37916 get documentOutline() { 37917 let obj = null; 37918 try { 37919 obj = this._readDocumentOutline(); 37920 } catch (ex) { 37921 if (ex instanceof MissingDataException) { 37922 throw ex; 37923 } 37924 warn("Unable to read document outline."); 37925 } 37926 return shadow(this, "documentOutline", obj); 37927 } 37928 _readDocumentOutline() { 37929 let obj = this._catDict.get("Outlines"); 37930 if (!(obj instanceof Dict)) { 37931 return null; 37932 } 37933 obj = obj.getRaw("First"); 37934 if (!(obj instanceof Ref)) { 37935 return null; 37936 } 37937 const root = { 37938 items: [] 37939 }; 37940 const queue = [{ 37941 obj, 37942 parent: root 37943 }]; 37944 const processed = new RefSet(); 37945 processed.put(obj); 37946 const xref = this.xref, 37947 blackColor = new Uint8ClampedArray(3); 37948 while (queue.length > 0) { 37949 const i = queue.shift(); 37950 const outlineDict = xref.fetchIfRef(i.obj); 37951 if (outlineDict === null) { 37952 continue; 37953 } 37954 if (!outlineDict.has("Title")) { 37955 warn("Invalid outline item encountered."); 37956 } 37957 const data = { 37958 url: null, 37959 dest: null, 37960 action: null 37961 }; 37962 Catalog.parseDestDictionary({ 37963 destDict: outlineDict, 37964 resultObj: data, 37965 docBaseUrl: this.baseUrl, 37966 docAttachments: this.attachments 37967 }); 37968 const title = outlineDict.get("Title"); 37969 const flags = outlineDict.get("F") || 0; 37970 const color = outlineDict.getArray("C"); 37971 const count = outlineDict.get("Count"); 37972 let rgbColor = blackColor; 37973 if (isNumberArray(color, 3) && (color[0] !== 0 || color[1] !== 0 || color[2] !== 0)) { 37974 rgbColor = ColorSpace.singletons.rgb.getRgb(color, 0); 37975 } 37976 const outlineItem = { 37977 action: data.action, 37978 attachment: data.attachment, 37979 dest: data.dest, 37980 url: data.url, 37981 unsafeUrl: data.unsafeUrl, 37982 newWindow: data.newWindow, 37983 setOCGState: data.setOCGState, 37984 title: typeof title === "string" ? stringToPDFString(title) : "", 37985 color: rgbColor, 37986 count: Number.isInteger(count) ? count : undefined, 37987 bold: !!(flags & 2), 37988 italic: !!(flags & 1), 37989 items: [] 37990 }; 37991 i.parent.items.push(outlineItem); 37992 obj = outlineDict.getRaw("First"); 37993 if (obj instanceof Ref && !processed.has(obj)) { 37994 queue.push({ 37995 obj, 37996 parent: outlineItem 37997 }); 37998 processed.put(obj); 37999 } 38000 obj = outlineDict.getRaw("Next"); 38001 if (obj instanceof Ref && !processed.has(obj)) { 38002 queue.push({ 38003 obj, 38004 parent: i.parent 38005 }); 38006 processed.put(obj); 38007 } 38008 } 38009 return root.items.length > 0 ? root.items : null; 38010 } 38011 get permissions() { 38012 let permissions = null; 38013 try { 38014 permissions = this._readPermissions(); 38015 } catch (ex) { 38016 if (ex instanceof MissingDataException) { 38017 throw ex; 38018 } 38019 warn("Unable to read permissions."); 38020 } 38021 return shadow(this, "permissions", permissions); 38022 } 38023 _readPermissions() { 38024 const encrypt = this.xref.trailer.get("Encrypt"); 38025 if (!(encrypt instanceof Dict)) { 38026 return null; 38027 } 38028 let flags = encrypt.get("P"); 38029 if (typeof flags !== "number") { 38030 return null; 38031 } 38032 flags += 2 ** 32; 38033 const permissions = []; 38034 for (const key in PermissionFlag) { 38035 const value = PermissionFlag[key]; 38036 if (flags & value) { 38037 permissions.push(value); 38038 } 38039 } 38040 return permissions; 38041 } 38042 get optionalContentConfig() { 38043 let config = null; 38044 try { 38045 const properties = this._catDict.get("OCProperties"); 38046 if (!properties) { 38047 return shadow(this, "optionalContentConfig", null); 38048 } 38049 const defaultConfig = properties.get("D"); 38050 if (!defaultConfig) { 38051 return shadow(this, "optionalContentConfig", null); 38052 } 38053 const groupsData = properties.get("OCGs"); 38054 if (!Array.isArray(groupsData)) { 38055 return shadow(this, "optionalContentConfig", null); 38056 } 38057 const groupRefCache = new RefSetCache(); 38058 for (const groupRef of groupsData) { 38059 if (!(groupRef instanceof Ref) || groupRefCache.has(groupRef)) { 38060 continue; 38061 } 38062 groupRefCache.put(groupRef, this.#readOptionalContentGroup(groupRef)); 38063 } 38064 config = this.#readOptionalContentConfig(defaultConfig, groupRefCache); 38065 } catch (ex) { 38066 if (ex instanceof MissingDataException) { 38067 throw ex; 38068 } 38069 warn(`Unable to read optional content config: ${ex}`); 38070 } 38071 return shadow(this, "optionalContentConfig", config); 38072 } 38073 #readOptionalContentGroup(groupRef) { 38074 const group = this.xref.fetch(groupRef); 38075 const obj = { 38076 id: groupRef.toString(), 38077 name: null, 38078 intent: null, 38079 usage: { 38080 print: null, 38081 view: null 38082 }, 38083 rbGroups: [] 38084 }; 38085 const name = group.get("Name"); 38086 if (typeof name === "string") { 38087 obj.name = stringToPDFString(name); 38088 } 38089 let intent = group.getArray("Intent"); 38090 if (!Array.isArray(intent)) { 38091 intent = [intent]; 38092 } 38093 if (intent.every(i => i instanceof Name)) { 38094 obj.intent = intent.map(i => i.name); 38095 } 38096 const usage = group.get("Usage"); 38097 if (!(usage instanceof Dict)) { 38098 return obj; 38099 } 38100 const usageObj = obj.usage; 38101 const print = usage.get("Print"); 38102 if (print instanceof Dict) { 38103 const printState = print.get("PrintState"); 38104 if (printState instanceof Name) { 38105 switch (printState.name) { 38106 case "ON": 38107 case "OFF": 38108 usageObj.print = { 38109 printState: printState.name 38110 }; 38111 } 38112 } 38113 } 38114 const view = usage.get("View"); 38115 if (view instanceof Dict) { 38116 const viewState = view.get("ViewState"); 38117 if (viewState instanceof Name) { 38118 switch (viewState.name) { 38119 case "ON": 38120 case "OFF": 38121 usageObj.view = { 38122 viewState: viewState.name 38123 }; 38124 } 38125 } 38126 } 38127 return obj; 38128 } 38129 #readOptionalContentConfig(config, groupRefCache) { 38130 function parseOnOff(refs) { 38131 const onParsed = []; 38132 if (Array.isArray(refs)) { 38133 for (const value of refs) { 38134 if (!(value instanceof Ref)) { 38135 continue; 38136 } 38137 if (groupRefCache.has(value)) { 38138 onParsed.push(value.toString()); 38139 } 38140 } 38141 } 38142 return onParsed; 38143 } 38144 function parseOrder(refs, nestedLevels = 0) { 38145 if (!Array.isArray(refs)) { 38146 return null; 38147 } 38148 const order = []; 38149 for (const value of refs) { 38150 if (value instanceof Ref && groupRefCache.has(value)) { 38151 parsedOrderRefs.put(value); 38152 order.push(value.toString()); 38153 continue; 38154 } 38155 const nestedOrder = parseNestedOrder(value, nestedLevels); 38156 if (nestedOrder) { 38157 order.push(nestedOrder); 38158 } 38159 } 38160 if (nestedLevels > 0) { 38161 return order; 38162 } 38163 const hiddenGroups = []; 38164 for (const [groupRef] of groupRefCache.items()) { 38165 if (parsedOrderRefs.has(groupRef)) { 38166 continue; 38167 } 38168 hiddenGroups.push(groupRef.toString()); 38169 } 38170 if (hiddenGroups.length) { 38171 order.push({ 38172 name: null, 38173 order: hiddenGroups 38174 }); 38175 } 38176 return order; 38177 } 38178 function parseNestedOrder(ref, nestedLevels) { 38179 if (++nestedLevels > MAX_NESTED_LEVELS) { 38180 warn("parseNestedOrder - reached MAX_NESTED_LEVELS."); 38181 return null; 38182 } 38183 const value = xref.fetchIfRef(ref); 38184 if (!Array.isArray(value)) { 38185 return null; 38186 } 38187 const nestedName = xref.fetchIfRef(value[0]); 38188 if (typeof nestedName !== "string") { 38189 return null; 38190 } 38191 const nestedOrder = parseOrder(value.slice(1), nestedLevels); 38192 if (!nestedOrder || !nestedOrder.length) { 38193 return null; 38194 } 38195 return { 38196 name: stringToPDFString(nestedName), 38197 order: nestedOrder 38198 }; 38199 } 38200 function parseRBGroups(rbGroups) { 38201 if (!Array.isArray(rbGroups)) { 38202 return; 38203 } 38204 for (const value of rbGroups) { 38205 const rbGroup = xref.fetchIfRef(value); 38206 if (!Array.isArray(rbGroup) || !rbGroup.length) { 38207 continue; 38208 } 38209 const parsedRbGroup = new Set(); 38210 for (const ref of rbGroup) { 38211 if (ref instanceof Ref && groupRefCache.has(ref) && !parsedRbGroup.has(ref.toString())) { 38212 parsedRbGroup.add(ref.toString()); 38213 groupRefCache.get(ref).rbGroups.push(parsedRbGroup); 38214 } 38215 } 38216 } 38217 } 38218 const xref = this.xref, 38219 parsedOrderRefs = new RefSet(), 38220 MAX_NESTED_LEVELS = 10; 38221 parseRBGroups(config.get("RBGroups")); 38222 return { 38223 name: typeof config.get("Name") === "string" ? stringToPDFString(config.get("Name")) : null, 38224 creator: typeof config.get("Creator") === "string" ? stringToPDFString(config.get("Creator")) : null, 38225 baseState: config.get("BaseState") instanceof Name ? config.get("BaseState").name : null, 38226 on: parseOnOff(config.get("ON")), 38227 off: parseOnOff(config.get("OFF")), 38228 order: parseOrder(config.get("Order")), 38229 groups: [...groupRefCache] 38230 }; 38231 } 38232 setActualNumPages(num = null) { 38233 this._actualNumPages = num; 38234 } 38235 get hasActualNumPages() { 38236 return this._actualNumPages !== null; 38237 } 38238 get _pagesCount() { 38239 const obj = this.toplevelPagesDict.get("Count"); 38240 if (!Number.isInteger(obj)) { 38241 throw new FormatError("Page count in top-level pages dictionary is not an integer."); 38242 } 38243 return shadow(this, "_pagesCount", obj); 38244 } 38245 get numPages() { 38246 return this.hasActualNumPages ? this._actualNumPages : this._pagesCount; 38247 } 38248 get destinations() { 38249 const obj = this._readDests(), 38250 dests = Object.create(null); 38251 if (obj instanceof NameTree) { 38252 for (const [key, value] of obj.getAll()) { 38253 const dest = fetchDest(value); 38254 if (dest) { 38255 dests[stringToPDFString(key)] = dest; 38256 } 38257 } 38258 } else if (obj instanceof Dict) { 38259 obj.forEach(function (key, value) { 38260 const dest = fetchDest(value); 38261 if (dest) { 38262 dests[key] = dest; 38263 } 38264 }); 38265 } 38266 return shadow(this, "destinations", dests); 38267 } 38268 getDestination(id) { 38269 const obj = this._readDests(); 38270 if (obj instanceof NameTree) { 38271 const dest = fetchDest(obj.get(id)); 38272 if (dest) { 38273 return dest; 38274 } 38275 const allDest = this.destinations[id]; 38276 if (allDest) { 38277 warn(`Found "${id}" at an incorrect position in the NameTree.`); 38278 return allDest; 38279 } 38280 } else if (obj instanceof Dict) { 38281 const dest = fetchDest(obj.get(id)); 38282 if (dest) { 38283 return dest; 38284 } 38285 } 38286 return null; 38287 } 38288 _readDests() { 38289 const obj = this._catDict.get("Names"); 38290 if (obj?.has("Dests")) { 38291 return new NameTree(obj.getRaw("Dests"), this.xref); 38292 } else if (this._catDict.has("Dests")) { 38293 return this._catDict.get("Dests"); 38294 } 38295 return undefined; 38296 } 38297 get pageLabels() { 38298 let obj = null; 38299 try { 38300 obj = this._readPageLabels(); 38301 } catch (ex) { 38302 if (ex instanceof MissingDataException) { 38303 throw ex; 38304 } 38305 warn("Unable to read page labels."); 38306 } 38307 return shadow(this, "pageLabels", obj); 38308 } 38309 _readPageLabels() { 38310 const obj = this._catDict.getRaw("PageLabels"); 38311 if (!obj) { 38312 return null; 38313 } 38314 const pageLabels = new Array(this.numPages); 38315 let style = null, 38316 prefix = ""; 38317 const numberTree = new NumberTree(obj, this.xref); 38318 const nums = numberTree.getAll(); 38319 let currentLabel = "", 38320 currentIndex = 1; 38321 for (let i = 0, ii = this.numPages; i < ii; i++) { 38322 const labelDict = nums.get(i); 38323 if (labelDict !== undefined) { 38324 if (!(labelDict instanceof Dict)) { 38325 throw new FormatError("PageLabel is not a dictionary."); 38326 } 38327 if (labelDict.has("Type") && !isName(labelDict.get("Type"), "PageLabel")) { 38328 throw new FormatError("Invalid type in PageLabel dictionary."); 38329 } 38330 if (labelDict.has("S")) { 38331 const s = labelDict.get("S"); 38332 if (!(s instanceof Name)) { 38333 throw new FormatError("Invalid style in PageLabel dictionary."); 38334 } 38335 style = s.name; 38336 } else { 38337 style = null; 38338 } 38339 if (labelDict.has("P")) { 38340 const p = labelDict.get("P"); 38341 if (typeof p !== "string") { 38342 throw new FormatError("Invalid prefix in PageLabel dictionary."); 38343 } 38344 prefix = stringToPDFString(p); 38345 } else { 38346 prefix = ""; 38347 } 38348 if (labelDict.has("St")) { 38349 const st = labelDict.get("St"); 38350 if (!(Number.isInteger(st) && st >= 1)) { 38351 throw new FormatError("Invalid start in PageLabel dictionary."); 38352 } 38353 currentIndex = st; 38354 } else { 38355 currentIndex = 1; 38356 } 38357 } 38358 switch (style) { 38359 case "D": 38360 currentLabel = currentIndex; 38361 break; 38362 case "R": 38363 case "r": 38364 currentLabel = toRomanNumerals(currentIndex, style === "r"); 38365 break; 38366 case "A": 38367 case "a": 38368 const LIMIT = 26; 38369 const A_UPPER_CASE = 0x41, 38370 A_LOWER_CASE = 0x61; 38371 const baseCharCode = style === "a" ? A_LOWER_CASE : A_UPPER_CASE; 38372 const letterIndex = currentIndex - 1; 38373 const character = String.fromCharCode(baseCharCode + letterIndex % LIMIT); 38374 currentLabel = character.repeat(Math.floor(letterIndex / LIMIT) + 1); 38375 break; 38376 default: 38377 if (style) { 38378 throw new FormatError(`Invalid style "${style}" in PageLabel dictionary.`); 38379 } 38380 currentLabel = ""; 38381 } 38382 pageLabels[i] = prefix + currentLabel; 38383 currentIndex++; 38384 } 38385 return pageLabels; 38386 } 38387 get pageLayout() { 38388 const obj = this._catDict.get("PageLayout"); 38389 let pageLayout = ""; 38390 if (obj instanceof Name) { 38391 switch (obj.name) { 38392 case "SinglePage": 38393 case "OneColumn": 38394 case "TwoColumnLeft": 38395 case "TwoColumnRight": 38396 case "TwoPageLeft": 38397 case "TwoPageRight": 38398 pageLayout = obj.name; 38399 } 38400 } 38401 return shadow(this, "pageLayout", pageLayout); 38402 } 38403 get pageMode() { 38404 const obj = this._catDict.get("PageMode"); 38405 let pageMode = "UseNone"; 38406 if (obj instanceof Name) { 38407 switch (obj.name) { 38408 case "UseNone": 38409 case "UseOutlines": 38410 case "UseThumbs": 38411 case "FullScreen": 38412 case "UseOC": 38413 case "UseAttachments": 38414 pageMode = obj.name; 38415 } 38416 } 38417 return shadow(this, "pageMode", pageMode); 38418 } 38419 get viewerPreferences() { 38420 const obj = this._catDict.get("ViewerPreferences"); 38421 if (!(obj instanceof Dict)) { 38422 return shadow(this, "viewerPreferences", null); 38423 } 38424 let prefs = null; 38425 for (const key of obj.getKeys()) { 38426 const value = obj.get(key); 38427 let prefValue; 38428 switch (key) { 38429 case "HideToolbar": 38430 case "HideMenubar": 38431 case "HideWindowUI": 38432 case "FitWindow": 38433 case "CenterWindow": 38434 case "DisplayDocTitle": 38435 case "PickTrayByPDFSize": 38436 if (typeof value === "boolean") { 38437 prefValue = value; 38438 } 38439 break; 38440 case "NonFullScreenPageMode": 38441 if (value instanceof Name) { 38442 switch (value.name) { 38443 case "UseNone": 38444 case "UseOutlines": 38445 case "UseThumbs": 38446 case "UseOC": 38447 prefValue = value.name; 38448 break; 38449 default: 38450 prefValue = "UseNone"; 38451 } 38452 } 38453 break; 38454 case "Direction": 38455 if (value instanceof Name) { 38456 switch (value.name) { 38457 case "L2R": 38458 case "R2L": 38459 prefValue = value.name; 38460 break; 38461 default: 38462 prefValue = "L2R"; 38463 } 38464 } 38465 break; 38466 case "ViewArea": 38467 case "ViewClip": 38468 case "PrintArea": 38469 case "PrintClip": 38470 if (value instanceof Name) { 38471 switch (value.name) { 38472 case "MediaBox": 38473 case "CropBox": 38474 case "BleedBox": 38475 case "TrimBox": 38476 case "ArtBox": 38477 prefValue = value.name; 38478 break; 38479 default: 38480 prefValue = "CropBox"; 38481 } 38482 } 38483 break; 38484 case "PrintScaling": 38485 if (value instanceof Name) { 38486 switch (value.name) { 38487 case "None": 38488 case "AppDefault": 38489 prefValue = value.name; 38490 break; 38491 default: 38492 prefValue = "AppDefault"; 38493 } 38494 } 38495 break; 38496 case "Duplex": 38497 if (value instanceof Name) { 38498 switch (value.name) { 38499 case "Simplex": 38500 case "DuplexFlipShortEdge": 38501 case "DuplexFlipLongEdge": 38502 prefValue = value.name; 38503 break; 38504 default: 38505 prefValue = "None"; 38506 } 38507 } 38508 break; 38509 case "PrintPageRange": 38510 if (Array.isArray(value) && value.length % 2 === 0) { 38511 const isValid = value.every((page, i, arr) => Number.isInteger(page) && page > 0 && (i === 0 || page >= arr[i - 1]) && page <= this.numPages); 38512 if (isValid) { 38513 prefValue = value; 38514 } 38515 } 38516 break; 38517 case "NumCopies": 38518 if (Number.isInteger(value) && value > 0) { 38519 prefValue = value; 38520 } 38521 break; 38522 default: 38523 warn(`Ignoring non-standard key in ViewerPreferences: ${key}.`); 38524 continue; 38525 } 38526 if (prefValue === undefined) { 38527 warn(`Bad value, for key "${key}", in ViewerPreferences: ${value}.`); 38528 continue; 38529 } 38530 if (!prefs) { 38531 prefs = Object.create(null); 38532 } 38533 prefs[key] = prefValue; 38534 } 38535 return shadow(this, "viewerPreferences", prefs); 38536 } 38537 get openAction() { 38538 const obj = this._catDict.get("OpenAction"); 38539 const openAction = Object.create(null); 38540 if (obj instanceof Dict) { 38541 const destDict = new Dict(this.xref); 38542 destDict.set("A", obj); 38543 const resultObj = { 38544 url: null, 38545 dest: null, 38546 action: null 38547 }; 38548 Catalog.parseDestDictionary({ 38549 destDict, 38550 resultObj 38551 }); 38552 if (Array.isArray(resultObj.dest)) { 38553 openAction.dest = resultObj.dest; 38554 } else if (resultObj.action) { 38555 openAction.action = resultObj.action; 38556 } 38557 } else if (Array.isArray(obj)) { 38558 openAction.dest = obj; 38559 } 38560 return shadow(this, "openAction", objectSize(openAction) > 0 ? openAction : null); 38561 } 38562 get attachments() { 38563 const obj = this._catDict.get("Names"); 38564 let attachments = null; 38565 if (obj instanceof Dict && obj.has("EmbeddedFiles")) {
38566 const nameTree = new NameTree(obj.getRaw("EmbeddedFiles"), this.xref); 38567 for (const [key, value] of nameTree.getAll()) { 38568 const fs = new FileSpec(value, this.xref); 38569 if (!attachments) { 38570 attachments = Object.create(null); 38571 } 38572 attachments[stringToPDFString(key)] = fs.serializable; 38573 } 38574 } 38575 return shadow(this, "attachments", attachments); 38576 } 38577 get xfaImages() { 38578 const obj = this._catDict.get("Names"); 38579 let xfaImages = null; 38580 if (obj instanceof Dict && obj.has("XFAImages")) { 38581 const nameTree = new NameTree(obj.getRaw("XFAImages"), this.xref); 38582 for (const [key, value] of nameTree.getAll()) { 38583 if (!xfaImages) { 38584 xfaImages = new Dict(this.xref); 38585 } 38586 xfaImages.set(stringToPDFString(key), value); 38587 } 38588 } 38589 return shadow(this, "xfaImages", xfaImages); 38590 } 38591 _collectJavaScript() { 38592 const obj = this._catDict.get("Names"); 38593 let javaScript = null; 38594 function appendIfJavaScriptDict(name, jsDict) { 38595 if (!(jsDict instanceof Dict)) { 38596 return; 38597 } 38598 if (!isName(jsDict.get("S"), "JavaScript")) { 38599 return; 38600 } 38601 let js = jsDict.get("JS"); 38602 if (js instanceof BaseStream) { 38603 js = js.getString(); 38604 } else if (typeof js !== "string") { 38605 return; 38606 } 38607 js = stringToPDFString(js).replaceAll("\x00", ""); 38608 if (js) { 38609 (javaScript ||= new Map()).set(name, js); 38610 } 38611 } 38612 if (obj instanceof Dict && obj.has("JavaScript")) { 38613 const nameTree = new NameTree(obj.getRaw("JavaScript"), this.xref); 38614 for (const [key, value] of nameTree.getAll()) { 38615 appendIfJavaScriptDict(stringToPDFString(key), value); 38616 } 38617 } 38618 const openAction = this._catDict.get("OpenAction"); 38619 if (openAction) { 38620 appendIfJavaScriptDict("OpenAction", openAction); 38621 } 38622 return javaScript; 38623 } 38624 get jsActions() { 38625 const javaScript = this._collectJavaScript(); 38626 let actions = collectActions(this.xref, this._catDict, DocumentActionEventType); 38627 if (javaScript) { 38628 actions ||= Object.create(null); 38629 for (const [key, val] of javaScript) { 38630 if (key in actions) { 38631 actions[key].push(val); 38632 } else { 38633 actions[key] = [val]; 38634 } 38635 } 38636 } 38637 return shadow(this, "jsActions", actions); 38638 } 38639 async fontFallback(id, handler) { 38640 const translatedFonts = await Promise.all(this.fontCache); 38641 for (const translatedFont of translatedFonts) { 38642 if (translatedFont.loadedName === id) { 38643 translatedFont.fallback(handler); 38644 return; 38645 } 38646 } 38647 } 38648 async cleanup(manuallyTriggered = false) { 38649 clearGlobalCaches(); 38650 this.globalImageCache.clear(manuallyTriggered); 38651 this.pageKidsCountCache.clear(); 38652 this.pageIndexCache.clear(); 38653 this.pageDictCache.clear(); 38654 this.nonBlendModesSet.clear(); 38655 const translatedFonts = await Promise.all(this.fontCache); 38656 for (const { 38657 dict 38658 } of translatedFonts) { 38659 delete dict.cacheKey; 38660 } 38661 this.fontCache.clear(); 38662 this.builtInCMapCache.clear(); 38663 this.standardFontDataCache.clear(); 38664 this.systemFontCache.clear(); 38665 } 38666 async getPageDict(pageIndex) { 38667 const nodesToVisit = [this.toplevelPagesDict]; 38668 const visitedNodes = new RefSet(); 38669 const pagesRef = this._catDict.getRaw("Pages"); 38670 if (pagesRef instanceof Ref) { 38671 visitedNodes.put(pagesRef); 38672 } 38673 const xref = this.xref, 38674 pageKidsCountCache = this.pageKidsCountCache, 38675 pageIndexCache = this.pageIndexCache, 38676 pageDictCache = this.pageDictCache; 38677 let currentPageIndex = 0; 38678 while (nodesToVisit.length) { 38679 const currentNode = nodesToVisit.pop(); 38680 if (currentNode instanceof Ref) { 38681 const count = pageKidsCountCache.get(currentNode); 38682 if (count >= 0 && currentPageIndex + count <= pageIndex) { 38683 currentPageIndex += count; 38684 continue; 38685 } 38686 if (visitedNodes.has(currentNode)) { 38687 throw new FormatError("Pages tree contains circular reference."); 38688 } 38689 visitedNodes.put(currentNode); 38690 const obj = await (pageDictCache.get(currentNode) || xref.fetchAsync(currentNode)); 38691 if (obj instanceof Dict) { 38692 let type = obj.getRaw("Type"); 38693 if (type instanceof Ref) { 38694 type = await xref.fetchAsync(type); 38695 } 38696 if (isName(type, "Page") || !obj.has("Kids")) { 38697 if (!pageKidsCountCache.has(currentNode)) { 38698 pageKidsCountCache.put(currentNode, 1); 38699 } 38700 if (!pageIndexCache.has(currentNode)) { 38701 pageIndexCache.put(currentNode, currentPageIndex); 38702 } 38703 if (currentPageIndex === pageIndex) { 38704 return [obj, currentNode]; 38705 } 38706 currentPageIndex++; 38707 continue; 38708 } 38709 } 38710 nodesToVisit.push(obj); 38711 continue; 38712 } 38713 if (!(currentNode instanceof Dict)) { 38714 throw new FormatError("Page dictionary kid reference points to wrong type of object."); 38715 } 38716 const { 38717 objId 38718 } = currentNode; 38719 let count = currentNode.getRaw("Count"); 38720 if (count instanceof Ref) { 38721 count = await xref.fetchAsync(count); 38722 } 38723 if (Number.isInteger(count) && count >= 0) {
vendor: 14,715 bytes, lines 38724-39209
38724 if (objId && !pageKidsCountCache.has(objId)) { 38725 pageKidsCountCache.put(objId, count); 38726 } 38727 if (currentPageIndex + count <= pageIndex) { 38728 currentPageIndex += count; 38729 continue; 38730 } 38731 } 38732 let kids = currentNode.getRaw("Kids"); 38733 if (kids instanceof Ref) { 38734 kids = await xref.fetchAsync(kids); 38735 } 38736 if (!Array.isArray(kids)) { 38737 let type = currentNode.getRaw("Type"); 38738 if (type instanceof Ref) { 38739 type = await xref.fetchAsync(type); 38740 } 38741 if (isName(type, "Page") || !currentNode.has("Kids")) { 38742 if (currentPageIndex === pageIndex) { 38743 return [currentNode, null]; 38744 } 38745 currentPageIndex++; 38746 continue; 38747 } 38748 throw new FormatError("Page dictionary kids object is not an array."); 38749 } 38750 for (let last = kids.length - 1; last >= 0; last--) { 38751 const lastKid = kids[last]; 38752 nodesToVisit.push(lastKid); 38753 if (currentNode === this.toplevelPagesDict && lastKid instanceof Ref && !pageDictCache.has(lastKid)) { 38754 pageDictCache.put(lastKid, xref.fetchAsync(lastKid)); 38755 } 38756 } 38757 } 38758 throw new Error(`Page index ${pageIndex} not found.`); 38759 } 38760 async getAllPageDicts(recoveryMode = false) { 38761 const { 38762 ignoreErrors 38763 } = this.pdfManager.evaluatorOptions; 38764 const queue = [{ 38765 currentNode: this.toplevelPagesDict, 38766 posInKids: 0 38767 }]; 38768 const visitedNodes = new RefSet(); 38769 const pagesRef = this._catDict.getRaw("Pages"); 38770 if (pagesRef instanceof Ref) { 38771 visitedNodes.put(pagesRef); 38772 } 38773 const map = new Map(), 38774 xref = this.xref, 38775 pageIndexCache = this.pageIndexCache; 38776 let pageIndex = 0; 38777 function addPageDict(pageDict, pageRef) { 38778 if (pageRef && !pageIndexCache.has(pageRef)) { 38779 pageIndexCache.put(pageRef, pageIndex); 38780 } 38781 map.set(pageIndex++, [pageDict, pageRef]); 38782 } 38783 function addPageError(error) { 38784 if (error instanceof XRefEntryException && !recoveryMode) { 38785 throw error; 38786 } 38787 if (recoveryMode && ignoreErrors && pageIndex === 0) { 38788 warn(`getAllPageDicts - Skipping invalid first page: "${error}".`); 38789 error = Dict.empty; 38790 } 38791 map.set(pageIndex++, [error, null]); 38792 } 38793 while (queue.length > 0) { 38794 const queueItem = queue.at(-1); 38795 const { 38796 currentNode, 38797 posInKids 38798 } = queueItem; 38799 let kids = currentNode.getRaw("Kids"); 38800 if (kids instanceof Ref) { 38801 try { 38802 kids = await xref.fetchAsync(kids); 38803 } catch (ex) { 38804 addPageError(ex); 38805 break; 38806 } 38807 } 38808 if (!Array.isArray(kids)) { 38809 addPageError(new FormatError("Page dictionary kids object is not an array.")); 38810 break; 38811 } 38812 if (posInKids >= kids.length) { 38813 queue.pop(); 38814 continue; 38815 } 38816 const kidObj = kids[posInKids]; 38817 let obj; 38818 if (kidObj instanceof Ref) { 38819 if (visitedNodes.has(kidObj)) { 38820 addPageError(new FormatError("Pages tree contains circular reference.")); 38821 break; 38822 } 38823 visitedNodes.put(kidObj); 38824 try { 38825 obj = await xref.fetchAsync(kidObj); 38826 } catch (ex) { 38827 addPageError(ex); 38828 break; 38829 } 38830 } else { 38831 obj = kidObj; 38832 } 38833 if (!(obj instanceof Dict)) { 38834 addPageError(new FormatError("Page dictionary kid reference points to wrong type of object.")); 38835 break; 38836 } 38837 let type = obj.getRaw("Type"); 38838 if (type instanceof Ref) { 38839 try { 38840 type = await xref.fetchAsync(type); 38841 } catch (ex) { 38842 addPageError(ex); 38843 break; 38844 } 38845 } 38846 if (isName(type, "Page") || !obj.has("Kids")) { 38847 addPageDict(obj, kidObj instanceof Ref ? kidObj : null); 38848 } else { 38849 queue.push({ 38850 currentNode: obj, 38851 posInKids: 0 38852 }); 38853 } 38854 queueItem.posInKids++; 38855 } 38856 return map; 38857 } 38858 getPageIndex(pageRef) { 38859 const cachedPageIndex = this.pageIndexCache.get(pageRef); 38860 if (cachedPageIndex !== undefined) { 38861 return Promise.resolve(cachedPageIndex); 38862 } 38863 const xref = this.xref; 38864 function pagesBeforeRef(kidRef) { 38865 let total = 0, 38866 parentRef; 38867 return xref.fetchAsync(kidRef).then(function (node) { 38868 if (isRefsEqual(kidRef, pageRef) && !isDict(node, "Page") && !(node instanceof Dict && !node.has("Type") && node.has("Contents"))) { 38869 throw new FormatError("The reference does not point to a /Page dictionary."); 38870 } 38871 if (!node) { 38872 return null; 38873 } 38874 if (!(node instanceof Dict)) { 38875 throw new FormatError("Node must be a dictionary."); 38876 } 38877 parentRef = node.getRaw("Parent"); 38878 return node.getAsync("Parent"); 38879 }).then(function (parent) { 38880 if (!parent) { 38881 return null; 38882 } 38883 if (!(parent instanceof Dict)) { 38884 throw new FormatError("Parent must be a dictionary."); 38885 } 38886 return parent.getAsync("Kids"); 38887 }).then(function (kids) { 38888 if (!kids) { 38889 return null; 38890 } 38891 const kidPromises = []; 38892 let found = false; 38893 for (const kid of kids) { 38894 if (!(kid instanceof Ref)) { 38895 throw new FormatError("Kid must be a reference."); 38896 } 38897 if (isRefsEqual(kid, kidRef)) { 38898 found = true; 38899 break; 38900 } 38901 kidPromises.push(xref.fetchAsync(kid).then(function (obj) { 38902 if (!(obj instanceof Dict)) { 38903 throw new FormatError("Kid node must be a dictionary."); 38904 } 38905 if (obj.has("Count")) { 38906 total += obj.get("Count"); 38907 } else { 38908 total++; 38909 } 38910 })); 38911 } 38912 if (!found) { 38913 throw new FormatError("Kid reference not found in parent's kids."); 38914 } 38915 return Promise.all(kidPromises).then(function () { 38916 return [total, parentRef]; 38917 }); 38918 }); 38919 } 38920 let total = 0; 38921 const next = ref => pagesBeforeRef(ref).then(args => { 38922 if (!args) { 38923 this.pageIndexCache.put(pageRef, total); 38924 return total; 38925 } 38926 const [count, parentRef] = args; 38927 total += count; 38928 return next(parentRef); 38929 }); 38930 return next(pageRef); 38931 } 38932 get baseUrl() { 38933 const uri = this._catDict.get("URI"); 38934 if (uri instanceof Dict) { 38935 const base = uri.get("Base"); 38936 if (typeof base === "string") { 38937 const absoluteUrl = createValidAbsoluteUrl(base, null, { 38938 tryConvertEncoding: true 38939 }); 38940 if (absoluteUrl) { 38941 return shadow(this, "baseUrl", absoluteUrl.href); 38942 } 38943 } 38944 } 38945 return shadow(this, "baseUrl", this.pdfManager.docBaseUrl); 38946 } 38947 static parseDestDictionary({ 38948 destDict, 38949 resultObj, 38950 docBaseUrl = null, 38951 docAttachments = null 38952 }) { 38953 if (!(destDict instanceof Dict)) { 38954 warn("parseDestDictionary: `destDict` must be a dictionary."); 38955 return; 38956 } 38957 let action = destDict.get("A"), 38958 url, 38959 dest; 38960 if (!(action instanceof Dict)) { 38961 if (destDict.has("Dest")) { 38962 action = destDict.get("Dest"); 38963 } else { 38964 action = destDict.get("AA"); 38965 if (action instanceof Dict) { 38966 if (action.has("D")) { 38967 action = action.get("D"); 38968 } else if (action.has("U")) { 38969 action = action.get("U"); 38970 } 38971 } 38972 } 38973 } 38974 if (action instanceof Dict) { 38975 const actionType = action.get("S"); 38976 if (!(actionType instanceof Name)) { 38977 warn("parseDestDictionary: Invalid type in Action dictionary."); 38978 return; 38979 } 38980 const actionName = actionType.name; 38981 switch (actionName) { 38982 case "ResetForm": 38983 const flags = action.get("Flags"); 38984 const include = ((typeof flags === "number" ? flags : 0) & 1) === 0; 38985 const fields = []; 38986 const refs = []; 38987 for (const obj of action.get("Fields") || []) { 38988 if (obj instanceof Ref) { 38989 refs.push(obj.toString()); 38990 } else if (typeof obj === "string") { 38991 fields.push(stringToPDFString(obj)); 38992 } 38993 } 38994 resultObj.resetForm = { 38995 fields, 38996 refs, 38997 include 38998 }; 38999 break; 39000 case "URI": 39001 url = action.get("URI"); 39002 if (url instanceof Name) { 39003 url = "/" + url.name; 39004 } 39005 break; 39006 case "GoTo": 39007 dest = action.get("D"); 39008 break; 39009 case "Launch": 39010 case "GoToR": 39011 const urlDict = action.get("F"); 39012 if (urlDict instanceof Dict) { 39013 const fs = new FileSpec(urlDict, null, true); 39014 const { 39015 rawFilename 39016 } = fs.serializable; 39017 url = rawFilename; 39018 } else if (typeof urlDict === "string") { 39019 url = urlDict; 39020 } 39021 const remoteDest = fetchRemoteDest(action); 39022 if (remoteDest && typeof url === "string") { 39023 url = url.split("#", 1)[0] + "#" + remoteDest; 39024 } 39025 const newWindow = action.get("NewWindow"); 39026 if (typeof newWindow === "boolean") { 39027 resultObj.newWindow = newWindow; 39028 } 39029 break; 39030 case "GoToE": 39031 const target = action.get("T"); 39032 let attachment; 39033 if (docAttachments && target instanceof Dict) { 39034 const relationship = target.get("R"); 39035 const name = target.get("N"); 39036 if (isName(relationship, "C") && typeof name === "string") { 39037 attachment = docAttachments[stringToPDFString(name)]; 39038 } 39039 } 39040 if (attachment) { 39041 resultObj.attachment = attachment; 39042 const attachmentDest = fetchRemoteDest(action); 39043 if (attachmentDest) { 39044 resultObj.attachmentDest = attachmentDest; 39045 } 39046 } else { 39047 warn(`parseDestDictionary - unimplemented "GoToE" action.`); 39048 } 39049 break; 39050 case "Named": 39051 const namedAction = action.get("N"); 39052 if (namedAction instanceof Name) { 39053 resultObj.action = namedAction.name; 39054 } 39055 break; 39056 case "SetOCGState": 39057 const state = action.get("State"); 39058 const preserveRB = action.get("PreserveRB"); 39059 if (!Array.isArray(state) || state.length === 0) { 39060 break; 39061 } 39062 const stateArr = []; 39063 for (const elem of state) { 39064 if (elem instanceof Name) { 39065 switch (elem.name) { 39066 case "ON": 39067 case "OFF": 39068 case "Toggle": 39069 stateArr.push(elem.name); 39070 break; 39071 } 39072 } else if (elem instanceof Ref) { 39073 stateArr.push(elem.toString()); 39074 } 39075 } 39076 if (stateArr.length !== state.length) { 39077 break; 39078 } 39079 resultObj.setOCGState = { 39080 state: stateArr, 39081 preserveRB: typeof preserveRB === "boolean" ? preserveRB : true 39082 }; 39083 break; 39084 case "JavaScript": 39085 const jsAction = action.get("JS"); 39086 let js; 39087 if (jsAction instanceof BaseStream) { 39088 js = jsAction.getString(); 39089 } else if (typeof jsAction === "string") { 39090 js = jsAction; 39091 } 39092 const jsURL = js && recoverJsURL(stringToPDFString(js)); 39093 if (jsURL) { 39094 url = jsURL.url; 39095 resultObj.newWindow = jsURL.newWindow; 39096 break; 39097 } 39098 default: 39099 if (actionName === "JavaScript" || actionName === "SubmitForm") { 39100 break; 39101 } 39102 warn(`parseDestDictionary - unsupported action: "${actionName}".`); 39103 break; 39104 } 39105 } else if (destDict.has("Dest")) { 39106 dest = destDict.get("Dest"); 39107 } 39108 if (typeof url === "string") { 39109 const absoluteUrl = createValidAbsoluteUrl(url, docBaseUrl, { 39110 addDefaultProtocol: true, 39111 tryConvertEncoding: true 39112 }); 39113 if (absoluteUrl) { 39114 resultObj.url = absoluteUrl.href; 39115 } 39116 resultObj.unsafeUrl = url; 39117 } 39118 if (dest) { 39119 if (dest instanceof Name) { 39120 dest = dest.name; 39121 } 39122 if (typeof dest === "string") { 39123 resultObj.dest = stringToPDFString(dest); 39124 } else if (isValidExplicitDest(dest)) { 39125 resultObj.dest = dest; 39126 } 39127 } 39128 } 39129} 39130 39131;// ./src/core/object_loader.js 39132 39133 39134 39135 39136function mayHaveChildren(value) { 39137 return value instanceof Ref || value instanceof Dict || value instanceof BaseStream || Array.isArray(value); 39138} 39139function addChildren(node, nodesToVisit) { 39140 if (node instanceof Dict) { 39141 node = node.getRawValues(); 39142 } else if (node instanceof BaseStream) { 39143 node = node.dict.getRawValues(); 39144 } else if (!Array.isArray(node)) { 39145 return; 39146 } 39147 for (const rawValue of node) { 39148 if (mayHaveChildren(rawValue)) { 39149 nodesToVisit.push(rawValue); 39150 } 39151 } 39152} 39153class ObjectLoader { 39154 constructor(dict, keys, xref) { 39155 this.dict = dict; 39156 this.keys = keys; 39157 this.xref = xref; 39158 this.refSet = null; 39159 } 39160 async load() { 39161 if (this.xref.stream.isDataLoaded) { 39162 return undefined; 39163 } 39164 const { 39165 keys, 39166 dict 39167 } = this; 39168 this.refSet = new RefSet(); 39169 const nodesToVisit = []; 39170 for (const key of keys) { 39171 const rawValue = dict.getRaw(key); 39172 if (rawValue !== undefined) { 39173 nodesToVisit.push(rawValue); 39174 } 39175 } 39176 return this._walk(nodesToVisit); 39177 } 39178 async _walk(nodesToVisit) { 39179 const nodesToRevisit = []; 39180 const pendingRequests = []; 39181 while (nodesToVisit.length) { 39182 let currentNode = nodesToVisit.pop(); 39183 if (currentNode instanceof Ref) { 39184 if (this.refSet.has(currentNode)) { 39185 continue; 39186 } 39187 try { 39188 this.refSet.put(currentNode); 39189 currentNode = this.xref.fetch(currentNode); 39190 } catch (ex) { 39191 if (!(ex instanceof MissingDataException)) { 39192 warn(`ObjectLoader._walk - requesting all data: "${ex}".`); 39193 this.refSet = null; 39194 const { 39195 manager 39196 } = this.xref.stream; 39197 return manager.requestAllChunks(); 39198 } 39199 nodesToRevisit.push(currentNode); 39200 pendingRequests.push({ 39201 begin: ex.begin, 39202 end: ex.end 39203 }); 39204 } 39205 } 39206 if (currentNode instanceof BaseStream) { 39207 const baseStreams = currentNode.getBaseStreams(); 39208 if (baseStreams) { 39209 let foundMissingData = false;
vendor: 4,499 bytes, lines 39210-39379
39210 for (const stream of baseStreams) { 39211 if (stream.isDataLoaded) { 39212 continue; 39213 } 39214 foundMissingData = true; 39215 pendingRequests.push({ 39216 begin: stream.start, 39217 end: stream.end 39218 }); 39219 } 39220 if (foundMissingData) { 39221 nodesToRevisit.push(currentNode); 39222 } 39223 } 39224 } 39225 addChildren(currentNode, nodesToVisit); 39226 } 39227 if (pendingRequests.length) { 39228 await this.xref.stream.manager.requestRanges(pendingRequests); 39229 for (const node of nodesToRevisit) { 39230 if (node instanceof Ref) { 39231 this.refSet.remove(node); 39232 } 39233 } 39234 return this._walk(nodesToRevisit); 39235 } 39236 this.refSet = null; 39237 return undefined; 39238 } 39239} 39240 39241;// ./src/core/xfa/symbol_utils.js 39242const $acceptWhitespace = Symbol(); 39243const $addHTML = Symbol(); 39244const $appendChild = Symbol(); 39245const $childrenToHTML = Symbol(); 39246const $clean = Symbol(); 39247const $cleanPage = Symbol(); 39248const $cleanup = Symbol(); 39249const $clone = Symbol(); 39250const $consumed = Symbol(); 39251const $content = Symbol("content"); 39252const $data = Symbol("data"); 39253const $dump = Symbol(); 39254const $extra = Symbol("extra"); 39255const $finalize = Symbol(); 39256const $flushHTML = Symbol(); 39257const $getAttributeIt = Symbol(); 39258const $getAttributes = Symbol(); 39259const $getAvailableSpace = Symbol(); 39260const $getChildrenByClass = Symbol(); 39261const $getChildrenByName = Symbol(); 39262const $getChildrenByNameIt = Symbol(); 39263const $getDataValue = Symbol(); 39264const $getExtra = Symbol(); 39265const $getRealChildrenByNameIt = Symbol(); 39266const $getChildren = Symbol(); 39267const $getContainedChildren = Symbol(); 39268const $getNextPage = Symbol(); 39269const $getSubformParent = Symbol(); 39270const $getParent = Symbol(); 39271const $getTemplateRoot = Symbol(); 39272const $globalData = Symbol(); 39273const $hasSettableValue = Symbol(); 39274const $ids = Symbol(); 39275const $indexOf = Symbol(); 39276const $insertAt = Symbol(); 39277const $isCDATAXml = Symbol(); 39278const $isBindable = Symbol(); 39279const $isDataValue = Symbol(); 39280const $isDescendent = Symbol(); 39281const $isNsAgnostic = Symbol(); 39282const $isSplittable = Symbol(); 39283const $isThereMoreWidth = Symbol(); 39284const $isTransparent = Symbol(); 39285const $isUsable = Symbol(); 39286const $lastAttribute = Symbol(); 39287const $namespaceId = Symbol("namespaceId"); 39288const $nodeName = Symbol("nodeName"); 39289const $nsAttributes = Symbol(); 39290const $onChild = Symbol(); 39291const $onChildCheck = Symbol(); 39292const $onText = Symbol(); 39293const $pushGlyphs = Symbol(); 39294const $popPara = Symbol(); 39295const $pushPara = Symbol(); 39296const $removeChild = Symbol(); 39297const $root = Symbol("root"); 39298const $resolvePrototypes = Symbol(); 39299const $searchNode = Symbol(); 39300const $setId = Symbol(); 39301const $setSetAttributes = Symbol(); 39302const $setValue = Symbol(); 39303const $tabIndex = Symbol(); 39304const $text = Symbol(); 39305const $toPages = Symbol(); 39306const $toHTML = Symbol(); 39307const $toString = Symbol(); 39308const $toStyle = Symbol(); 39309const $uid = Symbol("uid"); 39310 39311;// ./src/core/xfa/namespaces.js 39312const $buildXFAObject = Symbol(); 39313const NamespaceIds = { 39314 config: { 39315 id: 0, 39316 check: ns => ns.startsWith("http://www.xfa.org/schema/xci/") 39317 }, 39318 connectionSet: { 39319 id: 1, 39320 check: ns => ns.startsWith("http://www.xfa.org/schema/xfa-connection-set/") 39321 }, 39322 datasets: { 39323 id: 2, 39324 check: ns => ns.startsWith("http://www.xfa.org/schema/xfa-data/") 39325 }, 39326 form: { 39327 id: 3, 39328 check: ns => ns.startsWith("http://www.xfa.org/schema/xfa-form/") 39329 }, 39330 localeSet: { 39331 id: 4, 39332 check: ns => ns.startsWith("http://www.xfa.org/schema/xfa-locale-set/") 39333 }, 39334 pdf: { 39335 id: 5, 39336 check: ns => ns === "http://ns.adobe.com/xdp/pdf/" 39337 }, 39338 signature: { 39339 id: 6, 39340 check: ns => ns === "http://www.w3.org/2000/09/xmldsig#" 39341 }, 39342 sourceSet: { 39343 id: 7, 39344 check: ns => ns.startsWith("http://www.xfa.org/schema/xfa-source-set/") 39345 }, 39346 stylesheet: { 39347 id: 8, 39348 check: ns => ns === "http://www.w3.org/1999/XSL/Transform" 39349 }, 39350 template: { 39351 id: 9, 39352 check: ns => ns.startsWith("http://www.xfa.org/schema/xfa-template/") 39353 }, 39354 xdc: { 39355 id: 10, 39356 check: ns => ns.startsWith("http://www.xfa.org/schema/xdc/") 39357 }, 39358 xdp: { 39359 id: 11, 39360 check: ns => ns === "http://ns.adobe.com/xdp/" 39361 }, 39362 xfdf: { 39363 id: 12, 39364 check: ns => ns === "http://ns.adobe.com/xfdf/" 39365 }, 39366 xhtml: { 39367 id: 13, 39368 check: ns => ns === "http://www.w3.org/1999/xhtml" 39369 }, 39370 xmpmeta: { 39371 id: 14, 39372 check: ns => ns === "http://ns.adobe.com/xmpmeta/" 39373 } 39374}; 39375 39376;// ./src/core/xfa/utils.js 39377 39378const dimConverters = { 39379 pt: x => x,
vendor: 10,488 bytes, lines 39380-39803
39380 cm: x => x / 2.54 * 72, 39381 mm: x => x / (10 * 2.54) * 72, 39382 in: x => x * 72, 39383 px: x => x 39384}; 39385const measurementPattern = /([+-]?\d+\.?\d*)(.*)/; 39386function stripQuotes(str) { 39387 if (str.startsWith("'") || str.startsWith('"')) { 39388 return str.slice(1, -1); 39389 } 39390 return str; 39391} 39392function getInteger({ 39393 data, 39394 defaultValue, 39395 validate 39396}) { 39397 if (!data) { 39398 return defaultValue; 39399 } 39400 data = data.trim(); 39401 const n = parseInt(data, 10); 39402 if (!isNaN(n) && validate(n)) { 39403 return n; 39404 } 39405 return defaultValue; 39406} 39407function getFloat({ 39408 data, 39409 defaultValue, 39410 validate 39411}) { 39412 if (!data) { 39413 return defaultValue; 39414 } 39415 data = data.trim(); 39416 const n = parseFloat(data); 39417 if (!isNaN(n) && validate(n)) { 39418 return n; 39419 } 39420 return defaultValue; 39421} 39422function getKeyword({ 39423 data, 39424 defaultValue, 39425 validate 39426}) { 39427 if (!data) { 39428 return defaultValue; 39429 } 39430 data = data.trim(); 39431 if (validate(data)) { 39432 return data; 39433 } 39434 return defaultValue; 39435} 39436function getStringOption(data, options) { 39437 return getKeyword({ 39438 data, 39439 defaultValue: options[0], 39440 validate: k => options.includes(k) 39441 }); 39442} 39443function getMeasurement(str, def = "0") { 39444 def ||= "0"; 39445 if (!str) { 39446 return getMeasurement(def); 39447 } 39448 const match = str.trim().match(measurementPattern); 39449 if (!match) { 39450 return getMeasurement(def); 39451 } 39452 const [, valueStr, unit] = match; 39453 const value = parseFloat(valueStr); 39454 if (isNaN(value)) { 39455 return getMeasurement(def); 39456 } 39457 if (value === 0) { 39458 return 0; 39459 } 39460 const conv = dimConverters[unit]; 39461 if (conv) { 39462 return conv(value); 39463 } 39464 return value; 39465} 39466function getRatio(data) { 39467 if (!data) { 39468 return { 39469 num: 1, 39470 den: 1 39471 }; 39472 } 39473 const ratio = data.trim().split(/\s*:\s*/).map(x => parseFloat(x)).filter(x => !isNaN(x)); 39474 if (ratio.length === 1) { 39475 ratio.push(1); 39476 } 39477 if (ratio.length === 0) { 39478 return { 39479 num: 1, 39480 den: 1 39481 }; 39482 } 39483 const [num, den] = ratio; 39484 return { 39485 num, 39486 den 39487 }; 39488} 39489function getRelevant(data) { 39490 if (!data) { 39491 return []; 39492 } 39493 return data.trim().split(/\s+/).map(e => ({ 39494 excluded: e[0] === "-", 39495 viewname: e.substring(1) 39496 })); 39497} 39498function getColor(data, def = [0, 0, 0]) { 39499 let [r, g, b] = def; 39500 if (!data) { 39501 return { 39502 r, 39503 g, 39504 b 39505 }; 39506 } 39507 const color = data.trim().split(/\s*,\s*/).map(c => Math.min(Math.max(0, parseInt(c.trim(), 10)), 255)).map(c => isNaN(c) ? 0 : c); 39508 if (color.length < 3) { 39509 return { 39510 r, 39511 g, 39512 b 39513 }; 39514 } 39515 [r, g, b] = color; 39516 return { 39517 r, 39518 g, 39519 b 39520 }; 39521} 39522function getBBox(data) { 39523 const def = -1; 39524 if (!data) { 39525 return { 39526 x: def, 39527 y: def, 39528 width: def, 39529 height: def 39530 }; 39531 } 39532 const bbox = data.trim().split(/\s*,\s*/).map(m => getMeasurement(m, "-1")); 39533 if (bbox.length < 4 || bbox[2] < 0 || bbox[3] < 0) { 39534 return { 39535 x: def, 39536 y: def, 39537 width: def, 39538 height: def 39539 }; 39540 } 39541 const [x, y, width, height] = bbox; 39542 return { 39543 x, 39544 y, 39545 width, 39546 height 39547 }; 39548} 39549class HTMLResult { 39550 static get FAILURE() { 39551 return shadow(this, "FAILURE", new HTMLResult(false, null, null, null)); 39552 } 39553 static get EMPTY() { 39554 return shadow(this, "EMPTY", new HTMLResult(true, null, null, null)); 39555 } 39556 constructor(success, html, bbox, breakNode) { 39557 this.success = success; 39558 this.html = html; 39559 this.bbox = bbox; 39560 this.breakNode = breakNode; 39561 } 39562 isBreak() { 39563 return !!this.breakNode; 39564 } 39565 static breakNode(node) { 39566 return new HTMLResult(false, null, null, node); 39567 } 39568 static success(html, bbox = null) { 39569 return new HTMLResult(true, html, bbox, null); 39570 } 39571} 39572 39573;// ./src/core/xfa/fonts.js 39574 39575 39576 39577class FontFinder { 39578 constructor(pdfFonts) { 39579 this.fonts = new Map(); 39580 this.cache = new Map(); 39581 this.warned = new Set(); 39582 this.defaultFont = null; 39583 this.add(pdfFonts); 39584 } 39585 add(pdfFonts, reallyMissingFonts = null) { 39586 for (const pdfFont of pdfFonts) { 39587 this.addPdfFont(pdfFont); 39588 } 39589 for (const pdfFont of this.fonts.values()) { 39590 if (!pdfFont.regular) { 39591 pdfFont.regular = pdfFont.italic || pdfFont.bold || pdfFont.bolditalic; 39592 } 39593 } 39594 if (!reallyMissingFonts || reallyMissingFonts.size === 0) { 39595 return; 39596 } 39597 const myriad = this.fonts.get("PdfJS-Fallback-PdfJS-XFA"); 39598 for (const missing of reallyMissingFonts) { 39599 this.fonts.set(missing, myriad); 39600 } 39601 } 39602 addPdfFont(pdfFont) { 39603 const cssFontInfo = pdfFont.cssFontInfo; 39604 const name = cssFontInfo.fontFamily; 39605 let font = this.fonts.get(name); 39606 if (!font) { 39607 font = Object.create(null); 39608 this.fonts.set(name, font); 39609 if (!this.defaultFont) { 39610 this.defaultFont = font; 39611 } 39612 } 39613 let property = ""; 39614 const fontWeight = parseFloat(cssFontInfo.fontWeight); 39615 if (parseFloat(cssFontInfo.italicAngle) !== 0) { 39616 property = fontWeight >= 700 ? "bolditalic" : "italic"; 39617 } else if (fontWeight >= 700) { 39618 property = "bold"; 39619 } 39620 if (!property) { 39621 if (pdfFont.name.includes("Bold") || pdfFont.psName?.includes("Bold")) { 39622 property = "bold"; 39623 } 39624 if (pdfFont.name.includes("Italic") || pdfFont.name.endsWith("It") || pdfFont.psName?.includes("Italic") || pdfFont.psName?.endsWith("It")) { 39625 property += "italic"; 39626 } 39627 } 39628 if (!property) { 39629 property = "regular"; 39630 } 39631 font[property] = pdfFont; 39632 } 39633 getDefault() { 39634 return this.defaultFont; 39635 } 39636 find(fontName, mustWarn = true) { 39637 let font = this.fonts.get(fontName) || this.cache.get(fontName); 39638 if (font) { 39639 return font; 39640 } 39641 const pattern = /,|-|_| |bolditalic|bold|italic|regular|it/gi; 39642 let name = fontName.replaceAll(pattern, ""); 39643 font = this.fonts.get(name); 39644 if (font) { 39645 this.cache.set(fontName, font); 39646 return font; 39647 } 39648 name = name.toLowerCase(); 39649 const maybe = []; 39650 for (const [family, pdfFont] of this.fonts.entries()) { 39651 if (family.replaceAll(pattern, "").toLowerCase().startsWith(name)) { 39652 maybe.push(pdfFont); 39653 } 39654 } 39655 if (maybe.length === 0) { 39656 for (const [, pdfFont] of this.fonts.entries()) { 39657 if (pdfFont.regular.name?.replaceAll(pattern, "").toLowerCase().startsWith(name)) { 39658 maybe.push(pdfFont); 39659 } 39660 } 39661 } 39662 if (maybe.length === 0) { 39663 name = name.replaceAll(/psmt|mt/gi, ""); 39664 for (const [family, pdfFont] of this.fonts.entries()) { 39665 if (family.replaceAll(pattern, "").toLowerCase().startsWith(name)) { 39666 maybe.push(pdfFont); 39667 } 39668 } 39669 } 39670 if (maybe.length === 0) { 39671 for (const pdfFont of this.fonts.values()) { 39672 if (pdfFont.regular.name?.replaceAll(pattern, "").toLowerCase().startsWith(name)) { 39673 maybe.push(pdfFont); 39674 } 39675 } 39676 } 39677 if (maybe.length >= 1) { 39678 if (maybe.length !== 1 && mustWarn) { 39679 warn(`XFA - Too many choices to guess the correct font: ${fontName}`); 39680 } 39681 this.cache.set(fontName, maybe[0]); 39682 return maybe[0]; 39683 } 39684 if (mustWarn && !this.warned.has(fontName)) { 39685 this.warned.add(fontName); 39686 warn(`XFA - Cannot find the font: ${fontName}`); 39687 } 39688 return null; 39689 } 39690} 39691function selectFont(xfaFont, typeface) { 39692 if (xfaFont.posture === "italic") { 39693 if (xfaFont.weight === "bold") { 39694 return typeface.bolditalic; 39695 } 39696 return typeface.italic; 39697 } else if (xfaFont.weight === "bold") { 39698 return typeface.bold; 39699 } 39700 return typeface.regular; 39701} 39702function fonts_getMetrics(xfaFont, real = false) { 39703 let pdfFont = null; 39704 if (xfaFont) { 39705 const name = stripQuotes(xfaFont.typeface); 39706 const typeface = xfaFont[$globalData].fontFinder.find(name); 39707 pdfFont = selectFont(xfaFont, typeface); 39708 } 39709 if (!pdfFont) { 39710 return { 39711 lineHeight: 12, 39712 lineGap: 2, 39713 lineNoGap: 10 39714 }; 39715 } 39716 const size = xfaFont.size || 10; 39717 const lineHeight = pdfFont.lineHeight ? Math.max(real ? 0 : 1.2, pdfFont.lineHeight) : 1.2; 39718 const lineGap = pdfFont.lineGap === undefined ? 0.2 : pdfFont.lineGap; 39719 return { 39720 lineHeight: lineHeight * size, 39721 lineGap: lineGap * size, 39722 lineNoGap: Math.max(1, lineHeight - lineGap) * size 39723 }; 39724} 39725 39726;// ./src/core/xfa/text.js 39727 39728const WIDTH_FACTOR = 1.02; 39729class FontInfo { 39730 constructor(xfaFont, margin, lineHeight, fontFinder) { 39731 this.lineHeight = lineHeight; 39732 this.paraMargin = margin || { 39733 top: 0, 39734 bottom: 0, 39735 left: 0, 39736 right: 0 39737 }; 39738 if (!xfaFont) { 39739 [this.pdfFont, this.xfaFont] = this.defaultFont(fontFinder); 39740 return; 39741 } 39742 this.xfaFont = { 39743 typeface: xfaFont.typeface, 39744 posture: xfaFont.posture, 39745 weight: xfaFont.weight, 39746 size: xfaFont.size, 39747 letterSpacing: xfaFont.letterSpacing 39748 }; 39749 const typeface = fontFinder.find(xfaFont.typeface); 39750 if (!typeface) { 39751 [this.pdfFont, this.xfaFont] = this.defaultFont(fontFinder); 39752 return; 39753 } 39754 this.pdfFont = selectFont(xfaFont, typeface); 39755 if (!this.pdfFont) { 39756 [this.pdfFont, this.xfaFont] = this.defaultFont(fontFinder); 39757 } 39758 } 39759 defaultFont(fontFinder) { 39760 const font = fontFinder.find("Helvetica", false) || fontFinder.find("Myriad Pro", false) || fontFinder.find("Arial", false) || fontFinder.getDefault(); 39761 if (font?.regular) { 39762 const pdfFont = font.regular; 39763 const info = pdfFont.cssFontInfo; 39764 const xfaFont = { 39765 typeface: info.fontFamily, 39766 posture: "normal", 39767 weight: "normal", 39768 size: 10, 39769 letterSpacing: 0 39770 }; 39771 return [pdfFont, xfaFont]; 39772 } 39773 const xfaFont = { 39774 typeface: "Courier", 39775 posture: "normal", 39776 weight: "normal", 39777 size: 10, 39778 letterSpacing: 0 39779 }; 39780 return [null, xfaFont]; 39781 } 39782} 39783class FontSelector { 39784 constructor(defaultXfaFont, defaultParaMargin, defaultLineHeight, fontFinder) { 39785 this.fontFinder = fontFinder; 39786 this.stack = [new FontInfo(defaultXfaFont, defaultParaMargin, defaultLineHeight, fontFinder)]; 39787 } 39788 pushData(xfaFont, margin, lineHeight) { 39789 const lastFont = this.stack.at(-1); 39790 for (const name of ["typeface", "posture", "weight", "size", "letterSpacing"]) { 39791 if (!xfaFont[name]) { 39792 xfaFont[name] = lastFont.xfaFont[name]; 39793 } 39794 } 39795 for (const name of ["top", "bottom", "left", "right"]) { 39796 if (isNaN(margin[name])) { 39797 margin[name] = lastFont.paraMargin[name]; 39798 } 39799 } 39800 const fontInfo = new FontInfo(xfaFont, margin, lineHeight || lastFont.lineHeight, this.fontFinder); 39801 if (!fontInfo.pdfFont) { 39802 fontInfo.pdfFont = lastFont.pdfFont; 39803 }
vendor: 7,962 bytes, lines 39803-40063
39803 39804 this.stack.push(fontInfo); 39805 } 39806 popFont() { 39807 this.stack.pop(); 39808 } 39809 topFont() { 39810 return this.stack.at(-1); 39811 } 39812} 39813class TextMeasure { 39814 constructor(defaultXfaFont, defaultParaMargin, defaultLineHeight, fonts) { 39815 this.glyphs = []; 39816 this.fontSelector = new FontSelector(defaultXfaFont, defaultParaMargin, defaultLineHeight, fonts); 39817 this.extraHeight = 0; 39818 } 39819 pushData(xfaFont, margin, lineHeight) { 39820 this.fontSelector.pushData(xfaFont, margin, lineHeight); 39821 } 39822 popFont(xfaFont) { 39823 return this.fontSelector.popFont(); 39824 } 39825 addPara() { 39826 const lastFont = this.fontSelector.topFont(); 39827 this.extraHeight += lastFont.paraMargin.top + lastFont.paraMargin.bottom; 39828 } 39829 addString(str) { 39830 if (!str) { 39831 return; 39832 } 39833 const lastFont = this.fontSelector.topFont(); 39834 const fontSize = lastFont.xfaFont.size; 39835 if (lastFont.pdfFont) { 39836 const letterSpacing = lastFont.xfaFont.letterSpacing; 39837 const pdfFont = lastFont.pdfFont; 39838 const fontLineHeight = pdfFont.lineHeight || 1.2; 39839 const lineHeight = lastFont.lineHeight || Math.max(1.2, fontLineHeight) * fontSize; 39840 const lineGap = pdfFont.lineGap === undefined ? 0.2 : pdfFont.lineGap; 39841 const noGap = fontLineHeight - lineGap; 39842 const firstLineHeight = Math.max(1, noGap) * fontSize; 39843 const scale = fontSize / 1000; 39844 const fallbackWidth = pdfFont.defaultWidth || pdfFont.charsToGlyphs(" ")[0].width; 39845 for (const line of str.split(/[\u2029\n]/)) { 39846 const encodedLine = pdfFont.encodeString(line).join(""); 39847 const glyphs = pdfFont.charsToGlyphs(encodedLine); 39848 for (const glyph of glyphs) { 39849 const width = glyph.width || fallbackWidth; 39850 this.glyphs.push([width * scale + letterSpacing, lineHeight, firstLineHeight, glyph.unicode, false]); 39851 } 39852 this.glyphs.push([0, 0, 0, "\n", true]); 39853 } 39854 this.glyphs.pop(); 39855 return; 39856 } 39857 for (const line of str.split(/[\u2029\n]/)) { 39858 for (const char of line.split("")) { 39859 this.glyphs.push([fontSize, 1.2 * fontSize, fontSize, char, false]); 39860 } 39861 this.glyphs.push([0, 0, 0, "\n", true]); 39862 } 39863 this.glyphs.pop(); 39864 } 39865 compute(maxWidth) { 39866 let lastSpacePos = -1, 39867 lastSpaceWidth = 0, 39868 width = 0, 39869 height = 0, 39870 currentLineWidth = 0, 39871 currentLineHeight = 0; 39872 let isBroken = false; 39873 let isFirstLine = true; 39874 for (let i = 0, ii = this.glyphs.length; i < ii; i++) { 39875 const [glyphWidth, lineHeight, firstLineHeight, char, isEOL] = this.glyphs[i]; 39876 const isSpace = char === " "; 39877 const glyphHeight = isFirstLine ? firstLineHeight : lineHeight; 39878 if (isEOL) { 39879 width = Math.max(width, currentLineWidth); 39880 currentLineWidth = 0; 39881 height += currentLineHeight; 39882 currentLineHeight = glyphHeight; 39883 lastSpacePos = -1; 39884 lastSpaceWidth = 0; 39885 isFirstLine = false; 39886 continue; 39887 } 39888 if (isSpace) { 39889 if (currentLineWidth + glyphWidth > maxWidth) { 39890 width = Math.max(width, currentLineWidth); 39891 currentLineWidth = 0; 39892 height += currentLineHeight; 39893 currentLineHeight = glyphHeight; 39894 lastSpacePos = -1; 39895 lastSpaceWidth = 0; 39896 isBroken = true; 39897 isFirstLine = false; 39898 } else { 39899 currentLineHeight = Math.max(glyphHeight, currentLineHeight); 39900 lastSpaceWidth = currentLineWidth; 39901 currentLineWidth += glyphWidth; 39902 lastSpacePos = i; 39903 } 39904 continue; 39905 } 39906 if (currentLineWidth + glyphWidth > maxWidth) { 39907 height += currentLineHeight; 39908 currentLineHeight = glyphHeight; 39909 if (lastSpacePos !== -1) { 39910 i = lastSpacePos; 39911 width = Math.max(width, lastSpaceWidth); 39912 currentLineWidth = 0; 39913 lastSpacePos = -1; 39914 lastSpaceWidth = 0; 39915 } else { 39916 width = Math.max(width, currentLineWidth); 39917 currentLineWidth = glyphWidth; 39918 } 39919 isBroken = true; 39920 isFirstLine = false; 39921 continue; 39922 } 39923 currentLineWidth += glyphWidth; 39924 currentLineHeight = Math.max(glyphHeight, currentLineHeight); 39925 } 39926 width = Math.max(width, currentLineWidth); 39927 height += currentLineHeight + this.extraHeight; 39928 return { 39929 width: WIDTH_FACTOR * width, 39930 height, 39931 isBroken 39932 }; 39933 } 39934} 39935 39936;// ./src/core/xfa/som.js 39937 39938 39939const namePattern = /^[^.[]+/; 39940const indexPattern = /^[^\]]+/; 39941const operators = { 39942 dot: 0, 39943 dotDot: 1, 39944 dotHash: 2, 39945 dotBracket: 3, 39946 dotParen: 4 39947}; 39948const shortcuts = new Map([["$data", (root, current) => root.datasets ? root.datasets.data : root], ["$record", (root, current) => (root.datasets ? root.datasets.data : root)[$getChildren]()[0]], ["$template", (root, current) => root.template], ["$connectionSet", (root, current) => root.connectionSet], ["$form", (root, current) => root.form], ["$layout", (root, current) => root.layout], ["$host", (root, current) => root.host], ["$dataWindow", (root, current) => root.dataWindow], ["$event", (root, current) => root.event], ["!", (root, current) => root.datasets], ["$xfa", (root, current) => root], ["xfa", (root, current) => root], ["$", (root, current) => current]]); 39949const somCache = new WeakMap(); 39950function parseIndex(index) { 39951 index = index.trim(); 39952 if (index === "*") { 39953 return Infinity; 39954 } 39955 return parseInt(index, 10) || 0; 39956} 39957function parseExpression(expr, dotDotAllowed, noExpr = true) { 39958 let match = expr.match(namePattern); 39959 if (!match) { 39960 return null; 39961 } 39962 let [name] = match; 39963 const parsed = [{ 39964 name, 39965 cacheName: "." + name, 39966 index: 0, 39967 js: null, 39968 formCalc: null, 39969 operator: operators.dot 39970 }]; 39971 let pos = name.length; 39972 while (pos < expr.length) { 39973 const spos = pos; 39974 const char = expr.charAt(pos++); 39975 if (char === "[") { 39976 match = expr.slice(pos).match(indexPattern); 39977 if (!match) { 39978 warn("XFA - Invalid index in SOM expression"); 39979 return null; 39980 } 39981 parsed.at(-1).index = parseIndex(match[0]); 39982 pos += match[0].length + 1; 39983 continue; 39984 } 39985 let operator; 39986 switch (expr.charAt(pos)) { 39987 case ".": 39988 if (!dotDotAllowed) { 39989 return null; 39990 } 39991 pos++; 39992 operator = operators.dotDot; 39993 break; 39994 case "#": 39995 pos++; 39996 operator = operators.dotHash; 39997 break; 39998 case "[": 39999 if (noExpr) { 40000 warn("XFA - SOM expression contains a FormCalc subexpression which is not supported for now."); 40001 return null; 40002 } 40003 operator = operators.dotBracket; 40004 break; 40005 case "(": 40006 if (noExpr) { 40007 warn("XFA - SOM expression contains a JavaScript subexpression which is not supported for now."); 40008 return null; 40009 } 40010 operator = operators.dotParen; 40011 break; 40012 default: 40013 operator = operators.dot; 40014 break; 40015 } 40016 match = expr.slice(pos).match(namePattern); 40017 if (!match) { 40018 break; 40019 } 40020 [name] = match; 40021 pos += name.length; 40022 parsed.push({ 40023 name, 40024 cacheName: expr.slice(spos, pos), 40025 operator, 40026 index: 0, 40027 js: null, 40028 formCalc: null 40029 }); 40030 } 40031 return parsed; 40032} 40033function searchNode(root, container, expr, dotDotAllowed = true, useCache = true) { 40034 const parsed = parseExpression(expr, dotDotAllowed); 40035 if (!parsed) { 40036 return null; 40037 } 40038 const fn = shortcuts.get(parsed[0].name); 40039 let i = 0; 40040 let isQualified; 40041 if (fn) { 40042 isQualified = true; 40043 root = [fn(root, container)]; 40044 i = 1; 40045 } else { 40046 isQualified = container === null; 40047 root = [container || root]; 40048 } 40049 for (let ii = parsed.length; i < ii; i++) { 40050 const { 40051 name, 40052 cacheName, 40053 operator, 40054 index 40055 } = parsed[i]; 40056 const nodes = []; 40057 for (const node of root) { 40058 if (!node.isXFAObject) { 40059 continue; 40060 } 40061 let children, cached; 40062 if (useCache) { 40063 cached = somCache.get
vendor: 2,760 bytes, lines 40063-40169
40063(node); 40064 if (!cached) { 40065 cached = new Map(); 40066 somCache.set(node, cached); 40067 } 40068 children = cached.get(cacheName); 40069 } 40070 if (!children) { 40071 switch (operator) { 40072 case operators.dot: 40073 children = node[$getChildrenByName](name, false); 40074 break; 40075 case operators.dotDot: 40076 children = node[$getChildrenByName](name, true); 40077 break; 40078 case operators.dotHash: 40079 children = node[$getChildrenByClass](name); 40080 children = children.isXFAObjectArray ? children.children : [children]; 40081 break; 40082 default: 40083 break; 40084 } 40085 if (useCache) { 40086 cached.set(cacheName, children); 40087 } 40088 } 40089 if (children.length > 0) { 40090 nodes.push(children); 40091 } 40092 } 40093 if (nodes.length === 0 && !isQualified && i === 0) { 40094 const parent = container[$getParent](); 40095 container = parent; 40096 if (!container) { 40097 return null; 40098 } 40099 i = -1; 40100 root = [container]; 40101 continue; 40102 } 40103 root = isFinite(index) ? nodes.filter(node => index < node.length).map(node => node[index]) : nodes.flat(); 40104 } 40105 if (root.length === 0) { 40106 return null; 40107 } 40108 return root; 40109} 40110function createDataNode(root, container, expr) { 40111 const parsed = parseExpression(expr); 40112 if (!parsed) { 40113 return null; 40114 } 40115 if (parsed.some(x => x.operator === operators.dotDot)) { 40116 return null; 40117 } 40118 const fn = shortcuts.get(parsed[0].name); 40119 let i = 0; 40120 if (fn) { 40121 root = fn(root, container); 40122 i = 1; 40123 } else { 40124 root = container || root; 40125 } 40126 for (let ii = parsed.length; i < ii; i++) { 40127 const { 40128 name, 40129 operator, 40130 index 40131 } = parsed[i]; 40132 if (!isFinite(index)) { 40133 parsed[i].index = 0; 40134 return root.createNodes(parsed.slice(i)); 40135 } 40136 let children; 40137 switch (operator) { 40138 case operators.dot: 40139 children = root[$getChildrenByName](name, false); 40140 break; 40141 case operators.dotDot: 40142 children = root[$getChildrenByName](name, true); 40143 break; 40144 case operators.dotHash: 40145 children = root[$getChildrenByClass](name); 40146 children = children.isXFAObjectArray ? children.children : [children]; 40147 break; 40148 default: 40149 break; 40150 } 40151 if (children.length === 0) { 40152 return root.createNodes(parsed.slice(i)); 40153 } 40154 if (index < children.length) { 40155 const child = children[index]; 40156 if (!child.isXFAObject) { 40157 warn(`XFA - Cannot create a node.`); 40158 return null; 40159 } 40160 root = child; 40161 } else { 40162 parsed[i].index = index - children.length; 40163 return root.createNodes(parsed.slice(i)); 40164 } 40165 } 40166 return null; 40167} 40168 40169;// ./src/core/xfa/xfa_object.js
vendor: 21,619 bytes, lines 40169-40982
40169 40170 40171 40172 40173 40174 40175 40176const _applyPrototype = Symbol(); 40177const _attributes = Symbol(); 40178const _attributeNames = Symbol(); 40179const _children = Symbol("_children"); 40180const _cloneAttribute = Symbol(); 40181const _dataValue = Symbol(); 40182const _defaultValue = Symbol(); 40183const _filteredChildrenGenerator = Symbol(); 40184const _getPrototype = Symbol(); 40185const _getUnsetAttributes = Symbol(); 40186const _hasChildren = Symbol(); 40187const _max = Symbol(); 40188const _options = Symbol(); 40189const _parent = Symbol("parent"); 40190const _resolvePrototypesHelper = Symbol(); 40191const _setAttributes = Symbol(); 40192const _validator = Symbol(); 40193let uid = 0; 40194const NS_DATASETS = NamespaceIds.datasets.id; 40195class XFAObject { 40196 constructor(nsId, name, hasChildren = false) { 40197 this[$namespaceId] = nsId; 40198 this[$nodeName] = name; 40199 this[_hasChildren] = hasChildren; 40200 this[_parent] = null; 40201 this[_children] = []; 40202 this[$uid] = `${name}${uid++}`; 40203 this[$globalData] = null; 40204 } 40205 get isXFAObject() { 40206 return true; 40207 } 40208 get isXFAObjectArray() { 40209 return false; 40210 } 40211 createNodes(path) { 40212 let root = this, 40213 node = null; 40214 for (const { 40215 name, 40216 index 40217 } of path) { 40218 for (let i = 0, ii = isFinite(index) ? index : 0; i <= ii; i++) { 40219 const nsId = root[$namespaceId] === NS_DATASETS ? -1 : root[$namespaceId]; 40220 node = new XmlObject(nsId, name); 40221 root[$appendChild](node); 40222 } 40223 root = node; 40224 } 40225 return node; 40226 } 40227 [$onChild](child) { 40228 if (!this[_hasChildren] || !this[$onChildCheck](child)) { 40229 return false; 40230 } 40231 const name = child[$nodeName]; 40232 const node = this[name]; 40233 if (node instanceof XFAObjectArray) { 40234 if (node.push(child)) { 40235 this[$appendChild](child); 40236 return true; 40237 } 40238 } else { 40239 if (node !== null) { 40240 this[$removeChild](node); 40241 } 40242 this[name] = child; 40243 this[$appendChild](child); 40244 return true; 40245 } 40246 let id = ""; 40247 if (this.id) { 40248 id = ` (id: ${this.id})`; 40249 } else if (this.name) { 40250 id = ` (name: ${this.name} ${this.h.value})`; 40251 } 40252 warn(`XFA - node "${this[$nodeName]}"${id} has already enough "${name}"!`); 40253 return false; 40254 } 40255 [$onChildCheck](child) { 40256 return this.hasOwnProperty(child[$nodeName]) && child[$namespaceId] === this[$namespaceId]; 40257 } 40258 [$isNsAgnostic]() { 40259 return false; 40260 } 40261 [$acceptWhitespace]() { 40262 return false; 40263 } 40264 [$isCDATAXml]() { 40265 return false; 40266 } 40267 [$isBindable]() { 40268 return false; 40269 } 40270 [$popPara]() { 40271 if (this.para) { 40272 this[$getTemplateRoot]()[$extra].paraStack.pop(); 40273 } 40274 } 40275 [$pushPara]() { 40276 this[$getTemplateRoot]()[$extra].paraStack.push(this.para); 40277 } 40278 [$setId](ids) { 40279 if (this.id && this[$namespaceId] === NamespaceIds.template.id) { 40280 ids.set(this.id, this); 40281 } 40282 } 40283 [$getTemplateRoot]() { 40284 return this[$globalData].template; 40285 } 40286 [$isSplittable]() { 40287 return false; 40288 } 40289 [$isThereMoreWidth]() { 40290 return false; 40291 } 40292 [$appendChild](child) { 40293 child[_parent] = this; 40294 this[_children].push(child); 40295 if (!child[$globalData] && this[$globalData]) { 40296 child[$globalData] = this[$globalData]; 40297 } 40298 } 40299 [$removeChild](child) { 40300 const i = this[_children].indexOf(child); 40301 this[_children].splice(i, 1); 40302 } 40303 [$hasSettableValue]() { 40304 return this.hasOwnProperty("value"); 40305 } 40306 [$setValue](_) {} 40307 [$onText](_) {} 40308 [$finalize]() {} 40309 [$clean](builder) { 40310 delete this[_hasChildren]; 40311 if (this[$cleanup]) { 40312 builder.clean(this[$cleanup]); 40313 delete this[$cleanup]; 40314 } 40315 } 40316 [$indexOf](child) { 40317 return this[_children].indexOf(child); 40318 } 40319 [$insertAt](i, child) { 40320 child[_parent] = this; 40321 this[_children].splice(i, 0, child); 40322 if (!child[$globalData] && this[$globalData]) { 40323 child[$globalData] = this[$globalData]; 40324 } 40325 } 40326 [$isTransparent]() { 40327 return !this.name; 40328 } 40329 [$lastAttribute]() { 40330 return ""; 40331 } 40332 [$text]() { 40333 if (this[_children].length === 0) { 40334 return this[$content]; 40335 } 40336 return this[_children].map(c => c[$text]()).join(""); 40337 } 40338 get [_attributeNames]() { 40339 const proto = Object.getPrototypeOf(this); 40340 if (!proto._attributes) { 40341 const attributes = proto._attributes = new Set(); 40342 for (const name of Object.getOwnPropertyNames(this)) { 40343 if (this[name] === null || this[name] instanceof XFAObject || this[name] instanceof XFAObjectArray) { 40344 break; 40345 } 40346 attributes.add(name); 40347 } 40348 } 40349 return shadow(this, _attributeNames, proto._attributes); 40350 } 40351 [$isDescendent](parent) { 40352 let node = this; 40353 while (node) { 40354 if (node === parent) { 40355 return true; 40356 } 40357 node = node[$getParent](); 40358 } 40359 return false; 40360 } 40361 [$getParent]() { 40362 return this[_parent]; 40363 } 40364 [$getSubformParent]() { 40365 return this[$getParent](); 40366 } 40367 [$getChildren](name = null) { 40368 if (!name) { 40369 return this[_children]; 40370 } 40371 return this[name]; 40372 } 40373 [$dump]() { 40374 const dumped = Object.create(null); 40375 if (this[$content]) { 40376 dumped.$content = this[$content]; 40377 } 40378 for (const name of Object.getOwnPropertyNames(this)) { 40379 const value = this[name]; 40380 if (value === null) { 40381 continue; 40382 } 40383 if (value instanceof XFAObject) { 40384 dumped[name] = value[$dump](); 40385 } else if (value instanceof XFAObjectArray) { 40386 if (!value.isEmpty()) { 40387 dumped[name] = value.dump(); 40388 } 40389 } else { 40390 dumped[name] = value; 40391 } 40392 } 40393 return dumped; 40394 } 40395 [$toStyle]() { 40396 return null; 40397 } 40398 [$toHTML]() { 40399 return HTMLResult.EMPTY; 40400 } 40401 *[$getContainedChildren]() { 40402 for (const node of this[$getChildren]()) { 40403 yield node; 40404 } 40405 } 40406 *[_filteredChildrenGenerator](filter, include) { 40407 for (const node of this[$getContainedChildren]()) { 40408 if (!filter || include === filter.has(node[$nodeName])) { 40409 const availableSpace = this[$getAvailableSpace](); 40410 const res = node[$toHTML](availableSpace); 40411 if (!res.success) { 40412 this[$extra].failingNode = node; 40413 } 40414 yield res; 40415 } 40416 } 40417 } 40418 [$flushHTML]() { 40419 return null; 40420 } 40421 [$addHTML](html, bbox) { 40422 this[$extra].children.push(html); 40423 } 40424 [$getAvailableSpace]() {} 40425 [$childrenToHTML]({ 40426 filter = null, 40427 include = true 40428 }) { 40429 if (!this[$extra].generator) { 40430 this[$extra].generator = this[_filteredChildrenGenerator](filter, include); 40431 } else { 40432 const availableSpace = this[$getAvailableSpace](); 40433 const res = this[$extra].failingNode[$toHTML](availableSpace); 40434 if (!res.success) { 40435 return res; 40436 } 40437 if (res.html) { 40438 this[$addHTML](res.html, res.bbox); 40439 } 40440 delete this[$extra].failingNode; 40441 } 40442 while (true) { 40443 const gen = this[$extra].generator.next(); 40444 if (gen.done) { 40445 break; 40446 } 40447 const res = gen.value; 40448 if (!res.success) { 40449 return res; 40450 } 40451 if (res.html) { 40452 this[$addHTML](res.html, res.bbox); 40453 } 40454 } 40455 this[$extra].generator = null; 40456 return HTMLResult.EMPTY; 40457 } 40458 [$setSetAttributes](attributes) { 40459 this[_setAttributes] = new Set(Object.keys(attributes)); 40460 } 40461 [_getUnsetAttributes](protoAttributes) { 40462 const allAttr = this[_attributeNames]; 40463 const setAttr = this[_setAttributes]; 40464 return [...protoAttributes].filter(x => allAttr.has(x) && !setAttr.has(x)); 40465 } 40466 [$resolvePrototypes](ids, ancestors = new Set()) { 40467 for (const child of this[_children]) { 40468 child[_resolvePrototypesHelper](ids, ancestors); 40469 } 40470 } 40471 [_resolvePrototypesHelper](ids, ancestors) { 40472 const proto = this[_getPrototype](ids, ancestors); 40473 if (proto) { 40474 this[_applyPrototype](proto, ids, ancestors); 40475 } else { 40476 this[$resolvePrototypes](ids, ancestors); 40477 } 40478 } 40479 [_getPrototype](ids, ancestors) { 40480 const { 40481 use, 40482 usehref 40483 } = this; 40484 if (!use && !usehref) { 40485 return null; 40486 } 40487 let proto = null; 40488 let somExpression = null; 40489 let id = null; 40490 let ref = use; 40491 if (usehref) { 40492 ref = usehref; 40493 if (usehref.startsWith("#som(") && usehref.endsWith(")")) { 40494 somExpression = usehref.slice("#som(".length, -1); 40495 } else if (usehref.startsWith(".#som(") && usehref.endsWith(")")) { 40496 somExpression = usehref.slice(".#som(".length, -1); 40497 } else if (usehref.startsWith("#")) { 40498 id = usehref.slice(1); 40499 } else if (usehref.startsWith(".#")) { 40500 id = usehref.slice(2); 40501 } 40502 } else if (use.startsWith("#")) { 40503 id = use.slice(1); 40504 } else { 40505 somExpression = use; 40506 } 40507 this.use = this.usehref = ""; 40508 if (id) { 40509 proto = ids.get(id); 40510 } else { 40511 proto = searchNode(ids.get($root), this, somExpression, true, false); 40512 if (proto) { 40513 proto = proto[0]; 40514 } 40515 } 40516 if (!proto) { 40517 warn(`XFA - Invalid prototype reference: ${ref}.`); 40518 return null; 40519 } 40520 if (proto[$nodeName] !== this[$nodeName]) { 40521 warn(`XFA - Incompatible prototype: ${proto[$nodeName]} !== ${this[$nodeName]}.`); 40522 return null; 40523 } 40524 if (ancestors.has(proto)) { 40525 warn(`XFA - Cycle detected in prototypes use.`); 40526 return null; 40527 } 40528 ancestors.add(proto); 40529 const protoProto = proto[_getPrototype](ids, ancestors); 40530 if (protoProto) { 40531 proto[_applyPrototype](protoProto, ids, ancestors); 40532 } 40533 proto[$resolvePrototypes](ids, ancestors); 40534 ancestors.delete(proto); 40535 return proto; 40536 } 40537 [_applyPrototype](proto, ids, ancestors) { 40538 if (ancestors.has(proto)) { 40539 warn(`XFA - Cycle detected in prototypes use.`); 40540 return; 40541 } 40542 if (!this[$content] && proto[$content]) { 40543 this[$content] = proto[$content]; 40544 } 40545 const newAncestors = new Set(ancestors); 40546 newAncestors.add(proto); 40547 for (const unsetAttrName of this[_getUnsetAttributes](proto[_setAttributes])) { 40548 this[unsetAttrName] = proto[unsetAttrName]; 40549 if (this[_setAttributes]) { 40550 this[_setAttributes].add(unsetAttrName); 40551 } 40552 } 40553 for (const name of Object.getOwnPropertyNames(this)) { 40554 if (this[_attributeNames].has(name)) { 40555 continue; 40556 } 40557 const value = this[name]; 40558 const protoValue = proto[name]; 40559 if (value instanceof XFAObjectArray) { 40560 for (const child of value[_children]) { 40561 child[_resolvePrototypesHelper](ids, ancestors); 40562 } 40563 for (let i = value[_children].length, ii = protoValue[_children].length; i < ii; i++) { 40564 const child = proto[_children][i][$clone](); 40565 if (value.push(child)) { 40566 child[_parent] = this; 40567 this[_children].push(child); 40568 child[_resolvePrototypesHelper](ids, ancestors); 40569 } else { 40570 break; 40571 } 40572 } 40573 continue; 40574 } 40575 if (value !== null) { 40576 value[$resolvePrototypes](ids, ancestors); 40577 if (protoValue) { 40578 value[_applyPrototype](protoValue, ids, ancestors); 40579 } 40580 continue; 40581 } 40582 if (protoValue !== null) { 40583 const child = protoValue[$clone](); 40584 child[_parent] = this; 40585 this[name] = child; 40586 this[_children].push(child); 40587 child[_resolvePrototypesHelper](ids, ancestors); 40588 } 40589 } 40590 } 40591 static [_cloneAttribute](obj) { 40592 if (Array.isArray(obj)) { 40593 return obj.map(x => XFAObject[_cloneAttribute](x)); 40594 } 40595 if (typeof obj === "object" && obj !== null) { 40596 return Object.assign({}, obj); 40597 } 40598 return obj; 40599 } 40600 [$clone]() { 40601 const clone = Object.create(Object.getPrototypeOf(this)); 40602 for (const $symbol of Object.getOwnPropertySymbols(this)) { 40603 try { 40604 clone[$symbol] = this[$symbol]; 40605 } catch { 40606 shadow(clone, $symbol, this[$symbol]); 40607 } 40608 } 40609 clone[$uid] = `${clone[$nodeName]}${uid++}`; 40610 clone[_children] = []; 40611 for (const name of Object.getOwnPropertyNames(this)) { 40612 if (this[_attributeNames].has(name)) { 40613 clone[name] = XFAObject[_cloneAttribute](this[name]); 40614 continue; 40615 } 40616 const value = this[name]; 40617 clone[name] = value instanceof XFAObjectArray ? new XFAObjectArray(value[_max]) : null; 40618 } 40619 for (const child of this[_children]) { 40620 const name = child[$nodeName]; 40621 const clonedChild = child[$clone](); 40622 clone[_children].push(clonedChild); 40623 clonedChild[_parent] = clone; 40624 if (clone[name] === null) { 40625 clone[name] = clonedChild; 40626 } else { 40627 clone[name][_children].push(clonedChild); 40628 } 40629 } 40630 return clone; 40631 } 40632 [$getChildren](name = null) { 40633 if (!name) { 40634 return this[_children]; 40635 } 40636 return this[_children].filter(c => c[$nodeName] === name); 40637 } 40638 [$getChildrenByClass](name) { 40639 return this[name]; 40640 } 40641 [$getChildrenByName](name, allTransparent, first = true) { 40642 return Array.from(this[$getChildrenByNameIt](name, allTransparent, first)); 40643 } 40644 *[$getChildrenByNameIt](name, allTransparent, first = true) { 40645 if (name === "parent") { 40646 yield this[_parent]; 40647 return; 40648 } 40649 for (const child of this[_children]) { 40650 if (child[$nodeName] === name) { 40651 yield child; 40652 } 40653 if (child.name === name) { 40654 yield child; 40655 } 40656 if (allTransparent || child[$isTransparent]()) { 40657 yield* child[$getChildrenByNameIt](name, allTransparent, false); 40658 } 40659 } 40660 if (first && this[_attributeNames].has(name)) { 40661 yield new XFAAttribute(this, name, this[name]); 40662 } 40663 } 40664} 40665class XFAObjectArray { 40666 constructor(max = Infinity) { 40667 this[_max] = max; 40668 this[_children] = []; 40669 } 40670 get isXFAObject() { 40671 return false; 40672 } 40673 get isXFAObjectArray() { 40674 return true; 40675 } 40676 push(child) { 40677 const len = this[_children].length; 40678 if (len <= this[_max]) { 40679 this[_children].push(child); 40680 return true; 40681 } 40682 warn(`XFA - node "${child[$nodeName]}" accepts no more than ${this[_max]} children`); 40683 return false; 40684 } 40685 isEmpty() { 40686 return this[_children].length === 0; 40687 } 40688 dump() { 40689 return this[_children].length === 1 ? this[_children][0][$dump]() : this[_children].map(x => x[$dump]()); 40690 } 40691 [$clone]() { 40692 const clone = new XFAObjectArray(this[_max]); 40693 clone[_children] = this[_children].map(c => c[$clone]()); 40694 return clone; 40695 } 40696 get children() { 40697 return this[_children]; 40698 } 40699 clear() { 40700 this[_children].length = 0; 40701 } 40702} 40703class XFAAttribute { 40704 constructor(node, name, value) { 40705 this[_parent] = node; 40706 this[$nodeName] = name; 40707 this[$content] = value; 40708 this[$consumed] = false; 40709 this[$uid] = `attribute${uid++}`; 40710 } 40711 [$getParent]() { 40712 return this[_parent]; 40713 } 40714 [$isDataValue]() { 40715 return true; 40716 } 40717 [$getDataValue]() { 40718 return this[$content].trim(); 40719 } 40720 [$setValue](value) { 40721 value = value.value || ""; 40722 this[$content] = value.toString(); 40723 } 40724 [$text]() { 40725 return this[$content]; 40726 } 40727 [$isDescendent](parent) { 40728 return this[_parent] === parent || this[_parent][$isDescendent](parent); 40729 } 40730} 40731class XmlObject extends XFAObject { 40732 constructor(nsId, name, attributes = {}) { 40733 super(nsId, name); 40734 this[$content] = ""; 40735 this[_dataValue] = null; 40736 if (name !== "#text") { 40737 const map = new Map(); 40738 this[_attributes] = map; 40739 for (const [attrName, value] of Object.entries(attributes)) { 40740 map.set(attrName, new XFAAttribute(this, attrName, value)); 40741 } 40742 if (attributes.hasOwnProperty($nsAttributes)) { 40743 const dataNode = attributes[$nsAttributes].xfa.dataNode; 40744 if (dataNode !== undefined) { 40745 if (dataNode === "dataGroup") { 40746 this[_dataValue] = false; 40747 } else if (dataNode === "dataValue") { 40748 this[_dataValue] = true; 40749 } 40750 } 40751 } 40752 } 40753 this[$consumed] = false; 40754 } 40755 [$toString](buf) { 40756 const tagName = this[$nodeName]; 40757 if (tagName === "#text") { 40758 buf.push(encodeToXmlString(this[$content])); 40759 return; 40760 } 40761 const utf8TagName = utf8StringToString(tagName); 40762 const prefix = this[$namespaceId] === NS_DATASETS ? "xfa:" : ""; 40763 buf.push(`<${prefix}${utf8TagName}`); 40764 for (const [name, value] of this[_attributes].entries()) { 40765 const utf8Name = utf8StringToString(name); 40766 buf.push(` ${utf8Name}="${encodeToXmlString(value[$content])}"`); 40767 } 40768 if (this[_dataValue] !== null) { 40769 if (this[_dataValue]) { 40770 buf.push(` xfa:dataNode="dataValue"`); 40771 } else { 40772 buf.push(` xfa:dataNode="dataGroup"`); 40773 } 40774 } 40775 if (!this[$content] && this[_children].length === 0) { 40776 buf.push("/>"); 40777 return; 40778 } 40779 buf.push(">"); 40780 if (this[$content]) { 40781 if (typeof this[$content] === "string") { 40782 buf.push(encodeToXmlString(this[$content])); 40783 } else { 40784 this[$content][$toString](buf); 40785 } 40786 } else { 40787 for (const child of this[_children]) { 40788 child[$toString](buf); 40789 } 40790 } 40791 buf.push(`</${prefix}${utf8TagName}>`); 40792 } 40793 [$onChild](child) { 40794 if (this[$content]) { 40795 const node = new XmlObject(this[$namespaceId], "#text"); 40796 this[$appendChild](node); 40797 node[$content] = this[$content]; 40798 this[$content] = ""; 40799 } 40800 this[$appendChild](child); 40801 return true; 40802 } 40803 [$onText](str) { 40804 this[$content] += str; 40805 } 40806 [$finalize]() { 40807 if (this[$content] && this[_children].length > 0) { 40808 const node = new XmlObject(this[$namespaceId], "#text"); 40809 this[$appendChild](node); 40810 node[$content] = this[$content]; 40811 delete this[$content]; 40812 } 40813 } 40814 [$toHTML]() { 40815 if (this[$nodeName] === "#text") { 40816 return HTMLResult.success({ 40817 name: "#text", 40818 value: this[$content] 40819 }); 40820 } 40821 return HTMLResult.EMPTY; 40822 } 40823 [$getChildren](name = null) { 40824 if (!name) { 40825 return this[_children]; 40826 } 40827 return this[_children].filter(c => c[$nodeName] === name); 40828 } 40829 [$getAttributes]() { 40830 return this[_attributes]; 40831 } 40832 [$getChildrenByClass](name) { 40833 const value = this[_attributes].get(name); 40834 if (value !== undefined) { 40835 return value; 40836 } 40837 return this[$getChildren](name); 40838 } 40839 *[$getChildrenByNameIt](name, allTransparent) { 40840 const value = this[_attributes].get(name); 40841 if (value) { 40842 yield value; 40843 } 40844 for (const child of this[_children]) { 40845 if (child[$nodeName] === name) { 40846 yield child; 40847 } 40848 if (allTransparent) { 40849 yield* child[$getChildrenByNameIt](name, allTransparent); 40850 } 40851 } 40852 } 40853 *[$getAttributeIt](name, skipConsumed) { 40854 const value = this[_attributes].get(name); 40855 if (value && (!skipConsumed || !value[$consumed])) { 40856 yield value; 40857 } 40858 for (const child of this[_children]) { 40859 yield* child[$getAttributeIt](name, skipConsumed); 40860 } 40861 } 40862 *[$getRealChildrenByNameIt](name, allTransparent, skipConsumed) { 40863 for (const child of this[_children]) { 40864 if (child[$nodeName] === name && (!skipConsumed || !child[$consumed])) { 40865 yield child; 40866 } 40867 if (allTransparent) { 40868 yield* child[$getRealChildrenByNameIt](name, allTransparent, skipConsumed); 40869 } 40870 } 40871 } 40872 [$isDataValue]() { 40873 if (this[_dataValue] === null) { 40874 return this[_children].length === 0 || this[_children][0][$namespaceId] === NamespaceIds.xhtml.id; 40875 } 40876 return this[_dataValue]; 40877 } 40878 [$getDataValue]() { 40879 if (this[_dataValue] === null) { 40880 if (this[_children].length === 0) { 40881 return this[$content].trim(); 40882 } 40883 if (this[_children][0][$namespaceId] === NamespaceIds.xhtml.id) { 40884 return this[_children][0][$text]().trim(); 40885 } 40886 return null; 40887 } 40888 return this[$content].trim(); 40889 } 40890 [$setValue](value) { 40891 value = value.value || ""; 40892 this[$content] = value.toString(); 40893 } 40894 [$dump](hasNS = false) { 40895 const dumped = Object.create(null); 40896 if (hasNS) { 40897 dumped.$ns = this[$namespaceId]; 40898 } 40899 if (this[$content]) { 40900 dumped.$content = this[$content]; 40901 } 40902 dumped.$name = this[$nodeName]; 40903 dumped.children = []; 40904 for (const child of this[_children]) { 40905 dumped.children.push(child[$dump](hasNS)); 40906 } 40907 dumped.attributes = Object.create(null); 40908 for (const [name, value] of this[_attributes]) { 40909 dumped.attributes[name] = value[$content]; 40910 } 40911 return dumped; 40912 } 40913} 40914class ContentObject extends XFAObject { 40915 constructor(nsId, name) { 40916 super(nsId, name); 40917 this[$content] = ""; 40918 } 40919 [$onText](text) { 40920 this[$content] += text; 40921 } 40922 [$finalize]() {} 40923} 40924class OptionObject extends ContentObject { 40925 constructor(nsId, name, options) { 40926 super(nsId, name); 40927 this[_options] = options; 40928 } 40929 [$finalize]() { 40930 this[$content] = getKeyword({ 40931 data: this[$content], 40932 defaultValue: this[_options][0], 40933 validate: k => this[_options].includes(k) 40934 }); 40935 } 40936 [$clean](builder) { 40937 super[$clean](builder); 40938 delete this[_options]; 40939 } 40940} 40941class StringObject extends ContentObject { 40942 [$finalize]() { 40943 this[$content] = this[$content].trim(); 40944 } 40945} 40946class IntegerObject extends ContentObject { 40947 constructor(nsId, name, defaultValue, validator) { 40948 super(nsId, name); 40949 this[_defaultValue] = defaultValue; 40950 this[_validator] = validator; 40951 } 40952 [$finalize]() { 40953 this[$content] = getInteger({ 40954 data: this[$content], 40955 defaultValue: this[_defaultValue], 40956 validate: this[_validator] 40957 }); 40958 } 40959 [$clean](builder) { 40960 super[$clean](builder); 40961 delete this[_defaultValue]; 40962 delete this[_validator]; 40963 } 40964} 40965class Option01 extends IntegerObject { 40966 constructor(nsId, name) { 40967 super(nsId, name, 0, n => n === 1); 40968 } 40969} 40970class Option10 extends IntegerObject { 40971 constructor(nsId, name) { 40972 super(nsId, name, 1, n => n === 0); 40973 } 40974} 40975 40976;// ./src/core/xfa/html_utils.js 40977 40978 40979 40980 40981 40982
vendor: 3,103 bytes, lines 40983-41089
40983function measureToString(m) { 40984 if (typeof m === "string") { 40985 return "0px"; 40986 } 40987 return Number.isInteger(m) ? `${m}px` : `${m.toFixed(2)}px`; 40988} 40989const converters = { 40990 anchorType(node, style) { 40991 const parent = node[$getSubformParent](); 40992 if (!parent || parent.layout && parent.layout !== "position") { 40993 return; 40994 } 40995 if (!("transform" in style)) { 40996 style.transform = ""; 40997 } 40998 switch (node.anchorType) { 40999 case "bottomCenter": 41000 style.transform += "translate(-50%, -100%)"; 41001 break; 41002 case "bottomLeft": 41003 style.transform += "translate(0,-100%)"; 41004 break; 41005 case "bottomRight": 41006 style.transform += "translate(-100%,-100%)"; 41007 break; 41008 case "middleCenter": 41009 style.transform += "translate(-50%,-50%)"; 41010 break; 41011 case "middleLeft": 41012 style.transform += "translate(0,-50%)"; 41013 break; 41014 case "middleRight": 41015 style.transform += "translate(-100%,-50%)"; 41016 break; 41017 case "topCenter": 41018 style.transform += "translate(-50%,0)"; 41019 break; 41020 case "topRight": 41021 style.transform += "translate(-100%,0)"; 41022 break; 41023 } 41024 }, 41025 dimensions(node, style) { 41026 const parent = node[$getSubformParent](); 41027 let width = node.w; 41028 const height = node.h; 41029 if (parent.layout?.includes("row")) { 41030 const extra = parent[$extra]; 41031 const colSpan = node.colSpan; 41032 let w; 41033 if (colSpan === -1) { 41034 w = extra.columnWidths.slice(extra.currentColumn).reduce((a, x) => a + x, 0); 41035 extra.currentColumn = 0; 41036 } else { 41037 w = extra.columnWidths.slice(extra.currentColumn, extra.currentColumn + colSpan).reduce((a, x) => a + x, 0); 41038 extra.currentColumn = (extra.currentColumn + node.colSpan) % extra.columnWidths.length; 41039 } 41040 if (!isNaN(w)) { 41041 width = node.w = w; 41042 } 41043 } 41044 style.width = width !== "" ? measureToString(width) : "auto"; 41045 style.height = height !== "" ? measureToString(height) : "auto"; 41046 }, 41047 position(node, style) { 41048 const parent = node[$getSubformParent](); 41049 if (parent?.layout && parent.layout !== "position") { 41050 return; 41051 } 41052 style.position = "absolute"; 41053 style.left = measureToString(node.x); 41054 style.top = measureToString(node.y); 41055 }, 41056 rotate(node, style) { 41057 if (node.rotate) { 41058 if (!("transform" in style)) { 41059 style.transform = ""; 41060 } 41061 style.transform += `rotate(-${node.rotate}deg)`; 41062 style.transformOrigin = "top left"; 41063 } 41064 }, 41065 presence(node, style) { 41066 switch (node.presence) { 41067 case "invisible": 41068 style.visibility = "hidden"; 41069 break; 41070 case "hidden": 41071 case "inactive": 41072 style.display = "none"; 41073 break; 41074 } 41075 }, 41076 hAlign(node, style) { 41077 if (node[$nodeName] === "para") { 41078 switch (node.hAlign) { 41079 case "justifyAll": 41080 style.textAlign = "justify-all"; 41081 break; 41082 case "radix": 41083 style.textAlign = "left"; 41084 break; 41085 default: 41086 style.textAlign = node.hAlign; 41087 } 41088 } else { 41089 switch (node.hAlign) {
vendor: 15,159 bytes, lines 41090-41625
41090 case "left": 41091 style.alignSelf = "start"; 41092 break; 41093 case "center": 41094 style.alignSelf = "center"; 41095 break; 41096 case "right": 41097 style.alignSelf = "end"; 41098 break; 41099 } 41100 } 41101 }, 41102 margin(node, style) { 41103 if (node.margin) { 41104 style.margin = node.margin[$toStyle]().margin; 41105 } 41106 } 41107}; 41108function setMinMaxDimensions(node, style) { 41109 const parent = node[$getSubformParent](); 41110 if (parent.layout === "position") { 41111 if (node.minW > 0) { 41112 style.minWidth = measureToString(node.minW); 41113 } 41114 if (node.maxW > 0) { 41115 style.maxWidth = measureToString(node.maxW); 41116 } 41117 if (node.minH > 0) { 41118 style.minHeight = measureToString(node.minH); 41119 } 41120 if (node.maxH > 0) { 41121 style.maxHeight = measureToString(node.maxH); 41122 } 41123 } 41124} 41125function layoutText(text, xfaFont, margin, lineHeight, fontFinder, width) { 41126 const measure = new TextMeasure(xfaFont, margin, lineHeight, fontFinder); 41127 if (typeof text === "string") { 41128 measure.addString(text); 41129 } else { 41130 text[$pushGlyphs](measure); 41131 } 41132 return measure.compute(width); 41133} 41134function layoutNode(node, availableSpace) { 41135 let height = null; 41136 let width = null; 41137 let isBroken = false; 41138 if ((!node.w || !node.h) && node.value) { 41139 let marginH = 0; 41140 let marginV = 0; 41141 if (node.margin) { 41142 marginH = node.margin.leftInset + node.margin.rightInset; 41143 marginV = node.margin.topInset + node.margin.bottomInset; 41144 } 41145 let lineHeight = null; 41146 let margin = null; 41147 if (node.para) { 41148 margin = Object.create(null); 41149 lineHeight = node.para.lineHeight === "" ? null : node.para.lineHeight; 41150 margin.top = node.para.spaceAbove === "" ? 0 : node.para.spaceAbove; 41151 margin.bottom = node.para.spaceBelow === "" ? 0 : node.para.spaceBelow; 41152 margin.left = node.para.marginLeft === "" ? 0 : node.para.marginLeft; 41153 margin.right = node.para.marginRight === "" ? 0 : node.para.marginRight; 41154 } 41155 let font = node.font; 41156 if (!font) { 41157 const root = node[$getTemplateRoot](); 41158 let parent = node[$getParent](); 41159 while (parent && parent !== root) { 41160 if (parent.font) { 41161 font = parent.font; 41162 break; 41163 } 41164 parent = parent[$getParent](); 41165 } 41166 } 41167 const maxWidth = (node.w || availableSpace.width) - marginH; 41168 const fontFinder = node[$globalData].fontFinder; 41169 if (node.value.exData && node.value.exData[$content] && node.value.exData.contentType === "text/html") { 41170 const res = layoutText(node.value.exData[$content], font, margin, lineHeight, fontFinder, maxWidth); 41171 width = res.width; 41172 height = res.height; 41173 isBroken = res.isBroken; 41174 } else { 41175 const text = node.value[$text](); 41176 if (text) { 41177 const res = layoutText(text, font, margin, lineHeight, fontFinder, maxWidth); 41178 width = res.width; 41179 height = res.height; 41180 isBroken = res.isBroken; 41181 } 41182 } 41183 if (width !== null && !node.w) { 41184 width += marginH; 41185 } 41186 if (height !== null && !node.h) { 41187 height += marginV; 41188 } 41189 } 41190 return { 41191 w: width, 41192 h: height, 41193 isBroken 41194 }; 41195} 41196function computeBbox(node, html, availableSpace) { 41197 let bbox; 41198 if (node.w !== "" && node.h !== "") { 41199 bbox = [node.x, node.y, node.w, node.h]; 41200 } else { 41201 if (!availableSpace) { 41202 return null; 41203 } 41204 let width = node.w; 41205 if (width === "") { 41206 if (node.maxW === 0) { 41207 const parent = node[$getSubformParent](); 41208 width = parent.layout === "position" && parent.w !== "" ? 0 : node.minW; 41209 } else { 41210 width = Math.min(node.maxW, availableSpace.width); 41211 } 41212 html.attributes.style.width = measureToString(width); 41213 } 41214 let height = node.h; 41215 if (height === "") { 41216 if (node.maxH === 0) { 41217 const parent = node[$getSubformParent](); 41218 height = parent.layout === "position" && parent.h !== "" ? 0 : node.minH; 41219 } else { 41220 height = Math.min(node.maxH, availableSpace.height); 41221 } 41222 html.attributes.style.height = measureToString(height); 41223 } 41224 bbox = [node.x, node.y, width, height]; 41225 } 41226 return bbox; 41227} 41228function fixDimensions(node) { 41229 const parent = node[$getSubformParent](); 41230 if (parent.layout?.includes("row")) { 41231 const extra = parent[$extra]; 41232 const colSpan = node.colSpan; 41233 let width; 41234 if (colSpan === -1) { 41235 width = extra.columnWidths.slice(extra.currentColumn).reduce((a, w) => a + w, 0); 41236 } else { 41237 width = extra.columnWidths.slice(extra.currentColumn, extra.currentColumn + colSpan).reduce((a, w) => a + w, 0); 41238 } 41239 if (!isNaN(width)) { 41240 node.w = width; 41241 } 41242 } 41243 if (parent.layout && parent.layout !== "position") { 41244 node.x = node.y = 0; 41245 } 41246 if (node.layout === "table") { 41247 if (node.w === "" && Array.isArray(node.columnWidths)) { 41248 node.w = node.columnWidths.reduce((a, x) => a + x, 0); 41249 } 41250 } 41251} 41252function layoutClass(node) { 41253 switch (node.layout) { 41254 case "position": 41255 return "xfaPosition"; 41256 case "lr-tb": 41257 return "xfaLrTb"; 41258 case "rl-row": 41259 return "xfaRlRow"; 41260 case "rl-tb": 41261 return "xfaRlTb"; 41262 case "row": 41263 return "xfaRow"; 41264 case "table": 41265 return "xfaTable"; 41266 case "tb": 41267 return "xfaTb"; 41268 default: 41269 return "xfaPosition"; 41270 } 41271} 41272function toStyle(node, ...names) { 41273 const style = Object.create(null); 41274 for (const name of names) { 41275 const value = node[name]; 41276 if (value === null) { 41277 continue; 41278 } 41279 if (converters.hasOwnProperty(name)) { 41280 converters[name](node, style); 41281 continue; 41282 } 41283 if (value instanceof XFAObject) { 41284 const newStyle = value[$toStyle](); 41285 if (newStyle) { 41286 Object.assign(style, newStyle); 41287 } else { 41288 warn(`(DEBUG) - XFA - style for ${name} not implemented yet`); 41289 } 41290 } 41291 } 41292 return style; 41293} 41294function createWrapper(node, html) { 41295 const { 41296 attributes 41297 } = html; 41298 const { 41299 style 41300 } = attributes; 41301 const wrapper = { 41302 name: "div", 41303 attributes: { 41304 class: ["xfaWrapper"], 41305 style: Object.create(null) 41306 }, 41307 children: [] 41308 }; 41309 attributes.class.push("xfaWrapped"); 41310 if (node.border) { 41311 const { 41312 widths, 41313 insets 41314 } = node.border[$extra]; 41315 let width, height; 41316 let top = insets[0]; 41317 let left = insets[3]; 41318 const insetsH = insets[0] + insets[2]; 41319 const insetsW = insets[1] + insets[3]; 41320 switch (node.border.hand) { 41321 case "even": 41322 top -= widths[0] / 2; 41323 left -= widths[3] / 2; 41324 width = `calc(100% + ${(widths[1] + widths[3]) / 2 - insetsW}px)`; 41325 height = `calc(100% + ${(widths[0] + widths[2]) / 2 - insetsH}px)`; 41326 break; 41327 case "left": 41328 top -= widths[0]; 41329 left -= widths[3]; 41330 width = `calc(100% + ${widths[1] + widths[3] - insetsW}px)`; 41331 height = `calc(100% + ${widths[0] + widths[2] - insetsH}px)`; 41332 break; 41333 case "right": 41334 width = insetsW ? `calc(100% - ${insetsW}px)` : "100%"; 41335 height = insetsH ? `calc(100% - ${insetsH}px)` : "100%"; 41336 break; 41337 } 41338 const classNames = ["xfaBorder"]; 41339 if (isPrintOnly(node.border)) { 41340 classNames.push("xfaPrintOnly"); 41341 } 41342 const border = { 41343 name: "div", 41344 attributes: { 41345 class: classNames, 41346 style: { 41347 top: `${top}px`, 41348 left: `${left}px`, 41349 width, 41350 height 41351 } 41352 }, 41353 children: [] 41354 }; 41355 for (const key of ["border", "borderWidth", "borderColor", "borderRadius", "borderStyle"]) { 41356 if (style[key] !== undefined) { 41357 border.attributes.style[key] = style[key]; 41358 delete style[key]; 41359 } 41360 } 41361 wrapper.children.push(border, html); 41362 } else { 41363 wrapper.children.push(html); 41364 } 41365 for (const key of ["background", "backgroundClip", "top", "left", "width", "height", "minWidth", "minHeight", "maxWidth", "maxHeight", "transform", "transformOrigin", "visibility"]) { 41366 if (style[key] !== undefined) { 41367 wrapper.attributes.style[key] = style[key]; 41368 delete style[key]; 41369 } 41370 } 41371 wrapper.attributes.style.position = style.position === "absolute" ? "absolute" : "relative"; 41372 delete style.position; 41373 if (style.alignSelf) { 41374 wrapper.attributes.style.alignSelf = style.alignSelf; 41375 delete style.alignSelf; 41376 } 41377 return wrapper; 41378} 41379function fixTextIndent(styles) { 41380 const indent = getMeasurement(styles.textIndent, "0px"); 41381 if (indent >= 0) { 41382 return; 41383 } 41384 const align = styles.textAlign === "right" ? "right" : "left"; 41385 const name = "padding" + (align === "left" ? "Left" : "Right"); 41386 const padding = getMeasurement(styles[name], "0px"); 41387 styles[name] = `${padding - indent}px`; 41388} 41389function setAccess(node, classNames) { 41390 switch (node.access) { 41391 case "nonInteractive": 41392 classNames.push("xfaNonInteractive"); 41393 break; 41394 case "readOnly": 41395 classNames.push("xfaReadOnly"); 41396 break; 41397 case "protected": 41398 classNames.push("xfaDisabled"); 41399 break; 41400 } 41401} 41402function isPrintOnly(node) { 41403 return node.relevant.length > 0 && !node.relevant[0].excluded && node.relevant[0].viewname === "print"; 41404} 41405function getCurrentPara(node) { 41406 const stack = node[$getTemplateRoot]()[$extra].paraStack; 41407 return stack.length ? stack.at(-1) : null; 41408} 41409function setPara(node, nodeStyle, value) { 41410 if (value.attributes.class?.includes("xfaRich")) { 41411 if (nodeStyle) { 41412 if (node.h === "") { 41413 nodeStyle.height = "auto"; 41414 } 41415 if (node.w === "") { 41416 nodeStyle.width = "auto"; 41417 } 41418 } 41419 const para = getCurrentPara(node); 41420 if (para) { 41421 const valueStyle = value.attributes.style; 41422 valueStyle.display = "flex"; 41423 valueStyle.flexDirection = "column"; 41424 switch (para.vAlign) { 41425 case "top": 41426 valueStyle.justifyContent = "start"; 41427 break; 41428 case "bottom": 41429 valueStyle.justifyContent = "end"; 41430 break; 41431 case "middle": 41432 valueStyle.justifyContent = "center"; 41433 break; 41434 } 41435 const paraStyle = para[$toStyle](); 41436 for (const [key, val] of Object.entries(paraStyle)) { 41437 if (!(key in valueStyle)) { 41438 valueStyle[key] = val; 41439 } 41440 } 41441 } 41442 } 41443} 41444function setFontFamily(xfaFont, node, fontFinder, style) { 41445 if (!fontFinder) { 41446 delete style.fontFamily; 41447 return; 41448 } 41449 const name = stripQuotes(xfaFont.typeface); 41450 style.fontFamily = `"${name}"`; 41451 const typeface = fontFinder.find(name); 41452 if (typeface) { 41453 const { 41454 fontFamily 41455 } = typeface.regular.cssFontInfo; 41456 if (fontFamily !== name) { 41457 style.fontFamily = `"${fontFamily}"`; 41458 } 41459 const para = getCurrentPara(node); 41460 if (para && para.lineHeight !== "") { 41461 return; 41462 } 41463 if (style.lineHeight) { 41464 return; 41465 } 41466 const pdfFont = selectFont(xfaFont, typeface); 41467 if (pdfFont) { 41468 style.lineHeight = Math.max(1.2, pdfFont.lineHeight); 41469 } 41470 } 41471} 41472function fixURL(str) { 41473 const absoluteUrl = createValidAbsoluteUrl(str, null, { 41474 addDefaultProtocol: true, 41475 tryConvertEncoding: true 41476 }); 41477 return absoluteUrl ? absoluteUrl.href : null; 41478} 41479 41480;// ./src/core/xfa/layout.js 41481 41482 41483function createLine(node, children) { 41484 return { 41485 name: "div", 41486 attributes: { 41487 class: [node.layout === "lr-tb" ? "xfaLr" : "xfaRl"] 41488 }, 41489 children 41490 }; 41491} 41492function flushHTML(node) { 41493 if (!node[$extra]) { 41494 return null; 41495 } 41496 const attributes = node[$extra].attributes; 41497 const html = { 41498 name: "div", 41499 attributes, 41500 children: node[$extra].children 41501 }; 41502 if (node[$extra].failingNode) { 41503 const htmlFromFailing = node[$extra].failingNode[$flushHTML](); 41504 if (htmlFromFailing) { 41505 if (node.layout.endsWith("-tb")) { 41506 html.children.push(createLine(node, [htmlFromFailing])); 41507 } else { 41508 html.children.push(htmlFromFailing); 41509 } 41510 } 41511 } 41512 if (html.children.length === 0) { 41513 return null; 41514 } 41515 return html; 41516} 41517function addHTML(node, html, bbox) { 41518 const extra = node[$extra]; 41519 const availableSpace = extra.availableSpace; 41520 const [x, y, w, h] = bbox; 41521 switch (node.layout) { 41522 case "position": 41523 { 41524 extra.width = Math.max(extra.width, x + w); 41525 extra.height = Math.max(extra.height, y + h); 41526 extra.children.push(html); 41527 break; 41528 } 41529 case "lr-tb": 41530 case "rl-tb": 41531 if (!extra.line || extra.attempt === 1) { 41532 extra.line = createLine(node, []); 41533 extra.children.push(extra.line); 41534 extra.numberInLine = 0; 41535 } 41536 extra.numberInLine += 1; 41537 extra.line.children.push(html); 41538 if (extra.attempt === 0) { 41539 extra.currentWidth += w; 41540 extra.height = Math.max(extra.height, extra.prevHeight + h); 41541 } else { 41542 extra.currentWidth = w; 41543 extra.prevHeight = extra.height; 41544 extra.height += h; 41545 extra.attempt = 0; 41546 } 41547 extra.width = Math.max(extra.width, extra.currentWidth); 41548 break; 41549 case "rl-row": 41550 case "row": 41551 { 41552 extra.children.push(html); 41553 extra.width += w; 41554 extra.height = Math.max(extra.height, h); 41555 const height = measureToString(extra.height); 41556 for (const child of extra.children) { 41557 child.attributes.style.height = height; 41558 } 41559 break; 41560 } 41561 case "table": 41562 { 41563 extra.width = Math.min(availableSpace.width, Math.max(extra.width, w)); 41564 extra.height += h; 41565 extra.children.push(html); 41566 break; 41567 } 41568 case "tb": 41569 { 41570 extra.width = Math.min(availableSpace.width, Math.max(extra.width, w)); 41571 extra.height += h; 41572 extra.children.push(html); 41573 break; 41574 } 41575 } 41576} 41577function getAvailableSpace(node) { 41578 const availableSpace = node[$extra].availableSpace; 41579 const marginV = node.margin ? node.margin.topInset + node.margin.bottomInset : 0; 41580 const marginH = node.margin ? node.margin.leftInset + node.margin.rightInset : 0; 41581 switch (node.layout) { 41582 case "lr-tb": 41583 case "rl-tb": 41584 if (node[$extra].attempt === 0) { 41585 return { 41586 width: availableSpace.width - marginH - node[$extra].currentWidth, 41587 height: availableSpace.height - marginV - node[$extra].prevHeight 41588 }; 41589 } 41590 return { 41591 width: availableSpace.width - marginH, 41592 height: availableSpace.height - marginV - node[$extra].height 41593 }; 41594 case "rl-row": 41595 case "row": 41596 const width = node[$extra].columnWidths.slice(node[$extra].currentColumn).reduce((a, x) => a + x); 41597 return { 41598 width, 41599 height: availableSpace.height - marginH 41600 }; 41601 case "table": 41602 case "tb": 41603 return { 41604 width: availableSpace.width - marginH, 41605 height: availableSpace.height - marginV - node[$extra].height 41606 }; 41607 case "position": 41608 default: 41609 return availableSpace; 41610 } 41611} 41612function getTransformedBBox(node) { 41613 let w = node.w === "" ? NaN : node.w; 41614 let h = node.h === "" ? NaN : node.h; 41615 let [centerX, centerY] = [0, 0]; 41616 switch (node.anchorType || "") { 41617 case "bottomCenter": 41618 [centerX, centerY] = [w / 2, h]; 41619 break; 41620 case "bottomLeft": 41621 [centerX, centerY] = [0, h]; 41622 break; 41623 case "bottomRight": 41624 [centerX, centerY] = [w, h]; 41625 break;
vendor: 3,501 bytes, lines 41626-41760
41626 case "middleCenter": 41627 [centerX, centerY] = [w / 2, h / 2]; 41628 break; 41629 case "middleLeft": 41630 [centerX, centerY] = [0, h / 2]; 41631 break; 41632 case "middleRight": 41633 [centerX, centerY] = [w, h / 2]; 41634 break; 41635 case "topCenter": 41636 [centerX, centerY] = [w / 2, 0]; 41637 break; 41638 case "topRight": 41639 [centerX, centerY] = [w, 0]; 41640 break; 41641 } 41642 let x, y; 41643 switch (node.rotate || 0) { 41644 case 0: 41645 [x, y] = [-centerX, -centerY]; 41646 break; 41647 case 90: 41648 [x, y] = [-centerY, centerX]; 41649 [w, h] = [h, -w]; 41650 break; 41651 case 180: 41652 [x, y] = [centerX, centerY]; 41653 [w, h] = [-w, -h]; 41654 break; 41655 case 270: 41656 [x, y] = [centerY, -centerX]; 41657 [w, h] = [-h, w]; 41658 break; 41659 } 41660 return [node.x + x + Math.min(0, w), node.y + y + Math.min(0, h), Math.abs(w), Math.abs(h)]; 41661} 41662function checkDimensions(node, space) { 41663 if (node[$getTemplateRoot]()[$extra].firstUnsplittable === null) { 41664 return true; 41665 } 41666 if (node.w === 0 || node.h === 0) { 41667 return true; 41668 } 41669 const ERROR = 2; 41670 const parent = node[$getSubformParent](); 41671 const attempt = parent[$extra]?.attempt || 0; 41672 const [, y, w, h] = getTransformedBBox(node); 41673 switch (parent.layout) { 41674 case "lr-tb": 41675 case "rl-tb": 41676 if (attempt === 0) { 41677 if (!node[$getTemplateRoot]()[$extra].noLayoutFailure) { 41678 if (node.h !== "" && Math.round(h - space.height) > ERROR) { 41679 return false; 41680 } 41681 if (node.w !== "") { 41682 if (Math.round(w - space.width) <= ERROR) { 41683 return true; 41684 } 41685 if (parent[$extra].numberInLine === 0) { 41686 return space.height > ERROR; 41687 } 41688 return false; 41689 } 41690 return space.width > ERROR; 41691 } 41692 if (node.w !== "") { 41693 return Math.round(w - space.width) <= ERROR; 41694 } 41695 return space.width > ERROR; 41696 } 41697 if (node[$getTemplateRoot]()[$extra].noLayoutFailure) { 41698 return true; 41699 } 41700 if (node.h !== "" && Math.round(h - space.height) > ERROR) { 41701 return false; 41702 } 41703 if (node.w === "" || Math.round(w - space.width) <= ERROR) { 41704 return space.height > ERROR; 41705 } 41706 if (parent[$isThereMoreWidth]()) { 41707 return false; 41708 } 41709 return space.height > ERROR; 41710 case "table": 41711 case "tb": 41712 if (node[$getTemplateRoot]()[$extra].noLayoutFailure) { 41713 return true; 41714 } 41715 if (node.h !== "" && !node[$isSplittable]()) { 41716 return Math.round(h - space.height) <= ERROR; 41717 } 41718 if (node.w === "" || Math.round(w - space.width) <= ERROR) { 41719 return space.height > ERROR; 41720 } 41721 if (parent[$isThereMoreWidth]()) { 41722 return false; 41723 } 41724 return space.height > ERROR; 41725 case "position": 41726 if (node[$getTemplateRoot]()[$extra].noLayoutFailure) { 41727 return true; 41728 } 41729 if (node.h === "" || Math.round(h + y - space.height) <= ERROR) { 41730 return true; 41731 } 41732 const area = node[$getTemplateRoot]()[$extra].currentContentArea; 41733 return h + y > area.h; 41734 case "rl-row": 41735 case "row": 41736 if (node[$getTemplateRoot]()[$extra].noLayoutFailure) { 41737 return true; 41738 } 41739 if (node.h !== "") { 41740 return Math.round(h - space.height) <= ERROR; 41741 } 41742 return true; 41743 default: 41744 return true; 41745 } 41746} 41747 41748;// ./src/core/xfa/template.js 41749 41750 41751 41752 41753 41754 41755 41756 41757 41758 41759const TEMPLATE_NS_ID = NamespaceIds.template.id; 41760const SVG_NS = "http://www.w3.org/2000/svg"
vendor: 27,491 bytes, lines 41760-42638
41760; 41761const MAX_ATTEMPTS_FOR_LRTB_LAYOUT = 2; 41762const MAX_EMPTY_PAGES = 3; 41763const DEFAULT_TAB_INDEX = 5000; 41764const HEADING_PATTERN = /^H(\d+)$/; 41765const MIMES = new Set(["image/gif", "image/jpeg", "image/jpg", "image/pjpeg", "image/png", "image/apng", "image/x-png", "image/bmp", "image/x-ms-bmp", "image/tiff", "image/tif", "application/octet-stream"]); 41766const IMAGES_HEADERS = [[[0x42, 0x4d], "image/bmp"], [[0xff, 0xd8, 0xff], "image/jpeg"], [[0x49, 0x49, 0x2a, 0x00], "image/tiff"], [[0x4d, 0x4d, 0x00, 0x2a], "image/tiff"], [[0x47, 0x49, 0x46, 0x38, 0x39, 0x61], "image/gif"], [[0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a], "image/png"]]; 41767function getBorderDims(node) { 41768 if (!node || !node.border) { 41769 return { 41770 w: 0, 41771 h: 0 41772 }; 41773 } 41774 const borderExtra = node.border[$getExtra](); 41775 if (!borderExtra) { 41776 return { 41777 w: 0, 41778 h: 0 41779 }; 41780 } 41781 return { 41782 w: borderExtra.widths[0] + borderExtra.widths[2] + borderExtra.insets[0] + borderExtra.insets[2], 41783 h: borderExtra.widths[1] + borderExtra.widths[3] + borderExtra.insets[1] + borderExtra.insets[3] 41784 }; 41785} 41786function hasMargin(node) { 41787 return node.margin && (node.margin.topInset || node.margin.rightInset || node.margin.bottomInset || node.margin.leftInset); 41788} 41789function _setValue(templateNode, value) { 41790 if (!templateNode.value) { 41791 const nodeValue = new Value({}); 41792 templateNode[$appendChild](nodeValue); 41793 templateNode.value = nodeValue; 41794 } 41795 templateNode.value[$setValue](value); 41796} 41797function* getContainedChildren(node) { 41798 for (const child of node[$getChildren]()) { 41799 if (child instanceof SubformSet) { 41800 yield* child[$getContainedChildren](); 41801 continue; 41802 } 41803 yield child; 41804 } 41805} 41806function isRequired(node) { 41807 return node.validate?.nullTest === "error"; 41808} 41809function setTabIndex(node) { 41810 while (node) { 41811 if (!node.traversal) { 41812 node[$tabIndex] = node[$getParent]()[$tabIndex]; 41813 return; 41814 } 41815 if (node[$tabIndex]) { 41816 return; 41817 } 41818 let next = null; 41819 for (const child of node.traversal[$getChildren]()) { 41820 if (child.operation === "next") { 41821 next = child; 41822 break; 41823 } 41824 } 41825 if (!next || !next.ref) { 41826 node[$tabIndex] = node[$getParent]()[$tabIndex]; 41827 return; 41828 } 41829 const root = node[$getTemplateRoot](); 41830 node[$tabIndex] = ++root[$tabIndex]; 41831 const ref = root[$searchNode](next.ref, node); 41832 if (!ref) { 41833 return; 41834 } 41835 node = ref[0]; 41836 } 41837} 41838function applyAssist(obj, attributes) { 41839 const assist = obj.assist; 41840 if (assist) { 41841 const assistTitle = assist[$toHTML](); 41842 if (assistTitle) { 41843 attributes.title = assistTitle; 41844 } 41845 const role = assist.role; 41846 const match = role.match(HEADING_PATTERN); 41847 if (match) { 41848 const ariaRole = "heading"; 41849 const ariaLevel = match[1]; 41850 attributes.role = ariaRole; 41851 attributes["aria-level"] = ariaLevel; 41852 } 41853 } 41854 if (obj.layout === "table") { 41855 attributes.role = "table"; 41856 } else if (obj.layout === "row") { 41857 attributes.role = "row"; 41858 } else { 41859 const parent = obj[$getParent](); 41860 if (parent.layout === "row") { 41861 attributes.role = parent.assist?.role === "TH" ? "columnheader" : "cell"; 41862 } 41863 } 41864} 41865function ariaLabel(obj) { 41866 if (!obj.assist) { 41867 return null; 41868 } 41869 const assist = obj.assist; 41870 if (assist.speak && assist.speak[$content] !== "") { 41871 return assist.speak[$content]; 41872 } 41873 if (assist.toolTip) { 41874 return assist.toolTip[$content]; 41875 } 41876 return null; 41877} 41878function valueToHtml(value) { 41879 return HTMLResult.success({ 41880 name: "div", 41881 attributes: { 41882 class: ["xfaRich"], 41883 style: Object.create(null) 41884 }, 41885 children: [{ 41886 name: "span", 41887 attributes: { 41888 style: Object.create(null) 41889 }, 41890 value 41891 }] 41892 }); 41893} 41894function setFirstUnsplittable(node) { 41895 const root = node[$getTemplateRoot](); 41896 if (root[$extra].firstUnsplittable === null) { 41897 root[$extra].firstUnsplittable = node; 41898 root[$extra].noLayoutFailure = true; 41899 } 41900} 41901function unsetFirstUnsplittable(node) { 41902 const root = node[$getTemplateRoot](); 41903 if (root[$extra].firstUnsplittable === node) { 41904 root[$extra].noLayoutFailure = false; 41905 } 41906} 41907function handleBreak(node) { 41908 if (node[$extra]) { 41909 return false; 41910 } 41911 node[$extra] = Object.create(null); 41912 if (node.targetType === "auto") { 41913 return false; 41914 } 41915 const root = node[$getTemplateRoot](); 41916 let target = null; 41917 if (node.target) { 41918 target = root[$searchNode](node.target, node[$getParent]()); 41919 if (!target) { 41920 return false; 41921 } 41922 target = target[0]; 41923 } 41924 const { 41925 currentPageArea, 41926 currentContentArea 41927 } = root[$extra]; 41928 if (node.targetType === "pageArea") { 41929 if (!(target instanceof PageArea)) { 41930 target = null; 41931 } 41932 if (node.startNew) { 41933 node[$extra].target = target || currentPageArea; 41934 return true; 41935 } else if (target && target !== currentPageArea) { 41936 node[$extra].target = target; 41937 return true; 41938 } 41939 return false; 41940 } 41941 if (!(target instanceof ContentArea)) { 41942 target = null; 41943 } 41944 const pageArea = target && target[$getParent](); 41945 let index; 41946 let nextPageArea = pageArea; 41947 if (node.startNew) { 41948 if (target) { 41949 const contentAreas = pageArea.contentArea.children; 41950 const indexForCurrent = contentAreas.indexOf(currentContentArea); 41951 const indexForTarget = contentAreas.indexOf(target); 41952 if (indexForCurrent !== -1 && indexForCurrent < indexForTarget) { 41953 nextPageArea = null; 41954 } 41955 index = indexForTarget - 1; 41956 } else { 41957 index = currentPageArea.contentArea.children.indexOf(currentContentArea); 41958 } 41959 } else if (target && target !== currentContentArea) { 41960 const contentAreas = pageArea.contentArea.children; 41961 index = contentAreas.indexOf(target) - 1; 41962 nextPageArea = pageArea === currentPageArea ? null : pageArea; 41963 } else { 41964 return false; 41965 } 41966 node[$extra].target = nextPageArea; 41967 node[$extra].index = index; 41968 return true; 41969} 41970function handleOverflow(node, extraNode, space) { 41971 const root = node[$getTemplateRoot](); 41972 const saved = root[$extra].noLayoutFailure; 41973 const savedMethod = extraNode[$getSubformParent]; 41974 extraNode[$getSubformParent] = () => node; 41975 root[$extra].noLayoutFailure = true; 41976 const res = extraNode[$toHTML](space); 41977 node[$addHTML](res.html, res.bbox); 41978 root[$extra].noLayoutFailure = saved; 41979 extraNode[$getSubformParent] = savedMethod; 41980} 41981class AppearanceFilter extends StringObject { 41982 constructor(attributes) { 41983 super(TEMPLATE_NS_ID, "appearanceFilter"); 41984 this.id = attributes.id || ""; 41985 this.type = getStringOption(attributes.type, ["optional", "required"]); 41986 this.use = attributes.use || ""; 41987 this.usehref = attributes.usehref || ""; 41988 } 41989} 41990class Arc extends XFAObject { 41991 constructor(attributes) { 41992 super(TEMPLATE_NS_ID, "arc", true); 41993 this.circular = getInteger({ 41994 data: attributes.circular, 41995 defaultValue: 0, 41996 validate: x => x === 1 41997 }); 41998 this.hand = getStringOption(attributes.hand, ["even", "left", "right"]); 41999 this.id = attributes.id || ""; 42000 this.startAngle = getFloat({ 42001 data: attributes.startAngle, 42002 defaultValue: 0, 42003 validate: x => true 42004 }); 42005 this.sweepAngle = getFloat({ 42006 data: attributes.sweepAngle, 42007 defaultValue: 360, 42008 validate: x => true 42009 }); 42010 this.use = attributes.use || ""; 42011 this.usehref = attributes.usehref || ""; 42012 this.edge = null; 42013 this.fill = null; 42014 } 42015 [$toHTML]() { 42016 const edge = this.edge || new Edge({}); 42017 const edgeStyle = edge[$toStyle](); 42018 const style = Object.create(null); 42019 if (this.fill?.presence === "visible") { 42020 Object.assign(style, this.fill[$toStyle]()); 42021 } else { 42022 style.fill = "transparent"; 42023 } 42024 style.strokeWidth = measureToString(edge.presence === "visible" ? edge.thickness : 0); 42025 style.stroke = edgeStyle.color; 42026 let arc; 42027 const attributes = { 42028 xmlns: SVG_NS, 42029 style: { 42030 width: "100%", 42031 height: "100%", 42032 overflow: "visible" 42033 } 42034 }; 42035 if (this.sweepAngle === 360) { 42036 arc = { 42037 name: "ellipse", 42038 attributes: { 42039 xmlns: SVG_NS, 42040 cx: "50%", 42041 cy: "50%", 42042 rx: "50%", 42043 ry: "50%", 42044 style 42045 } 42046 }; 42047 } else { 42048 const startAngle = this.startAngle * Math.PI / 180; 42049 const sweepAngle = this.sweepAngle * Math.PI / 180; 42050 const largeArc = this.sweepAngle > 180 ? 1 : 0; 42051 const [x1, y1, x2, y2] = [50 * (1 + Math.cos(startAngle)), 50 * (1 - Math.sin(startAngle)), 50 * (1 + Math.cos(startAngle + sweepAngle)), 50 * (1 - Math.sin(startAngle + sweepAngle))]; 42052 arc = { 42053 name: "path", 42054 attributes: { 42055 xmlns: SVG_NS, 42056 d: `M ${x1} ${y1} A 50 50 0 ${largeArc} 0 ${x2} ${y2}`, 42057 vectorEffect: "non-scaling-stroke", 42058 style 42059 } 42060 }; 42061 Object.assign(attributes, { 42062 viewBox: "0 0 100 100", 42063 preserveAspectRatio: "none" 42064 }); 42065 } 42066 const svg = { 42067 name: "svg", 42068 children: [arc], 42069 attributes 42070 }; 42071 const parent = this[$getParent]()[$getParent](); 42072 if (hasMargin(parent)) { 42073 return HTMLResult.success({ 42074 name: "div", 42075 attributes: { 42076 style: { 42077 display: "inline", 42078 width: "100%", 42079 height: "100%" 42080 } 42081 }, 42082 children: [svg] 42083 }); 42084 } 42085 svg.attributes.style.position = "absolute"; 42086 return HTMLResult.success(svg); 42087 } 42088} 42089class Area extends XFAObject { 42090 constructor(attributes) { 42091 super(TEMPLATE_NS_ID, "area", true); 42092 this.colSpan = getInteger({ 42093 data: attributes.colSpan, 42094 defaultValue: 1, 42095 validate: n => n >= 1 || n === -1 42096 }); 42097 this.id = attributes.id || ""; 42098 this.name = attributes.name || ""; 42099 this.relevant = getRelevant(attributes.relevant); 42100 this.use = attributes.use || ""; 42101 this.usehref = attributes.usehref || ""; 42102 this.x = getMeasurement(attributes.x, "0pt"); 42103 this.y = getMeasurement(attributes.y, "0pt"); 42104 this.desc = null; 42105 this.extras = null; 42106 this.area = new XFAObjectArray(); 42107 this.draw = new XFAObjectArray(); 42108 this.exObject = new XFAObjectArray(); 42109 this.exclGroup = new XFAObjectArray(); 42110 this.field = new XFAObjectArray(); 42111 this.subform = new XFAObjectArray(); 42112 this.subformSet = new XFAObjectArray(); 42113 } 42114 *[$getContainedChildren]() { 42115 yield* getContainedChildren(this); 42116 } 42117 [$isTransparent]() { 42118 return true; 42119 } 42120 [$isBindable]() { 42121 return true; 42122 } 42123 [$addHTML](html, bbox) { 42124 const [x, y, w, h] = bbox; 42125 this[$extra].width = Math.max(this[$extra].width, x + w); 42126 this[$extra].height = Math.max(this[$extra].height, y + h); 42127 this[$extra].children.push(html); 42128 } 42129 [$getAvailableSpace]() { 42130 return this[$extra].availableSpace; 42131 } 42132 [$toHTML](availableSpace) { 42133 const style = toStyle(this, "position"); 42134 const attributes = { 42135 style, 42136 id: this[$uid], 42137 class: ["xfaArea"] 42138 }; 42139 if (isPrintOnly(this)) { 42140 attributes.class.push("xfaPrintOnly"); 42141 } 42142 if (this.name) { 42143 attributes.xfaName = this.name; 42144 } 42145 const children = []; 42146 this[$extra] = { 42147 children, 42148 width: 0, 42149 height: 0, 42150 availableSpace 42151 }; 42152 const result = this[$childrenToHTML]({ 42153 filter: new Set(["area", "draw", "field", "exclGroup", "subform", "subformSet"]), 42154 include: true 42155 }); 42156 if (!result.success) { 42157 if (result.isBreak()) { 42158 return result; 42159 } 42160 delete this[$extra]; 42161 return HTMLResult.FAILURE; 42162 } 42163 style.width = measureToString(this[$extra].width); 42164 style.height = measureToString(this[$extra].height); 42165 const html = { 42166 name: "div", 42167 attributes, 42168 children 42169 }; 42170 const bbox = [this.x, this.y, this[$extra].width, this[$extra].height]; 42171 delete this[$extra]; 42172 return HTMLResult.success(html, bbox); 42173 } 42174} 42175class Assist extends XFAObject { 42176 constructor(attributes) { 42177 super(TEMPLATE_NS_ID, "assist", true); 42178 this.id = attributes.id || ""; 42179 this.role = attributes.role || ""; 42180 this.use = attributes.use || ""; 42181 this.usehref = attributes.usehref || ""; 42182 this.speak = null; 42183 this.toolTip = null; 42184 } 42185 [$toHTML]() { 42186 return this.toolTip?.[$content] || null; 42187 } 42188} 42189class Barcode extends XFAObject { 42190 constructor(attributes) { 42191 super(TEMPLATE_NS_ID, "barcode", true); 42192 this.charEncoding = getKeyword({ 42193 data: attributes.charEncoding ? attributes.charEncoding.toLowerCase() : "", 42194 defaultValue: "", 42195 validate: k => ["utf-8", "big-five", "fontspecific", "gbk", "gb-18030", "gb-2312", "ksc-5601", "none", "shift-jis", "ucs-2", "utf-16"].includes(k) || k.match(/iso-8859-\d{2}/) 42196 }); 42197 this.checksum = getStringOption(attributes.checksum, ["none", "1mod10", "1mod10_1mod11", "2mod10", "auto"]); 42198 this.dataColumnCount = getInteger({ 42199 data: attributes.dataColumnCount, 42200 defaultValue: -1, 42201 validate: x => x >= 0 42202 }); 42203 this.dataLength = getInteger({ 42204 data: attributes.dataLength, 42205 defaultValue: -1, 42206 validate: x => x >= 0 42207 }); 42208 this.dataPrep = getStringOption(attributes.dataPrep, ["none", "flateCompress"]); 42209 this.dataRowCount = getInteger({ 42210 data: attributes.dataRowCount, 42211 defaultValue: -1, 42212 validate: x => x >= 0 42213 }); 42214 this.endChar = attributes.endChar || ""; 42215 this.errorCorrectionLevel = getInteger({ 42216 data: attributes.errorCorrectionLevel, 42217 defaultValue: -1, 42218 validate: x => x >= 0 && x <= 8 42219 }); 42220 this.id = attributes.id || ""; 42221 this.moduleHeight = getMeasurement(attributes.moduleHeight, "5mm"); 42222 this.moduleWidth = getMeasurement(attributes.moduleWidth, "0.25mm"); 42223 this.printCheckDigit = getInteger({ 42224 data: attributes.printCheckDigit, 42225 defaultValue: 0, 42226 validate: x => x === 1 42227 }); 42228 this.rowColumnRatio = getRatio(attributes.rowColumnRatio); 42229 this.startChar = attributes.startChar || ""; 42230 this.textLocation = getStringOption(attributes.textLocation, ["below", "above", "aboveEmbedded", "belowEmbedded", "none"]); 42231 this.truncate = getInteger({ 42232 data: attributes.truncate, 42233 defaultValue: 0, 42234 validate: x => x === 1 42235 }); 42236 this.type = getStringOption(attributes.type ? attributes.type.toLowerCase() : "", ["aztec", "codabar", "code2of5industrial", "code2of5interleaved", "code2of5matrix", "code2of5standard", "code3of9", "code3of9extended", "code11", "code49", "code93", "code128", "code128a", "code128b", "code128c", "code128sscc", "datamatrix", "ean8", "ean8add2", "ean8add5", "ean13", "ean13add2", "ean13add5", "ean13pwcd", "fim", "logmars", "maxicode", "msi", "pdf417", "pdf417macro", "plessey", "postauscust2", "postauscust3", "postausreplypaid", "postausstandard", "postukrm4scc", "postusdpbc", "postusimb", "postusstandard", "postus5zip", "qrcode", "rfid", "rss14", "rss14expanded", "rss14limited", "rss14stacked", "rss14stackedomni", "rss14truncated", "telepen", "ucc128", "ucc128random", "ucc128sscc", "upca", "upcaadd2", "upcaadd5", "upcapwcd", "upce", "upceadd2", "upceadd5", "upcean2", "upcean5", "upsmaxicode"]); 42237 this.upsMode = getStringOption(attributes.upsMode, ["usCarrier", "internationalCarrier", "secureSymbol", "standardSymbol"]); 42238 this.use = attributes.use || ""; 42239 this.usehref = attributes.usehref || ""; 42240 this.wideNarrowRatio = getRatio(attributes.wideNarrowRatio); 42241 this.encrypt = null; 42242 this.extras = null; 42243 } 42244} 42245class Bind extends XFAObject { 42246 constructor(attributes) { 42247 super(TEMPLATE_NS_ID, "bind", true); 42248 this.match = getStringOption(attributes.match, ["once", "dataRef", "global", "none"]); 42249 this.ref = attributes.ref || ""; 42250 this.picture = null; 42251 } 42252} 42253class BindItems extends XFAObject { 42254 constructor(attributes) { 42255 super(TEMPLATE_NS_ID, "bindItems"); 42256 this.connection = attributes.connection || ""; 42257 this.labelRef = attributes.labelRef || ""; 42258 this.ref = attributes.ref || ""; 42259 this.valueRef = attributes.valueRef || ""; 42260 } 42261} 42262class Bookend extends XFAObject { 42263 constructor(attributes) { 42264 super(TEMPLATE_NS_ID, "bookend"); 42265 this.id = attributes.id || ""; 42266 this.leader = attributes.leader || ""; 42267 this.trailer = attributes.trailer || ""; 42268 this.use = attributes.use || ""; 42269 this.usehref = attributes.usehref || ""; 42270 } 42271} 42272class BooleanElement extends Option01 { 42273 constructor(attributes) { 42274 super(TEMPLATE_NS_ID, "boolean"); 42275 this.id = attributes.id || ""; 42276 this.name = attributes.name || ""; 42277 this.use = attributes.use || ""; 42278 this.usehref = attributes.usehref || ""; 42279 } 42280 [$toHTML](availableSpace) { 42281 return valueToHtml(this[$content] === 1 ? "1" : "0"); 42282 } 42283} 42284class Border extends XFAObject { 42285 constructor(attributes) { 42286 super(TEMPLATE_NS_ID, "border", true); 42287 this.break = getStringOption(attributes.break, ["close", "open"]); 42288 this.hand = getStringOption(attributes.hand, ["even", "left", "right"]); 42289 this.id = attributes.id || ""; 42290 this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]); 42291 this.relevant = getRelevant(attributes.relevant); 42292 this.use = attributes.use || ""; 42293 this.usehref = attributes.usehref || ""; 42294 this.corner = new XFAObjectArray(4); 42295 this.edge = new XFAObjectArray(4); 42296 this.extras = null; 42297 this.fill = null; 42298 this.margin = null; 42299 } 42300 [$getExtra]() { 42301 if (!this[$extra]) { 42302 const edges = this.edge.children.slice(); 42303 if (edges.length < 4) { 42304 const defaultEdge = edges.at(-1) || new Edge({}); 42305 for (let i = edges.length; i < 4; i++) { 42306 edges.push(defaultEdge); 42307 } 42308 } 42309 const widths = edges.map(edge => edge.thickness); 42310 const insets = [0, 0, 0, 0]; 42311 if (this.margin) { 42312 insets[0] = this.margin.topInset; 42313 insets[1] = this.margin.rightInset; 42314 insets[2] = this.margin.bottomInset; 42315 insets[3] = this.margin.leftInset; 42316 } 42317 this[$extra] = { 42318 widths, 42319 insets, 42320 edges 42321 }; 42322 } 42323 return this[$extra]; 42324 } 42325 [$toStyle]() { 42326 const { 42327 edges 42328 } = this[$getExtra](); 42329 const edgeStyles = edges.map(node => { 42330 const style = node[$toStyle](); 42331 style.color ||= "#000000"; 42332 return style; 42333 }); 42334 const style = Object.create(null); 42335 if (this.margin) { 42336 Object.assign(style, this.margin[$toStyle]()); 42337 } 42338 if (this.fill?.presence === "visible") { 42339 Object.assign(style, this.fill[$toStyle]()); 42340 } 42341 if (this.corner.children.some(node => node.radius !== 0)) { 42342 const cornerStyles = this.corner.children.map(node => node[$toStyle]()); 42343 if (cornerStyles.length === 2 || cornerStyles.length === 3) { 42344 const last = cornerStyles.at(-1); 42345 for (let i = cornerStyles.length; i < 4; i++) { 42346 cornerStyles.push(last); 42347 } 42348 } 42349 style.borderRadius = cornerStyles.map(s => s.radius).join(" "); 42350 } 42351 switch (this.presence) { 42352 case "invisible": 42353 case "hidden": 42354 style.borderStyle = ""; 42355 break; 42356 case "inactive": 42357 style.borderStyle = "none"; 42358 break; 42359 default: 42360 style.borderStyle = edgeStyles.map(s => s.style).join(" "); 42361 break; 42362 } 42363 style.borderWidth = edgeStyles.map(s => s.width).join(" "); 42364 style.borderColor = edgeStyles.map(s => s.color).join(" "); 42365 return style; 42366 } 42367} 42368class Break extends XFAObject { 42369 constructor(attributes) { 42370 super(TEMPLATE_NS_ID, "break", true); 42371 this.after = getStringOption(attributes.after, ["auto", "contentArea", "pageArea", "pageEven", "pageOdd"]); 42372 this.afterTarget = attributes.afterTarget || ""; 42373 this.before = getStringOption(attributes.before, ["auto", "contentArea", "pageArea", "pageEven", "pageOdd"]); 42374 this.beforeTarget = attributes.beforeTarget || ""; 42375 this.bookendLeader = attributes.bookendLeader || ""; 42376 this.bookendTrailer = attributes.bookendTrailer || ""; 42377 this.id = attributes.id || ""; 42378 this.overflowLeader = attributes.overflowLeader || ""; 42379 this.overflowTarget = attributes.overflowTarget || ""; 42380 this.overflowTrailer = attributes.overflowTrailer || ""; 42381 this.startNew = getInteger({ 42382 data: attributes.startNew, 42383 defaultValue: 0, 42384 validate: x => x === 1 42385 }); 42386 this.use = attributes.use || ""; 42387 this.usehref = attributes.usehref || ""; 42388 this.extras = null; 42389 } 42390} 42391class BreakAfter extends XFAObject { 42392 constructor(attributes) { 42393 super(TEMPLATE_NS_ID, "breakAfter", true); 42394 this.id = attributes.id || ""; 42395 this.leader = attributes.leader || ""; 42396 this.startNew = getInteger({ 42397 data: attributes.startNew, 42398 defaultValue: 0, 42399 validate: x => x === 1 42400 }); 42401 this.target = attributes.target || ""; 42402 this.targetType = getStringOption(attributes.targetType, ["auto", "contentArea", "pageArea"]); 42403 this.trailer = attributes.trailer || ""; 42404 this.use = attributes.use || ""; 42405 this.usehref = attributes.usehref || ""; 42406 this.script = null; 42407 } 42408} 42409class BreakBefore extends XFAObject { 42410 constructor(attributes) { 42411 super(TEMPLATE_NS_ID, "breakBefore", true); 42412 this.id = attributes.id || ""; 42413 this.leader = attributes.leader || ""; 42414 this.startNew = getInteger({ 42415 data: attributes.startNew, 42416 defaultValue: 0, 42417 validate: x => x === 1 42418 }); 42419 this.target = attributes.target || ""; 42420 this.targetType = getStringOption(attributes.targetType, ["auto", "contentArea", "pageArea"]); 42421 this.trailer = attributes.trailer || ""; 42422 this.use = attributes.use || ""; 42423 this.usehref = attributes.usehref || ""; 42424 this.script = null; 42425 } 42426 [$toHTML](availableSpace) { 42427 this[$extra] = {}; 42428 return HTMLResult.FAILURE; 42429 } 42430} 42431class Button extends XFAObject { 42432 constructor(attributes) { 42433 super(TEMPLATE_NS_ID, "button", true); 42434 this.highlight = getStringOption(attributes.highlight, ["inverted", "none", "outline", "push"]); 42435 this.id = attributes.id || ""; 42436 this.use = attributes.use || ""; 42437 this.usehref = attributes.usehref || ""; 42438 this.extras = null; 42439 } 42440 [$toHTML](availableSpace) { 42441 const parent = this[$getParent](); 42442 const grandpa = parent[$getParent](); 42443 const htmlButton = { 42444 name: "button", 42445 attributes: { 42446 id: this[$uid], 42447 class: ["xfaButton"], 42448 style: {} 42449 }, 42450 children: [] 42451 }; 42452 for (const event of grandpa.event.children) { 42453 if (event.activity !== "click" || !event.script) { 42454 continue; 42455 } 42456 const jsURL = recoverJsURL(event.script[$content]); 42457 if (!jsURL) { 42458 continue; 42459 } 42460 const href = fixURL(jsURL.url); 42461 if (!href) { 42462 continue; 42463 } 42464 htmlButton.children.push({ 42465 name: "a", 42466 attributes: { 42467 id: "link" + this[$uid], 42468 href, 42469 newWindow: jsURL.newWindow, 42470 class: ["xfaLink"], 42471 style: {} 42472 }, 42473 children: [] 42474 }); 42475 } 42476 return HTMLResult.success(htmlButton); 42477 } 42478} 42479class Calculate extends XFAObject { 42480 constructor(attributes) { 42481 super(TEMPLATE_NS_ID, "calculate", true); 42482 this.id = attributes.id || ""; 42483 this.override = getStringOption(attributes.override, ["disabled", "error", "ignore", "warning"]); 42484 this.use = attributes.use || ""; 42485 this.usehref = attributes.usehref || ""; 42486 this.extras = null; 42487 this.message = null; 42488 this.script = null; 42489 } 42490} 42491class Caption extends XFAObject { 42492 constructor(attributes) { 42493 super(TEMPLATE_NS_ID, "caption", true); 42494 this.id = attributes.id || ""; 42495 this.placement = getStringOption(attributes.placement, ["left", "bottom", "inline", "right", "top"]); 42496 this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]); 42497 this.reserve = Math.ceil(getMeasurement(attributes.reserve)); 42498 this.use = attributes.use || ""; 42499 this.usehref = attributes.usehref || ""; 42500 this.extras = null; 42501 this.font = null; 42502 this.margin = null; 42503 this.para = null; 42504 this.value = null; 42505 } 42506 [$setValue](value) { 42507 _setValue(this, value); 42508 } 42509 [$getExtra](availableSpace) { 42510 if (!this[$extra]) { 42511 let { 42512 width, 42513 height 42514 } = availableSpace; 42515 switch (this.placement) { 42516 case "left": 42517 case "right": 42518 case "inline": 42519 width = this.reserve <= 0 ? width : this.reserve; 42520 break; 42521 case "top": 42522 case "bottom": 42523 height = this.reserve <= 0 ? height : this.reserve; 42524 break; 42525 } 42526 this[$extra] = layoutNode(this, { 42527 width, 42528 height 42529 }); 42530 } 42531 return this[$extra]; 42532 } 42533 [$toHTML](availableSpace) { 42534 if (!this.value) { 42535 return HTMLResult.EMPTY; 42536 } 42537 this[$pushPara](); 42538 const value = this.value[$toHTML](availableSpace).html; 42539 if (!value) { 42540 this[$popPara](); 42541 return HTMLResult.EMPTY; 42542 } 42543 const savedReserve = this.reserve; 42544 if (this.reserve <= 0) { 42545 const { 42546 w, 42547 h 42548 } = this[$getExtra](availableSpace); 42549 switch (this.placement) { 42550 case "left": 42551 case "right": 42552 case "inline": 42553 this.reserve = w; 42554 break; 42555 case "top": 42556 case "bottom": 42557 this.reserve = h; 42558 break; 42559 } 42560 } 42561 const children = []; 42562 if (typeof value === "string") { 42563 children.push({ 42564 name: "#text", 42565 value 42566 }); 42567 } else { 42568 children.push(value); 42569 } 42570 const style = toStyle(this, "font", "margin", "visibility"); 42571 switch (this.placement) { 42572 case "left": 42573 case "right": 42574 if (this.reserve > 0) { 42575 style.width = measureToString(this.reserve); 42576 } 42577 break; 42578 case "top": 42579 case "bottom": 42580 if (this.reserve > 0) { 42581 style.height = measureToString(this.reserve); 42582 } 42583 break; 42584 } 42585 setPara(this, null, value); 42586 this[$popPara](); 42587 this.reserve = savedReserve; 42588 return HTMLResult.success({ 42589 name: "div", 42590 attributes: { 42591 style, 42592 class: ["xfaCaption"] 42593 }, 42594 children 42595 }); 42596 } 42597} 42598class Certificate extends StringObject { 42599 constructor(attributes) { 42600 super(TEMPLATE_NS_ID, "certificate"); 42601 this.id = attributes.id || ""; 42602 this.name = attributes.name || ""; 42603 this.use = attributes.use || ""; 42604 this.usehref = attributes.usehref || ""; 42605 } 42606} 42607class Certificates extends XFAObject { 42608 constructor(attributes) { 42609 super(TEMPLATE_NS_ID, "certificates", true); 42610 this.credentialServerPolicy = getStringOption(attributes.credentialServerPolicy, ["optional", "required"]); 42611 this.id = attributes.id || ""; 42612 this.url = attributes.url || ""; 42613 this.urlPolicy = attributes.urlPolicy || ""; 42614 this.use = attributes.use || ""; 42615 this.usehref = attributes.usehref || ""; 42616 this.encryption = null; 42617 this.issuers = null; 42618 this.keyUsage = null; 42619 this.oids = null; 42620 this.signing = null; 42621 this.subjectDNs = null; 42622 } 42623} 42624class CheckButton extends XFAObject { 42625 constructor(attributes) { 42626 super(TEMPLATE_NS_ID, "checkButton", true); 42627 this.id = attributes.id || ""; 42628 this.mark = getStringOption(attributes.mark, ["default", "check", "circle", "cross", "diamond", "square", "star"]); 42629 this.shape = getStringOption(attributes.shape, ["square", "round"]); 42630 this.size = getMeasurement(attributes.size, "10pt"); 42631 this.use = attributes.use || ""; 42632 this.usehref = attributes.usehref || ""; 42633 this.border = null; 42634 this.extras = null; 42635 this.margin = null; 42636 } 42637 [$toHTML](availableSpace) { 42638 const style = toStyle(
vendor: 2,525 bytes, lines 42638-42719
42638"margin"); 42639 const size = measureToString(this.size); 42640 style.width = style.height = size; 42641 let type; 42642 let className; 42643 let groupId; 42644 const field = this[$getParent]()[$getParent](); 42645 const items = field.items.children.length && field.items.children[0][$toHTML]().html || []; 42646 const exportedValue = { 42647 on: (items[0] !== undefined ? items[0] : "on").toString(), 42648 off: (items[1] !== undefined ? items[1] : "off").toString() 42649 }; 42650 const value = field.value?.[$text]() || "off"; 42651 const checked = value === exportedValue.on || undefined; 42652 const container = field[$getSubformParent](); 42653 const fieldId = field[$uid]; 42654 let dataId; 42655 if (container instanceof ExclGroup) { 42656 groupId = container[$uid]; 42657 type = "radio"; 42658 className = "xfaRadio"; 42659 dataId = container[$data]?.[$uid] || container[$uid]; 42660 } else { 42661 type = "checkbox"; 42662 className = "xfaCheckbox"; 42663 dataId = field[$data]?.[$uid] || field[$uid]; 42664 } 42665 const input = { 42666 name: "input", 42667 attributes: { 42668 class: [className], 42669 style, 42670 fieldId, 42671 dataId, 42672 type, 42673 checked, 42674 xfaOn: exportedValue.on, 42675 xfaOff: exportedValue.off, 42676 "aria-label": ariaLabel(field), 42677 "aria-required": false 42678 } 42679 }; 42680 if (groupId) { 42681 input.attributes.name = groupId; 42682 } 42683 if (isRequired(field)) { 42684 input.attributes["aria-required"] = true; 42685 input.attributes.required = true; 42686 } 42687 return HTMLResult.success({ 42688 name: "label", 42689 attributes: { 42690 class: ["xfaLabel"] 42691 }, 42692 children: [input] 42693 }); 42694 } 42695} 42696class ChoiceList extends XFAObject { 42697 constructor(attributes) { 42698 super(TEMPLATE_NS_ID, "choiceList", true); 42699 this.commitOn = getStringOption(attributes.commitOn, ["select", "exit"]); 42700 this.id = attributes.id || ""; 42701 this.open = getStringOption(attributes.open, ["userControl", "always", "multiSelect", "onEntry"]); 42702 this.textEntry = getInteger({ 42703 data: attributes.textEntry, 42704 defaultValue: 0, 42705 validate: x => x === 1 42706 }); 42707 this.use = attributes.use || ""; 42708 this.usehref = attributes.usehref || ""; 42709 this.border = null; 42710 this.extras = null; 42711 this.margin = null; 42712 } 42713 [$toHTML](availableSpace) { 42714 const style = toStyle(this, "border", "margin"); 42715 const ui = this[$getParent](); 42716 const field = ui[$getParent](); 42717 const fontSize = field.font?.size || 10; 42718 const optionStyle = { 42719 fontSize: `calc(${fontSize}px * var(-
vendor: 24,362 bytes, lines 42719-43465
42719-scale-factor))` 42720 }; 42721 const children = []; 42722 if (field.items.children.length > 0) { 42723 const items = field.items; 42724 let displayedIndex = 0; 42725 let saveIndex = 0; 42726 if (items.children.length === 2) { 42727 displayedIndex = items.children[0].save; 42728 saveIndex = 1 - displayedIndex; 42729 } 42730 const displayed = items.children[displayedIndex][$toHTML]().html; 42731 const values = items.children[saveIndex][$toHTML]().html; 42732 let selected = false; 42733 const value = field.value?.[$text]() || ""; 42734 for (let i = 0, ii = displayed.length; i < ii; i++) { 42735 const option = { 42736 name: "option", 42737 attributes: { 42738 value: values[i] || displayed[i], 42739 style: optionStyle 42740 }, 42741 value: displayed[i] 42742 }; 42743 if (values[i] === value) { 42744 option.attributes.selected = selected = true; 42745 } 42746 children.push(option); 42747 } 42748 if (!selected) { 42749 children.splice(0, 0, { 42750 name: "option", 42751 attributes: { 42752 hidden: true, 42753 selected: true 42754 }, 42755 value: " " 42756 }); 42757 } 42758 } 42759 const selectAttributes = { 42760 class: ["xfaSelect"], 42761 fieldId: field[$uid], 42762 dataId: field[$data]?.[$uid] || field[$uid], 42763 style, 42764 "aria-label": ariaLabel(field), 42765 "aria-required": false 42766 }; 42767 if (isRequired(field)) { 42768 selectAttributes["aria-required"] = true; 42769 selectAttributes.required = true; 42770 } 42771 if (this.open === "multiSelect") { 42772 selectAttributes.multiple = true; 42773 } 42774 return HTMLResult.success({ 42775 name: "label", 42776 attributes: { 42777 class: ["xfaLabel"] 42778 }, 42779 children: [{ 42780 name: "select", 42781 children, 42782 attributes: selectAttributes 42783 }] 42784 }); 42785 } 42786} 42787class Color extends XFAObject { 42788 constructor(attributes) { 42789 super(TEMPLATE_NS_ID, "color", true); 42790 this.cSpace = getStringOption(attributes.cSpace, ["SRGB"]); 42791 this.id = attributes.id || ""; 42792 this.use = attributes.use || ""; 42793 this.usehref = attributes.usehref || ""; 42794 this.value = attributes.value ? getColor(attributes.value) : ""; 42795 this.extras = null; 42796 } 42797 [$hasSettableValue]() { 42798 return false; 42799 } 42800 [$toStyle]() { 42801 return this.value ? Util.makeHexColor(this.value.r, this.value.g, this.value.b) : null; 42802 } 42803} 42804class Comb extends XFAObject { 42805 constructor(attributes) { 42806 super(TEMPLATE_NS_ID, "comb"); 42807 this.id = attributes.id || ""; 42808 this.numberOfCells = getInteger({ 42809 data: attributes.numberOfCells, 42810 defaultValue: 0, 42811 validate: x => x >= 0 42812 }); 42813 this.use = attributes.use || ""; 42814 this.usehref = attributes.usehref || ""; 42815 } 42816} 42817class Connect extends XFAObject { 42818 constructor(attributes) { 42819 super(TEMPLATE_NS_ID, "connect", true); 42820 this.connection = attributes.connection || ""; 42821 this.id = attributes.id || ""; 42822 this.ref = attributes.ref || ""; 42823 this.usage = getStringOption(attributes.usage, ["exportAndImport", "exportOnly", "importOnly"]); 42824 this.use = attributes.use || ""; 42825 this.usehref = attributes.usehref || ""; 42826 this.picture = null; 42827 } 42828} 42829class ContentArea extends XFAObject { 42830 constructor(attributes) { 42831 super(TEMPLATE_NS_ID, "contentArea", true); 42832 this.h = getMeasurement(attributes.h); 42833 this.id = attributes.id || ""; 42834 this.name = attributes.name || ""; 42835 this.relevant = getRelevant(attributes.relevant); 42836 this.use = attributes.use || ""; 42837 this.usehref = attributes.usehref || ""; 42838 this.w = getMeasurement(attributes.w); 42839 this.x = getMeasurement(attributes.x, "0pt"); 42840 this.y = getMeasurement(attributes.y, "0pt"); 42841 this.desc = null; 42842 this.extras = null; 42843 } 42844 [$toHTML](availableSpace) { 42845 const left = measureToString(this.x); 42846 const top = measureToString(this.y); 42847 const style = { 42848 left, 42849 top, 42850 width: measureToString(this.w), 42851 height: measureToString(this.h) 42852 }; 42853 const classNames = ["xfaContentarea"]; 42854 if (isPrintOnly(this)) { 42855 classNames.push("xfaPrintOnly"); 42856 } 42857 return HTMLResult.success({ 42858 name: "div", 42859 children: [], 42860 attributes: { 42861 style, 42862 class: classNames, 42863 id: this[$uid] 42864 } 42865 }); 42866 } 42867} 42868class Corner extends XFAObject { 42869 constructor(attributes) { 42870 super(TEMPLATE_NS_ID, "corner", true); 42871 this.id = attributes.id || ""; 42872 this.inverted = getInteger({ 42873 data: attributes.inverted, 42874 defaultValue: 0, 42875 validate: x => x === 1 42876 }); 42877 this.join = getStringOption(attributes.join, ["square", "round"]); 42878 this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]); 42879 this.radius = getMeasurement(attributes.radius); 42880 this.stroke = getStringOption(attributes.stroke, ["solid", "dashDot", "dashDotDot", "dashed", "dotted", "embossed", "etched", "lowered", "raised"]); 42881 this.thickness = getMeasurement(attributes.thickness, "0.5pt"); 42882 this.use = attributes.use || ""; 42883 this.usehref = attributes.usehref || ""; 42884 this.color = null; 42885 this.extras = null; 42886 } 42887 [$toStyle]() { 42888 const style = toStyle(this, "visibility"); 42889 style.radius = measureToString(this.join === "square" ? 0 : this.radius); 42890 return style; 42891 } 42892} 42893class DateElement extends ContentObject { 42894 constructor(attributes) { 42895 super(TEMPLATE_NS_ID, "date"); 42896 this.id = attributes.id || ""; 42897 this.name = attributes.name || ""; 42898 this.use = attributes.use || ""; 42899 this.usehref = attributes.usehref || ""; 42900 } 42901 [$finalize]() { 42902 const date = this[$content].trim(); 42903 this[$content] = date ? new Date(date) : null; 42904 } 42905 [$toHTML](availableSpace) { 42906 return valueToHtml(this[$content] ? this[$content].toString() : ""); 42907 } 42908} 42909class DateTime extends ContentObject { 42910 constructor(attributes) { 42911 super(TEMPLATE_NS_ID, "dateTime"); 42912 this.id = attributes.id || ""; 42913 this.name = attributes.name || ""; 42914 this.use = attributes.use || ""; 42915 this.usehref = attributes.usehref || ""; 42916 } 42917 [$finalize]() { 42918 const date = this[$content].trim(); 42919 this[$content] = date ? new Date(date) : null; 42920 } 42921 [$toHTML](availableSpace) { 42922 return valueToHtml(this[$content] ? this[$content].toString() : ""); 42923 } 42924} 42925class DateTimeEdit extends XFAObject { 42926 constructor(attributes) { 42927 super(TEMPLATE_NS_ID, "dateTimeEdit", true); 42928 this.hScrollPolicy = getStringOption(attributes.hScrollPolicy, ["auto", "off", "on"]); 42929 this.id = attributes.id || ""; 42930 this.picker = getStringOption(attributes.picker, ["host", "none"]); 42931 this.use = attributes.use || ""; 42932 this.usehref = attributes.usehref || ""; 42933 this.border = null; 42934 this.comb = null; 42935 this.extras = null; 42936 this.margin = null; 42937 } 42938 [$toHTML](availableSpace) { 42939 const style = toStyle(this, "border", "font", "margin"); 42940 const field = this[$getParent]()[$getParent](); 42941 const html = { 42942 name: "input", 42943 attributes: { 42944 type: "text", 42945 fieldId: field[$uid], 42946 dataId: field[$data]?.[$uid] || field[$uid], 42947 class: ["xfaTextfield"], 42948 style, 42949 "aria-label": ariaLabel(field), 42950 "aria-required": false 42951 } 42952 }; 42953 if (isRequired(field)) { 42954 html.attributes["aria-required"] = true; 42955 html.attributes.required = true; 42956 } 42957 return HTMLResult.success({ 42958 name: "label", 42959 attributes: { 42960 class: ["xfaLabel"] 42961 }, 42962 children: [html] 42963 }); 42964 } 42965} 42966class Decimal extends ContentObject { 42967 constructor(attributes) { 42968 super(TEMPLATE_NS_ID, "decimal"); 42969 this.fracDigits = getInteger({ 42970 data: attributes.fracDigits, 42971 defaultValue: 2, 42972 validate: x => true 42973 }); 42974 this.id = attributes.id || ""; 42975 this.leadDigits = getInteger({ 42976 data: attributes.leadDigits, 42977 defaultValue: -1, 42978 validate: x => true 42979 }); 42980 this.name = attributes.name || ""; 42981 this.use = attributes.use || ""; 42982 this.usehref = attributes.usehref || ""; 42983 } 42984 [$finalize]() { 42985 const number = parseFloat(this[$content].trim()); 42986 this[$content] = isNaN(number) ? null : number; 42987 } 42988 [$toHTML](availableSpace) { 42989 return valueToHtml(this[$content] !== null ? this[$content].toString() : ""); 42990 } 42991} 42992class DefaultUi extends XFAObject { 42993 constructor(attributes) { 42994 super(TEMPLATE_NS_ID, "defaultUi", true); 42995 this.id = attributes.id || ""; 42996 this.use = attributes.use || ""; 42997 this.usehref = attributes.usehref || ""; 42998 this.extras = null; 42999 } 43000} 43001class Desc extends XFAObject { 43002 constructor(attributes) { 43003 super(TEMPLATE_NS_ID, "desc", true); 43004 this.id = attributes.id || ""; 43005 this.use = attributes.use || ""; 43006 this.usehref = attributes.usehref || ""; 43007 this.boolean = new XFAObjectArray(); 43008 this.date = new XFAObjectArray(); 43009 this.dateTime = new XFAObjectArray(); 43010 this.decimal = new XFAObjectArray(); 43011 this.exData = new XFAObjectArray(); 43012 this.float = new XFAObjectArray(); 43013 this.image = new XFAObjectArray(); 43014 this.integer = new XFAObjectArray(); 43015 this.text = new XFAObjectArray(); 43016 this.time = new XFAObjectArray(); 43017 } 43018} 43019class DigestMethod extends OptionObject { 43020 constructor(attributes) { 43021 super(TEMPLATE_NS_ID, "digestMethod", ["", "SHA1", "SHA256", "SHA512", "RIPEMD160"]); 43022 this.id = attributes.id || ""; 43023 this.use = attributes.use || ""; 43024 this.usehref = attributes.usehref || ""; 43025 } 43026} 43027class DigestMethods extends XFAObject { 43028 constructor(attributes) { 43029 super(TEMPLATE_NS_ID, "digestMethods", true); 43030 this.id = attributes.id || ""; 43031 this.type = getStringOption(attributes.type, ["optional", "required"]); 43032 this.use = attributes.use || ""; 43033 this.usehref = attributes.usehref || ""; 43034 this.digestMethod = new XFAObjectArray(); 43035 } 43036} 43037class Draw extends XFAObject { 43038 constructor(attributes) { 43039 super(TEMPLATE_NS_ID, "draw", true); 43040 this.anchorType = getStringOption(attributes.anchorType, ["topLeft", "bottomCenter", "bottomLeft", "bottomRight", "middleCenter", "middleLeft", "middleRight", "topCenter", "topRight"]); 43041 this.colSpan = getInteger({ 43042 data: attributes.colSpan, 43043 defaultValue: 1, 43044 validate: n => n >= 1 || n === -1 43045 }); 43046 this.h = attributes.h ? getMeasurement(attributes.h) : ""; 43047 this.hAlign = getStringOption(attributes.hAlign, ["left", "center", "justify", "justifyAll", "radix", "right"]); 43048 this.id = attributes.id || ""; 43049 this.locale = attributes.locale || ""; 43050 this.maxH = getMeasurement(attributes.maxH, "0pt"); 43051 this.maxW = getMeasurement(attributes.maxW, "0pt"); 43052 this.minH = getMeasurement(attributes.minH, "0pt"); 43053 this.minW = getMeasurement(attributes.minW, "0pt"); 43054 this.name = attributes.name || ""; 43055 this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]); 43056 this.relevant = getRelevant(attributes.relevant); 43057 this.rotate = getInteger({ 43058 data: attributes.rotate, 43059 defaultValue: 0, 43060 validate: x => x % 90 === 0 43061 }); 43062 this.use = attributes.use || ""; 43063 this.usehref = attributes.usehref || ""; 43064 this.w = attributes.w ? getMeasurement(attributes.w) : ""; 43065 this.x = getMeasurement(attributes.x, "0pt"); 43066 this.y = getMeasurement(attributes.y, "0pt"); 43067 this.assist = null; 43068 this.border = null; 43069 this.caption = null; 43070 this.desc = null; 43071 this.extras = null; 43072 this.font = null; 43073 this.keep = null; 43074 this.margin = null; 43075 this.para = null; 43076 this.traversal = null; 43077 this.ui = null; 43078 this.value = null; 43079 this.setProperty = new XFAObjectArray(); 43080 } 43081 [$setValue](value) { 43082 _setValue(this, value); 43083 } 43084 [$toHTML](availableSpace) { 43085 setTabIndex(this); 43086 if (this.presence === "hidden" || this.presence === "inactive") { 43087 return HTMLResult.EMPTY; 43088 } 43089 fixDimensions(this); 43090 this[$pushPara](); 43091 const savedW = this.w; 43092 const savedH = this.h; 43093 const { 43094 w, 43095 h, 43096 isBroken 43097 } = layoutNode(this, availableSpace); 43098 if (w && this.w === "") { 43099 if (isBroken && this[$getSubformParent]()[$isThereMoreWidth]()) { 43100 this[$popPara](); 43101 return HTMLResult.FAILURE; 43102 } 43103 this.w = w; 43104 } 43105 if (h && this.h === "") { 43106 this.h = h; 43107 } 43108 setFirstUnsplittable(this); 43109 if (!checkDimensions(this, availableSpace)) { 43110 this.w = savedW; 43111 this.h = savedH; 43112 this[$popPara](); 43113 return HTMLResult.FAILURE; 43114 } 43115 unsetFirstUnsplittable(this); 43116 const style = toStyle(this, "font", "hAlign", "dimensions", "position", "presence", "rotate", "anchorType", "border", "margin"); 43117 setMinMaxDimensions(this, style); 43118 if (style.margin) { 43119 style.padding = style.margin; 43120 delete style.margin; 43121 } 43122 const classNames = ["xfaDraw"]; 43123 if (this.font) { 43124 classNames.push("xfaFont"); 43125 } 43126 if (isPrintOnly(this)) { 43127 classNames.push("xfaPrintOnly"); 43128 } 43129 const attributes = { 43130 style, 43131 id: this[$uid], 43132 class: classNames 43133 }; 43134 if (this.name) { 43135 attributes.xfaName = this.name; 43136 } 43137 const html = { 43138 name: "div", 43139 attributes, 43140 children: [] 43141 }; 43142 applyAssist(this, attributes); 43143 const bbox = computeBbox(this, html, availableSpace); 43144 const value = this.value ? this.value[$toHTML](availableSpace).html : null; 43145 if (value === null) { 43146 this.w = savedW; 43147 this.h = savedH; 43148 this[$popPara](); 43149 return HTMLResult.success(createWrapper(this, html), bbox); 43150 } 43151 html.children.push(value); 43152 setPara(this, style, value); 43153 this.w = savedW; 43154 this.h = savedH; 43155 this[$popPara](); 43156 return HTMLResult.success(createWrapper(this, html), bbox); 43157 } 43158} 43159class Edge extends XFAObject { 43160 constructor(attributes) { 43161 super(TEMPLATE_NS_ID, "edge", true); 43162 this.cap = getStringOption(attributes.cap, ["square", "butt", "round"]); 43163 this.id = attributes.id || ""; 43164 this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]); 43165 this.stroke = getStringOption(attributes.stroke, ["solid", "dashDot", "dashDotDot", "dashed", "dotted", "embossed", "etched", "lowered", "raised"]); 43166 this.thickness = getMeasurement(attributes.thickness, "0.5pt"); 43167 this.use = attributes.use || ""; 43168 this.usehref = attributes.usehref || ""; 43169 this.color = null; 43170 this.extras = null; 43171 } 43172 [$toStyle]() { 43173 const style = toStyle(this, "visibility"); 43174 Object.assign(style, { 43175 linecap: this.cap, 43176 width: measureToString(this.thickness), 43177 color: this.color ? this.color[$toStyle]() : "#000000", 43178 style: "" 43179 }); 43180 if (this.presence !== "visible") { 43181 style.style = "none"; 43182 } else { 43183 switch (this.stroke) { 43184 case "solid": 43185 style.style = "solid"; 43186 break; 43187 case "dashDot": 43188 style.style = "dashed"; 43189 break; 43190 case "dashDotDot": 43191 style.style = "dashed"; 43192 break; 43193 case "dashed": 43194 style.style = "dashed"; 43195 break; 43196 case "dotted": 43197 style.style = "dotted"; 43198 break; 43199 case "embossed": 43200 style.style = "ridge"; 43201 break; 43202 case "etched": 43203 style.style = "groove"; 43204 break; 43205 case "lowered": 43206 style.style = "inset"; 43207 break; 43208 case "raised": 43209 style.style = "outset"; 43210 break; 43211 } 43212 } 43213 return style; 43214 } 43215} 43216class Encoding extends OptionObject { 43217 constructor(attributes) { 43218 super(TEMPLATE_NS_ID, "encoding", ["adbe.x509.rsa_sha1", "adbe.pkcs7.detached", "adbe.pkcs7.sha1"]); 43219 this.id = attributes.id || ""; 43220 this.use = attributes.use || ""; 43221 this.usehref = attributes.usehref || ""; 43222 } 43223} 43224class Encodings extends XFAObject { 43225 constructor(attributes) { 43226 super(TEMPLATE_NS_ID, "encodings", true); 43227 this.id = attributes.id || ""; 43228 this.type = getStringOption(attributes.type, ["optional", "required"]); 43229 this.use = attributes.use || ""; 43230 this.usehref = attributes.usehref || ""; 43231 this.encoding = new XFAObjectArray(); 43232 } 43233} 43234class Encrypt extends XFAObject { 43235 constructor(attributes) { 43236 super(TEMPLATE_NS_ID, "encrypt", true); 43237 this.id = attributes.id || ""; 43238 this.use = attributes.use || ""; 43239 this.usehref = attributes.usehref || ""; 43240 this.certificate = null; 43241 } 43242} 43243class EncryptData extends XFAObject { 43244 constructor(attributes) { 43245 super(TEMPLATE_NS_ID, "encryptData", true); 43246 this.id = attributes.id || ""; 43247 this.operation = getStringOption(attributes.operation, ["encrypt", "decrypt"]); 43248 this.target = attributes.target || ""; 43249 this.use = attributes.use || ""; 43250 this.usehref = attributes.usehref || ""; 43251 this.filter = null; 43252 this.manifest = null; 43253 } 43254} 43255class Encryption extends XFAObject { 43256 constructor(attributes) { 43257 super(TEMPLATE_NS_ID, "encryption", true); 43258 this.id = attributes.id || ""; 43259 this.type = getStringOption(attributes.type, ["optional", "required"]); 43260 this.use = attributes.use || ""; 43261 this.usehref = attributes.usehref || ""; 43262 this.certificate = new XFAObjectArray(); 43263 } 43264} 43265class EncryptionMethod extends OptionObject { 43266 constructor(attributes) { 43267 super(TEMPLATE_NS_ID, "encryptionMethod", ["", "AES256-CBC", "TRIPLEDES-CBC", "AES128-CBC", "AES192-CBC"]); 43268 this.id = attributes.id || ""; 43269 this.use = attributes.use || ""; 43270 this.usehref = attributes.usehref || ""; 43271 } 43272} 43273class EncryptionMethods extends XFAObject { 43274 constructor(attributes) { 43275 super(TEMPLATE_NS_ID, "encryptionMethods", true); 43276 this.id = attributes.id || ""; 43277 this.type = getStringOption(attributes.type, ["optional", "required"]); 43278 this.use = attributes.use || ""; 43279 this.usehref = attributes.usehref || ""; 43280 this.encryptionMethod = new XFAObjectArray(); 43281 } 43282} 43283class Event extends XFAObject { 43284 constructor(attributes) { 43285 super(TEMPLATE_NS_ID, "event", true); 43286 this.activity = getStringOption(attributes.activity, ["click", "change", "docClose", "docReady", "enter", "exit", "full", "indexChange", "initialize", "mouseDown", "mouseEnter", "mouseExit", "mouseUp", "postExecute", "postOpen", "postPrint", "postSave", "postSign", "postSubmit", "preExecute", "preOpen", "prePrint", "preSave", "preSign", "preSubmit", "ready", "validationState"]); 43287 this.id = attributes.id || ""; 43288 this.listen = getStringOption(attributes.listen, ["refOnly", "refAndDescendents"]); 43289 this.name = attributes.name || ""; 43290 this.ref = attributes.ref || ""; 43291 this.use = attributes.use || ""; 43292 this.usehref = attributes.usehref || ""; 43293 this.extras = null; 43294 this.encryptData = null; 43295 this.execute = null; 43296 this.script = null; 43297 this.signData = null; 43298 this.submit = null; 43299 } 43300} 43301class ExData extends ContentObject { 43302 constructor(attributes) { 43303 super(TEMPLATE_NS_ID, "exData"); 43304 this.contentType = attributes.contentType || ""; 43305 this.href = attributes.href || ""; 43306 this.id = attributes.id || ""; 43307 this.maxLength = getInteger({ 43308 data: attributes.maxLength, 43309 defaultValue: -1, 43310 validate: x => x >= -1 43311 }); 43312 this.name = attributes.name || ""; 43313 this.rid = attributes.rid || ""; 43314 this.transferEncoding = getStringOption(attributes.transferEncoding, ["none", "base64", "package"]); 43315 this.use = attributes.use || ""; 43316 this.usehref = attributes.usehref || ""; 43317 } 43318 [$isCDATAXml]() { 43319 return this.contentType === "text/html"; 43320 } 43321 [$onChild](child) { 43322 if (this.contentType === "text/html" && child[$namespaceId] === NamespaceIds.xhtml.id) { 43323 this[$content] = child; 43324 return true; 43325 } 43326 if (this.contentType === "text/xml") { 43327 this[$content] = child; 43328 return true; 43329 } 43330 return false; 43331 } 43332 [$toHTML](availableSpace) { 43333 if (this.contentType !== "text/html" || !this[$content]) { 43334 return HTMLResult.EMPTY; 43335 } 43336 return this[$content][$toHTML](availableSpace); 43337 } 43338} 43339class ExObject extends XFAObject { 43340 constructor(attributes) { 43341 super(TEMPLATE_NS_ID, "exObject", true); 43342 this.archive = attributes.archive || ""; 43343 this.classId = attributes.classId || ""; 43344 this.codeBase = attributes.codeBase || ""; 43345 this.codeType = attributes.codeType || ""; 43346 this.id = attributes.id || ""; 43347 this.name = attributes.name || ""; 43348 this.use = attributes.use || ""; 43349 this.usehref = attributes.usehref || ""; 43350 this.extras = null; 43351 this.boolean = new XFAObjectArray(); 43352 this.date = new XFAObjectArray(); 43353 this.dateTime = new XFAObjectArray(); 43354 this.decimal = new XFAObjectArray(); 43355 this.exData = new XFAObjectArray(); 43356 this.exObject = new XFAObjectArray(); 43357 this.float = new XFAObjectArray(); 43358 this.image = new XFAObjectArray(); 43359 this.integer = new XFAObjectArray(); 43360 this.text = new XFAObjectArray(); 43361 this.time = new XFAObjectArray(); 43362 } 43363} 43364class ExclGroup extends XFAObject { 43365 constructor(attributes) { 43366 super(TEMPLATE_NS_ID, "exclGroup", true); 43367 this.access = getStringOption(attributes.access, ["open", "nonInteractive", "protected", "readOnly"]); 43368 this.accessKey = attributes.accessKey || ""; 43369 this.anchorType = getStringOption(attributes.anchorType, ["topLeft", "bottomCenter", "bottomLeft", "bottomRight", "middleCenter", "middleLeft", "middleRight", "topCenter", "topRight"]); 43370 this.colSpan = getInteger({ 43371 data: attributes.colSpan, 43372 defaultValue: 1, 43373 validate: n => n >= 1 || n === -1 43374 }); 43375 this.h = attributes.h ? getMeasurement(attributes.h) : ""; 43376 this.hAlign = getStringOption(attributes.hAlign, ["left", "center", "justify", "justifyAll", "radix", "right"]); 43377 this.id = attributes.id || ""; 43378 this.layout = getStringOption(attributes.layout, ["position", "lr-tb", "rl-row", "rl-tb", "row", "table", "tb"]); 43379 this.maxH = getMeasurement(attributes.maxH, "0pt"); 43380 this.maxW = getMeasurement(attributes.maxW, "0pt"); 43381 this.minH = getMeasurement(attributes.minH, "0pt"); 43382 this.minW = getMeasurement(attributes.minW, "0pt"); 43383 this.name = attributes.name || ""; 43384 this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]); 43385 this.relevant = getRelevant(attributes.relevant); 43386 this.use = attributes.use || ""; 43387 this.usehref = attributes.usehref || ""; 43388 this.w = attributes.w ? getMeasurement(attributes.w) : ""; 43389 this.x = getMeasurement(attributes.x, "0pt"); 43390 this.y = getMeasurement(attributes.y, "0pt"); 43391 this.assist = null; 43392 this.bind = null; 43393 this.border = null; 43394 this.calculate = null; 43395 this.caption = null; 43396 this.desc = null; 43397 this.extras = null; 43398 this.margin = null; 43399 this.para = null; 43400 this.traversal = null; 43401 this.validate = null; 43402 this.connect = new XFAObjectArray(); 43403 this.event = new XFAObjectArray(); 43404 this.field = new XFAObjectArray(); 43405 this.setProperty = new XFAObjectArray(); 43406 } 43407 [$isBindable]() { 43408 return true; 43409 } 43410 [$hasSettableValue]() { 43411 return true; 43412 } 43413 [$setValue](value) { 43414 for (const field of this.field.children) { 43415 if (!field.value) { 43416 const nodeValue = new Value({}); 43417 field[$appendChild](nodeValue); 43418 field.value = nodeValue; 43419 } 43420 field.value[$setValue](value); 43421 } 43422 } 43423 [$isThereMoreWidth]() { 43424 return this.layout.endsWith("-tb") && this[$extra].attempt === 0 && this[$extra].numberInLine > 0 || this[$getParent]()[$isThereMoreWidth](); 43425 } 43426 [$isSplittable]() { 43427 const parent = this[$getSubformParent](); 43428 if (!parent[$isSplittable]()) { 43429 return false; 43430 } 43431 if (this[$extra]._isSplittable !== undefined) { 43432 return this[$extra]._isSplittable; 43433 } 43434 if (this.layout === "position" || this.layout.includes("row")) { 43435 this[$extra]._isSplittable = false; 43436 return false; 43437 } 43438 if (parent.layout?.endsWith("-tb") && parent[$extra].numberInLine !== 0) { 43439 return false; 43440 } 43441 this[$extra]._isSplittable = true; 43442 return true; 43443 } 43444 [$flushHTML]() { 43445 return flushHTML(this); 43446 } 43447 [$addHTML](html, bbox) { 43448 addHTML(this, html, bbox); 43449 } 43450 [$getAvailableSpace]() { 43451 return getAvailableSpace(this); 43452 } 43453 [$toHTML](availableSpace) { 43454 setTabIndex(this); 43455 if (this.presence === "hidden" || this.presence === "inactive" || this.h === 0 || this.w === 0) { 43456 return HTMLResult.EMPTY; 43457 } 43458 fixDimensions(this); 43459 const children = []; 43460 const attributes = { 43461 id: this[$uid], 43462 class: [] 43463 }; 43464 setAccess(this, attributes.class); 43465
vendor: 7,481 bytes, lines 43465-43689
43465if (!this[$extra]) { 43466 this[$extra] = Object.create(null); 43467 } 43468 Object.assign(this[$extra], { 43469 children, 43470 attributes, 43471 attempt: 0, 43472 line: null, 43473 numberInLine: 0, 43474 availableSpace: { 43475 width: Math.min(this.w || Infinity, availableSpace.width), 43476 height: Math.min(this.h || Infinity, availableSpace.height) 43477 }, 43478 width: 0, 43479 height: 0, 43480 prevHeight: 0, 43481 currentWidth: 0 43482 }); 43483 const isSplittable = this[$isSplittable](); 43484 if (!isSplittable) { 43485 setFirstUnsplittable(this); 43486 } 43487 if (!checkDimensions(this, availableSpace)) { 43488 return HTMLResult.FAILURE; 43489 } 43490 const filter = new Set(["field"]); 43491 if (this.layout.includes("row")) { 43492 const columnWidths = this[$getSubformParent]().columnWidths; 43493 if (Array.isArray(columnWidths) && columnWidths.length > 0) { 43494 this[$extra].columnWidths = columnWidths; 43495 this[$extra].currentColumn = 0; 43496 } 43497 } 43498 const style = toStyle(this, "anchorType", "dimensions", "position", "presence", "border", "margin", "hAlign"); 43499 const classNames = ["xfaExclgroup"]; 43500 const cl = layoutClass(this); 43501 if (cl) { 43502 classNames.push(cl); 43503 } 43504 if (isPrintOnly(this)) { 43505 classNames.push("xfaPrintOnly"); 43506 } 43507 attributes.style = style; 43508 attributes.class = classNames; 43509 if (this.name) { 43510 attributes.xfaName = this.name; 43511 } 43512 this[$pushPara](); 43513 const isLrTb = this.layout === "lr-tb" || this.layout === "rl-tb"; 43514 const maxRun = isLrTb ? MAX_ATTEMPTS_FOR_LRTB_LAYOUT : 1; 43515 for (; this[$extra].attempt < maxRun; this[$extra].attempt++) { 43516 if (isLrTb && this[$extra].attempt === MAX_ATTEMPTS_FOR_LRTB_LAYOUT - 1) { 43517 this[$extra].numberInLine = 0; 43518 } 43519 const result = this[$childrenToHTML]({ 43520 filter, 43521 include: true 43522 }); 43523 if (result.success) { 43524 break; 43525 } 43526 if (result.isBreak()) { 43527 this[$popPara](); 43528 return result; 43529 } 43530 if (isLrTb && this[$extra].attempt === 0 && this[$extra].numberInLine === 0 && !this[$getTemplateRoot]()[$extra].noLayoutFailure) { 43531 this[$extra].attempt = maxRun; 43532 break; 43533 } 43534 } 43535 this[$popPara](); 43536 if (!isSplittable) { 43537 unsetFirstUnsplittable(this); 43538 } 43539 if (this[$extra].attempt === maxRun) { 43540 if (!isSplittable) { 43541 delete this[$extra]; 43542 } 43543 return HTMLResult.FAILURE; 43544 } 43545 let marginH = 0; 43546 let marginV = 0; 43547 if (this.margin) { 43548 marginH = this.margin.leftInset + this.margin.rightInset; 43549 marginV = this.margin.topInset + this.margin.bottomInset; 43550 } 43551 const width = Math.max(this[$extra].width + marginH, this.w || 0); 43552 const height = Math.max(this[$extra].height + marginV, this.h || 0); 43553 const bbox = [this.x, this.y, width, height]; 43554 if (this.w === "") { 43555 style.width = measureToString(width); 43556 } 43557 if (this.h === "") { 43558 style.height = measureToString(height); 43559 } 43560 const html = { 43561 name: "div", 43562 attributes, 43563 children 43564 }; 43565 applyAssist(this, attributes); 43566 delete this[$extra]; 43567 return HTMLResult.success(createWrapper(this, html), bbox); 43568 } 43569} 43570class Execute extends XFAObject { 43571 constructor(attributes) { 43572 super(TEMPLATE_NS_ID, "execute"); 43573 this.connection = attributes.connection || ""; 43574 this.executeType = getStringOption(attributes.executeType, ["import", "remerge"]); 43575 this.id = attributes.id || ""; 43576 this.runAt = getStringOption(attributes.runAt, ["client", "both", "server"]); 43577 this.use = attributes.use || ""; 43578 this.usehref = attributes.usehref || ""; 43579 } 43580} 43581class Extras extends XFAObject { 43582 constructor(attributes) { 43583 super(TEMPLATE_NS_ID, "extras", true); 43584 this.id = attributes.id || ""; 43585 this.name = attributes.name || ""; 43586 this.use = attributes.use || ""; 43587 this.usehref = attributes.usehref || ""; 43588 this.boolean = new XFAObjectArray(); 43589 this.date = new XFAObjectArray(); 43590 this.dateTime = new XFAObjectArray(); 43591 this.decimal = new XFAObjectArray(); 43592 this.exData = new XFAObjectArray(); 43593 this.extras = new XFAObjectArray(); 43594 this.float = new XFAObjectArray(); 43595 this.image = new XFAObjectArray(); 43596 this.integer = new XFAObjectArray(); 43597 this.text = new XFAObjectArray(); 43598 this.time = new XFAObjectArray(); 43599 } 43600} 43601class Field extends XFAObject { 43602 constructor(attributes) { 43603 super(TEMPLATE_NS_ID, "field", true); 43604 this.access = getStringOption(attributes.access, ["open", "nonInteractive", "protected", "readOnly"]); 43605 this.accessKey = attributes.accessKey || ""; 43606 this.anchorType = getStringOption(attributes.anchorType, ["topLeft", "bottomCenter", "bottomLeft", "bottomRight", "middleCenter", "middleLeft", "middleRight", "topCenter", "topRight"]); 43607 this.colSpan = getInteger({ 43608 data: attributes.colSpan, 43609 defaultValue: 1, 43610 validate: n => n >= 1 || n === -1 43611 }); 43612 this.h = attributes.h ? getMeasurement(attributes.h) : ""; 43613 this.hAlign = getStringOption(attributes.hAlign, ["left", "center", "justify", "justifyAll", "radix", "right"]); 43614 this.id = attributes.id || ""; 43615 this.locale = attributes.locale || ""; 43616 this.maxH = getMeasurement(attributes.maxH, "0pt"); 43617 this.maxW = getMeasurement(attributes.maxW, "0pt"); 43618 this.minH = getMeasurement(attributes.minH, "0pt"); 43619 this.minW = getMeasurement(attributes.minW, "0pt"); 43620 this.name = attributes.name || ""; 43621 this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]); 43622 this.relevant = getRelevant(attributes.relevant); 43623 this.rotate = getInteger({ 43624 data: attributes.rotate, 43625 defaultValue: 0, 43626 validate: x => x % 90 === 0 43627 }); 43628 this.use = attributes.use || ""; 43629 this.usehref = attributes.usehref || ""; 43630 this.w = attributes.w ? getMeasurement(attributes.w) : ""; 43631 this.x = getMeasurement(attributes.x, "0pt"); 43632 this.y = getMeasurement(attributes.y, "0pt"); 43633 this.assist = null; 43634 this.bind = null; 43635 this.border = null; 43636 this.calculate = null; 43637 this.caption = null; 43638 this.desc = null; 43639 this.extras = null; 43640 this.font = null; 43641 this.format = null; 43642 this.items = new XFAObjectArray(2); 43643 this.keep = null; 43644 this.margin = null; 43645 this.para = null; 43646 this.traversal = null; 43647 this.ui = null; 43648 this.validate = null; 43649 this.value = null; 43650 this.bindItems = new XFAObjectArray(); 43651 this.connect = new XFAObjectArray(); 43652 this.event = new XFAObjectArray(); 43653 this.setProperty = new XFAObjectArray(); 43654 } 43655 [$isBindable]() { 43656 return true; 43657 } 43658 [$setValue](value) { 43659 _setValue(this, value); 43660 } 43661 [$toHTML](availableSpace) { 43662 setTabIndex(this); 43663 if (!this.ui) { 43664 this.ui = new Ui({}); 43665 this.ui[$globalData] = this[$globalData]; 43666 this[$appendChild](this.ui); 43667 let node; 43668 switch (this.items.children.length) { 43669 case 0: 43670 node = new TextEdit({}); 43671 this.ui.textEdit = node; 43672 break; 43673 case 1: 43674 node = new CheckButton({}); 43675 this.ui.checkButton = node; 43676 break; 43677 case 2: 43678 node = new ChoiceList({}); 43679 this.ui.choiceList = node; 43680 break; 43681 } 43682 this.ui[$appendChild](node); 43683 } 43684 if (!this.ui || this.presence === "hidden" || this.presence === "inactive" || this.h === 0 || this.w === 0) { 43685 return HTMLResult.EMPTY; 43686 } 43687 if (this.caption) { 43688 delete this.caption[$extra]; 43689 }
vendor: 6,269 bytes, lines 43690-43895
43690 this[$pushPara](); 43691 const caption = this.caption ? this.caption[$toHTML](availableSpace).html : null; 43692 const savedW = this.w; 43693 const savedH = this.h; 43694 let marginH = 0; 43695 let marginV = 0; 43696 if (this.margin) { 43697 marginH = this.margin.leftInset + this.margin.rightInset; 43698 marginV = this.margin.topInset + this.margin.bottomInset; 43699 } 43700 let borderDims = null; 43701 if (this.w === "" || this.h === "") { 43702 let width = null; 43703 let height = null; 43704 let uiW = 0; 43705 let uiH = 0; 43706 if (this.ui.checkButton) { 43707 uiW = uiH = this.ui.checkButton.size; 43708 } else { 43709 const { 43710 w, 43711 h 43712 } = layoutNode(this, availableSpace); 43713 if (w !== null) { 43714 uiW = w; 43715 uiH = h; 43716 } else { 43717 uiH = fonts_getMetrics(this.font, true).lineNoGap; 43718 } 43719 } 43720 borderDims = getBorderDims(this.ui[$getExtra]()); 43721 uiW += borderDims.w; 43722 uiH += borderDims.h; 43723 if (this.caption) { 43724 const { 43725 w, 43726 h, 43727 isBroken 43728 } = this.caption[$getExtra](availableSpace); 43729 if (isBroken && this[$getSubformParent]()[$isThereMoreWidth]()) { 43730 this[$popPara](); 43731 return HTMLResult.FAILURE; 43732 } 43733 width = w; 43734 height = h; 43735 switch (this.caption.placement) { 43736 case "left": 43737 case "right": 43738 case "inline": 43739 width += uiW; 43740 break; 43741 case "top": 43742 case "bottom": 43743 height += uiH; 43744 break; 43745 } 43746 } else { 43747 width = uiW; 43748 height = uiH; 43749 } 43750 if (width && this.w === "") { 43751 width += marginH; 43752 this.w = Math.min(this.maxW <= 0 ? Infinity : this.maxW, this.minW + 1 < width ? width : this.minW); 43753 } 43754 if (height && this.h === "") { 43755 height += marginV; 43756 this.h = Math.min(this.maxH <= 0 ? Infinity : this.maxH, this.minH + 1 < height ? height : this.minH); 43757 } 43758 } 43759 this[$popPara](); 43760 fixDimensions(this); 43761 setFirstUnsplittable(this); 43762 if (!checkDimensions(this, availableSpace)) { 43763 this.w = savedW; 43764 this.h = savedH; 43765 this[$popPara](); 43766 return HTMLResult.FAILURE; 43767 } 43768 unsetFirstUnsplittable(this); 43769 const style = toStyle(this, "font", "dimensions", "position", "rotate", "anchorType", "presence", "margin", "hAlign"); 43770 setMinMaxDimensions(this, style); 43771 const classNames = ["xfaField"]; 43772 if (this.font) { 43773 classNames.push("xfaFont"); 43774 } 43775 if (isPrintOnly(this)) { 43776 classNames.push("xfaPrintOnly"); 43777 } 43778 const attributes = { 43779 style, 43780 id: this[$uid], 43781 class: classNames 43782 }; 43783 if (style.margin) { 43784 style.padding = style.margin; 43785 delete style.margin; 43786 } 43787 setAccess(this, classNames); 43788 if (this.name) { 43789 attributes.xfaName = this.name; 43790 } 43791 const children = []; 43792 const html = { 43793 name: "div", 43794 attributes, 43795 children 43796 }; 43797 applyAssist(this, attributes); 43798 const borderStyle = this.border ? this.border[$toStyle]() : null; 43799 const bbox = computeBbox(this, html, availableSpace); 43800 const ui = this.ui[$toHTML]().html; 43801 if (!ui) { 43802 Object.assign(style, borderStyle); 43803 return HTMLResult.success(createWrapper(this, html), bbox); 43804 } 43805 if (this[$tabIndex]) { 43806 if (ui.children?.[0]) { 43807 ui.children[0].attributes.tabindex = this[$tabIndex]; 43808 } else { 43809 ui.attributes.tabindex = this[$tabIndex]; 43810 } 43811 } 43812 if (!ui.attributes.style) { 43813 ui.attributes.style = Object.create(null); 43814 } 43815 let aElement = null; 43816 if (this.ui.button) { 43817 if (ui.children.length === 1) { 43818 [aElement] = ui.children.splice(0, 1); 43819 } 43820 Object.assign(ui.attributes.style, borderStyle); 43821 } else { 43822 Object.assign(style, borderStyle); 43823 } 43824 children.push(ui); 43825 if (this.value) { 43826 if (this.ui.imageEdit) { 43827 ui.children.push(this.value[$toHTML]().html); 43828 } else if (!this.ui.button) { 43829 let value = ""; 43830 if (this.value.exData) { 43831 value = this.value.exData[$text](); 43832 } else if (this.value.text) { 43833 value = this.value.text[$getExtra](); 43834 } else { 43835 const htmlValue = this.value[$toHTML]().html; 43836 if (htmlValue !== null) { 43837 value = htmlValue.children[0].value; 43838 } 43839 } 43840 if (this.ui.textEdit && this.value.text?.maxChars) { 43841 ui.children[0].attributes.maxLength = this.value.text.maxChars; 43842 } 43843 if (value) { 43844 if (this.ui.numericEdit) { 43845 value = parseFloat(value); 43846 value = isNaN(value) ? "" : value.toString(); 43847 } 43848 if (ui.children[0].name === "textarea") { 43849 ui.children[0].attributes.textContent = value; 43850 } else { 43851 ui.children[0].attributes.value = value; 43852 } 43853 } 43854 } 43855 } 43856 if (!this.ui.imageEdit && ui.children?.[0] && this.h) { 43857 borderDims = borderDims || getBorderDims(this.ui[$getExtra]()); 43858 let captionHeight = 0; 43859 if (this.caption && ["top", "bottom"].includes(this.caption.placement)) { 43860 captionHeight = this.caption.reserve; 43861 if (captionHeight <= 0) { 43862 captionHeight = this.caption[$getExtra](availableSpace).h; 43863 } 43864 const inputHeight = this.h - captionHeight - marginV - borderDims.h; 43865 ui.children[0].attributes.style.height = measureToString(inputHeight); 43866 } else { 43867 ui.children[0].attributes.style.height = "100%"; 43868 } 43869 } 43870 if (aElement) { 43871 ui.children.push(aElement); 43872 } 43873 if (!caption) { 43874 if (ui.attributes.class) { 43875 ui.attributes.class.push("xfaLeft"); 43876 } 43877 this.w = savedW; 43878 this.h = savedH; 43879 return HTMLResult.success(createWrapper(this, html), bbox); 43880 } 43881 if (this.ui.button) { 43882 if (style.padding) { 43883 delete style.padding; 43884 } 43885 if (caption.name === "div") { 43886 caption.name = "span"; 43887 } 43888 ui.children.push(caption); 43889 return HTMLResult.success(html, bbox); 43890 } else if (this.ui.checkButton) { 43891 caption.attributes.class[0] = "xfaCaptionForCheckButton"; 43892 } 43893 if (!ui.attributes.class) { 43894 ui.attributes.class = []; 43895 }
vendor: 9,071 bytes, lines 43895-44177
43895 43896 ui.children.splice(0, 0, caption); 43897 switch (this.caption.placement) { 43898 case "left": 43899 ui.attributes.class.push("xfaLeft"); 43900 break; 43901 case "right": 43902 ui.attributes.class.push("xfaRight"); 43903 break; 43904 case "top": 43905 ui.attributes.class.push("xfaTop"); 43906 break; 43907 case "bottom": 43908 ui.attributes.class.push("xfaBottom"); 43909 break; 43910 case "inline": 43911 ui.attributes.class.push("xfaLeft"); 43912 break; 43913 } 43914 this.w = savedW; 43915 this.h = savedH; 43916 return HTMLResult.success(createWrapper(this, html), bbox); 43917 } 43918} 43919class Fill extends XFAObject { 43920 constructor(attributes) { 43921 super(TEMPLATE_NS_ID, "fill", true); 43922 this.id = attributes.id || ""; 43923 this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]); 43924 this.use = attributes.use || ""; 43925 this.usehref = attributes.usehref || ""; 43926 this.color = null; 43927 this.extras = null; 43928 this.linear = null; 43929 this.pattern = null; 43930 this.radial = null; 43931 this.solid = null; 43932 this.stipple = null; 43933 } 43934 [$toStyle]() { 43935 const parent = this[$getParent](); 43936 const grandpa = parent[$getParent](); 43937 const ggrandpa = grandpa[$getParent](); 43938 const style = Object.create(null); 43939 let propName = "color"; 43940 let altPropName = propName; 43941 if (parent instanceof Border) { 43942 propName = "background-color"; 43943 altPropName = "background"; 43944 if (ggrandpa instanceof Ui) { 43945 style.backgroundColor = "white"; 43946 } 43947 } 43948 if (parent instanceof Rectangle || parent instanceof Arc) { 43949 propName = altPropName = "fill"; 43950 style.fill = "white"; 43951 } 43952 for (const name of Object.getOwnPropertyNames(this)) { 43953 if (name === "extras" || name === "color") { 43954 continue; 43955 } 43956 const obj = this[name]; 43957 if (!(obj instanceof XFAObject)) { 43958 continue; 43959 } 43960 const color = obj[$toStyle](this.color); 43961 if (color) { 43962 style[color.startsWith("#") ? propName : altPropName] = color; 43963 } 43964 return style; 43965 } 43966 if (this.color?.value) { 43967 const color = this.color[$toStyle](); 43968 style[color.startsWith("#") ? propName : altPropName] = color; 43969 } 43970 return style; 43971 } 43972} 43973class Filter extends XFAObject { 43974 constructor(attributes) { 43975 super(TEMPLATE_NS_ID, "filter", true); 43976 this.addRevocationInfo = getStringOption(attributes.addRevocationInfo, ["", "required", "optional", "none"]); 43977 this.id = attributes.id || ""; 43978 this.name = attributes.name || ""; 43979 this.use = attributes.use || ""; 43980 this.usehref = attributes.usehref || ""; 43981 this.version = getInteger({ 43982 data: this.version, 43983 defaultValue: 5, 43984 validate: x => x >= 1 && x <= 5 43985 }); 43986 this.appearanceFilter = null; 43987 this.certificates = null; 43988 this.digestMethods = null; 43989 this.encodings = null; 43990 this.encryptionMethods = null; 43991 this.handler = null; 43992 this.lockDocument = null; 43993 this.mdp = null; 43994 this.reasons = null; 43995 this.timeStamp = null; 43996 } 43997} 43998class Float extends ContentObject { 43999 constructor(attributes) { 44000 super(TEMPLATE_NS_ID, "float"); 44001 this.id = attributes.id || ""; 44002 this.name = attributes.name || ""; 44003 this.use = attributes.use || ""; 44004 this.usehref = attributes.usehref || ""; 44005 } 44006 [$finalize]() { 44007 const number = parseFloat(this[$content].trim()); 44008 this[$content] = isNaN(number) ? null : number; 44009 } 44010 [$toHTML](availableSpace) { 44011 return valueToHtml(this[$content] !== null ? this[$content].toString() : ""); 44012 } 44013} 44014class template_Font extends XFAObject { 44015 constructor(attributes) { 44016 super(TEMPLATE_NS_ID, "font", true); 44017 this.baselineShift = getMeasurement(attributes.baselineShift); 44018 this.fontHorizontalScale = getFloat({ 44019 data: attributes.fontHorizontalScale, 44020 defaultValue: 100, 44021 validate: x => x >= 0 44022 }); 44023 this.fontVerticalScale = getFloat({ 44024 data: attributes.fontVerticalScale, 44025 defaultValue: 100, 44026 validate: x => x >= 0 44027 }); 44028 this.id = attributes.id || ""; 44029 this.kerningMode = getStringOption(attributes.kerningMode, ["none", "pair"]); 44030 this.letterSpacing = getMeasurement(attributes.letterSpacing, "0"); 44031 this.lineThrough = getInteger({ 44032 data: attributes.lineThrough, 44033 defaultValue: 0, 44034 validate: x => x === 1 || x === 2 44035 }); 44036 this.lineThroughPeriod = getStringOption(attributes.lineThroughPeriod, ["all", "word"]); 44037 this.overline = getInteger({ 44038 data: attributes.overline, 44039 defaultValue: 0, 44040 validate: x => x === 1 || x === 2 44041 }); 44042 this.overlinePeriod = getStringOption(attributes.overlinePeriod, ["all", "word"]); 44043 this.posture = getStringOption(attributes.posture, ["normal", "italic"]); 44044 this.size = getMeasurement(attributes.size, "10pt"); 44045 this.typeface = attributes.typeface || "Courier"; 44046 this.underline = getInteger({ 44047 data: attributes.underline, 44048 defaultValue: 0, 44049 validate: x => x === 1 || x === 2 44050 }); 44051 this.underlinePeriod = getStringOption(attributes.underlinePeriod, ["all", "word"]); 44052 this.use = attributes.use || ""; 44053 this.usehref = attributes.usehref || ""; 44054 this.weight = getStringOption(attributes.weight, ["normal", "bold"]); 44055 this.extras = null; 44056 this.fill = null; 44057 } 44058 [$clean](builder) { 44059 super[$clean](builder); 44060 this[$globalData].usedTypefaces.add(this.typeface); 44061 } 44062 [$toStyle]() { 44063 const style = toStyle(this, "fill"); 44064 const color = style.color; 44065 if (color) { 44066 if (color === "#000000") { 44067 delete style.color; 44068 } else if (!color.startsWith("#")) { 44069 style.background = color; 44070 style.backgroundClip = "text"; 44071 style.color = "transparent"; 44072 } 44073 } 44074 if (this.baselineShift) { 44075 style.verticalAlign = measureToString(this.baselineShift); 44076 } 44077 style.fontKerning = this.kerningMode === "none" ? "none" : "normal"; 44078 style.letterSpacing = measureToString(this.letterSpacing); 44079 if (this.lineThrough !== 0) { 44080 style.textDecoration = "line-through"; 44081 if (this.lineThrough === 2) { 44082 style.textDecorationStyle = "double"; 44083 } 44084 } 44085 if (this.overline !== 0) { 44086 style.textDecoration = "overline"; 44087 if (this.overline === 2) { 44088 style.textDecorationStyle = "double"; 44089 } 44090 } 44091 style.fontStyle = this.posture; 44092 style.fontSize = measureToString(0.99 * this.size); 44093 setFontFamily(this, this, this[$globalData].fontFinder, style); 44094 if (this.underline !== 0) { 44095 style.textDecoration = "underline"; 44096 if (this.underline === 2) { 44097 style.textDecorationStyle = "double"; 44098 } 44099 } 44100 style.fontWeight = this.weight; 44101 return style; 44102 } 44103} 44104class Format extends XFAObject { 44105 constructor(attributes) { 44106 super(TEMPLATE_NS_ID, "format", true); 44107 this.id = attributes.id || ""; 44108 this.use = attributes.use || ""; 44109 this.usehref = attributes.usehref || ""; 44110 this.extras = null; 44111 this.picture = null; 44112 } 44113} 44114class Handler extends StringObject { 44115 constructor(attributes) { 44116 super(TEMPLATE_NS_ID, "handler"); 44117 this.id = attributes.id || ""; 44118 this.type = getStringOption(attributes.type, ["optional", "required"]); 44119 this.use = attributes.use || ""; 44120 this.usehref = attributes.usehref || ""; 44121 } 44122} 44123class Hyphenation extends XFAObject { 44124 constructor(attributes) { 44125 super(TEMPLATE_NS_ID, "hyphenation"); 44126 this.excludeAllCaps = getInteger({ 44127 data: attributes.excludeAllCaps, 44128 defaultValue: 0, 44129 validate: x => x === 1 44130 }); 44131 this.excludeInitialCap = getInteger({ 44132 data: attributes.excludeInitialCap, 44133 defaultValue: 0, 44134 validate: x => x === 1 44135 }); 44136 this.hyphenate = getInteger({ 44137 data: attributes.hyphenate, 44138 defaultValue: 0, 44139 validate: x => x === 1 44140 }); 44141 this.id = attributes.id || ""; 44142 this.pushCharacterCount = getInteger({ 44143 data: attributes.pushCharacterCount, 44144 defaultValue: 3, 44145 validate: x => x >= 0 44146 }); 44147 this.remainCharacterCount = getInteger({ 44148 data: attributes.remainCharacterCount, 44149 defaultValue: 3, 44150 validate: x => x >= 0 44151 }); 44152 this.use = attributes.use || ""; 44153 this.usehref = attributes.usehref || ""; 44154 this.wordCharacterCount = getInteger({ 44155 data: attributes.wordCharacterCount, 44156 defaultValue: 7, 44157 validate: x => x >= 0 44158 }); 44159 } 44160} 44161class Image extends StringObject { 44162 constructor(attributes) { 44163 super(TEMPLATE_NS_ID, "image"); 44164 this.aspect = getStringOption(attributes.aspect, ["fit", "actual", "height", "none", "width"]); 44165 this.contentType = attributes.contentType || ""; 44166 this.href = attributes.href || ""; 44167 this.id = attributes.id || ""; 44168 this.name = attributes.name || ""; 44169 this.transferEncoding = getStringOption(attributes.transferEncoding, ["base64", "none", "package"]); 44170 this.use = attributes.use || ""; 44171 this.usehref = attributes.usehref || ""; 44172 } 44173 [$toHTML]() { 44174 if (this.contentType && !MIMES.has(this.contentType.toLowerCase())) { 44175 return HTMLResult.EMPTY; 44176 } 44177 let buffer = this[$globalData].images
vendor: 13,023 bytes, lines 44177-44587
44177 && this[$globalData].images.get(this.href); 44178 if (!buffer && (this.href || !this[$content])) { 44179 return HTMLResult.EMPTY; 44180 } 44181 if (!buffer && this.transferEncoding === "base64") { 44182 buffer = fromBase64Util(this[$content]); 44183 } 44184 if (!buffer) { 44185 return HTMLResult.EMPTY; 44186 } 44187 if (!this.contentType) { 44188 for (const [header, type] of IMAGES_HEADERS) { 44189 if (buffer.length > header.length && header.every((x, i) => x === buffer[i])) { 44190 this.contentType = type; 44191 break; 44192 } 44193 } 44194 if (!this.contentType) { 44195 return HTMLResult.EMPTY; 44196 } 44197 } 44198 const blob = new Blob([buffer], { 44199 type: this.contentType 44200 }); 44201 let style; 44202 switch (this.aspect) { 44203 case "fit": 44204 case "actual": 44205 break; 44206 case "height": 44207 style = { 44208 height: "100%", 44209 objectFit: "fill" 44210 }; 44211 break; 44212 case "none": 44213 style = { 44214 width: "100%", 44215 height: "100%", 44216 objectFit: "fill" 44217 }; 44218 break; 44219 case "width": 44220 style = { 44221 width: "100%", 44222 objectFit: "fill" 44223 }; 44224 break; 44225 } 44226 const parent = this[$getParent](); 44227 return HTMLResult.success({ 44228 name: "img", 44229 attributes: { 44230 class: ["xfaImage"], 44231 style, 44232 src: URL.createObjectURL(blob), 44233 alt: parent ? ariaLabel(parent[$getParent]()) : null 44234 } 44235 }); 44236 } 44237} 44238class ImageEdit extends XFAObject { 44239 constructor(attributes) { 44240 super(TEMPLATE_NS_ID, "imageEdit", true); 44241 this.data = getStringOption(attributes.data, ["link", "embed"]); 44242 this.id = attributes.id || ""; 44243 this.use = attributes.use || ""; 44244 this.usehref = attributes.usehref || ""; 44245 this.border = null; 44246 this.extras = null; 44247 this.margin = null; 44248 } 44249 [$toHTML](availableSpace) { 44250 if (this.data === "embed") { 44251 return HTMLResult.success({ 44252 name: "div", 44253 children: [], 44254 attributes: {} 44255 }); 44256 } 44257 return HTMLResult.EMPTY; 44258 } 44259} 44260class Integer extends ContentObject { 44261 constructor(attributes) { 44262 super(TEMPLATE_NS_ID, "integer"); 44263 this.id = attributes.id || ""; 44264 this.name = attributes.name || ""; 44265 this.use = attributes.use || ""; 44266 this.usehref = attributes.usehref || ""; 44267 } 44268 [$finalize]() { 44269 const number = parseInt(this[$content].trim(), 10); 44270 this[$content] = isNaN(number) ? null : number; 44271 } 44272 [$toHTML](availableSpace) { 44273 return valueToHtml(this[$content] !== null ? this[$content].toString() : ""); 44274 } 44275} 44276class Issuers extends XFAObject { 44277 constructor(attributes) { 44278 super(TEMPLATE_NS_ID, "issuers", true); 44279 this.id = attributes.id || ""; 44280 this.type = getStringOption(attributes.type, ["optional", "required"]); 44281 this.use = attributes.use || ""; 44282 this.usehref = attributes.usehref || ""; 44283 this.certificate = new XFAObjectArray(); 44284 } 44285} 44286class Items extends XFAObject { 44287 constructor(attributes) { 44288 super(TEMPLATE_NS_ID, "items", true); 44289 this.id = attributes.id || ""; 44290 this.name = attributes.name || ""; 44291 this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]); 44292 this.ref = attributes.ref || ""; 44293 this.save = getInteger({ 44294 data: attributes.save, 44295 defaultValue: 0, 44296 validate: x => x === 1 44297 }); 44298 this.use = attributes.use || ""; 44299 this.usehref = attributes.usehref || ""; 44300 this.boolean = new XFAObjectArray(); 44301 this.date = new XFAObjectArray(); 44302 this.dateTime = new XFAObjectArray(); 44303 this.decimal = new XFAObjectArray(); 44304 this.exData = new XFAObjectArray(); 44305 this.float = new XFAObjectArray(); 44306 this.image = new XFAObjectArray(); 44307 this.integer = new XFAObjectArray(); 44308 this.text = new XFAObjectArray(); 44309 this.time = new XFAObjectArray(); 44310 } 44311 [$toHTML]() { 44312 const output = []; 44313 for (const child of this[$getChildren]()) { 44314 output.push(child[$text]()); 44315 } 44316 return HTMLResult.success(output); 44317 } 44318} 44319class Keep extends XFAObject { 44320 constructor(attributes) { 44321 super(TEMPLATE_NS_ID, "keep", true); 44322 this.id = attributes.id || ""; 44323 const options = ["none", "contentArea", "pageArea"]; 44324 this.intact = getStringOption(attributes.intact, options); 44325 this.next = getStringOption(attributes.next, options); 44326 this.previous = getStringOption(attributes.previous, options); 44327 this.use = attributes.use || ""; 44328 this.usehref = attributes.usehref || ""; 44329 this.extras = null; 44330 } 44331} 44332class KeyUsage extends XFAObject { 44333 constructor(attributes) { 44334 super(TEMPLATE_NS_ID, "keyUsage"); 44335 const options = ["", "yes", "no"]; 44336 this.crlSign = getStringOption(attributes.crlSign, options); 44337 this.dataEncipherment = getStringOption(attributes.dataEncipherment, options); 44338 this.decipherOnly = getStringOption(attributes.decipherOnly, options); 44339 this.digitalSignature = getStringOption(attributes.digitalSignature, options); 44340 this.encipherOnly = getStringOption(attributes.encipherOnly, options); 44341 this.id = attributes.id || ""; 44342 this.keyAgreement = getStringOption(attributes.keyAgreement, options); 44343 this.keyCertSign = getStringOption(attributes.keyCertSign, options); 44344 this.keyEncipherment = getStringOption(attributes.keyEncipherment, options); 44345 this.nonRepudiation = getStringOption(attributes.nonRepudiation, options); 44346 this.type = getStringOption(attributes.type, ["optional", "required"]); 44347 this.use = attributes.use || ""; 44348 this.usehref = attributes.usehref || ""; 44349 } 44350} 44351class Line extends XFAObject { 44352 constructor(attributes) { 44353 super(TEMPLATE_NS_ID, "line", true); 44354 this.hand = getStringOption(attributes.hand, ["even", "left", "right"]); 44355 this.id = attributes.id || ""; 44356 this.slope = getStringOption(attributes.slope, ["\\", "/"]); 44357 this.use = attributes.use || ""; 44358 this.usehref = attributes.usehref || ""; 44359 this.edge = null; 44360 } 44361 [$toHTML]() { 44362 const parent = this[$getParent]()[$getParent](); 44363 const edge = this.edge || new Edge({}); 44364 const edgeStyle = edge[$toStyle](); 44365 const style = Object.create(null); 44366 const thickness = edge.presence === "visible" ? edge.thickness : 0; 44367 style.strokeWidth = measureToString(thickness); 44368 style.stroke = edgeStyle.color; 44369 let x1, y1, x2, y2; 44370 let width = "100%"; 44371 let height = "100%"; 44372 if (parent.w <= thickness) { 44373 [x1, y1, x2, y2] = ["50%", 0, "50%", "100%"]; 44374 width = style.strokeWidth; 44375 } else if (parent.h <= thickness) { 44376 [x1, y1, x2, y2] = [0, "50%", "100%", "50%"]; 44377 height = style.strokeWidth; 44378 } else if (this.slope === "\\") { 44379 [x1, y1, x2, y2] = [0, 0, "100%", "100%"]; 44380 } else { 44381 [x1, y1, x2, y2] = [0, "100%", "100%", 0]; 44382 } 44383 const line = { 44384 name: "line", 44385 attributes: { 44386 xmlns: SVG_NS, 44387 x1, 44388 y1, 44389 x2, 44390 y2, 44391 style 44392 } 44393 }; 44394 const svg = { 44395 name: "svg", 44396 children: [line], 44397 attributes: { 44398 xmlns: SVG_NS, 44399 width, 44400 height, 44401 style: { 44402 overflow: "visible" 44403 } 44404 } 44405 }; 44406 if (hasMargin(parent)) { 44407 return HTMLResult.success({ 44408 name: "div", 44409 attributes: { 44410 style: { 44411 display: "inline", 44412 width: "100%", 44413 height: "100%" 44414 } 44415 }, 44416 children: [svg] 44417 }); 44418 } 44419 svg.attributes.style.position = "absolute"; 44420 return HTMLResult.success(svg); 44421 } 44422} 44423class Linear extends XFAObject { 44424 constructor(attributes) { 44425 super(TEMPLATE_NS_ID, "linear", true); 44426 this.id = attributes.id || ""; 44427 this.type = getStringOption(attributes.type, ["toRight", "toBottom", "toLeft", "toTop"]); 44428 this.use = attributes.use || ""; 44429 this.usehref = attributes.usehref || ""; 44430 this.color = null; 44431 this.extras = null; 44432 } 44433 [$toStyle](startColor) { 44434 startColor = startColor ? startColor[$toStyle]() : "#FFFFFF"; 44435 const transf = this.type.replace(/([RBLT])/, " $1").toLowerCase(); 44436 const endColor = this.color ? this.color[$toStyle]() : "#000000"; 44437 return `linear-gradient(${transf}, ${startColor}, ${endColor})`; 44438 } 44439} 44440class LockDocument extends ContentObject { 44441 constructor(attributes) { 44442 super(TEMPLATE_NS_ID, "lockDocument"); 44443 this.id = attributes.id || ""; 44444 this.type = getStringOption(attributes.type, ["optional", "required"]); 44445 this.use = attributes.use || ""; 44446 this.usehref = attributes.usehref || ""; 44447 } 44448 [$finalize]() { 44449 this[$content] = getStringOption(this[$content], ["auto", "0", "1"]); 44450 } 44451} 44452class Manifest extends XFAObject { 44453 constructor(attributes) { 44454 super(TEMPLATE_NS_ID, "manifest", true); 44455 this.action = getStringOption(attributes.action, ["include", "all", "exclude"]); 44456 this.id = attributes.id || ""; 44457 this.name = attributes.name || ""; 44458 this.use = attributes.use || ""; 44459 this.usehref = attributes.usehref || ""; 44460 this.extras = null; 44461 this.ref = new XFAObjectArray(); 44462 } 44463} 44464class Margin extends XFAObject { 44465 constructor(attributes) { 44466 super(TEMPLATE_NS_ID, "margin", true); 44467 this.bottomInset = getMeasurement(attributes.bottomInset, "0"); 44468 this.id = attributes.id || ""; 44469 this.leftInset = getMeasurement(attributes.leftInset, "0"); 44470 this.rightInset = getMeasurement(attributes.rightInset, "0"); 44471 this.topInset = getMeasurement(attributes.topInset, "0"); 44472 this.use = attributes.use || ""; 44473 this.usehref = attributes.usehref || ""; 44474 this.extras = null; 44475 } 44476 [$toStyle]() { 44477 return { 44478 margin: measureToString(this.topInset) + " " + measureToString(this.rightInset) + " " + measureToString(this.bottomInset) + " " + measureToString(this.leftInset) 44479 }; 44480 } 44481} 44482class Mdp extends XFAObject { 44483 constructor(attributes) { 44484 super(TEMPLATE_NS_ID, "mdp"); 44485 this.id = attributes.id || ""; 44486 this.permissions = getInteger({ 44487 data: attributes.permissions, 44488 defaultValue: 2, 44489 validate: x => x === 1 || x === 3 44490 }); 44491 this.signatureType = getStringOption(attributes.signatureType, ["filler", "author"]); 44492 this.use = attributes.use || ""; 44493 this.usehref = attributes.usehref || ""; 44494 } 44495} 44496class Medium extends XFAObject { 44497 constructor(attributes) { 44498 super(TEMPLATE_NS_ID, "medium"); 44499 this.id = attributes.id || ""; 44500 this.imagingBBox = getBBox(attributes.imagingBBox); 44501 this.long = getMeasurement(attributes.long); 44502 this.orientation = getStringOption(attributes.orientation, ["portrait", "landscape"]); 44503 this.short = getMeasurement(attributes.short); 44504 this.stock = attributes.stock || ""; 44505 this.trayIn = getStringOption(attributes.trayIn, ["auto", "delegate", "pageFront"]); 44506 this.trayOut = getStringOption(attributes.trayOut, ["auto", "delegate"]); 44507 this.use = attributes.use || ""; 44508 this.usehref = attributes.usehref || ""; 44509 } 44510} 44511class Message extends XFAObject { 44512 constructor(attributes) { 44513 super(TEMPLATE_NS_ID, "message", true); 44514 this.id = attributes.id || ""; 44515 this.use = attributes.use || ""; 44516 this.usehref = attributes.usehref || ""; 44517 this.text = new XFAObjectArray(); 44518 } 44519} 44520class NumericEdit extends XFAObject { 44521 constructor(attributes) { 44522 super(TEMPLATE_NS_ID, "numericEdit", true); 44523 this.hScrollPolicy = getStringOption(attributes.hScrollPolicy, ["auto", "off", "on"]); 44524 this.id = attributes.id || ""; 44525 this.use = attributes.use || ""; 44526 this.usehref = attributes.usehref || ""; 44527 this.border = null; 44528 this.comb = null; 44529 this.extras = null; 44530 this.margin = null; 44531 } 44532 [$toHTML](availableSpace) { 44533 const style = toStyle(this, "border", "font", "margin"); 44534 const field = this[$getParent]()[$getParent](); 44535 const html = { 44536 name: "input", 44537 attributes: { 44538 type: "text", 44539 fieldId: field[$uid], 44540 dataId: field[$data]?.[$uid] || field[$uid], 44541 class: ["xfaTextfield"], 44542 style, 44543 "aria-label": ariaLabel(field), 44544 "aria-required": false 44545 } 44546 }; 44547 if (isRequired(field)) { 44548 html.attributes["aria-required"] = true; 44549 html.attributes.required = true; 44550 } 44551 return HTMLResult.success({ 44552 name: "label", 44553 attributes: { 44554 class: ["xfaLabel"] 44555 }, 44556 children: [html] 44557 }); 44558 } 44559} 44560class Occur extends XFAObject { 44561 constructor(attributes) { 44562 super(TEMPLATE_NS_ID, "occur", true); 44563 this.id = attributes.id || ""; 44564 this.initial = attributes.initial !== "" ? getInteger({ 44565 data: attributes.initial, 44566 defaultValue: "", 44567 validate: x => true 44568 }) : ""; 44569 this.max = attributes.max !== "" ? getInteger({ 44570 data: attributes.max, 44571 defaultValue: 1, 44572 validate: x => true 44573 }) : ""; 44574 this.min = attributes.min !== "" ? getInteger({ 44575 data: attributes.min, 44576 defaultValue: 1, 44577 validate: x => true 44578 }) : ""; 44579 this.use = attributes.use || ""; 44580 this.usehref = attributes.usehref || ""; 44581 this.extras = null; 44582 } 44583 [$clean]() { 44584 const parent = this[$getParent](); 44585 const originalMin = this.min; 44586 if (this.min === "") { 44587 this.min = parent insta
vendor: 9,620 bytes, lines 44587-44875
44587nceof PageArea || parent instanceof PageSet ? 0 : 1; 44588 } 44589 if (this.max === "") { 44590 if (originalMin === "") { 44591 this.max = parent instanceof PageArea || parent instanceof PageSet ? -1 : 1; 44592 } else { 44593 this.max = this.min; 44594 } 44595 } 44596 if (this.max !== -1 && this.max < this.min) { 44597 this.max = this.min; 44598 } 44599 if (this.initial === "") { 44600 this.initial = parent instanceof Template ? 1 : this.min; 44601 } 44602 } 44603} 44604class Oid extends StringObject { 44605 constructor(attributes) { 44606 super(TEMPLATE_NS_ID, "oid"); 44607 this.id = attributes.id || ""; 44608 this.name = attributes.name || ""; 44609 this.use = attributes.use || ""; 44610 this.usehref = attributes.usehref || ""; 44611 } 44612} 44613class Oids extends XFAObject { 44614 constructor(attributes) { 44615 super(TEMPLATE_NS_ID, "oids", true); 44616 this.id = attributes.id || ""; 44617 this.type = getStringOption(attributes.type, ["optional", "required"]); 44618 this.use = attributes.use || ""; 44619 this.usehref = attributes.usehref || ""; 44620 this.oid = new XFAObjectArray(); 44621 } 44622} 44623class Overflow extends XFAObject { 44624 constructor(attributes) { 44625 super(TEMPLATE_NS_ID, "overflow"); 44626 this.id = attributes.id || ""; 44627 this.leader = attributes.leader || ""; 44628 this.target = attributes.target || ""; 44629 this.trailer = attributes.trailer || ""; 44630 this.use = attributes.use || ""; 44631 this.usehref = attributes.usehref || ""; 44632 } 44633 [$getExtra]() { 44634 if (!this[$extra]) { 44635 const parent = this[$getParent](); 44636 const root = this[$getTemplateRoot](); 44637 const target = root[$searchNode](this.target, parent); 44638 const leader = root[$searchNode](this.leader, parent); 44639 const trailer = root[$searchNode](this.trailer, parent); 44640 this[$extra] = { 44641 target: target?.[0] || null, 44642 leader: leader?.[0] || null, 44643 trailer: trailer?.[0] || null, 44644 addLeader: false, 44645 addTrailer: false 44646 }; 44647 } 44648 return this[$extra]; 44649 } 44650} 44651class PageArea extends XFAObject { 44652 constructor(attributes) { 44653 super(TEMPLATE_NS_ID, "pageArea", true); 44654 this.blankOrNotBlank = getStringOption(attributes.blankOrNotBlank, ["any", "blank", "notBlank"]); 44655 this.id = attributes.id || ""; 44656 this.initialNumber = getInteger({ 44657 data: attributes.initialNumber, 44658 defaultValue: 1, 44659 validate: x => true 44660 }); 44661 this.name = attributes.name || ""; 44662 this.numbered = getInteger({ 44663 data: attributes.numbered, 44664 defaultValue: 1, 44665 validate: x => true 44666 }); 44667 this.oddOrEven = getStringOption(attributes.oddOrEven, ["any", "even", "odd"]); 44668 this.pagePosition = getStringOption(attributes.pagePosition, ["any", "first", "last", "only", "rest"]); 44669 this.relevant = getRelevant(attributes.relevant); 44670 this.use = attributes.use || ""; 44671 this.usehref = attributes.usehref || ""; 44672 this.desc = null; 44673 this.extras = null; 44674 this.medium = null; 44675 this.occur = null; 44676 this.area = new XFAObjectArray(); 44677 this.contentArea = new XFAObjectArray(); 44678 this.draw = new XFAObjectArray(); 44679 this.exclGroup = new XFAObjectArray(); 44680 this.field = new XFAObjectArray(); 44681 this.subform = new XFAObjectArray(); 44682 } 44683 [$isUsable]() { 44684 if (!this[$extra]) { 44685 this[$extra] = { 44686 numberOfUse: 0 44687 }; 44688 return true; 44689 } 44690 return !this.occur || this.occur.max === -1 || this[$extra].numberOfUse < this.occur.max; 44691 } 44692 [$cleanPage]() { 44693 delete this[$extra]; 44694 } 44695 [$getNextPage]() { 44696 if (!this[$extra]) { 44697 this[$extra] = { 44698 numberOfUse: 0 44699 }; 44700 } 44701 const parent = this[$getParent](); 44702 if (parent.relation === "orderedOccurrence") { 44703 if (this[$isUsable]()) { 44704 this[$extra].numberOfUse += 1; 44705 return this; 44706 } 44707 } 44708 return parent[$getNextPage](); 44709 } 44710 [$getAvailableSpace]() { 44711 return this[$extra].space || { 44712 width: 0, 44713 height: 0 44714 }; 44715 } 44716 [$toHTML]() { 44717 if (!this[$extra]) { 44718 this[$extra] = { 44719 numberOfUse: 1 44720 }; 44721 } 44722 const children = []; 44723 this[$extra].children = children; 44724 const style = Object.create(null); 44725 if (this.medium && this.medium.short && this.medium.long) { 44726 style.width = measureToString(this.medium.short); 44727 style.height = measureToString(this.medium.long); 44728 this[$extra].space = { 44729 width: this.medium.short, 44730 height: this.medium.long 44731 }; 44732 if (this.medium.orientation === "landscape") { 44733 const x = style.width; 44734 style.width = style.height; 44735 style.height = x; 44736 this[$extra].space = { 44737 width: this.medium.long, 44738 height: this.medium.short 44739 }; 44740 } 44741 } else { 44742 warn("XFA - No medium specified in pageArea: please file a bug."); 44743 } 44744 this[$childrenToHTML]({ 44745 filter: new Set(["area", "draw", "field", "subform"]), 44746 include: true 44747 }); 44748 this[$childrenToHTML]({ 44749 filter: new Set(["contentArea"]), 44750 include: true 44751 }); 44752 return HTMLResult.success({ 44753 name: "div", 44754 children, 44755 attributes: { 44756 class: ["xfaPage"], 44757 id: this[$uid], 44758 style, 44759 xfaName: this.name 44760 } 44761 }); 44762 } 44763} 44764class PageSet extends XFAObject { 44765 constructor(attributes) { 44766 super(TEMPLATE_NS_ID, "pageSet", true); 44767 this.duplexImposition = getStringOption(attributes.duplexImposition, ["longEdge", "shortEdge"]); 44768 this.id = attributes.id || ""; 44769 this.name = attributes.name || ""; 44770 this.relation = getStringOption(attributes.relation, ["orderedOccurrence", "duplexPaginated", "simplexPaginated"]); 44771 this.relevant = getRelevant(attributes.relevant); 44772 this.use = attributes.use || ""; 44773 this.usehref = attributes.usehref || ""; 44774 this.extras = null; 44775 this.occur = null; 44776 this.pageArea = new XFAObjectArray(); 44777 this.pageSet = new XFAObjectArray(); 44778 } 44779 [$cleanPage]() { 44780 for (const page of this.pageArea.children) { 44781 page[$cleanPage](); 44782 } 44783 for (const page of this.pageSet.children) { 44784 page[$cleanPage](); 44785 } 44786 } 44787 [$isUsable]() { 44788 return !this.occur || this.occur.max === -1 || this[$extra].numberOfUse < this.occur.max; 44789 } 44790 [$getNextPage]() { 44791 if (!this[$extra]) { 44792 this[$extra] = { 44793 numberOfUse: 1, 44794 pageIndex: -1, 44795 pageSetIndex: -1 44796 }; 44797 } 44798 if (this.relation === "orderedOccurrence") { 44799 if (this[$extra].pageIndex + 1 < this.pageArea.children.length) { 44800 this[$extra].pageIndex += 1; 44801 const pageArea = this.pageArea.children[this[$extra].pageIndex]; 44802 return pageArea[$getNextPage](); 44803 } 44804 if (this[$extra].pageSetIndex + 1 < this.pageSet.children.length) { 44805 this[$extra].pageSetIndex += 1; 44806 return this.pageSet.children[this[$extra].pageSetIndex][$getNextPage](); 44807 } 44808 if (this[$isUsable]()) { 44809 this[$extra].numberOfUse += 1; 44810 this[$extra].pageIndex = -1; 44811 this[$extra].pageSetIndex = -1; 44812 return this[$getNextPage](); 44813 } 44814 const parent = this[$getParent](); 44815 if (parent instanceof PageSet) { 44816 return parent[$getNextPage](); 44817 } 44818 this[$cleanPage](); 44819 return this[$getNextPage](); 44820 } 44821 const pageNumber = this[$getTemplateRoot]()[$extra].pageNumber; 44822 const parity = pageNumber % 2 === 0 ? "even" : "odd"; 44823 const position = pageNumber === 0 ? "first" : "rest"; 44824 let page = this.pageArea.children.find(p => p.oddOrEven === parity && p.pagePosition === position); 44825 if (page) { 44826 return page; 44827 } 44828 page = this.pageArea.children.find(p => p.oddOrEven === "any" && p.pagePosition === position); 44829 if (page) { 44830 return page; 44831 } 44832 page = this.pageArea.children.find(p => p.oddOrEven === "any" && p.pagePosition === "any"); 44833 if (page) { 44834 return page; 44835 } 44836 return this.pageArea.children[0]; 44837 } 44838} 44839class Para extends XFAObject { 44840 constructor(attributes) { 44841 super(TEMPLATE_NS_ID, "para", true); 44842 this.hAlign = getStringOption(attributes.hAlign, ["left", "center", "justify", "justifyAll", "radix", "right"]); 44843 this.id = attributes.id || ""; 44844 this.lineHeight = attributes.lineHeight ? getMeasurement(attributes.lineHeight, "0pt") : ""; 44845 this.marginLeft = attributes.marginLeft ? getMeasurement(attributes.marginLeft, "0pt") : ""; 44846 this.marginRight = attributes.marginRight ? getMeasurement(attributes.marginRight, "0pt") : ""; 44847 this.orphans = getInteger({ 44848 data: attributes.orphans, 44849 defaultValue: 0, 44850 validate: x => x >= 0 44851 }); 44852 this.preserve = attributes.preserve || ""; 44853 this.radixOffset = attributes.radixOffset ? getMeasurement(attributes.radixOffset, "0pt") : ""; 44854 this.spaceAbove = attributes.spaceAbove ? getMeasurement(attributes.spaceAbove, "0pt") : ""; 44855 this.spaceBelow = attributes.spaceBelow ? getMeasurement(attributes.spaceBelow, "0pt") : ""; 44856 this.tabDefault = attributes.tabDefault ? getMeasurement(this.tabDefault) : ""; 44857 this.tabStops = (attributes.tabStops || "").trim().split(/\s+/).map((x, i) => i % 2 === 1 ? getMeasurement(x) : x); 44858 this.textIndent = attributes.textIndent ? getMeasurement(attributes.textIndent, "0pt") : ""; 44859 this.use = attributes.use || ""; 44860 this.usehref = attributes.usehref || ""; 44861 this.vAlign = getStringOption(attributes.vAlign, ["top", "bottom", "middle"]); 44862 this.widows = getInteger({ 44863 data: attributes.widows, 44864 defaultValue: 0, 44865 validate: x => x >= 0 44866 }); 44867 this.hyphenation = null; 44868 } 44869 [$toStyle]() { 44870 const style = toStyle(this, "hAlign"); 44871 if (this.marginLeft !== "") { 44872 style.paddingLeft = measureToString(this.marginLeft); 44873 } 44874 if (this.marginRight !== "") { 44875 style.padding
vendor: 20,524 bytes, lines 44875-45455
44875ight = measureToString(this.marginRight); 44876 } 44877 if (this.spaceAbove !== "") { 44878 style.paddingTop = measureToString(this.spaceAbove); 44879 } 44880 if (this.spaceBelow !== "") { 44881 style.paddingBottom = measureToString(this.spaceBelow); 44882 } 44883 if (this.textIndent !== "") { 44884 style.textIndent = measureToString(this.textIndent); 44885 fixTextIndent(style); 44886 } 44887 if (this.lineHeight > 0) { 44888 style.lineHeight = measureToString(this.lineHeight); 44889 } 44890 if (this.tabDefault !== "") { 44891 style.tabSize = measureToString(this.tabDefault); 44892 } 44893 if (this.tabStops.length > 0) {} 44894 if (this.hyphenatation) { 44895 Object.assign(style, this.hyphenatation[$toStyle]()); 44896 } 44897 return style; 44898 } 44899} 44900class PasswordEdit extends XFAObject { 44901 constructor(attributes) { 44902 super(TEMPLATE_NS_ID, "passwordEdit", true); 44903 this.hScrollPolicy = getStringOption(attributes.hScrollPolicy, ["auto", "off", "on"]); 44904 this.id = attributes.id || ""; 44905 this.passwordChar = attributes.passwordChar || "*"; 44906 this.use = attributes.use || ""; 44907 this.usehref = attributes.usehref || ""; 44908 this.border = null; 44909 this.extras = null; 44910 this.margin = null; 44911 } 44912} 44913class template_Pattern extends XFAObject { 44914 constructor(attributes) { 44915 super(TEMPLATE_NS_ID, "pattern", true); 44916 this.id = attributes.id || ""; 44917 this.type = getStringOption(attributes.type, ["crossHatch", "crossDiagonal", "diagonalLeft", "diagonalRight", "horizontal", "vertical"]); 44918 this.use = attributes.use || ""; 44919 this.usehref = attributes.usehref || ""; 44920 this.color = null; 44921 this.extras = null; 44922 } 44923 [$toStyle](startColor) { 44924 startColor = startColor ? startColor[$toStyle]() : "#FFFFFF"; 44925 const endColor = this.color ? this.color[$toStyle]() : "#000000"; 44926 const width = 5; 44927 const cmd = "repeating-linear-gradient"; 44928 const colors = `${startColor},${startColor} ${width}px,${endColor} ${width}px,${endColor} ${2 * width}px`; 44929 switch (this.type) { 44930 case "crossHatch": 44931 return `${cmd}(to top,${colors}) ${cmd}(to right,${colors})`; 44932 case "crossDiagonal": 44933 return `${cmd}(45deg,${colors}) ${cmd}(-45deg,${colors})`; 44934 case "diagonalLeft": 44935 return `${cmd}(45deg,${colors})`; 44936 case "diagonalRight": 44937 return `${cmd}(-45deg,${colors})`; 44938 case "horizontal": 44939 return `${cmd}(to top,${colors})`; 44940 case "vertical": 44941 return `${cmd}(to right,${colors})`; 44942 } 44943 return ""; 44944 } 44945} 44946class Picture extends StringObject { 44947 constructor(attributes) { 44948 super(TEMPLATE_NS_ID, "picture"); 44949 this.id = attributes.id || ""; 44950 this.use = attributes.use || ""; 44951 this.usehref = attributes.usehref || ""; 44952 } 44953} 44954class Proto extends XFAObject { 44955 constructor(attributes) { 44956 super(TEMPLATE_NS_ID, "proto", true); 44957 this.appearanceFilter = new XFAObjectArray(); 44958 this.arc = new XFAObjectArray(); 44959 this.area = new XFAObjectArray(); 44960 this.assist = new XFAObjectArray(); 44961 this.barcode = new XFAObjectArray(); 44962 this.bindItems = new XFAObjectArray(); 44963 this.bookend = new XFAObjectArray(); 44964 this.boolean = new XFAObjectArray(); 44965 this.border = new XFAObjectArray(); 44966 this.break = new XFAObjectArray(); 44967 this.breakAfter = new XFAObjectArray(); 44968 this.breakBefore = new XFAObjectArray(); 44969 this.button = new XFAObjectArray(); 44970 this.calculate = new XFAObjectArray(); 44971 this.caption = new XFAObjectArray(); 44972 this.certificate = new XFAObjectArray(); 44973 this.certificates = new XFAObjectArray(); 44974 this.checkButton = new XFAObjectArray(); 44975 this.choiceList = new XFAObjectArray(); 44976 this.color = new XFAObjectArray(); 44977 this.comb = new XFAObjectArray(); 44978 this.connect = new XFAObjectArray(); 44979 this.contentArea = new XFAObjectArray(); 44980 this.corner = new XFAObjectArray(); 44981 this.date = new XFAObjectArray(); 44982 this.dateTime = new XFAObjectArray(); 44983 this.dateTimeEdit = new XFAObjectArray(); 44984 this.decimal = new XFAObjectArray(); 44985 this.defaultUi = new XFAObjectArray(); 44986 this.desc = new XFAObjectArray(); 44987 this.digestMethod = new XFAObjectArray(); 44988 this.digestMethods = new XFAObjectArray(); 44989 this.draw = new XFAObjectArray(); 44990 this.edge = new XFAObjectArray(); 44991 this.encoding = new XFAObjectArray(); 44992 this.encodings = new XFAObjectArray(); 44993 this.encrypt = new XFAObjectArray(); 44994 this.encryptData = new XFAObjectArray(); 44995 this.encryption = new XFAObjectArray(); 44996 this.encryptionMethod = new XFAObjectArray(); 44997 this.encryptionMethods = new XFAObjectArray(); 44998 this.event = new XFAObjectArray(); 44999 this.exData = new XFAObjectArray(); 45000 this.exObject = new XFAObjectArray(); 45001 this.exclGroup = new XFAObjectArray(); 45002 this.execute = new XFAObjectArray(); 45003 this.extras = new XFAObjectArray(); 45004 this.field = new XFAObjectArray(); 45005 this.fill = new XFAObjectArray(); 45006 this.filter = new XFAObjectArray(); 45007 this.float = new XFAObjectArray(); 45008 this.font = new XFAObjectArray(); 45009 this.format = new XFAObjectArray(); 45010 this.handler = new XFAObjectArray(); 45011 this.hyphenation = new XFAObjectArray(); 45012 this.image = new XFAObjectArray(); 45013 this.imageEdit = new XFAObjectArray(); 45014 this.integer = new XFAObjectArray(); 45015 this.issuers = new XFAObjectArray(); 45016 this.items = new XFAObjectArray(); 45017 this.keep = new XFAObjectArray(); 45018 this.keyUsage = new XFAObjectArray(); 45019 this.line = new XFAObjectArray(); 45020 this.linear = new XFAObjectArray(); 45021 this.lockDocument = new XFAObjectArray(); 45022 this.manifest = new XFAObjectArray(); 45023 this.margin = new XFAObjectArray(); 45024 this.mdp = new XFAObjectArray(); 45025 this.medium = new XFAObjectArray(); 45026 this.message = new XFAObjectArray(); 45027 this.numericEdit = new XFAObjectArray(); 45028 this.occur = new XFAObjectArray(); 45029 this.oid = new XFAObjectArray(); 45030 this.oids = new XFAObjectArray(); 45031 this.overflow = new XFAObjectArray(); 45032 this.pageArea = new XFAObjectArray(); 45033 this.pageSet = new XFAObjectArray(); 45034 this.para = new XFAObjectArray(); 45035 this.passwordEdit = new XFAObjectArray(); 45036 this.pattern = new XFAObjectArray(); 45037 this.picture = new XFAObjectArray(); 45038 this.radial = new XFAObjectArray(); 45039 this.reason = new XFAObjectArray(); 45040 this.reasons = new XFAObjectArray(); 45041 this.rectangle = new XFAObjectArray(); 45042 this.ref = new XFAObjectArray(); 45043 this.script = new XFAObjectArray(); 45044 this.setProperty = new XFAObjectArray(); 45045 this.signData = new XFAObjectArray(); 45046 this.signature = new XFAObjectArray(); 45047 this.signing = new XFAObjectArray(); 45048 this.solid = new XFAObjectArray(); 45049 this.speak = new XFAObjectArray(); 45050 this.stipple = new XFAObjectArray(); 45051 this.subform = new XFAObjectArray(); 45052 this.subformSet = new XFAObjectArray(); 45053 this.subjectDN = new XFAObjectArray(); 45054 this.subjectDNs = new XFAObjectArray(); 45055 this.submit = new XFAObjectArray(); 45056 this.text = new XFAObjectArray(); 45057 this.textEdit = new XFAObjectArray(); 45058 this.time = new XFAObjectArray(); 45059 this.timeStamp = new XFAObjectArray(); 45060 this.toolTip = new XFAObjectArray(); 45061 this.traversal = new XFAObjectArray(); 45062 this.traverse = new XFAObjectArray(); 45063 this.ui = new XFAObjectArray(); 45064 this.validate = new XFAObjectArray(); 45065 this.value = new XFAObjectArray(); 45066 this.variables = new XFAObjectArray(); 45067 } 45068} 45069class Radial extends XFAObject { 45070 constructor(attributes) { 45071 super(TEMPLATE_NS_ID, "radial", true); 45072 this.id = attributes.id || ""; 45073 this.type = getStringOption(attributes.type, ["toEdge", "toCenter"]); 45074 this.use = attributes.use || ""; 45075 this.usehref = attributes.usehref || ""; 45076 this.color = null; 45077 this.extras = null; 45078 } 45079 [$toStyle](startColor) { 45080 startColor = startColor ? startColor[$toStyle]() : "#FFFFFF"; 45081 const endColor = this.color ? this.color[$toStyle]() : "#000000"; 45082 const colors = this.type === "toEdge" ? `${startColor},${endColor}` : `${endColor},${startColor}`; 45083 return `radial-gradient(circle at center, ${colors})`; 45084 } 45085} 45086class Reason extends StringObject { 45087 constructor(attributes) { 45088 super(TEMPLATE_NS_ID, "reason"); 45089 this.id = attributes.id || ""; 45090 this.name = attributes.name || ""; 45091 this.use = attributes.use || ""; 45092 this.usehref = attributes.usehref || ""; 45093 } 45094} 45095class Reasons extends XFAObject { 45096 constructor(attributes) { 45097 super(TEMPLATE_NS_ID, "reasons", true); 45098 this.id = attributes.id || ""; 45099 this.type = getStringOption(attributes.type, ["optional", "required"]); 45100 this.use = attributes.use || ""; 45101 this.usehref = attributes.usehref || ""; 45102 this.reason = new XFAObjectArray(); 45103 } 45104} 45105class Rectangle extends XFAObject { 45106 constructor(attributes) { 45107 super(TEMPLATE_NS_ID, "rectangle", true); 45108 this.hand = getStringOption(attributes.hand, ["even", "left", "right"]); 45109 this.id = attributes.id || ""; 45110 this.use = attributes.use || ""; 45111 this.usehref = attributes.usehref || ""; 45112 this.corner = new XFAObjectArray(4); 45113 this.edge = new XFAObjectArray(4); 45114 this.fill = null; 45115 } 45116 [$toHTML]() { 45117 const edge = this.edge.children.length ? this.edge.children[0] : new Edge({}); 45118 const edgeStyle = edge[$toStyle](); 45119 const style = Object.create(null); 45120 if (this.fill?.presence === "visible") { 45121 Object.assign(style, this.fill[$toStyle]()); 45122 } else { 45123 style.fill = "transparent"; 45124 } 45125 style.strokeWidth = measureToString(edge.presence === "visible" ? edge.thickness : 0); 45126 style.stroke = edgeStyle.color; 45127 const corner = this.corner.children.length ? this.corner.children[0] : new Corner({}); 45128 const cornerStyle = corner[$toStyle](); 45129 const rect = { 45130 name: "rect", 45131 attributes: { 45132 xmlns: SVG_NS, 45133 width: "100%", 45134 height: "100%", 45135 x: 0, 45136 y: 0, 45137 rx: cornerStyle.radius, 45138 ry: cornerStyle.radius, 45139 style 45140 } 45141 }; 45142 const svg = { 45143 name: "svg", 45144 children: [rect], 45145 attributes: { 45146 xmlns: SVG_NS, 45147 style: { 45148 overflow: "visible" 45149 }, 45150 width: "100%", 45151 height: "100%" 45152 } 45153 }; 45154 const parent = this[$getParent]()[$getParent](); 45155 if (hasMargin(parent)) { 45156 return HTMLResult.success({ 45157 name: "div", 45158 attributes: { 45159 style: { 45160 display: "inline", 45161 width: "100%", 45162 height: "100%" 45163 } 45164 }, 45165 children: [svg] 45166 }); 45167 } 45168 svg.attributes.style.position = "absolute"; 45169 return HTMLResult.success(svg); 45170 } 45171} 45172class RefElement extends StringObject { 45173 constructor(attributes) { 45174 super(TEMPLATE_NS_ID, "ref"); 45175 this.id = attributes.id || ""; 45176 this.use = attributes.use || ""; 45177 this.usehref = attributes.usehref || ""; 45178 } 45179} 45180class Script extends StringObject { 45181 constructor(attributes) { 45182 super(TEMPLATE_NS_ID, "script"); 45183 this.binding = attributes.binding || ""; 45184 this.contentType = attributes.contentType || ""; 45185 this.id = attributes.id || ""; 45186 this.name = attributes.name || ""; 45187 this.runAt = getStringOption(attributes.runAt, ["client", "both", "server"]); 45188 this.use = attributes.use || ""; 45189 this.usehref = attributes.usehref || ""; 45190 } 45191} 45192class SetProperty extends XFAObject { 45193 constructor(attributes) { 45194 super(TEMPLATE_NS_ID, "setProperty"); 45195 this.connection = attributes.connection || ""; 45196 this.ref = attributes.ref || ""; 45197 this.target = attributes.target || ""; 45198 } 45199} 45200class SignData extends XFAObject { 45201 constructor(attributes) { 45202 super(TEMPLATE_NS_ID, "signData", true); 45203 this.id = attributes.id || ""; 45204 this.operation = getStringOption(attributes.operation, ["sign", "clear", "verify"]); 45205 this.ref = attributes.ref || ""; 45206 this.target = attributes.target || ""; 45207 this.use = attributes.use || ""; 45208 this.usehref = attributes.usehref || ""; 45209 this.filter = null; 45210 this.manifest = null; 45211 } 45212} 45213class Signature extends XFAObject { 45214 constructor(attributes) { 45215 super(TEMPLATE_NS_ID, "signature", true); 45216 this.id = attributes.id || ""; 45217 this.type = getStringOption(attributes.type, ["PDF1.3", "PDF1.6"]); 45218 this.use = attributes.use || ""; 45219 this.usehref = attributes.usehref || ""; 45220 this.border = null; 45221 this.extras = null; 45222 this.filter = null; 45223 this.manifest = null; 45224 this.margin = null; 45225 } 45226} 45227class Signing extends XFAObject { 45228 constructor(attributes) { 45229 super(TEMPLATE_NS_ID, "signing", true); 45230 this.id = attributes.id || ""; 45231 this.type = getStringOption(attributes.type, ["optional", "required"]); 45232 this.use = attributes.use || ""; 45233 this.usehref = attributes.usehref || ""; 45234 this.certificate = new XFAObjectArray(); 45235 } 45236} 45237class Solid extends XFAObject { 45238 constructor(attributes) { 45239 super(TEMPLATE_NS_ID, "solid", true); 45240 this.id = attributes.id || ""; 45241 this.use = attributes.use || ""; 45242 this.usehref = attributes.usehref || ""; 45243 this.extras = null; 45244 } 45245 [$toStyle](startColor) { 45246 return startColor ? startColor[$toStyle]() : "#FFFFFF"; 45247 } 45248} 45249class Speak extends StringObject { 45250 constructor(attributes) { 45251 super(TEMPLATE_NS_ID, "speak"); 45252 this.disable = getInteger({ 45253 data: attributes.disable, 45254 defaultValue: 0, 45255 validate: x => x === 1 45256 }); 45257 this.id = attributes.id || ""; 45258 this.priority = getStringOption(attributes.priority, ["custom", "caption", "name", "toolTip"]); 45259 this.rid = attributes.rid || ""; 45260 this.use = attributes.use || ""; 45261 this.usehref = attributes.usehref || ""; 45262 } 45263} 45264class Stipple extends XFAObject { 45265 constructor(attributes) { 45266 super(TEMPLATE_NS_ID, "stipple", true); 45267 this.id = attributes.id || ""; 45268 this.rate = getInteger({ 45269 data: attributes.rate, 45270 defaultValue: 50, 45271 validate: x => x >= 0 && x <= 100 45272 }); 45273 this.use = attributes.use || ""; 45274 this.usehref = attributes.usehref || ""; 45275 this.color = null; 45276 this.extras = null; 45277 } 45278 [$toStyle](bgColor) { 45279 const alpha = this.rate / 100; 45280 return Util.makeHexColor(Math.round(bgColor.value.r * (1 - alpha) + this.value.r * alpha), Math.round(bgColor.value.g * (1 - alpha) + this.value.g * alpha), Math.round(bgColor.value.b * (1 - alpha) + this.value.b * alpha)); 45281 } 45282} 45283class Subform extends XFAObject { 45284 constructor(attributes) { 45285 super(TEMPLATE_NS_ID, "subform", true); 45286 this.access = getStringOption(attributes.access, ["open", "nonInteractive", "protected", "readOnly"]); 45287 this.allowMacro = getInteger({ 45288 data: attributes.allowMacro, 45289 defaultValue: 0, 45290 validate: x => x === 1 45291 }); 45292 this.anchorType = getStringOption(attributes.anchorType, ["topLeft", "bottomCenter", "bottomLeft", "bottomRight", "middleCenter", "middleLeft", "middleRight", "topCenter", "topRight"]); 45293 this.colSpan = getInteger({ 45294 data: attributes.colSpan, 45295 defaultValue: 1, 45296 validate: n => n >= 1 || n === -1 45297 }); 45298 this.columnWidths = (attributes.columnWidths || "").trim().split(/\s+/).map(x => x === "-1" ? -1 : getMeasurement(x)); 45299 this.h = attributes.h ? getMeasurement(attributes.h) : ""; 45300 this.hAlign = getStringOption(attributes.hAlign, ["left", "center", "justify", "justifyAll", "radix", "right"]); 45301 this.id = attributes.id || ""; 45302 this.layout = getStringOption(attributes.layout, ["position", "lr-tb", "rl-row", "rl-tb", "row", "table", "tb"]); 45303 this.locale = attributes.locale || ""; 45304 this.maxH = getMeasurement(attributes.maxH, "0pt"); 45305 this.maxW = getMeasurement(attributes.maxW, "0pt"); 45306 this.mergeMode = getStringOption(attributes.mergeMode, ["consumeData", "matchTemplate"]); 45307 this.minH = getMeasurement(attributes.minH, "0pt"); 45308 this.minW = getMeasurement(attributes.minW, "0pt"); 45309 this.name = attributes.name || ""; 45310 this.presence = getStringOption(attributes.presence, ["visible", "hidden", "inactive", "invisible"]); 45311 this.relevant = getRelevant(attributes.relevant); 45312 this.restoreState = getStringOption(attributes.restoreState, ["manual", "auto"]); 45313 this.scope = getStringOption(attributes.scope, ["name", "none"]); 45314 this.use = attributes.use || ""; 45315 this.usehref = attributes.usehref || ""; 45316 this.w = attributes.w ? getMeasurement(attributes.w) : ""; 45317 this.x = getMeasurement(attributes.x, "0pt"); 45318 this.y = getMeasurement(attributes.y, "0pt"); 45319 this.assist = null; 45320 this.bind = null; 45321 this.bookend = null; 45322 this.border = null; 45323 this.break = null; 45324 this.calculate = null; 45325 this.desc = null; 45326 this.extras = null; 45327 this.keep = null; 45328 this.margin = null; 45329 this.occur = null; 45330 this.overflow = null; 45331 this.pageSet = null; 45332 this.para = null; 45333 this.traversal = null; 45334 this.validate = null; 45335 this.variables = null; 45336 this.area = new XFAObjectArray(); 45337 this.breakAfter = new XFAObjectArray(); 45338 this.breakBefore = new XFAObjectArray(); 45339 this.connect = new XFAObjectArray(); 45340 this.draw = new XFAObjectArray(); 45341 this.event = new XFAObjectArray(); 45342 this.exObject = new XFAObjectArray(); 45343 this.exclGroup = new XFAObjectArray(); 45344 this.field = new XFAObjectArray(); 45345 this.proto = new XFAObjectArray(); 45346 this.setProperty = new XFAObjectArray(); 45347 this.subform = new XFAObjectArray(); 45348 this.subformSet = new XFAObjectArray(); 45349 } 45350 [$getSubformParent]() { 45351 const parent = this[$getParent](); 45352 if (parent instanceof SubformSet) { 45353 return parent[$getSubformParent](); 45354 } 45355 return parent; 45356 } 45357 [$isBindable]() { 45358 return true; 45359 } 45360 [$isThereMoreWidth]() { 45361 return this.layout.endsWith("-tb") && this[$extra].attempt === 0 && this[$extra].numberInLine > 0 || this[$getParent]()[$isThereMoreWidth](); 45362 } 45363 *[$getContainedChildren]() { 45364 yield* getContainedChildren(this); 45365 } 45366 [$flushHTML]() { 45367 return flushHTML(this); 45368 } 45369 [$addHTML](html, bbox) { 45370 addHTML(this, html, bbox); 45371 } 45372 [$getAvailableSpace]() { 45373 return getAvailableSpace(this); 45374 } 45375 [$isSplittable]() { 45376 const parent = this[$getSubformParent](); 45377 if (!parent[$isSplittable]()) { 45378 return false; 45379 } 45380 if (this[$extra]._isSplittable !== undefined) { 45381 return this[$extra]._isSplittable; 45382 } 45383 if (this.layout === "position" || this.layout.includes("row")) { 45384 this[$extra]._isSplittable = false; 45385 return false; 45386 } 45387 if (this.keep && this.keep.intact !== "none") { 45388 this[$extra]._isSplittable = false; 45389 return false; 45390 } 45391 if (parent.layout?.endsWith("-tb") && parent[$extra].numberInLine !== 0) { 45392 return false; 45393 } 45394 this[$extra]._isSplittable = true; 45395 return true; 45396 } 45397 [$toHTML](availableSpace) { 45398 setTabIndex(this); 45399 if (this.break) { 45400 if (this.break.after !== "auto" || this.break.afterTarget !== "") { 45401 const node = new BreakAfter({ 45402 targetType: this.break.after, 45403 target: this.break.afterTarget, 45404 startNew: this.break.startNew.toString() 45405 }); 45406 node[$globalData] = this[$globalData]; 45407 this[$appendChild](node); 45408 this.breakAfter.push(node); 45409 } 45410 if (this.break.before !== "auto" || this.break.beforeTarget !== "") { 45411 const node = new BreakBefore({ 45412 targetType: this.break.before, 45413 target: this.break.beforeTarget, 45414 startNew: this.break.startNew.toString() 45415 }); 45416 node[$globalData] = this[$globalData]; 45417 this[$appendChild](node); 45418 this.breakBefore.push(node); 45419 } 45420 if (this.break.overflowTarget !== "") { 45421 const node = new Overflow({ 45422 target: this.break.overflowTarget, 45423 leader: this.break.overflowLeader, 45424 trailer: this.break.overflowTrailer 45425 }); 45426 node[$globalData] = this[$globalData]; 45427 this[$appendChild](node); 45428 this.overflow.push(node); 45429 } 45430 this[$removeChild](this.break); 45431 this.break = null; 45432 } 45433 if (this.presence === "hidden" || this.presence === "inactive") { 45434 return HTMLResult.EMPTY; 45435 } 45436 if (this.breakBefore.children.length > 1 || this.breakAfter.children.length > 1) { 45437 warn("XFA - Several breakBefore or breakAfter in subforms: please file a bug."); 45438 } 45439 if (this.breakBefore.children.length >= 1) { 45440 const breakBefore = this.breakBefore.children[0]; 45441 if (handleBreak(breakBefore)) { 45442 return HTMLResult.breakNode(breakBefore); 45443 } 45444 } 45445 if (this[$extra]?.afterBreakAfter) { 45446 return HTMLResult.EMPTY; 45447 } 45448 fixDimensions(this); 45449 const children = []; 45450 const attributes = { 45451 id: this[$uid], 45452 class: [] 45453 }; 45454 setAccess(this, attributes.class); 45455
vendor: 9,700 bytes, lines 45455-45749
45455if (!this[$extra]) { 45456 this[$extra] = Object.create(null); 45457 } 45458 Object.assign(this[$extra], { 45459 children, 45460 line: null, 45461 attributes, 45462 attempt: 0, 45463 numberInLine: 0, 45464 availableSpace: { 45465 width: Math.min(this.w || Infinity, availableSpace.width), 45466 height: Math.min(this.h || Infinity, availableSpace.height) 45467 }, 45468 width: 0, 45469 height: 0, 45470 prevHeight: 0, 45471 currentWidth: 0 45472 }); 45473 const root = this[$getTemplateRoot](); 45474 const savedNoLayoutFailure = root[$extra].noLayoutFailure; 45475 const isSplittable = this[$isSplittable](); 45476 if (!isSplittable) { 45477 setFirstUnsplittable(this); 45478 } 45479 if (!checkDimensions(this, availableSpace)) { 45480 return HTMLResult.FAILURE; 45481 } 45482 const filter = new Set(["area", "draw", "exclGroup", "field", "subform", "subformSet"]); 45483 if (this.layout.includes("row")) { 45484 const columnWidths = this[$getSubformParent]().columnWidths; 45485 if (Array.isArray(columnWidths) && columnWidths.length > 0) { 45486 this[$extra].columnWidths = columnWidths; 45487 this[$extra].currentColumn = 0; 45488 } 45489 } 45490 const style = toStyle(this, "anchorType", "dimensions", "position", "presence", "border", "margin", "hAlign"); 45491 const classNames = ["xfaSubform"]; 45492 const cl = layoutClass(this); 45493 if (cl) { 45494 classNames.push(cl); 45495 } 45496 attributes.style = style; 45497 attributes.class = classNames; 45498 if (this.name) { 45499 attributes.xfaName = this.name; 45500 } 45501 if (this.overflow) { 45502 const overflowExtra = this.overflow[$getExtra](); 45503 if (overflowExtra.addLeader) { 45504 overflowExtra.addLeader = false; 45505 handleOverflow(this, overflowExtra.leader, availableSpace); 45506 } 45507 } 45508 this[$pushPara](); 45509 const isLrTb = this.layout === "lr-tb" || this.layout === "rl-tb"; 45510 const maxRun = isLrTb ? MAX_ATTEMPTS_FOR_LRTB_LAYOUT : 1; 45511 for (; this[$extra].attempt < maxRun; this[$extra].attempt++) { 45512 if (isLrTb && this[$extra].attempt === MAX_ATTEMPTS_FOR_LRTB_LAYOUT - 1) { 45513 this[$extra].numberInLine = 0; 45514 } 45515 const result = this[$childrenToHTML]({ 45516 filter, 45517 include: true 45518 }); 45519 if (result.success) { 45520 break; 45521 } 45522 if (result.isBreak()) { 45523 this[$popPara](); 45524 return result; 45525 } 45526 if (isLrTb && this[$extra].attempt === 0 && this[$extra].numberInLine === 0 && !root[$extra].noLayoutFailure) { 45527 this[$extra].attempt = maxRun; 45528 break; 45529 } 45530 } 45531 this[$popPara](); 45532 if (!isSplittable) { 45533 unsetFirstUnsplittable(this); 45534 } 45535 root[$extra].noLayoutFailure = savedNoLayoutFailure; 45536 if (this[$extra].attempt === maxRun) { 45537 if (this.overflow) { 45538 this[$getTemplateRoot]()[$extra].overflowNode = this.overflow; 45539 } 45540 if (!isSplittable) { 45541 delete this[$extra]; 45542 } 45543 return HTMLResult.FAILURE; 45544 } 45545 if (this.overflow) { 45546 const overflowExtra = this.overflow[$getExtra](); 45547 if (overflowExtra.addTrailer) { 45548 overflowExtra.addTrailer = false; 45549 handleOverflow(this, overflowExtra.trailer, availableSpace); 45550 } 45551 } 45552 let marginH = 0; 45553 let marginV = 0; 45554 if (this.margin) { 45555 marginH = this.margin.leftInset + this.margin.rightInset; 45556 marginV = this.margin.topInset + this.margin.bottomInset; 45557 } 45558 const width = Math.max(this[$extra].width + marginH, this.w || 0); 45559 const height = Math.max(this[$extra].height + marginV, this.h || 0); 45560 const bbox = [this.x, this.y, width, height]; 45561 if (this.w === "") { 45562 style.width = measureToString(width); 45563 } 45564 if (this.h === "") { 45565 style.height = measureToString(height); 45566 } 45567 if ((style.width === "0px" || style.height === "0px") && children.length === 0) { 45568 return HTMLResult.EMPTY; 45569 } 45570 const html = { 45571 name: "div", 45572 attributes, 45573 children 45574 }; 45575 applyAssist(this, attributes); 45576 const result = HTMLResult.success(createWrapper(this, html), bbox); 45577 if (this.breakAfter.children.length >= 1) { 45578 const breakAfter = this.breakAfter.children[0]; 45579 if (handleBreak(breakAfter)) { 45580 this[$extra].afterBreakAfter = result; 45581 return HTMLResult.breakNode(breakAfter); 45582 } 45583 } 45584 delete this[$extra]; 45585 return result; 45586 } 45587} 45588class SubformSet extends XFAObject { 45589 constructor(attributes) { 45590 super(TEMPLATE_NS_ID, "subformSet", true); 45591 this.id = attributes.id || ""; 45592 this.name = attributes.name || ""; 45593 this.relation = getStringOption(attributes.relation, ["ordered", "choice", "unordered"]); 45594 this.relevant = getRelevant(attributes.relevant); 45595 this.use = attributes.use || ""; 45596 this.usehref = attributes.usehref || ""; 45597 this.bookend = null; 45598 this.break = null; 45599 this.desc = null; 45600 this.extras = null; 45601 this.occur = null; 45602 this.overflow = null; 45603 this.breakAfter = new XFAObjectArray(); 45604 this.breakBefore = new XFAObjectArray(); 45605 this.subform = new XFAObjectArray(); 45606 this.subformSet = new XFAObjectArray(); 45607 } 45608 *[$getContainedChildren]() { 45609 yield* getContainedChildren(this); 45610 } 45611 [$getSubformParent]() { 45612 let parent = this[$getParent](); 45613 while (!(parent instanceof Subform)) { 45614 parent = parent[$getParent](); 45615 } 45616 return parent; 45617 } 45618 [$isBindable]() { 45619 return true; 45620 } 45621} 45622class SubjectDN extends ContentObject { 45623 constructor(attributes) { 45624 super(TEMPLATE_NS_ID, "subjectDN"); 45625 this.delimiter = attributes.delimiter || ","; 45626 this.id = attributes.id || ""; 45627 this.name = attributes.name || ""; 45628 this.use = attributes.use || ""; 45629 this.usehref = attributes.usehref || ""; 45630 } 45631 [$finalize]() { 45632 this[$content] = new Map(this[$content].split(this.delimiter).map(kv => { 45633 kv = kv.split("=", 2); 45634 kv[0] = kv[0].trim(); 45635 return kv; 45636 })); 45637 } 45638} 45639class SubjectDNs extends XFAObject { 45640 constructor(attributes) { 45641 super(TEMPLATE_NS_ID, "subjectDNs", true); 45642 this.id = attributes.id || ""; 45643 this.type = getStringOption(attributes.type, ["optional", "required"]); 45644 this.use = attributes.use || ""; 45645 this.usehref = attributes.usehref || ""; 45646 this.subjectDN = new XFAObjectArray(); 45647 } 45648} 45649class Submit extends XFAObject { 45650 constructor(attributes) { 45651 super(TEMPLATE_NS_ID, "submit", true); 45652 this.embedPDF = getInteger({ 45653 data: attributes.embedPDF, 45654 defaultValue: 0, 45655 validate: x => x === 1 45656 }); 45657 this.format = getStringOption(attributes.format, ["xdp", "formdata", "pdf", "urlencoded", "xfd", "xml"]); 45658 this.id = attributes.id || ""; 45659 this.target = attributes.target || ""; 45660 this.textEncoding = getKeyword({ 45661 data: attributes.textEncoding ? attributes.textEncoding.toLowerCase() : "", 45662 defaultValue: "", 45663 validate: k => ["utf-8", "big-five", "fontspecific", "gbk", "gb-18030", "gb-2312", "ksc-5601", "none", "shift-jis", "ucs-2", "utf-16"].includes(k) || k.match(/iso-8859-\d{2}/) 45664 }); 45665 this.use = attributes.use || ""; 45666 this.usehref = attributes.usehref || ""; 45667 this.xdpContent = attributes.xdpContent || ""; 45668 this.encrypt = null; 45669 this.encryptData = new XFAObjectArray(); 45670 this.signData = new XFAObjectArray(); 45671 } 45672} 45673class Template extends XFAObject { 45674 constructor(attributes) { 45675 super(TEMPLATE_NS_ID, "template", true); 45676 this.baseProfile = getStringOption(attributes.baseProfile, ["full", "interactiveForms"]); 45677 this.extras = null; 45678 this.subform = new XFAObjectArray(); 45679 } 45680 [$finalize]() { 45681 if (this.subform.children.length === 0) { 45682 warn("XFA - No subforms in template node."); 45683 } 45684 if (this.subform.children.length >= 2) { 45685 warn("XFA - Several subforms in template node: please file a bug."); 45686 } 45687 this[$tabIndex] = DEFAULT_TAB_INDEX; 45688 } 45689 [$isSplittable]() { 45690 return true; 45691 } 45692 [$searchNode](expr, container) { 45693 if (expr.startsWith("#")) { 45694 return [this[$ids].get(expr.slice(1))]; 45695 } 45696 return searchNode(this, container, expr, true, true); 45697 } 45698 *[$toPages]() { 45699 if (!this.subform.children.length) { 45700 return HTMLResult.success({ 45701 name: "div", 45702 children: [] 45703 }); 45704 } 45705 this[$extra] = { 45706 overflowNode: null, 45707 firstUnsplittable: null, 45708 currentContentArea: null, 45709 currentPageArea: null, 45710 noLayoutFailure: false, 45711 pageNumber: 1, 45712 pagePosition: "first", 45713 oddOrEven: "odd", 45714 blankOrNotBlank: "nonBlank", 45715 paraStack: [] 45716 }; 45717 const root = this.subform.children[0]; 45718 root.pageSet[$cleanPage](); 45719 const pageAreas = root.pageSet.pageArea.children; 45720 const mainHtml = { 45721 name: "div", 45722 children: [] 45723 }; 45724 let pageArea = null; 45725 let breakBefore = null; 45726 let breakBeforeTarget = null; 45727 if (root.breakBefore.children.length >= 1) { 45728 breakBefore = root.breakBefore.children[0]; 45729 breakBeforeTarget = breakBefore.target; 45730 } else if (root.subform.children.length >= 1 && root.subform.children[0].breakBefore.children.length >= 1) { 45731 breakBefore = root.subform.children[0].breakBefore.children[0]; 45732 breakBeforeTarget = breakBefore.target; 45733 } else if (root.break?.beforeTarget) { 45734 breakBefore = root.break; 45735 breakBeforeTarget = breakBefore.beforeTarget; 45736 } else if (root.subform.children.length >= 1 && root.subform.children[0].break?.beforeTarget) { 45737 breakBefore = root.subform.children[0].break; 45738 breakBeforeTarget = breakBefore.beforeTarget; 45739 } 45740 if (breakBefore) { 45741 const target = this[$searchNode](breakBeforeTarget, breakBefore[$getParent]()); 45742 if (target instanceof PageArea) { 45743 pageArea = target; 45744 breakBefore[$extra] = {}; 45745 } 45746 } 45747 if (!pageArea) { 45748 pageArea = pageAreas[0]; 45749 }
vendor: 5,944 bytes, lines 45749-45932
45749 45750 pageArea[$extra] = { 45751 numberOfUse: 1 45752 }; 45753 const pageAreaParent = pageArea[$getParent](); 45754 pageAreaParent[$extra] = { 45755 numberOfUse: 1, 45756 pageIndex: pageAreaParent.pageArea.children.indexOf(pageArea), 45757 pageSetIndex: 0 45758 }; 45759 let targetPageArea; 45760 let leader = null; 45761 let trailer = null; 45762 let hasSomething = true; 45763 let hasSomethingCounter = 0; 45764 let startIndex = 0; 45765 while (true) { 45766 if (!hasSomething) { 45767 mainHtml.children.pop(); 45768 if (++hasSomethingCounter === MAX_EMPTY_PAGES) { 45769 warn("XFA - Something goes wrong: please file a bug."); 45770 return mainHtml; 45771 } 45772 } else { 45773 hasSomethingCounter = 0; 45774 } 45775 targetPageArea = null; 45776 this[$extra].currentPageArea = pageArea; 45777 const page = pageArea[$toHTML]().html; 45778 mainHtml.children.push(page); 45779 if (leader) { 45780 this[$extra].noLayoutFailure = true; 45781 page.children.push(leader[$toHTML](pageArea[$extra].space).html); 45782 leader = null; 45783 } 45784 if (trailer) { 45785 this[$extra].noLayoutFailure = true; 45786 page.children.push(trailer[$toHTML](pageArea[$extra].space).html); 45787 trailer = null; 45788 } 45789 const contentAreas = pageArea.contentArea.children; 45790 const htmlContentAreas = page.children.filter(node => node.attributes.class.includes("xfaContentarea")); 45791 hasSomething = false; 45792 this[$extra].firstUnsplittable = null; 45793 this[$extra].noLayoutFailure = false; 45794 const flush = index => { 45795 const html = root[$flushHTML](); 45796 if (html) { 45797 hasSomething ||= html.children?.length > 0; 45798 htmlContentAreas[index].children.push(html); 45799 } 45800 }; 45801 for (let i = startIndex, ii = contentAreas.length; i < ii; i++) { 45802 const contentArea = this[$extra].currentContentArea = contentAreas[i]; 45803 const space = { 45804 width: contentArea.w, 45805 height: contentArea.h 45806 }; 45807 startIndex = 0; 45808 if (leader) { 45809 htmlContentAreas[i].children.push(leader[$toHTML](space).html); 45810 leader = null; 45811 } 45812 if (trailer) { 45813 htmlContentAreas[i].children.push(trailer[$toHTML](space).html); 45814 trailer = null; 45815 } 45816 const html = root[$toHTML](space); 45817 if (html.success) { 45818 if (html.html) { 45819 hasSomething ||= html.html.children?.length > 0; 45820 htmlContentAreas[i].children.push(html.html); 45821 } else if (!hasSomething && mainHtml.children.length > 1) { 45822 mainHtml.children.pop(); 45823 } 45824 return mainHtml; 45825 } 45826 if (html.isBreak()) { 45827 const node = html.breakNode; 45828 flush(i); 45829 if (node.targetType === "auto") { 45830 continue; 45831 } 45832 if (node.leader) { 45833 leader = this[$searchNode](node.leader, node[$getParent]()); 45834 leader = leader ? leader[0] : null; 45835 } 45836 if (node.trailer) { 45837 trailer = this[$searchNode](node.trailer, node[$getParent]()); 45838 trailer = trailer ? trailer[0] : null; 45839 } 45840 if (node.targetType === "pageArea") { 45841 targetPageArea = node[$extra].target; 45842 i = Infinity; 45843 } else if (!node[$extra].target) { 45844 i = node[$extra].index; 45845 } else { 45846 targetPageArea = node[$extra].target; 45847 startIndex = node[$extra].index + 1; 45848 i = Infinity; 45849 } 45850 continue; 45851 } 45852 if (this[$extra].overflowNode) { 45853 const node = this[$extra].overflowNode; 45854 this[$extra].overflowNode = null; 45855 const overflowExtra = node[$getExtra](); 45856 const target = overflowExtra.target; 45857 overflowExtra.addLeader = overflowExtra.leader !== null; 45858 overflowExtra.addTrailer = overflowExtra.trailer !== null; 45859 flush(i); 45860 const currentIndex = i; 45861 i = Infinity; 45862 if (target instanceof PageArea) { 45863 targetPageArea = target; 45864 } else if (target instanceof ContentArea) { 45865 const index = contentAreas.indexOf(target); 45866 if (index !== -1) { 45867 if (index > currentIndex) { 45868 i = index - 1; 45869 } else { 45870 startIndex = index; 45871 } 45872 } else { 45873 targetPageArea = target[$getParent](); 45874 startIndex = targetPageArea.contentArea.children.indexOf(target); 45875 } 45876 } 45877 continue; 45878 } 45879 flush(i); 45880 } 45881 this[$extra].pageNumber += 1; 45882 if (targetPageArea) { 45883 if (targetPageArea[$isUsable]()) { 45884 targetPageArea[$extra].numberOfUse += 1; 45885 } else { 45886 targetPageArea = null; 45887 } 45888 } 45889 pageArea = targetPageArea || pageArea[$getNextPage](); 45890 yield null; 45891 } 45892 } 45893} 45894class Text extends ContentObject { 45895 constructor(attributes) { 45896 super(TEMPLATE_NS_ID, "text"); 45897 this.id = attributes.id || ""; 45898 this.maxChars = getInteger({ 45899 data: attributes.maxChars, 45900 defaultValue: 0, 45901 validate: x => x >= 0 45902 }); 45903 this.name = attributes.name || ""; 45904 this.rid = attributes.rid || ""; 45905 this.use = attributes.use || ""; 45906 this.usehref = attributes.usehref || ""; 45907 } 45908 [$acceptWhitespace]() { 45909 return true; 45910 } 45911 [$onChild](child) { 45912 if (child[$namespaceId] === NamespaceIds.xhtml.id) { 45913 this[$content] = child; 45914 return true; 45915 } 45916 warn(`XFA - Invalid content in Text: ${child[$nodeName]}.`); 45917 return false; 45918 } 45919 [$onText](str) { 45920 if (this[$content] instanceof XFAObject) { 45921 return; 45922 } 45923 super[$onText](str); 45924 } 45925 [$finalize]() { 45926 if (typeof this[$content] === "string") { 45927 this[$content] = this[$content].replaceAll("\r\n", "\n"); 45928 } 45929 } 45930 [$getExtra]() { 45931 if (typeof this[$content] === "string") { 45932 return this[$content].split(/[\u2029\u2028\n]/).
45932reduce((acc, line) => { 45933 if (line) { 45934 acc.push(line); 45935 } 45936 return acc; 45937 }, []).join("\n"); 45938 } 45939 return this[$content][$text](); 45940 } 45941 [$toHTML](availableSpace) { 45942 if (typeof this[$content] === "string") { 45943 const html = valueToHtml(this[$content]).html; 45944 if (this[$content].includes("\u2029")) { 45945 html.name = "div"; 45946 html.children = []; 45947 this[$content].split("\u2029").map(para => para.split(/[\u2028\n]/).reduce((acc, line) => { 45948 acc.push({ 45949 name: "span", 45950 value: line 45951 }, { 45952 name: "br" 45953 }); 45954 return acc; 45955 }, [
vendor: 24,293 bytes, lines 45955-46880
45955])).forEach(lines => { 45956 html.children.push({ 45957 name: "p", 45958 children: lines 45959 }); 45960 }); 45961 } else if (/[\u2028\n]/.test(this[$content])) { 45962 html.name = "div"; 45963 html.children = []; 45964 this[$content].split(/[\u2028\n]/).forEach(line => { 45965 html.children.push({ 45966 name: "span", 45967 value: line 45968 }, { 45969 name: "br" 45970 }); 45971 }); 45972 } 45973 return HTMLResult.success(html); 45974 } 45975 return this[$content][$toHTML](availableSpace); 45976 } 45977} 45978class TextEdit extends XFAObject { 45979 constructor(attributes) { 45980 super(TEMPLATE_NS_ID, "textEdit", true); 45981 this.allowRichText = getInteger({ 45982 data: attributes.allowRichText, 45983 defaultValue: 0, 45984 validate: x => x === 1 45985 }); 45986 this.hScrollPolicy = getStringOption(attributes.hScrollPolicy, ["auto", "off", "on"]); 45987 this.id = attributes.id || ""; 45988 this.multiLine = getInteger({ 45989 data: attributes.multiLine, 45990 defaultValue: "", 45991 validate: x => x === 0 || x === 1 45992 }); 45993 this.use = attributes.use || ""; 45994 this.usehref = attributes.usehref || ""; 45995 this.vScrollPolicy = getStringOption(attributes.vScrollPolicy, ["auto", "off", "on"]); 45996 this.border = null; 45997 this.comb = null; 45998 this.extras = null; 45999 this.margin = null; 46000 } 46001 [$toHTML](availableSpace) { 46002 const style = toStyle(this, "border", "font", "margin"); 46003 let html; 46004 const field = this[$getParent]()[$getParent](); 46005 if (this.multiLine === "") { 46006 this.multiLine = field instanceof Draw ? 1 : 0; 46007 } 46008 if (this.multiLine === 1) { 46009 html = { 46010 name: "textarea", 46011 attributes: { 46012 dataId: field[$data]?.[$uid] || field[$uid], 46013 fieldId: field[$uid], 46014 class: ["xfaTextfield"], 46015 style, 46016 "aria-label": ariaLabel(field), 46017 "aria-required": false 46018 } 46019 }; 46020 } else { 46021 html = { 46022 name: "input", 46023 attributes: { 46024 type: "text", 46025 dataId: field[$data]?.[$uid] || field[$uid], 46026 fieldId: field[$uid], 46027 class: ["xfaTextfield"], 46028 style, 46029 "aria-label": ariaLabel(field), 46030 "aria-required": false 46031 } 46032 }; 46033 } 46034 if (isRequired(field)) { 46035 html.attributes["aria-required"] = true; 46036 html.attributes.required = true; 46037 } 46038 return HTMLResult.success({ 46039 name: "label", 46040 attributes: { 46041 class: ["xfaLabel"] 46042 }, 46043 children: [html] 46044 }); 46045 } 46046} 46047class Time extends StringObject { 46048 constructor(attributes) { 46049 super(TEMPLATE_NS_ID, "time"); 46050 this.id = attributes.id || ""; 46051 this.name = attributes.name || ""; 46052 this.use = attributes.use || ""; 46053 this.usehref = attributes.usehref || ""; 46054 } 46055 [$finalize]() { 46056 const date = this[$content].trim(); 46057 this[$content] = date ? new Date(date) : null; 46058 } 46059 [$toHTML](availableSpace) { 46060 return valueToHtml(this[$content] ? this[$content].toString() : ""); 46061 } 46062} 46063class TimeStamp extends XFAObject { 46064 constructor(attributes) { 46065 super(TEMPLATE_NS_ID, "timeStamp"); 46066 this.id = attributes.id || ""; 46067 this.server = attributes.server || ""; 46068 this.type = getStringOption(attributes.type, ["optional", "required"]); 46069 this.use = attributes.use || ""; 46070 this.usehref = attributes.usehref || ""; 46071 } 46072} 46073class ToolTip extends StringObject { 46074 constructor(attributes) { 46075 super(TEMPLATE_NS_ID, "toolTip"); 46076 this.id = attributes.id || ""; 46077 this.rid = attributes.rid || ""; 46078 this.use = attributes.use || ""; 46079 this.usehref = attributes.usehref || ""; 46080 } 46081} 46082class Traversal extends XFAObject { 46083 constructor(attributes) { 46084 super(TEMPLATE_NS_ID, "traversal", true); 46085 this.id = attributes.id || ""; 46086 this.use = attributes.use || ""; 46087 this.usehref = attributes.usehref || ""; 46088 this.extras = null; 46089 this.traverse = new XFAObjectArray(); 46090 } 46091} 46092class Traverse extends XFAObject { 46093 constructor(attributes) { 46094 super(TEMPLATE_NS_ID, "traverse", true); 46095 this.id = attributes.id || ""; 46096 this.operation = getStringOption(attributes.operation, ["next", "back", "down", "first", "left", "right", "up"]); 46097 this.ref = attributes.ref || ""; 46098 this.use = attributes.use || ""; 46099 this.usehref = attributes.usehref || ""; 46100 this.extras = null; 46101 this.script = null; 46102 } 46103 get name() { 46104 return this.operation; 46105 } 46106 [$isTransparent]() { 46107 return false; 46108 } 46109} 46110class Ui extends XFAObject { 46111 constructor(attributes) { 46112 super(TEMPLATE_NS_ID, "ui", true); 46113 this.id = attributes.id || ""; 46114 this.use = attributes.use || ""; 46115 this.usehref = attributes.usehref || ""; 46116 this.extras = null; 46117 this.picture = null; 46118 this.barcode = null; 46119 this.button = null; 46120 this.checkButton = null; 46121 this.choiceList = null; 46122 this.dateTimeEdit = null; 46123 this.defaultUi = null; 46124 this.imageEdit = null; 46125 this.numericEdit = null; 46126 this.passwordEdit = null; 46127 this.signature = null; 46128 this.textEdit = null; 46129 } 46130 [$getExtra]() { 46131 if (this[$extra] === undefined) { 46132 for (const name of Object.getOwnPropertyNames(this)) { 46133 if (name === "extras" || name === "picture") { 46134 continue; 46135 } 46136 const obj = this[name]; 46137 if (!(obj instanceof XFAObject)) { 46138 continue; 46139 } 46140 this[$extra] = obj; 46141 return obj; 46142 } 46143 this[$extra] = null; 46144 } 46145 return this[$extra]; 46146 } 46147 [$toHTML](availableSpace) { 46148 const obj = this[$getExtra](); 46149 if (obj) { 46150 return obj[$toHTML](availableSpace); 46151 } 46152 return HTMLResult.EMPTY; 46153 } 46154} 46155class Validate extends XFAObject { 46156 constructor(attributes) { 46157 super(TEMPLATE_NS_ID, "validate", true); 46158 this.formatTest = getStringOption(attributes.formatTest, ["warning", "disabled", "error"]); 46159 this.id = attributes.id || ""; 46160 this.nullTest = getStringOption(attributes.nullTest, ["disabled", "error", "warning"]); 46161 this.scriptTest = getStringOption(attributes.scriptTest, ["error", "disabled", "warning"]); 46162 this.use = attributes.use || ""; 46163 this.usehref = attributes.usehref || ""; 46164 this.extras = null; 46165 this.message = null; 46166 this.picture = null; 46167 this.script = null; 46168 } 46169} 46170class Value extends XFAObject { 46171 constructor(attributes) { 46172 super(TEMPLATE_NS_ID, "value", true); 46173 this.id = attributes.id || ""; 46174 this.override = getInteger({ 46175 data: attributes.override, 46176 defaultValue: 0, 46177 validate: x => x === 1 46178 }); 46179 this.relevant = getRelevant(attributes.relevant); 46180 this.use = attributes.use || ""; 46181 this.usehref = attributes.usehref || ""; 46182 this.arc = null; 46183 this.boolean = null; 46184 this.date = null; 46185 this.dateTime = null; 46186 this.decimal = null; 46187 this.exData = null; 46188 this.float = null; 46189 this.image = null; 46190 this.integer = null; 46191 this.line = null; 46192 this.rectangle = null; 46193 this.text = null; 46194 this.time = null; 46195 } 46196 [$setValue](value) { 46197 const parent = this[$getParent](); 46198 if (parent instanceof Field) { 46199 if (parent.ui?.imageEdit) { 46200 if (!this.image) { 46201 this.image = new Image({}); 46202 this[$appendChild](this.image); 46203 } 46204 this.image[$content] = value[$content]; 46205 return; 46206 } 46207 } 46208 const valueName = value[$nodeName]; 46209 if (this[valueName] !== null) { 46210 this[valueName][$content] = value[$content]; 46211 return; 46212 } 46213 for (const name of Object.getOwnPropertyNames(this)) { 46214 const obj = this[name]; 46215 if (obj instanceof XFAObject) { 46216 this[name] = null; 46217 this[$removeChild](obj); 46218 } 46219 } 46220 this[value[$nodeName]] = value; 46221 this[$appendChild](value); 46222 } 46223 [$text]() { 46224 if (this.exData) { 46225 if (typeof this.exData[$content] === "string") { 46226 return this.exData[$content].trim(); 46227 } 46228 return this.exData[$content][$text]().trim(); 46229 } 46230 for (const name of Object.getOwnPropertyNames(this)) { 46231 if (name === "image") { 46232 continue; 46233 } 46234 const obj = this[name]; 46235 if (obj instanceof XFAObject) { 46236 return (obj[$content] || "").toString().trim(); 46237 } 46238 } 46239 return null; 46240 } 46241 [$toHTML](availableSpace) { 46242 for (const name of Object.getOwnPropertyNames(this)) { 46243 const obj = this[name]; 46244 if (!(obj instanceof XFAObject)) { 46245 continue; 46246 } 46247 return obj[$toHTML](availableSpace); 46248 } 46249 return HTMLResult.EMPTY; 46250 } 46251} 46252class Variables extends XFAObject { 46253 constructor(attributes) { 46254 super(TEMPLATE_NS_ID, "variables", true); 46255 this.id = attributes.id || ""; 46256 this.use = attributes.use || ""; 46257 this.usehref = attributes.usehref || ""; 46258 this.boolean = new XFAObjectArray(); 46259 this.date = new XFAObjectArray(); 46260 this.dateTime = new XFAObjectArray(); 46261 this.decimal = new XFAObjectArray(); 46262 this.exData = new XFAObjectArray(); 46263 this.float = new XFAObjectArray(); 46264 this.image = new XFAObjectArray(); 46265 this.integer = new XFAObjectArray(); 46266 this.manifest = new XFAObjectArray(); 46267 this.script = new XFAObjectArray(); 46268 this.text = new XFAObjectArray(); 46269 this.time = new XFAObjectArray(); 46270 } 46271 [$isTransparent]() { 46272 return true; 46273 } 46274} 46275class TemplateNamespace { 46276 static [$buildXFAObject](name, attributes) { 46277 if (TemplateNamespace.hasOwnProperty(name)) { 46278 const node = TemplateNamespace[name](attributes); 46279 node[$setSetAttributes](attributes); 46280 return node; 46281 } 46282 return undefined; 46283 } 46284 static appearanceFilter(attrs) { 46285 return new AppearanceFilter(attrs); 46286 } 46287 static arc(attrs) { 46288 return new Arc(attrs); 46289 } 46290 static area(attrs) { 46291 return new Area(attrs); 46292 } 46293 static assist(attrs) { 46294 return new Assist(attrs); 46295 } 46296 static barcode(attrs) { 46297 return new Barcode(attrs); 46298 } 46299 static bind(attrs) { 46300 return new Bind(attrs); 46301 } 46302 static bindItems(attrs) { 46303 return new BindItems(attrs); 46304 } 46305 static bookend(attrs) { 46306 return new Bookend(attrs); 46307 } 46308 static boolean(attrs) { 46309 return new BooleanElement(attrs); 46310 } 46311 static border(attrs) { 46312 return new Border(attrs); 46313 } 46314 static break(attrs) { 46315 return new Break(attrs); 46316 } 46317 static breakAfter(attrs) { 46318 return new BreakAfter(attrs); 46319 } 46320 static breakBefore(attrs) { 46321 return new BreakBefore(attrs); 46322 } 46323 static button(attrs) { 46324 return new Button(attrs); 46325 } 46326 static calculate(attrs) { 46327 return new Calculate(attrs); 46328 } 46329 static caption(attrs) { 46330 return new Caption(attrs); 46331 } 46332 static certificate(attrs) { 46333 return new Certificate(attrs); 46334 } 46335 static certificates(attrs) { 46336 return new Certificates(attrs); 46337 } 46338 static checkButton(attrs) { 46339 return new CheckButton(attrs); 46340 } 46341 static choiceList(attrs) { 46342 return new ChoiceList(attrs); 46343 } 46344 static color(attrs) { 46345 return new Color(attrs); 46346 } 46347 static comb(attrs) { 46348 return new Comb(attrs); 46349 } 46350 static connect(attrs) { 46351 return new Connect(attrs); 46352 } 46353 static contentArea(attrs) { 46354 return new ContentArea(attrs); 46355 } 46356 static corner(attrs) { 46357 return new Corner(attrs); 46358 } 46359 static date(attrs) { 46360 return new DateElement(attrs); 46361 } 46362 static dateTime(attrs) { 46363 return new DateTime(attrs); 46364 } 46365 static dateTimeEdit(attrs) { 46366 return new DateTimeEdit(attrs); 46367 } 46368 static decimal(attrs) { 46369 return new Decimal(attrs); 46370 } 46371 static defaultUi(attrs) { 46372 return new DefaultUi(attrs); 46373 } 46374 static desc(attrs) { 46375 return new Desc(attrs); 46376 } 46377 static digestMethod(attrs) { 46378 return new DigestMethod(attrs); 46379 } 46380 static digestMethods(attrs) { 46381 return new DigestMethods(attrs); 46382 } 46383 static draw(attrs) { 46384 return new Draw(attrs); 46385 } 46386 static edge(attrs) { 46387 return new Edge(attrs); 46388 } 46389 static encoding(attrs) { 46390 return new Encoding(attrs); 46391 } 46392 static encodings(attrs) { 46393 return new Encodings(attrs); 46394 } 46395 static encrypt(attrs) { 46396 return new Encrypt(attrs); 46397 } 46398 static encryptData(attrs) { 46399 return new EncryptData(attrs); 46400 } 46401 static encryption(attrs) { 46402 return new Encryption(attrs); 46403 } 46404 static encryptionMethod(attrs) { 46405 return new EncryptionMethod(attrs); 46406 } 46407 static encryptionMethods(attrs) { 46408 return new EncryptionMethods(attrs); 46409 } 46410 static event(attrs) { 46411 return new Event(attrs); 46412 } 46413 static exData(attrs) { 46414 return new ExData(attrs); 46415 } 46416 static exObject(attrs) { 46417 return new ExObject(attrs); 46418 } 46419 static exclGroup(attrs) { 46420 return new ExclGroup(attrs); 46421 } 46422 static execute(attrs) { 46423 return new Execute(attrs); 46424 } 46425 static extras(attrs) { 46426 return new Extras(attrs); 46427 } 46428 static field(attrs) { 46429 return new Field(attrs); 46430 } 46431 static fill(attrs) { 46432 return new Fill(attrs); 46433 } 46434 static filter(attrs) { 46435 return new Filter(attrs); 46436 } 46437 static float(attrs) { 46438 return new Float(attrs); 46439 } 46440 static font(attrs) { 46441 return new template_Font(attrs); 46442 } 46443 static format(attrs) { 46444 return new Format(attrs); 46445 } 46446 static handler(attrs) { 46447 return new Handler(attrs); 46448 } 46449 static hyphenation(attrs) { 46450 return new Hyphenation(attrs); 46451 } 46452 static image(attrs) { 46453 return new Image(attrs); 46454 } 46455 static imageEdit(attrs) { 46456 return new ImageEdit(attrs); 46457 } 46458 static integer(attrs) { 46459 return new Integer(attrs); 46460 } 46461 static issuers(attrs) { 46462 return new Issuers(attrs); 46463 } 46464 static items(attrs) { 46465 return new Items(attrs); 46466 } 46467 static keep(attrs) { 46468 return new Keep(attrs); 46469 } 46470 static keyUsage(attrs) { 46471 return new KeyUsage(attrs); 46472 } 46473 static line(attrs) { 46474 return new Line(attrs); 46475 } 46476 static linear(attrs) { 46477 return new Linear(attrs); 46478 } 46479 static lockDocument(attrs) { 46480 return new LockDocument(attrs); 46481 } 46482 static manifest(attrs) { 46483 return new Manifest(attrs); 46484 } 46485 static margin(attrs) { 46486 return new Margin(attrs); 46487 } 46488 static mdp(attrs) { 46489 return new Mdp(attrs); 46490 } 46491 static medium(attrs) { 46492 return new Medium(attrs); 46493 } 46494 static message(attrs) { 46495 return new Message(attrs); 46496 } 46497 static numericEdit(attrs) { 46498 return new NumericEdit(attrs); 46499 } 46500 static occur(attrs) { 46501 return new Occur(attrs); 46502 } 46503 static oid(attrs) { 46504 return new Oid(attrs); 46505 } 46506 static oids(attrs) { 46507 return new Oids(attrs); 46508 } 46509 static overflow(attrs) { 46510 return new Overflow(attrs); 46511 } 46512 static pageArea(attrs) { 46513 return new PageArea(attrs); 46514 } 46515 static pageSet(attrs) { 46516 return new PageSet(attrs); 46517 } 46518 static para(attrs) { 46519 return new Para(attrs); 46520 } 46521 static passwordEdit(attrs) { 46522 return new PasswordEdit(attrs); 46523 } 46524 static pattern(attrs) { 46525 return new template_Pattern(attrs); 46526 } 46527 static picture(attrs) { 46528 return new Picture(attrs); 46529 } 46530 static proto(attrs) { 46531 return new Proto(attrs); 46532 } 46533 static radial(attrs) { 46534 return new Radial(attrs); 46535 } 46536 static reason(attrs) { 46537 return new Reason(attrs); 46538 } 46539 static reasons(attrs) { 46540 return new Reasons(attrs); 46541 } 46542 static rectangle(attrs) { 46543 return new Rectangle(attrs); 46544 } 46545 static ref(attrs) { 46546 return new RefElement(attrs); 46547 } 46548 static script(attrs) { 46549 return new Script(attrs); 46550 } 46551 static setProperty(attrs) { 46552 return new SetProperty(attrs); 46553 } 46554 static signData(attrs) { 46555 return new SignData(attrs); 46556 } 46557 static signature(attrs) { 46558 return new Signature(attrs); 46559 } 46560 static signing(attrs) { 46561 return new Signing(attrs); 46562 } 46563 static solid(attrs) { 46564 return new Solid(attrs); 46565 } 46566 static speak(attrs) { 46567 return new Speak(attrs); 46568 } 46569 static stipple(attrs) { 46570 return new Stipple(attrs); 46571 } 46572 static subform(attrs) { 46573 return new Subform(attrs); 46574 } 46575 static subformSet(attrs) { 46576 return new SubformSet(attrs); 46577 } 46578 static subjectDN(attrs) { 46579 return new SubjectDN(attrs); 46580 } 46581 static subjectDNs(attrs) { 46582 return new SubjectDNs(attrs); 46583 } 46584 static submit(attrs) { 46585 return new Submit(attrs); 46586 } 46587 static template(attrs) { 46588 return new Template(attrs); 46589 } 46590 static text(attrs) { 46591 return new Text(attrs); 46592 } 46593 static textEdit(attrs) { 46594 return new TextEdit(attrs); 46595 } 46596 static time(attrs) { 46597 return new Time(attrs); 46598 } 46599 static timeStamp(attrs) { 46600 return new TimeStamp(attrs); 46601 } 46602 static toolTip(attrs) { 46603 return new ToolTip(attrs); 46604 } 46605 static traversal(attrs) { 46606 return new Traversal(attrs); 46607 } 46608 static traverse(attrs) { 46609 return new Traverse(attrs); 46610 } 46611 static ui(attrs) { 46612 return new Ui(attrs); 46613 } 46614 static validate(attrs) { 46615 return new Validate(attrs); 46616 } 46617 static value(attrs) { 46618 return new Value(attrs); 46619 } 46620 static variables(attrs) { 46621 return new Variables(attrs); 46622 } 46623} 46624 46625;// ./src/core/xfa/bind.js 46626 46627 46628 46629 46630 46631 46632const bind_NS_DATASETS = NamespaceIds.datasets.id; 46633function createText(content) { 46634 const node = new Text({}); 46635 node[$content] = content; 46636 return node; 46637} 46638class Binder { 46639 constructor(root) { 46640 this.root = root; 46641 this.datasets = root.datasets; 46642 this.data = root.datasets?.data || new XmlObject(NamespaceIds.datasets.id, "data"); 46643 this.emptyMerge = this.data[$getChildren]().length === 0; 46644 this.root.form = this.form = root.template[$clone](); 46645 } 46646 _isConsumeData() { 46647 return !this.emptyMerge && this._mergeMode; 46648 } 46649 _isMatchTemplate() { 46650 return !this._isConsumeData(); 46651 } 46652 bind() { 46653 this._bindElement(this.form, this.data); 46654 return this.form; 46655 } 46656 getData() { 46657 return this.data; 46658 } 46659 _bindValue(formNode, data, picture) { 46660 formNode[$data] = data; 46661 if (formNode[$hasSettableValue]()) { 46662 if (data[$isDataValue]()) { 46663 const value = data[$getDataValue](); 46664 formNode[$setValue](createText(value)); 46665 } else if (formNode instanceof Field && formNode.ui?.choiceList?.open === "multiSelect") { 46666 const value = data[$getChildren]().map(child => child[$content].trim()).join("\n"); 46667 formNode[$setValue](createText(value)); 46668 } else if (this._isConsumeData()) { 46669 warn(`XFA - Nodes haven't the same type.`); 46670 } 46671 } else if (!data[$isDataValue]() || this._isMatchTemplate()) { 46672 this._bindElement(formNode, data); 46673 } else { 46674 warn(`XFA - Nodes haven't the same type.`); 46675 } 46676 } 46677 _findDataByNameToConsume(name, isValue, dataNode, global) { 46678 if (!name) { 46679 return null; 46680 } 46681 let generator, match; 46682 for (let i = 0; i < 3; i++) { 46683 generator = dataNode[$getRealChildrenByNameIt](name, false, true); 46684 while (true) { 46685 match = generator.next().value; 46686 if (!match) { 46687 break; 46688 } 46689 if (isValue === match[$isDataValue]()) { 46690 return match; 46691 } 46692 } 46693 if (dataNode[$namespaceId] === NamespaceIds.datasets.id && dataNode[$nodeName] === "data") { 46694 break; 46695 } 46696 dataNode = dataNode[$getParent](); 46697 } 46698 if (!global) { 46699 return null; 46700 } 46701 generator = this.data[$getRealChildrenByNameIt](name, true, false); 46702 match = generator.next().value; 46703 if (match) { 46704 return match; 46705 } 46706 generator = this.data[$getAttributeIt](name, true); 46707 match = generator.next().value; 46708 if (match?.[$isDataValue]()) { 46709 return match; 46710 } 46711 return null; 46712 } 46713 _setProperties(formNode, dataNode) { 46714 if (!formNode.hasOwnProperty("setProperty")) { 46715 return; 46716 } 46717 for (const { 46718 ref, 46719 target, 46720 connection 46721 } of formNode.setProperty.children) { 46722 if (connection) { 46723 continue; 46724 } 46725 if (!ref) { 46726 continue; 46727 } 46728 const nodes = searchNode(this.root, dataNode, ref, false, false); 46729 if (!nodes) { 46730 warn(`XFA - Invalid reference: ${ref}.`); 46731 continue; 46732 } 46733 const [node] = nodes; 46734 if (!node[$isDescendent](this.data)) { 46735 warn(`XFA - Invalid node: must be a data node.`); 46736 continue; 46737 } 46738 const targetNodes = searchNode(this.root, formNode, target, false, false); 46739 if (!targetNodes) { 46740 warn(`XFA - Invalid target: ${target}.`); 46741 continue; 46742 } 46743 const [targetNode] = targetNodes; 46744 if (!targetNode[$isDescendent](formNode)) { 46745 warn(`XFA - Invalid target: must be a property or subproperty.`); 46746 continue; 46747 } 46748 const targetParent = targetNode[$getParent](); 46749 if (targetNode instanceof SetProperty || targetParent instanceof SetProperty) { 46750 warn(`XFA - Invalid target: cannot be a setProperty or one of its properties.`); 46751 continue; 46752 } 46753 if (targetNode instanceof BindItems || targetParent instanceof BindItems) { 46754 warn(`XFA - Invalid target: cannot be a bindItems or one of its properties.`); 46755 continue; 46756 } 46757 const content = node[$text](); 46758 const name = targetNode[$nodeName]; 46759 if (targetNode instanceof XFAAttribute) { 46760 const attrs = Object.create(null); 46761 attrs[name] = content; 46762 const obj = Reflect.construct(Object.getPrototypeOf(targetParent).constructor, [attrs]); 46763 targetParent[name] = obj[name]; 46764 continue; 46765 } 46766 if (!targetNode.hasOwnProperty($content)) { 46767 warn(`XFA - Invalid node to use in setProperty`); 46768 continue; 46769 } 46770 targetNode[$data] = node; 46771 targetNode[$content] = content; 46772 targetNode[$finalize](); 46773 } 46774 } 46775 _bindItems(formNode, dataNode) { 46776 if (!formNode.hasOwnProperty("items") || !formNode.hasOwnProperty("bindItems") || formNode.bindItems.isEmpty()) { 46777 return; 46778 } 46779 for (const item of formNode.items.children) { 46780 formNode[$removeChild](item); 46781 } 46782 formNode.items.clear(); 46783 const labels = new Items({}); 46784 const values = new Items({}); 46785 formNode[$appendChild](labels); 46786 formNode.items.push(labels); 46787 formNode[$appendChild](values); 46788 formNode.items.push(values); 46789 for (const { 46790 ref, 46791 labelRef, 46792 valueRef, 46793 connection 46794 } of formNode.bindItems.children) { 46795 if (connection) { 46796 continue; 46797 } 46798 if (!ref) { 46799 continue; 46800 } 46801 const nodes = searchNode(this.root, dataNode, ref, false, false); 46802 if (!nodes) { 46803 warn(`XFA - Invalid reference: ${ref}.`); 46804 continue; 46805 } 46806 for (const node of nodes) { 46807 if (!node[$isDescendent](this.datasets)) { 46808 warn(`XFA - Invalid ref (${ref}): must be a datasets child.`); 46809 continue; 46810 } 46811 const labelNodes = searchNode(this.root, node, labelRef, true, false); 46812 if (!labelNodes) { 46813 warn(`XFA - Invalid label: ${labelRef}.`); 46814 continue; 46815 } 46816 const [labelNode] = labelNodes; 46817 if (!labelNode[$isDescendent](this.datasets)) { 46818 warn(`XFA - Invalid label: must be a datasets child.`); 46819 continue; 46820 } 46821 const valueNodes = searchNode(this.root, node, valueRef, true, false); 46822 if (!valueNodes) { 46823 warn(`XFA - Invalid value: ${valueRef}.`); 46824 continue; 46825 } 46826 const [valueNode] = valueNodes; 46827 if (!valueNode[$isDescendent](this.datasets)) { 46828 warn(`XFA - Invalid value: must be a datasets child.`); 46829 continue; 46830 } 46831 const label = createText(labelNode[$text]()); 46832 const value = createText(valueNode[$text]()); 46833 labels[$appendChild](label); 46834 labels.text.push(label); 46835 values[$appendChild](value); 46836 values.text.push(value); 46837 } 46838 } 46839 } 46840 _bindOccurrences(formNode, matches, picture) { 46841 let baseClone; 46842 if (matches.length > 1) { 46843 baseClone = formNode[$clone](); 46844 baseClone[$removeChild](baseClone.occur); 46845 baseClone.occur = null; 46846 } 46847 this._bindValue(formNode, matches[0], picture); 46848 this._setProperties(formNode, matches[0]); 46849 this._bindItems(formNode, matches[0]); 46850 if (matches.length === 1) { 46851 return; 46852 } 46853 const parent = formNode[$getParent](); 46854 const name = formNode[$nodeName]; 46855 const pos = parent[$indexOf](formNode); 46856 for (let i = 1, ii = matches.length; i < ii; i++) { 46857 const match = matches[i]; 46858 const clone = baseClone[$clone](); 46859 parent[name].push(clone); 46860 parent[$insertAt](pos + i, clone); 46861 this._bindValue(clone, match, picture); 46862 this._setProperties(clone, match); 46863 this._bindItems(clone, match); 46864 } 46865 } 46866 _createOccurrences(formNode) { 46867 if (!this.emptyMerge) { 46868 return; 46869 } 46870 const { 46871 occur 46872 } = formNode; 46873 if (!occur || occur.initial <= 1) { 46874 return; 46875 } 46876 const parent = formNode[$getParent](); 46877 const name = formNode[$nodeName]; 46878 if (!(parent[name] instanceof XFAObjectArray)) { 46879 return; 46880 }
vendor: 14,872 bytes, lines 46881-47398
46881 let currentNumber; 46882 if (formNode.name) { 46883 currentNumber = parent[name].children.filter(e => e.name === formNode.name).length; 46884 } else { 46885 currentNumber = parent[name].children.length; 46886 } 46887 const pos = parent[$indexOf](formNode) + 1; 46888 const ii = occur.initial - currentNumber; 46889 if (ii) { 46890 const nodeClone = formNode[$clone](); 46891 nodeClone[$removeChild](nodeClone.occur); 46892 nodeClone.occur = null; 46893 parent[name].push(nodeClone); 46894 parent[$insertAt](pos, nodeClone); 46895 for (let i = 1; i < ii; i++) { 46896 const clone = nodeClone[$clone](); 46897 parent[name].push(clone); 46898 parent[$insertAt](pos + i, clone); 46899 } 46900 } 46901 } 46902 _getOccurInfo(formNode) { 46903 const { 46904 name, 46905 occur 46906 } = formNode; 46907 if (!occur || !name) { 46908 return [1, 1]; 46909 } 46910 const max = occur.max === -1 ? Infinity : occur.max; 46911 return [occur.min, max]; 46912 } 46913 _setAndBind(formNode, dataNode) { 46914 this._setProperties(formNode, dataNode); 46915 this._bindItems(formNode, dataNode); 46916 this._bindElement(formNode, dataNode); 46917 } 46918 _bindElement(formNode, dataNode) { 46919 const uselessNodes = []; 46920 this._createOccurrences(formNode); 46921 for (const child of formNode[$getChildren]()) { 46922 if (child[$data]) { 46923 continue; 46924 } 46925 if (this._mergeMode === undefined && child[$nodeName] === "subform") { 46926 this._mergeMode = child.mergeMode === "consumeData"; 46927 const dataChildren = dataNode[$getChildren](); 46928 if (dataChildren.length > 0) { 46929 this._bindOccurrences(child, [dataChildren[0]], null); 46930 } else if (this.emptyMerge) { 46931 const nsId = dataNode[$namespaceId] === bind_NS_DATASETS ? -1 : dataNode[$namespaceId]; 46932 const dataChild = child[$data] = new XmlObject(nsId, child.name || "root"); 46933 dataNode[$appendChild](dataChild); 46934 this._bindElement(child, dataChild); 46935 } 46936 continue; 46937 } 46938 if (!child[$isBindable]()) { 46939 continue; 46940 } 46941 let global = false; 46942 let picture = null; 46943 let ref = null; 46944 let match = null; 46945 if (child.bind) { 46946 switch (child.bind.match) { 46947 case "none": 46948 this._setAndBind(child, dataNode); 46949 continue; 46950 case "global": 46951 global = true; 46952 break; 46953 case "dataRef": 46954 if (!child.bind.ref) { 46955 warn(`XFA - ref is empty in node ${child[$nodeName]}.`); 46956 this._setAndBind(child, dataNode); 46957 continue; 46958 } 46959 ref = child.bind.ref; 46960 break; 46961 default: 46962 break; 46963 } 46964 if (child.bind.picture) { 46965 picture = child.bind.picture[$content]; 46966 } 46967 } 46968 const [min, max] = this._getOccurInfo(child); 46969 if (ref) { 46970 match = searchNode(this.root, dataNode, ref, true, false); 46971 if (match === null) { 46972 match = createDataNode(this.data, dataNode, ref); 46973 if (!match) { 46974 continue; 46975 } 46976 if (this._isConsumeData()) { 46977 match[$consumed] = true; 46978 } 46979 this._setAndBind(child, match); 46980 continue; 46981 } else { 46982 if (this._isConsumeData()) { 46983 match = match.filter(node => !node[$consumed]); 46984 } 46985 if (match.length > max) { 46986 match = match.slice(0, max); 46987 } else if (match.length === 0) { 46988 match = null; 46989 } 46990 if (match && this._isConsumeData()) { 46991 match.forEach(node => { 46992 node[$consumed] = true; 46993 }); 46994 } 46995 } 46996 } else { 46997 if (!child.name) { 46998 this._setAndBind(child, dataNode); 46999 continue; 47000 } 47001 if (this._isConsumeData()) { 47002 const matches = []; 47003 while (matches.length < max) { 47004 const found = this._findDataByNameToConsume(child.name, child[$hasSettableValue](), dataNode, global); 47005 if (!found) { 47006 break; 47007 } 47008 found[$consumed] = true; 47009 matches.push(found); 47010 } 47011 match = matches.length > 0 ? matches : null; 47012 } else { 47013 match = dataNode[$getRealChildrenByNameIt](child.name, false, this.emptyMerge).next().value; 47014 if (!match) { 47015 if (min === 0) { 47016 uselessNodes.push(child); 47017 continue; 47018 } 47019 const nsId = dataNode[$namespaceId] === bind_NS_DATASETS ? -1 : dataNode[$namespaceId]; 47020 match = child[$data] = new XmlObject(nsId, child.name); 47021 if (this.emptyMerge) { 47022 match[$consumed] = true; 47023 } 47024 dataNode[$appendChild](match); 47025 this._setAndBind(child, match); 47026 continue; 47027 } 47028 if (this.emptyMerge) { 47029 match[$consumed] = true; 47030 } 47031 match = [match]; 47032 } 47033 } 47034 if (match) { 47035 this._bindOccurrences(child, match, picture); 47036 } else if (min > 0) { 47037 this._setAndBind(child, dataNode); 47038 } else { 47039 uselessNodes.push(child); 47040 } 47041 } 47042 uselessNodes.forEach(node => node[$getParent]()[$removeChild](node)); 47043 } 47044} 47045 47046;// ./src/core/xfa/data.js 47047 47048class DataHandler { 47049 constructor(root, data) { 47050 this.data = data; 47051 this.dataset = root.datasets || null; 47052 } 47053 serialize(storage) { 47054 const stack = [[-1, this.data[$getChildren]()]]; 47055 while (stack.length > 0) { 47056 const last = stack.at(-1); 47057 const [i, children] = last; 47058 if (i + 1 === children.length) { 47059 stack.pop(); 47060 continue; 47061 } 47062 const child = children[++last[0]]; 47063 const storageEntry = storage.get(child[$uid]); 47064 if (storageEntry) { 47065 child[$setValue](storageEntry); 47066 } else { 47067 const attributes = child[$getAttributes](); 47068 for (const value of attributes.values()) { 47069 const entry = storage.get(value[$uid]); 47070 if (entry) { 47071 value[$setValue](entry); 47072 break; 47073 } 47074 } 47075 } 47076 const nodes = child[$getChildren](); 47077 if (nodes.length > 0) { 47078 stack.push([-1, nodes]); 47079 } 47080 } 47081 const buf = [`<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">`]; 47082 if (this.dataset) { 47083 for (const child of this.dataset[$getChildren]()) { 47084 if (child[$nodeName] !== "data") { 47085 child[$toString](buf); 47086 } 47087 } 47088 } 47089 this.data[$toString](buf); 47090 buf.push("</xfa:datasets>"); 47091 return buf.join(""); 47092 } 47093} 47094 47095;// ./src/core/xfa/config.js 47096 47097 47098 47099 47100 47101const CONFIG_NS_ID = NamespaceIds.config.id; 47102class Acrobat extends XFAObject { 47103 constructor(attributes) { 47104 super(CONFIG_NS_ID, "acrobat", true); 47105 this.acrobat7 = null; 47106 this.autoSave = null; 47107 this.common = null; 47108 this.validate = null; 47109 this.validateApprovalSignatures = null; 47110 this.submitUrl = new XFAObjectArray(); 47111 } 47112} 47113class Acrobat7 extends XFAObject { 47114 constructor(attributes) { 47115 super(CONFIG_NS_ID, "acrobat7", true); 47116 this.dynamicRender = null; 47117 } 47118} 47119class ADBE_JSConsole extends OptionObject { 47120 constructor(attributes) { 47121 super(CONFIG_NS_ID, "ADBE_JSConsole", ["delegate", "Enable", "Disable"]); 47122 } 47123} 47124class ADBE_JSDebugger extends OptionObject { 47125 constructor(attributes) { 47126 super(CONFIG_NS_ID, "ADBE_JSDebugger", ["delegate", "Enable", "Disable"]); 47127 } 47128} 47129class AddSilentPrint extends Option01 { 47130 constructor(attributes) { 47131 super(CONFIG_NS_ID, "addSilentPrint"); 47132 } 47133} 47134class AddViewerPreferences extends Option01 { 47135 constructor(attributes) { 47136 super(CONFIG_NS_ID, "addViewerPreferences"); 47137 } 47138} 47139class AdjustData extends Option10 { 47140 constructor(attributes) { 47141 super(CONFIG_NS_ID, "adjustData"); 47142 } 47143} 47144class AdobeExtensionLevel extends IntegerObject { 47145 constructor(attributes) { 47146 super(CONFIG_NS_ID, "adobeExtensionLevel", 0, n => n >= 1 && n <= 8); 47147 } 47148} 47149class Agent extends XFAObject { 47150 constructor(attributes) { 47151 super(CONFIG_NS_ID, "agent", true); 47152 this.name = attributes.name ? attributes.name.trim() : ""; 47153 this.common = new XFAObjectArray(); 47154 } 47155} 47156class AlwaysEmbed extends ContentObject { 47157 constructor(attributes) { 47158 super(CONFIG_NS_ID, "alwaysEmbed"); 47159 } 47160} 47161class Amd extends StringObject { 47162 constructor(attributes) { 47163 super(CONFIG_NS_ID, "amd"); 47164 } 47165} 47166class config_Area extends XFAObject { 47167 constructor(attributes) { 47168 super(CONFIG_NS_ID, "area"); 47169 this.level = getInteger({ 47170 data: attributes.level, 47171 defaultValue: 0, 47172 validate: n => n >= 1 && n <= 3 47173 }); 47174 this.name = getStringOption(attributes.name, ["", "barcode", "coreinit", "deviceDriver", "font", "general", "layout", "merge", "script", "signature", "sourceSet", "templateCache"]); 47175 } 47176} 47177class Attributes extends OptionObject { 47178 constructor(attributes) { 47179 super(CONFIG_NS_ID, "attributes", ["preserve", "delegate", "ignore"]); 47180 } 47181} 47182class AutoSave extends OptionObject { 47183 constructor(attributes) { 47184 super(CONFIG_NS_ID, "autoSave", ["disabled", "enabled"]); 47185 } 47186} 47187class Base extends StringObject { 47188 constructor(attributes) { 47189 super(CONFIG_NS_ID, "base"); 47190 } 47191} 47192class BatchOutput extends XFAObject { 47193 constructor(attributes) { 47194 super(CONFIG_NS_ID, "batchOutput"); 47195 this.format = getStringOption(attributes.format, ["none", "concat", "zip", "zipCompress"]); 47196 } 47197} 47198class BehaviorOverride extends ContentObject { 47199 constructor(attributes) { 47200 super(CONFIG_NS_ID, "behaviorOverride"); 47201 } 47202 [$finalize]() { 47203 this[$content] = new Map(this[$content].trim().split(/\s+/).filter(x => x.includes(":")).map(x => x.split(":", 2))); 47204 } 47205} 47206class Cache extends XFAObject { 47207 constructor(attributes) { 47208 super(CONFIG_NS_ID, "cache", true); 47209 this.templateCache = null; 47210 } 47211} 47212class Change extends Option01 { 47213 constructor(attributes) { 47214 super(CONFIG_NS_ID, "change"); 47215 } 47216} 47217class Common extends XFAObject { 47218 constructor(attributes) { 47219 super(CONFIG_NS_ID, "common", true); 47220 this.data = null; 47221 this.locale = null; 47222 this.localeSet = null; 47223 this.messaging = null; 47224 this.suppressBanner = null; 47225 this.template = null; 47226 this.validationMessaging = null; 47227 this.versionControl = null; 47228 this.log = new XFAObjectArray(); 47229 } 47230} 47231class Compress extends XFAObject { 47232 constructor(attributes) { 47233 super(CONFIG_NS_ID, "compress"); 47234 this.scope = getStringOption(attributes.scope, ["imageOnly", "document"]); 47235 } 47236} 47237class CompressLogicalStructure extends Option01 { 47238 constructor(attributes) { 47239 super(CONFIG_NS_ID, "compressLogicalStructure"); 47240 } 47241} 47242class CompressObjectStream extends Option10 { 47243 constructor(attributes) { 47244 super(CONFIG_NS_ID, "compressObjectStream"); 47245 } 47246} 47247class Compression extends XFAObject { 47248 constructor(attributes) { 47249 super(CONFIG_NS_ID, "compression", true); 47250 this.compressLogicalStructure = null; 47251 this.compressObjectStream = null; 47252 this.level = null; 47253 this.type = null; 47254 } 47255} 47256class Config extends XFAObject { 47257 constructor(attributes) { 47258 super(CONFIG_NS_ID, "config", true); 47259 this.acrobat = null; 47260 this.present = null; 47261 this.trace = null; 47262 this.agent = new XFAObjectArray(); 47263 } 47264} 47265class Conformance extends OptionObject { 47266 constructor(attributes) { 47267 super(CONFIG_NS_ID, "conformance", ["A", "B"]); 47268 } 47269} 47270class ContentCopy extends Option01 { 47271 constructor(attributes) { 47272 super(CONFIG_NS_ID, "contentCopy"); 47273 } 47274} 47275class Copies extends IntegerObject { 47276 constructor(attributes) { 47277 super(CONFIG_NS_ID, "copies", 1, n => n >= 1); 47278 } 47279} 47280class Creator extends StringObject { 47281 constructor(attributes) { 47282 super(CONFIG_NS_ID, "creator"); 47283 } 47284} 47285class CurrentPage extends IntegerObject { 47286 constructor(attributes) { 47287 super(CONFIG_NS_ID, "currentPage", 0, n => n >= 0); 47288 } 47289} 47290class Data extends XFAObject { 47291 constructor(attributes) { 47292 super(CONFIG_NS_ID, "data", true); 47293 this.adjustData = null; 47294 this.attributes = null; 47295 this.incrementalLoad = null; 47296 this.outputXSL = null; 47297 this.range = null; 47298 this.record = null; 47299 this.startNode = null; 47300 this.uri = null; 47301 this.window = null; 47302 this.xsl = null; 47303 this.excludeNS = new XFAObjectArray(); 47304 this.transform = new XFAObjectArray(); 47305 } 47306} 47307class Debug extends XFAObject { 47308 constructor(attributes) { 47309 super(CONFIG_NS_ID, "debug", true); 47310 this.uri = null; 47311 } 47312} 47313class DefaultTypeface extends ContentObject { 47314 constructor(attributes) { 47315 super(CONFIG_NS_ID, "defaultTypeface"); 47316 this.writingScript = getStringOption(attributes.writingScript, ["*", "Arabic", "Cyrillic", "EastEuropeanRoman", "Greek", "Hebrew", "Japanese", "Korean", "Roman", "SimplifiedChinese", "Thai", "TraditionalChinese", "Vietnamese"]); 47317 } 47318} 47319class Destination extends OptionObject { 47320 constructor(attributes) { 47321 super(CONFIG_NS_ID, "destination", ["pdf", "pcl", "ps", "webClient", "zpl"]); 47322 } 47323} 47324class DocumentAssembly extends Option01 { 47325 constructor(attributes) { 47326 super(CONFIG_NS_ID, "documentAssembly"); 47327 } 47328} 47329class Driver extends XFAObject { 47330 constructor(attributes) { 47331 super(CONFIG_NS_ID, "driver", true); 47332 this.name = attributes.name ? attributes.name.trim() : ""; 47333 this.fontInfo = null; 47334 this.xdc = null; 47335 } 47336} 47337class DuplexOption extends OptionObject { 47338 constructor(attributes) { 47339 super(CONFIG_NS_ID, "duplexOption", ["simplex", "duplexFlipLongEdge", "duplexFlipShortEdge"]); 47340 } 47341} 47342class DynamicRender extends OptionObject { 47343 constructor(attributes) { 47344 super(CONFIG_NS_ID, "dynamicRender", ["forbidden", "required"]); 47345 } 47346} 47347class Embed extends Option01 { 47348 constructor(attributes) { 47349 super(CONFIG_NS_ID, "embed"); 47350 } 47351} 47352class config_Encrypt extends Option01 { 47353 constructor(attributes) { 47354 super(CONFIG_NS_ID, "encrypt"); 47355 } 47356} 47357class config_Encryption extends XFAObject { 47358 constructor(attributes) { 47359 super(CONFIG_NS_ID, "encryption", true); 47360 this.encrypt = null; 47361 this.encryptionLevel = null; 47362 this.permissions = null; 47363 } 47364} 47365class EncryptionLevel extends OptionObject { 47366 constructor(attributes) { 47367 super(CONFIG_NS_ID, "encryptionLevel", ["40bit", "128bit"]); 47368 } 47369} 47370class Enforce extends StringObject { 47371 constructor(attributes) { 47372 super(CONFIG_NS_ID, "enforce"); 47373 } 47374} 47375class Equate extends XFAObject { 47376 constructor(attributes) { 47377 super(CONFIG_NS_ID, "equate"); 47378 this.force = getInteger({ 47379 data: attributes.force, 47380 defaultValue: 1, 47381 validate: n => n === 0 47382 }); 47383 this.from = attributes.from || ""; 47384 this.to = attributes.to || ""; 47385 } 47386} 47387class EquateRange extends XFAObject { 47388 constructor(attributes) { 47389 super(CONFIG_NS_ID, "equateRange"); 47390 this.from = attributes.from || ""; 47391 this.to = attributes.to || ""; 47392 this._unicodeRange = attributes.unicodeRange || ""; 47393 } 47394 get unicodeRange() { 47395 const ranges = []; 47396 const unicodeRegex = /U\+([0-9a-fA-F]+)/; 47397 const unicodeRange = this._unicodeRange; 47398 for (let range of unicodeRange.split(",").map(x => x.trim()).filter(
vendor: 1,241 bytes, lines 47398-47442
47398x => !!x)) { 47399 range = range.split("-", 2).map(x => { 47400 const found = x.match(unicodeRegex); 47401 if (!found) { 47402 return 0; 47403 } 47404 return parseInt(found[1], 16); 47405 }); 47406 if (range.length === 1) { 47407 range.push(range[0]); 47408 } 47409 ranges.push(range); 47410 } 47411 return shadow(this, "unicodeRange", ranges); 47412 } 47413} 47414class Exclude extends ContentObject { 47415 constructor(attributes) { 47416 super(CONFIG_NS_ID, "exclude"); 47417 } 47418 [$finalize]() { 47419 this[$content] = this[$content].trim().split(/\s+/).filter(x => x && ["calculate", "close", "enter", "exit", "initialize", "ready", "validate"].includes(x)); 47420 } 47421} 47422class ExcludeNS extends StringObject { 47423 constructor(attributes) { 47424 super(CONFIG_NS_ID, "excludeNS"); 47425 } 47426} 47427class FlipLabel extends OptionObject { 47428 constructor(attributes) { 47429 super(CONFIG_NS_ID, "flipLabel", ["usePrinterSetting", "on", "off"]); 47430 } 47431} 47432class config_FontInfo extends XFAObject { 47433 constructor(attributes) { 47434 super(CONFIG_NS_ID, "fontInfo", true); 47435 this.embed = null; 47436 this.map = null; 47437 this.subsetBelow = null; 47438 this.alwaysEmbed = new XFAObjectArray(); 47439 this.defaultTypeface = new XFAObjectArray(); 47440 this.neverEmbed = new XFAObjectArray(); 47441 } 47442}
vendor: 14,411 bytes, lines 47443-47991
47443class FormFieldFilling extends Option01 { 47444 constructor(attributes) { 47445 super(CONFIG_NS_ID, "formFieldFilling"); 47446 } 47447} 47448class GroupParent extends StringObject { 47449 constructor(attributes) { 47450 super(CONFIG_NS_ID, "groupParent"); 47451 } 47452} 47453class IfEmpty extends OptionObject { 47454 constructor(attributes) { 47455 super(CONFIG_NS_ID, "ifEmpty", ["dataValue", "dataGroup", "ignore", "remove"]); 47456 } 47457} 47458class IncludeXDPContent extends StringObject { 47459 constructor(attributes) { 47460 super(CONFIG_NS_ID, "includeXDPContent"); 47461 } 47462} 47463class IncrementalLoad extends OptionObject { 47464 constructor(attributes) { 47465 super(CONFIG_NS_ID, "incrementalLoad", ["none", "forwardOnly"]); 47466 } 47467} 47468class IncrementalMerge extends Option01 { 47469 constructor(attributes) { 47470 super(CONFIG_NS_ID, "incrementalMerge"); 47471 } 47472} 47473class Interactive extends Option01 { 47474 constructor(attributes) { 47475 super(CONFIG_NS_ID, "interactive"); 47476 } 47477} 47478class Jog extends OptionObject { 47479 constructor(attributes) { 47480 super(CONFIG_NS_ID, "jog", ["usePrinterSetting", "none", "pageSet"]); 47481 } 47482} 47483class LabelPrinter extends XFAObject { 47484 constructor(attributes) { 47485 super(CONFIG_NS_ID, "labelPrinter", true); 47486 this.name = getStringOption(attributes.name, ["zpl", "dpl", "ipl", "tcpl"]); 47487 this.batchOutput = null; 47488 this.flipLabel = null; 47489 this.fontInfo = null; 47490 this.xdc = null; 47491 } 47492} 47493class Layout extends OptionObject { 47494 constructor(attributes) { 47495 super(CONFIG_NS_ID, "layout", ["paginate", "panel"]); 47496 } 47497} 47498class Level extends IntegerObject { 47499 constructor(attributes) { 47500 super(CONFIG_NS_ID, "level", 0, n => n > 0); 47501 } 47502} 47503class Linearized extends Option01 { 47504 constructor(attributes) { 47505 super(CONFIG_NS_ID, "linearized"); 47506 } 47507} 47508class Locale extends StringObject { 47509 constructor(attributes) { 47510 super(CONFIG_NS_ID, "locale"); 47511 } 47512} 47513class LocaleSet extends StringObject { 47514 constructor(attributes) { 47515 super(CONFIG_NS_ID, "localeSet"); 47516 } 47517} 47518class Log extends XFAObject { 47519 constructor(attributes) { 47520 super(CONFIG_NS_ID, "log", true); 47521 this.mode = null; 47522 this.threshold = null; 47523 this.to = null; 47524 this.uri = null; 47525 } 47526} 47527class MapElement extends XFAObject { 47528 constructor(attributes) { 47529 super(CONFIG_NS_ID, "map", true); 47530 this.equate = new XFAObjectArray(); 47531 this.equateRange = new XFAObjectArray(); 47532 } 47533} 47534class MediumInfo extends XFAObject { 47535 constructor(attributes) { 47536 super(CONFIG_NS_ID, "mediumInfo", true); 47537 this.map = null; 47538 } 47539} 47540class config_Message extends XFAObject { 47541 constructor(attributes) { 47542 super(CONFIG_NS_ID, "message", true); 47543 this.msgId = null; 47544 this.severity = null; 47545 } 47546} 47547class Messaging extends XFAObject { 47548 constructor(attributes) { 47549 super(CONFIG_NS_ID, "messaging", true); 47550 this.message = new XFAObjectArray(); 47551 } 47552} 47553class Mode extends OptionObject { 47554 constructor(attributes) { 47555 super(CONFIG_NS_ID, "mode", ["append", "overwrite"]); 47556 } 47557} 47558class ModifyAnnots extends Option01 { 47559 constructor(attributes) { 47560 super(CONFIG_NS_ID, "modifyAnnots"); 47561 } 47562} 47563class MsgId extends IntegerObject { 47564 constructor(attributes) { 47565 super(CONFIG_NS_ID, "msgId", 1, n => n >= 1); 47566 } 47567} 47568class NameAttr extends StringObject { 47569 constructor(attributes) { 47570 super(CONFIG_NS_ID, "nameAttr"); 47571 } 47572} 47573class NeverEmbed extends ContentObject { 47574 constructor(attributes) { 47575 super(CONFIG_NS_ID, "neverEmbed"); 47576 } 47577} 47578class NumberOfCopies extends IntegerObject { 47579 constructor(attributes) { 47580 super(CONFIG_NS_ID, "numberOfCopies", null, n => n >= 2 && n <= 5); 47581 } 47582} 47583class OpenAction extends XFAObject { 47584 constructor(attributes) { 47585 super(CONFIG_NS_ID, "openAction", true); 47586 this.destination = null; 47587 } 47588} 47589class Output extends XFAObject { 47590 constructor(attributes) { 47591 super(CONFIG_NS_ID, "output", true); 47592 this.to = null; 47593 this.type = null; 47594 this.uri = null; 47595 } 47596} 47597class OutputBin extends StringObject { 47598 constructor(attributes) { 47599 super(CONFIG_NS_ID, "outputBin"); 47600 } 47601} 47602class OutputXSL extends XFAObject { 47603 constructor(attributes) { 47604 super(CONFIG_NS_ID, "outputXSL", true); 47605 this.uri = null; 47606 } 47607} 47608class Overprint extends OptionObject { 47609 constructor(attributes) { 47610 super(CONFIG_NS_ID, "overprint", ["none", "both", "draw", "field"]); 47611 } 47612} 47613class Packets extends StringObject { 47614 constructor(attributes) { 47615 super(CONFIG_NS_ID, "packets"); 47616 } 47617 [$finalize]() { 47618 if (this[$content] === "*") { 47619 return; 47620 } 47621 this[$content] = this[$content].trim().split(/\s+/).filter(x => ["config", "datasets", "template", "xfdf", "xslt"].includes(x)); 47622 } 47623} 47624class PageOffset extends XFAObject { 47625 constructor(attributes) { 47626 super(CONFIG_NS_ID, "pageOffset"); 47627 this.x = getInteger({ 47628 data: attributes.x, 47629 defaultValue: "useXDCSetting", 47630 validate: n => true 47631 }); 47632 this.y = getInteger({ 47633 data: attributes.y, 47634 defaultValue: "useXDCSetting", 47635 validate: n => true 47636 }); 47637 } 47638} 47639class PageRange extends StringObject { 47640 constructor(attributes) { 47641 super(CONFIG_NS_ID, "pageRange"); 47642 } 47643 [$finalize]() { 47644 const numbers = this[$content].trim().split(/\s+/).map(x => parseInt(x, 10)); 47645 const ranges = []; 47646 for (let i = 0, ii = numbers.length; i < ii; i += 2) { 47647 ranges.push(numbers.slice(i, i + 2)); 47648 } 47649 this[$content] = ranges; 47650 } 47651} 47652class Pagination extends OptionObject { 47653 constructor(attributes) { 47654 super(CONFIG_NS_ID, "pagination", ["simplex", "duplexShortEdge", "duplexLongEdge"]); 47655 } 47656} 47657class PaginationOverride extends OptionObject { 47658 constructor(attributes) { 47659 super(CONFIG_NS_ID, "paginationOverride", ["none", "forceDuplex", "forceDuplexLongEdge", "forceDuplexShortEdge", "forceSimplex"]); 47660 } 47661} 47662class Part extends IntegerObject { 47663 constructor(attributes) { 47664 super(CONFIG_NS_ID, "part", 1, n => false); 47665 } 47666} 47667class Pcl extends XFAObject { 47668 constructor(attributes) { 47669 super(CONFIG_NS_ID, "pcl", true); 47670 this.name = attributes.name || ""; 47671 this.batchOutput = null; 47672 this.fontInfo = null; 47673 this.jog = null; 47674 this.mediumInfo = null; 47675 this.outputBin = null; 47676 this.pageOffset = null; 47677 this.staple = null; 47678 this.xdc = null; 47679 } 47680} 47681class Pdf extends XFAObject { 47682 constructor(attributes) { 47683 super(CONFIG_NS_ID, "pdf", true); 47684 this.name = attributes.name || ""; 47685 this.adobeExtensionLevel = null; 47686 this.batchOutput = null; 47687 this.compression = null; 47688 this.creator = null; 47689 this.encryption = null; 47690 this.fontInfo = null; 47691 this.interactive = null; 47692 this.linearized = null; 47693 this.openAction = null; 47694 this.pdfa = null; 47695 this.producer = null; 47696 this.renderPolicy = null; 47697 this.scriptModel = null; 47698 this.silentPrint = null; 47699 this.submitFormat = null; 47700 this.tagged = null; 47701 this.version = null; 47702 this.viewerPreferences = null; 47703 this.xdc = null; 47704 } 47705} 47706class Pdfa extends XFAObject { 47707 constructor(attributes) { 47708 super(CONFIG_NS_ID, "pdfa", true); 47709 this.amd = null; 47710 this.conformance = null; 47711 this.includeXDPContent = null; 47712 this.part = null; 47713 } 47714} 47715class Permissions extends XFAObject { 47716 constructor(attributes) { 47717 super(CONFIG_NS_ID, "permissions", true); 47718 this.accessibleContent = null; 47719 this.change = null; 47720 this.contentCopy = null; 47721 this.documentAssembly = null; 47722 this.formFieldFilling = null; 47723 this.modifyAnnots = null; 47724 this.plaintextMetadata = null; 47725 this.print = null; 47726 this.printHighQuality = null; 47727 } 47728} 47729class PickTrayByPDFSize extends Option01 { 47730 constructor(attributes) { 47731 super(CONFIG_NS_ID, "pickTrayByPDFSize"); 47732 } 47733} 47734class config_Picture extends StringObject { 47735 constructor(attributes) { 47736 super(CONFIG_NS_ID, "picture"); 47737 } 47738} 47739class PlaintextMetadata extends Option01 { 47740 constructor(attributes) { 47741 super(CONFIG_NS_ID, "plaintextMetadata"); 47742 } 47743} 47744class Presence extends OptionObject { 47745 constructor(attributes) { 47746 super(CONFIG_NS_ID, "presence", ["preserve", "dissolve", "dissolveStructure", "ignore", "remove"]); 47747 } 47748} 47749class Present extends XFAObject { 47750 constructor(attributes) { 47751 super(CONFIG_NS_ID, "present", true); 47752 this.behaviorOverride = null; 47753 this.cache = null; 47754 this.common = null; 47755 this.copies = null; 47756 this.destination = null; 47757 this.incrementalMerge = null; 47758 this.layout = null; 47759 this.output = null; 47760 this.overprint = null; 47761 this.pagination = null; 47762 this.paginationOverride = null; 47763 this.script = null; 47764 this.validate = null; 47765 this.xdp = null; 47766 this.driver = new XFAObjectArray(); 47767 this.labelPrinter = new XFAObjectArray(); 47768 this.pcl = new XFAObjectArray(); 47769 this.pdf = new XFAObjectArray(); 47770 this.ps = new XFAObjectArray(); 47771 this.submitUrl = new XFAObjectArray(); 47772 this.webClient = new XFAObjectArray(); 47773 this.zpl = new XFAObjectArray(); 47774 } 47775} 47776class Print extends Option01 { 47777 constructor(attributes) { 47778 super(CONFIG_NS_ID, "print"); 47779 } 47780} 47781class PrintHighQuality extends Option01 { 47782 constructor(attributes) { 47783 super(CONFIG_NS_ID, "printHighQuality"); 47784 } 47785} 47786class PrintScaling extends OptionObject { 47787 constructor(attributes) { 47788 super(CONFIG_NS_ID, "printScaling", ["appdefault", "noScaling"]); 47789 } 47790} 47791class PrinterName extends StringObject { 47792 constructor(attributes) { 47793 super(CONFIG_NS_ID, "printerName"); 47794 } 47795} 47796class Producer extends StringObject { 47797 constructor(attributes) { 47798 super(CONFIG_NS_ID, "producer"); 47799 } 47800} 47801class Ps extends XFAObject { 47802 constructor(attributes) { 47803 super(CONFIG_NS_ID, "ps", true); 47804 this.name = attributes.name || ""; 47805 this.batchOutput = null; 47806 this.fontInfo = null; 47807 this.jog = null; 47808 this.mediumInfo = null; 47809 this.outputBin = null; 47810 this.staple = null; 47811 this.xdc = null; 47812 } 47813} 47814class Range extends ContentObject { 47815 constructor(attributes) { 47816 super(CONFIG_NS_ID, "range"); 47817 } 47818 [$finalize]() { 47819 this[$content] = this[$content].trim().split(/\s*,\s*/, 2).map(range => range.split("-").map(x => parseInt(x.trim(), 10))).filter(range => range.every(x => !isNaN(x))).map(range => { 47820 if (range.length === 1) { 47821 range.push(range[0]); 47822 } 47823 return range; 47824 }); 47825 } 47826} 47827class Record extends ContentObject { 47828 constructor(attributes) { 47829 super(CONFIG_NS_ID, "record"); 47830 } 47831 [$finalize]() { 47832 this[$content] = this[$content].trim(); 47833 const n = parseInt(this[$content], 10); 47834 if (!isNaN(n) && n >= 0) { 47835 this[$content] = n; 47836 } 47837 } 47838} 47839class Relevant extends ContentObject { 47840 constructor(attributes) { 47841 super(CONFIG_NS_ID, "relevant"); 47842 } 47843 [$finalize]() { 47844 this[$content] = this[$content].trim().split(/\s+/); 47845 } 47846} 47847class Rename extends ContentObject { 47848 constructor(attributes) { 47849 super(CONFIG_NS_ID, "rename"); 47850 } 47851 [$finalize]() { 47852 this[$content] = this[$content].trim(); 47853 if (this[$content].toLowerCase().startsWith("xml") || new RegExp("[\\p{L}_][\\p{L}\\d._\\p{M}-]*", "u").test(this[$content])) { 47854 warn("XFA - Rename: invalid XFA name"); 47855 } 47856 } 47857} 47858class RenderPolicy extends OptionObject { 47859 constructor(attributes) { 47860 super(CONFIG_NS_ID, "renderPolicy", ["server", "client"]); 47861 } 47862} 47863class RunScripts extends OptionObject { 47864 constructor(attributes) { 47865 super(CONFIG_NS_ID, "runScripts", ["both", "client", "none", "server"]); 47866 } 47867} 47868class config_Script extends XFAObject { 47869 constructor(attributes) { 47870 super(CONFIG_NS_ID, "script", true); 47871 this.currentPage = null; 47872 this.exclude = null; 47873 this.runScripts = null; 47874 } 47875} 47876class ScriptModel extends OptionObject { 47877 constructor(attributes) { 47878 super(CONFIG_NS_ID, "scriptModel", ["XFA", "none"]); 47879 } 47880} 47881class Severity extends OptionObject { 47882 constructor(attributes) { 47883 super(CONFIG_NS_ID, "severity", ["ignore", "error", "information", "trace", "warning"]); 47884 } 47885} 47886class SilentPrint extends XFAObject { 47887 constructor(attributes) { 47888 super(CONFIG_NS_ID, "silentPrint", true); 47889 this.addSilentPrint = null; 47890 this.printerName = null; 47891 } 47892} 47893class Staple extends XFAObject { 47894 constructor(attributes) { 47895 super(CONFIG_NS_ID, "staple"); 47896 this.mode = getStringOption(attributes.mode, ["usePrinterSetting", "on", "off"]); 47897 } 47898} 47899class StartNode extends StringObject { 47900 constructor(attributes) { 47901 super(CONFIG_NS_ID, "startNode"); 47902 } 47903} 47904class StartPage extends IntegerObject { 47905 constructor(attributes) { 47906 super(CONFIG_NS_ID, "startPage", 0, n => true); 47907 } 47908} 47909class SubmitFormat extends OptionObject { 47910 constructor(attributes) { 47911 super(CONFIG_NS_ID, "submitFormat", ["html", "delegate", "fdf", "xml", "pdf"]); 47912 } 47913} 47914class SubmitUrl extends StringObject { 47915 constructor(attributes) { 47916 super(CONFIG_NS_ID, "submitUrl"); 47917 } 47918} 47919class SubsetBelow extends IntegerObject { 47920 constructor(attributes) { 47921 super(CONFIG_NS_ID, "subsetBelow", 100, n => n >= 0 && n <= 100); 47922 } 47923} 47924class SuppressBanner extends Option01 { 47925 constructor(attributes) { 47926 super(CONFIG_NS_ID, "suppressBanner"); 47927 } 47928} 47929class Tagged extends Option01 { 47930 constructor(attributes) { 47931 super(CONFIG_NS_ID, "tagged"); 47932 } 47933} 47934class config_Template extends XFAObject { 47935 constructor(attributes) { 47936 super(CONFIG_NS_ID, "template", true); 47937 this.base = null; 47938 this.relevant = null; 47939 this.startPage = null; 47940 this.uri = null; 47941 this.xsl = null; 47942 } 47943} 47944class Threshold extends OptionObject { 47945 constructor(attributes) { 47946 super(CONFIG_NS_ID, "threshold", ["trace", "error", "information", "warning"]); 47947 } 47948} 47949class To extends OptionObject { 47950 constructor(attributes) { 47951 super(CONFIG_NS_ID, "to", ["null", "memory", "stderr", "stdout", "system", "uri"]); 47952 } 47953} 47954class TemplateCache extends XFAObject { 47955 constructor(attributes) { 47956 super(CONFIG_NS_ID, "templateCache"); 47957 this.maxEntries = getInteger({ 47958 data: attributes.maxEntries, 47959 defaultValue: 5, 47960 validate: n => n >= 0 47961 }); 47962 } 47963} 47964class Trace extends XFAObject { 47965 constructor(attributes) { 47966 super(CONFIG_NS_ID, "trace", true); 47967 this.area = new XFAObjectArray(); 47968 } 47969} 47970class Transform extends XFAObject { 47971 constructor(attributes) { 47972 super(CONFIG_NS_ID, "transform", true); 47973 this.groupParent = null; 47974 this.ifEmpty = null; 47975 this.nameAttr = null; 47976 this.picture = null; 47977 this.presence = null; 47978 this.rename = null; 47979 this.whitespace = null; 47980 } 47981} 47982class Type extends OptionObject { 47983 constructor(attributes) { 47984 super(CONFIG_NS_ID, "type", ["none", "ascii85", "asciiHex", "ccittfax", "flate", "lzw", "runLength", "native", "xdp", "mergedXDP"]); 47985 } 47986} 47987class Uri extends StringObject { 47988 constructor(attributes) { 47989 super(CONFIG_NS_ID, "uri"); 47990 } 47991}
vendor: 3,211 bytes, lines 47992-48098
47992class config_Validate extends OptionObject { 47993 constructor(attributes) { 47994 super(CONFIG_NS_ID, "validate", ["preSubmit", "prePrint", "preExecute", "preSave"]); 47995 } 47996} 47997class ValidateApprovalSignatures extends ContentObject { 47998 constructor(attributes) { 47999 super(CONFIG_NS_ID, "validateApprovalSignatures"); 48000 } 48001 [$finalize]() { 48002 this[$content] = this[$content].trim().split(/\s+/).filter(x => ["docReady", "postSign"].includes(x)); 48003 } 48004} 48005class ValidationMessaging extends OptionObject { 48006 constructor(attributes) { 48007 super(CONFIG_NS_ID, "validationMessaging", ["allMessagesIndividually", "allMessagesTogether", "firstMessageOnly", "noMessages"]); 48008 } 48009} 48010class Version extends OptionObject { 48011 constructor(attributes) { 48012 super(CONFIG_NS_ID, "version", ["1.7", "1.6", "1.5", "1.4", "1.3", "1.2"]); 48013 } 48014} 48015class VersionControl extends XFAObject { 48016 constructor(attributes) { 48017 super(CONFIG_NS_ID, "VersionControl"); 48018 this.outputBelow = getStringOption(attributes.outputBelow, ["warn", "error", "update"]); 48019 this.sourceAbove = getStringOption(attributes.sourceAbove, ["warn", "error"]); 48020 this.sourceBelow = getStringOption(attributes.sourceBelow, ["update", "maintain"]); 48021 } 48022} 48023class ViewerPreferences extends XFAObject { 48024 constructor(attributes) { 48025 super(CONFIG_NS_ID, "viewerPreferences", true); 48026 this.ADBE_JSConsole = null; 48027 this.ADBE_JSDebugger = null; 48028 this.addViewerPreferences = null; 48029 this.duplexOption = null; 48030 this.enforce = null; 48031 this.numberOfCopies = null; 48032 this.pageRange = null; 48033 this.pickTrayByPDFSize = null; 48034 this.printScaling = null; 48035 } 48036} 48037class WebClient extends XFAObject { 48038 constructor(attributes) { 48039 super(CONFIG_NS_ID, "webClient", true); 48040 this.name = attributes.name ? attributes.name.trim() : ""; 48041 this.fontInfo = null; 48042 this.xdc = null; 48043 } 48044} 48045class Whitespace extends OptionObject { 48046 constructor(attributes) { 48047 super(CONFIG_NS_ID, "whitespace", ["preserve", "ltrim", "normalize", "rtrim", "trim"]); 48048 } 48049} 48050class Window extends ContentObject { 48051 constructor(attributes) { 48052 super(CONFIG_NS_ID, "window"); 48053 } 48054 [$finalize]() { 48055 const pair = this[$content].trim().split(/\s*,\s*/, 2).map(x => parseInt(x, 10)); 48056 if (pair.some(x => isNaN(x))) { 48057 this[$content] = [0, 0]; 48058 return; 48059 } 48060 if (pair.length === 1) { 48061 pair.push(pair[0]); 48062 } 48063 this[$content] = pair; 48064 } 48065} 48066class Xdc extends XFAObject { 48067 constructor(attributes) { 48068 super(CONFIG_NS_ID, "xdc", true); 48069 this.uri = new XFAObjectArray(); 48070 this.xsl = new XFAObjectArray(); 48071 } 48072} 48073class Xdp extends XFAObject { 48074 constructor(attributes) { 48075 super(CONFIG_NS_ID, "xdp", true); 48076 this.packets = null; 48077 } 48078} 48079class Xsl extends XFAObject { 48080 constructor(attributes) { 48081 super(CONFIG_NS_ID, "xsl", true); 48082 this.debug = null; 48083 this.uri = null; 48084 } 48085} 48086class Zpl extends XFAObject { 48087 constructor(attributes) { 48088 super(CONFIG_NS_ID, "zpl", true); 48089 this.name = attributes.name ? attributes.name.trim() : ""; 48090 this.batchOutput = null; 48091 this.flipLabel = null; 48092 this.fontInfo = null; 48093 this.xdc = null; 48094 } 48095} 48096class ConfigNamespace { 48097 static [$buildXFAObject](name, attributes) { 48098 if (ConfigNamespace.hasOwnProperty(
vendor: 8,421 bytes, lines 48098-48481
48098name)) { 48099 return ConfigNamespace[name](attributes); 48100 } 48101 return undefined; 48102 } 48103 static acrobat(attrs) { 48104 return new Acrobat(attrs); 48105 } 48106 static acrobat7(attrs) { 48107 return new Acrobat7(attrs); 48108 } 48109 static ADBE_JSConsole(attrs) { 48110 return new ADBE_JSConsole(attrs); 48111 } 48112 static ADBE_JSDebugger(attrs) { 48113 return new ADBE_JSDebugger(attrs); 48114 } 48115 static addSilentPrint(attrs) { 48116 return new AddSilentPrint(attrs); 48117 } 48118 static addViewerPreferences(attrs) { 48119 return new AddViewerPreferences(attrs); 48120 } 48121 static adjustData(attrs) { 48122 return new AdjustData(attrs); 48123 } 48124 static adobeExtensionLevel(attrs) { 48125 return new AdobeExtensionLevel(attrs); 48126 } 48127 static agent(attrs) { 48128 return new Agent(attrs); 48129 } 48130 static alwaysEmbed(attrs) { 48131 return new AlwaysEmbed(attrs); 48132 } 48133 static amd(attrs) { 48134 return new Amd(attrs); 48135 } 48136 static area(attrs) { 48137 return new config_Area(attrs); 48138 } 48139 static attributes(attrs) { 48140 return new Attributes(attrs); 48141 } 48142 static autoSave(attrs) { 48143 return new AutoSave(attrs); 48144 } 48145 static base(attrs) { 48146 return new Base(attrs); 48147 } 48148 static batchOutput(attrs) { 48149 return new BatchOutput(attrs); 48150 } 48151 static behaviorOverride(attrs) { 48152 return new BehaviorOverride(attrs); 48153 } 48154 static cache(attrs) { 48155 return new Cache(attrs); 48156 } 48157 static change(attrs) { 48158 return new Change(attrs); 48159 } 48160 static common(attrs) { 48161 return new Common(attrs); 48162 } 48163 static compress(attrs) { 48164 return new Compress(attrs); 48165 } 48166 static compressLogicalStructure(attrs) { 48167 return new CompressLogicalStructure(attrs); 48168 } 48169 static compressObjectStream(attrs) { 48170 return new CompressObjectStream(attrs); 48171 } 48172 static compression(attrs) { 48173 return new Compression(attrs); 48174 } 48175 static config(attrs) { 48176 return new Config(attrs); 48177 } 48178 static conformance(attrs) { 48179 return new Conformance(attrs); 48180 } 48181 static contentCopy(attrs) { 48182 return new ContentCopy(attrs); 48183 } 48184 static copies(attrs) { 48185 return new Copies(attrs); 48186 } 48187 static creator(attrs) { 48188 return new Creator(attrs); 48189 } 48190 static currentPage(attrs) { 48191 return new CurrentPage(attrs); 48192 } 48193 static data(attrs) { 48194 return new Data(attrs); 48195 } 48196 static debug(attrs) { 48197 return new Debug(attrs); 48198 } 48199 static defaultTypeface(attrs) { 48200 return new DefaultTypeface(attrs); 48201 } 48202 static destination(attrs) { 48203 return new Destination(attrs); 48204 } 48205 static documentAssembly(attrs) { 48206 return new DocumentAssembly(attrs); 48207 } 48208 static driver(attrs) { 48209 return new Driver(attrs); 48210 } 48211 static duplexOption(attrs) { 48212 return new DuplexOption(attrs); 48213 } 48214 static dynamicRender(attrs) { 48215 return new DynamicRender(attrs); 48216 } 48217 static embed(attrs) { 48218 return new Embed(attrs); 48219 } 48220 static encrypt(attrs) { 48221 return new config_Encrypt(attrs); 48222 } 48223 static encryption(attrs) { 48224 return new config_Encryption(attrs); 48225 } 48226 static encryptionLevel(attrs) { 48227 return new EncryptionLevel(attrs); 48228 } 48229 static enforce(attrs) { 48230 return new Enforce(attrs); 48231 } 48232 static equate(attrs) { 48233 return new Equate(attrs); 48234 } 48235 static equateRange(attrs) { 48236 return new EquateRange(attrs); 48237 } 48238 static exclude(attrs) { 48239 return new Exclude(attrs); 48240 } 48241 static excludeNS(attrs) { 48242 return new ExcludeNS(attrs); 48243 } 48244 static flipLabel(attrs) { 48245 return new FlipLabel(attrs); 48246 } 48247 static fontInfo(attrs) { 48248 return new config_FontInfo(attrs); 48249 } 48250 static formFieldFilling(attrs) { 48251 return new FormFieldFilling(attrs); 48252 } 48253 static groupParent(attrs) { 48254 return new GroupParent(attrs); 48255 } 48256 static ifEmpty(attrs) { 48257 return new IfEmpty(attrs); 48258 } 48259 static includeXDPContent(attrs) { 48260 return new IncludeXDPContent(attrs); 48261 } 48262 static incrementalLoad(attrs) { 48263 return new IncrementalLoad(attrs); 48264 } 48265 static incrementalMerge(attrs) { 48266 return new IncrementalMerge(attrs); 48267 } 48268 static interactive(attrs) { 48269 return new Interactive(attrs); 48270 } 48271 static jog(attrs) { 48272 return new Jog(attrs); 48273 } 48274 static labelPrinter(attrs) { 48275 return new LabelPrinter(attrs); 48276 } 48277 static layout(attrs) { 48278 return new Layout(attrs); 48279 } 48280 static level(attrs) { 48281 return new Level(attrs); 48282 } 48283 static linearized(attrs) { 48284 return new Linearized(attrs); 48285 } 48286 static locale(attrs) { 48287 return new Locale(attrs); 48288 } 48289 static localeSet(attrs) { 48290 return new LocaleSet(attrs); 48291 } 48292 static log(attrs) { 48293 return new Log(attrs); 48294 } 48295 static map(attrs) { 48296 return new MapElement(attrs); 48297 } 48298 static mediumInfo(attrs) { 48299 return new MediumInfo(attrs); 48300 } 48301 static message(attrs) { 48302 return new config_Message(attrs); 48303 } 48304 static messaging(attrs) { 48305 return new Messaging(attrs); 48306 } 48307 static mode(attrs) { 48308 return new Mode(attrs); 48309 } 48310 static modifyAnnots(attrs) { 48311 return new ModifyAnnots(attrs); 48312 } 48313 static msgId(attrs) { 48314 return new MsgId(attrs); 48315 } 48316 static nameAttr(attrs) { 48317 return new NameAttr(attrs); 48318 } 48319 static neverEmbed(attrs) { 48320 return new NeverEmbed(attrs); 48321 } 48322 static numberOfCopies(attrs) { 48323 return new NumberOfCopies(attrs); 48324 } 48325 static openAction(attrs) { 48326 return new OpenAction(attrs); 48327 } 48328 static output(attrs) { 48329 return new Output(attrs); 48330 } 48331 static outputBin(attrs) { 48332 return new OutputBin(attrs); 48333 } 48334 static outputXSL(attrs) { 48335 return new OutputXSL(attrs); 48336 } 48337 static overprint(attrs) { 48338 return new Overprint(attrs); 48339 } 48340 static packets(attrs) { 48341 return new Packets(attrs); 48342 } 48343 static pageOffset(attrs) { 48344 return new PageOffset(attrs); 48345 } 48346 static pageRange(attrs) { 48347 return new PageRange(attrs); 48348 } 48349 static pagination(attrs) { 48350 return new Pagination(attrs); 48351 } 48352 static paginationOverride(attrs) { 48353 return new PaginationOverride(attrs); 48354 } 48355 static part(attrs) { 48356 return new Part(attrs); 48357 } 48358 static pcl(attrs) { 48359 return new Pcl(attrs); 48360 } 48361 static pdf(attrs) { 48362 return new Pdf(attrs); 48363 } 48364 static pdfa(attrs) { 48365 return new Pdfa(attrs); 48366 } 48367 static permissions(attrs) { 48368 return new Permissions(attrs); 48369 } 48370 static pickTrayByPDFSize(attrs) { 48371 return new PickTrayByPDFSize(attrs); 48372 } 48373 static picture(attrs) { 48374 return new config_Picture(attrs); 48375 } 48376 static plaintextMetadata(attrs) { 48377 return new PlaintextMetadata(attrs); 48378 } 48379 static presence(attrs) { 48380 return new Presence(attrs); 48381 } 48382 static present(attrs) { 48383 return new Present(attrs); 48384 } 48385 static print(attrs) { 48386 return new Print(attrs); 48387 } 48388 static printHighQuality(attrs) { 48389 return new PrintHighQuality(attrs); 48390 } 48391 static printScaling(attrs) { 48392 return new PrintScaling(attrs); 48393 } 48394 static printerName(attrs) { 48395 return new PrinterName(attrs); 48396 } 48397 static producer(attrs) { 48398 return new Producer(attrs); 48399 } 48400 static ps(attrs) { 48401 return new Ps(attrs); 48402 } 48403 static range(attrs) { 48404 return new Range(attrs); 48405 } 48406 static record(attrs) { 48407 return new Record(attrs); 48408 } 48409 static relevant(attrs) { 48410 return new Relevant(attrs); 48411 } 48412 static rename(attrs) { 48413 return new Rename(attrs); 48414 } 48415 static renderPolicy(attrs) { 48416 return new RenderPolicy(attrs); 48417 } 48418 static runScripts(attrs) { 48419 return new RunScripts(attrs); 48420 } 48421 static script(attrs) { 48422 return new config_Script(attrs); 48423 } 48424 static scriptModel(attrs) { 48425 return new ScriptModel(attrs); 48426 } 48427 static severity(attrs) { 48428 return new Severity(attrs); 48429 } 48430 static silentPrint(attrs) { 48431 return new SilentPrint(attrs); 48432 } 48433 static staple(attrs) { 48434 return new Staple(attrs); 48435 } 48436 static startNode(attrs) { 48437 return new StartNode(attrs); 48438 } 48439 static startPage(attrs) { 48440 return new StartPage(attrs); 48441 } 48442 static submitFormat(attrs) { 48443 return new SubmitFormat(attrs); 48444 } 48445 static submitUrl(attrs) { 48446 return new SubmitUrl(attrs); 48447 } 48448 static subsetBelow(attrs) { 48449 return new SubsetBelow(attrs); 48450 } 48451 static suppressBanner(attrs) { 48452 return new SuppressBanner(attrs); 48453 } 48454 static tagged(attrs) { 48455 return new Tagged(attrs); 48456 } 48457 static template(attrs) { 48458 return new config_Template(attrs); 48459 } 48460 static templateCache(attrs) { 48461 return new TemplateCache(attrs); 48462 } 48463 static threshold(attrs) { 48464 return new Threshold(attrs); 48465 } 48466 static to(attrs) { 48467 return new To(attrs); 48468 } 48469 static trace(attrs) { 48470 return new Trace(attrs); 48471 } 48472 static transform(attrs) { 48473 return new Transform(attrs); 48474 } 48475 static type(attrs) { 48476 return new Type(attrs); 48477 } 48478 static uri(attrs) { 48479 return new Uri(attrs); 48480 } 48481 static validate(attrs) {
vendor: 15,023 bytes, lines 48482-49054
48482 return new config_Validate(attrs); 48483 } 48484 static validateApprovalSignatures(attrs) { 48485 return new ValidateApprovalSignatures(attrs); 48486 } 48487 static validationMessaging(attrs) { 48488 return new ValidationMessaging(attrs); 48489 } 48490 static version(attrs) { 48491 return new Version(attrs); 48492 } 48493 static versionControl(attrs) { 48494 return new VersionControl(attrs); 48495 } 48496 static viewerPreferences(attrs) { 48497 return new ViewerPreferences(attrs); 48498 } 48499 static webClient(attrs) { 48500 return new WebClient(attrs); 48501 } 48502 static whitespace(attrs) { 48503 return new Whitespace(attrs); 48504 } 48505 static window(attrs) { 48506 return new Window(attrs); 48507 } 48508 static xdc(attrs) { 48509 return new Xdc(attrs); 48510 } 48511 static xdp(attrs) { 48512 return new Xdp(attrs); 48513 } 48514 static xsl(attrs) { 48515 return new Xsl(attrs); 48516 } 48517 static zpl(attrs) { 48518 return new Zpl(attrs); 48519 } 48520} 48521 48522;// ./src/core/xfa/connection_set.js 48523 48524 48525const CONNECTION_SET_NS_ID = NamespaceIds.connectionSet.id; 48526class ConnectionSet extends XFAObject { 48527 constructor(attributes) { 48528 super(CONNECTION_SET_NS_ID, "connectionSet", true); 48529 this.wsdlConnection = new XFAObjectArray(); 48530 this.xmlConnection = new XFAObjectArray(); 48531 this.xsdConnection = new XFAObjectArray(); 48532 } 48533} 48534class EffectiveInputPolicy extends XFAObject { 48535 constructor(attributes) { 48536 super(CONNECTION_SET_NS_ID, "effectiveInputPolicy"); 48537 this.id = attributes.id || ""; 48538 this.name = attributes.name || ""; 48539 this.use = attributes.use || ""; 48540 this.usehref = attributes.usehref || ""; 48541 } 48542} 48543class EffectiveOutputPolicy extends XFAObject { 48544 constructor(attributes) { 48545 super(CONNECTION_SET_NS_ID, "effectiveOutputPolicy"); 48546 this.id = attributes.id || ""; 48547 this.name = attributes.name || ""; 48548 this.use = attributes.use || ""; 48549 this.usehref = attributes.usehref || ""; 48550 } 48551} 48552class Operation extends StringObject { 48553 constructor(attributes) { 48554 super(CONNECTION_SET_NS_ID, "operation"); 48555 this.id = attributes.id || ""; 48556 this.input = attributes.input || ""; 48557 this.name = attributes.name || ""; 48558 this.output = attributes.output || ""; 48559 this.use = attributes.use || ""; 48560 this.usehref = attributes.usehref || ""; 48561 } 48562} 48563class RootElement extends StringObject { 48564 constructor(attributes) { 48565 super(CONNECTION_SET_NS_ID, "rootElement"); 48566 this.id = attributes.id || ""; 48567 this.name = attributes.name || ""; 48568 this.use = attributes.use || ""; 48569 this.usehref = attributes.usehref || ""; 48570 } 48571} 48572class SoapAction extends StringObject { 48573 constructor(attributes) { 48574 super(CONNECTION_SET_NS_ID, "soapAction"); 48575 this.id = attributes.id || ""; 48576 this.name = attributes.name || ""; 48577 this.use = attributes.use || ""; 48578 this.usehref = attributes.usehref || ""; 48579 } 48580} 48581class SoapAddress extends StringObject { 48582 constructor(attributes) { 48583 super(CONNECTION_SET_NS_ID, "soapAddress"); 48584 this.id = attributes.id || ""; 48585 this.name = attributes.name || ""; 48586 this.use = attributes.use || ""; 48587 this.usehref = attributes.usehref || ""; 48588 } 48589} 48590class connection_set_Uri extends StringObject { 48591 constructor(attributes) { 48592 super(CONNECTION_SET_NS_ID, "uri"); 48593 this.id = attributes.id || ""; 48594 this.name = attributes.name || ""; 48595 this.use = attributes.use || ""; 48596 this.usehref = attributes.usehref || ""; 48597 } 48598} 48599class WsdlAddress extends StringObject { 48600 constructor(attributes) { 48601 super(CONNECTION_SET_NS_ID, "wsdlAddress"); 48602 this.id = attributes.id || ""; 48603 this.name = attributes.name || ""; 48604 this.use = attributes.use || ""; 48605 this.usehref = attributes.usehref || ""; 48606 } 48607} 48608class WsdlConnection extends XFAObject { 48609 constructor(attributes) { 48610 super(CONNECTION_SET_NS_ID, "wsdlConnection", true); 48611 this.dataDescription = attributes.dataDescription || ""; 48612 this.name = attributes.name || ""; 48613 this.effectiveInputPolicy = null; 48614 this.effectiveOutputPolicy = null; 48615 this.operation = null; 48616 this.soapAction = null; 48617 this.soapAddress = null; 48618 this.wsdlAddress = null; 48619 } 48620} 48621class XmlConnection extends XFAObject { 48622 constructor(attributes) { 48623 super(CONNECTION_SET_NS_ID, "xmlConnection", true); 48624 this.dataDescription = attributes.dataDescription || ""; 48625 this.name = attributes.name || ""; 48626 this.uri = null; 48627 } 48628} 48629class XsdConnection extends XFAObject { 48630 constructor(attributes) { 48631 super(CONNECTION_SET_NS_ID, "xsdConnection", true); 48632 this.dataDescription = attributes.dataDescription || ""; 48633 this.name = attributes.name || ""; 48634 this.rootElement = null; 48635 this.uri = null; 48636 } 48637} 48638class ConnectionSetNamespace { 48639 static [$buildXFAObject](name, attributes) { 48640 if (ConnectionSetNamespace.hasOwnProperty(name)) { 48641 return ConnectionSetNamespace[name](attributes); 48642 } 48643 return undefined; 48644 } 48645 static connectionSet(attrs) { 48646 return new ConnectionSet(attrs); 48647 } 48648 static effectiveInputPolicy(attrs) { 48649 return new EffectiveInputPolicy(attrs); 48650 } 48651 static effectiveOutputPolicy(attrs) { 48652 return new EffectiveOutputPolicy(attrs); 48653 } 48654 static operation(attrs) { 48655 return new Operation(attrs); 48656 } 48657 static rootElement(attrs) { 48658 return new RootElement(attrs); 48659 } 48660 static soapAction(attrs) { 48661 return new SoapAction(attrs); 48662 } 48663 static soapAddress(attrs) { 48664 return new SoapAddress(attrs); 48665 } 48666 static uri(attrs) { 48667 return new connection_set_Uri(attrs); 48668 } 48669 static wsdlAddress(attrs) { 48670 return new WsdlAddress(attrs); 48671 } 48672 static wsdlConnection(attrs) { 48673 return new WsdlConnection(attrs); 48674 } 48675 static xmlConnection(attrs) { 48676 return new XmlConnection(attrs); 48677 } 48678 static xsdConnection(attrs) { 48679 return new XsdConnection(attrs); 48680 } 48681} 48682 48683;// ./src/core/xfa/datasets.js 48684 48685 48686 48687const DATASETS_NS_ID = NamespaceIds.datasets.id; 48688class datasets_Data extends XmlObject { 48689 constructor(attributes) { 48690 super(DATASETS_NS_ID, "data", attributes); 48691 } 48692 [$isNsAgnostic]() { 48693 return true; 48694 } 48695} 48696class Datasets extends XFAObject { 48697 constructor(attributes) { 48698 super(DATASETS_NS_ID, "datasets", true); 48699 this.data = null; 48700 this.Signature = null; 48701 } 48702 [$onChild](child) { 48703 const name = child[$nodeName]; 48704 if (name === "data" && child[$namespaceId] === DATASETS_NS_ID || name === "Signature" && child[$namespaceId] === NamespaceIds.signature.id) { 48705 this[name] = child; 48706 } 48707 this[$appendChild](child); 48708 } 48709} 48710class DatasetsNamespace { 48711 static [$buildXFAObject](name, attributes) { 48712 if (DatasetsNamespace.hasOwnProperty(name)) { 48713 return DatasetsNamespace[name](attributes); 48714 } 48715 return undefined; 48716 } 48717 static datasets(attributes) { 48718 return new Datasets(attributes); 48719 } 48720 static data(attributes) { 48721 return new datasets_Data(attributes); 48722 } 48723} 48724 48725;// ./src/core/xfa/locale_set.js 48726 48727 48728 48729const LOCALE_SET_NS_ID = NamespaceIds.localeSet.id; 48730class CalendarSymbols extends XFAObject { 48731 constructor(attributes) { 48732 super(LOCALE_SET_NS_ID, "calendarSymbols", true); 48733 this.name = "gregorian"; 48734 this.dayNames = new XFAObjectArray(2); 48735 this.eraNames = null; 48736 this.meridiemNames = null; 48737 this.monthNames = new XFAObjectArray(2); 48738 } 48739} 48740class CurrencySymbol extends StringObject { 48741 constructor(attributes) { 48742 super(LOCALE_SET_NS_ID, "currencySymbol"); 48743 this.name = getStringOption(attributes.name, ["symbol", "isoname", "decimal"]); 48744 } 48745} 48746class CurrencySymbols extends XFAObject { 48747 constructor(attributes) { 48748 super(LOCALE_SET_NS_ID, "currencySymbols", true); 48749 this.currencySymbol = new XFAObjectArray(3); 48750 } 48751} 48752class DatePattern extends StringObject { 48753 constructor(attributes) { 48754 super(LOCALE_SET_NS_ID, "datePattern"); 48755 this.name = getStringOption(attributes.name, ["full", "long", "med", "short"]); 48756 } 48757} 48758class DatePatterns extends XFAObject { 48759 constructor(attributes) { 48760 super(LOCALE_SET_NS_ID, "datePatterns", true); 48761 this.datePattern = new XFAObjectArray(4); 48762 } 48763} 48764class DateTimeSymbols extends ContentObject { 48765 constructor(attributes) { 48766 super(LOCALE_SET_NS_ID, "dateTimeSymbols"); 48767 } 48768} 48769class Day extends StringObject { 48770 constructor(attributes) { 48771 super(LOCALE_SET_NS_ID, "day"); 48772 } 48773} 48774class DayNames extends XFAObject { 48775 constructor(attributes) { 48776 super(LOCALE_SET_NS_ID, "dayNames", true); 48777 this.abbr = getInteger({ 48778 data: attributes.abbr, 48779 defaultValue: 0, 48780 validate: x => x === 1 48781 }); 48782 this.day = new XFAObjectArray(7); 48783 } 48784} 48785class Era extends StringObject { 48786 constructor(attributes) { 48787 super(LOCALE_SET_NS_ID, "era"); 48788 } 48789} 48790class EraNames extends XFAObject { 48791 constructor(attributes) { 48792 super(LOCALE_SET_NS_ID, "eraNames", true); 48793 this.era = new XFAObjectArray(2); 48794 } 48795} 48796class locale_set_Locale extends XFAObject { 48797 constructor(attributes) { 48798 super(LOCALE_SET_NS_ID, "locale", true); 48799 this.desc = attributes.desc || ""; 48800 this.name = "isoname"; 48801 this.calendarSymbols = null; 48802 this.currencySymbols = null; 48803 this.datePatterns = null; 48804 this.dateTimeSymbols = null; 48805 this.numberPatterns = null; 48806 this.numberSymbols = null; 48807 this.timePatterns = null; 48808 this.typeFaces = null; 48809 } 48810} 48811class locale_set_LocaleSet extends XFAObject { 48812 constructor(attributes) { 48813 super(LOCALE_SET_NS_ID, "localeSet", true); 48814 this.locale = new XFAObjectArray(); 48815 } 48816} 48817class Meridiem extends StringObject { 48818 constructor(attributes) { 48819 super(LOCALE_SET_NS_ID, "meridiem"); 48820 } 48821} 48822class MeridiemNames extends XFAObject { 48823 constructor(attributes) { 48824 super(LOCALE_SET_NS_ID, "meridiemNames", true); 48825 this.meridiem = new XFAObjectArray(2); 48826 } 48827} 48828class Month extends StringObject { 48829 constructor(attributes) { 48830 super(LOCALE_SET_NS_ID, "month"); 48831 } 48832} 48833class MonthNames extends XFAObject { 48834 constructor(attributes) { 48835 super(LOCALE_SET_NS_ID, "monthNames", true); 48836 this.abbr = getInteger({ 48837 data: attributes.abbr, 48838 defaultValue: 0, 48839 validate: x => x === 1 48840 }); 48841 this.month = new XFAObjectArray(12); 48842 } 48843} 48844class NumberPattern extends StringObject { 48845 constructor(attributes) { 48846 super(LOCALE_SET_NS_ID, "numberPattern"); 48847 this.name = getStringOption(attributes.name, ["full", "long", "med", "short"]); 48848 } 48849} 48850class NumberPatterns extends XFAObject { 48851 constructor(attributes) { 48852 super(LOCALE_SET_NS_ID, "numberPatterns", true); 48853 this.numberPattern = new XFAObjectArray(4); 48854 } 48855} 48856class NumberSymbol extends StringObject { 48857 constructor(attributes) { 48858 super(LOCALE_SET_NS_ID, "numberSymbol"); 48859 this.name = getStringOption(attributes.name, ["decimal", "grouping", "percent", "minus", "zero"]); 48860 } 48861} 48862class NumberSymbols extends XFAObject { 48863 constructor(attributes) { 48864 super(LOCALE_SET_NS_ID, "numberSymbols", true); 48865 this.numberSymbol = new XFAObjectArray(5); 48866 } 48867} 48868class TimePattern extends StringObject { 48869 constructor(attributes) { 48870 super(LOCALE_SET_NS_ID, "timePattern"); 48871 this.name = getStringOption(attributes.name, ["full", "long", "med", "short"]); 48872 } 48873} 48874class TimePatterns extends XFAObject { 48875 constructor(attributes) { 48876 super(LOCALE_SET_NS_ID, "timePatterns", true); 48877 this.timePattern = new XFAObjectArray(4); 48878 } 48879} 48880class TypeFace extends XFAObject { 48881 constructor(attributes) { 48882 super(LOCALE_SET_NS_ID, "typeFace", true); 48883 this.name = attributes.name | ""; 48884 } 48885} 48886class TypeFaces extends XFAObject { 48887 constructor(attributes) { 48888 super(LOCALE_SET_NS_ID, "typeFaces", true); 48889 this.typeFace = new XFAObjectArray(); 48890 } 48891} 48892class LocaleSetNamespace { 48893 static [$buildXFAObject](name, attributes) { 48894 if (LocaleSetNamespace.hasOwnProperty(name)) { 48895 return LocaleSetNamespace[name](attributes); 48896 } 48897 return undefined; 48898 } 48899 static calendarSymbols(attrs) { 48900 return new CalendarSymbols(attrs); 48901 } 48902 static currencySymbol(attrs) { 48903 return new CurrencySymbol(attrs); 48904 } 48905 static currencySymbols(attrs) { 48906 return new CurrencySymbols(attrs); 48907 } 48908 static datePattern(attrs) { 48909 return new DatePattern(attrs); 48910 } 48911 static datePatterns(attrs) { 48912 return new DatePatterns(attrs); 48913 } 48914 static dateTimeSymbols(attrs) { 48915 return new DateTimeSymbols(attrs); 48916 } 48917 static day(attrs) { 48918 return new Day(attrs); 48919 } 48920 static dayNames(attrs) { 48921 return new DayNames(attrs); 48922 } 48923 static era(attrs) { 48924 return new Era(attrs); 48925 } 48926 static eraNames(attrs) { 48927 return new EraNames(attrs); 48928 } 48929 static locale(attrs) { 48930 return new locale_set_Locale(attrs); 48931 } 48932 static localeSet(attrs) { 48933 return new locale_set_LocaleSet(attrs); 48934 } 48935 static meridiem(attrs) { 48936 return new Meridiem(attrs); 48937 } 48938 static meridiemNames(attrs) { 48939 return new MeridiemNames(attrs); 48940 } 48941 static month(attrs) { 48942 return new Month(attrs); 48943 } 48944 static monthNames(attrs) { 48945 return new MonthNames(attrs); 48946 } 48947 static numberPattern(attrs) { 48948 return new NumberPattern(attrs); 48949 } 48950 static numberPatterns(attrs) { 48951 return new NumberPatterns(attrs); 48952 } 48953 static numberSymbol(attrs) { 48954 return new NumberSymbol(attrs); 48955 } 48956 static numberSymbols(attrs) { 48957 return new NumberSymbols(attrs); 48958 } 48959 static timePattern(attrs) { 48960 return new TimePattern(attrs); 48961 } 48962 static timePatterns(attrs) { 48963 return new TimePatterns(attrs); 48964 } 48965 static typeFace(attrs) { 48966 return new TypeFace(attrs); 48967 } 48968 static typeFaces(attrs) { 48969 return new TypeFaces(attrs); 48970 } 48971} 48972 48973;// ./src/core/xfa/signature.js 48974 48975 48976const SIGNATURE_NS_ID = NamespaceIds.signature.id; 48977class signature_Signature extends XFAObject { 48978 constructor(attributes) { 48979 super(SIGNATURE_NS_ID, "signature", true); 48980 } 48981} 48982class SignatureNamespace { 48983 static [$buildXFAObject](name, attributes) { 48984 if (SignatureNamespace.hasOwnProperty(name)) { 48985 return SignatureNamespace[name](attributes); 48986 } 48987 return undefined; 48988 } 48989 static signature(attributes) { 48990 return new signature_Signature(attributes); 48991 } 48992} 48993 48994;// ./src/core/xfa/stylesheet.js 48995 48996 48997const STYLESHEET_NS_ID = NamespaceIds.stylesheet.id; 48998class Stylesheet extends XFAObject { 48999 constructor(attributes) { 49000 super(STYLESHEET_NS_ID, "stylesheet", true); 49001 } 49002} 49003class StylesheetNamespace { 49004 static [$buildXFAObject](name, attributes) { 49005 if (StylesheetNamespace.hasOwnProperty(name)) { 49006 return StylesheetNamespace[name](attributes); 49007 } 49008 return undefined; 49009 } 49010 static stylesheet(attributes) { 49011 return new Stylesheet(attributes); 49012 } 49013} 49014 49015;// ./src/core/xfa/xdp.js 49016 49017 49018 49019const XDP_NS_ID = NamespaceIds.xdp.id; 49020class xdp_Xdp extends XFAObject { 49021 constructor(attributes) { 49022 super(XDP_NS_ID, "xdp", true); 49023 this.uuid = attributes.uuid || ""; 49024 this.timeStamp = attributes.timeStamp || ""; 49025 this.config = null; 49026 this.connectionSet = null; 49027 this.datasets = null; 49028 this.localeSet = null; 49029 this.stylesheet = new XFAObjectArray(); 49030 this.template = null; 49031 } 49032 [$onChildCheck](child) { 49033 const ns = NamespaceIds[child[$nodeName]]; 49034 return ns && child[$namespaceId] === ns.id; 49035 } 49036} 49037class XdpNamespace { 49038 static [$buildXFAObject](name, attributes) { 49039 if (XdpNamespace.hasOwnProperty(name)) { 49040 return XdpNamespace[name](attributes); 49041 } 49042 return undefined; 49043 } 49044 static xdp(attributes) { 49045 return new xdp_Xdp(attributes); 49046 } 49047} 49048 49049;// ./src/core/xfa/xhtml.js 49050 49051 49052 49053 49054
49055const XHTML_NS_ID = NamespaceIds.xhtml.id; 49056const $richText = Symbol(); 49057const VALID_STYLES = new Set(["color", "font", "font-family", "font-size", "font-stretch", "font-style", "font-weight", "margin", "margin-bottom", "margin-left", "margin-right", "margin-top", "letter-spacing", "line-height", "orphans", "page-break-after", "page-break-before", "page-break-inside", "tab-interval", "tab-stop", "text-align", "text-decoration", "text-indent", "vertical-align", "widows", "kerning-mode", "xfa-font-horizontal-scale", "xfa-font-vertical-scale", "xfa-spacerun", "xfa-tab-stops"]); 49058const StyleMapping = new Map([["page-break-after", "breakAfter"], ["page-break-before", "breakBefore"], ["page-break-inside", "breakInside"], ["kerning-mode", value => value === "none" ? "none" : "normal"], ["xfa-font-horizontal-scale", value => `scaleX(${Math.max(0, Math.min(parseInt(value) / 100)).toFixed(2)})`], ["xfa-font-vertical-scale", value => `scaleY(${Math.max(0, Math.min(parseInt(value) / 100)).toFixed(2)})`], ["xfa-spacerun", ""], ["xfa-tab-stops", ""], ["font-size", (value, original) => { 49059 value = original.fontSize = getMeasurement(value); 49060 return measureToString(0.99 * value); 49061}], ["letter-spacing", value => measureToString(getMeasurement(value))], ["line-height", value => measureToString(getMeasurement(value))], ["margin", value => measureToString(getMeasurement(value))], ["margin-bottom", value => measureToString(getMeasurement(value))], ["margin-left", value => measureToString(getMeasurement(value))], ["margin-right", value => measureToString(getMeasurement(value))], ["margin-top", value => measureToString(getMeasurement(value))], ["text-indent", value => measureToString(getMeasurement(value))], ["font-family", value => value], ["vertical-align", value => measureToString(getMeasurement(value))]]);
vendor: 33,963 bytes, lines 49062-50285
49062const spacesRegExp = /\s+/g; 49063const crlfRegExp = /[\r\n]+/g; 49064const crlfForRichTextRegExp = /\r\n?/g; 49065function mapStyle(styleStr, node, richText) { 49066 const style = Object.create(null); 49067 if (!styleStr) { 49068 return style; 49069 } 49070 const original = Object.create(null); 49071 for (const [key, value] of styleStr.split(";").map(s => s.split(":", 2))) { 49072 const mapping = StyleMapping.get(key); 49073 if (mapping === "") { 49074 continue; 49075 } 49076 let newValue = value; 49077 if (mapping) { 49078 newValue = typeof mapping === "string" ? mapping : mapping(value, original); 49079 } 49080 if (key.endsWith("scale")) { 49081 style.transform = style.transform ? `${style[key]} ${newValue}` : newValue; 49082 } else { 49083 style[key.replaceAll(/-([a-zA-Z])/g, (_, x) => x.toUpperCase())] = newValue; 49084 } 49085 } 49086 if (style.fontFamily) { 49087 setFontFamily({ 49088 typeface: style.fontFamily, 49089 weight: style.fontWeight || "normal", 49090 posture: style.fontStyle || "normal", 49091 size: original.fontSize || 0 49092 }, node, node[$globalData].fontFinder, style); 49093 } 49094 if (richText && style.verticalAlign && style.verticalAlign !== "0px" && style.fontSize) { 49095 const SUB_SUPER_SCRIPT_FACTOR = 0.583; 49096 const VERTICAL_FACTOR = 0.333; 49097 const fontSize = getMeasurement(style.fontSize); 49098 style.fontSize = measureToString(fontSize * SUB_SUPER_SCRIPT_FACTOR); 49099 style.verticalAlign = measureToString(Math.sign(getMeasurement(style.verticalAlign)) * fontSize * VERTICAL_FACTOR); 49100 } 49101 if (richText && style.fontSize) { 49102 style.fontSize = `calc(${style.fontSize} * var(--scale-factor))`; 49103 } 49104 fixTextIndent(style); 49105 return style; 49106} 49107function checkStyle(node) { 49108 if (!node.style) { 49109 return ""; 49110 } 49111 return node.style.trim().split(/\s*;\s*/).filter(s => !!s).map(s => s.split(/\s*:\s*/, 2)).filter(([key, value]) => { 49112 if (key === "font-family") { 49113 node[$globalData].usedTypefaces.add(value); 49114 } 49115 return VALID_STYLES.has(key); 49116 }).map(kv => kv.join(":")).join(";"); 49117} 49118const NoWhites = new Set(["body", "html"]); 49119class XhtmlObject extends XmlObject { 49120 constructor(attributes, name) { 49121 super(XHTML_NS_ID, name); 49122 this[$richText] = false; 49123 this.style = attributes.style || ""; 49124 } 49125 [$clean](builder) { 49126 super[$clean](builder); 49127 this.style = checkStyle(this); 49128 } 49129 [$acceptWhitespace]() { 49130 return !NoWhites.has(this[$nodeName]); 49131 } 49132 [$onText](str, richText = false) { 49133 if (!richText) { 49134 str = str.replaceAll(crlfRegExp, ""); 49135 if (!this.style.includes("xfa-spacerun:yes")) { 49136 str = str.replaceAll(spacesRegExp, " "); 49137 } 49138 } else { 49139 this[$richText] = true; 49140 } 49141 if (str) { 49142 this[$content] += str; 49143 } 49144 } 49145 [$pushGlyphs](measure, mustPop = true) { 49146 const xfaFont = Object.create(null); 49147 const margin = { 49148 top: NaN, 49149 bottom: NaN, 49150 left: NaN, 49151 right: NaN 49152 }; 49153 let lineHeight = null; 49154 for (const [key, value] of this.style.split(";").map(s => s.split(":", 2))) { 49155 switch (key) { 49156 case "font-family": 49157 xfaFont.typeface = stripQuotes(value); 49158 break; 49159 case "font-size": 49160 xfaFont.size = getMeasurement(value); 49161 break; 49162 case "font-weight": 49163 xfaFont.weight = value; 49164 break; 49165 case "font-style": 49166 xfaFont.posture = value; 49167 break; 49168 case "letter-spacing": 49169 xfaFont.letterSpacing = getMeasurement(value); 49170 break; 49171 case "margin": 49172 const values = value.split(/ \t/).map(x => getMeasurement(x)); 49173 switch (values.length) { 49174 case 1: 49175 margin.top = margin.bottom = margin.left = margin.right = values[0]; 49176 break; 49177 case 2: 49178 margin.top = margin.bottom = values[0]; 49179 margin.left = margin.right = values[1]; 49180 break; 49181 case 3: 49182 margin.top = values[0]; 49183 margin.bottom = values[2]; 49184 margin.left = margin.right = values[1]; 49185 break; 49186 case 4: 49187 margin.top = values[0]; 49188 margin.left = values[1]; 49189 margin.bottom = values[2]; 49190 margin.right = values[3]; 49191 break; 49192 } 49193 break; 49194 case "margin-top": 49195 margin.top = getMeasurement(value); 49196 break; 49197 case "margin-bottom": 49198 margin.bottom = getMeasurement(value); 49199 break; 49200 case "margin-left": 49201 margin.left = getMeasurement(value); 49202 break; 49203 case "margin-right": 49204 margin.right = getMeasurement(value); 49205 break; 49206 case "line-height": 49207 lineHeight = getMeasurement(value); 49208 break; 49209 } 49210 } 49211 measure.pushData(xfaFont, margin, lineHeight); 49212 if (this[$content]) { 49213 measure.addString(this[$content]); 49214 } else { 49215 for (const child of this[$getChildren]()) { 49216 if (child[$nodeName] === "#text") { 49217 measure.addString(child[$content]); 49218 continue; 49219 } 49220 child[$pushGlyphs](measure); 49221 } 49222 } 49223 if (mustPop) { 49224 measure.popFont(); 49225 } 49226 } 49227 [$toHTML](availableSpace) { 49228 const children = []; 49229 this[$extra] = { 49230 children 49231 }; 49232 this[$childrenToHTML]({}); 49233 if (children.length === 0 && !this[$content]) { 49234 return HTMLResult.EMPTY; 49235 } 49236 let value; 49237 if (this[$richText]) { 49238 value = this[$content] ? this[$content].replaceAll(crlfForRichTextRegExp, "\n") : undefined; 49239 } else { 49240 value = this[$content] || undefined; 49241 } 49242 return HTMLResult.success({ 49243 name: this[$nodeName], 49244 attributes: { 49245 href: this.href, 49246 style: mapStyle(this.style, this, this[$richText]) 49247 }, 49248 children, 49249 value 49250 }); 49251 } 49252} 49253class A extends XhtmlObject { 49254 constructor(attributes) { 49255 super(attributes, "a"); 49256 this.href = fixURL(attributes.href) || ""; 49257 } 49258} 49259class B extends XhtmlObject { 49260 constructor(attributes) { 49261 super(attributes, "b"); 49262 } 49263 [$pushGlyphs](measure) { 49264 measure.pushFont({ 49265 weight: "bold" 49266 }); 49267 super[$pushGlyphs](measure); 49268 measure.popFont(); 49269 } 49270} 49271class Body extends XhtmlObject { 49272 constructor(attributes) { 49273 super(attributes, "body"); 49274 } 49275 [$toHTML](availableSpace) { 49276 const res = super[$toHTML](availableSpace); 49277 const { 49278 html 49279 } = res; 49280 if (!html) { 49281 return HTMLResult.EMPTY; 49282 } 49283 html.name = "div"; 49284 html.attributes.class = ["xfaRich"]; 49285 return res; 49286 } 49287} 49288class Br extends XhtmlObject { 49289 constructor(attributes) { 49290 super(attributes, "br"); 49291 } 49292 [$text]() { 49293 return "\n"; 49294 } 49295 [$pushGlyphs](measure) { 49296 measure.addString("\n"); 49297 } 49298 [$toHTML](availableSpace) { 49299 return HTMLResult.success({ 49300 name: "br" 49301 }); 49302 } 49303} 49304class Html extends XhtmlObject { 49305 constructor(attributes) { 49306 super(attributes, "html"); 49307 } 49308 [$toHTML](availableSpace) { 49309 const children = []; 49310 this[$extra] = { 49311 children 49312 }; 49313 this[$childrenToHTML]({}); 49314 if (children.length === 0) { 49315 return HTMLResult.success({ 49316 name: "div", 49317 attributes: { 49318 class: ["xfaRich"], 49319 style: {} 49320 }, 49321 value: this[$content] || "" 49322 }); 49323 } 49324 if (children.length === 1) { 49325 const child = children[0]; 49326 if (child.attributes?.class.includes("xfaRich")) { 49327 return HTMLResult.success(child); 49328 } 49329 } 49330 return HTMLResult.success({ 49331 name: "div", 49332 attributes: { 49333 class: ["xfaRich"], 49334 style: {} 49335 }, 49336 children 49337 }); 49338 } 49339} 49340class I extends XhtmlObject { 49341 constructor(attributes) { 49342 super(attributes, "i"); 49343 } 49344 [$pushGlyphs](measure) { 49345 measure.pushFont({ 49346 posture: "italic" 49347 }); 49348 super[$pushGlyphs](measure); 49349 measure.popFont(); 49350 } 49351} 49352class Li extends XhtmlObject { 49353 constructor(attributes) { 49354 super(attributes, "li"); 49355 } 49356} 49357class Ol extends XhtmlObject { 49358 constructor(attributes) { 49359 super(attributes, "ol"); 49360 } 49361} 49362class P extends XhtmlObject { 49363 constructor(attributes) { 49364 super(attributes, "p"); 49365 } 49366 [$pushGlyphs](measure) { 49367 super[$pushGlyphs](measure, false); 49368 measure.addString("\n"); 49369 measure.addPara(); 49370 measure.popFont(); 49371 } 49372 [$text]() { 49373 const siblings = this[$getParent]()[$getChildren](); 49374 if (siblings.at(-1) === this) { 49375 return super[$text](); 49376 } 49377 return super[$text]() + "\n"; 49378 } 49379} 49380class Span extends XhtmlObject { 49381 constructor(attributes) { 49382 super(attributes, "span"); 49383 } 49384} 49385class Sub extends XhtmlObject { 49386 constructor(attributes) { 49387 super(attributes, "sub"); 49388 } 49389} 49390class Sup extends XhtmlObject { 49391 constructor(attributes) { 49392 super(attributes, "sup"); 49393 } 49394} 49395class Ul extends XhtmlObject { 49396 constructor(attributes) { 49397 super(attributes, "ul"); 49398 } 49399} 49400class XhtmlNamespace { 49401 static [$buildXFAObject](name, attributes) { 49402 if (XhtmlNamespace.hasOwnProperty(name)) { 49403 return XhtmlNamespace[name](attributes); 49404 } 49405 return undefined; 49406 } 49407 static a(attributes) { 49408 return new A(attributes); 49409 } 49410 static b(attributes) { 49411 return new B(attributes); 49412 } 49413 static body(attributes) { 49414 return new Body(attributes); 49415 } 49416 static br(attributes) { 49417 return new Br(attributes); 49418 } 49419 static html(attributes) { 49420 return new Html(attributes); 49421 } 49422 static i(attributes) { 49423 return new I(attributes); 49424 } 49425 static li(attributes) { 49426 return new Li(attributes); 49427 } 49428 static ol(attributes) { 49429 return new Ol(attributes); 49430 } 49431 static p(attributes) { 49432 return new P(attributes); 49433 } 49434 static span(attributes) { 49435 return new Span(attributes); 49436 } 49437 static sub(attributes) { 49438 return new Sub(attributes); 49439 } 49440 static sup(attributes) { 49441 return new Sup(attributes); 49442 } 49443 static ul(attributes) { 49444 return new Ul(attributes); 49445 } 49446} 49447 49448;// ./src/core/xfa/setup.js 49449 49450 49451 49452 49453 49454 49455 49456 49457 49458const NamespaceSetUp = { 49459 config: ConfigNamespace, 49460 connection: ConnectionSetNamespace, 49461 datasets: DatasetsNamespace, 49462 localeSet: LocaleSetNamespace, 49463 signature: SignatureNamespace, 49464 stylesheet: StylesheetNamespace, 49465 template: TemplateNamespace, 49466 xdp: XdpNamespace, 49467 xhtml: XhtmlNamespace 49468}; 49469 49470;// ./src/core/xfa/unknown.js 49471 49472 49473class UnknownNamespace { 49474 constructor(nsId) { 49475 this.namespaceId = nsId; 49476 } 49477 [$buildXFAObject](name, attributes) { 49478 return new XmlObject(this.namespaceId, name, attributes); 49479 } 49480} 49481 49482;// ./src/core/xfa/builder.js 49483 49484 49485 49486 49487 49488 49489 49490class Root extends XFAObject { 49491 constructor(ids) { 49492 super(-1, "root", Object.create(null)); 49493 this.element = null; 49494 this[$ids] = ids; 49495 } 49496 [$onChild](child) { 49497 this.element = child; 49498 return true; 49499 } 49500 [$finalize]() { 49501 super[$finalize](); 49502 if (this.element.template instanceof Template) { 49503 this[$ids].set($root, this.element); 49504 this.element.template[$resolvePrototypes](this[$ids]); 49505 this.element.template[$ids] = this[$ids]; 49506 } 49507 } 49508} 49509class Empty extends XFAObject { 49510 constructor() { 49511 super(-1, "", Object.create(null)); 49512 } 49513 [$onChild](_) { 49514 return false; 49515 } 49516} 49517class Builder { 49518 constructor(rootNameSpace = null) { 49519 this._namespaceStack = []; 49520 this._nsAgnosticLevel = 0; 49521 this._namespacePrefixes = new Map(); 49522 this._namespaces = new Map(); 49523 this._nextNsId = Math.max(...Object.values(NamespaceIds).map(({ 49524 id 49525 }) => id)); 49526 this._currentNamespace = rootNameSpace || new UnknownNamespace(++this._nextNsId); 49527 } 49528 buildRoot(ids) { 49529 return new Root(ids); 49530 } 49531 build({ 49532 nsPrefix, 49533 name, 49534 attributes, 49535 namespace, 49536 prefixes 49537 }) { 49538 const hasNamespaceDef = namespace !== null; 49539 if (hasNamespaceDef) { 49540 this._namespaceStack.push(this._currentNamespace); 49541 this._currentNamespace = this._searchNamespace(namespace); 49542 } 49543 if (prefixes) { 49544 this._addNamespacePrefix(prefixes); 49545 } 49546 if (attributes.hasOwnProperty($nsAttributes)) { 49547 const dataTemplate = NamespaceSetUp.datasets; 49548 const nsAttrs = attributes[$nsAttributes]; 49549 let xfaAttrs = null; 49550 for (const [ns, attrs] of Object.entries(nsAttrs)) { 49551 const nsToUse = this._getNamespaceToUse(ns); 49552 if (nsToUse === dataTemplate) { 49553 xfaAttrs = { 49554 xfa: attrs 49555 }; 49556 break; 49557 } 49558 } 49559 if (xfaAttrs) { 49560 attributes[$nsAttributes] = xfaAttrs; 49561 } else { 49562 delete attributes[$nsAttributes]; 49563 } 49564 } 49565 const namespaceToUse = this._getNamespaceToUse(nsPrefix); 49566 const node = namespaceToUse?.[$buildXFAObject](name, attributes) || new Empty(); 49567 if (node[$isNsAgnostic]()) { 49568 this._nsAgnosticLevel++; 49569 } 49570 if (hasNamespaceDef || prefixes || node[$isNsAgnostic]()) { 49571 node[$cleanup] = { 49572 hasNamespace: hasNamespaceDef, 49573 prefixes, 49574 nsAgnostic: node[$isNsAgnostic]() 49575 }; 49576 } 49577 return node; 49578 } 49579 isNsAgnostic() { 49580 return this._nsAgnosticLevel > 0; 49581 } 49582 _searchNamespace(nsName) { 49583 let ns = this._namespaces.get(nsName); 49584 if (ns) { 49585 return ns; 49586 } 49587 for (const [name, { 49588 check 49589 }] of Object.entries(NamespaceIds)) { 49590 if (check(nsName)) { 49591 ns = NamespaceSetUp[name]; 49592 if (ns) { 49593 this._namespaces.set(nsName, ns); 49594 return ns; 49595 } 49596 break; 49597 } 49598 } 49599 ns = new UnknownNamespace(++this._nextNsId); 49600 this._namespaces.set(nsName, ns); 49601 return ns; 49602 } 49603 _addNamespacePrefix(prefixes) { 49604 for (const { 49605 prefix, 49606 value 49607 } of prefixes) { 49608 const namespace = this._searchNamespace(value); 49609 let prefixStack = this._namespacePrefixes.get(prefix); 49610 if (!prefixStack) { 49611 prefixStack = []; 49612 this._namespacePrefixes.set(prefix, prefixStack); 49613 } 49614 prefixStack.push(namespace); 49615 } 49616 } 49617 _getNamespaceToUse(prefix) { 49618 if (!prefix) { 49619 return this._currentNamespace; 49620 } 49621 const prefixStack = this._namespacePrefixes.get(prefix); 49622 if (prefixStack?.length > 0) { 49623 return prefixStack.at(-1); 49624 } 49625 warn(`Unknown namespace prefix: ${prefix}.`); 49626 return null; 49627 } 49628 clean(data) { 49629 const { 49630 hasNamespace, 49631 prefixes, 49632 nsAgnostic 49633 } = data; 49634 if (hasNamespace) { 49635 this._currentNamespace = this._namespaceStack.pop(); 49636 } 49637 if (prefixes) { 49638 prefixes.forEach(({ 49639 prefix 49640 }) => { 49641 this._namespacePrefixes.get(prefix).pop(); 49642 }); 49643 } 49644 if (nsAgnostic) { 49645 this._nsAgnosticLevel--; 49646 } 49647 } 49648} 49649 49650;// ./src/core/xfa/parser.js 49651 49652 49653 49654 49655class XFAParser extends XMLParserBase { 49656 constructor(rootNameSpace = null, richText = false) { 49657 super(); 49658 this._builder = new Builder(rootNameSpace); 49659 this._stack = []; 49660 this._globalData = { 49661 usedTypefaces: new Set() 49662 }; 49663 this._ids = new Map(); 49664 this._current = this._builder.buildRoot(this._ids); 49665 this._errorCode = XMLParserErrorCode.NoError; 49666 this._whiteRegex = /^\s+$/; 49667 this._nbsps = /\xa0+/g; 49668 this._richText = richText; 49669 } 49670 parse(data) { 49671 this.parseXml(data); 49672 if (this._errorCode !== XMLParserErrorCode.NoError) { 49673 return undefined; 49674 } 49675 this._current[$finalize](); 49676 return this._current.element; 49677 } 49678 onText(text) { 49679 text = text.replace(this._nbsps, match => match.slice(1) + " "); 49680 if (this._richText || this._current[$acceptWhitespace]()) { 49681 this._current[$onText](text, this._richText); 49682 return; 49683 } 49684 if (this._whiteRegex.test(text)) { 49685 return; 49686 } 49687 this._current[$onText](text.trim()); 49688 } 49689 onCdata(text) { 49690 this._current[$onText](text); 49691 } 49692 _mkAttributes(attributes, tagName) { 49693 let namespace = null; 49694 let prefixes = null; 49695 const attributeObj = Object.create({}); 49696 for (const { 49697 name, 49698 value 49699 } of attributes) { 49700 if (name === "xmlns") { 49701 if (!namespace) { 49702 namespace = value; 49703 } else { 49704 warn(`XFA - multiple namespace definition in <${tagName}>`); 49705 } 49706 } else if (name.startsWith("xmlns:")) { 49707 const prefix = name.substring("xmlns:".length); 49708 if (!prefixes) { 49709 prefixes = []; 49710 } 49711 prefixes.push({ 49712 prefix, 49713 value 49714 }); 49715 } else { 49716 const i = name.indexOf(":"); 49717 if (i === -1) { 49718 attributeObj[name] = value; 49719 } else { 49720 let nsAttrs = attributeObj[$nsAttributes]; 49721 if (!nsAttrs) { 49722 nsAttrs = attributeObj[$nsAttributes] = Object.create(null); 49723 } 49724 const [ns, attrName] = [name.slice(0, i), name.slice(i + 1)]; 49725 const attrs = nsAttrs[ns] ||= Object.create(null); 49726 attrs[attrName] = value; 49727 } 49728 } 49729 } 49730 return [namespace, prefixes, attributeObj]; 49731 } 49732 _getNameAndPrefix(name, nsAgnostic) { 49733 const i = name.indexOf(":"); 49734 if (i === -1) { 49735 return [name, null]; 49736 } 49737 return [name.substring(i + 1), nsAgnostic ? "" : name.substring(0, i)]; 49738 } 49739 onBeginElement(tagName, attributes, isEmpty) { 49740 const [namespace, prefixes, attributesObj] = this._mkAttributes(attributes, tagName); 49741 const [name, nsPrefix] = this._getNameAndPrefix(tagName, this._builder.isNsAgnostic()); 49742 const node = this._builder.build({ 49743 nsPrefix, 49744 name, 49745 attributes: attributesObj, 49746 namespace, 49747 prefixes 49748 }); 49749 node[$globalData] = this._globalData; 49750 if (isEmpty) { 49751 node[$finalize](); 49752 if (this._current[$onChild](node)) { 49753 node[$setId](this._ids); 49754 } 49755 node[$clean](this._builder); 49756 return; 49757 } 49758 this._stack.push(this._current); 49759 this._current = node; 49760 } 49761 onEndElement(name) { 49762 const node = this._current; 49763 if (node[$isCDATAXml]() && typeof node[$content] === "string") { 49764 const parser = new XFAParser(); 49765 parser._globalData = this._globalData; 49766 const root = parser.parse(node[$content]); 49767 node[$content] = null; 49768 node[$onChild](root); 49769 } 49770 node[$finalize](); 49771 this._current = this._stack.pop(); 49772 if (this._current[$onChild](node)) { 49773 node[$setId](this._ids); 49774 } 49775 node[$clean](this._builder); 49776 } 49777 onError(code) { 49778 this._errorCode = code; 49779 } 49780} 49781 49782;// ./src/core/xfa/factory.js 49783 49784 49785 49786 49787 49788 49789 49790 49791class XFAFactory { 49792 constructor(data) { 49793 try { 49794 this.root = new XFAParser().parse(XFAFactory._createDocument(data)); 49795 const binder = new Binder(this.root); 49796 this.form = binder.bind(); 49797 this.dataHandler = new DataHandler(this.root, binder.getData()); 49798 this.form[$globalData].template = this.form; 49799 } catch (e) { 49800 warn(`XFA - an error occurred during parsing and binding: ${e}`); 49801 } 49802 } 49803 isValid() { 49804 return this.root && this.form; 49805 } 49806 _createPagesHelper() { 49807 const iterator = this.form[$toPages](); 49808 return new Promise((resolve, reject) => { 49809 const nextIteration = () => { 49810 try { 49811 const value = iterator.next(); 49812 if (value.done) { 49813 resolve(value.value); 49814 } else { 49815 setTimeout(nextIteration, 0); 49816 } 49817 } catch (e) { 49818 reject(e); 49819 } 49820 }; 49821 setTimeout(nextIteration, 0); 49822 }); 49823 } 49824 async _createPages() { 49825 try { 49826 this.pages = await this._createPagesHelper(); 49827 this.dims = this.pages.children.map(c => { 49828 const { 49829 width, 49830 height 49831 } = c.attributes.style; 49832 return [0, 0, parseInt(width), parseInt(height)]; 49833 }); 49834 } catch (e) { 49835 warn(`XFA - an error occurred during layout: ${e}`); 49836 } 49837 } 49838 getBoundingBox(pageIndex) { 49839 return this.dims[pageIndex]; 49840 } 49841 async getNumPages() { 49842 if (!this.pages) { 49843 await this._createPages(); 49844 } 49845 return this.dims.length; 49846 } 49847 setImages(images) { 49848 this.form[$globalData].images = images; 49849 } 49850 setFonts(fonts) { 49851 this.form[$globalData].fontFinder = new FontFinder(fonts); 49852 const missingFonts = []; 49853 for (let typeface of this.form[$globalData].usedTypefaces) { 49854 typeface = stripQuotes(typeface); 49855 const font = this.form[$globalData].fontFinder.find(typeface); 49856 if (!font) { 49857 missingFonts.push(typeface); 49858 } 49859 } 49860 if (missingFonts.length > 0) { 49861 return missingFonts; 49862 } 49863 return null; 49864 } 49865 appendFonts(fonts, reallyMissingFonts) { 49866 this.form[$globalData].fontFinder.add(fonts, reallyMissingFonts); 49867 } 49868 async getPages() { 49869 if (!this.pages) { 49870 await this._createPages(); 49871 } 49872 const pages = this.pages; 49873 this.pages = null; 49874 return pages; 49875 } 49876 serializeData(storage) { 49877 return this.dataHandler.serialize(storage); 49878 } 49879 static _createDocument(data) { 49880 if (!data["/xdp:xdp"]) { 49881 return data["xdp:xdp"]; 49882 } 49883 return Object.values(data).join(""); 49884 } 49885 static getRichTextAsHtml(rc) { 49886 if (!rc || typeof rc !== "string") { 49887 return null; 49888 } 49889 try { 49890 let root = new XFAParser(XhtmlNamespace, true).parse(rc); 49891 if (!["body", "xhtml"].includes(root[$nodeName])) { 49892 const newRoot = XhtmlNamespace.body({}); 49893 newRoot[$appendChild](root); 49894 root = newRoot; 49895 } 49896 const result = root[$toHTML](); 49897 if (!result.success) { 49898 return null; 49899 } 49900 const { 49901 html 49902 } = result; 49903 const { 49904 attributes 49905 } = html; 49906 if (attributes) { 49907 if (attributes.class) { 49908 attributes.class = attributes.class.filter(attr => !attr.startsWith("xfa")); 49909 } 49910 attributes.dir = "auto"; 49911 } 49912 return { 49913 html, 49914 str: root[$text]() 49915 }; 49916 } catch (e) { 49917 warn(`XFA - an error occurred during parsing of rich text: ${e}`); 49918 } 49919 return null; 49920 } 49921} 49922 49923;// ./src/core/annotation.js 49924 49925 49926 49927 49928 49929 49930 49931 49932 49933 49934 49935 49936 49937 49938 49939class AnnotationFactory { 49940 static createGlobals(pdfManager) { 49941 return Promise.all([pdfManager.ensureCatalog("acroForm"), pdfManager.ensureDoc("xfaDatasets"), pdfManager.ensureCatalog("structTreeRoot"), pdfManager.ensureCatalog("baseUrl"), pdfManager.ensureCatalog("attachments")]).then(([acroForm, xfaDatasets, structTreeRoot, baseUrl, attachments]) => { 49942 return { 49943 pdfManager, 49944 acroForm: acroForm instanceof Dict ? acroForm : Dict.empty, 49945 xfaDatasets, 49946 structTreeRoot, 49947 baseUrl, 49948 attachments 49949 }; 49950 }, reason => { 49951 warn(`createGlobals: "${reason}".`); 49952 return null; 49953 }); 49954 } 49955 static async create(xref, ref, annotationGlobals, idFactory, collectFields, orphanFields, pageRef) { 49956 const pageIndex = collectFields ? await this._getPageIndex(xref, ref, annotationGlobals.pdfManager) : null; 49957 return annotationGlobals.pdfManager.ensure(this, "_create", [xref, ref, annotationGlobals, idFactory, collectFields, orphanFields, pageIndex, pageRef]); 49958 } 49959 static _create(xref, ref, annotationGlobals, idFactory, collectFields = false, orphanFields = null, pageIndex = null, pageRef = null) { 49960 const dict = xref.fetchIfRef(ref); 49961 if (!(dict instanceof Dict)) { 49962 return undefined; 49963 } 49964 const { 49965 acroForm, 49966 pdfManager 49967 } = annotationGlobals; 49968 const id = ref instanceof Ref ? ref.toString() : `annot_${idFactory.createObjId()}`; 49969 let subtype = dict.get("Subtype"); 49970 subtype = subtype instanceof Name ? subtype.name : null; 49971 const parameters = { 49972 xref, 49973 ref, 49974 dict, 49975 subtype, 49976 id, 49977 annotationGlobals, 49978 collectFields, 49979 orphanFields, 49980 needAppearances: !collectFields && acroForm.get("NeedAppearances") === true, 49981 pageIndex, 49982 evaluatorOptions: pdfManager.evaluatorOptions, 49983 pageRef 49984 }; 49985 switch (subtype) { 49986 case "Link": 49987 return new LinkAnnotation(parameters); 49988 case "Text": 49989 return new TextAnnotation(parameters); 49990 case "Widget": 49991 let fieldType = getInheritableProperty({ 49992 dict, 49993 key: "FT" 49994 }); 49995 fieldType = fieldType instanceof Name ? fieldType.name : null; 49996 switch (fieldType) { 49997 case "Tx": 49998 return new TextWidgetAnnotation(parameters); 49999 case "Btn": 50000 return new ButtonWidgetAnnotation(parameters); 50001 case "Ch": 50002 return new ChoiceWidgetAnnotation(parameters); 50003 case "Sig": 50004 return new SignatureWidgetAnnotation(parameters); 50005 } 50006 warn(`Unimplemented widget field type "${fieldType}", ` + "falling back to base field type."); 50007 return new WidgetAnnotation(parameters); 50008 case "Popup": 50009 return new PopupAnnotation(parameters); 50010 case "FreeText": 50011 return new FreeTextAnnotation(parameters); 50012 case "Line": 50013 return new LineAnnotation(parameters); 50014 case "Square": 50015 return new SquareAnnotation(parameters); 50016 case "Circle": 50017 return new CircleAnnotation(parameters); 50018 case "PolyLine": 50019 return new PolylineAnnotation(parameters); 50020 case "Polygon": 50021 return new PolygonAnnotation(parameters); 50022 case "Caret": 50023 return new CaretAnnotation(parameters); 50024 case "Ink": 50025 return new InkAnnotation(parameters); 50026 case "Highlight": 50027 return new HighlightAnnotation(parameters); 50028 case "Underline": 50029 return new UnderlineAnnotation(parameters); 50030 case "Squiggly": 50031 return new SquigglyAnnotation(parameters); 50032 case "StrikeOut": 50033 return new StrikeOutAnnotation(parameters); 50034 case "Stamp": 50035 return new StampAnnotation(parameters); 50036 case "FileAttachment": 50037 return new FileAttachmentAnnotation(parameters); 50038 default: 50039 if (!collectFields) { 50040 if (!subtype) { 50041 warn("Annotation is missing the required /Subtype."); 50042 } else { 50043 warn(`Unimplemented annotation type "${subtype}", ` + "falling back to base annotation."); 50044 } 50045 } 50046 return new Annotation(parameters); 50047 } 50048 } 50049 static async _getPageIndex(xref, ref, pdfManager) { 50050 try { 50051 const annotDict = await xref.fetchIfRefAsync(ref); 50052 if (!(annotDict instanceof Dict)) { 50053 return -1; 50054 } 50055 const pageRef = annotDict.getRaw("P"); 50056 if (pageRef instanceof Ref) { 50057 try { 50058 const pageIndex = await pdfManager.ensureCatalog("getPageIndex", [pageRef]); 50059 return pageIndex; 50060 } catch (ex) { 50061 info(`_getPageIndex -- not a valid page reference: "${ex}".`); 50062 } 50063 } 50064 if (annotDict.has("Kids")) { 50065 return -1; 50066 } 50067 const numPages = await pdfManager.ensureDoc("numPages"); 50068 for (let pageIndex = 0; pageIndex < numPages; pageIndex++) { 50069 const page = await pdfManager.getPage(pageIndex); 50070 const annotations = await pdfManager.ensure(page, "annotations"); 50071 for (const annotRef of annotations) { 50072 if (annotRef instanceof Ref && isRefsEqual(annotRef, ref)) { 50073 return pageIndex; 50074 } 50075 } 50076 } 50077 } catch (ex) { 50078 warn(`_getPageIndex: "${ex}".`); 50079 } 50080 return -1; 50081 } 50082 static generateImages(annotations, xref, isOffscreenCanvasSupported) { 50083 if (!isOffscreenCanvasSupported) { 50084 warn("generateImages: OffscreenCanvas is not supported, cannot save or print some annotations with images."); 50085 return null; 50086 } 50087 let imagePromises; 50088 for (const { 50089 bitmapId, 50090 bitmap 50091 } of annotations) { 50092 if (!bitmap) { 50093 continue; 50094 } 50095 imagePromises ||= new Map(); 50096 imagePromises.set(bitmapId, StampAnnotation.createImage(bitmap, xref)); 50097 } 50098 return imagePromises; 50099 } 50100 static async saveNewAnnotations(evaluator, task, annotations, imagePromises) { 50101 const xref = evaluator.xref; 50102 let baseFontRef; 50103 const dependencies = []; 50104 const promises = []; 50105 const { 50106 isOffscreenCanvasSupported 50107 } = evaluator.options; 50108 for (const annotation of annotations) { 50109 if (annotation.deleted) { 50110 continue; 50111 } 50112 switch (annotation.annotationType) { 50113 case AnnotationEditorType.FREETEXT: 50114 if (!baseFontRef) { 50115 const baseFont = new Dict(xref); 50116 baseFont.set("BaseFont", Name.get("Helvetica")); 50117 baseFont.set("Type", Name.get("Font")); 50118 baseFont.set("Subtype", Name.get("Type1")); 50119 baseFont.set("Encoding", Name.get("WinAnsiEncoding")); 50120 const buffer = []; 50121 baseFontRef = xref.getNewTemporaryRef(); 50122 await writeObject(baseFontRef, baseFont, buffer, xref); 50123 dependencies.push({ 50124 ref: baseFontRef, 50125 data: buffer.join("") 50126 }); 50127 } 50128 promises.push(FreeTextAnnotation.createNewAnnotation(xref, annotation, dependencies, { 50129 evaluator, 50130 task, 50131 baseFontRef 50132 })); 50133 break; 50134 case AnnotationEditorType.HIGHLIGHT: 50135 if (annotation.quadPoints) { 50136 promises.push(HighlightAnnotation.createNewAnnotation(xref, annotation, dependencies)); 50137 } else { 50138 promises.push(InkAnnotation.createNewAnnotation(xref, annotation, dependencies)); 50139 } 50140 break; 50141 case AnnotationEditorType.INK: 50142 promises.push(InkAnnotation.createNewAnnotation(xref, annotation, dependencies)); 50143 break; 50144 case AnnotationEditorType.STAMP: 50145 const image = isOffscreenCanvasSupported ? await imagePromises?.get(annotation.bitmapId) : null; 50146 if (image?.imageStream) { 50147 const { 50148 imageStream, 50149 smaskStream 50150 } = image; 50151 const buffer = []; 50152 if (smaskStream) { 50153 const smaskRef = xref.getNewTemporaryRef(); 50154 await writeObject(smaskRef, smaskStream, buffer, xref); 50155 dependencies.push({ 50156 ref: smaskRef, 50157 data: buffer.join("") 50158 }); 50159 imageStream.dict.set("SMask", smaskRef); 50160 buffer.length = 0; 50161 } 50162 const imageRef = image.imageRef = xref.getNewTemporaryRef(); 50163 await writeObject(imageRef, imageStream, buffer, xref); 50164 dependencies.push({ 50165 ref: imageRef, 50166 data: buffer.join("") 50167 }); 50168 image.imageStream = image.smaskStream = null; 50169 } 50170 promises.push(StampAnnotation.createNewAnnotation(xref, annotation, dependencies, { 50171 image 50172 })); 50173 break; 50174 } 50175 } 50176 return { 50177 annotations: await Promise.all(promises), 50178 dependencies 50179 }; 50180 } 50181 static async printNewAnnotations(annotationGlobals, evaluator, task, annotations, imagePromises) { 50182 if (!annotations) { 50183 return null; 50184 } 50185 const { 50186 options, 50187 xref 50188 } = evaluator; 50189 const promises = []; 50190 for (const annotation of annotations) { 50191 if (annotation.deleted) { 50192 continue; 50193 } 50194 switch (annotation.annotationType) { 50195 case AnnotationEditorType.FREETEXT: 50196 promises.push(FreeTextAnnotation.createNewPrintAnnotation(annotationGlobals, xref, annotation, { 50197 evaluator, 50198 task, 50199 evaluatorOptions: options 50200 })); 50201 break; 50202 case AnnotationEditorType.HIGHLIGHT: 50203 if (annotation.quadPoints) { 50204 promises.push(HighlightAnnotation.createNewPrintAnnotation(annotationGlobals, xref, annotation, { 50205 evaluatorOptions: options 50206 })); 50207 } else { 50208 promises.push(InkAnnotation.createNewPrintAnnotation(annotationGlobals, xref, annotation, { 50209 evaluatorOptions: options 50210 })); 50211 } 50212 break; 50213 case AnnotationEditorType.INK: 50214 promises.push(InkAnnotation.createNewPrintAnnotation(annotationGlobals, xref, annotation, { 50215 evaluatorOptions: options 50216 })); 50217 break; 50218 case AnnotationEditorType.STAMP: 50219 const image = options.isOffscreenCanvasSupported ? await imagePromises?.get(annotation.bitmapId) : null; 50220 if (image?.imageStream) { 50221 const { 50222 imageStream, 50223 smaskStream 50224 } = image; 50225 if (smaskStream) { 50226 imageStream.dict.set("SMask", smaskStream); 50227 } 50228 image.imageRef = new JpegStream(imageStream, imageStream.length); 50229 image.imageStream = image.smaskStream = null; 50230 } 50231 promises.push(StampAnnotation.createNewPrintAnnotation(annotationGlobals, xref, annotation, { 50232 image, 50233 evaluatorOptions: options 50234 })); 50235 break; 50236 } 50237 } 50238 return Promise.all(promises); 50239 } 50240} 50241function getRgbColor(color, defaultColor = new Uint8ClampedArray(3)) { 50242 if (!Array.isArray(color)) { 50243 return defaultColor; 50244 } 50245 const rgbColor = defaultColor || new Uint8ClampedArray(3); 50246 switch (color.length) { 50247 case 0: 50248 return null; 50249 case 1: 50250 ColorSpace.singletons.gray.getRgbItem(color, 0, rgbColor, 0); 50251 return rgbColor; 50252 case 3: 50253 ColorSpace.singletons.rgb.getRgbItem(color, 0, rgbColor, 0); 50254 return rgbColor; 50255 case 4: 50256 ColorSpace.singletons.cmyk.getRgbItem(color, 0, rgbColor, 0); 50257 return rgbColor; 50258 default: 50259 return defaultColor; 50260 } 50261} 50262function getPdfColorArray(color) { 50263 return Array.from(color, c => c / 255); 50264} 50265function getQuadPoints(dict, rect) { 50266 const quadPoints = dict.getArray("QuadPoints"); 50267 if (!isNumberArray(quadPoints, null) || quadPoints.length === 0 || quadPoints.length % 8 > 0) { 50268 return null; 50269 } 50270 const newQuadPoints = new Float32Array(quadPoints.length); 50271 for (let i = 0, ii = quadPoints.length; i < ii; i += 8) { 50272 const [x1, y1, x2, y2, x3, y3, x4, y4] = quadPoints.slice(i, i + 8); 50273 const minX = Math.min(x1, x2, x3, x4); 50274 const maxX = Math.max(x1, x2, x3, x4); 50275 const minY = Math.min(y1, y2, y3, y4); 50276 const maxY = Math.max(y1, y2, y3, y4); 50277 if (rect !== null && (minX < rect[0] || maxX > rect[2] || minY < rect[1] || maxY > rect[3])) { 50278 return null; 50279 } 50280 newQuadPoints.set([minX, maxY, maxX, maxY, minX, minY, maxX, minY], i); 50281 } 50282 return newQuadPoints; 50283} 50284function getTransformMatrix(rect, bbox, matrix) { 50285 const [minX, minY, maxX, maxY] = Util.getAxialAlignedBoundingBox(bbox, matrix)
vendor: 9,823 bytes, lines 50285-50596
50285; 50286 if (minX === maxX || minY === maxY) { 50287 return [1, 0, 0, 1, rect[0], rect[1]]; 50288 } 50289 const xRatio = (rect[2] - rect[0]) / (maxX - minX); 50290 const yRatio = (rect[3] - rect[1]) / (maxY - minY); 50291 return [xRatio, 0, 0, yRatio, rect[0] - minX * xRatio, rect[1] - minY * yRatio]; 50292} 50293class Annotation { 50294 constructor(params) { 50295 const { 50296 dict, 50297 xref, 50298 annotationGlobals, 50299 ref, 50300 orphanFields 50301 } = params; 50302 const parentRef = orphanFields?.get(ref); 50303 if (parentRef) { 50304 dict.set("Parent", parentRef); 50305 } 50306 this.setTitle(dict.get("T")); 50307 this.setContents(dict.get("Contents")); 50308 this.setModificationDate(dict.get("M")); 50309 this.setFlags(dict.get("F")); 50310 this.setRectangle(dict.getArray("Rect")); 50311 this.setColor(dict.getArray("C")); 50312 this.setBorderStyle(dict); 50313 this.setAppearance(dict); 50314 this.setOptionalContent(dict); 50315 const MK = dict.get("MK"); 50316 this.setBorderAndBackgroundColors(MK); 50317 this.setRotation(MK, dict); 50318 this.ref = params.ref instanceof Ref ? params.ref : null; 50319 this._streams = []; 50320 if (this.appearance) { 50321 this._streams.push(this.appearance); 50322 } 50323 const isLocked = !!(this.flags & AnnotationFlag.LOCKED); 50324 const isContentLocked = !!(this.flags & AnnotationFlag.LOCKEDCONTENTS); 50325 this.data = { 50326 annotationFlags: this.flags, 50327 borderStyle: this.borderStyle, 50328 color: this.color, 50329 backgroundColor: this.backgroundColor, 50330 borderColor: this.borderColor, 50331 rotation: this.rotation, 50332 contentsObj: this._contents, 50333 hasAppearance: !!this.appearance, 50334 id: params.id, 50335 modificationDate: this.modificationDate, 50336 rect: this.rectangle, 50337 subtype: params.subtype, 50338 hasOwnCanvas: false, 50339 noRotate: !!(this.flags & AnnotationFlag.NOROTATE), 50340 noHTML: isLocked && isContentLocked, 50341 isEditable: false, 50342 structParent: -1 50343 }; 50344 if (annotationGlobals.structTreeRoot) { 50345 let structParent = dict.get("StructParent"); 50346 this.data.structParent = structParent = Number.isInteger(structParent) && structParent >= 0 ? structParent : -1; 50347 annotationGlobals.structTreeRoot.addAnnotationIdToPage(params.pageRef, structParent); 50348 } 50349 if (params.collectFields) { 50350 const kids = dict.get("Kids"); 50351 if (Array.isArray(kids)) { 50352 const kidIds = []; 50353 for (const kid of kids) { 50354 if (kid instanceof Ref) { 50355 kidIds.push(kid.toString()); 50356 } 50357 } 50358 if (kidIds.length !== 0) { 50359 this.data.kidIds = kidIds; 50360 } 50361 } 50362 this.data.actions = collectActions(xref, dict, AnnotationActionEventType); 50363 this.data.fieldName = this._constructFieldName(dict); 50364 this.data.pageIndex = params.pageIndex; 50365 } 50366 const it = dict.get("IT"); 50367 if (it instanceof Name) { 50368 this.data.it = it.name; 50369 } 50370 this._isOffscreenCanvasSupported = params.evaluatorOptions.isOffscreenCanvasSupported; 50371 this._fallbackFontDict = null; 50372 this._needAppearances = false; 50373 } 50374 _hasFlag(flags, flag) { 50375 return !!(flags & flag); 50376 } 50377 _buildFlags(noView, noPrint) { 50378 let { 50379 flags 50380 } = this; 50381 if (noView === undefined) { 50382 if (noPrint === undefined) { 50383 return undefined; 50384 } 50385 if (noPrint) { 50386 return flags & ~AnnotationFlag.PRINT; 50387 } 50388 return flags & ~AnnotationFlag.HIDDEN | AnnotationFlag.PRINT; 50389 } 50390 if (noView) { 50391 flags |= AnnotationFlag.PRINT; 50392 if (noPrint) { 50393 return flags & ~AnnotationFlag.NOVIEW | AnnotationFlag.HIDDEN; 50394 } 50395 return flags & ~AnnotationFlag.HIDDEN | AnnotationFlag.NOVIEW; 50396 } 50397 flags &= ~(AnnotationFlag.HIDDEN | AnnotationFlag.NOVIEW); 50398 if (noPrint) { 50399 return flags & ~AnnotationFlag.PRINT; 50400 } 50401 return flags | AnnotationFlag.PRINT; 50402 } 50403 _isViewable(flags) { 50404 return !this._hasFlag(flags, AnnotationFlag.INVISIBLE) && !this._hasFlag(flags, AnnotationFlag.NOVIEW); 50405 } 50406 _isPrintable(flags) { 50407 return this._hasFlag(flags, AnnotationFlag.PRINT) && !this._hasFlag(flags, AnnotationFlag.HIDDEN) && !this._hasFlag(flags, AnnotationFlag.INVISIBLE); 50408 } 50409 mustBeViewed(annotationStorage, _renderForms) { 50410 const noView = annotationStorage?.get(this.data.id)?.noView; 50411 if (noView !== undefined) { 50412 return !noView; 50413 } 50414 return this.viewable && !this._hasFlag(this.flags, AnnotationFlag.HIDDEN); 50415 } 50416 mustBePrinted(annotationStorage) { 50417 const noPrint = annotationStorage?.get(this.data.id)?.noPrint; 50418 if (noPrint !== undefined) { 50419 return !noPrint; 50420 } 50421 return this.printable; 50422 } 50423 mustBeViewedWhenEditing(isEditing, modifiedIds = null) { 50424 return isEditing ? !this.data.isEditable : !modifiedIds?.has(this.data.id); 50425 } 50426 get viewable() { 50427 if (this.data.quadPoints === null) { 50428 return false; 50429 } 50430 if (this.flags === 0) { 50431 return true; 50432 } 50433 return this._isViewable(this.flags); 50434 } 50435 get printable() { 50436 if (this.data.quadPoints === null) { 50437 return false; 50438 } 50439 if (this.flags === 0) { 50440 return false; 50441 } 50442 return this._isPrintable(this.flags); 50443 } 50444 _parseStringHelper(data) { 50445 const str = typeof data === "string" ? stringToPDFString(data) : ""; 50446 const dir = str && bidi(str).dir === "rtl" ? "rtl" : "ltr"; 50447 return { 50448 str, 50449 dir 50450 }; 50451 } 50452 setDefaultAppearance(params) { 50453 const { 50454 dict, 50455 annotationGlobals 50456 } = params; 50457 const defaultAppearance = getInheritableProperty({ 50458 dict, 50459 key: "DA" 50460 }) || annotationGlobals.acroForm.get("DA"); 50461 this._defaultAppearance = typeof defaultAppearance === "string" ? defaultAppearance : ""; 50462 this.data.defaultAppearanceData = parseDefaultAppearance(this._defaultAppearance); 50463 } 50464 setTitle(title) { 50465 this._title = this._parseStringHelper(title); 50466 } 50467 setContents(contents) { 50468 this._contents = this._parseStringHelper(contents); 50469 } 50470 setModificationDate(modificationDate) { 50471 this.modificationDate = typeof modificationDate === "string" ? modificationDate : null; 50472 } 50473 setFlags(flags) { 50474 this.flags = Number.isInteger(flags) && flags > 0 ? flags : 0; 50475 if (this.flags & AnnotationFlag.INVISIBLE && this.constructor.name !== "Annotation") { 50476 this.flags ^= AnnotationFlag.INVISIBLE; 50477 } 50478 } 50479 hasFlag(flag) { 50480 return this._hasFlag(this.flags, flag); 50481 } 50482 setRectangle(rectangle) { 50483 this.rectangle = lookupNormalRect(rectangle, [0, 0, 0, 0]); 50484 } 50485 setColor(color) { 50486 this.color = getRgbColor(color); 50487 } 50488 setLineEndings(lineEndings) { 50489 this.lineEndings = ["None", "None"]; 50490 if (Array.isArray(lineEndings) && lineEndings.length === 2) { 50491 for (let i = 0; i < 2; i++) { 50492 const obj = lineEndings[i]; 50493 if (obj instanceof Name) { 50494 switch (obj.name) { 50495 case "None": 50496 continue; 50497 case "Square": 50498 case "Circle": 50499 case "Diamond": 50500 case "OpenArrow": 50501 case "ClosedArrow": 50502 case "Butt": 50503 case "ROpenArrow": 50504 case "RClosedArrow": 50505 case "Slash": 50506 this.lineEndings[i] = obj.name; 50507 continue; 50508 } 50509 } 50510 warn(`Ignoring invalid lineEnding: ${obj}`); 50511 } 50512 } 50513 } 50514 setRotation(mk, dict) { 50515 this.rotation = 0; 50516 let angle = mk instanceof Dict ? mk.get("R") || 0 : dict.get("Rotate") || 0; 50517 if (Number.isInteger(angle) && angle !== 0) { 50518 angle %= 360; 50519 if (angle < 0) { 50520 angle += 360; 50521 } 50522 if (angle % 90 === 0) { 50523 this.rotation = angle; 50524 } 50525 } 50526 } 50527 setBorderAndBackgroundColors(mk) { 50528 if (mk instanceof Dict) { 50529 this.borderColor = getRgbColor(mk.getArray("BC"), null); 50530 this.backgroundColor = getRgbColor(mk.getArray("BG"), null); 50531 } else { 50532 this.borderColor = this.backgroundColor = null; 50533 } 50534 } 50535 setBorderStyle(borderStyle) { 50536 this.borderStyle = new AnnotationBorderStyle(); 50537 if (!(borderStyle instanceof Dict)) { 50538 return; 50539 } 50540 if (borderStyle.has("BS")) { 50541 const dict = borderStyle.get("BS"); 50542 if (dict instanceof Dict) { 50543 const dictType = dict.get("Type"); 50544 if (!dictType || isName(dictType, "Border")) { 50545 this.borderStyle.setWidth(dict.get("W"), this.rectangle); 50546 this.borderStyle.setStyle(dict.get("S")); 50547 this.borderStyle.setDashArray(dict.getArray("D")); 50548 } 50549 } 50550 } else if (borderStyle.has("Border")) { 50551 const array = borderStyle.getArray("Border"); 50552 if (Array.isArray(array) && array.length >= 3) { 50553 this.borderStyle.setHorizontalCornerRadius(array[0]); 50554 this.borderStyle.setVerticalCornerRadius(array[1]); 50555 this.borderStyle.setWidth(array[2], this.rectangle); 50556 if (array.length === 4) { 50557 this.borderStyle.setDashArray(array[3], true); 50558 } 50559 } 50560 } else { 50561 this.borderStyle.setWidth(0); 50562 } 50563 } 50564 setAppearance(dict) { 50565 this.appearance = null; 50566 const appearanceStates = dict.get("AP"); 50567 if (!(appearanceStates instanceof Dict)) { 50568 return; 50569 } 50570 const normalAppearanceState = appearanceStates.get("N"); 50571 if (normalAppearanceState instanceof BaseStream) { 50572 this.appearance = normalAppearanceState; 50573 return; 50574 } 50575 if (!(normalAppearanceState instanceof Dict)) { 50576 return; 50577 } 50578 const as = dict.get("AS"); 50579 if (!(as instanceof Name) || !normalAppearanceState.has(as.name)) { 50580 return; 50581 } 50582 const appearance = normalAppearanceState.get(as.name); 50583 if (appearance instanceof BaseStream) { 50584 this.appearance = appearance; 50585 } 50586 } 50587 setOptionalContent(dict) { 50588 this.oc = null; 50589 const oc = dict.get("OC"); 50590 if (oc instanceof Name) { 50591 warn("setOptionalContent: Support for /Name-entry is not implemented."); 50592 } else if (oc instanceof Dict) { 50593 this.oc = oc; 50594 } 50595 } 50596
vendor: 21,637 bytes, lines 50596-51257
50596loadResources(keys, appearance) { 50597 return appearance.dict.getAsync("Resources").then(resources => { 50598 if (!resources) { 50599 return undefined; 50600 } 50601 const objectLoader = new ObjectLoader(resources, keys, resources.xref); 50602 return objectLoader.load().then(function () { 50603 return resources; 50604 }); 50605 }); 50606 } 50607 async getOperatorList(evaluator, task, intent, annotationStorage) { 50608 const { 50609 hasOwnCanvas, 50610 id, 50611 rect 50612 } = this.data; 50613 let appearance = this.appearance; 50614 const isUsingOwnCanvas = !!(hasOwnCanvas && intent & RenderingIntentFlag.DISPLAY); 50615 if (isUsingOwnCanvas && (rect[0] === rect[2] || rect[1] === rect[3])) { 50616 this.data.hasOwnCanvas = false; 50617 return { 50618 opList: new OperatorList(), 50619 separateForm: false, 50620 separateCanvas: false 50621 }; 50622 } 50623 if (!appearance) { 50624 if (!isUsingOwnCanvas) { 50625 return { 50626 opList: new OperatorList(), 50627 separateForm: false, 50628 separateCanvas: false 50629 }; 50630 } 50631 appearance = new StringStream(""); 50632 appearance.dict = new Dict(); 50633 } 50634 const appearanceDict = appearance.dict; 50635 const resources = await this.loadResources(["ExtGState", "ColorSpace", "Pattern", "Shading", "XObject", "Font"], appearance); 50636 const bbox = lookupRect(appearanceDict.getArray("BBox"), [0, 0, 1, 1]); 50637 const matrix = lookupMatrix(appearanceDict.getArray("Matrix"), IDENTITY_MATRIX); 50638 const transform = getTransformMatrix(rect, bbox, matrix); 50639 const opList = new OperatorList(); 50640 let optionalContent; 50641 if (this.oc) { 50642 optionalContent = await evaluator.parseMarkedContentProps(this.oc, null); 50643 } 50644 if (optionalContent !== undefined) { 50645 opList.addOp(OPS.beginMarkedContentProps, ["OC", optionalContent]); 50646 } 50647 opList.addOp(OPS.beginAnnotation, [id, rect, transform, matrix, isUsingOwnCanvas]); 50648 await evaluator.getOperatorList({ 50649 stream: appearance, 50650 task, 50651 resources, 50652 operatorList: opList, 50653 fallbackFontDict: this._fallbackFontDict 50654 }); 50655 opList.addOp(OPS.endAnnotation, []); 50656 if (optionalContent !== undefined) { 50657 opList.addOp(OPS.endMarkedContent, []); 50658 } 50659 this.reset(); 50660 return { 50661 opList, 50662 separateForm: false, 50663 separateCanvas: isUsingOwnCanvas 50664 }; 50665 } 50666 async save(evaluator, task, annotationStorage) { 50667 return null; 50668 } 50669 get hasTextContent() { 50670 return false; 50671 } 50672 async extractTextContent(evaluator, task, viewBox) { 50673 if (!this.appearance) { 50674 return; 50675 } 50676 const resources = await this.loadResources(["ExtGState", "Font", "Properties", "XObject"], this.appearance); 50677 const text = []; 50678 const buffer = []; 50679 let firstPosition = null; 50680 const sink = { 50681 desiredSize: Math.Infinity, 50682 ready: true, 50683 enqueue(chunk, size) { 50684 for (const item of chunk.items) { 50685 if (item.str === undefined) { 50686 continue; 50687 } 50688 firstPosition ||= item.transform.slice(-2); 50689 buffer.push(item.str); 50690 if (item.hasEOL) { 50691 text.push(buffer.join("").trimEnd()); 50692 buffer.length = 0; 50693 } 50694 } 50695 } 50696 }; 50697 await evaluator.getTextContent({ 50698 stream: this.appearance, 50699 task, 50700 resources, 50701 includeMarkedContent: true, 50702 keepWhiteSpace: true, 50703 sink, 50704 viewBox 50705 }); 50706 this.reset(); 50707 if (buffer.length) { 50708 text.push(buffer.join("").trimEnd()); 50709 } 50710 if (text.length > 1 || text[0]) { 50711 const appearanceDict = this.appearance.dict; 50712 const bbox = lookupRect(appearanceDict.getArray("BBox"), null); 50713 const matrix = lookupMatrix(appearanceDict.getArray("Matrix"), null); 50714 this.data.textPosition = this._transformPoint(firstPosition, bbox, matrix); 50715 this.data.textContent = text; 50716 } 50717 } 50718 _transformPoint(coords, bbox, matrix) { 50719 const { 50720 rect 50721 } = this.data; 50722 bbox ||= [0, 0, 1, 1]; 50723 matrix ||= [1, 0, 0, 1, 0, 0]; 50724 const transform = getTransformMatrix(rect, bbox, matrix); 50725 transform[4] -= rect[0]; 50726 transform[5] -= rect[1]; 50727 coords = Util.applyTransform(coords, transform); 50728 return Util.applyTransform(coords, matrix); 50729 } 50730 getFieldObject() { 50731 if (this.data.kidIds) { 50732 return { 50733 id: this.data.id, 50734 actions: this.data.actions, 50735 name: this.data.fieldName, 50736 strokeColor: this.data.borderColor, 50737 fillColor: this.data.backgroundColor, 50738 type: "", 50739 kidIds: this.data.kidIds, 50740 page: this.data.pageIndex, 50741 rotation: this.rotation 50742 }; 50743 } 50744 return null; 50745 } 50746 reset() { 50747 for (const stream of this._streams) { 50748 stream.reset(); 50749 } 50750 } 50751 _constructFieldName(dict) { 50752 if (!dict.has("T") && !dict.has("Parent")) { 50753 warn("Unknown field name, falling back to empty field name."); 50754 return ""; 50755 } 50756 if (!dict.has("Parent")) { 50757 return stringToPDFString(dict.get("T")); 50758 } 50759 const fieldName = []; 50760 if (dict.has("T")) { 50761 fieldName.unshift(stringToPDFString(dict.get("T"))); 50762 } 50763 let loopDict = dict; 50764 const visited = new RefSet(); 50765 if (dict.objId) { 50766 visited.put(dict.objId); 50767 } 50768 while (loopDict.has("Parent")) { 50769 loopDict = loopDict.get("Parent"); 50770 if (!(loopDict instanceof Dict) || loopDict.objId && visited.has(loopDict.objId)) { 50771 break; 50772 } 50773 if (loopDict.objId) { 50774 visited.put(loopDict.objId); 50775 } 50776 if (loopDict.has("T")) { 50777 fieldName.unshift(stringToPDFString(loopDict.get("T"))); 50778 } 50779 } 50780 return fieldName.join("."); 50781 } 50782} 50783class AnnotationBorderStyle { 50784 constructor() { 50785 this.width = 1; 50786 this.rawWidth = 1; 50787 this.style = AnnotationBorderStyleType.SOLID; 50788 this.dashArray = [3]; 50789 this.horizontalCornerRadius = 0; 50790 this.verticalCornerRadius = 0; 50791 } 50792 setWidth(width, rect = [0, 0, 0, 0]) { 50793 if (width instanceof Name) { 50794 this.width = 0; 50795 return; 50796 } 50797 if (typeof width === "number") { 50798 if (width > 0) { 50799 this.rawWidth = width; 50800 const maxWidth = (rect[2] - rect[0]) / 2; 50801 const maxHeight = (rect[3] - rect[1]) / 2; 50802 if (maxWidth > 0 && maxHeight > 0 && (width > maxWidth || width > maxHeight)) { 50803 warn(`AnnotationBorderStyle.setWidth - ignoring width: ${width}`); 50804 width = 1; 50805 } 50806 } 50807 this.width = width; 50808 } 50809 } 50810 setStyle(style) { 50811 if (!(style instanceof Name)) { 50812 return; 50813 } 50814 switch (style.name) { 50815 case "S": 50816 this.style = AnnotationBorderStyleType.SOLID; 50817 break; 50818 case "D": 50819 this.style = AnnotationBorderStyleType.DASHED; 50820 break; 50821 case "B": 50822 this.style = AnnotationBorderStyleType.BEVELED; 50823 break; 50824 case "I": 50825 this.style = AnnotationBorderStyleType.INSET; 50826 break; 50827 case "U": 50828 this.style = AnnotationBorderStyleType.UNDERLINE; 50829 break; 50830 default: 50831 break; 50832 } 50833 } 50834 setDashArray(dashArray, forceStyle = false) { 50835 if (Array.isArray(dashArray)) { 50836 let isValid = true; 50837 let allZeros = true; 50838 for (const element of dashArray) { 50839 const validNumber = +element >= 0; 50840 if (!validNumber) { 50841 isValid = false; 50842 break; 50843 } else if (element > 0) { 50844 allZeros = false; 50845 } 50846 } 50847 if (dashArray.length === 0 || isValid && !allZeros) { 50848 this.dashArray = dashArray; 50849 if (forceStyle) { 50850 this.setStyle(Name.get("D")); 50851 } 50852 } else { 50853 this.width = 0; 50854 } 50855 } else if (dashArray) { 50856 this.width = 0; 50857 } 50858 } 50859 setHorizontalCornerRadius(radius) { 50860 if (Number.isInteger(radius)) { 50861 this.horizontalCornerRadius = radius; 50862 } 50863 } 50864 setVerticalCornerRadius(radius) { 50865 if (Number.isInteger(radius)) { 50866 this.verticalCornerRadius = radius; 50867 } 50868 } 50869} 50870class MarkupAnnotation extends Annotation { 50871 constructor(params) { 50872 super(params); 50873 const { 50874 dict 50875 } = params; 50876 if (dict.has("IRT")) { 50877 const rawIRT = dict.getRaw("IRT"); 50878 this.data.inReplyTo = rawIRT instanceof Ref ? rawIRT.toString() : null; 50879 const rt = dict.get("RT"); 50880 this.data.replyType = rt instanceof Name ? rt.name : AnnotationReplyType.REPLY; 50881 } 50882 let popupRef = null; 50883 if (this.data.replyType === AnnotationReplyType.GROUP) { 50884 const parent = dict.get("IRT"); 50885 this.setTitle(parent.get("T")); 50886 this.data.titleObj = this._title; 50887 this.setContents(parent.get("Contents")); 50888 this.data.contentsObj = this._contents; 50889 if (!parent.has("CreationDate")) { 50890 this.data.creationDate = null; 50891 } else { 50892 this.setCreationDate(parent.get("CreationDate")); 50893 this.data.creationDate = this.creationDate; 50894 } 50895 if (!parent.has("M")) { 50896 this.data.modificationDate = null; 50897 } else { 50898 this.setModificationDate(parent.get("M")); 50899 this.data.modificationDate = this.modificationDate; 50900 } 50901 popupRef = parent.getRaw("Popup"); 50902 if (!parent.has("C")) { 50903 this.data.color = null; 50904 } else { 50905 this.setColor(parent.getArray("C")); 50906 this.data.color = this.color; 50907 } 50908 } else { 50909 this.data.titleObj = this._title; 50910 this.setCreationDate(dict.get("CreationDate")); 50911 this.data.creationDate = this.creationDate; 50912 popupRef = dict.getRaw("Popup"); 50913 if (!dict.has("C")) { 50914 this.data.color = null; 50915 } 50916 } 50917 this.data.popupRef = popupRef instanceof Ref ? popupRef.toString() : null; 50918 if (dict.has("RC")) { 50919 this.data.richText = XFAFactory.getRichTextAsHtml(dict.get("RC")); 50920 } 50921 } 50922 setCreationDate(creationDate) { 50923 this.creationDate = typeof creationDate === "string" ? creationDate : null; 50924 } 50925 _setDefaultAppearance({ 50926 xref, 50927 extra, 50928 strokeColor, 50929 fillColor, 50930 blendMode, 50931 strokeAlpha, 50932 fillAlpha, 50933 pointsCallback 50934 }) { 50935 let minX = Number.MAX_VALUE; 50936 let minY = Number.MAX_VALUE; 50937 let maxX = Number.MIN_VALUE; 50938 let maxY = Number.MIN_VALUE; 50939 const buffer = ["q"]; 50940 if (extra) { 50941 buffer.push(extra); 50942 } 50943 if (strokeColor) { 50944 buffer.push(`${strokeColor[0]} ${strokeColor[1]} ${strokeColor[2]} RG`); 50945 } 50946 if (fillColor) { 50947 buffer.push(`${fillColor[0]} ${fillColor[1]} ${fillColor[2]} rg`); 50948 } 50949 let pointsArray = this.data.quadPoints; 50950 if (!pointsArray) { 50951 pointsArray = Float32Array.from([this.rectangle[0], this.rectangle[3], this.rectangle[2], this.rectangle[3], this.rectangle[0], this.rectangle[1], this.rectangle[2], this.rectangle[1]]); 50952 } 50953 for (let i = 0, ii = pointsArray.length; i < ii; i += 8) { 50954 const [mX, MX, mY, MY] = pointsCallback(buffer, pointsArray.subarray(i, i + 8)); 50955 minX = Math.min(minX, mX); 50956 maxX = Math.max(maxX, MX); 50957 minY = Math.min(minY, mY); 50958 maxY = Math.max(maxY, MY); 50959 } 50960 buffer.push("Q"); 50961 const formDict = new Dict(xref); 50962 const appearanceStreamDict = new Dict(xref); 50963 appearanceStreamDict.set("Subtype", Name.get("Form")); 50964 const appearanceStream = new StringStream(buffer.join(" ")); 50965 appearanceStream.dict = appearanceStreamDict; 50966 formDict.set("Fm0", appearanceStream); 50967 const gsDict = new Dict(xref); 50968 if (blendMode) { 50969 gsDict.set("BM", Name.get(blendMode)); 50970 } 50971 if (typeof strokeAlpha === "number") { 50972 gsDict.set("CA", strokeAlpha); 50973 } 50974 if (typeof fillAlpha === "number") { 50975 gsDict.set("ca", fillAlpha); 50976 } 50977 const stateDict = new Dict(xref); 50978 stateDict.set("GS0", gsDict); 50979 const resources = new Dict(xref); 50980 resources.set("ExtGState", stateDict); 50981 resources.set("XObject", formDict); 50982 const appearanceDict = new Dict(xref); 50983 appearanceDict.set("Resources", resources); 50984 const bbox = this.data.rect = [minX, minY, maxX, maxY]; 50985 appearanceDict.set("BBox", bbox); 50986 this.appearance = new StringStream("/GS0 gs /Fm0 Do"); 50987 this.appearance.dict = appearanceDict; 50988 this._streams.push(this.appearance, appearanceStream); 50989 } 50990 static async createNewAnnotation(xref, annotation, dependencies, params) { 50991 if (!annotation.ref) { 50992 annotation.ref = xref.getNewTemporaryRef(); 50993 } 50994 const annotationRef = annotation.ref; 50995 const ap = await this.createNewAppearanceStream(annotation, xref, params); 50996 const buffer = []; 50997 let annotationDict; 50998 if (ap) { 50999 const apRef = xref.getNewTemporaryRef(); 51000 annotationDict = this.createNewDict(annotation, xref, { 51001 apRef 51002 }); 51003 await writeObject(apRef, ap, buffer, xref); 51004 dependencies.push({ 51005 ref: apRef, 51006 data: buffer.join("") 51007 }); 51008 } else { 51009 annotationDict = this.createNewDict(annotation, xref, {}); 51010 } 51011 if (Number.isInteger(annotation.parentTreeId)) { 51012 annotationDict.set("StructParent", annotation.parentTreeId); 51013 } 51014 buffer.length = 0; 51015 await writeObject(annotationRef, annotationDict, buffer, xref); 51016 return { 51017 ref: annotationRef, 51018 data: buffer.join("") 51019 }; 51020 } 51021 static async createNewPrintAnnotation(annotationGlobals, xref, annotation, params) { 51022 const ap = await this.createNewAppearanceStream(annotation, xref, params); 51023 const annotationDict = this.createNewDict(annotation, xref, ap ? { 51024 ap 51025 } : {}); 51026 const newAnnotation = new this.prototype.constructor({ 51027 dict: annotationDict, 51028 xref, 51029 annotationGlobals, 51030 evaluatorOptions: params.evaluatorOptions 51031 }); 51032 if (annotation.ref) { 51033 newAnnotation.ref = newAnnotation.refToReplace = annotation.ref; 51034 } 51035 return newAnnotation; 51036 } 51037} 51038class WidgetAnnotation extends Annotation { 51039 constructor(params) { 51040 super(params); 51041 const { 51042 dict, 51043 xref, 51044 annotationGlobals 51045 } = params; 51046 const data = this.data; 51047 this._needAppearances = params.needAppearances; 51048 data.annotationType = AnnotationType.WIDGET; 51049 if (data.fieldName === undefined) { 51050 data.fieldName = this._constructFieldName(dict); 51051 } 51052 if (data.actions === undefined) { 51053 data.actions = collectActions(xref, dict, AnnotationActionEventType); 51054 } 51055 let fieldValue = getInheritableProperty({ 51056 dict, 51057 key: "V", 51058 getArray: true 51059 }); 51060 data.fieldValue = this._decodeFormValue(fieldValue); 51061 const defaultFieldValue = getInheritableProperty({ 51062 dict, 51063 key: "DV", 51064 getArray: true 51065 }); 51066 data.defaultFieldValue = this._decodeFormValue(defaultFieldValue); 51067 if (fieldValue === undefined && annotationGlobals.xfaDatasets) { 51068 const path = this._title.str; 51069 if (path) { 51070 this._hasValueFromXFA = true; 51071 data.fieldValue = fieldValue = annotationGlobals.xfaDatasets.getValue(path); 51072 } 51073 } 51074 if (fieldValue === undefined && data.defaultFieldValue !== null) { 51075 data.fieldValue = data.defaultFieldValue; 51076 } 51077 data.alternativeText = stringToPDFString(dict.get("TU") || ""); 51078 this.setDefaultAppearance(params); 51079 data.hasAppearance ||= this._needAppearances && data.fieldValue !== undefined && data.fieldValue !== null; 51080 const fieldType = getInheritableProperty({ 51081 dict, 51082 key: "FT" 51083 }); 51084 data.fieldType = fieldType instanceof Name ? fieldType.name : null; 51085 const localResources = getInheritableProperty({ 51086 dict, 51087 key: "DR" 51088 }); 51089 const acroFormResources = annotationGlobals.acroForm.get("DR"); 51090 const appearanceResources = this.appearance?.dict.get("Resources"); 51091 this._fieldResources = { 51092 localResources, 51093 acroFormResources, 51094 appearanceResources, 51095 mergedResources: Dict.merge({ 51096 xref, 51097 dictArray: [localResources, appearanceResources, acroFormResources], 51098 mergeSubDicts: true 51099 }) 51100 }; 51101 data.fieldFlags = getInheritableProperty({ 51102 dict, 51103 key: "Ff" 51104 }); 51105 if (!Number.isInteger(data.fieldFlags) || data.fieldFlags < 0) { 51106 data.fieldFlags = 0; 51107 } 51108 data.readOnly = this.hasFieldFlag(AnnotationFieldFlag.READONLY); 51109 data.required = this.hasFieldFlag(AnnotationFieldFlag.REQUIRED); 51110 data.hidden = this._hasFlag(data.annotationFlags, AnnotationFlag.HIDDEN) || this._hasFlag(data.annotationFlags, AnnotationFlag.NOVIEW); 51111 } 51112 _decodeFormValue(formValue) { 51113 if (Array.isArray(formValue)) { 51114 return formValue.filter(item => typeof item === "string").map(item => stringToPDFString(item)); 51115 } else if (formValue instanceof Name) { 51116 return stringToPDFString(formValue.name); 51117 } else if (typeof formValue === "string") { 51118 return stringToPDFString(formValue); 51119 } 51120 return null; 51121 } 51122 hasFieldFlag(flag) { 51123 return !!(this.data.fieldFlags & flag); 51124 } 51125 _isViewable(flags) { 51126 return true; 51127 } 51128 mustBeViewed(annotationStorage, renderForms) { 51129 if (renderForms) { 51130 return this.viewable; 51131 } 51132 return super.mustBeViewed(annotationStorage, renderForms) && !this._hasFlag(this.flags, AnnotationFlag.NOVIEW); 51133 } 51134 getRotationMatrix(annotationStorage) { 51135 let rotation = annotationStorage?.get(this.data.id)?.rotation; 51136 if (rotation === undefined) { 51137 rotation = this.rotation; 51138 } 51139 if (rotation === 0) { 51140 return IDENTITY_MATRIX; 51141 } 51142 const width = this.data.rect[2] - this.data.rect[0]; 51143 const height = this.data.rect[3] - this.data.rect[1]; 51144 return getRotationMatrix(rotation, width, height); 51145 } 51146 getBorderAndBackgroundAppearances(annotationStorage) { 51147 let rotation = annotationStorage?.get(this.data.id)?.rotation; 51148 if (rotation === undefined) { 51149 rotation = this.rotation; 51150 } 51151 if (!this.backgroundColor && !this.borderColor) { 51152 return ""; 51153 } 51154 const width = this.data.rect[2] - this.data.rect[0]; 51155 const height = this.data.rect[3] - this.data.rect[1]; 51156 const rect = rotation === 0 || rotation === 180 ? `0 0 ${width} ${height} re` : `0 0 ${height} ${width} re`; 51157 let str = ""; 51158 if (this.backgroundColor) { 51159 str = `${getPdfColor(this.backgroundColor, true)} ${rect} f `; 51160 } 51161 if (this.borderColor) { 51162 const borderWidth = this.borderStyle.width || 1; 51163 str += `${borderWidth} w ${getPdfColor(this.borderColor, false)} ${rect} S `; 51164 } 51165 return str; 51166 } 51167 async getOperatorList(evaluator, task, intent, annotationStorage) { 51168 if (intent & RenderingIntentFlag.ANNOTATIONS_FORMS && !(this instanceof SignatureWidgetAnnotation) && !this.data.noHTML && !this.data.hasOwnCanvas) { 51169 return { 51170 opList: new OperatorList(), 51171 separateForm: true, 51172 separateCanvas: false 51173 }; 51174 } 51175 if (!this._hasText) { 51176 return super.getOperatorList(evaluator, task, intent, annotationStorage); 51177 } 51178 const content = await this._getAppearance(evaluator, task, intent, annotationStorage); 51179 if (this.appearance && content === null) { 51180 return super.getOperatorList(evaluator, task, intent, annotationStorage); 51181 } 51182 const opList = new OperatorList(); 51183 if (!this._defaultAppearance || content === null) { 51184 return { 51185 opList, 51186 separateForm: false, 51187 separateCanvas: false 51188 }; 51189 } 51190 const isUsingOwnCanvas = !!(this.data.hasOwnCanvas && intent & RenderingIntentFlag.DISPLAY); 51191 const matrix = [1, 0, 0, 1, 0, 0]; 51192 const bbox = [0, 0, this.data.rect[2] - this.data.rect[0], this.data.rect[3] - this.data.rect[1]]; 51193 const transform = getTransformMatrix(this.data.rect, bbox, matrix); 51194 let optionalContent; 51195 if (this.oc) { 51196 optionalContent = await evaluator.parseMarkedContentProps(this.oc, null); 51197 } 51198 if (optionalContent !== undefined) { 51199 opList.addOp(OPS.beginMarkedContentProps, ["OC", optionalContent]); 51200 } 51201 opList.addOp(OPS.beginAnnotation, [this.data.id, this.data.rect, transform, this.getRotationMatrix(annotationStorage), isUsingOwnCanvas]); 51202 const stream = new StringStream(content); 51203 await evaluator.getOperatorList({ 51204 stream, 51205 task, 51206 resources: this._fieldResources.mergedResources, 51207 operatorList: opList 51208 }); 51209 opList.addOp(OPS.endAnnotation, []); 51210 if (optionalContent !== undefined) { 51211 opList.addOp(OPS.endMarkedContent, []); 51212 } 51213 return { 51214 opList, 51215 separateForm: false, 51216 separateCanvas: isUsingOwnCanvas 51217 }; 51218 } 51219 _getMKDict(rotation) { 51220 const mk = new Dict(null); 51221 if (rotation) { 51222 mk.set("R", rotation); 51223 } 51224 if (this.borderColor) { 51225 mk.set("BC", getPdfColorArray(this.borderColor)); 51226 } 51227 if (this.backgroundColor) { 51228 mk.set("BG", getPdfColorArray(this.backgroundColor)); 51229 } 51230 return mk.size > 0 ? mk : null; 51231 } 51232 amendSavedDict(annotationStorage, dict) {} 51233 async save(evaluator, task, annotationStorage) { 51234 const storageEntry = annotationStorage?.get(this.data.id); 51235 const flags = this._buildFlags(storageEntry?.noView, storageEntry?.noPrint); 51236 let value = storageEntry?.value, 51237 rotation = storageEntry?.rotation; 51238 if (value === this.data.fieldValue || value === undefined) { 51239 if (!this._hasValueFromXFA && rotation === undefined && flags === undefined) { 51240 return null; 51241 } 51242 value ||= this.data.fieldValue; 51243 } 51244 if (rotation === undefined && !this._hasValueFromXFA && Array.isArray(value) && Array.isArray(this.data.fieldValue) && isArrayEqual(value, this.data.fieldValue) && flags === undefined) { 51245 return null; 51246 } 51247 if (rotation === undefined) { 51248 rotation = this.rotation; 51249 } 51250 let appearance = null; 51251 if (!this._needAppearances) { 51252 appearance = await this._getAppearance(evaluator, task, RenderingIntentFlag.SAVE, annotationStorage); 51253 if (appearance === null && flags === undefined) { 51254 return null; 51255 } 51256 } else {} 51257 let needAppearances = false;
51258 if (appearance?.needAppearances) { 51259 needAppearances = true; 51260 appearance = null; 51261 } 51262 const { 51263 xref 51264 } = evaluator; 51265 const originalDict = xref.fetchIfRef(this.ref); 51266 if (!(originalDict instanceof Dict)) { 51267 return null; 51268 } 51269 const dict = new Dict(xref); 51270 for (const key of originalDict.getKeys()) { 51271 if (key !== "AP") { 51272 dict.set(key, originalDict.getRaw(key)); 51273 } 51274 } 51275 if (flags !== undefined) { 51276 dict.set("F", flags); 51277 if (appearance === null && !needAppearances) { 51278 const ap = originalDict.getRaw("AP"); 51279 if (ap) { 51280 dict.set("AP", ap); 51281 } 51282 } 51283 } 51284 const xfa = { 51285 path: this.data.fieldName, 51286 value 51287 }; 51288 dict.set("V", Array.isArray(value) ? value.map(stringToAsciiOrUTF16BE) : stringToAsciiOrUTF16BE(value)); 51289 this.amendSavedDict(annotationStorage, dict); 51290 const maybeMK = this._getMKDict(rotation); 51291 if (maybeMK) { 51292 dict.set("MK", maybeMK); 51293 } 51294 const buffer = []; 51295 const changes = [{ 51296 ref: this.ref, 51297 data: "", 51298 xfa, 51299 needAppearances 51300 }]; 51301 if (appearance !== null) { 51302 const newRef = xref.getNewTemporaryRef(); 51303 const AP = new Dict(xref); 51304 dict.set("AP", AP); 51305 AP.set("N", newRef); 51306 const resources = this._getSaveFieldResources(xref); 51307 const appearanceStream = new StringStream(appearance); 51308 const appearanceDict = appearanceStream.dict = new Dict(xref); 51309 appearanceDict.set("Subtype", Name.get("Form")); 51310 appearanceDict.set("Resources", resources); 51311 appearanceDict.set("BBox", [0, 0, this.data.rect[2] - this.data.rect[0], this.data.rect[3] - this.data.rect[1]]); 51312 const rotationMatrix = this.getRotationMatrix(annotationStorage); 51313 if (rotationMatrix !== IDENTITY_MATRIX) { 51314 appearanceDict.set("Matrix", rotationMatrix); 51315 } 51316 await writeObject(newRef, appearanceStream, buffer, xref); 51317 changes.push({ 51318 ref: newRef, 51319 data: buffer.join(""), 51320 xfa: null, 51321 needAppearances: false 51322 }); 51323 buffer.length = 0; 51324 } 51325 dict.set("M", `D:${getModificationDate()}`); 51326 await writeObject(this.ref, dict, buffer, xref); 51327 changes[0].data = buffer.join(""); 51328 return changes; 51329 } 51330 async _getAppearance(evaluator, task, intent, annotationStorage) { 51331 const isPassword = this.hasFieldFlag(AnnotationFieldFlag.PASSWORD); 51332 if (isPassword) { 51333 return null; 51334 } 51335 const storageEntry = annotationStorage?.get(this.data.id); 51336 let value, rotation; 51337 if (storageEntry) { 51338 value = storageEntry.formattedValue || storageEntry.value; 51339 rotation = storageEntry.rotation; 51340 } 51341 if (rotation === undefined && value === undefined && !this._needAppearances) { 51342 if (!this._hasValueFromXFA || this.appearance) { 51343 return null; 51344 } 51345 } 51346 const colors = this.getBorderAndBackgroundAppearances(annotationStorage); 51347 if (value === undefined) { 51348 value = this.data.fieldValue; 51349 if (!value) { 51350 return `/Tx BMC q ${colors}Q EMC`; 51351 } 51352 } 51353 if (Array.isArray(value) && value.length === 1) { 51354 value = value[0]; 51355 } 51356 assert(typeof value === "string", "Expected `value` to be a string."); 51357 value = value.trimEnd(); 51358 if (this.data.combo) { 51359 const option = this.data.options.find(({ 51360 exportValue 51361 }) => value === exportValue); 51362 value = option?.displayValue || value; 51363 } 51364 if (value === "") { 51365 return `/Tx BMC q ${colors}Q EMC`; 51366 } 51367 if (rotation === undefined) { 51368 rotation = this.rotation; 51369 } 51370 let lineCount = -1; 51371 let lines; 51372 if (this.data.multiLine) { 51373 lines = value.split(/\r\n?|\n/).map(line => line.normalize("NFC")); 51374 lineCount = lines.length; 51375 } else { 51376 lines = [value.replace(/\r\n?|\n/, "").normalize("NFC")]; 51377 } 51378 const defaultPadding = 1; 51379 const defaultHPadding = 2; 51380 let totalHeight = this.data.rect[3] - this.data.rect[1]; 51381 let totalWidth = this.data.rect[2] - this.data.rect[0]; 51382 if (rotation === 90 || rotation === 270) { 51383 [totalWidth, totalHeight] = [totalHeight, totalWidth]; 51384 } 51385 if (!this._defaultAppearance) { 51386 this.data.defaultAppearanceData = parseDefaultAppearance(this._defaultAppearance = "/Helvetica 0 Tf 0 g"); 51387 } 51388 let font = await WidgetAnnotation._getFontData(evaluator, task, this.data.defaultAppearanceData, this._fieldResources.mergedResources); 51389 let defaultAppearance, fontSize, lineHeight; 51390 const encodedLines = []; 51391 let encodingError = false;
vendor: 14,470 bytes, lines 51392-51757
51392 for (const line of lines) { 51393 const encodedString = font.encodeString(line); 51394 if (encodedString.length > 1) { 51395 encodingError = true; 51396 } 51397 encodedLines.push(encodedString.join("")); 51398 } 51399 if (encodingError && intent & RenderingIntentFlag.SAVE) { 51400 return { 51401 needAppearances: true 51402 }; 51403 } 51404 if (encodingError && this._isOffscreenCanvasSupported) { 51405 const fontFamily = this.data.comb ? "monospace" : "sans-serif"; 51406 const fakeUnicodeFont = new FakeUnicodeFont(evaluator.xref, fontFamily); 51407 const resources = fakeUnicodeFont.createFontResources(lines.join("")); 51408 const newFont = resources.getRaw("Font"); 51409 if (this._fieldResources.mergedResources.has("Font")) { 51410 const oldFont = this._fieldResources.mergedResources.get("Font"); 51411 for (const key of newFont.getKeys()) { 51412 oldFont.set(key, newFont.getRaw(key)); 51413 } 51414 } else { 51415 this._fieldResources.mergedResources.set("Font", newFont); 51416 } 51417 const fontName = fakeUnicodeFont.fontName.name; 51418 font = await WidgetAnnotation._getFontData(evaluator, task, { 51419 fontName, 51420 fontSize: 0 51421 }, resources); 51422 for (let i = 0, ii = encodedLines.length; i < ii; i++) { 51423 encodedLines[i] = stringToUTF16String(lines[i]); 51424 } 51425 const savedDefaultAppearance = Object.assign(Object.create(null), this.data.defaultAppearanceData); 51426 this.data.defaultAppearanceData.fontSize = 0; 51427 this.data.defaultAppearanceData.fontName = fontName; 51428 [defaultAppearance, fontSize, lineHeight] = this._computeFontSize(totalHeight - 2 * defaultPadding, totalWidth - 2 * defaultHPadding, value, font, lineCount); 51429 this.data.defaultAppearanceData = savedDefaultAppearance; 51430 } else { 51431 if (!this._isOffscreenCanvasSupported) { 51432 warn("_getAppearance: OffscreenCanvas is not supported, annotation may not render correctly."); 51433 } 51434 [defaultAppearance, fontSize, lineHeight] = this._computeFontSize(totalHeight - 2 * defaultPadding, totalWidth - 2 * defaultHPadding, value, font, lineCount); 51435 } 51436 let descent = font.descent; 51437 if (isNaN(descent)) { 51438 descent = BASELINE_FACTOR * lineHeight; 51439 } else { 51440 descent = Math.max(BASELINE_FACTOR * lineHeight, Math.abs(descent) * fontSize); 51441 } 51442 const defaultVPadding = Math.min(Math.floor((totalHeight - fontSize) / 2), defaultPadding); 51443 const alignment = this.data.textAlignment; 51444 if (this.data.multiLine) { 51445 return this._getMultilineAppearance(defaultAppearance, encodedLines, font, fontSize, totalWidth, totalHeight, alignment, defaultHPadding, defaultVPadding, descent, lineHeight, annotationStorage); 51446 } 51447 if (this.data.comb) { 51448 return this._getCombAppearance(defaultAppearance, font, encodedLines[0], fontSize, totalWidth, totalHeight, defaultHPadding, defaultVPadding, descent, lineHeight, annotationStorage); 51449 } 51450 const bottomPadding = defaultVPadding + descent; 51451 if (alignment === 0 || alignment > 2) { 51452 return `/Tx BMC q ${colors}BT ` + defaultAppearance + ` 1 0 0 1 ${numberToString(defaultHPadding)} ${numberToString(bottomPadding)} Tm (${escapeString(encodedLines[0])}) Tj` + " ET Q EMC"; 51453 } 51454 const prevInfo = { 51455 shift: 0 51456 }; 51457 const renderedText = this._renderText(encodedLines[0], font, fontSize, totalWidth, alignment, prevInfo, defaultHPadding, bottomPadding); 51458 return `/Tx BMC q ${colors}BT ` + defaultAppearance + ` 1 0 0 1 0 0 Tm ${renderedText}` + " ET Q EMC"; 51459 } 51460 static async _getFontData(evaluator, task, appearanceData, resources) { 51461 const operatorList = new OperatorList(); 51462 const initialState = { 51463 font: null, 51464 clone() { 51465 return this; 51466 } 51467 }; 51468 const { 51469 fontName, 51470 fontSize 51471 } = appearanceData; 51472 await evaluator.handleSetFont(resources, [fontName && Name.get(fontName), fontSize], null, operatorList, task, initialState, null); 51473 return initialState.font; 51474 } 51475 _getTextWidth(text, font) { 51476 return font.charsToGlyphs(text).reduce((width, glyph) => width + glyph.width, 0) / 1000; 51477 } 51478 _computeFontSize(height, width, text, font, lineCount) { 51479 let { 51480 fontSize 51481 } = this.data.defaultAppearanceData; 51482 let lineHeight = (fontSize || 12) * LINE_FACTOR, 51483 numberOfLines = Math.round(height / lineHeight); 51484 if (!fontSize) { 51485 const roundWithTwoDigits = x => Math.floor(x * 100) / 100; 51486 if (lineCount === -1) { 51487 const textWidth = this._getTextWidth(text, font); 51488 fontSize = roundWithTwoDigits(Math.min(height / LINE_FACTOR, width / textWidth)); 51489 numberOfLines = 1; 51490 } else { 51491 const lines = text.split(/\r\n?|\n/); 51492 const cachedLines = []; 51493 for (const line of lines) { 51494 const encoded = font.encodeString(line).join(""); 51495 const glyphs = font.charsToGlyphs(encoded); 51496 const positions = font.getCharPositions(encoded); 51497 cachedLines.push({ 51498 line: encoded, 51499 glyphs, 51500 positions 51501 }); 51502 } 51503 const isTooBig = fsize => { 51504 let totalHeight = 0; 51505 for (const cache of cachedLines) { 51506 const chunks = this._splitLine(null, font, fsize, width, cache); 51507 totalHeight += chunks.length * fsize; 51508 if (totalHeight > height) { 51509 return true; 51510 } 51511 } 51512 return false; 51513 }; 51514 numberOfLines = Math.max(numberOfLines, lineCount); 51515 while (true) { 51516 lineHeight = height / numberOfLines; 51517 fontSize = roundWithTwoDigits(lineHeight / LINE_FACTOR); 51518 if (isTooBig(fontSize)) { 51519 numberOfLines++; 51520 continue; 51521 } 51522 break; 51523 } 51524 } 51525 const { 51526 fontName, 51527 fontColor 51528 } = this.data.defaultAppearanceData; 51529 this._defaultAppearance = createDefaultAppearance({ 51530 fontSize, 51531 fontName, 51532 fontColor 51533 }); 51534 } 51535 return [this._defaultAppearance, fontSize, height / numberOfLines]; 51536 } 51537 _renderText(text, font, fontSize, totalWidth, alignment, prevInfo, hPadding, vPadding) { 51538 let shift; 51539 if (alignment === 1) { 51540 const width = this._getTextWidth(text, font) * fontSize; 51541 shift = (totalWidth - width) / 2; 51542 } else if (alignment === 2) { 51543 const width = this._getTextWidth(text, font) * fontSize; 51544 shift = totalWidth - width - hPadding; 51545 } else { 51546 shift = hPadding; 51547 } 51548 const shiftStr = numberToString(shift - prevInfo.shift); 51549 prevInfo.shift = shift; 51550 vPadding = numberToString(vPadding); 51551 return `${shiftStr} ${vPadding} Td (${escapeString(text)}) Tj`; 51552 } 51553 _getSaveFieldResources(xref) { 51554 const { 51555 localResources, 51556 appearanceResources, 51557 acroFormResources 51558 } = this._fieldResources; 51559 const fontName = this.data.defaultAppearanceData?.fontName; 51560 if (!fontName) { 51561 return localResources || Dict.empty; 51562 } 51563 for (const resources of [localResources, appearanceResources]) { 51564 if (resources instanceof Dict) { 51565 const localFont = resources.get("Font"); 51566 if (localFont instanceof Dict && localFont.has(fontName)) { 51567 return resources; 51568 } 51569 } 51570 } 51571 if (acroFormResources instanceof Dict) { 51572 const acroFormFont = acroFormResources.get("Font"); 51573 if (acroFormFont instanceof Dict && acroFormFont.has(fontName)) { 51574 const subFontDict = new Dict(xref); 51575 subFontDict.set(fontName, acroFormFont.getRaw(fontName)); 51576 const subResourcesDict = new Dict(xref); 51577 subResourcesDict.set("Font", subFontDict); 51578 return Dict.merge({ 51579 xref, 51580 dictArray: [subResourcesDict, localResources], 51581 mergeSubDicts: true 51582 }); 51583 } 51584 } 51585 return localResources || Dict.empty; 51586 } 51587 getFieldObject() { 51588 return null; 51589 } 51590} 51591class TextWidgetAnnotation extends WidgetAnnotation { 51592 constructor(params) { 51593 super(params); 51594 const { 51595 dict 51596 } = params; 51597 if (dict.has("PMD")) { 51598 this.flags |= AnnotationFlag.HIDDEN; 51599 this.data.hidden = true; 51600 warn("Barcodes are not supported"); 51601 } 51602 this.data.hasOwnCanvas = this.data.readOnly && !this.data.noHTML; 51603 this._hasText = true; 51604 if (typeof this.data.fieldValue !== "string") { 51605 this.data.fieldValue = ""; 51606 } 51607 let alignment = getInheritableProperty({ 51608 dict, 51609 key: "Q" 51610 }); 51611 if (!Number.isInteger(alignment) || alignment < 0 || alignment > 2) { 51612 alignment = null; 51613 } 51614 this.data.textAlignment = alignment; 51615 let maximumLength = getInheritableProperty({ 51616 dict, 51617 key: "MaxLen" 51618 }); 51619 if (!Number.isInteger(maximumLength) || maximumLength < 0) { 51620 maximumLength = 0; 51621 } 51622 this.data.maxLen = maximumLength; 51623 this.data.multiLine = this.hasFieldFlag(AnnotationFieldFlag.MULTILINE); 51624 this.data.comb = this.hasFieldFlag(AnnotationFieldFlag.COMB) && !this.hasFieldFlag(AnnotationFieldFlag.MULTILINE) && !this.hasFieldFlag(AnnotationFieldFlag.PASSWORD) && !this.hasFieldFlag(AnnotationFieldFlag.FILESELECT) && this.data.maxLen !== 0; 51625 this.data.doNotScroll = this.hasFieldFlag(AnnotationFieldFlag.DONOTSCROLL); 51626 } 51627 get hasTextContent() { 51628 return !!this.appearance && !this._needAppearances; 51629 } 51630 _getCombAppearance(defaultAppearance, font, text, fontSize, width, height, hPadding, vPadding, descent, lineHeight, annotationStorage) { 51631 const combWidth = width / this.data.maxLen; 51632 const colors = this.getBorderAndBackgroundAppearances(annotationStorage); 51633 const buf = []; 51634 const positions = font.getCharPositions(text); 51635 for (const [start, end] of positions) { 51636 buf.push(`(${escapeString(text.substring(start, end))}) Tj`); 51637 } 51638 const renderedComb = buf.join(` ${numberToString(combWidth)} 0 Td `); 51639 return `/Tx BMC q ${colors}BT ` + defaultAppearance + ` 1 0 0 1 ${numberToString(hPadding)} ${numberToString(vPadding + descent)} Tm ${renderedComb}` + " ET Q EMC"; 51640 } 51641 _getMultilineAppearance(defaultAppearance, lines, font, fontSize, width, height, alignment, hPadding, vPadding, descent, lineHeight, annotationStorage) { 51642 const buf = []; 51643 const totalWidth = width - 2 * hPadding; 51644 const prevInfo = { 51645 shift: 0 51646 }; 51647 for (let i = 0, ii = lines.length; i < ii; i++) { 51648 const line = lines[i]; 51649 const chunks = this._splitLine(line, font, fontSize, totalWidth); 51650 for (let j = 0, jj = chunks.length; j < jj; j++) { 51651 const chunk = chunks[j]; 51652 const vShift = i === 0 && j === 0 ? -vPadding - (lineHeight - descent) : -lineHeight; 51653 buf.push(this._renderText(chunk, font, fontSize, width, alignment, prevInfo, hPadding, vShift)); 51654 } 51655 } 51656 const colors = this.getBorderAndBackgroundAppearances(annotationStorage); 51657 const renderedText = buf.join("\n"); 51658 return `/Tx BMC q ${colors}BT ` + defaultAppearance + ` 1 0 0 1 0 ${numberToString(height)} Tm ${renderedText}` + " ET Q EMC"; 51659 } 51660 _splitLine(line, font, fontSize, width, cache = {}) { 51661 line = cache.line || line; 51662 const glyphs = cache.glyphs || font.charsToGlyphs(line); 51663 if (glyphs.length <= 1) { 51664 return [line]; 51665 } 51666 const positions = cache.positions || font.getCharPositions(line); 51667 const scale = fontSize / 1000; 51668 const chunks = []; 51669 let lastSpacePosInStringStart = -1, 51670 lastSpacePosInStringEnd = -1, 51671 lastSpacePos = -1, 51672 startChunk = 0, 51673 currentWidth = 0; 51674 for (let i = 0, ii = glyphs.length; i < ii; i++) { 51675 const [start, end] = positions[i]; 51676 const glyph = glyphs[i]; 51677 const glyphWidth = glyph.width * scale; 51678 if (glyph.unicode === " ") { 51679 if (currentWidth + glyphWidth > width) { 51680 chunks.push(line.substring(startChunk, start)); 51681 startChunk = start; 51682 currentWidth = glyphWidth; 51683 lastSpacePosInStringStart = -1; 51684 lastSpacePos = -1; 51685 } else { 51686 currentWidth += glyphWidth; 51687 lastSpacePosInStringStart = start; 51688 lastSpacePosInStringEnd = end; 51689 lastSpacePos = i; 51690 } 51691 } else if (currentWidth + glyphWidth > width) { 51692 if (lastSpacePosInStringStart !== -1) { 51693 chunks.push(line.substring(startChunk, lastSpacePosInStringEnd)); 51694 startChunk = lastSpacePosInStringEnd; 51695 i = lastSpacePos + 1; 51696 lastSpacePosInStringStart = -1; 51697 currentWidth = 0; 51698 } else { 51699 chunks.push(line.substring(startChunk, start)); 51700 startChunk = start; 51701 currentWidth = glyphWidth; 51702 } 51703 } else { 51704 currentWidth += glyphWidth; 51705 } 51706 } 51707 if (startChunk < line.length) { 51708 chunks.push(line.substring(startChunk, line.length)); 51709 } 51710 return chunks; 51711 } 51712 async extractTextContent(evaluator, task, viewBox) { 51713 await super.extractTextContent(evaluator, task, viewBox); 51714 const text = this.data.textContent; 51715 if (!text) { 51716 return; 51717 } 51718 const allText = text.join("\n"); 51719 if (allText === this.data.fieldValue) { 51720 return; 51721 } 51722 const regex = allText.replaceAll(/([.*+?^${}()|[\]\\])|(\s+)/g, (_m, p1) => p1 ? `\\${p1}` : "\\s+"); 51723 if (new RegExp(`^\\s*${regex}\\s*$`).test(this.data.fieldValue)) { 51724 this.data.textContent = this.data.fieldValue.split("\n"); 51725 } 51726 } 51727 getFieldObject() { 51728 return { 51729 id: this.data.id, 51730 value: this.data.fieldValue, 51731 defaultValue: this.data.defaultFieldValue || "", 51732 multiline: this.data.multiLine, 51733 password: this.hasFieldFlag(AnnotationFieldFlag.PASSWORD), 51734 charLimit: this.data.maxLen, 51735 comb: this.data.comb, 51736 editable: !this.data.readOnly, 51737 hidden: this.data.hidden, 51738 name: this.data.fieldName, 51739 rect: this.data.rect, 51740 actions: this.data.actions, 51741 page: this.data.pageIndex, 51742 strokeColor: this.data.borderColor, 51743 fillColor: this.data.backgroundColor, 51744 rotation: this.rotation, 51745 type: "text" 51746 }; 51747 } 51748} 51749class ButtonWidgetAnnotation extends WidgetAnnotation { 51750 constructor(params) { 51751 super(params); 51752 this.checkedAppearance = null; 51753 this.uncheckedAppearance = null; 51754 this.data.checkBox = !this.hasFieldFlag(AnnotationFieldFlag.RADIO) && !this.hasFieldFlag(AnnotationFieldFlag.PUSHBUTTON); 51755 this.data.radioButton = this.hasFieldFlag(AnnotationFieldFlag.RADIO) && !this.hasFieldFlag(AnnotationFieldFlag.PUSHBUTTON); 51756 this.data.pushButton = this.hasFieldFlag(AnnotationFieldFlag.PUSHBUTTON); 51757 this.data.isTooltipOnly = false;
51758 if (this.data.checkBox) { 51759 this._processCheckBox(params); 51760 } else if (this.data.radioButton) { 51761 this._processRadioButton(params); 51762 } else if (this.data.pushButton) { 51763 this.data.hasOwnCanvas = true; 51764 this.data.noHTML = false; 51765 this._processPushButton(params); 51766 } else { 51767 warn("Invalid field flags for button widget annotation"); 51768 } 51769 } 51770 async getOperatorList(evaluator, task, intent, annotationStorage) { 51771 if (this.data.pushButton) { 51772 return super.getOperatorList(evaluator, task, intent, false, annotationStorage); 51773 } 51774 let value = null; 51775 let rotation = null; 51776 if (annotationStorage) { 51777 const storageEntry = annotationStorage.get(this.data.id); 51778 value = storageEntry ? storageEntry.value : null; 51779 rotation = storageEntry ? storageEntry.rotation : null; 51780 } 51781 if (value === null && this.appearance) { 51782 return super.getOperatorList(evaluator, task, intent, annotationStorage); 51783 } 51784 if (value === null || value === undefined) { 51785 value = this.data.checkBox ? this.data.fieldValue === this.data.exportValue : this.data.fieldValue === this.data.buttonValue; 51786 } 51787 const appearance = value ? this.checkedAppearance : this.uncheckedAppearance; 51788 if (appearance) { 51789 const savedAppearance = this.appearance; 51790 const savedMatrix = lookupMatrix(appearance.dict.getArray("Matrix"), IDENTITY_MATRIX); 51791 if (rotation) { 51792 appearance.dict.set("Matrix", this.getRotationMatrix(annotationStorage)); 51793 } 51794 this.appearance = appearance; 51795 const operatorList = super.getOperatorList(evaluator, task, intent, annotationStorage); 51796 this.appearance = savedAppearance; 51797 appearance.dict.set("Matrix", savedMatrix); 51798 return operatorList; 51799 } 51800 return { 51801 opList: new OperatorList(), 51802 separateForm: false, 51803 separateCanvas: false 51804 }; 51805 } 51806 async save(evaluator, task, annotationStorage) { 51807 if (this.data.checkBox) { 51808 return this._saveCheckbox(evaluator, task, annotationStorage); 51809 } 51810 if (this.data.radioButton) { 51811 return this._saveRadioButton(evaluator, task, annotationStorage); 51812 } 51813 return null; 51814 } 51815 async _saveCheckbox(evaluator, task, annotationStorage) { 51816 if (!annotationStorage) { 51817 return null; 51818 } 51819 const storageEntry = annotationStorage.get(this.data.id); 51820 const flags = this._buildFlags(storageEntry?.noView, storageEntry?.noPrint); 51821 let rotation = storageEntry?.rotation, 51822 value = storageEntry?.value; 51823 if (rotation === undefined && flags === undefined) { 51824 if (value === undefined) { 51825 return null; 51826 } 51827 const defaultValue = this.data.fieldValue === this.data.exportValue; 51828 if (defaultValue === value) { 51829 return null; 51830 } 51831 } 51832 let dict = evaluator.xref.fetchIfRef(this.ref); 51833 if (!(dict instanceof Dict)) { 51834 return null; 51835 } 51836 dict = dict.clone(); 51837 if (rotation === undefined) { 51838 rotation = this.rotation; 51839 } 51840 if (value === undefined) { 51841 value = this.data.fieldValue === this.data.exportValue; 51842 } 51843 const xfa = { 51844 path: this.data.fieldName, 51845 value: value ? this.data.exportValue : "" 51846 }; 51847 const name = Name.get(value ? this.data.exportValue : "Off"); 51848 dict.set("V", name); 51849 dict.set("AS", name); 51850 dict.set("M", `D:${getModificationDate()}`); 51851 if (flags !== undefined) { 51852 dict.set("F", flags); 51853 } 51854 const maybeMK = this._getMKDict(rotation); 51855 if (maybeMK) { 51856 dict.set("MK", maybeMK); 51857 } 51858 const buffer = []; 51859 await writeObject(this.ref, dict, buffer, evaluator.xref); 51860 return [{ 51861 ref: this.ref, 51862 data: buffer.join(""), 51863 xfa 51864 }]; 51865 } 51866 async _saveRadioButton(evaluator, task, annotationStorage) { 51867 if (!annotationStorage) { 51868 return null; 51869 } 51870 const storageEntry = annotationStorage.get(this.data.id); 51871 const flags = this._buildFlags(storageEntry?.noView, storageEntry?.noPrint); 51872 let rotation = storageEntry?.rotation, 51873 value = storageEntry?.value; 51874 if (rotation === undefined && flags === undefined) { 51875 if (value === undefined) { 51876 return null; 51877 } 51878 const defaultValue = this.data.fieldValue === this.data.buttonValue; 51879 if (defaultValue === value) { 51880 return null; 51881 } 51882 } 51883 let dict = evaluator.xref.fetchIfRef(this.ref); 51884 if (!(dict instanceof Dict)) { 51885 return null; 51886 } 51887 dict = dict.clone(); 51888 if (value === undefined) { 51889 value = this.data.fieldValue === this.data.buttonValue; 51890 } 51891 if (rotation === undefined) { 51892 rotation = this.rotation; 51893 } 51894 const xfa = { 51895 path: this.data.fieldName, 51896 value: value ? this.data.buttonValue : "" 51897 }; 51898 const name = Name.get(value ? this.data.buttonValue : "Off"); 51899 const buffer = []; 51900 let parentData = null; 51901 if (value) { 51902 if (this.parent instanceof Ref) { 51903 const parent = evaluator.xref.fetch(this.parent); 51904 parent.set("V", name); 51905 await writeObject(this.parent, parent, buffer, evaluator.xref); 51906 parentData = buffer.join(""); 51907 buffer.length = 0; 51908 } else if (this.parent instanceof Dict) { 51909 this.parent.set("V", name); 51910 } 51911 } 51912 if (!this.parent) { 51913 dict.set("V", name); 51914 } 51915 dict.set("AS", name); 51916 dict.set("M", `D:${getModificationDate()}`); 51917 if (flags !== undefined) { 51918 dict.set("F", flags); 51919 } 51920 const maybeMK = this._getMKDict(rotation); 51921 if (maybeMK) { 51922 dict.set("MK", maybeMK); 51923 } 51924 await writeObject(this.ref, dict, buffer, evaluator.xref); 51925 const newRefs = [{ 51926 ref: this.ref, 51927 data: buffer.join(""), 51928 xfa 51929 }]; 51930 if (parentData) { 51931 newRefs.push({ 51932 ref: this.parent, 51933 data: parentData, 51934 xfa: null 51935 }); 51936 } 51937 return newRefs; 51938 } 51939 _getDefaultCheckedAppearance(params, type) { 51940 const width = this.data.rect[2] - this.data.rect[0]; 51941 const height = this.data.rect[3] - this.data.rect[1]; 51942 const bbox = [0, 0, width, height]; 51943 const FONT_RATIO = 0.8; 51944 const fontSize = Math.min(width, height) * FONT_RATIO; 51945 let metrics, char; 51946 if (type === "check") { 51947 metrics = { 51948 width: 0.755 * fontSize, 51949 height: 0.705 * fontSize 51950 }; 51951 char = "\x33";
vendor: 28,181 bytes, lines 51952-52763
51952 } else if (type === "disc") { 51953 metrics = { 51954 width: 0.791 * fontSize, 51955 height: 0.705 * fontSize 51956 }; 51957 char = "\x6C"; 51958 } else { 51959 unreachable(`_getDefaultCheckedAppearance - unsupported type: ${type}`); 51960 } 51961 const xShift = numberToString((width - metrics.width) / 2); 51962 const yShift = numberToString((height - metrics.height) / 2); 51963 const appearance = `q BT /PdfJsZaDb ${fontSize} Tf 0 g ${xShift} ${yShift} Td (${char}) Tj ET Q`; 51964 const appearanceStreamDict = new Dict(params.xref); 51965 appearanceStreamDict.set("FormType", 1); 51966 appearanceStreamDict.set("Subtype", Name.get("Form")); 51967 appearanceStreamDict.set("Type", Name.get("XObject")); 51968 appearanceStreamDict.set("BBox", bbox); 51969 appearanceStreamDict.set("Matrix", [1, 0, 0, 1, 0, 0]); 51970 appearanceStreamDict.set("Length", appearance.length); 51971 const resources = new Dict(params.xref); 51972 const font = new Dict(params.xref); 51973 font.set("PdfJsZaDb", this.fallbackFontDict); 51974 resources.set("Font", font); 51975 appearanceStreamDict.set("Resources", resources); 51976 this.checkedAppearance = new StringStream(appearance); 51977 this.checkedAppearance.dict = appearanceStreamDict; 51978 this._streams.push(this.checkedAppearance); 51979 } 51980 _processCheckBox(params) { 51981 const customAppearance = params.dict.get("AP"); 51982 if (!(customAppearance instanceof Dict)) { 51983 return; 51984 } 51985 const normalAppearance = customAppearance.get("N"); 51986 if (!(normalAppearance instanceof Dict)) { 51987 return; 51988 } 51989 const asValue = this._decodeFormValue(params.dict.get("AS")); 51990 if (typeof asValue === "string") { 51991 this.data.fieldValue = asValue; 51992 } 51993 const yes = this.data.fieldValue !== null && this.data.fieldValue !== "Off" ? this.data.fieldValue : "Yes"; 51994 const exportValues = normalAppearance.getKeys(); 51995 if (exportValues.length === 0) { 51996 exportValues.push("Off", yes); 51997 } else if (exportValues.length === 1) { 51998 if (exportValues[0] === "Off") { 51999 exportValues.push(yes); 52000 } else { 52001 exportValues.unshift("Off"); 52002 } 52003 } else if (exportValues.includes(yes)) { 52004 exportValues.length = 0; 52005 exportValues.push("Off", yes); 52006 } else { 52007 const otherYes = exportValues.find(v => v !== "Off"); 52008 exportValues.length = 0; 52009 exportValues.push("Off", otherYes); 52010 } 52011 if (!exportValues.includes(this.data.fieldValue)) { 52012 this.data.fieldValue = "Off"; 52013 } 52014 this.data.exportValue = exportValues[1]; 52015 const checkedAppearance = normalAppearance.get(this.data.exportValue); 52016 this.checkedAppearance = checkedAppearance instanceof BaseStream ? checkedAppearance : null; 52017 const uncheckedAppearance = normalAppearance.get("Off"); 52018 this.uncheckedAppearance = uncheckedAppearance instanceof BaseStream ? uncheckedAppearance : null; 52019 if (this.checkedAppearance) { 52020 this._streams.push(this.checkedAppearance); 52021 } else { 52022 this._getDefaultCheckedAppearance(params, "check"); 52023 } 52024 if (this.uncheckedAppearance) { 52025 this._streams.push(this.uncheckedAppearance); 52026 } 52027 this._fallbackFontDict = this.fallbackFontDict; 52028 if (this.data.defaultFieldValue === null) { 52029 this.data.defaultFieldValue = "Off"; 52030 } 52031 } 52032 _processRadioButton(params) { 52033 this.data.buttonValue = null; 52034 const fieldParent = params.dict.get("Parent"); 52035 if (fieldParent instanceof Dict) { 52036 this.parent = params.dict.getRaw("Parent"); 52037 const fieldParentValue = fieldParent.get("V"); 52038 if (fieldParentValue instanceof Name) { 52039 this.data.fieldValue = this._decodeFormValue(fieldParentValue); 52040 } 52041 } 52042 const appearanceStates = params.dict.get("AP"); 52043 if (!(appearanceStates instanceof Dict)) { 52044 return; 52045 } 52046 const normalAppearance = appearanceStates.get("N"); 52047 if (!(normalAppearance instanceof Dict)) { 52048 return; 52049 } 52050 for (const key of normalAppearance.getKeys()) { 52051 if (key !== "Off") { 52052 this.data.buttonValue = this._decodeFormValue(key); 52053 break; 52054 } 52055 } 52056 const checkedAppearance = normalAppearance.get(this.data.buttonValue); 52057 this.checkedAppearance = checkedAppearance instanceof BaseStream ? checkedAppearance : null; 52058 const uncheckedAppearance = normalAppearance.get("Off"); 52059 this.uncheckedAppearance = uncheckedAppearance instanceof BaseStream ? uncheckedAppearance : null; 52060 if (this.checkedAppearance) { 52061 this._streams.push(this.checkedAppearance); 52062 } else { 52063 this._getDefaultCheckedAppearance(params, "disc"); 52064 } 52065 if (this.uncheckedAppearance) { 52066 this._streams.push(this.uncheckedAppearance); 52067 } 52068 this._fallbackFontDict = this.fallbackFontDict; 52069 if (this.data.defaultFieldValue === null) { 52070 this.data.defaultFieldValue = "Off"; 52071 } 52072 } 52073 _processPushButton(params) { 52074 const { 52075 dict, 52076 annotationGlobals 52077 } = params; 52078 if (!dict.has("A") && !dict.has("AA") && !this.data.alternativeText) { 52079 warn("Push buttons without action dictionaries are not supported"); 52080 return; 52081 } 52082 this.data.isTooltipOnly = !dict.has("A") && !dict.has("AA"); 52083 Catalog.parseDestDictionary({ 52084 destDict: dict, 52085 resultObj: this.data, 52086 docBaseUrl: annotationGlobals.baseUrl, 52087 docAttachments: annotationGlobals.attachments 52088 }); 52089 } 52090 getFieldObject() { 52091 let type = "button"; 52092 let exportValues; 52093 if (this.data.checkBox) { 52094 type = "checkbox"; 52095 exportValues = this.data.exportValue; 52096 } else if (this.data.radioButton) { 52097 type = "radiobutton"; 52098 exportValues = this.data.buttonValue; 52099 } 52100 return { 52101 id: this.data.id, 52102 value: this.data.fieldValue || "Off", 52103 defaultValue: this.data.defaultFieldValue, 52104 exportValues, 52105 editable: !this.data.readOnly, 52106 name: this.data.fieldName, 52107 rect: this.data.rect, 52108 hidden: this.data.hidden, 52109 actions: this.data.actions, 52110 page: this.data.pageIndex, 52111 strokeColor: this.data.borderColor, 52112 fillColor: this.data.backgroundColor, 52113 rotation: this.rotation, 52114 type 52115 }; 52116 } 52117 get fallbackFontDict() { 52118 const dict = new Dict(); 52119 dict.set("BaseFont", Name.get("ZapfDingbats")); 52120 dict.set("Type", Name.get("FallbackType")); 52121 dict.set("Subtype", Name.get("FallbackType")); 52122 dict.set("Encoding", Name.get("ZapfDingbatsEncoding")); 52123 return shadow(this, "fallbackFontDict", dict); 52124 } 52125} 52126class ChoiceWidgetAnnotation extends WidgetAnnotation { 52127 constructor(params) { 52128 super(params); 52129 const { 52130 dict, 52131 xref 52132 } = params; 52133 this.indices = dict.getArray("I"); 52134 this.hasIndices = Array.isArray(this.indices) && this.indices.length > 0; 52135 this.data.options = []; 52136 const options = getInheritableProperty({ 52137 dict, 52138 key: "Opt" 52139 }); 52140 if (Array.isArray(options)) { 52141 for (let i = 0, ii = options.length; i < ii; i++) { 52142 const option = xref.fetchIfRef(options[i]); 52143 const isOptionArray = Array.isArray(option); 52144 this.data.options[i] = { 52145 exportValue: this._decodeFormValue(isOptionArray ? xref.fetchIfRef(option[0]) : option), 52146 displayValue: this._decodeFormValue(isOptionArray ? xref.fetchIfRef(option[1]) : option) 52147 }; 52148 } 52149 } 52150 if (!this.hasIndices) { 52151 if (typeof this.data.fieldValue === "string") { 52152 this.data.fieldValue = [this.data.fieldValue]; 52153 } else if (!this.data.fieldValue) { 52154 this.data.fieldValue = []; 52155 } 52156 } else { 52157 this.data.fieldValue = []; 52158 const ii = this.data.options.length; 52159 for (const i of this.indices) { 52160 if (Number.isInteger(i) && i >= 0 && i < ii) { 52161 this.data.fieldValue.push(this.data.options[i].exportValue); 52162 } 52163 } 52164 } 52165 this.data.combo = this.hasFieldFlag(AnnotationFieldFlag.COMBO); 52166 this.data.multiSelect = this.hasFieldFlag(AnnotationFieldFlag.MULTISELECT); 52167 this._hasText = true; 52168 } 52169 getFieldObject() { 52170 const type = this.data.combo ? "combobox" : "listbox"; 52171 const value = this.data.fieldValue.length > 0 ? this.data.fieldValue[0] : null; 52172 return { 52173 id: this.data.id, 52174 value, 52175 defaultValue: this.data.defaultFieldValue, 52176 editable: !this.data.readOnly, 52177 name: this.data.fieldName, 52178 rect: this.data.rect, 52179 numItems: this.data.fieldValue.length, 52180 multipleSelection: this.data.multiSelect, 52181 hidden: this.data.hidden, 52182 actions: this.data.actions, 52183 items: this.data.options, 52184 page: this.data.pageIndex, 52185 strokeColor: this.data.borderColor, 52186 fillColor: this.data.backgroundColor, 52187 rotation: this.rotation, 52188 type 52189 }; 52190 } 52191 amendSavedDict(annotationStorage, dict) { 52192 if (!this.hasIndices) { 52193 return; 52194 } 52195 let values = annotationStorage?.get(this.data.id)?.value; 52196 if (!Array.isArray(values)) { 52197 values = [values]; 52198 } 52199 const indices = []; 52200 const { 52201 options 52202 } = this.data; 52203 for (let i = 0, j = 0, ii = options.length; i < ii; i++) { 52204 if (options[i].exportValue === values[j]) { 52205 indices.push(i); 52206 j += 1; 52207 } 52208 } 52209 dict.set("I", indices); 52210 } 52211 async _getAppearance(evaluator, task, intent, annotationStorage) { 52212 if (this.data.combo) { 52213 return super._getAppearance(evaluator, task, intent, annotationStorage); 52214 } 52215 let exportedValue, rotation; 52216 const storageEntry = annotationStorage?.get(this.data.id); 52217 if (storageEntry) { 52218 rotation = storageEntry.rotation; 52219 exportedValue = storageEntry.value; 52220 } 52221 if (rotation === undefined && exportedValue === undefined && !this._needAppearances) { 52222 return null; 52223 } 52224 if (exportedValue === undefined) { 52225 exportedValue = this.data.fieldValue; 52226 } else if (!Array.isArray(exportedValue)) { 52227 exportedValue = [exportedValue]; 52228 } 52229 const defaultPadding = 1; 52230 const defaultHPadding = 2; 52231 let totalHeight = this.data.rect[3] - this.data.rect[1]; 52232 let totalWidth = this.data.rect[2] - this.data.rect[0]; 52233 if (rotation === 90 || rotation === 270) { 52234 [totalWidth, totalHeight] = [totalHeight, totalWidth]; 52235 } 52236 const lineCount = this.data.options.length; 52237 const valueIndices = []; 52238 for (let i = 0; i < lineCount; i++) { 52239 const { 52240 exportValue 52241 } = this.data.options[i]; 52242 if (exportedValue.includes(exportValue)) { 52243 valueIndices.push(i); 52244 } 52245 } 52246 if (!this._defaultAppearance) { 52247 this.data.defaultAppearanceData = parseDefaultAppearance(this._defaultAppearance = "/Helvetica 0 Tf 0 g"); 52248 } 52249 const font = await WidgetAnnotation._getFontData(evaluator, task, this.data.defaultAppearanceData, this._fieldResources.mergedResources); 52250 let defaultAppearance; 52251 let { 52252 fontSize 52253 } = this.data.defaultAppearanceData; 52254 if (!fontSize) { 52255 const lineHeight = (totalHeight - defaultPadding) / lineCount; 52256 let lineWidth = -1; 52257 let value; 52258 for (const { 52259 displayValue 52260 } of this.data.options) { 52261 const width = this._getTextWidth(displayValue, font); 52262 if (width > lineWidth) { 52263 lineWidth = width; 52264 value = displayValue; 52265 } 52266 } 52267 [defaultAppearance, fontSize] = this._computeFontSize(lineHeight, totalWidth - 2 * defaultHPadding, value, font, -1); 52268 } else { 52269 defaultAppearance = this._defaultAppearance; 52270 } 52271 const lineHeight = fontSize * LINE_FACTOR; 52272 const vPadding = (lineHeight - fontSize) / 2; 52273 const numberOfVisibleLines = Math.floor(totalHeight / lineHeight); 52274 let firstIndex = 0; 52275 if (valueIndices.length > 0) { 52276 const minIndex = Math.min(...valueIndices); 52277 const maxIndex = Math.max(...valueIndices); 52278 firstIndex = Math.max(0, maxIndex - numberOfVisibleLines + 1); 52279 if (firstIndex > minIndex) { 52280 firstIndex = minIndex; 52281 } 52282 } 52283 const end = Math.min(firstIndex + numberOfVisibleLines + 1, lineCount); 52284 const buf = ["/Tx BMC q", `1 1 ${totalWidth} ${totalHeight} re W n`]; 52285 if (valueIndices.length) { 52286 buf.push("0.600006 0.756866 0.854904 rg"); 52287 for (const index of valueIndices) { 52288 if (firstIndex <= index && index < end) { 52289 buf.push(`1 ${totalHeight - (index - firstIndex + 1) * lineHeight} ${totalWidth} ${lineHeight} re f`); 52290 } 52291 } 52292 } 52293 buf.push("BT", defaultAppearance, `1 0 0 1 0 ${totalHeight} Tm`); 52294 const prevInfo = { 52295 shift: 0 52296 }; 52297 for (let i = firstIndex; i < end; i++) { 52298 const { 52299 displayValue 52300 } = this.data.options[i]; 52301 const vpadding = i === firstIndex ? vPadding : 0; 52302 buf.push(this._renderText(displayValue, font, fontSize, totalWidth, 0, prevInfo, defaultHPadding, -lineHeight + vpadding)); 52303 } 52304 buf.push("ET Q EMC"); 52305 return buf.join("\n"); 52306 } 52307} 52308class SignatureWidgetAnnotation extends WidgetAnnotation { 52309 constructor(params) { 52310 super(params); 52311 this.data.fieldValue = null; 52312 this.data.hasOwnCanvas = this.data.noRotate; 52313 this.data.noHTML = !this.data.hasOwnCanvas; 52314 } 52315 getFieldObject() { 52316 return { 52317 id: this.data.id, 52318 value: null, 52319 page: this.data.pageIndex, 52320 type: "signature" 52321 }; 52322 } 52323} 52324class TextAnnotation extends MarkupAnnotation { 52325 constructor(params) { 52326 const DEFAULT_ICON_SIZE = 22; 52327 super(params); 52328 this.data.noRotate = true; 52329 this.data.hasOwnCanvas = this.data.noRotate; 52330 this.data.noHTML = false; 52331 const { 52332 dict 52333 } = params; 52334 this.data.annotationType = AnnotationType.TEXT; 52335 if (this.data.hasAppearance) { 52336 this.data.name = "NoIcon"; 52337 } else { 52338 this.data.rect[1] = this.data.rect[3] - DEFAULT_ICON_SIZE; 52339 this.data.rect[2] = this.data.rect[0] + DEFAULT_ICON_SIZE; 52340 this.data.name = dict.has("Name") ? dict.get("Name").name : "Note"; 52341 } 52342 if (dict.has("State")) { 52343 this.data.state = dict.get("State") || null; 52344 this.data.stateModel = dict.get("StateModel") || null; 52345 } else { 52346 this.data.state = null; 52347 this.data.stateModel = null; 52348 } 52349 } 52350} 52351class LinkAnnotation extends Annotation { 52352 constructor(params) { 52353 super(params); 52354 const { 52355 dict, 52356 annotationGlobals 52357 } = params; 52358 this.data.annotationType = AnnotationType.LINK; 52359 this.data.noHTML = false; 52360 const quadPoints = getQuadPoints(dict, this.rectangle); 52361 if (quadPoints) { 52362 this.data.quadPoints = quadPoints; 52363 } 52364 this.data.borderColor ||= this.data.color; 52365 Catalog.parseDestDictionary({ 52366 destDict: dict, 52367 resultObj: this.data, 52368 docBaseUrl: annotationGlobals.baseUrl, 52369 docAttachments: annotationGlobals.attachments 52370 }); 52371 } 52372} 52373class PopupAnnotation extends Annotation { 52374 constructor(params) { 52375 super(params); 52376 const { 52377 dict 52378 } = params; 52379 this.data.annotationType = AnnotationType.POPUP; 52380 this.data.noHTML = false; 52381 if (this.data.rect[0] === this.data.rect[2] || this.data.rect[1] === this.data.rect[3]) { 52382 this.data.rect = null; 52383 } 52384 let parentItem = dict.get("Parent"); 52385 if (!parentItem) { 52386 warn("Popup annotation has a missing or invalid parent annotation."); 52387 return; 52388 } 52389 this.data.parentRect = lookupNormalRect(parentItem.getArray("Rect"), null); 52390 const rt = parentItem.get("RT"); 52391 if (isName(rt, AnnotationReplyType.GROUP)) { 52392 parentItem = parentItem.get("IRT"); 52393 } 52394 if (!parentItem.has("M")) { 52395 this.data.modificationDate = null; 52396 } else { 52397 this.setModificationDate(parentItem.get("M")); 52398 this.data.modificationDate = this.modificationDate; 52399 } 52400 if (!parentItem.has("C")) { 52401 this.data.color = null; 52402 } else { 52403 this.setColor(parentItem.getArray("C")); 52404 this.data.color = this.color; 52405 } 52406 if (!this.viewable) { 52407 const parentFlags = parentItem.get("F"); 52408 if (this._isViewable(parentFlags)) { 52409 this.setFlags(parentFlags); 52410 } 52411 } 52412 this.setTitle(parentItem.get("T")); 52413 this.data.titleObj = this._title; 52414 this.setContents(parentItem.get("Contents")); 52415 this.data.contentsObj = this._contents; 52416 if (parentItem.has("RC")) { 52417 this.data.richText = XFAFactory.getRichTextAsHtml(parentItem.get("RC")); 52418 } 52419 this.data.open = !!dict.get("Open"); 52420 } 52421} 52422class FreeTextAnnotation extends MarkupAnnotation { 52423 constructor(params) { 52424 super(params); 52425 this.data.hasOwnCanvas = this.data.noRotate; 52426 this.data.isEditable = !this.data.noHTML; 52427 this.data.noHTML = false; 52428 const { 52429 evaluatorOptions, 52430 xref 52431 } = params; 52432 this.data.annotationType = AnnotationType.FREETEXT; 52433 this.setDefaultAppearance(params); 52434 this._hasAppearance = !!this.appearance; 52435 if (this._hasAppearance) { 52436 const { 52437 fontColor, 52438 fontSize 52439 } = parseAppearanceStream(this.appearance, evaluatorOptions, xref); 52440 this.data.defaultAppearanceData.fontColor = fontColor; 52441 this.data.defaultAppearanceData.fontSize = fontSize || 10; 52442 } else { 52443 this.data.defaultAppearanceData.fontSize ||= 10; 52444 const { 52445 fontColor, 52446 fontSize 52447 } = this.data.defaultAppearanceData; 52448 if (this._contents.str) { 52449 this.data.textContent = this._contents.str.split(/\r\n?|\n/).map(line => line.trimEnd()); 52450 const { 52451 coords, 52452 bbox, 52453 matrix 52454 } = FakeUnicodeFont.getFirstPositionInfo(this.rectangle, this.rotation, fontSize); 52455 this.data.textPosition = this._transformPoint(coords, bbox, matrix); 52456 } 52457 if (this._isOffscreenCanvasSupported) { 52458 const strokeAlpha = params.dict.get("CA"); 52459 const fakeUnicodeFont = new FakeUnicodeFont(xref, "sans-serif"); 52460 this.appearance = fakeUnicodeFont.createAppearance(this._contents.str, this.rectangle, this.rotation, fontSize, fontColor, strokeAlpha); 52461 this._streams.push(this.appearance); 52462 } else { 52463 warn("FreeTextAnnotation: OffscreenCanvas is not supported, annotation may not render correctly."); 52464 } 52465 } 52466 } 52467 get hasTextContent() { 52468 return this._hasAppearance; 52469 } 52470 static createNewDict(annotation, xref, { 52471 apRef, 52472 ap 52473 }) { 52474 const { 52475 color, 52476 fontSize, 52477 oldAnnotation, 52478 rect, 52479 rotation, 52480 user, 52481 value 52482 } = annotation; 52483 const freetext = oldAnnotation || new Dict(xref); 52484 freetext.set("Type", Name.get("Annot")); 52485 freetext.set("Subtype", Name.get("FreeText")); 52486 if (oldAnnotation) { 52487 freetext.set("M", `D:${getModificationDate()}`); 52488 freetext.delete("RC"); 52489 } else { 52490 freetext.set("CreationDate", `D:${getModificationDate()}`); 52491 } 52492 freetext.set("Rect", rect); 52493 const da = `/Helv ${fontSize} Tf ${getPdfColor(color, true)}`; 52494 freetext.set("DA", da); 52495 freetext.set("Contents", stringToAsciiOrUTF16BE(value)); 52496 freetext.set("F", 4); 52497 freetext.set("Border", [0, 0, 0]); 52498 freetext.set("Rotate", rotation); 52499 if (user) { 52500 freetext.set("T", stringToAsciiOrUTF16BE(user)); 52501 } 52502 if (apRef || ap) { 52503 const n = new Dict(xref); 52504 freetext.set("AP", n); 52505 if (apRef) { 52506 n.set("N", apRef); 52507 } else { 52508 n.set("N", ap); 52509 } 52510 } 52511 return freetext; 52512 } 52513 static async createNewAppearanceStream(annotation, xref, params) { 52514 const { 52515 baseFontRef, 52516 evaluator, 52517 task 52518 } = params; 52519 const { 52520 color, 52521 fontSize, 52522 rect, 52523 rotation, 52524 value 52525 } = annotation; 52526 const resources = new Dict(xref); 52527 const font = new Dict(xref); 52528 if (baseFontRef) { 52529 font.set("Helv", baseFontRef); 52530 } else { 52531 const baseFont = new Dict(xref); 52532 baseFont.set("BaseFont", Name.get("Helvetica")); 52533 baseFont.set("Type", Name.get("Font")); 52534 baseFont.set("Subtype", Name.get("Type1")); 52535 baseFont.set("Encoding", Name.get("WinAnsiEncoding")); 52536 font.set("Helv", baseFont); 52537 } 52538 resources.set("Font", font); 52539 const helv = await WidgetAnnotation._getFontData(evaluator, task, { 52540 fontName: "Helv", 52541 fontSize 52542 }, resources); 52543 const [x1, y1, x2, y2] = rect; 52544 let w = x2 - x1; 52545 let h = y2 - y1; 52546 if (rotation % 180 !== 0) { 52547 [w, h] = [h, w]; 52548 } 52549 const lines = value.split("\n"); 52550 const scale = fontSize / 1000; 52551 let totalWidth = -Infinity; 52552 const encodedLines = []; 52553 for (let line of lines) { 52554 const encoded = helv.encodeString(line); 52555 if (encoded.length > 1) { 52556 return null; 52557 } 52558 line = encoded.join(""); 52559 encodedLines.push(line); 52560 let lineWidth = 0; 52561 const glyphs = helv.charsToGlyphs(line); 52562 for (const glyph of glyphs) { 52563 lineWidth += glyph.width * scale; 52564 } 52565 totalWidth = Math.max(totalWidth, lineWidth); 52566 } 52567 let hscale = 1; 52568 if (totalWidth > w) { 52569 hscale = w / totalWidth; 52570 } 52571 let vscale = 1; 52572 const lineHeight = LINE_FACTOR * fontSize; 52573 const lineAscent = (LINE_FACTOR - LINE_DESCENT_FACTOR) * fontSize; 52574 const totalHeight = lineHeight * lines.length; 52575 if (totalHeight > h) { 52576 vscale = h / totalHeight; 52577 } 52578 const fscale = Math.min(hscale, vscale); 52579 const newFontSize = fontSize * fscale; 52580 let firstPoint, clipBox, matrix; 52581 switch (rotation) { 52582 case 0: 52583 matrix = [1, 0, 0, 1]; 52584 clipBox = [rect[0], rect[1], w, h]; 52585 firstPoint = [rect[0], rect[3] - lineAscent]; 52586 break; 52587 case 90: 52588 matrix = [0, 1, -1, 0]; 52589 clipBox = [rect[1], -rect[2], w, h]; 52590 firstPoint = [rect[1], -rect[0] - lineAscent]; 52591 break; 52592 case 180: 52593 matrix = [-1, 0, 0, -1]; 52594 clipBox = [-rect[2], -rect[3], w, h]; 52595 firstPoint = [-rect[2], -rect[1] - lineAscent]; 52596 break; 52597 case 270: 52598 matrix = [0, -1, 1, 0]; 52599 clipBox = [-rect[3], rect[0], w, h]; 52600 firstPoint = [-rect[3], rect[2] - lineAscent]; 52601 break; 52602 } 52603 const buffer = ["q", `${matrix.join(" ")} 0 0 cm`, `${clipBox.join(" ")} re W n`, `BT`, `${getPdfColor(color, true)}`, `0 Tc /Helv ${numberToString(newFontSize)} Tf`]; 52604 buffer.push(`${firstPoint.join(" ")} Td (${escapeString(encodedLines[0])}) Tj`); 52605 const vShift = numberToString(lineHeight); 52606 for (let i = 1, ii = encodedLines.length; i < ii; i++) { 52607 const line = encodedLines[i]; 52608 buffer.push(`0 -${vShift} Td (${escapeString(line)}) Tj`); 52609 } 52610 buffer.push("ET", "Q"); 52611 const appearance = buffer.join("\n"); 52612 const appearanceStreamDict = new Dict(xref); 52613 appearanceStreamDict.set("FormType", 1); 52614 appearanceStreamDict.set("Subtype", Name.get("Form")); 52615 appearanceStreamDict.set("Type", Name.get("XObject")); 52616 appearanceStreamDict.set("BBox", rect); 52617 appearanceStreamDict.set("Resources", resources); 52618 appearanceStreamDict.set("Matrix", [1, 0, 0, 1, -rect[0], -rect[1]]); 52619 const ap = new StringStream(appearance); 52620 ap.dict = appearanceStreamDict; 52621 return ap; 52622 } 52623} 52624class LineAnnotation extends MarkupAnnotation { 52625 constructor(params) { 52626 super(params); 52627 const { 52628 dict, 52629 xref 52630 } = params; 52631 this.data.annotationType = AnnotationType.LINE; 52632 this.data.hasOwnCanvas = this.data.noRotate; 52633 this.data.noHTML = false; 52634 const lineCoordinates = lookupRect(dict.getArray("L"), [0, 0, 0, 0]); 52635 this.data.lineCoordinates = Util.normalizeRect(lineCoordinates); 52636 this.setLineEndings(dict.getArray("LE")); 52637 this.data.lineEndings = this.lineEndings; 52638 if (!this.appearance) { 52639 const strokeColor = this.color ? getPdfColorArray(this.color) : [0, 0, 0]; 52640 const strokeAlpha = dict.get("CA"); 52641 const interiorColor = getRgbColor(dict.getArray("IC"), null); 52642 const fillColor = interiorColor ? getPdfColorArray(interiorColor) : null; 52643 const fillAlpha = fillColor ? strokeAlpha : null; 52644 const borderWidth = this.borderStyle.width || 1, 52645 borderAdjust = 2 * borderWidth; 52646 const bbox = [this.data.lineCoordinates[0] - borderAdjust, this.data.lineCoordinates[1] - borderAdjust, this.data.lineCoordinates[2] + borderAdjust, this.data.lineCoordinates[3] + borderAdjust]; 52647 if (!Util.intersect(this.rectangle, bbox)) { 52648 this.rectangle = bbox; 52649 } 52650 this._setDefaultAppearance({ 52651 xref, 52652 extra: `${borderWidth} w`, 52653 strokeColor, 52654 fillColor, 52655 strokeAlpha, 52656 fillAlpha, 52657 pointsCallback: (buffer, points) => { 52658 buffer.push(`${lineCoordinates[0]} ${lineCoordinates[1]} m`, `${lineCoordinates[2]} ${lineCoordinates[3]} l`, "S"); 52659 return [points[0] - borderWidth, points[2] + borderWidth, points[7] - borderWidth, points[3] + borderWidth]; 52660 } 52661 }); 52662 } 52663 } 52664} 52665class SquareAnnotation extends MarkupAnnotation { 52666 constructor(params) { 52667 super(params); 52668 const { 52669 dict, 52670 xref 52671 } = params; 52672 this.data.annotationType = AnnotationType.SQUARE; 52673 this.data.hasOwnCanvas = this.data.noRotate; 52674 this.data.noHTML = false; 52675 if (!this.appearance) { 52676 const strokeColor = this.color ? getPdfColorArray(this.color) : [0, 0, 0]; 52677 const strokeAlpha = dict.get("CA"); 52678 const interiorColor = getRgbColor(dict.getArray("IC"), null); 52679 const fillColor = interiorColor ? getPdfColorArray(interiorColor) : null; 52680 const fillAlpha = fillColor ? strokeAlpha : null; 52681 if (this.borderStyle.width === 0 && !fillColor) { 52682 return; 52683 } 52684 this._setDefaultAppearance({ 52685 xref, 52686 extra: `${this.borderStyle.width} w`, 52687 strokeColor, 52688 fillColor, 52689 strokeAlpha, 52690 fillAlpha, 52691 pointsCallback: (buffer, points) => { 52692 const x = points[4] + this.borderStyle.width / 2; 52693 const y = points[5] + this.borderStyle.width / 2; 52694 const width = points[6] - points[4] - this.borderStyle.width; 52695 const height = points[3] - points[7] - this.borderStyle.width; 52696 buffer.push(`${x} ${y} ${width} ${height} re`); 52697 if (fillColor) { 52698 buffer.push("B"); 52699 } else { 52700 buffer.push("S"); 52701 } 52702 return [points[0], points[2], points[7], points[3]]; 52703 } 52704 }); 52705 } 52706 } 52707} 52708class CircleAnnotation extends MarkupAnnotation { 52709 constructor(params) { 52710 super(params); 52711 const { 52712 dict, 52713 xref 52714 } = params; 52715 this.data.annotationType = AnnotationType.CIRCLE; 52716 if (!this.appearance) { 52717 const strokeColor = this.color ? getPdfColorArray(this.color) : [0, 0, 0]; 52718 const strokeAlpha = dict.get("CA"); 52719 const interiorColor = getRgbColor(dict.getArray("IC"), null); 52720 const fillColor = interiorColor ? getPdfColorArray(interiorColor) : null; 52721 const fillAlpha = fillColor ? strokeAlpha : null; 52722 if (this.borderStyle.width === 0 && !fillColor) { 52723 return; 52724 } 52725 const controlPointsDistance = 4 / 3 * Math.tan(Math.PI / (2 * 4)); 52726 this._setDefaultAppearance({ 52727 xref, 52728 extra: `${this.borderStyle.width} w`, 52729 strokeColor, 52730 fillColor, 52731 strokeAlpha, 52732 fillAlpha, 52733 pointsCallback: (buffer, points) => { 52734 const x0 = points[0] + this.borderStyle.width / 2; 52735 const y0 = points[1] - this.borderStyle.width / 2; 52736 const x1 = points[6] - this.borderStyle.width / 2; 52737 const y1 = points[7] + this.borderStyle.width / 2; 52738 const xMid = x0 + (x1 - x0) / 2; 52739 const yMid = y0 + (y1 - y0) / 2; 52740 const xOffset = (x1 - x0) / 2 * controlPointsDistance; 52741 const yOffset = (y1 - y0) / 2 * controlPointsDistance; 52742 buffer.push(`${xMid} ${y1} m`, `${xMid + xOffset} ${y1} ${x1} ${yMid + yOffset} ${x1} ${yMid} c`, `${x1} ${yMid - yOffset} ${xMid + xOffset} ${y0} ${xMid} ${y0} c`, `${xMid - xOffset} ${y0} ${x0} ${yMid - yOffset} ${x0} ${yMid} c`, `${x0} ${yMid + yOffset} ${xMid - xOffset} ${y1} ${xMid} ${y1} c`, "h"); 52743 if (fillColor) { 52744 buffer.push("B"); 52745 } else { 52746 buffer.push("S"); 52747 } 52748 return [points[0], points[2], points[7], points[3]]; 52749 } 52750 }); 52751 } 52752 } 52753} 52754class PolylineAnnotation extends MarkupAnnotation { 52755 constructor(params) { 52756 super(params); 52757 const { 52758 dict, 52759 xref 52760 } = params; 52761 this.data.annotationType = AnnotationType.POLYLINE; 52762 this.data.hasOwnCanvas = this.data.noRotate; 52763 this.data.noHTML = false;
52764 this.data.vertices = null; 52765 if (!(this instanceof PolygonAnnotation)) { 52766 this.setLineEndings(dict.getArray("LE")); 52767 this.data.lineEndings = this.lineEndings; 52768 } 52769 const rawVertices = dict.getArray("Vertices"); 52770 if (!isNumberArray(rawVertices, null)) { 52771 return; 52772 } 52773 const vertices = this.data.vertices = Float32Array.from(rawVertices); 52774 if (!this.appearance) { 52775 const strokeColor = this.color ? getPdfColorArray(this.color) : [0, 0, 0]; 52776 const strokeAlpha = dict.get("CA"); 52777 const borderWidth = this.borderStyle.width || 1, 52778 borderAdjust = 2 * borderWidth; 52779 const bbox = [Infinity, Infinity, -Infinity, -Infinity]; 52780 for (let i = 0, ii = vertices.length; i < ii; i += 2) { 52781 bbox[0] = Math.min(bbox[0], vertices[i] - borderAdjust); 52782 bbox[1] = Math.min(bbox[1], vertices[i + 1] - borderAdjust); 52783 bbox[2] = Math.max(bbox[2], vertices[i] + borderAdjust); 52784 bbox[3] = Math.max(bbox[3], vertices[i + 1] + borderAdjust); 52785 } 52786 if (!Util.intersect(this.rectangle, bbox)) { 52787 this.rectangle = bbox; 52788 } 52789 this._setDefaultAppearance({ 52790 xref, 52791 extra: `${borderWidth} w`, 52792 strokeColor, 52793 strokeAlpha, 52794 pointsCallback: (buffer, points) => { 52795 for (let i = 0, ii = vertices.length; i < ii; i += 2) { 52796 buffer.push(`${vertices[i]} ${vertices[i + 1]} ${i === 0 ? "m" : "l"}`); 52797 } 52798 buffer.push("S"); 52799 return [points[0], points[2], points[7], points[3]]; 52800 } 52801 }); 52802 } 52803 } 52804} 52805class PolygonAnnotation extends PolylineAnnotation { 52806 constructor(params) { 52807 super(params); 52808 this.data.annotationType = AnnotationType.POLYGON; 52809 } 52810} 52811class CaretAnnotation extends MarkupAnnotation { 52812 constructor(params) { 52813 super(params); 52814 this.data.annotationType = AnnotationType.CARET; 52815 } 52816} 52817class InkAnnotation extends MarkupAnnotation { 52818 constructor(params) { 52819 super(params); 52820 this.data.hasOwnCanvas = this.data.noRotate; 52821 this.data.noHTML = false; 52822 const { 52823 dict, 52824 xref 52825 } = params; 52826 this.data.annotationType = AnnotationType.INK; 52827 this.data.inkLists = []; 52828 this.data.isEditable = !this.data.noHTML && this.data.it === "InkHighlight"; 52829 this.data.noHTML = false; 52830 this.data.opacity = dict.get("CA") || 1; 52831 const rawInkLists = dict.getArray("InkList"); 52832 if (!Array.isArray(rawInkLists)) { 52833 return; 52834 } 52835 for (let i = 0, ii = rawInkLists.length; i < ii; ++i) { 52836 if (!Array.isArray(rawInkLists[i])) { 52837 continue; 52838 } 52839 const inkList = new Float32Array(rawInkLists[i].length); 52840 this.data.inkLists.push(inkList); 52841 for (let j = 0, jj = rawInkLists[i].length; j < jj; j += 2) { 52842 const x = xref.fetchIfRef(rawInkLists[i][j]), 52843 y = xref.fetchIfRef(rawInkLists[i][j + 1]); 52844 if (typeof x === "number" && typeof y === "number") { 52845 inkList[j] = x; 52846 inkList[j + 1] = y; 52847 } 52848 } 52849 } 52850 if (!this.appearance) { 52851 const strokeColor = this.color ? getPdfColorArray(this.color) : [0, 0, 0]; 52852 const strokeAlpha = dict.get("CA"); 52853 const borderWidth = this.borderStyle.width || 1, 52854 borderAdjust = 2 * borderWidth; 52855 const bbox = [Infinity, Infinity, -Infinity, -Infinity]; 52856 for (const inkList of this.data.inkLists) { 52857 for (let i = 0, ii = inkList.length; i < ii; i += 2) { 52858 bbox[0] = Math.min(bbox[0], inkList[i] - borderAdjust); 52859 bbox[1] = Math.min(bbox[1], inkList[i + 1] - borderAdjust); 52860 bbox[2] = Math.max(bbox[2], inkList[i] + borderAdjust); 52861 bbox[3] = Math.max(bbox[3], inkList[i + 1] + borderAdjust); 52862 } 52863 } 52864 if (!Util.intersect(this.rectangle, bbox)) { 52865 this.rectangle = bbox; 52866 } 52867 this._setDefaultAppearance({ 52868 xref, 52869 extra: `${borderWidth} w`, 52870 strokeColor, 52871 strokeAlpha, 52872 pointsCallback: (buffer, points) => { 52873 for (const inkList of this.data.inkLists) { 52874 for (let i = 0, ii = inkList.length; i < ii; i += 2) { 52875 buffer.push(`${inkList[i]} ${inkList[i + 1]} ${i === 0 ? "m" : "l"}`); 52876 } 52877 buffer.push("S"); 52878 } 52879 return [points[0], points[2], points[7], points[3]]; 52880 } 52881 }); 52882 } 52883 } 52884 static createNewDict(annotation, xref, { 52885 apRef, 52886 ap 52887 }) { 52888 const { 52889 color, 52890 opacity, 52891 paths, 52892 outlines, 52893 rect, 52894 rotation, 52895 thickness 52896 } = annotation; 52897 const ink = new Dict(xref); 52898 ink.set("Type", Name.get("Annot")); 52899 ink.set("Subtype", Name.get("Ink")); 52900 ink.set("CreationDate", `D:${getModificationDate()}`); 52901 ink.set("Rect", rect); 52902 ink.set("InkList", outlines?.points || paths.map(p => p.points)); 52903 ink.set("F", 4); 52904 ink.set("Rotate", rotation); 52905 if (outlines) { 52906 ink.set("IT", Name.get("InkHighlight")); 52907 } 52908 const bs = new Dict(xref); 52909 ink.set("BS", bs); 52910 bs.set("W", thickness); 52911 ink.set("C", Array.from(color, c => c / 255)); 52912 ink.set("CA", opacity); 52913 const n = new Dict(xref); 52914 ink.set("AP", n); 52915 if (apRef) { 52916 n.set("N", apRef); 52917 } else { 52918 n.set("N", ap); 52919 } 52920 return ink; 52921 } 52922 static async createNewAppearanceStream(annotation, xref, params) { 52923 if (annotation.outlines) { 52924 return this.createNewAppearanceStreamForHighlight(annotation, xref, params); 52925 } 52926 const { 52927 color, 52928 rect, 52929 paths, 52930 thickness, 52931 opacity 52932 } = annotation; 52933 const appearanceBuffer = [`${thickness} w 1 J 1 j`, `${getPdfColor(color, false)}`]; 52934 if (opacity !== 1) { 52935 appearanceBuffer.push("/R0 gs"); 52936 } 52937 const buffer = []; 52938 for (const { 52939 bezier 52940 } of paths) { 52941 buffer.length = 0; 52942 buffer.push(`${numberToString(bezier[0])} ${numberToString(bezier[1])} m`); 52943 if (bezier.length === 2) { 52944 buffer.push(`${numberToString(bezier[0])} ${numberToString(bezier[1])} l S`); 52945 } else { 52946 for (let i = 2, ii = bezier.length; i < ii; i += 6) { 52947 const curve = bezier.slice(i, i + 6).map(numberToString).join(" "); 52948 buffer.push(`${curve} c`); 52949 } 52950 buffer.push("S"); 52951 } 52952 appearanceBuffer.push(buffer.join("\n")); 52953 } 52954 const appearance = appearanceBuffer.join("\n"); 52955 const appearanceStreamDict = new Dict(xref); 52956 appearanceStreamDict.set("FormType", 1); 52957 appearanceStreamDict.set("Subtype", Name.get("Form")); 52958 appearanceStreamDict.set("Type", Name.get("XObject")); 52959 appearanceStreamDict.set("BBox", rect); 52960 appearanceStreamDict.set("Length", appearance.length); 52961 if (opacity !== 1) { 52962 const resources = new Dict(xref); 52963 const extGState = new Dict(xref); 52964 const r0 = new Dict(xref); 52965 r0.set("CA", opacity);
52966 r0.set("Type", Name.get("ExtGState")); 52967 extGState.set("R0", r0); 52968 resources.set("ExtGState", extGState); 52969 appearanceStreamDict.set("Resources", resources); 52970 } 52971 const ap = new StringStream(appearance); 52972 ap.dict = appearanceStreamDict; 52973 return ap; 52974 } 52975 static async createNewAppearanceStreamForHighlight(annotation, xref, params) { 52976 const { 52977 color, 52978 rect, 52979 outlines: { 52980 outline 52981 }, 52982 opacity 52983 } = annotation; 52984 const appearanceBuffer = [`${getPdfColor(color, true)}`, "/R0 gs"]; 52985 appearanceBuffer.push(`${numberToString(outline[4])} ${numberToString(outline[5])} m`); 52986 for (let i = 6, ii = outline.length; i < ii; i += 6) { 52987 if (isNaN(outline[i]) || outline[i] === null) { 52988 appearanceBuffer.push(`${numberToString(outline[i + 4])} ${numberToString(outline[i + 5])} l`); 52989 } else { 52990 const curve = outline.slice(i, i + 6).map(numberToString).join(" "); 52991 appearanceBuffer.push(`${curve} c`); 52992 } 52993 } 52994 appearanceBuffer.push("h f"); 52995 const appearance = appearanceBuffer.join("\n"); 52996 const appearanceStreamDict = new Dict(xref); 52997 appearanceStreamDict.set("FormType", 1); 52998 appearanceStreamDict.set("Subtype", Name.get("Form")); 52999 appearanceStreamDict.set("Type", Name.get("XObject")); 53000 appearanceStreamDict.set("BBox", rect); 53001 appearanceStreamDict.set("Length", appearance.length); 53002 const resources = new Dict(xref); 53003 const extGState = new Dict(xref); 53004 resources.set("ExtGState", extGState); 53005 appearanceStreamDict.set("Resources", resources); 53006 const r0 = new Dict(xref); 53007 extGState.set("R0", r0); 53008 r0.set("BM", Name.get("Multiply")); 53009 if (opacity !== 1) { 53010 r0.set("ca", opacity); 53011 r0.set("Type", Name.get("ExtGState")); 53012 } 53013 const ap = new StringStream(appearance); 53014 ap.dict = appearanceStreamDict; 53015 return ap; 53016 } 53017} 53018class HighlightAnnotation extends MarkupAnnotation { 53019 constructor(params) { 53020 super(params); 53021 const { 53022 dict, 53023 xref 53024 } = params; 53025 this.data.annotationType = AnnotationType.HIGHLIGHT; 53026 this.data.isEditable = !this.data.noHTML; 53027 this.data.noHTML = false; 53028 this.data.opacity = dict.get("CA") || 1; 53029 const quadPoints = this.data.quadPoints = getQuadPoints(dict, null); 53030 if (quadPoints) { 53031 const resources = this.appearance?.dict.get("Resources"); 53032 if (!this.appearance || !resources?.has("ExtGState")) { 53033 if (this.appearance) { 53034 warn("HighlightAnnotation - ignoring built-in appearance stream."); 53035 } 53036 const fillColor = this.color ? getPdfColorArray(this.color) : [1, 1, 0]; 53037 const fillAlpha = dict.get("CA"); 53038 this._setDefaultAppearance({ 53039 xref, 53040 fillColor, 53041 blendMode: "Multiply", 53042 fillAlpha, 53043 pointsCallback: (buffer, points) => { 53044 buffer.push(`${points[0]} ${points[1]} m`, `${points[2]} ${points[3]} l`, `${points[6]} ${points[7]} l`, `${points[4]} ${points[5]} l`, "f"); 53045 return [points[0], points[2], points[7], points[3]]; 53046 } 53047 }); 53048 } 53049 } else { 53050 this.data.popupRef = null; 53051 } 53052 } 53053 static createNewDict(annotation, xref, { 53054 apRef, 53055 ap 53056 }) { 53057 const { 53058 color, 53059 oldAnnotation, 53060 opacity, 53061 rect, 53062 rotation, 53063 user, 53064 quadPoints 53065 } = annotation; 53066 const highlight = oldAnnotation || new Dict(xref); 53067 highlight.set("Type", Name.get("Annot")); 53068 highlight.set("Subtype", Name.get("Highlight")); 53069 highlight.set(oldAnnotation ? "M" : "CreationDate", `D:${getModificationDate()}`); 53070 highlight.set("CreationDate", `D:${getModificationDate()}`); 53071 highlight.set("Rect", rect); 53072 highlight.set("F", 4); 53073 highlight.set("Border", [0, 0, 0]); 53074 highlight.set("Rotate", rotation); 53075 highlight.set("QuadPoints", quadPoints); 53076 highlight.set("C", Array.from(color, c => c / 255)); 53077 highlight.set("CA", opacity); 53078 if (user) { 53079 highlight.set("T", stringToAsciiOrUTF16BE(user)); 53080 } 53081 if (apRef || ap) { 53082 const n = new Dict(xref); 53083 highlight.set("AP", n); 53084 n.set("N", apRef || ap); 53085 } 53086 return highlight; 53087 } 53088 static async createNewAppearanceStream(annotation, xref, params) { 53089 const { 53090 color, 53091 rect, 53092 outlines, 53093 opacity 53094 } = annotation; 53095 const appearanceBuffer = [`${getPdfColor(color, true)}`, "/R0 gs"]; 53096 const buffer = []; 53097 for (const outline of outlines) { 53098 buffer.length = 0; 53099 buffer.push(`${numberToString(outline[0])} ${numberToString(outline[1])} m`); 53100 for (let i = 2, ii = outline.length; i < ii; i += 2) { 53101 buffer.push(`${numberToString(outline[i])} ${numberToString(outline[i + 1])} l`); 53102 } 53103 buffer.push("h"); 53104 appearanceBuffer.push(buffer.join("\n")); 53105 } 53106 appearanceBuffer.push("f*"); 53107 const appearance = appearanceBuffer.join("\n"); 53108 const appearanceStreamDict = new Dict(xref); 53109 appearanceStreamDict.set("FormType", 1); 53110 appearanceStreamDict.set("Subtype", Name.get("Form")); 53111 appearanceStreamDict.set("Type", Name.get("XObject")); 53112 appearanceStreamDict.set("BBox", rect); 53113 appearanceStreamDict.set("Length", appearance.length); 53114 const resources = new Dict(xref); 53115 const extGState = new Dict(xref); 53116 resources.set("ExtGState", extGState); 53117 appearanceStreamDict.set("Resources", resources); 53118 const r0 = new Dict(xref); 53119 extGState.set("R0", r0); 53120 r0.set("BM", Name.get("Multiply")); 53121 if (opacity !== 1) { 53122 r0.set("ca", opacity);
vendor: 15,765 bytes, lines 53123-53644
53123 r0.set("Type", Name.get("ExtGState")); 53124 } 53125 const ap = new StringStream(appearance); 53126 ap.dict = appearanceStreamDict; 53127 return ap; 53128 } 53129} 53130class UnderlineAnnotation extends MarkupAnnotation { 53131 constructor(params) { 53132 super(params); 53133 const { 53134 dict, 53135 xref 53136 } = params; 53137 this.data.annotationType = AnnotationType.UNDERLINE; 53138 const quadPoints = this.data.quadPoints = getQuadPoints(dict, null); 53139 if (quadPoints) { 53140 if (!this.appearance) { 53141 const strokeColor = this.color ? getPdfColorArray(this.color) : [0, 0, 0]; 53142 const strokeAlpha = dict.get("CA"); 53143 this._setDefaultAppearance({ 53144 xref, 53145 extra: "[] 0 d 0.571 w", 53146 strokeColor, 53147 strokeAlpha, 53148 pointsCallback: (buffer, points) => { 53149 buffer.push(`${points[4]} ${points[5] + 1.3} m`, `${points[6]} ${points[7] + 1.3} l`, "S"); 53150 return [points[0], points[2], points[7], points[3]]; 53151 } 53152 }); 53153 } 53154 } else { 53155 this.data.popupRef = null; 53156 } 53157 } 53158} 53159class SquigglyAnnotation extends MarkupAnnotation { 53160 constructor(params) { 53161 super(params); 53162 const { 53163 dict, 53164 xref 53165 } = params; 53166 this.data.annotationType = AnnotationType.SQUIGGLY; 53167 const quadPoints = this.data.quadPoints = getQuadPoints(dict, null); 53168 if (quadPoints) { 53169 if (!this.appearance) { 53170 const strokeColor = this.color ? getPdfColorArray(this.color) : [0, 0, 0]; 53171 const strokeAlpha = dict.get("CA"); 53172 this._setDefaultAppearance({ 53173 xref, 53174 extra: "[] 0 d 1 w", 53175 strokeColor, 53176 strokeAlpha, 53177 pointsCallback: (buffer, points) => { 53178 const dy = (points[1] - points[5]) / 6; 53179 let shift = dy; 53180 let x = points[4]; 53181 const y = points[5]; 53182 const xEnd = points[6]; 53183 buffer.push(`${x} ${y + shift} m`); 53184 do { 53185 x += 2; 53186 shift = shift === 0 ? dy : 0; 53187 buffer.push(`${x} ${y + shift} l`); 53188 } while (x < xEnd); 53189 buffer.push("S"); 53190 return [points[4], xEnd, y - 2 * dy, y + 2 * dy]; 53191 } 53192 }); 53193 } 53194 } else { 53195 this.data.popupRef = null; 53196 } 53197 } 53198} 53199class StrikeOutAnnotation extends MarkupAnnotation { 53200 constructor(params) { 53201 super(params); 53202 const { 53203 dict, 53204 xref 53205 } = params; 53206 this.data.annotationType = AnnotationType.STRIKEOUT; 53207 const quadPoints = this.data.quadPoints = getQuadPoints(dict, null); 53208 if (quadPoints) { 53209 if (!this.appearance) { 53210 const strokeColor = this.color ? getPdfColorArray(this.color) : [0, 0, 0]; 53211 const strokeAlpha = dict.get("CA"); 53212 this._setDefaultAppearance({ 53213 xref, 53214 extra: "[] 0 d 1 w", 53215 strokeColor, 53216 strokeAlpha, 53217 pointsCallback: (buffer, points) => { 53218 buffer.push(`${(points[0] + points[4]) / 2} ` + `${(points[1] + points[5]) / 2} m`, `${(points[2] + points[6]) / 2} ` + `${(points[3] + points[7]) / 2} l`, "S"); 53219 return [points[0], points[2], points[7], points[3]]; 53220 } 53221 }); 53222 } 53223 } else { 53224 this.data.popupRef = null; 53225 } 53226 } 53227} 53228class StampAnnotation extends MarkupAnnotation { 53229 #savedHasOwnCanvas; 53230 constructor(params) { 53231 super(params); 53232 this.data.annotationType = AnnotationType.STAMP; 53233 this.#savedHasOwnCanvas = this.data.hasOwnCanvas = this.data.noRotate; 53234 this.data.isEditable = !this.data.noHTML; 53235 this.data.noHTML = false; 53236 } 53237 mustBeViewedWhenEditing(isEditing, modifiedIds = null) { 53238 if (isEditing) { 53239 if (!this.data.isEditable) { 53240 return false; 53241 } 53242 this.#savedHasOwnCanvas = this.data.hasOwnCanvas; 53243 this.data.hasOwnCanvas = true; 53244 return true; 53245 } 53246 this.data.hasOwnCanvas = this.#savedHasOwnCanvas; 53247 return !modifiedIds?.has(this.data.id); 53248 } 53249 static async createImage(bitmap, xref) { 53250 const { 53251 width, 53252 height 53253 } = bitmap; 53254 const canvas = new OffscreenCanvas(width, height); 53255 const ctx = canvas.getContext("2d", { 53256 alpha: true 53257 }); 53258 ctx.drawImage(bitmap, 0, 0); 53259 const data = ctx.getImageData(0, 0, width, height).data; 53260 const buf32 = new Uint32Array(data.buffer); 53261 const hasAlpha = buf32.some(FeatureTest.isLittleEndian ? x => x >>> 24 !== 0xff : x => (x & 0xff) !== 0xff); 53262 if (hasAlpha) { 53263 ctx.fillStyle = "white"; 53264 ctx.fillRect(0, 0, width, height); 53265 ctx.drawImage(bitmap, 0, 0); 53266 } 53267 const jpegBufferPromise = canvas.convertToBlob({ 53268 type: "image/jpeg", 53269 quality: 1 53270 }).then(blob => blob.arrayBuffer()); 53271 const xobjectName = Name.get("XObject"); 53272 const imageName = Name.get("Image"); 53273 const image = new Dict(xref); 53274 image.set("Type", xobjectName); 53275 image.set("Subtype", imageName); 53276 image.set("BitsPerComponent", 8); 53277 image.set("ColorSpace", Name.get("DeviceRGB")); 53278 image.set("Filter", Name.get("DCTDecode")); 53279 image.set("BBox", [0, 0, width, height]); 53280 image.set("Width", width); 53281 image.set("Height", height); 53282 let smaskStream = null; 53283 if (hasAlpha) { 53284 const alphaBuffer = new Uint8Array(buf32.length); 53285 if (FeatureTest.isLittleEndian) { 53286 for (let i = 0, ii = buf32.length; i < ii; i++) { 53287 alphaBuffer[i] = buf32[i] >>> 24; 53288 } 53289 } else { 53290 for (let i = 0, ii = buf32.length; i < ii; i++) { 53291 alphaBuffer[i] = buf32[i] & 0xff; 53292 } 53293 } 53294 const smask = new Dict(xref); 53295 smask.set("Type", xobjectName); 53296 smask.set("Subtype", imageName); 53297 smask.set("BitsPerComponent", 8); 53298 smask.set("ColorSpace", Name.get("DeviceGray")); 53299 smask.set("Width", width); 53300 smask.set("Height", height); 53301 smaskStream = new Stream(alphaBuffer, 0, 0, smask); 53302 } 53303 const imageStream = new Stream(await jpegBufferPromise, 0, 0, image); 53304 return { 53305 imageStream, 53306 smaskStream, 53307 width, 53308 height 53309 }; 53310 } 53311 static createNewDict(annotation, xref, { 53312 apRef, 53313 ap 53314 }) { 53315 const { 53316 oldAnnotation, 53317 rect, 53318 rotation, 53319 user 53320 } = annotation; 53321 const stamp = oldAnnotation || new Dict(xref); 53322 stamp.set("Type", Name.get("Annot")); 53323 stamp.set("Subtype", Name.get("Stamp")); 53324 stamp.set(oldAnnotation ? "M" : "CreationDate", `D:${getModificationDate()}`); 53325 stamp.set("CreationDate", `D:${getModificationDate()}`); 53326 stamp.set("Rect", rect); 53327 stamp.set("F", 4); 53328 stamp.set("Border", [0, 0, 0]); 53329 stamp.set("Rotate", rotation); 53330 if (user) { 53331 stamp.set("T", stringToAsciiOrUTF16BE(user)); 53332 } 53333 if (apRef || ap) { 53334 const n = new Dict(xref); 53335 stamp.set("AP", n); 53336 if (apRef) { 53337 n.set("N", apRef); 53338 } else { 53339 n.set("N", ap); 53340 } 53341 } 53342 return stamp; 53343 } 53344 static async createNewAppearanceStream(annotation, xref, params) { 53345 if (annotation.oldAnnotation) { 53346 return null; 53347 } 53348 const { 53349 rotation 53350 } = annotation; 53351 const { 53352 imageRef, 53353 width, 53354 height 53355 } = params.image; 53356 const resources = new Dict(xref); 53357 const xobject = new Dict(xref); 53358 resources.set("XObject", xobject); 53359 xobject.set("Im0", imageRef); 53360 const appearance = `q ${width} 0 0 ${height} 0 0 cm /Im0 Do Q`; 53361 const appearanceStreamDict = new Dict(xref); 53362 appearanceStreamDict.set("FormType", 1); 53363 appearanceStreamDict.set("Subtype", Name.get("Form")); 53364 appearanceStreamDict.set("Type", Name.get("XObject")); 53365 appearanceStreamDict.set("BBox", [0, 0, width, height]); 53366 appearanceStreamDict.set("Resources", resources); 53367 if (rotation) { 53368 const matrix = getRotationMatrix(rotation, width, height); 53369 appearanceStreamDict.set("Matrix", matrix); 53370 } 53371 const ap = new StringStream(appearance); 53372 ap.dict = appearanceStreamDict; 53373 return ap; 53374 } 53375} 53376class FileAttachmentAnnotation extends MarkupAnnotation { 53377 constructor(params) { 53378 super(params); 53379 const { 53380 dict, 53381 xref 53382 } = params; 53383 const file = new FileSpec(dict.get("FS"), xref); 53384 this.data.annotationType = AnnotationType.FILEATTACHMENT; 53385 this.data.hasOwnCanvas = this.data.noRotate; 53386 this.data.noHTML = false; 53387 this.data.file = file.serializable; 53388 const name = dict.get("Name"); 53389 this.data.name = name instanceof Name ? stringToPDFString(name.name) : "PushPin"; 53390 const fillAlpha = dict.get("ca"); 53391 this.data.fillAlpha = typeof fillAlpha === "number" && fillAlpha >= 0 && fillAlpha <= 1 ? fillAlpha : null; 53392 } 53393} 53394 53395;// ./src/core/dataset_reader.js 53396 53397 53398 53399function decodeString(str) { 53400 try { 53401 return stringToUTF8String(str); 53402 } catch (ex) { 53403 warn(`UTF-8 decoding failed: "${ex}".`); 53404 return str; 53405 } 53406} 53407class DatasetXMLParser extends SimpleXMLParser { 53408 constructor(options) { 53409 super(options); 53410 this.node = null; 53411 } 53412 onEndElement(name) { 53413 const node = super.onEndElement(name); 53414 if (node && name === "xfa:datasets") { 53415 this.node = node; 53416 throw new Error("Aborting DatasetXMLParser."); 53417 } 53418 } 53419} 53420class DatasetReader { 53421 constructor(data) { 53422 if (data.datasets) { 53423 this.node = new SimpleXMLParser({ 53424 hasAttributes: true 53425 }).parseFromString(data.datasets).documentElement; 53426 } else { 53427 const parser = new DatasetXMLParser({ 53428 hasAttributes: true 53429 }); 53430 try { 53431 parser.parseFromString(data["xdp:xdp"]); 53432 } catch {} 53433 this.node = parser.node; 53434 } 53435 } 53436 getValue(path) { 53437 if (!this.node || !path) { 53438 return ""; 53439 } 53440 const node = this.node.searchNode(parseXFAPath(path), 0); 53441 if (!node) { 53442 return ""; 53443 } 53444 const first = node.firstChild; 53445 if (first?.nodeName === "value") { 53446 return node.children.map(child => decodeString(child.textContent)); 53447 } 53448 return decodeString(node.textContent); 53449 } 53450} 53451 53452;// ./src/core/xref.js 53453 53454 53455 53456 53457 53458 53459class XRef { 53460 #firstXRefStmPos = null; 53461 constructor(stream, pdfManager) { 53462 this.stream = stream; 53463 this.pdfManager = pdfManager; 53464 this.entries = []; 53465 this._xrefStms = new Set(); 53466 this._cacheMap = new Map(); 53467 this._pendingRefs = new RefSet(); 53468 this._newPersistentRefNum = null; 53469 this._newTemporaryRefNum = null; 53470 this._persistentRefsCache = null; 53471 } 53472 getNewPersistentRef(obj) { 53473 if (this._newPersistentRefNum === null) { 53474 this._newPersistentRefNum = this.entries.length || 1; 53475 } 53476 const num = this._newPersistentRefNum++; 53477 this._cacheMap.set(num, obj); 53478 return Ref.get(num, 0); 53479 } 53480 getNewTemporaryRef() { 53481 if (this._newTemporaryRefNum === null) { 53482 this._newTemporaryRefNum = this.entries.length || 1; 53483 if (this._newPersistentRefNum) { 53484 this._persistentRefsCache = new Map(); 53485 for (let i = this._newTemporaryRefNum; i < this._newPersistentRefNum; i++) { 53486 this._persistentRefsCache.set(i, this._cacheMap.get(i)); 53487 this._cacheMap.delete(i); 53488 } 53489 } 53490 } 53491 return Ref.get(this._newTemporaryRefNum++, 0); 53492 } 53493 resetNewTemporaryRef() { 53494 this._newTemporaryRefNum = null; 53495 if (this._persistentRefsCache) { 53496 for (const [num, obj] of this._persistentRefsCache) { 53497 this._cacheMap.set(num, obj); 53498 } 53499 } 53500 this._persistentRefsCache = null; 53501 } 53502 setStartXRef(startXRef) { 53503 this.startXRefQueue = [startXRef]; 53504 } 53505 parse(recoveryMode = false) { 53506 let trailerDict; 53507 if (!recoveryMode) { 53508 trailerDict = this.readXRef(); 53509 } else { 53510 warn("Indexing all PDF objects"); 53511 trailerDict = this.indexObjects(); 53512 } 53513 trailerDict.assignXref(this); 53514 this.trailer = trailerDict; 53515 let encrypt; 53516 try { 53517 encrypt = trailerDict.get("Encrypt"); 53518 } catch (ex) { 53519 if (ex instanceof MissingDataException) { 53520 throw ex; 53521 } 53522 warn(`XRef.parse - Invalid "Encrypt" reference: "${ex}".`); 53523 } 53524 if (encrypt instanceof Dict) { 53525 const ids = trailerDict.get("ID"); 53526 const fileId = ids?.length ? ids[0] : ""; 53527 encrypt.suppressEncryption = true; 53528 this.encrypt = new CipherTransformFactory(encrypt, fileId, this.pdfManager.password); 53529 } 53530 let root; 53531 try { 53532 root = trailerDict.get("Root"); 53533 } catch (ex) { 53534 if (ex instanceof MissingDataException) { 53535 throw ex; 53536 } 53537 warn(`XRef.parse - Invalid "Root" reference: "${ex}".`); 53538 } 53539 if (root instanceof Dict) { 53540 try { 53541 const pages = root.get("Pages"); 53542 if (pages instanceof Dict) { 53543 this.root = root; 53544 return; 53545 } 53546 } catch (ex) { 53547 if (ex instanceof MissingDataException) { 53548 throw ex; 53549 } 53550 warn(`XRef.parse - Invalid "Pages" reference: "${ex}".`); 53551 } 53552 } 53553 if (!recoveryMode) { 53554 throw new XRefParseException(); 53555 } 53556 throw new InvalidPDFException("Invalid Root reference."); 53557 } 53558 processXRefTable(parser) { 53559 if (!("tableState" in this)) { 53560 this.tableState = { 53561 entryNum: 0, 53562 streamPos: parser.lexer.stream.pos, 53563 parserBuf1: parser.buf1, 53564 parserBuf2: parser.buf2 53565 }; 53566 } 53567 const obj = this.readXRefTable(parser); 53568 if (!isCmd(obj, "trailer")) { 53569 throw new FormatError("Invalid XRef table: could not find trailer dictionary"); 53570 } 53571 let dict = parser.getObj(); 53572 if (!(dict instanceof Dict) && dict.dict) { 53573 dict = dict.dict; 53574 } 53575 if (!(dict instanceof Dict)) { 53576 throw new FormatError("Invalid XRef table: could not parse trailer dictionary"); 53577 } 53578 delete this.tableState; 53579 return dict; 53580 } 53581 readXRefTable(parser) { 53582 const stream = parser.lexer.stream; 53583 const tableState = this.tableState; 53584 stream.pos = tableState.streamPos; 53585 parser.buf1 = tableState.parserBuf1; 53586 parser.buf2 = tableState.parserBuf2; 53587 let obj; 53588 while (true) { 53589 if (!("firstEntryNum" in tableState) || !("entryCount" in tableState)) { 53590 if (isCmd(obj = parser.getObj(), "trailer")) { 53591 break; 53592 } 53593 tableState.firstEntryNum = obj; 53594 tableState.entryCount = parser.getObj(); 53595 } 53596 let first = tableState.firstEntryNum; 53597 const count = tableState.entryCount; 53598 if (!Number.isInteger(first) || !Number.isInteger(count)) { 53599 throw new FormatError("Invalid XRef table: wrong types in subsection header"); 53600 } 53601 for (let i = tableState.entryNum; i < count; i++) { 53602 tableState.streamPos = stream.pos; 53603 tableState.entryNum = i; 53604 tableState.parserBuf1 = parser.buf1; 53605 tableState.parserBuf2 = parser.buf2; 53606 const entry = {}; 53607 entry.offset = parser.getObj(); 53608 entry.gen = parser.getObj(); 53609 const type = parser.getObj(); 53610 if (type instanceof Cmd) { 53611 switch (type.cmd) { 53612 case "f": 53613 entry.free = true; 53614 break; 53615 case "n": 53616 entry.uncompressed = true; 53617 break; 53618 } 53619 } 53620 if (!Number.isInteger(entry.offset) || !Number.isInteger(entry.gen) || !(entry.free || entry.uncompressed)) { 53621 throw new FormatError(`Invalid entry in XRef subsection: ${first}, ${count}`); 53622 } 53623 if (i === 0 && entry.free && first === 1) { 53624 first = 0; 53625 } 53626 if (!this.entries[i + first]) { 53627 this.entries[i + first] = entry; 53628 } 53629 } 53630 tableState.entryNum = 0; 53631 tableState.streamPos = stream.pos; 53632 tableState.parserBuf1 = parser.buf1; 53633 tableState.parserBuf2 = parser.buf2; 53634 delete tableState.firstEntryNum; 53635 delete tableState.entryCount; 53636 } 53637 if (this.entries[0] && !this.entries[0].free) { 53638 throw new FormatError("Invalid XRef table: unexpected first object"); 53639 } 53640 return obj; 53641 } 53642 processXRefStream(stream) { 53643 if (!("streamState" in this)) { 53644 const streamParameters = stream.dict;
vendor: 5,310 bytes, lines 53645-53807
53645 const byteWidths = streamParameters.get("W"); 53646 let range = streamParameters.get("Index"); 53647 if (!range) { 53648 range = [0, streamParameters.get("Size")]; 53649 } 53650 this.streamState = { 53651 entryRanges: range, 53652 byteWidths, 53653 entryNum: 0, 53654 streamPos: stream.pos 53655 }; 53656 } 53657 this.readXRefStream(stream); 53658 delete this.streamState; 53659 return stream.dict; 53660 } 53661 readXRefStream(stream) { 53662 const streamState = this.streamState; 53663 stream.pos = streamState.streamPos; 53664 const [typeFieldWidth, offsetFieldWidth, generationFieldWidth] = streamState.byteWidths; 53665 const entryRanges = streamState.entryRanges; 53666 while (entryRanges.length > 0) { 53667 const [first, n] = entryRanges; 53668 if (!Number.isInteger(first) || !Number.isInteger(n)) { 53669 throw new FormatError(`Invalid XRef range fields: ${first}, ${n}`); 53670 } 53671 if (!Number.isInteger(typeFieldWidth) || !Number.isInteger(offsetFieldWidth) || !Number.isInteger(generationFieldWidth)) { 53672 throw new FormatError(`Invalid XRef entry fields length: ${first}, ${n}`); 53673 } 53674 for (let i = streamState.entryNum; i < n; ++i) { 53675 streamState.entryNum = i; 53676 streamState.streamPos = stream.pos; 53677 let type = 0, 53678 offset = 0, 53679 generation = 0; 53680 for (let j = 0; j < typeFieldWidth; ++j) { 53681 const typeByte = stream.getByte(); 53682 if (typeByte === -1) { 53683 throw new FormatError("Invalid XRef byteWidths 'type'."); 53684 } 53685 type = type << 8 | typeByte; 53686 } 53687 if (typeFieldWidth === 0) { 53688 type = 1; 53689 } 53690 for (let j = 0; j < offsetFieldWidth; ++j) { 53691 const offsetByte = stream.getByte(); 53692 if (offsetByte === -1) { 53693 throw new FormatError("Invalid XRef byteWidths 'offset'."); 53694 } 53695 offset = offset << 8 | offsetByte; 53696 } 53697 for (let j = 0; j < generationFieldWidth; ++j) { 53698 const generationByte = stream.getByte(); 53699 if (generationByte === -1) { 53700 throw new FormatError("Invalid XRef byteWidths 'generation'."); 53701 } 53702 generation = generation << 8 | generationByte; 53703 } 53704 const entry = {}; 53705 entry.offset = offset; 53706 entry.gen = generation; 53707 switch (type) { 53708 case 0: 53709 entry.free = true; 53710 break; 53711 case 1: 53712 entry.uncompressed = true; 53713 break; 53714 case 2: 53715 break; 53716 default: 53717 throw new FormatError(`Invalid XRef entry type: ${type}`); 53718 } 53719 if (!this.entries[first + i]) { 53720 this.entries[first + i] = entry; 53721 } 53722 } 53723 streamState.entryNum = 0; 53724 streamState.streamPos = stream.pos; 53725 entryRanges.splice(0, 2); 53726 } 53727 } 53728 indexObjects() { 53729 const TAB = 0x9, 53730 LF = 0xa, 53731 CR = 0xd, 53732 SPACE = 0x20; 53733 const PERCENT = 0x25, 53734 LT = 0x3c; 53735 function readToken(data, offset) { 53736 let token = "", 53737 ch = data[offset]; 53738 while (ch !== LF && ch !== CR && ch !== LT) { 53739 if (++offset >= data.length) { 53740 break; 53741 } 53742 token += String.fromCharCode(ch); 53743 ch = data[offset]; 53744 } 53745 return token; 53746 } 53747 function skipUntil(data, offset, what) { 53748 const length = what.length, 53749 dataLength = data.length; 53750 let skipped = 0; 53751 while (offset < dataLength) { 53752 let i = 0; 53753 while (i < length && data[offset + i] === what[i]) { 53754 ++i; 53755 } 53756 if (i >= length) { 53757 break; 53758 } 53759 offset++; 53760 skipped++; 53761 } 53762 return skipped; 53763 } 53764 const gEndobjRegExp = /\b(endobj|\d+\s+\d+\s+obj|xref|trailer\s*<<)\b/g; 53765 const gStartxrefRegExp = /\b(startxref|\d+\s+\d+\s+obj)\b/g; 53766 const objRegExp = /^(\d+)\s+(\d+)\s+obj\b/; 53767 const trailerBytes = new Uint8Array([116, 114, 97, 105, 108, 101, 114]); 53768 const startxrefBytes = new Uint8Array([115, 116, 97, 114, 116, 120, 114, 101, 102]); 53769 const xrefBytes = new Uint8Array([47, 88, 82, 101, 102]); 53770 this.entries.length = 0; 53771 this._cacheMap.clear(); 53772 const stream = this.stream; 53773 stream.pos = 0; 53774 const buffer = stream.getBytes(), 53775 bufferStr = bytesToString(buffer), 53776 length = buffer.length; 53777 let position = stream.start; 53778 const trailers = [], 53779 xrefStms = []; 53780 while (position < length) { 53781 let ch = buffer[position]; 53782 if (ch === TAB || ch === LF || ch === CR || ch === SPACE) { 53783 ++position; 53784 continue; 53785 } 53786 if (ch === PERCENT) { 53787 do { 53788 ++position; 53789 if (position >= length) { 53790 break; 53791 } 53792 ch = buffer[position]; 53793 } while (ch !== LF && ch !== CR); 53794 continue; 53795 } 53796 const token = readToken(buffer, position); 53797 let m; 53798 if (token.startsWith("xref") && (token.length === 4 || /\s/.test(token[4]))) { 53799 position += skipUntil(buffer, position, trailerBytes); 53800 trailers.push(position); 53801 position += skipUntil(buffer, position, startxrefBytes); 53802 } else if (m = objRegExp.exec(token)) { 53803 const num = m[1] | 0, 53804 gen = m[2] | 0; 53805 const startPos = position + token.length; 53806 let contentLength, 53807 updateEntries = false;
vendor: 15,336 bytes, lines 53808-54312
53808 if (!this.entries[num]) { 53809 updateEntries = true; 53810 } else if (this.entries[num].gen === gen) { 53811 try { 53812 const parser = new Parser({ 53813 lexer: new Lexer(stream.makeSubStream(startPos)) 53814 }); 53815 parser.getObj(); 53816 updateEntries = true; 53817 } catch (ex) { 53818 if (ex instanceof ParserEOFException) { 53819 warn(`indexObjects -- checking object (${token}): "${ex}".`); 53820 } else { 53821 updateEntries = true; 53822 } 53823 } 53824 } 53825 if (updateEntries) { 53826 this.entries[num] = { 53827 offset: position - stream.start, 53828 gen, 53829 uncompressed: true 53830 }; 53831 } 53832 gEndobjRegExp.lastIndex = startPos; 53833 const match = gEndobjRegExp.exec(bufferStr); 53834 if (match) { 53835 const endPos = gEndobjRegExp.lastIndex + 1; 53836 contentLength = endPos - position; 53837 if (match[1] !== "endobj") { 53838 warn(`indexObjects: Found "${match[1]}" inside of another "obj", ` + 'caused by missing "endobj" -- trying to recover.'); 53839 contentLength -= match[1].length + 1; 53840 } 53841 } else { 53842 contentLength = length - position; 53843 } 53844 const content = buffer.subarray(position, position + contentLength); 53845 const xrefTagOffset = skipUntil(content, 0, xrefBytes); 53846 if (xrefTagOffset < contentLength && content[xrefTagOffset + 5] < 64) { 53847 xrefStms.push(position - stream.start); 53848 this._xrefStms.add(position - stream.start); 53849 } 53850 position += contentLength; 53851 } else if (token.startsWith("trailer") && (token.length === 7 || /\s/.test(token[7]))) { 53852 trailers.push(position); 53853 const startPos = position + token.length; 53854 let contentLength; 53855 gStartxrefRegExp.lastIndex = startPos; 53856 const match = gStartxrefRegExp.exec(bufferStr); 53857 if (match) { 53858 const endPos = gStartxrefRegExp.lastIndex + 1; 53859 contentLength = endPos - position; 53860 if (match[1] !== "startxref") { 53861 warn(`indexObjects: Found "${match[1]}" after "trailer", ` + 'caused by missing "startxref" -- trying to recover.'); 53862 contentLength -= match[1].length + 1; 53863 } 53864 } else { 53865 contentLength = length - position; 53866 } 53867 position += contentLength; 53868 } else { 53869 position += token.length + 1; 53870 } 53871 } 53872 for (const xrefStm of xrefStms) { 53873 this.startXRefQueue.push(xrefStm); 53874 this.readXRef(true); 53875 } 53876 const trailerDicts = []; 53877 let isEncrypted = false; 53878 for (const trailer of trailers) { 53879 stream.pos = trailer; 53880 const parser = new Parser({ 53881 lexer: new Lexer(stream), 53882 xref: this, 53883 allowStreams: true, 53884 recoveryMode: true 53885 }); 53886 const obj = parser.getObj(); 53887 if (!isCmd(obj, "trailer")) { 53888 continue; 53889 } 53890 const dict = parser.getObj(); 53891 if (!(dict instanceof Dict)) { 53892 continue; 53893 } 53894 trailerDicts.push(dict); 53895 if (dict.has("Encrypt")) { 53896 isEncrypted = true; 53897 } 53898 } 53899 let trailerDict, trailerError; 53900 for (const dict of [...trailerDicts, "genFallback", ...trailerDicts]) { 53901 if (dict === "genFallback") { 53902 if (!trailerError) { 53903 break; 53904 } 53905 this._generationFallback = true; 53906 continue; 53907 } 53908 let validPagesDict = false; 53909 try { 53910 const rootDict = dict.get("Root"); 53911 if (!(rootDict instanceof Dict)) { 53912 continue; 53913 } 53914 const pagesDict = rootDict.get("Pages"); 53915 if (!(pagesDict instanceof Dict)) { 53916 continue; 53917 } 53918 const pagesCount = pagesDict.get("Count"); 53919 if (Number.isInteger(pagesCount)) { 53920 validPagesDict = true; 53921 } 53922 } catch (ex) { 53923 trailerError = ex; 53924 continue; 53925 } 53926 if (validPagesDict && (!isEncrypted || dict.has("Encrypt")) && dict.has("ID")) { 53927 return dict; 53928 } 53929 trailerDict = dict; 53930 } 53931 if (trailerDict) { 53932 return trailerDict; 53933 } 53934 if (this.topDict) { 53935 return this.topDict; 53936 } 53937 throw new InvalidPDFException("Invalid PDF structure."); 53938 } 53939 readXRef(recoveryMode = false) { 53940 const stream = this.stream; 53941 const startXRefParsedCache = new Set(); 53942 while (this.startXRefQueue.length) { 53943 try { 53944 const startXRef = this.startXRefQueue[0]; 53945 if (startXRefParsedCache.has(startXRef)) { 53946 warn("readXRef - skipping XRef table since it was already parsed."); 53947 this.startXRefQueue.shift(); 53948 continue; 53949 } 53950 startXRefParsedCache.add(startXRef); 53951 stream.pos = startXRef + stream.start; 53952 const parser = new Parser({ 53953 lexer: new Lexer(stream), 53954 xref: this, 53955 allowStreams: true 53956 }); 53957 let obj = parser.getObj(); 53958 let dict; 53959 if (isCmd(obj, "xref")) { 53960 dict = this.processXRefTable(parser); 53961 if (!this.topDict) { 53962 this.topDict = dict; 53963 } 53964 obj = dict.get("XRefStm"); 53965 if (Number.isInteger(obj) && !this._xrefStms.has(obj)) { 53966 this._xrefStms.add(obj); 53967 this.startXRefQueue.push(obj); 53968 this.#firstXRefStmPos ??= obj; 53969 } 53970 } else if (Number.isInteger(obj)) { 53971 if (!Number.isInteger(parser.getObj()) || !isCmd(parser.getObj(), "obj") || !((obj = parser.getObj()) instanceof BaseStream)) { 53972 throw new FormatError("Invalid XRef stream"); 53973 } 53974 dict = this.processXRefStream(obj); 53975 if (!this.topDict) { 53976 this.topDict = dict; 53977 } 53978 if (!dict) { 53979 throw new FormatError("Failed to read XRef stream"); 53980 } 53981 } else { 53982 throw new FormatError("Invalid XRef stream header"); 53983 } 53984 obj = dict.get("Prev"); 53985 if (Number.isInteger(obj)) { 53986 this.startXRefQueue.push(obj); 53987 } else if (obj instanceof Ref) { 53988 this.startXRefQueue.push(obj.num); 53989 } 53990 } catch (e) { 53991 if (e instanceof MissingDataException) { 53992 throw e; 53993 } 53994 info("(while reading XRef): " + e); 53995 } 53996 this.startXRefQueue.shift(); 53997 } 53998 if (this.topDict) { 53999 return this.topDict; 54000 } 54001 if (recoveryMode) { 54002 return undefined; 54003 } 54004 throw new XRefParseException(); 54005 } 54006 get lastXRefStreamPos() { 54007 return this.#firstXRefStmPos ?? (this._xrefStms.size > 0 ? Math.max(...this._xrefStms) : null); 54008 } 54009 getEntry(i) { 54010 const xrefEntry = this.entries[i]; 54011 if (xrefEntry && !xrefEntry.free && xrefEntry.offset) { 54012 return xrefEntry; 54013 } 54014 return null; 54015 } 54016 fetchIfRef(obj, suppressEncryption = false) { 54017 if (obj instanceof Ref) { 54018 return this.fetch(obj, suppressEncryption); 54019 } 54020 return obj; 54021 } 54022 fetch(ref, suppressEncryption = false) { 54023 if (!(ref instanceof Ref)) { 54024 throw new Error("ref object is not a reference"); 54025 } 54026 const num = ref.num; 54027 const cacheEntry = this._cacheMap.get(num); 54028 if (cacheEntry !== undefined) { 54029 if (cacheEntry instanceof Dict && !cacheEntry.objId) { 54030 cacheEntry.objId = ref.toString(); 54031 } 54032 return cacheEntry; 54033 } 54034 let xrefEntry = this.getEntry(num); 54035 if (xrefEntry === null) { 54036 this._cacheMap.set(num, xrefEntry); 54037 return xrefEntry; 54038 } 54039 if (this._pendingRefs.has(ref)) { 54040 this._pendingRefs.remove(ref); 54041 warn(`Ignoring circular reference: ${ref}.`); 54042 return CIRCULAR_REF; 54043 } 54044 this._pendingRefs.put(ref); 54045 try { 54046 xrefEntry = xrefEntry.uncompressed ? this.fetchUncompressed(ref, xrefEntry, suppressEncryption) : this.fetchCompressed(ref, xrefEntry, suppressEncryption); 54047 this._pendingRefs.remove(ref); 54048 } catch (ex) { 54049 this._pendingRefs.remove(ref); 54050 throw ex; 54051 } 54052 if (xrefEntry instanceof Dict) { 54053 xrefEntry.objId = ref.toString(); 54054 } else if (xrefEntry instanceof BaseStream) { 54055 xrefEntry.dict.objId = ref.toString(); 54056 } 54057 return xrefEntry; 54058 } 54059 fetchUncompressed(ref, xrefEntry, suppressEncryption = false) { 54060 const gen = ref.gen; 54061 let num = ref.num; 54062 if (xrefEntry.gen !== gen) { 54063 const msg = `Inconsistent generation in XRef: ${ref}`; 54064 if (this._generationFallback && xrefEntry.gen < gen) { 54065 warn(msg); 54066 return this.fetchUncompressed(Ref.get(num, xrefEntry.gen), xrefEntry, suppressEncryption); 54067 } 54068 throw new XRefEntryException(msg); 54069 } 54070 const stream = this.stream.makeSubStream(xrefEntry.offset + this.stream.start); 54071 const parser = new Parser({ 54072 lexer: new Lexer(stream), 54073 xref: this, 54074 allowStreams: true 54075 }); 54076 const obj1 = parser.getObj(); 54077 const obj2 = parser.getObj(); 54078 const obj3 = parser.getObj(); 54079 if (obj1 !== num || obj2 !== gen || !(obj3 instanceof Cmd)) { 54080 throw new XRefEntryException(`Bad (uncompressed) XRef entry: ${ref}`); 54081 } 54082 if (obj3.cmd !== "obj") { 54083 if (obj3.cmd.startsWith("obj")) { 54084 num = parseInt(obj3.cmd.substring(3), 10); 54085 if (!Number.isNaN(num)) { 54086 return num; 54087 } 54088 } 54089 throw new XRefEntryException(`Bad (uncompressed) XRef entry: ${ref}`); 54090 } 54091 xrefEntry = this.encrypt && !suppressEncryption ? parser.getObj(this.encrypt.createCipherTransform(num, gen)) : parser.getObj(); 54092 if (!(xrefEntry instanceof BaseStream)) { 54093 this._cacheMap.set(num, xrefEntry); 54094 } 54095 return xrefEntry; 54096 } 54097 fetchCompressed(ref, xrefEntry, suppressEncryption = false) { 54098 const tableOffset = xrefEntry.offset; 54099 const stream = this.fetch(Ref.get(tableOffset, 0)); 54100 if (!(stream instanceof BaseStream)) { 54101 throw new FormatError("bad ObjStm stream"); 54102 } 54103 const first = stream.dict.get("First"); 54104 const n = stream.dict.get("N"); 54105 if (!Number.isInteger(first) || !Number.isInteger(n)) { 54106 throw new FormatError("invalid first and n parameters for ObjStm stream"); 54107 } 54108 let parser = new Parser({ 54109 lexer: new Lexer(stream), 54110 xref: this, 54111 allowStreams: true 54112 }); 54113 const nums = new Array(n); 54114 const offsets = new Array(n); 54115 for (let i = 0; i < n; ++i) { 54116 const num = parser.getObj(); 54117 if (!Number.isInteger(num)) { 54118 throw new FormatError(`invalid object number in the ObjStm stream: ${num}`); 54119 } 54120 const offset = parser.getObj(); 54121 if (!Number.isInteger(offset)) { 54122 throw new FormatError(`invalid object offset in the ObjStm stream: ${offset}`); 54123 } 54124 nums[i] = num; 54125 offsets[i] = offset; 54126 } 54127 const start = (stream.start || 0) + first; 54128 const entries = new Array(n); 54129 for (let i = 0; i < n; ++i) { 54130 const length = i < n - 1 ? offsets[i + 1] - offsets[i] : undefined; 54131 if (length < 0) { 54132 throw new FormatError("Invalid offset in the ObjStm stream."); 54133 } 54134 parser = new Parser({ 54135 lexer: new Lexer(stream.makeSubStream(start + offsets[i], length, stream.dict)), 54136 xref: this, 54137 allowStreams: true 54138 }); 54139 const obj = parser.getObj(); 54140 entries[i] = obj; 54141 if (obj instanceof BaseStream) { 54142 continue; 54143 } 54144 const num = nums[i], 54145 entry = this.entries[num]; 54146 if (entry && entry.offset === tableOffset && entry.gen === i) { 54147 this._cacheMap.set(num, obj); 54148 } 54149 } 54150 xrefEntry = entries[xrefEntry.gen]; 54151 if (xrefEntry === undefined) { 54152 throw new XRefEntryException(`Bad (compressed) XRef entry: ${ref}`); 54153 } 54154 return xrefEntry; 54155 } 54156 async fetchIfRefAsync(obj, suppressEncryption) { 54157 if (obj instanceof Ref) { 54158 return this.fetchAsync(obj, suppressEncryption); 54159 } 54160 return obj; 54161 } 54162 async fetchAsync(ref, suppressEncryption) { 54163 try { 54164 return this.fetch(ref, suppressEncryption); 54165 } catch (ex) { 54166 if (!(ex instanceof MissingDataException)) { 54167 throw ex; 54168 } 54169 await this.pdfManager.requestRange(ex.begin, ex.end); 54170 return this.fetchAsync(ref, suppressEncryption); 54171 } 54172 } 54173 getCatalogObj() { 54174 return this.root; 54175 } 54176} 54177 54178;// ./src/core/document.js 54179 54180 54181 54182 54183 54184 54185 54186 54187 54188 54189 54190 54191 54192 54193 54194 54195 54196 54197 54198 54199const DEFAULT_USER_UNIT = 1.0; 54200const LETTER_SIZE_MEDIABOX = [0, 0, 612, 792]; 54201class Page { 54202 constructor({ 54203 pdfManager, 54204 xref, 54205 pageIndex, 54206 pageDict, 54207 ref, 54208 globalIdFactory, 54209 fontCache, 54210 builtInCMapCache, 54211 standardFontDataCache, 54212 globalImageCache, 54213 systemFontCache, 54214 nonBlendModesSet, 54215 xfaFactory 54216 }) { 54217 this.pdfManager = pdfManager; 54218 this.pageIndex = pageIndex; 54219 this.pageDict = pageDict; 54220 this.xref = xref; 54221 this.ref = ref; 54222 this.fontCache = fontCache; 54223 this.builtInCMapCache = builtInCMapCache; 54224 this.standardFontDataCache = standardFontDataCache; 54225 this.globalImageCache = globalImageCache; 54226 this.systemFontCache = systemFontCache; 54227 this.nonBlendModesSet = nonBlendModesSet; 54228 this.evaluatorOptions = pdfManager.evaluatorOptions; 54229 this.resourcesPromise = null; 54230 this.xfaFactory = xfaFactory; 54231 const idCounters = { 54232 obj: 0 54233 }; 54234 this._localIdFactory = class extends globalIdFactory { 54235 static createObjId() { 54236 return `p${pageIndex}_${++idCounters.obj}`; 54237 } 54238 static getPageObjId() { 54239 return `p${ref.toString()}`; 54240 } 54241 }; 54242 } 54243 _getInheritableProperty(key, getArray = false) { 54244 const value = getInheritableProperty({ 54245 dict: this.pageDict, 54246 key, 54247 getArray, 54248 stopWhenFound: false 54249 }); 54250 if (!Array.isArray(value)) { 54251 return value; 54252 } 54253 if (value.length === 1 || !(value[0] instanceof Dict)) { 54254 return value[0]; 54255 } 54256 return Dict.merge({ 54257 xref: this.xref, 54258 dictArray: value 54259 }); 54260 } 54261 get content() { 54262 return this.pageDict.getArray("Contents"); 54263 } 54264 get resources() { 54265 const resources = this._getInheritableProperty("Resources"); 54266 return shadow(this, "resources", resources instanceof Dict ? resources : Dict.empty); 54267 } 54268 _getBoundingBox(name) { 54269 if (this.xfaData) { 54270 return this.xfaData.bbox; 54271 } 54272 const box = lookupNormalRect(this._getInheritableProperty(name, true), null); 54273 if (box) { 54274 if (box[2] - box[0] > 0 && box[3] - box[1] > 0) { 54275 return box; 54276 } 54277 warn(`Empty, or invalid, /${name} entry.`); 54278 } 54279 return null; 54280 } 54281 get mediaBox() { 54282 return shadow(this, "mediaBox", this._getBoundingBox("MediaBox") || LETTER_SIZE_MEDIABOX); 54283 } 54284 get cropBox() { 54285 return shadow(this, "cropBox", this._getBoundingBox("CropBox") || this.mediaBox); 54286 } 54287 get userUnit() { 54288 let obj = this.pageDict.get("UserUnit"); 54289 if (typeof obj !== "number" || obj <= 0) { 54290 obj = DEFAULT_USER_UNIT; 54291 } 54292 return shadow(this, "userUnit", obj); 54293 } 54294 get view() { 54295 const { 54296 cropBox, 54297 mediaBox 54298 } = this; 54299 if (cropBox !== mediaBox && !isArrayEqual(cropBox, mediaBox)) { 54300 const box = Util.intersect(cropBox, mediaBox); 54301 if (box && box[2] - box[0] > 0 && box[3] - box[1] > 0) { 54302 return shadow(this, "view", box); 54303 } 54304 warn("Empty /CropBox and /MediaBox intersection."); 54305 } 54306 return shadow(this, "view", mediaBox); 54307 } 54308 get rotate() { 54309 let rotate = this._getInheritableProperty("Rotate") || 0; 54310 if (rotate % 90 !== 0) { 54311 rotate = 0; 54312 } else if (rotate >= 360) {
54313 rotate %= 360; 54314 } else if (rotate < 0) { 54315 rotate = (rotate % 360 + 360) % 360; 54316 } 54317 return shadow(this, "rotate", rotate); 54318 } 54319 _onSubStreamError(reason, objId) { 54320 if (this.evaluatorOptions.ignoreErrors) { 54321 warn(`getContentStream - ignoring sub-stream (${objId}): "${reason}".`); 54322 return; 54323 } 54324 throw reason; 54325 } 54326 getContentStream() { 54327 return this.pdfManager.ensure(this, "content").then(content => { 54328 if (content instanceof BaseStream) { 54329 return content; 54330 } 54331 if (Array.isArray(content)) { 54332 return new StreamsSequenceStream(content, this._onSubStreamError.bind(this)); 54333 } 54334 return new NullStream(); 54335 }); 54336 } 54337 get xfaData() { 54338 return shadow(this, "xfaData", this.xfaFactory ? { 54339 bbox: this.xfaFactory.getBoundingBox(this.pageIndex) 54340 } : null); 54341 } 54342 async #replaceIdByRef(annotations, deletedAnnotations, existingAnnotations) { 54343 const promises = []; 54344 for (const annotation of annotations) { 54345 if (annotation.id) { 54346 const ref = Ref.fromString(annotation.id); 54347 if (!ref) { 54348 warn(`A non-linked annotation cannot be modified: ${annotation.id}`); 54349 continue; 54350 } 54351 if (annotation.deleted) { 54352 deletedAnnotations.put(ref, ref); 54353 if (annotation.popupRef) { 54354 const popupRef = Ref.fromString(annotation.popupRef); 54355 if (popupRef) { 54356 deletedAnnotations.put(popupRef, popupRef); 54357 } 54358 } 54359 continue; 54360 } 54361 existingAnnotations?.put(ref); 54362 annotation.ref = ref; 54363 promises.push(this.xref.fetchAsync(ref).then(obj => { 54364 if (obj instanceof Dict) { 54365 annotation.oldAnnotation = obj.clone(); 54366 } 54367 }, () => { 54368 warn(`Cannot fetch \`oldAnnotation\` for: ${ref}.`); 54369 })); 54370 delete annotation.id; 54371 } 54372 } 54373 await Promise.all(promises); 54374 } 54375 async saveNewAnnotations(handler, task, annotations, imagePromises) { 54376 if (this.xfaFactory) { 54377 throw new Error("XFA: Cannot save new annotations."); 54378 } 54379 const partialEvaluator = new PartialEvaluator({ 54380 xref: this.xref, 54381 handler, 54382 pageIndex: this.pageIndex, 54383 idFactory: this._localIdFactory, 54384 fontCache: this.fontCache, 54385 builtInCMapCache: this.builtInCMapCache, 54386 standardFontDataCache: this.standardFontDataCache, 54387 globalImageCache: this.globalImageCache, 54388 systemFontCache: this.systemFontCache, 54389 options: this.evaluatorOptions 54390 }); 54391 const deletedAnnotations = new RefSetCache(); 54392 const existingAnnotations = new RefSet(); 54393 await this.#replaceIdByRef(annotations, deletedAnnotations, existingAnnotations); 54394 const pageDict = this.pageDict; 54395 const annotationsArray = this.annotations.filter(a => !(a instanceof Ref && deletedAnnotations.has(a))); 54396 const newData = await AnnotationFactory.saveNewAnnotations(partialEvaluator, task, annotations, imagePromises); 54397 for (const { 54398 ref 54399 } of newData.annotations) { 54400 if (ref instanceof Ref && !existingAnnotations.has(ref)) { 54401 annotationsArray.push(ref); 54402 } 54403 } 54404 const savedDict = pageDict.get("Annots"); 54405 pageDict.set("Annots", annotationsArray); 54406 const buffer = []; 54407 await writeObject(this.ref, pageDict, buffer, this.xref); 54408 if (savedDict) { 54409 pageDict.set("Annots", savedDict); 54410 } 54411 const objects = newData.dependencies; 54412 objects.push({ 54413 ref: this.ref, 54414 data: buffer.join("") 54415 }, ...newData.annotations); 54416 for (const deletedRef of deletedAnnotations) { 54417 objects.push({ 54418 ref: deletedRef, 54419 data: null 54420 }); 54421 } 54422 return objects; 54423 } 54424 save(handler, task, annotationStorage) { 54425 const partialEvaluator = new PartialEvaluator({ 54426 xref: this.xref, 54427 handler, 54428 pageIndex: this.pageIndex, 54429 idFactory: this._localIdFactory, 54430 fontCache: this.fontCache, 54431 builtInCMapCache: this.builtInCMapCache, 54432 standardFontDataCache: this.standardFontDataCache, 54433 globalImageCache: this.globalImageCache, 54434 systemFontCache: this.systemFontCache, 54435 options: this.evaluatorOptions 54436 }); 54437 return this._parsedAnnotations.then(function (annotations) { 54438 const newRefsPromises = []; 54439 for (const annotation of annotations) { 54440 newRefsPromises.push(annotation.save(partialEvaluator, task, annotationStorage).catch(function (reason) { 54441 warn("save - ignoring annotation data during " + `"${task.name}" task: "${reason}".`); 54442 return null; 54443 })); 54444 } 54445 return Promise.all(newRefsPromises).then(function (newRefs) { 54446 return newRefs.filter(newRef =>
vendor: 5,355 bytes, lines 54446-54571
54446 !!newRef); 54447 }); 54448 }); 54449 } 54450 loadResources(keys) { 54451 this.resourcesPromise ||= this.pdfManager.ensure(this, "resources"); 54452 return this.resourcesPromise.then(() => { 54453 const objectLoader = new ObjectLoader(this.resources, keys, this.xref); 54454 return objectLoader.load(); 54455 }); 54456 } 54457 getOperatorList({ 54458 handler, 54459 sink, 54460 task, 54461 intent, 54462 cacheKey, 54463 annotationStorage = null, 54464 modifiedIds = null 54465 }) { 54466 const contentStreamPromise = this.getContentStream(); 54467 const resourcesPromise = this.loadResources(["ColorSpace", "ExtGState", "Font", "Pattern", "Properties", "Shading", "XObject"]); 54468 const partialEvaluator = new PartialEvaluator({ 54469 xref: this.xref, 54470 handler, 54471 pageIndex: this.pageIndex, 54472 idFactory: this._localIdFactory, 54473 fontCache: this.fontCache, 54474 builtInCMapCache: this.builtInCMapCache, 54475 standardFontDataCache: this.standardFontDataCache, 54476 globalImageCache: this.globalImageCache, 54477 systemFontCache: this.systemFontCache, 54478 options: this.evaluatorOptions 54479 }); 54480 const newAnnotsByPage = !this.xfaFactory ? getNewAnnotationsMap(annotationStorage) : null; 54481 const newAnnots = newAnnotsByPage?.get(this.pageIndex); 54482 let newAnnotationsPromise = Promise.resolve(null); 54483 let deletedAnnotations = null; 54484 if (newAnnots) { 54485 const annotationGlobalsPromise = this.pdfManager.ensureDoc("annotationGlobals"); 54486 let imagePromises; 54487 const missingBitmaps = new Set(); 54488 for (const { 54489 bitmapId, 54490 bitmap 54491 } of newAnnots) { 54492 if (bitmapId && !bitmap && !missingBitmaps.has(bitmapId)) { 54493 missingBitmaps.add(bitmapId); 54494 } 54495 } 54496 const { 54497 isOffscreenCanvasSupported 54498 } = this.evaluatorOptions; 54499 if (missingBitmaps.size > 0) { 54500 const annotationWithBitmaps = newAnnots.slice(); 54501 for (const [key, annotation] of annotationStorage) { 54502 if (!key.startsWith(AnnotationEditorPrefix)) { 54503 continue; 54504 } 54505 if (annotation.bitmap && missingBitmaps.has(annotation.bitmapId)) { 54506 annotationWithBitmaps.push(annotation); 54507 } 54508 } 54509 imagePromises = AnnotationFactory.generateImages(annotationWithBitmaps, this.xref, isOffscreenCanvasSupported); 54510 } else { 54511 imagePromises = AnnotationFactory.generateImages(newAnnots, this.xref, isOffscreenCanvasSupported); 54512 } 54513 deletedAnnotations = new RefSet(); 54514 newAnnotationsPromise = Promise.all([annotationGlobalsPromise, this.#replaceIdByRef(newAnnots, deletedAnnotations, null)]).then(([annotationGlobals]) => { 54515 if (!annotationGlobals) { 54516 return null; 54517 } 54518 return AnnotationFactory.printNewAnnotations(annotationGlobals, partialEvaluator, task, newAnnots, imagePromises); 54519 }); 54520 } 54521 const pageListPromise = Promise.all([contentStreamPromise, resourcesPromise]).then(([contentStream]) => { 54522 const opList = new OperatorList(intent, sink); 54523 handler.send("StartRenderPage", { 54524 transparency: partialEvaluator.hasBlendModes(this.resources, this.nonBlendModesSet), 54525 pageIndex: this.pageIndex, 54526 cacheKey 54527 }); 54528 return partialEvaluator.getOperatorList({ 54529 stream: contentStream, 54530 task, 54531 resources: this.resources, 54532 operatorList: opList 54533 }).then(function () { 54534 return opList; 54535 }); 54536 }); 54537 return Promise.all([pageListPromise, this._parsedAnnotations, newAnnotationsPromise]).then(function ([pageOpList, annotations, newAnnotations]) { 54538 if (newAnnotations) { 54539 annotations = annotations.filter(a => !(a.ref && deletedAnnotations.has(a.ref))); 54540 for (let i = 0, ii = newAnnotations.length; i < ii; i++) { 54541 const newAnnotation = newAnnotations[i]; 54542 if (newAnnotation.refToReplace) { 54543 const j = annotations.findIndex(a => a.ref && isRefsEqual(a.ref, newAnnotation.refToReplace)); 54544 if (j >= 0) { 54545 annotations.splice(j, 1, newAnnotation); 54546 newAnnotations.splice(i--, 1); 54547 ii--; 54548 } 54549 } 54550 } 54551 annotations = annotations.concat(newAnnotations); 54552 } 54553 if (annotations.length === 0 || intent & RenderingIntentFlag.ANNOTATIONS_DISABLE) { 54554 pageOpList.flush(true); 54555 return { 54556 length: pageOpList.totalLength 54557 }; 54558 } 54559 const renderForms = !!(intent & RenderingIntentFlag.ANNOTATIONS_FORMS), 54560 isEditing = !!(intent & RenderingIntentFlag.IS_EDITING), 54561 intentAny = !!(intent & RenderingIntentFlag.ANY), 54562 intentDisplay = !!(intent & RenderingIntentFlag.DISPLAY), 54563 intentPrint = !!(intent & RenderingIntentFlag.PRINT); 54564 const opListPromises = []; 54565 for (const annotation of annotations) { 54566 if (intentAny || intentDisplay && annotation.mustBeViewed(annotationStorage, renderForms) && annotation.mustBeViewedWhenEditing(isEditing, modifiedIds) || intentPrint && annotation.mustBePrinted(annotationStorage)) { 54567 opListPromises.push(annotation.getOperatorList(partialEvaluator, task, intent, annotationStorage).catch(function (reason) { 54568 warn("getOperatorList - ignoring annotation data during " + `"${task.name}" task: "${reason}".`); 54569 return { 54570 opList: null, 54571 separateForm: false,
vendor: 6,280 bytes, lines 54572-54744
54572 separateCanvas: false 54573 }; 54574 })); 54575 } 54576 } 54577 return Promise.all(opListPromises).then(function (opLists) { 54578 let form = false, 54579 canvas = false; 54580 for (const { 54581 opList, 54582 separateForm, 54583 separateCanvas 54584 } of opLists) { 54585 pageOpList.addOpList(opList); 54586 form ||= separateForm; 54587 canvas ||= separateCanvas; 54588 } 54589 pageOpList.flush(true, { 54590 form, 54591 canvas 54592 }); 54593 return { 54594 length: pageOpList.totalLength 54595 }; 54596 }); 54597 }); 54598 } 54599 async extractTextContent({ 54600 handler, 54601 task, 54602 includeMarkedContent, 54603 disableNormalization, 54604 sink 54605 }) { 54606 const contentStreamPromise = this.getContentStream(); 54607 const resourcesPromise = this.loadResources(["ExtGState", "Font", "Properties", "XObject"]); 54608 const langPromise = this.pdfManager.ensureCatalog("lang"); 54609 const [contentStream,, lang] = await Promise.all([contentStreamPromise, resourcesPromise, langPromise]); 54610 const partialEvaluator = new PartialEvaluator({ 54611 xref: this.xref, 54612 handler, 54613 pageIndex: this.pageIndex, 54614 idFactory: this._localIdFactory, 54615 fontCache: this.fontCache, 54616 builtInCMapCache: this.builtInCMapCache, 54617 standardFontDataCache: this.standardFontDataCache, 54618 globalImageCache: this.globalImageCache, 54619 systemFontCache: this.systemFontCache, 54620 options: this.evaluatorOptions 54621 }); 54622 return partialEvaluator.getTextContent({ 54623 stream: contentStream, 54624 task, 54625 resources: this.resources, 54626 includeMarkedContent, 54627 disableNormalization, 54628 sink, 54629 viewBox: this.view, 54630 lang 54631 }); 54632 } 54633 async getStructTree() { 54634 const structTreeRoot = await this.pdfManager.ensureCatalog("structTreeRoot"); 54635 if (!structTreeRoot) { 54636 return null; 54637 } 54638 await this._parsedAnnotations; 54639 const structTree = await this.pdfManager.ensure(this, "_parseStructTree", [structTreeRoot]); 54640 return this.pdfManager.ensure(structTree, "serializable"); 54641 } 54642 _parseStructTree(structTreeRoot) { 54643 const tree = new StructTreePage(structTreeRoot, this.pageDict); 54644 tree.parse(this.ref); 54645 return tree; 54646 } 54647 async getAnnotationsData(handler, task, intent) { 54648 const annotations = await this._parsedAnnotations; 54649 if (annotations.length === 0) { 54650 return annotations; 54651 } 54652 const annotationsData = [], 54653 textContentPromises = []; 54654 let partialEvaluator; 54655 const intentAny = !!(intent & RenderingIntentFlag.ANY), 54656 intentDisplay = !!(intent & RenderingIntentFlag.DISPLAY), 54657 intentPrint = !!(intent & RenderingIntentFlag.PRINT); 54658 for (const annotation of annotations) { 54659 const isVisible = intentAny || intentDisplay && annotation.viewable; 54660 if (isVisible || intentPrint && annotation.printable) { 54661 annotationsData.push(annotation.data); 54662 } 54663 if (annotation.hasTextContent && isVisible) { 54664 partialEvaluator ||= new PartialEvaluator({ 54665 xref: this.xref, 54666 handler, 54667 pageIndex: this.pageIndex, 54668 idFactory: this._localIdFactory, 54669 fontCache: this.fontCache, 54670 builtInCMapCache: this.builtInCMapCache, 54671 standardFontDataCache: this.standardFontDataCache, 54672 globalImageCache: this.globalImageCache, 54673 systemFontCache: this.systemFontCache, 54674 options: this.evaluatorOptions 54675 }); 54676 textContentPromises.push(annotation.extractTextContent(partialEvaluator, task, [-Infinity, -Infinity, Infinity, Infinity]).catch(function (reason) { 54677 warn(`getAnnotationsData - ignoring textContent during "${task.name}" task: "${reason}".`); 54678 })); 54679 } 54680 } 54681 await Promise.all(textContentPromises); 54682 return annotationsData; 54683 } 54684 get annotations() { 54685 const annots = this._getInheritableProperty("Annots"); 54686 return shadow(this, "annotations", Array.isArray(annots) ? annots : []); 54687 } 54688 get _parsedAnnotations() { 54689 const promise = this.pdfManager.ensure(this, "annotations").then(async annots => { 54690 if (annots.length === 0) { 54691 return annots; 54692 } 54693 const [annotationGlobals, fieldObjects] = await Promise.all([this.pdfManager.ensureDoc("annotationGlobals"), this.pdfManager.ensureDoc("fieldObjects")]); 54694 if (!annotationGlobals) { 54695 return []; 54696 } 54697 const orphanFields = fieldObjects?.orphanFields; 54698 const annotationPromises = []; 54699 for (const annotationRef of annots) { 54700 annotationPromises.push(AnnotationFactory.create(this.xref, annotationRef, annotationGlobals, this._localIdFactory, false, orphanFields, this.ref).catch(function (reason) { 54701 warn(`_parsedAnnotations: "${reason}".`); 54702 return null; 54703 })); 54704 } 54705 const sortedAnnotations = []; 54706 let popupAnnotations, widgetAnnotations; 54707 for (const annotation of await Promise.all(annotationPromises)) { 54708 if (!annotation) { 54709 continue; 54710 } 54711 if (annotation instanceof WidgetAnnotation) { 54712 (widgetAnnotations ||= []).push(annotation); 54713 continue; 54714 } 54715 if (annotation instanceof PopupAnnotation) { 54716 (popupAnnotations ||= []).push(annotation); 54717 continue; 54718 } 54719 sortedAnnotations.push(annotation); 54720 } 54721 if (widgetAnnotations) { 54722 sortedAnnotations.push(...widgetAnnotations); 54723 } 54724 if (popupAnnotations) { 54725 sortedAnnotations.push(...popupAnnotations); 54726 } 54727 return sortedAnnotations; 54728 }); 54729 return shadow(this, "_parsedAnnotations", promise); 54730 } 54731 get jsActions() { 54732 const actions = collectActions(this.xref, this.pageDict, PageActionEventType); 54733 return shadow(this, "jsActions", actions); 54734 } 54735} 54736const PDF_HEADER_SIGNATURE = new Uint8Array([0x25, 0x50, 0x44, 0x46, 0x2d]); 54737const STARTXREF_SIGNATURE = new Uint8Array([0x73, 0x74, 0x61, 0x72, 0x74, 0x78, 0x72, 0x65, 0x66]); 54738const ENDOBJ_SIGNATURE = new Uint8Array([0x65, 0x6e, 0x64, 0x6f, 0x62, 0x6a]); 54739function find(stream, signature, limit = 1024, backwards = false) { 54740 const signatureLength = signature.length; 54741 const scanBytes = stream.peekBytes(limit); 54742 const scanLength = scanBytes.length - signatureLength; 54743 if (scanLength <= 0) { 54744 return false;
vendor: 8,563 bytes, lines 54745-55055
54745 } 54746 if (backwards) { 54747 const signatureEnd = signatureLength - 1; 54748 let pos = scanBytes.length - 1; 54749 while (pos >= signatureEnd) { 54750 let j = 0; 54751 while (j < signatureLength && scanBytes[pos - j] === signature[signatureEnd - j]) { 54752 j++; 54753 } 54754 if (j >= signatureLength) { 54755 stream.pos += pos - signatureEnd; 54756 return true; 54757 } 54758 pos--; 54759 } 54760 } else { 54761 let pos = 0; 54762 while (pos <= scanLength) { 54763 let j = 0; 54764 while (j < signatureLength && scanBytes[pos + j] === signature[j]) { 54765 j++; 54766 } 54767 if (j >= signatureLength) { 54768 stream.pos += pos; 54769 return true; 54770 } 54771 pos++; 54772 } 54773 } 54774 return false; 54775} 54776class PDFDocument { 54777 constructor(pdfManager, stream) { 54778 if (stream.length <= 0) { 54779 throw new InvalidPDFException("The PDF file is empty, i.e. its size is zero bytes."); 54780 } 54781 this.pdfManager = pdfManager; 54782 this.stream = stream; 54783 this.xref = new XRef(stream, pdfManager); 54784 this._pagePromises = new Map(); 54785 this._version = null; 54786 const idCounters = { 54787 font: 0 54788 }; 54789 this._globalIdFactory = class { 54790 static getDocId() { 54791 return `g_${pdfManager.docId}`; 54792 } 54793 static createFontId() { 54794 return `f${++idCounters.font}`; 54795 } 54796 static createObjId() { 54797 unreachable("Abstract method `createObjId` called."); 54798 } 54799 static getPageObjId() { 54800 unreachable("Abstract method `getPageObjId` called."); 54801 } 54802 }; 54803 } 54804 parse(recoveryMode) { 54805 this.xref.parse(recoveryMode); 54806 this.catalog = new Catalog(this.pdfManager, this.xref); 54807 } 54808 get linearization() { 54809 let linearization = null; 54810 try { 54811 linearization = Linearization.create(this.stream); 54812 } catch (err) { 54813 if (err instanceof MissingDataException) { 54814 throw err; 54815 } 54816 info(err); 54817 } 54818 return shadow(this, "linearization", linearization); 54819 } 54820 get startXRef() { 54821 const stream = this.stream; 54822 let startXRef = 0; 54823 if (this.linearization) { 54824 stream.reset(); 54825 if (find(stream, ENDOBJ_SIGNATURE)) { 54826 stream.skip(6); 54827 let ch = stream.peekByte(); 54828 while (isWhiteSpace(ch)) { 54829 stream.pos++; 54830 ch = stream.peekByte(); 54831 } 54832 startXRef = stream.pos - stream.start; 54833 } 54834 } else { 54835 const step = 1024; 54836 const startXRefLength = STARTXREF_SIGNATURE.length; 54837 let found = false, 54838 pos = stream.end; 54839 while (!found && pos > 0) { 54840 pos -= step - startXRefLength; 54841 if (pos < 0) { 54842 pos = 0; 54843 } 54844 stream.pos = pos; 54845 found = find(stream, STARTXREF_SIGNATURE, step, true); 54846 } 54847 if (found) { 54848 stream.skip(9); 54849 let ch; 54850 do { 54851 ch = stream.getByte(); 54852 } while (isWhiteSpace(ch)); 54853 let str = ""; 54854 while (ch >= 0x20 && ch <= 0x39) { 54855 str += String.fromCharCode(ch); 54856 ch = stream.getByte(); 54857 } 54858 startXRef = parseInt(str, 10); 54859 if (isNaN(startXRef)) { 54860 startXRef = 0; 54861 } 54862 } 54863 } 54864 return shadow(this, "startXRef", startXRef); 54865 } 54866 checkHeader() { 54867 const stream = this.stream; 54868 stream.reset(); 54869 if (!find(stream, PDF_HEADER_SIGNATURE)) { 54870 return; 54871 } 54872 stream.moveStart(); 54873 stream.skip(PDF_HEADER_SIGNATURE.length); 54874 let version = "", 54875 ch; 54876 while ((ch = stream.getByte()) > 0x20 && version.length < 7) { 54877 version += String.fromCharCode(ch); 54878 } 54879 if (PDF_VERSION_REGEXP.test(version)) { 54880 this._version = version; 54881 } else { 54882 warn(`Invalid PDF header version: ${version}`); 54883 } 54884 } 54885 parseStartXRef() { 54886 this.xref.setStartXRef(this.startXRef); 54887 } 54888 get numPages() { 54889 let num = 0; 54890 if (this.catalog.hasActualNumPages) { 54891 num = this.catalog.numPages; 54892 } else if (this.xfaFactory) { 54893 num = this.xfaFactory.getNumPages(); 54894 } else if (this.linearization) { 54895 num = this.linearization.numPages; 54896 } else { 54897 num = this.catalog.numPages; 54898 } 54899 return shadow(this, "numPages", num); 54900 } 54901 _hasOnlyDocumentSignatures(fields, recursionDepth = 0) { 54902 const RECURSION_LIMIT = 10; 54903 if (!Array.isArray(fields)) { 54904 return false; 54905 } 54906 return fields.every(field => { 54907 field = this.xref.fetchIfRef(field); 54908 if (!(field instanceof Dict)) { 54909 return false; 54910 } 54911 if (field.has("Kids")) { 54912 if (++recursionDepth > RECURSION_LIMIT) { 54913 warn("_hasOnlyDocumentSignatures: maximum recursion depth reached"); 54914 return false; 54915 } 54916 return this._hasOnlyDocumentSignatures(field.get("Kids"), recursionDepth); 54917 } 54918 const isSignature = isName(field.get("FT"), "Sig"); 54919 const rectangle = field.get("Rect"); 54920 const isInvisible = Array.isArray(rectangle) && rectangle.every(value => value === 0); 54921 return isSignature && isInvisible; 54922 }); 54923 } 54924 get _xfaStreams() { 54925 const acroForm = this.catalog.acroForm; 54926 if (!acroForm) { 54927 return null; 54928 } 54929 const xfa = acroForm.get("XFA"); 54930 const entries = { 54931 "xdp:xdp": "", 54932 template: "", 54933 datasets: "", 54934 config: "", 54935 connectionSet: "", 54936 localeSet: "", 54937 stylesheet: "", 54938 "/xdp:xdp": "" 54939 }; 54940 if (xfa instanceof BaseStream && !xfa.isEmpty) { 54941 entries["xdp:xdp"] = xfa; 54942 return entries; 54943 } 54944 if (!Array.isArray(xfa) || xfa.length === 0) { 54945 return null; 54946 } 54947 for (let i = 0, ii = xfa.length; i < ii; i += 2) { 54948 let name; 54949 if (i === 0) { 54950 name = "xdp:xdp"; 54951 } else if (i === ii - 2) { 54952 name = "/xdp:xdp"; 54953 } else { 54954 name = xfa[i]; 54955 } 54956 if (!entries.hasOwnProperty(name)) { 54957 continue; 54958 } 54959 const data = this.xref.fetchIfRef(xfa[i + 1]); 54960 if (!(data instanceof BaseStream) || data.isEmpty) { 54961 continue; 54962 } 54963 entries[name] = data; 54964 } 54965 return entries; 54966 } 54967 get xfaDatasets() { 54968 const streams = this._xfaStreams; 54969 if (!streams) { 54970 return shadow(this, "xfaDatasets", null); 54971 } 54972 for (const key of ["datasets", "xdp:xdp"]) { 54973 const stream = streams[key]; 54974 if (!stream) { 54975 continue; 54976 } 54977 try { 54978 const str = stringToUTF8String(stream.getString()); 54979 const data = { 54980 [key]: str 54981 }; 54982 return shadow(this, "xfaDatasets", new DatasetReader(data)); 54983 } catch { 54984 warn("XFA - Invalid utf-8 string."); 54985 break; 54986 } 54987 } 54988 return shadow(this, "xfaDatasets", null); 54989 } 54990 get xfaData() { 54991 const streams = this._xfaStreams; 54992 if (!streams) { 54993 return null; 54994 } 54995 const data = Object.create(null); 54996 for (const [key, stream] of Object.entries(streams)) { 54997 if (!stream) { 54998 continue; 54999 } 55000 try { 55001 data[key] = stringToUTF8String(stream.getString()); 55002 } catch { 55003 warn("XFA - Invalid utf-8 string."); 55004 return null; 55005 } 55006 } 55007 return data; 55008 } 55009 get xfaFactory() { 55010 let data; 55011 if (this.pdfManager.enableXfa && this.catalog.needsRendering && this.formInfo.hasXfa && !this.formInfo.hasAcroForm) { 55012 data = this.xfaData; 55013 } 55014 return shadow(this, "xfaFactory", data ? new XFAFactory(data) : null); 55015 } 55016 get isPureXfa() { 55017 return this.xfaFactory ? this.xfaFactory.isValid() : false; 55018 } 55019 get htmlForXfa() { 55020 return this.xfaFactory ? this.xfaFactory.getPages() : null; 55021 } 55022 async loadXfaImages() { 55023 const xfaImagesDict = await this.pdfManager.ensureCatalog("xfaImages"); 55024 if (!xfaImagesDict) { 55025 return; 55026 } 55027 const keys = xfaImagesDict.getKeys(); 55028 const objectLoader = new ObjectLoader(xfaImagesDict, keys, this.xref); 55029 await objectLoader.load(); 55030 const xfaImages = new Map(); 55031 for (const key of keys) { 55032 const stream = xfaImagesDict.get(key); 55033 if (stream instanceof BaseStream) { 55034 xfaImages.set(key, stream.getBytes()); 55035 } 55036 } 55037 this.xfaFactory.setImages(xfaImages); 55038 } 55039 async loadXfaFonts(handler, task) { 55040 const acroForm = await this.pdfManager.ensureCatalog("acroForm"); 55041 if (!acroForm) { 55042 return; 55043 } 55044 const resources = await acroForm.getAsync("DR"); 55045 if (!(resources instanceof Dict)) { 55046 return; 55047 } 55048 const objectLoader = new ObjectLoader(resources, ["Font"], this.xref); 55049 await objectLoader.load(); 55050 const fontRes = resources.get("Font"); 55051 if (!(fontRes instanceof Dict)) { 55052 return; 55053 } 55054 const options = Object.assign(Object.create(null), this.pdfManager.evaluatorOptions); 55055 options.useSystemFonts = false;
vendor: 3,266 bytes, lines 55056-55162
55056 const partialEvaluator = new PartialEvaluator({ 55057 xref: this.xref, 55058 handler, 55059 pageIndex: -1, 55060 idFactory: this._globalIdFactory, 55061 fontCache: this.catalog.fontCache, 55062 builtInCMapCache: this.catalog.builtInCMapCache, 55063 standardFontDataCache: this.catalog.standardFontDataCache, 55064 options 55065 }); 55066 const operatorList = new OperatorList(); 55067 const pdfFonts = []; 55068 const initialState = { 55069 get font() { 55070 return pdfFonts.at(-1); 55071 }, 55072 set font(font) { 55073 pdfFonts.push(font); 55074 }, 55075 clone() { 55076 return this; 55077 } 55078 }; 55079 const fonts = new Map(); 55080 fontRes.forEach((fontName, font) => { 55081 fonts.set(fontName, font); 55082 }); 55083 const promises = []; 55084 for (const [fontName, font] of fonts) { 55085 const descriptor = font.get("FontDescriptor"); 55086 if (!(descriptor instanceof Dict)) { 55087 continue; 55088 } 55089 let fontFamily = descriptor.get("FontFamily"); 55090 fontFamily = fontFamily.replaceAll(/[ ]+(\d)/g, "$1"); 55091 const fontWeight = descriptor.get("FontWeight"); 55092 const italicAngle = -descriptor.get("ItalicAngle"); 55093 const cssFontInfo = { 55094 fontFamily, 55095 fontWeight, 55096 italicAngle 55097 }; 55098 if (!validateCSSFont(cssFontInfo)) { 55099 continue; 55100 } 55101 promises.push(partialEvaluator.handleSetFont(resources, [Name.get(fontName), 1], null, operatorList, task, initialState, null, cssFontInfo).catch(function (reason) { 55102 warn(`loadXfaFonts: "${reason}".`); 55103 return null; 55104 })); 55105 } 55106 await Promise.all(promises); 55107 const missingFonts = this.xfaFactory.setFonts(pdfFonts); 55108 if (!missingFonts) { 55109 return; 55110 } 55111 options.ignoreErrors = true; 55112 promises.length = 0; 55113 pdfFonts.length = 0; 55114 const reallyMissingFonts = new Set(); 55115 for (const missing of missingFonts) { 55116 if (!getXfaFontName(`${missing}-Regular`)) { 55117 reallyMissingFonts.add(missing); 55118 } 55119 } 55120 if (reallyMissingFonts.size) { 55121 missingFonts.push("PdfJS-Fallback"); 55122 } 55123 for (const missing of missingFonts) { 55124 if (reallyMissingFonts.has(missing)) { 55125 continue; 55126 } 55127 for (const fontInfo of [{ 55128 name: "Regular", 55129 fontWeight: 400, 55130 italicAngle: 0 55131 }, { 55132 name: "Bold", 55133 fontWeight: 700, 55134 italicAngle: 0 55135 }, { 55136 name: "Italic", 55137 fontWeight: 400, 55138 italicAngle: 12 55139 }, { 55140 name: "BoldItalic", 55141 fontWeight: 700, 55142 italicAngle: 12 55143 }]) { 55144 const name = `${missing}-${fontInfo.name}`; 55145 const dict = getXfaFontDict(name); 55146 promises.push(partialEvaluator.handleSetFont(resources, [Name.get(name), 1], null, operatorList, task, initialState, dict, { 55147 fontFamily: missing, 55148 fontWeight: fontInfo.fontWeight, 55149 italicAngle: fontInfo.italicAngle 55150 }).catch(function (reason) { 55151 warn(`loadXfaFonts: "${reason}".`); 55152 return null; 55153 })); 55154 } 55155 } 55156 await Promise.all(promises); 55157 this.xfaFactory.appendFonts(pdfFonts, reallyMissingFonts); 55158 } 55159 async serializeXfaData(annotationStorage) { 55160 return this.xfaFactory ? this.xfaFactory.serializeData(annotationStorage) : null; 55161 } 55162 get version() {
55163 return this.catalog.version || this._version; 55164 } 55165 get formInfo() { 55166 const formInfo = { 55167 hasFields: false, 55168 hasAcroForm: false, 55169 hasXfa: false, 55170 hasSignatures: false 55171 }; 55172 const acroForm = this.catalog.acroForm; 55173 if (!acroForm) { 55174 return shadow(this, "formInfo", formInfo); 55175 } 55176 try { 55177 const fields = acroForm.get("Fields"); 55178 const hasFields = Array.isArray(fields) && fields.length > 0; 55179 formInfo.hasFields = hasFields; 55180 const xfa = acroForm.get("XFA"); 55181 formInfo.hasXfa = Array.isArray(xfa) && xfa.length > 0 || xfa instanceof BaseStream && !xfa.isEmpty; 55182 const sigFlags = acroForm.get("SigFlags"); 55183 const hasSignatures = !!(sigFlags & 0x1); 55184 const hasOnlyDocumentSignatures = hasSignatures && this._hasOnlyDocumentSignatures(fields); 55185 formInfo.hasAcroForm = hasFields && !hasOnlyDocumentSignatures; 55186 formInfo.hasSignatures = hasSignatures; 55187 } catch (ex) { 55188 if (ex instanceof MissingDataException) { 55189 throw ex; 55190 } 55191 warn(`Cannot fetch form information: "${ex}".`); 55192 } 55193 return shadow(this, "formInfo", formInfo); 55194 } 55195 get documentInfo() { 55196 const docInfo = { 55197 PDFFormatVersion: this.version, 55198 Language: this.catalog.lang, 55199 EncryptFilterName: this.xref.encrypt ? this.xref.encrypt.filterName : null, 55200 IsLinearized: !!this.linearization, 55201 IsAcroFormPresent: this.formInfo.hasAcroForm, 55202 IsXFAPresent: this.formInfo.hasXfa, 55203 IsCollectionPresent: !!this.catalog.collection, 55204 IsSignaturesPresent: this.formInfo.hasSignatures 55205 }; 55206 let infoDict; 55207 try { 55208 infoDict = this.xref.trailer.get("Info"); 55209 } catch (err) { 55210 if (err instanceof MissingDataException) { 55211 throw err; 55212 }
vendor: 14,830 bytes, lines 55213-55681
55213 info("The document information dictionary is invalid."); 55214 } 55215 if (!(infoDict instanceof Dict)) { 55216 return shadow(this, "documentInfo", docInfo); 55217 } 55218 for (const key of infoDict.getKeys()) { 55219 const value = infoDict.get(key); 55220 switch (key) { 55221 case "Title": 55222 case "Author": 55223 case "Subject": 55224 case "Keywords": 55225 case "Creator": 55226 case "Producer": 55227 case "CreationDate": 55228 case "ModDate": 55229 if (typeof value === "string") { 55230 docInfo[key] = stringToPDFString(value); 55231 continue; 55232 } 55233 break; 55234 case "Trapped": 55235 if (value instanceof Name) { 55236 docInfo[key] = value; 55237 continue; 55238 } 55239 break; 55240 default: 55241 let customValue; 55242 switch (typeof value) { 55243 case "string": 55244 customValue = stringToPDFString(value); 55245 break; 55246 case "number": 55247 case "boolean": 55248 customValue = value; 55249 break; 55250 default: 55251 if (value instanceof Name) { 55252 customValue = value; 55253 } 55254 break; 55255 } 55256 if (customValue === undefined) { 55257 warn(`Bad value, for custom key "${key}", in Info: ${value}.`); 55258 continue; 55259 } 55260 if (!docInfo.Custom) { 55261 docInfo.Custom = Object.create(null); 55262 } 55263 docInfo.Custom[key] = customValue; 55264 continue; 55265 } 55266 warn(`Bad value, for key "${key}", in Info: ${value}.`); 55267 } 55268 return shadow(this, "documentInfo", docInfo); 55269 } 55270 get fingerprints() { 55271 const FINGERPRINT_FIRST_BYTES = 1024; 55272 const EMPTY_FINGERPRINT = "\x00".repeat(16); 55273 function validate(data) { 55274 return typeof data === "string" && data.length === 16 && data !== EMPTY_FINGERPRINT; 55275 } 55276 const id = this.xref.trailer.get("ID"); 55277 let hashOriginal, hashModified; 55278 if (Array.isArray(id) && validate(id[0])) { 55279 hashOriginal = stringToBytes(id[0]); 55280 if (id[1] !== id[0] && validate(id[1])) { 55281 hashModified = stringToBytes(id[1]); 55282 } 55283 } else { 55284 hashOriginal = calculateMD5(this.stream.getByteRange(0, FINGERPRINT_FIRST_BYTES), 0, FINGERPRINT_FIRST_BYTES); 55285 } 55286 return shadow(this, "fingerprints", [toHexUtil(hashOriginal), hashModified ? toHexUtil(hashModified) : null]); 55287 } 55288 async _getLinearizationPage(pageIndex) { 55289 const { 55290 catalog, 55291 linearization, 55292 xref 55293 } = this; 55294 const ref = Ref.get(linearization.objectNumberFirst, 0); 55295 try { 55296 const obj = await xref.fetchAsync(ref); 55297 if (obj instanceof Dict) { 55298 let type = obj.getRaw("Type"); 55299 if (type instanceof Ref) { 55300 type = await xref.fetchAsync(type); 55301 } 55302 if (isName(type, "Page") || !obj.has("Type") && !obj.has("Kids") && obj.has("Contents")) { 55303 if (!catalog.pageKidsCountCache.has(ref)) { 55304 catalog.pageKidsCountCache.put(ref, 1); 55305 } 55306 if (!catalog.pageIndexCache.has(ref)) { 55307 catalog.pageIndexCache.put(ref, 0); 55308 } 55309 return [obj, ref]; 55310 } 55311 } 55312 throw new FormatError("The Linearization dictionary doesn't point to a valid Page dictionary."); 55313 } catch (reason) { 55314 warn(`_getLinearizationPage: "${reason.message}".`); 55315 return catalog.getPageDict(pageIndex); 55316 } 55317 } 55318 getPage(pageIndex) { 55319 const cachedPromise = this._pagePromises.get(pageIndex); 55320 if (cachedPromise) { 55321 return cachedPromise; 55322 } 55323 const { 55324 catalog, 55325 linearization, 55326 xfaFactory 55327 } = this; 55328 let promise; 55329 if (xfaFactory) { 55330 promise = Promise.resolve([Dict.empty, null]); 55331 } else if (linearization?.pageFirst === pageIndex) { 55332 promise = this._getLinearizationPage(pageIndex); 55333 } else { 55334 promise = catalog.getPageDict(pageIndex); 55335 } 55336 promise = promise.then(([pageDict, ref]) => { 55337 return new Page({ 55338 pdfManager: this.pdfManager, 55339 xref: this.xref, 55340 pageIndex, 55341 pageDict, 55342 ref, 55343 globalIdFactory: this._globalIdFactory, 55344 fontCache: catalog.fontCache, 55345 builtInCMapCache: catalog.builtInCMapCache, 55346 standardFontDataCache: catalog.standardFontDataCache, 55347 globalImageCache: catalog.globalImageCache, 55348 systemFontCache: catalog.systemFontCache, 55349 nonBlendModesSet: catalog.nonBlendModesSet, 55350 xfaFactory 55351 }); 55352 }); 55353 this._pagePromises.set(pageIndex, promise); 55354 return promise; 55355 } 55356 async checkFirstPage(recoveryMode = false) { 55357 if (recoveryMode) { 55358 return; 55359 } 55360 try { 55361 await this.getPage(0); 55362 } catch (reason) { 55363 if (reason instanceof XRefEntryException) { 55364 this._pagePromises.delete(0); 55365 await this.cleanup(); 55366 throw new XRefParseException(); 55367 } 55368 } 55369 } 55370 async checkLastPage(recoveryMode = false) { 55371 const { 55372 catalog, 55373 pdfManager 55374 } = this; 55375 catalog.setActualNumPages(); 55376 let numPages; 55377 try { 55378 await Promise.all([pdfManager.ensureDoc("xfaFactory"), pdfManager.ensureDoc("linearization"), pdfManager.ensureCatalog("numPages")]); 55379 if (this.xfaFactory) { 55380 return; 55381 } else if (this.linearization) { 55382 numPages = this.linearization.numPages; 55383 } else { 55384 numPages = catalog.numPages; 55385 } 55386 if (!Number.isInteger(numPages)) { 55387 throw new FormatError("Page count is not an integer."); 55388 } else if (numPages <= 1) { 55389 return; 55390 } 55391 await this.getPage(numPages - 1); 55392 } catch (reason) { 55393 this._pagePromises.delete(numPages - 1); 55394 await this.cleanup(); 55395 if (reason instanceof XRefEntryException && !recoveryMode) { 55396 throw new XRefParseException(); 55397 } 55398 warn(`checkLastPage - invalid /Pages tree /Count: ${numPages}.`); 55399 let pagesTree; 55400 try { 55401 pagesTree = await catalog.getAllPageDicts(recoveryMode); 55402 } catch (reasonAll) { 55403 if (reasonAll instanceof XRefEntryException && !recoveryMode) { 55404 throw new XRefParseException(); 55405 } 55406 catalog.setActualNumPages(1); 55407 return; 55408 } 55409 for (const [pageIndex, [pageDict, ref]] of pagesTree) { 55410 let promise; 55411 if (pageDict instanceof Error) { 55412 promise = Promise.reject(pageDict); 55413 promise.catch(() => {}); 55414 } else { 55415 promise = Promise.resolve(new Page({ 55416 pdfManager, 55417 xref: this.xref, 55418 pageIndex, 55419 pageDict, 55420 ref, 55421 globalIdFactory: this._globalIdFactory, 55422 fontCache: catalog.fontCache, 55423 builtInCMapCache: catalog.builtInCMapCache, 55424 standardFontDataCache: catalog.standardFontDataCache, 55425 globalImageCache: catalog.globalImageCache, 55426 systemFontCache: catalog.systemFontCache, 55427 nonBlendModesSet: catalog.nonBlendModesSet, 55428 xfaFactory: null 55429 })); 55430 } 55431 this._pagePromises.set(pageIndex, promise); 55432 } 55433 catalog.setActualNumPages(pagesTree.size); 55434 } 55435 } 55436 fontFallback(id, handler) { 55437 return this.catalog.fontFallback(id, handler); 55438 } 55439 async cleanup(manuallyTriggered = false) { 55440 return this.catalog ? this.catalog.cleanup(manuallyTriggered) : clearGlobalCaches(); 55441 } 55442 async #collectFieldObjects(name, parentRef, fieldRef, promises, annotationGlobals, visitedRefs, orphanFields) { 55443 const { 55444 xref 55445 } = this; 55446 if (!(fieldRef instanceof Ref) || visitedRefs.has(fieldRef)) { 55447 return; 55448 } 55449 visitedRefs.put(fieldRef); 55450 const field = await xref.fetchAsync(fieldRef); 55451 if (!(field instanceof Dict)) { 55452 return; 55453 } 55454 if (field.has("T")) { 55455 const partName = stringToPDFString(await field.getAsync("T")); 55456 name = name === "" ? partName : `${name}.${partName}`; 55457 } else { 55458 let obj = field; 55459 while (true) { 55460 obj = obj.getRaw("Parent") || parentRef; 55461 if (obj instanceof Ref) { 55462 if (visitedRefs.has(obj)) { 55463 break; 55464 } 55465 obj = await xref.fetchAsync(obj); 55466 } 55467 if (!(obj instanceof Dict)) { 55468 break; 55469 } 55470 if (obj.has("T")) { 55471 const partName = stringToPDFString(await obj.getAsync("T")); 55472 name = name === "" ? partName : `${name}.${partName}`; 55473 break; 55474 } 55475 } 55476 } 55477 if (parentRef && !field.has("Parent") && isName(field.get("Subtype"), "Widget")) { 55478 orphanFields.put(fieldRef, parentRef); 55479 } 55480 if (!promises.has(name)) { 55481 promises.set(name, []); 55482 } 55483 promises.get(name).push(AnnotationFactory.create(xref, fieldRef, annotationGlobals, null, true, orphanFields, null).then(annotation => annotation?.getFieldObject()).catch(function (reason) { 55484 warn(`#collectFieldObjects: "${reason}".`); 55485 return null; 55486 })); 55487 if (!field.has("Kids")) { 55488 return; 55489 } 55490 const kids = await field.getAsync("Kids"); 55491 if (Array.isArray(kids)) { 55492 for (const kid of kids) { 55493 await this.#collectFieldObjects(name, fieldRef, kid, promises, annotationGlobals, visitedRefs, orphanFields); 55494 } 55495 } 55496 } 55497 get fieldObjects() { 55498 const promise = this.pdfManager.ensureDoc("formInfo").then(async formInfo => { 55499 if (!formInfo.hasFields) { 55500 return null; 55501 } 55502 const [annotationGlobals, acroForm] = await Promise.all([this.pdfManager.ensureDoc("annotationGlobals"), this.pdfManager.ensureCatalog("acroForm")]); 55503 if (!annotationGlobals) { 55504 return null; 55505 } 55506 const visitedRefs = new RefSet(); 55507 const allFields = Object.create(null); 55508 const fieldPromises = new Map(); 55509 const orphanFields = new RefSetCache(); 55510 for (const fieldRef of await acroForm.getAsync("Fields")) { 55511 await this.#collectFieldObjects("", null, fieldRef, fieldPromises, annotationGlobals, visitedRefs, orphanFields); 55512 } 55513 const allPromises = []; 55514 for (const [name, promises] of fieldPromises) { 55515 allPromises.push(Promise.all(promises).then(fields => { 55516 fields = fields.filter(field => !!field); 55517 if (fields.length > 0) { 55518 allFields[name] = fields; 55519 } 55520 })); 55521 } 55522 await Promise.all(allPromises); 55523 return { 55524 allFields, 55525 orphanFields 55526 }; 55527 }); 55528 return shadow(this, "fieldObjects", promise); 55529 } 55530 get hasJSActions() { 55531 const promise = this.pdfManager.ensureDoc("_parseHasJSActions"); 55532 return shadow(this, "hasJSActions", promise); 55533 } 55534 async _parseHasJSActions() { 55535 const [catalogJsActions, fieldObjects] = await Promise.all([this.pdfManager.ensureCatalog("jsActions"), this.pdfManager.ensureDoc("fieldObjects")]); 55536 if (catalogJsActions) { 55537 return true; 55538 } 55539 if (fieldObjects) { 55540 return Object.values(fieldObjects.allFields).some(fieldObject => fieldObject.some(object => object.actions !== null)); 55541 } 55542 return false; 55543 } 55544 get calculationOrderIds() { 55545 const calculationOrder = this.catalog.acroForm?.get("CO"); 55546 if (!Array.isArray(calculationOrder) || calculationOrder.length === 0) { 55547 return shadow(this, "calculationOrderIds", null); 55548 } 55549 const ids = []; 55550 for (const id of calculationOrder) { 55551 if (id instanceof Ref) { 55552 ids.push(id.toString()); 55553 } 55554 } 55555 return shadow(this, "calculationOrderIds", ids.length ? ids : null); 55556 } 55557 get annotationGlobals() { 55558 return shadow(this, "annotationGlobals", AnnotationFactory.createGlobals(this.pdfManager)); 55559 } 55560} 55561 55562;// ./src/core/pdf_manager.js 55563 55564 55565 55566 55567 55568function parseDocBaseUrl(url) { 55569 if (url) { 55570 const absoluteUrl = createValidAbsoluteUrl(url); 55571 if (absoluteUrl) { 55572 return absoluteUrl.href; 55573 } 55574 warn(`Invalid absolute docBaseUrl: "${url}".`); 55575 } 55576 return null; 55577} 55578class BasePdfManager { 55579 constructor(args) { 55580 this._docBaseUrl = parseDocBaseUrl(args.docBaseUrl); 55581 this._docId = args.docId; 55582 this._password = args.password; 55583 this.enableXfa = args.enableXfa; 55584 args.evaluatorOptions.isOffscreenCanvasSupported &&= FeatureTest.isOffscreenCanvasSupported; 55585 this.evaluatorOptions = Object.freeze(args.evaluatorOptions); 55586 } 55587 get docId() { 55588 return this._docId; 55589 } 55590 get password() { 55591 return this._password; 55592 } 55593 get docBaseUrl() { 55594 return this._docBaseUrl; 55595 } 55596 get catalog() { 55597 return this.pdfDocument.catalog; 55598 } 55599 ensureDoc(prop, args) { 55600 return this.ensure(this.pdfDocument, prop, args); 55601 } 55602 ensureXRef(prop, args) { 55603 return this.ensure(this.pdfDocument.xref, prop, args); 55604 } 55605 ensureCatalog(prop, args) { 55606 return this.ensure(this.pdfDocument.catalog, prop, args); 55607 } 55608 getPage(pageIndex) { 55609 return this.pdfDocument.getPage(pageIndex); 55610 } 55611 fontFallback(id, handler) { 55612 return this.pdfDocument.fontFallback(id, handler); 55613 } 55614 loadXfaFonts(handler, task) { 55615 return this.pdfDocument.loadXfaFonts(handler, task); 55616 } 55617 loadXfaImages() { 55618 return this.pdfDocument.loadXfaImages(); 55619 } 55620 serializeXfaData(annotationStorage) { 55621 return this.pdfDocument.serializeXfaData(annotationStorage); 55622 } 55623 cleanup(manuallyTriggered = false) { 55624 return this.pdfDocument.cleanup(manuallyTriggered); 55625 } 55626 async ensure(obj, prop, args) { 55627 unreachable("Abstract method `ensure` called"); 55628 } 55629 requestRange(begin, end) { 55630 unreachable("Abstract method `requestRange` called"); 55631 } 55632 requestLoadedStream(noFetch = false) { 55633 unreachable("Abstract method `requestLoadedStream` called"); 55634 } 55635 sendProgressiveData(chunk) { 55636 unreachable("Abstract method `sendProgressiveData` called"); 55637 } 55638 updatePassword(password) { 55639 this._password = password; 55640 } 55641 terminate(reason) { 55642 unreachable("Abstract method `terminate` called"); 55643 } 55644} 55645class LocalPdfManager extends BasePdfManager { 55646 constructor(args) { 55647 super(args); 55648 const stream = new Stream(args.source); 55649 this.pdfDocument = new PDFDocument(this, stream); 55650 this._loadedStreamPromise = Promise.resolve(stream); 55651 } 55652 async ensure(obj, prop, args) { 55653 const value = obj[prop]; 55654 if (typeof value === "function") { 55655 return value.apply(obj, args); 55656 } 55657 return value; 55658 } 55659 requestRange(begin, end) { 55660 return Promise.resolve(); 55661 } 55662 requestLoadedStream(noFetch = false) { 55663 return this._loadedStreamPromise; 55664 } 55665 terminate(reason) {} 55666} 55667class NetworkPdfManager extends BasePdfManager { 55668 constructor(args) { 55669 super(args); 55670 this.streamManager = new ChunkedStreamManager(args.source, { 55671 msgHandler: args.handler, 55672 length: args.length, 55673 disableAutoFetch: args.disableAutoFetch, 55674 rangeChunkSize: args.rangeChunkSize 55675 }); 55676 this.pdfDocument = new PDFDocument(this, this.streamManager.getStream()); 55677 } 55678 async ensure(obj, prop, args) { 55679 try { 55680 const value = obj[prop]; 55681 if (typeof value === "function") {
vendor: 4,350 bytes, lines 55682-55837
55682 return value.apply(obj, args); 55683 } 55684 return value; 55685 } catch (ex) { 55686 if (!(ex instanceof MissingDataException)) { 55687 throw ex; 55688 } 55689 await this.requestRange(ex.begin, ex.end); 55690 return this.ensure(obj, prop, args); 55691 } 55692 } 55693 requestRange(begin, end) { 55694 return this.streamManager.requestRange(begin, end); 55695 } 55696 requestLoadedStream(noFetch = false) { 55697 return this.streamManager.requestAllChunks(noFetch); 55698 } 55699 sendProgressiveData(chunk) { 55700 this.streamManager.onReceiveData({ 55701 chunk 55702 }); 55703 } 55704 terminate(reason) { 55705 this.streamManager.abort(reason); 55706 } 55707} 55708 55709;// ./src/shared/message_handler.js 55710 55711const CallbackKind = { 55712 UNKNOWN: 0, 55713 DATA: 1, 55714 ERROR: 2 55715}; 55716const StreamKind = { 55717 UNKNOWN: 0, 55718 CANCEL: 1, 55719 CANCEL_COMPLETE: 2, 55720 CLOSE: 3, 55721 ENQUEUE: 4, 55722 ERROR: 5, 55723 PULL: 6, 55724 PULL_COMPLETE: 7, 55725 START_COMPLETE: 8 55726}; 55727function wrapReason(reason) { 55728 if (!(reason instanceof Error || typeof reason === "object" && reason !== null)) { 55729 unreachable('wrapReason: Expected "reason" to be a (possibly cloned) Error.'); 55730 } 55731 switch (reason.name) { 55732 case "AbortException": 55733 return new AbortException(reason.message); 55734 case "MissingPDFException": 55735 return new MissingPDFException(reason.message); 55736 case "PasswordException": 55737 return new PasswordException(reason.message, reason.code); 55738 case "UnexpectedResponseException": 55739 return new UnexpectedResponseException(reason.message, reason.status); 55740 case "UnknownErrorException": 55741 return new UnknownErrorException(reason.message, reason.details); 55742 default: 55743 return new UnknownErrorException(reason.message, reason.toString()); 55744 } 55745} 55746class MessageHandler { 55747 #messageAC = new AbortController(); 55748 constructor(sourceName, targetName, comObj) { 55749 this.sourceName = sourceName; 55750 this.targetName = targetName; 55751 this.comObj = comObj; 55752 this.callbackId = 1; 55753 this.streamId = 1; 55754 this.streamSinks = Object.create(null); 55755 this.streamControllers = Object.create(null); 55756 this.callbackCapabilities = Object.create(null); 55757 this.actionHandler = Object.create(null); 55758 comObj.addEventListener("message", this.#onMessage.bind(this), { 55759 signal: this.#messageAC.signal 55760 }); 55761 } 55762 #onMessage({ 55763 data 55764 }) { 55765 if (data.targetName !== this.sourceName) { 55766 return; 55767 } 55768 if (data.stream) { 55769 this.#processStreamMessage(data); 55770 return; 55771 } 55772 if (data.callback) { 55773 const callbackId = data.callbackId; 55774 const capability = this.callbackCapabilities[callbackId]; 55775 if (!capability) { 55776 throw new Error(`Cannot resolve callback ${callbackId}`); 55777 } 55778 delete this.callbackCapabilities[callbackId]; 55779 if (data.callback === CallbackKind.DATA) { 55780 capability.resolve(data.data); 55781 } else if (data.callback === CallbackKind.ERROR) { 55782 capability.reject(wrapReason(data.reason)); 55783 } else { 55784 throw new Error("Unexpected callback case"); 55785 } 55786 return; 55787 } 55788 const action = this.actionHandler[data.action]; 55789 if (!action) { 55790 throw new Error(`Unknown action from worker: ${data.action}`); 55791 } 55792 if (data.callbackId) { 55793 const sourceName = this.sourceName, 55794 targetName = data.sourceName, 55795 comObj = this.comObj; 55796 new Promise(function (resolve) { 55797 resolve(action(data.data)); 55798 }).then(function (result) { 55799 comObj.postMessage({ 55800 sourceName, 55801 targetName, 55802 callback: CallbackKind.DATA, 55803 callbackId: data.callbackId, 55804 data: result 55805 }); 55806 }, function (reason) { 55807 comObj.postMessage({ 55808 sourceName, 55809 targetName, 55810 callback: CallbackKind.ERROR, 55811 callbackId: data.callbackId, 55812 reason: wrapReason(reason) 55813 }); 55814 }); 55815 return; 55816 } 55817 if (data.streamId) { 55818 this.#createStreamSink(data); 55819 return; 55820 } 55821 action(data.data); 55822 } 55823 on(actionName, handler) { 55824 const ah = this.actionHandler; 55825 if (ah[actionName]) { 55826 throw new Error(`There is already an actionName called "${actionName}"`); 55827 } 55828 ah[actionName] = handler; 55829 } 55830 send(actionName, data, transfers) { 55831 this.comObj.postMessage({ 55832 sourceName: this.sourceName, 55833 targetName: this.targetName, 55834 action: actionName, 55835 data 55836 }, transfers); 55837 }
vendor: 9,598 bytes, lines 55838-56149
55838 sendWithPromise(actionName, data, transfers) { 55839 const callbackId = this.callbackId++; 55840 const capability = Promise.withResolvers(); 55841 this.callbackCapabilities[callbackId] = capability; 55842 try { 55843 this.comObj.postMessage({ 55844 sourceName: this.sourceName, 55845 targetName: this.targetName, 55846 action: actionName, 55847 callbackId, 55848 data 55849 }, transfers); 55850 } catch (ex) { 55851 capability.reject(ex); 55852 } 55853 return capability.promise; 55854 } 55855 sendWithStream(actionName, data, queueingStrategy, transfers) { 55856 const streamId = this.streamId++, 55857 sourceName = this.sourceName, 55858 targetName = this.targetName, 55859 comObj = this.comObj; 55860 return new ReadableStream({ 55861 start: controller => { 55862 const startCapability = Promise.withResolvers(); 55863 this.streamControllers[streamId] = { 55864 controller, 55865 startCall: startCapability, 55866 pullCall: null, 55867 cancelCall: null, 55868 isClosed: false 55869 }; 55870 comObj.postMessage({ 55871 sourceName, 55872 targetName, 55873 action: actionName, 55874 streamId, 55875 data, 55876 desiredSize: controller.desiredSize 55877 }, transfers); 55878 return startCapability.promise; 55879 }, 55880 pull: controller => { 55881 const pullCapability = Promise.withResolvers(); 55882 this.streamControllers[streamId].pullCall = pullCapability; 55883 comObj.postMessage({ 55884 sourceName, 55885 targetName, 55886 stream: StreamKind.PULL, 55887 streamId, 55888 desiredSize: controller.desiredSize 55889 }); 55890 return pullCapability.promise; 55891 }, 55892 cancel: reason => { 55893 assert(reason instanceof Error, "cancel must have a valid reason"); 55894 const cancelCapability = Promise.withResolvers(); 55895 this.streamControllers[streamId].cancelCall = cancelCapability; 55896 this.streamControllers[streamId].isClosed = true; 55897 comObj.postMessage({ 55898 sourceName, 55899 targetName, 55900 stream: StreamKind.CANCEL, 55901 streamId, 55902 reason: wrapReason(reason) 55903 }); 55904 return cancelCapability.promise; 55905 } 55906 }, queueingStrategy); 55907 } 55908 #createStreamSink(data) { 55909 const streamId = data.streamId, 55910 sourceName = this.sourceName, 55911 targetName = data.sourceName, 55912 comObj = this.comObj; 55913 const self = this, 55914 action = this.actionHandler[data.action]; 55915 const streamSink = { 55916 enqueue(chunk, size = 1, transfers) { 55917 if (this.isCancelled) { 55918 return; 55919 } 55920 const lastDesiredSize = this.desiredSize; 55921 this.desiredSize -= size; 55922 if (lastDesiredSize > 0 && this.desiredSize <= 0) { 55923 this.sinkCapability = Promise.withResolvers(); 55924 this.ready = this.sinkCapability.promise; 55925 } 55926 comObj.postMessage({ 55927 sourceName, 55928 targetName, 55929 stream: StreamKind.ENQUEUE, 55930 streamId, 55931 chunk 55932 }, transfers); 55933 }, 55934 close() { 55935 if (this.isCancelled) { 55936 return; 55937 } 55938 this.isCancelled = true; 55939 comObj.postMessage({ 55940 sourceName, 55941 targetName, 55942 stream: StreamKind.CLOSE, 55943 streamId 55944 }); 55945 delete self.streamSinks[streamId]; 55946 }, 55947 error(reason) { 55948 assert(reason instanceof Error, "error must have a valid reason"); 55949 if (this.isCancelled) { 55950 return; 55951 } 55952 this.isCancelled = true; 55953 comObj.postMessage({ 55954 sourceName, 55955 targetName, 55956 stream: StreamKind.ERROR, 55957 streamId, 55958 reason: wrapReason(reason) 55959 }); 55960 }, 55961 sinkCapability: Promise.withResolvers(), 55962 onPull: null, 55963 onCancel: null, 55964 isCancelled: false, 55965 desiredSize: data.desiredSize, 55966 ready: null 55967 }; 55968 streamSink.sinkCapability.resolve(); 55969 streamSink.ready = streamSink.sinkCapability.promise; 55970 this.streamSinks[streamId] = streamSink; 55971 new Promise(function (resolve) { 55972 resolve(action(data.data, streamSink)); 55973 }).then(function () { 55974 comObj.postMessage({ 55975 sourceName, 55976 targetName, 55977 stream: StreamKind.START_COMPLETE, 55978 streamId, 55979 success: true 55980 }); 55981 }, function (reason) { 55982 comObj.postMessage({ 55983 sourceName, 55984 targetName, 55985 stream: StreamKind.START_COMPLETE, 55986 streamId, 55987 reason: wrapReason(reason) 55988 }); 55989 }); 55990 } 55991 #processStreamMessage(data) { 55992 const streamId = data.streamId, 55993 sourceName = this.sourceName, 55994 targetName = data.sourceName, 55995 comObj = this.comObj; 55996 const streamController = this.streamControllers[streamId], 55997 streamSink = this.streamSinks[streamId]; 55998 switch (data.stream) { 55999 case StreamKind.START_COMPLETE: 56000 if (data.success) { 56001 streamController.startCall.resolve(); 56002 } else { 56003 streamController.startCall.reject(wrapReason(data.reason)); 56004 } 56005 break; 56006 case StreamKind.PULL_COMPLETE: 56007 if (data.success) { 56008 streamController.pullCall.resolve(); 56009 } else { 56010 streamController.pullCall.reject(wrapReason(data.reason)); 56011 } 56012 break; 56013 case StreamKind.PULL: 56014 if (!streamSink) { 56015 comObj.postMessage({ 56016 sourceName, 56017 targetName, 56018 stream: StreamKind.PULL_COMPLETE, 56019 streamId, 56020 success: true 56021 }); 56022 break; 56023 } 56024 if (streamSink.desiredSize <= 0 && data.desiredSize > 0) { 56025 streamSink.sinkCapability.resolve(); 56026 } 56027 streamSink.desiredSize = data.desiredSize; 56028 new Promise(function (resolve) { 56029 resolve(streamSink.onPull?.()); 56030 }).then(function () { 56031 comObj.postMessage({ 56032 sourceName, 56033 targetName, 56034 stream: StreamKind.PULL_COMPLETE, 56035 streamId, 56036 success: true 56037 }); 56038 }, function (reason) { 56039 comObj.postMessage({ 56040 sourceName, 56041 targetName, 56042 stream: StreamKind.PULL_COMPLETE, 56043 streamId, 56044 reason: wrapReason(reason) 56045 }); 56046 }); 56047 break; 56048 case StreamKind.ENQUEUE: 56049 assert(streamController, "enqueue should have stream controller"); 56050 if (streamController.isClosed) { 56051 break; 56052 } 56053 streamController.controller.enqueue(data.chunk); 56054 break; 56055 case StreamKind.CLOSE: 56056 assert(streamController, "close should have stream controller"); 56057 if (streamController.isClosed) { 56058 break; 56059 } 56060 streamController.isClosed = true; 56061 streamController.controller.close(); 56062 this.#deleteStreamController(streamController, streamId); 56063 break; 56064 case StreamKind.ERROR: 56065 assert(streamController, "error should have stream controller"); 56066 streamController.controller.error(wrapReason(data.reason)); 56067 this.#deleteStreamController(streamController, streamId); 56068 break; 56069 case StreamKind.CANCEL_COMPLETE: 56070 if (data.success) { 56071 streamController.cancelCall.resolve(); 56072 } else { 56073 streamController.cancelCall.reject(wrapReason(data.reason)); 56074 } 56075 this.#deleteStreamController(streamController, streamId); 56076 break; 56077 case StreamKind.CANCEL: 56078 if (!streamSink) { 56079 break; 56080 } 56081 new Promise(function (resolve) { 56082 resolve(streamSink.onCancel?.(wrapReason(data.reason))); 56083 }).then(function () { 56084 comObj.postMessage({ 56085 sourceName, 56086 targetName, 56087 stream: StreamKind.CANCEL_COMPLETE, 56088 streamId, 56089 success: true 56090 }); 56091 }, function (reason) { 56092 comObj.postMessage({ 56093 sourceName, 56094 targetName, 56095 stream: StreamKind.CANCEL_COMPLETE, 56096 streamId, 56097 reason: wrapReason(reason) 56098 }); 56099 }); 56100 streamSink.sinkCapability.reject(wrapReason(data.reason)); 56101 streamSink.isCancelled = true; 56102 delete this.streamSinks[streamId]; 56103 break; 56104 default: 56105 throw new Error("Unexpected stream case"); 56106 } 56107 } 56108 async #deleteStreamController(streamController, streamId) { 56109 await Promise.allSettled([streamController.startCall?.promise, streamController.pullCall?.promise, streamController.cancelCall?.promise]); 56110 delete this.streamControllers[streamId]; 56111 } 56112 destroy() { 56113 this.#messageAC?.abort(); 56114 this.#messageAC = null; 56115 } 56116} 56117 56118;// ./src/core/worker_stream.js 56119 56120class PDFWorkerStream { 56121 constructor(msgHandler) { 56122 this._msgHandler = msgHandler; 56123 this._contentLength = null; 56124 this._fullRequestReader = null; 56125 this._rangeRequestReaders = []; 56126 } 56127 getFullReader() { 56128 assert(!this._fullRequestReader, "PDFWorkerStream.getFullReader can only be called once."); 56129 this._fullRequestReader = new PDFWorkerStreamReader(this._msgHandler); 56130 return this._fullRequestReader; 56131 } 56132 getRangeReader(begin, end) { 56133 const reader = new PDFWorkerStreamRangeReader(begin, end, this._msgHandler); 56134 this._rangeRequestReaders.push(reader); 56135 return reader; 56136 } 56137 cancelAllRequests(reason) { 56138 this._fullRequestReader?.cancel(reason); 56139 for (const reader of this._rangeRequestReaders.slice(0)) { 56140 reader.cancel(reason); 56141 } 56142 } 56143} 56144class PDFWorkerStreamReader { 56145 constructor(msgHandler) { 56146 this._msgHandler = msgHandler; 56147 this.onProgress = null; 56148 this._contentLength = null; 56149 this._isRangeSupported = false;
vendor: 5,736 bytes, lines 56150-56365
56150 this._isStreamingSupported = false; 56151 const readableStream = this._msgHandler.sendWithStream("GetReader"); 56152 this._reader = readableStream.getReader(); 56153 this._headersReady = this._msgHandler.sendWithPromise("ReaderHeadersReady").then(data => { 56154 this._isStreamingSupported = data.isStreamingSupported; 56155 this._isRangeSupported = data.isRangeSupported; 56156 this._contentLength = data.contentLength; 56157 }); 56158 } 56159 get headersReady() { 56160 return this._headersReady; 56161 } 56162 get contentLength() { 56163 return this._contentLength; 56164 } 56165 get isStreamingSupported() { 56166 return this._isStreamingSupported; 56167 } 56168 get isRangeSupported() { 56169 return this._isRangeSupported; 56170 } 56171 async read() { 56172 const { 56173 value, 56174 done 56175 } = await this._reader.read(); 56176 if (done) { 56177 return { 56178 value: undefined, 56179 done: true 56180 }; 56181 } 56182 return { 56183 value: value.buffer, 56184 done: false 56185 }; 56186 } 56187 cancel(reason) { 56188 this._reader.cancel(reason); 56189 } 56190} 56191class PDFWorkerStreamRangeReader { 56192 constructor(begin, end, msgHandler) { 56193 this._msgHandler = msgHandler; 56194 this.onProgress = null; 56195 const readableStream = this._msgHandler.sendWithStream("GetRangeReader", { 56196 begin, 56197 end 56198 }); 56199 this._reader = readableStream.getReader(); 56200 } 56201 get isStreamingSupported() { 56202 return false; 56203 } 56204 async read() { 56205 const { 56206 value, 56207 done 56208 } = await this._reader.read(); 56209 if (done) { 56210 return { 56211 value: undefined, 56212 done: true 56213 }; 56214 } 56215 return { 56216 value: value.buffer, 56217 done: false 56218 }; 56219 } 56220 cancel(reason) { 56221 this._reader.cancel(reason); 56222 } 56223} 56224 56225;// ./src/core/worker.js 56226 56227 56228 56229 56230 56231 56232 56233 56234 56235 56236class WorkerTask { 56237 constructor(name) { 56238 this.name = name; 56239 this.terminated = false; 56240 this._capability = Promise.withResolvers(); 56241 } 56242 get finished() { 56243 return this._capability.promise; 56244 } 56245 finish() { 56246 this._capability.resolve(); 56247 } 56248 terminate() { 56249 this.terminated = true; 56250 } 56251 ensureNotTerminated() { 56252 if (this.terminated) { 56253 throw new Error("Worker task was terminated"); 56254 } 56255 } 56256} 56257class WorkerMessageHandler { 56258 static setup(handler, port) { 56259 let testMessageProcessed = false; 56260 handler.on("test", function (data) { 56261 if (testMessageProcessed) { 56262 return; 56263 } 56264 testMessageProcessed = true; 56265 handler.send("test", data instanceof Uint8Array); 56266 }); 56267 handler.on("configure", function (data) { 56268 setVerbosityLevel(data.verbosity); 56269 }); 56270 handler.on("GetDocRequest", function (data) { 56271 return WorkerMessageHandler.createDocumentHandler(data, port); 56272 }); 56273 } 56274 static createDocumentHandler(docParams, port) { 56275 let pdfManager; 56276 let terminated = false; 56277 let cancelXHRs = null; 56278 const WorkerTasks = new Set(); 56279 const verbosity = getVerbosityLevel(); 56280 const { 56281 docId, 56282 apiVersion 56283 } = docParams; 56284 const workerVersion = "4.8.69"; 56285 if (apiVersion !== workerVersion) { 56286 throw new Error(`The API version "${apiVersion}" does not match ` + `the Worker version "${workerVersion}".`); 56287 } 56288 const enumerableProperties = []; 56289 for (const property in []) { 56290 enumerableProperties.push(property); 56291 } 56292 if (enumerableProperties.length) { 56293 throw new Error("The `Array.prototype` contains unexpected enumerable properties: " + enumerableProperties.join(", ") + "; thus breaking e.g. `for...in` iteration of `Array`s."); 56294 } 56295 const workerHandlerName = docId + "_worker"; 56296 let handler = new MessageHandler(workerHandlerName, docId, port); 56297 function ensureNotTerminated() { 56298 if (terminated) { 56299 throw new Error("Worker was terminated"); 56300 } 56301 } 56302 function startWorkerTask(task) { 56303 WorkerTasks.add(task); 56304 } 56305 function finishWorkerTask(task) { 56306 task.finish(); 56307 WorkerTasks.delete(task); 56308 } 56309 async function loadDocument(recoveryMode) { 56310 await pdfManager.ensureDoc("checkHeader"); 56311 await pdfManager.ensureDoc("parseStartXRef"); 56312 await pdfManager.ensureDoc("parse", [recoveryMode]); 56313 await pdfManager.ensureDoc("checkFirstPage", [recoveryMode]); 56314 await pdfManager.ensureDoc("checkLastPage", [recoveryMode]); 56315 const isPureXfa = await pdfManager.ensureDoc("isPureXfa"); 56316 if (isPureXfa) { 56317 const task = new WorkerTask("loadXfaFonts"); 56318 startWorkerTask(task); 56319 await Promise.all([pdfManager.loadXfaFonts(handler, task).catch(reason => {}).then(() => finishWorkerTask(task)), pdfManager.loadXfaImages()]); 56320 } 56321 const [numPages, fingerprints] = await Promise.all([pdfManager.ensureDoc("numPages"), pdfManager.ensureDoc("fingerprints")]); 56322 const htmlForXfa = isPureXfa ? await pdfManager.ensureDoc("htmlForXfa") : null; 56323 return { 56324 numPages, 56325 fingerprints, 56326 htmlForXfa 56327 }; 56328 } 56329 function getPdfManager({ 56330 data, 56331 password, 56332 disableAutoFetch, 56333 rangeChunkSize, 56334 length, 56335 docBaseUrl, 56336 enableXfa, 56337 evaluatorOptions 56338 }) { 56339 const pdfManagerArgs = { 56340 source: null, 56341 disableAutoFetch, 56342 docBaseUrl, 56343 docId, 56344 enableXfa, 56345 evaluatorOptions, 56346 handler, 56347 length, 56348 password, 56349 rangeChunkSize 56350 }; 56351 const pdfManagerCapability = Promise.withResolvers(); 56352 let newPdfManager; 56353 if (data) { 56354 try { 56355 pdfManagerArgs.source = data; 56356 newPdfManager = new LocalPdfManager(pdfManagerArgs); 56357 pdfManagerCapability.resolve(newPdfManager); 56358 } catch (ex) { 56359 pdfManagerCapability.reject(ex); 56360 } 56361 return pdfManagerCapability.promise; 56362 } 56363 let pdfStream, 56364 cachedChunks = [], 56365 loaded = 0;
vendor: 10,162 bytes, lines 56366-56629
56366 try { 56367 pdfStream = new PDFWorkerStream(handler); 56368 } catch (ex) { 56369 pdfManagerCapability.reject(ex); 56370 return pdfManagerCapability.promise; 56371 } 56372 const fullRequest = pdfStream.getFullReader(); 56373 fullRequest.headersReady.then(function () { 56374 if (!fullRequest.isRangeSupported) { 56375 return; 56376 } 56377 pdfManagerArgs.source = pdfStream; 56378 pdfManagerArgs.length = fullRequest.contentLength; 56379 pdfManagerArgs.disableAutoFetch ||= fullRequest.isStreamingSupported; 56380 newPdfManager = new NetworkPdfManager(pdfManagerArgs); 56381 for (const chunk of cachedChunks) { 56382 newPdfManager.sendProgressiveData(chunk); 56383 } 56384 cachedChunks = []; 56385 pdfManagerCapability.resolve(newPdfManager); 56386 cancelXHRs = null; 56387 }).catch(function (reason) { 56388 pdfManagerCapability.reject(reason); 56389 cancelXHRs = null; 56390 }); 56391 new Promise(function (resolve, reject) { 56392 const readChunk = function ({ 56393 value, 56394 done 56395 }) { 56396 try { 56397 ensureNotTerminated(); 56398 if (done) { 56399 if (!newPdfManager) { 56400 const pdfFile = arrayBuffersToBytes(cachedChunks); 56401 cachedChunks = []; 56402 if (length && pdfFile.length !== length) { 56403 warn("reported HTTP length is different from actual"); 56404 } 56405 pdfManagerArgs.source = pdfFile; 56406 newPdfManager = new LocalPdfManager(pdfManagerArgs); 56407 pdfManagerCapability.resolve(newPdfManager); 56408 } 56409 cancelXHRs = null; 56410 return; 56411 } 56412 loaded += value.byteLength; 56413 if (!fullRequest.isStreamingSupported) { 56414 handler.send("DocProgress", { 56415 loaded, 56416 total: Math.max(loaded, fullRequest.contentLength || 0) 56417 }); 56418 } 56419 if (newPdfManager) { 56420 newPdfManager.sendProgressiveData(value); 56421 } else { 56422 cachedChunks.push(value); 56423 } 56424 fullRequest.read().then(readChunk, reject); 56425 } catch (e) { 56426 reject(e); 56427 } 56428 }; 56429 fullRequest.read().then(readChunk, reject); 56430 }).catch(function (e) { 56431 pdfManagerCapability.reject(e); 56432 cancelXHRs = null; 56433 }); 56434 cancelXHRs = function (reason) { 56435 pdfStream.cancelAllRequests(reason); 56436 }; 56437 return pdfManagerCapability.promise; 56438 } 56439 function setupDoc(data) { 56440 function onSuccess(doc) { 56441 ensureNotTerminated(); 56442 handler.send("GetDoc", { 56443 pdfInfo: doc 56444 }); 56445 } 56446 function onFailure(ex) { 56447 ensureNotTerminated(); 56448 if (ex instanceof PasswordException) { 56449 const task = new WorkerTask(`PasswordException: response ${ex.code}`); 56450 startWorkerTask(task); 56451 handler.sendWithPromise("PasswordRequest", ex).then(function ({ 56452 password 56453 }) { 56454 finishWorkerTask(task); 56455 pdfManager.updatePassword(password); 56456 pdfManagerReady(); 56457 }).catch(function () { 56458 finishWorkerTask(task); 56459 handler.send("DocException", ex); 56460 }); 56461 } else if (ex instanceof InvalidPDFException || ex instanceof MissingPDFException || ex instanceof UnexpectedResponseException || ex instanceof UnknownErrorException) { 56462 handler.send("DocException", ex); 56463 } else { 56464 handler.send("DocException", new UnknownErrorException(ex.message, ex.toString())); 56465 } 56466 } 56467 function pdfManagerReady() { 56468 ensureNotTerminated(); 56469 loadDocument(false).then(onSuccess, function (reason) { 56470 ensureNotTerminated(); 56471 if (!(reason instanceof XRefParseException)) { 56472 onFailure(reason); 56473 return; 56474 } 56475 pdfManager.requestLoadedStream().then(function () { 56476 ensureNotTerminated(); 56477 loadDocument(true).then(onSuccess, onFailure); 56478 }); 56479 }); 56480 } 56481 ensureNotTerminated(); 56482 getPdfManager(data).then(function (newPdfManager) { 56483 if (terminated) { 56484 newPdfManager.terminate(new AbortException("Worker was terminated.")); 56485 throw new Error("Worker was terminated"); 56486 } 56487 pdfManager = newPdfManager; 56488 pdfManager.requestLoadedStream(true).then(stream => { 56489 handler.send("DataLoaded", { 56490 length: stream.bytes.byteLength 56491 }); 56492 }); 56493 }).then(pdfManagerReady, onFailure); 56494 } 56495 handler.on("GetPage", function (data) { 56496 return pdfManager.getPage(data.pageIndex).then(function (page) { 56497 return Promise.all([pdfManager.ensure(page, "rotate"), pdfManager.ensure(page, "ref"), pdfManager.ensure(page, "userUnit"), pdfManager.ensure(page, "view")]).then(function ([rotate, ref, userUnit, view]) { 56498 return { 56499 rotate, 56500 ref, 56501 refStr: ref?.toString() ?? null, 56502 userUnit, 56503 view 56504 }; 56505 }); 56506 }); 56507 }); 56508 handler.on("GetPageIndex", function (data) { 56509 const pageRef = Ref.get(data.num, data.gen); 56510 return pdfManager.ensureCatalog("getPageIndex", [pageRef]); 56511 }); 56512 handler.on("GetDestinations", function (data) { 56513 return pdfManager.ensureCatalog("destinations"); 56514 }); 56515 handler.on("GetDestination", function (data) { 56516 return pdfManager.ensureCatalog("getDestination", [data.id]); 56517 }); 56518 handler.on("GetPageLabels", function (data) { 56519 return pdfManager.ensureCatalog("pageLabels"); 56520 }); 56521 handler.on("GetPageLayout", function (data) { 56522 return pdfManager.ensureCatalog("pageLayout"); 56523 }); 56524 handler.on("GetPageMode", function (data) { 56525 return pdfManager.ensureCatalog("pageMode"); 56526 }); 56527 handler.on("GetViewerPreferences", function (data) { 56528 return pdfManager.ensureCatalog("viewerPreferences"); 56529 }); 56530 handler.on("GetOpenAction", function (data) { 56531 return pdfManager.ensureCatalog("openAction"); 56532 }); 56533 handler.on("GetAttachments", function (data) { 56534 return pdfManager.ensureCatalog("attachments"); 56535 }); 56536 handler.on("GetDocJSActions", function (data) { 56537 return pdfManager.ensureCatalog("jsActions"); 56538 }); 56539 handler.on("GetPageJSActions", function ({ 56540 pageIndex 56541 }) { 56542 return pdfManager.getPage(pageIndex).then(function (page) { 56543 return pdfManager.ensure(page, "jsActions"); 56544 }); 56545 }); 56546 handler.on("GetOutline", function (data) { 56547 return pdfManager.ensureCatalog("documentOutline"); 56548 }); 56549 handler.on("GetOptionalContentConfig", function (data) { 56550 return pdfManager.ensureCatalog("optionalContentConfig"); 56551 }); 56552 handler.on("GetPermissions", function (data) { 56553 return pdfManager.ensureCatalog("permissions"); 56554 }); 56555 handler.on("GetMetadata", function (data) { 56556 return Promise.all([pdfManager.ensureDoc("documentInfo"), pdfManager.ensureCatalog("metadata")]); 56557 }); 56558 handler.on("GetMarkInfo", function (data) { 56559 return pdfManager.ensureCatalog("markInfo"); 56560 }); 56561 handler.on("GetData", function (data) { 56562 return pdfManager.requestLoadedStream().then(function (stream) { 56563 return stream.bytes; 56564 }); 56565 }); 56566 handler.on("GetAnnotations", function ({ 56567 pageIndex, 56568 intent 56569 }) { 56570 return pdfManager.getPage(pageIndex).then(function (page) { 56571 const task = new WorkerTask(`GetAnnotations: page ${pageIndex}`); 56572 startWorkerTask(task); 56573 return page.getAnnotationsData(handler, task, intent).then(data => { 56574 finishWorkerTask(task); 56575 return data; 56576 }, reason => { 56577 finishWorkerTask(task); 56578 throw reason; 56579 }); 56580 }); 56581 }); 56582 handler.on("GetFieldObjects", function (data) { 56583 return pdfManager.ensureDoc("fieldObjects").then(fieldObjects => fieldObjects?.allFields || null); 56584 }); 56585 handler.on("HasJSActions", function (data) { 56586 return pdfManager.ensureDoc("hasJSActions"); 56587 }); 56588 handler.on("GetCalculationOrderIds", function (data) { 56589 return pdfManager.ensureDoc("calculationOrderIds"); 56590 }); 56591 handler.on("SaveDocument", async function ({ 56592 isPureXfa, 56593 numPages, 56594 annotationStorage, 56595 filename 56596 }) { 56597 const globalPromises = [pdfManager.requestLoadedStream(), pdfManager.ensureCatalog("acroForm"), pdfManager.ensureCatalog("acroFormRef"), pdfManager.ensureDoc("startXRef"), pdfManager.ensureDoc("xref"), pdfManager.ensureDoc("linearization"), pdfManager.ensureCatalog("structTreeRoot")]; 56598 const promises = []; 56599 const newAnnotationsByPage = !isPureXfa ? getNewAnnotationsMap(annotationStorage) : null; 56600 const [stream, acroForm, acroFormRef, startXRef, xref, linearization, _structTreeRoot] = await Promise.all(globalPromises); 56601 const catalogRef = xref.trailer.getRaw("Root") || null; 56602 let structTreeRoot; 56603 if (newAnnotationsByPage) { 56604 if (!_structTreeRoot) { 56605 if (await StructTreeRoot.canCreateStructureTree({ 56606 catalogRef, 56607 pdfManager, 56608 newAnnotationsByPage 56609 })) { 56610 structTreeRoot = null; 56611 } 56612 } else if (await _structTreeRoot.canUpdateStructTree({ 56613 pdfManager, 56614 xref, 56615 newAnnotationsByPage 56616 })) { 56617 structTreeRoot = _structTreeRoot; 56618 } 56619 const imagePromises = AnnotationFactory.generateImages(annotationStorage.values(), xref, pdfManager.evaluatorOptions.isOffscreenCanvasSupported); 56620 const newAnnotationPromises = structTreeRoot === undefined ? promises : []; 56621 for (const [pageIndex, annotations] of newAnnotationsByPage) { 56622 newAnnotationPromises.push(pdfManager.getPage(pageIndex).then(page => { 56623 const task = new WorkerTask(`Save (editor): page ${pageIndex}`); 56624 return page.saveNewAnnotations(handler, task, annotations, imagePromises).finally(function () { 56625 finishWorkerTask(task); 56626 }); 56627 })); 56628 } 56629 if (structTreeRoot === null) {
56630 promises.push(Promise.all(newAnnotationPromises).then(async newRefs => { 56631 await StructTreeRoot.createStructureTree({ 56632 newAnnotationsByPage, 56633 xref, 56634 catalogRef, 56635 pdfManager, 56636 newRefs 56637 }); 56638 return newRefs; 56639 })); 56640 } else if (structTreeRoot) { 56641 promises.push(Promise.all(newAnnotationPromises).then(async newRefs => { 56642 await structTreeRoot.updateStructureTree({ 56643 newAnnotationsByPage, 56644 pdfManager, 56645 newRefs 56646 }); 56647 return newRefs; 56648 })); 56649 } 56650 } 56651 if (isPureXfa) { 56652 promises.push(pdfManager.serializeXfaData(annotationStorage)); 56653 } else { 56654 for (let pageIndex = 0; pageIndex < numPages; pageIndex++) { 56655 promises.push(pdfManager.getPage(pageIndex).then(function (page) { 56656 const task = new WorkerTask(`Save: page ${pageIndex}`); 56657 return page.save(handler, task, annotationStorage).finally(function () { 56658 finishWorkerTask(task); 56659 }); 56660 })); 56661 } 56662 } 56663 const refs = await Promise.all(promises); 56664 let newRefs = []; 56665 let xfaData = null; 56666 if (isPureXfa) { 56667 xfaData = refs[0]; 56668 if (!xfaData) { 56669 return stream.bytes; 56670 } 56671 } else { 56672 newRefs = refs.flat(2); 56673 if (newRefs.length === 0) { 56674 return stream.bytes; 56675 } 56676 } 56677 const needAppearances = acroFormRef && acroForm instanceof Dict && newRefs.some(ref => ref.needAppearances); 56678 const xfa = acroForm instanceof Dict && acroForm.get("XFA") || null; 56679 let xfaDatasetsRef = null; 56680 let hasXfaDatasetsEntry = false; 56681 if (Array.isArray(xfa)) { 56682 for (let i = 0, ii = xfa.length; i < ii; i += 2) { 56683 if (xfa[i] === "datasets") { 56684 xfaDatasetsRef = xfa[i + 1]; 56685 hasXfaDatasetsEntry = true; 56686 } 56687 } 56688 if (xfaDatasetsRef === null) { 56689 xfaDatasetsRef = xref.getNewTemporaryRef(); 56690 } 56691 } else if (xfa) { 56692 warn("Unsupported XFA type."); 56693 } 56694 let newXrefInfo = Object.create(null); 56695 if (xref.trailer) { 56696 const infoObj = Object.create(null); 56697 const xrefInfo = xref.trailer.get("Info") || null; 56698 if (xrefInfo instanceof Dict) { 56699 xrefInfo.forEach((key, value) => { 56700 if (typeof value === "string") { 56701 infoObj[key] = stringToPDFString(value); 56702 } 56703 }); 56704 } 56705 newXrefInfo = { 56706 rootRef: catalogRef, 56707 encryptRef: xref.trailer.getRaw("Encrypt") || null, 56708 newRef: xref.getNewTemporaryRef(), 56709 infoRef: xref.trailer.getRaw("Info") || null, 56710 info: infoObj, 56711 fileIds: xref.trailer.get("ID") || null, 56712 startXRef: linearization ? startXRef : xref.lastXRefStreamPos ?? startXRef, 56713 filename 56714 }; 56715 } 56716 return incrementalUpdate({ 56717 originalData: stream.bytes, 56718 xrefInfo: newXrefInfo, 56719 newRefs, 56720 xref, 56721 hasXfa: !!xfa, 56722 xfaDatasetsRef, 56723 hasXfaDatasetsEntry, 56724 needAppearances, 56725 acroFormRef, 56726 acroForm, 56727 xfaData, 56728 useXrefStream: isDict(xref.topDict, "XRef") 56729 }).finally(() => { 56730 xref.resetNewTemporaryRef(); 56731 }); 56732 }); 56733 handler.on("GetOperatorList", function (data, sink) { 56734 const pageIndex = data.pageIndex; 56735 pdfManager.getPage(pageIndex).then(function (page) { 56736 const task = new WorkerTask(`GetOperatorList: page ${pageIndex}`); 56737 startWorkerTask(task); 56738 const start = verbosity >= VerbosityLevel.INFOS ? Date.now() : 0; 56739 page.getOperatorList({ 56740 handler, 56741 sink, 56742 task, 56743 intent: data.intent, 56744 cacheKey: data.cacheKey, 56745 annotationStorage: data.annotationStorage, 56746 modifiedIds: data.modifiedIds 56747 }).then(function (operatorListInfo) { 56748 finishWorkerTask(task); 56749 if (start) { 56750 info(`page=${pageIndex + 1} - getOperatorList: time=` + `${Date.now() - start}
56750ms, len=${operatorListInfo.length}`); 56751 } 56752 sink.close(); 56753 }, function (reason) { 56754 finishWorkerTask(task); 56755 if (task.terminated) { 56756 return; 56757 } 56758 sink.error(reason); 56759 }); 56760 }); 56761 }); 56762 handler.on("GetTextContent", function (data, sink) { 56763 const { 56764 pageIndex, 56765 includeMarkedContent, 56766 disableNormalization 56767 } = data; 56768 pdfManager.getPage(pageIndex).then(function (page) { 56769 const task = new WorkerTask("GetTextContent: page " + pageIndex); 56770 startWorkerTask(task); 56771 const start = verbosity >= VerbosityLevel.INFOS ? Date.now() : 0; 56772 page.extractTextContent({ 56773 handler, 56774 task, 56775 sink, 56776 includeMarkedContent, 56777 disableNormalization 56778 }).then(function () { 56779 finishWorkerTask(task); 56780 if (start) { 56781 info(`page=${pageIndex + 1} - getTextContent: time=` + `${Date.now() - start}ms`); 56782 } 56783 sink.close(); 56784 }, function (reason) { 56785 finishWorkerTask(task); 56786 if (task.terminated) { 56787 return; 56788 } 56789 sink.error(reason); 56790 }); 56791 }); 56792 }); 56793 handler.on("GetStructTree", function (data) { 56794 return pdfManager.getPage(data.pageIndex).then(function (page) { 56795 return pdfManager.ensure(page, "getStructTree"); 56796 }); 56797 }); 56798 handler.on("FontFallback", function (data) { 56799 return pdfManager.fontFallback(data.id, handler); 56800 }); 56801 handler.on("Cleanup", function (data) { 56802 return pdfManager.cleanup(true); 56803 }); 56804 handler.on("Terminate", function (data) { 56805 terminated = true; 56806 const waitOn = []; 56807 if (pdfManager) { 56808 pdfManager.terminate(new AbortException("Worker was terminated.")); 56809 const cleanupPromise = pdfManager.cleanup(); 56810 waitOn.push(cleanupPromise); 56811 pdfManager = null; 56812 } else { 56813 clearGlobalCaches(); 56814 } 56815 cancelXHRs?.(new AbortException("Worker was terminated.")); 56816 for (const task of WorkerTasks) { 56817 waitOn.push(task.finished); 56818 task.terminate(); 56819 } 56820 return Promise.all(waitOn).then(function () { 56821 handler.destroy(); 56822 handler = null; 56823 }); 56824 }); 56825 handler.on("Ready", function (data) { 56826 setupDoc(docParams); 56827 docParams = null; 56828 }); 56829 return workerHandlerName; 56830 } 56831 static initializeFromPort(port) { 56832 const handler = new MessageHandler("worker", "main", port); 56833 WorkerMessageHandler.setup(handler, port); 56834 handler.send("ready", null); 56835 } 56836} 56837function isMessagePort(maybePort) { 56838 return typeof maybePort.postMessage === "function" && "onmessage" in maybePort; 56839} 56840if (typeof window === "undefined" && !isNodeJS && typeof self !== "undefined" && isMessagePort(self)) { 56841 WorkerMessageHandler.initializeFromPort(self); 56842} 56843 56844;// ./src/pdf.worker.js 56845 56846const pdfjsVersion = "4.8.69"; 56847const pdfjsBuild = "3634dab10"; 56848 56849var __webpack_exports__WorkerMessageHandler = __webpack_exports__.WorkerMessageHandler; 56850export { __webpack_exports__WorkerMessageHandler as WorkerMessageHandler }; 56851 56852//# sourceMappingURL=pdf.worker.mjs.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.