ai-helper-agent 2.3.1 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/README.md +13 -3
  2. package/dist/assets/__vite-browser-external-CM3Eme-n.js +1 -0
  3. package/dist/assets/agent-store-Ce3f4Ya3.js +1 -0
  4. package/dist/assets/background.js +104 -80
  5. package/dist/assets/chat-export-CWSUeOo4.js +37 -0
  6. package/dist/assets/chunk-CMxvf4Kt.js +1 -0
  7. package/dist/assets/content.js +159 -156
  8. package/dist/assets/{dist-BQOFgIxk.js → dist-DhUTa_WT.js} +5 -6
  9. package/dist/assets/dist-LQPh1k0y.js +24 -0
  10. package/dist/assets/i18n-ouMgDZ2t.js +49 -0
  11. package/dist/assets/jszip.min-Bm_16osY.js +2 -0
  12. package/dist/assets/lib-33nIefF6.js +220 -0
  13. package/dist/assets/{marked.min.js-08SGy6CO.js → marked.min.js-D2rXgLAQ.js} +7 -8
  14. package/dist/assets/{marked.min.js-loader-4kRZ9iCP.js → marked.min.js-loader-tKH5SQVQ.js} +1 -1
  15. package/dist/assets/model-profiles-6dzdrSS4.js +24 -0
  16. package/dist/assets/network-scope-CNRYXk74.js +1 -0
  17. package/dist/assets/options-Cp1UMkjK.css +1 -0
  18. package/dist/assets/options.js +108 -102
  19. package/dist/assets/{page-snapshot-renderer-CVL6r6Kf.js → page-snapshot-renderer-j72q92KH.js} +2 -3
  20. package/dist/assets/pdf-DnVqBaAN.js +6 -0
  21. package/dist/assets/session-store-CmGs_rhh.js +76 -0
  22. package/dist/assets/side_panel.css +1 -1
  23. package/dist/assets/side_panel.js +958 -1124
  24. package/dist/assets/theme-BRAX5X2F.css +1 -0
  25. package/dist/assets/{modulepreload-polyfill-P2Xu9kJm.js → theme-CLwYsx9o.js} +1 -1
  26. package/dist/assets/utils-9i9g8vW8.js +112 -0
  27. package/dist/assets/version-BrT5Y9A7.js +1 -0
  28. package/dist/assets/xlsx-DGkz7cnk.js +105 -0
  29. package/dist/manifest.json +2 -5
  30. package/dist/offscreen/offscreen.js +7 -7
  31. package/dist/options.html +151 -75
  32. package/dist/side_panel.html +167 -137
  33. package/package.json +1 -1
  34. package/src/config.js +3 -2
  35. package/src/executor.js +99 -18
  36. package/src/locales/en.json +16 -2
  37. package/src/locales/zh.json +16 -2
  38. package/src/memory/injection.js +12 -2
  39. package/src/memory/routes.js +6 -0
  40. package/src/memory/service.js +57 -2
  41. package/src/rag/manager.js +1 -1
  42. package/src/rag/url-guard.js +27 -12
  43. package/src/security.js +433 -31
  44. package/src/server.js +28 -8
  45. package/dist/assets/agent-store-DcAs6YyA.js +0 -2
  46. package/dist/assets/agent-store-DcAs6YyA.js.map +0 -1
  47. package/dist/assets/background.js.map +0 -1
  48. package/dist/assets/dist-BQOFgIxk.js.map +0 -1
  49. package/dist/assets/i18n-C4jSRoCH.js +0 -50
  50. package/dist/assets/i18n-C4jSRoCH.js.map +0 -1
  51. package/dist/assets/jszip.min-BXqW2-9v.js +0 -3
  52. package/dist/assets/jszip.min-BXqW2-9v.js.map +0 -1
  53. package/dist/assets/lib-Bi7BFuND.js +0 -221
  54. package/dist/assets/lib-Bi7BFuND.js.map +0 -1
  55. package/dist/assets/marked.min.js-08SGy6CO.js.map +0 -1
  56. package/dist/assets/model-profiles-Dl_MsXWa.js +0 -25
  57. package/dist/assets/model-profiles-Dl_MsXWa.js.map +0 -1
  58. package/dist/assets/options-8-nu3P5K.css +0 -1
  59. package/dist/assets/options.js.map +0 -1
  60. package/dist/assets/page-snapshot-renderer-CVL6r6Kf.js.map +0 -1
  61. package/dist/assets/pdf-HiJ0icvU.js +0 -7
  62. package/dist/assets/pdf-HiJ0icvU.js.map +0 -1
  63. package/dist/assets/rolldown-runtime-C0FnF6B9.js +0 -1
  64. package/dist/assets/session-store-CzVQCgQ_.js +0 -77
  65. package/dist/assets/session-store-CzVQCgQ_.js.map +0 -1
  66. package/dist/assets/side_panel.js.map +0 -1
  67. package/dist/assets/version-CNG2KGnJ.js +0 -2
  68. package/dist/assets/version-CNG2KGnJ.js.map +0 -1
  69. package/dist/assets/xlsx-BHKh7vjA.js +0 -106
  70. package/dist/assets/xlsx-BHKh7vjA.js.map +0 -1
  71. package/dist/icons/badges/license-MIT.svg +0 -21
  72. package/dist/icons/badges/platform.svg +0 -21
  73. package/dist/icons/badges/prs-welcome.svg +0 -21
  74. package/dist/icons/badges/version.svg +0 -21
@@ -1 +0,0 @@
1
- {"version":3,"file":"pdf-HiJ0icvU.js","names":["exports","#settled","#docId","#pendingCleanup","#abortDelayedCleanup","#tryCleanup","#delayedCleanupTimeout","#deferred","#listeners","#workerPorts","#methodPromises","#passwordCapability","#pageCache","#pagePromises","#cacheSimpleMethod","#objs","#ensureObj","#internalRenderTask","#canvasInUse","#storage","#setModified","#modified","#serializable","#isDraggable","#zIndex","#hasBeenClicked","#translate","#getBaseTranslation","#rotatePoint","#keepAspectRatio","#altTextButton","#resizersDiv","#resizerPointerdown","#resizerPointermove","#getRotationMatrix","#setAltTextButtonState","#altText","#altTextDecorative","#altTextTooltip","#altTextTooltipTimeout","#boundFocusin","#boundFocusout","#setUpDragSession","#isInEditMode","#createResizers","#isEditing","#id","#get","#cache","#baseId","#maxSize","#locked","#position","#commands","#serialize","#container","#viewer","#altTextManager","#boundOnEditingAction","#boundOnPageChanging","#boundOnScaleChanging","#boundOnRotationChanging","#annotationStorage","#filterFactory","#pageColors","#removeKeyboardManager","#removeFocusManager","#allLayers","#allEditors","#editorsToRescale","#activeEditor","#selectedEditors","#commandManager","#currentPageIndex","#boundFocus","#boundBlur","#lastActiveElement","#boundKeydown","#boundCopy","#boundCut","#boundPaste","#addKeyboardManager","#addCopyPasteListeners","#removeCopyPasteListeners","#editorTypes","#addEditorToLayer","#selectEditors","#previousStates","#addFocusManager","#dispatchUpdateStates","#mode","#isEmpty","#dispatchUpdateUI","#idManager","#isEnabled","#disableAll","#enableAll","#isWaiting","#deletedAnnotationsElementIds","#translation","#translationTimeoutId","#draggingEditors","#document","#_cache","#defs","#_defs","#createFilter","#addTransferMapConversion","#hcmKey","#hcmUrl","#hcmFilter","#getRGB","#hcmHighlightFilter","#addGrayConversion","#hcmHighlightKey","#hcmHighlightUrl","#appendFeFunc","#systemFonts","#restoreInitialState","#drawFilter","#processStreamMessage","#createStreamSink","#deleteStreamController","#metadataMap","#data","#visible","#order","#groups","#initialHash","#evaluateVisibilityExpression","#cachedGetHash","#uiManager","#accessibilityManager","#annotationLayer","#editors","#cleanup","#createAndAddNewEditor","#isDisabling","#boundPointerdown","#boundPointerup","#isCleaningUp","#getCenterPoint","#createNewEditor","#hadPointerDown","#allowClick","#color","#fontSize","#updateFontSize","#updateColor","#setEditorDimensions","#boundEditorDivKeydown","#boundEditorDivFocus","#boundEditorDivBlur","#boundEditorDivInput","#editorDivId","#cheatInitialRect","#content","#extractText","#setContent","#initialData","#hasElementChanged","#hasBorder","#bindSetOCGState","#setInternalLink","#keyDown","#hide","#show","#toggle","#titleObj","#contentsObj","#richText","#parent","#rect","#parentRect","#elements","#dateTimePromise","#boundToggle","#boundShow","#boundHide","#boundKeyDown","#popup","#pinned","#wasVisible","#line","#square","#circle","#polyline","#polylines","#download","#trigger","#annotationCanvasMap","#editableAnnotations","#appendElement","#setAnnotationCanvasMap","#updateThickness","#updateOpacity","#fitToContent","#redraw","#createCanvas","#createObserver","#setCanvasDims","#observer","#disableEditing","#boundCanvasPointerdown","#boundCanvasPointerleave","#boundCanvasPointermove","#boundCanvasPointerup","#isCanvasInitialized","#hasSomethingToDraw","#setStroke","#requestFrameCallback","#drawPoints","#currentPath2D","#makeBezierCurve","#draw","#endPath","#generateBezierPoints","#updateTransform","#startDrawing","#endDrawing","#stopDrawing","#getInitialBBox","#realWidth","#realHeight","#setScaleFactor","#getPadding","#baseWidth","#baseHeight","#buildPath2D","#toPDFCoordinates","#fromPDFCoordinates","#getBbox","#serializePaths","#bitmapUrl","#bitmapFile","#bitmap","#bitmapId","#isSvg","#bitmapPromise","#canvas","#getBitmapFetched","#getBitmapDone","#getBitmap","#drawBitmap","#hasBeenAddedInUndoStack","#resizeTimeoutId","#scaleBitmap","#setDimensions","#serializeBitmap","module"],"sources":["../../__vite-browser-external","../../node_modules/pdfjs-dist/build/pdf.js"],"sourcesContent":["module.exports = {}","/**\n * @licstart The following is the entire license notice for the\n * JavaScript code in this page\n *\n * Copyright 2023 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @licend The above is the entire license notice for the\n * JavaScript code in this page\n */\n\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = root.pdfjsLib = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"pdfjs-dist/build/pdf\", [], () => { return (root.pdfjsLib = factory()); });\n\telse if(typeof exports === 'object')\n\t\texports[\"pdfjs-dist/build/pdf\"] = root.pdfjsLib = factory();\n\telse\n\t\troot[\"pdfjs-dist/build/pdf\"] = root.pdfjsLib = factory();\n})(globalThis, () => {\nreturn /******/ (() => { // webpackBootstrap\n/******/ \t\"use strict\";\n/******/ \tvar __webpack_modules__ = ([\n/* 0 */,\n/* 1 */\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.VerbosityLevel = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.RenderingIntentFlag = exports.PromiseCapability = exports.PermissionFlag = exports.PasswordResponses = exports.PasswordException = exports.PageActionEventType = exports.OPS = exports.MissingPDFException = exports.MAX_IMAGE_SIZE_TO_CACHE = exports.LINE_FACTOR = exports.LINE_DESCENT_FACTOR = exports.InvalidPDFException = exports.ImageKind = exports.IDENTITY_MATRIX = exports.FormatError = exports.FeatureTest = exports.FONT_IDENTITY_MATRIX = exports.DocumentActionEventType = exports.CMapCompressionType = exports.BaseException = exports.BASELINE_FACTOR = exports.AnnotationType = exports.AnnotationReplyType = exports.AnnotationPrefix = exports.AnnotationMode = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationEditorType = exports.AnnotationEditorPrefix = exports.AnnotationEditorParamsType = exports.AnnotationBorderStyleType = exports.AnnotationActionEventType = exports.AbortException = void 0;\nexports.assert = assert;\nexports.bytesToString = bytesToString;\nexports.createValidAbsoluteUrl = createValidAbsoluteUrl;\nexports.getModificationDate = getModificationDate;\nexports.getUuid = getUuid;\nexports.getVerbosityLevel = getVerbosityLevel;\nexports.info = info;\nexports.isArrayBuffer = isArrayBuffer;\nexports.isArrayEqual = isArrayEqual;\nexports.isNodeJS = void 0;\nexports.normalizeUnicode = normalizeUnicode;\nexports.objectFromMap = objectFromMap;\nexports.objectSize = objectSize;\nexports.setVerbosityLevel = setVerbosityLevel;\nexports.shadow = shadow;\nexports.string32 = string32;\nexports.stringToBytes = stringToBytes;\nexports.stringToPDFString = stringToPDFString;\nexports.stringToUTF8String = stringToUTF8String;\nexports.unreachable = unreachable;\nexports.utf8StringToString = utf8StringToString;\nexports.warn = warn;\nconst isNodeJS = typeof process === \"object\" && process + \"\" === \"[object process]\" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== \"browser\");\nexports.isNodeJS = isNodeJS;\nconst IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0];\nexports.IDENTITY_MATRIX = IDENTITY_MATRIX;\nconst FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];\nexports.FONT_IDENTITY_MATRIX = FONT_IDENTITY_MATRIX;\nconst MAX_IMAGE_SIZE_TO_CACHE = 10e6;\nexports.MAX_IMAGE_SIZE_TO_CACHE = MAX_IMAGE_SIZE_TO_CACHE;\nconst LINE_FACTOR = 1.35;\nexports.LINE_FACTOR = LINE_FACTOR;\nconst LINE_DESCENT_FACTOR = 0.35;\nexports.LINE_DESCENT_FACTOR = LINE_DESCENT_FACTOR;\nconst BASELINE_FACTOR = LINE_DESCENT_FACTOR / LINE_FACTOR;\nexports.BASELINE_FACTOR = BASELINE_FACTOR;\nconst RenderingIntentFlag = {\n ANY: 0x01,\n DISPLAY: 0x02,\n PRINT: 0x04,\n SAVE: 0x08,\n ANNOTATIONS_FORMS: 0x10,\n ANNOTATIONS_STORAGE: 0x20,\n ANNOTATIONS_DISABLE: 0x40,\n OPLIST: 0x100\n};\nexports.RenderingIntentFlag = RenderingIntentFlag;\nconst AnnotationMode = {\n DISABLE: 0,\n ENABLE: 1,\n ENABLE_FORMS: 2,\n ENABLE_STORAGE: 3\n};\nexports.AnnotationMode = AnnotationMode;\nconst AnnotationEditorPrefix = \"pdfjs_internal_editor_\";\nexports.AnnotationEditorPrefix = AnnotationEditorPrefix;\nconst AnnotationEditorType = {\n DISABLE: -1,\n NONE: 0,\n FREETEXT: 3,\n STAMP: 13,\n INK: 15\n};\nexports.AnnotationEditorType = AnnotationEditorType;\nconst AnnotationEditorParamsType = {\n RESIZE: 1,\n CREATE: 2,\n FREETEXT_SIZE: 11,\n FREETEXT_COLOR: 12,\n FREETEXT_OPACITY: 13,\n INK_COLOR: 21,\n INK_THICKNESS: 22,\n INK_OPACITY: 23\n};\nexports.AnnotationEditorParamsType = AnnotationEditorParamsType;\nconst PermissionFlag = {\n PRINT: 0x04,\n MODIFY_CONTENTS: 0x08,\n COPY: 0x10,\n MODIFY_ANNOTATIONS: 0x20,\n FILL_INTERACTIVE_FORMS: 0x100,\n COPY_FOR_ACCESSIBILITY: 0x200,\n ASSEMBLE: 0x400,\n PRINT_HIGH_QUALITY: 0x800\n};\nexports.PermissionFlag = PermissionFlag;\nconst TextRenderingMode = {\n FILL: 0,\n STROKE: 1,\n FILL_STROKE: 2,\n INVISIBLE: 3,\n FILL_ADD_TO_PATH: 4,\n STROKE_ADD_TO_PATH: 5,\n FILL_STROKE_ADD_TO_PATH: 6,\n ADD_TO_PATH: 7,\n FILL_STROKE_MASK: 3,\n ADD_TO_PATH_FLAG: 4\n};\nexports.TextRenderingMode = TextRenderingMode;\nconst ImageKind = {\n GRAYSCALE_1BPP: 1,\n RGB_24BPP: 2,\n RGBA_32BPP: 3\n};\nexports.ImageKind = ImageKind;\nconst AnnotationType = {\n TEXT: 1,\n LINK: 2,\n FREETEXT: 3,\n LINE: 4,\n SQUARE: 5,\n CIRCLE: 6,\n POLYGON: 7,\n POLYLINE: 8,\n HIGHLIGHT: 9,\n UNDERLINE: 10,\n SQUIGGLY: 11,\n STRIKEOUT: 12,\n STAMP: 13,\n CARET: 14,\n INK: 15,\n POPUP: 16,\n FILEATTACHMENT: 17,\n SOUND: 18,\n MOVIE: 19,\n WIDGET: 20,\n SCREEN: 21,\n PRINTERMARK: 22,\n TRAPNET: 23,\n WATERMARK: 24,\n THREED: 25,\n REDACT: 26\n};\nexports.AnnotationType = AnnotationType;\nconst AnnotationReplyType = {\n GROUP: \"Group\",\n REPLY: \"R\"\n};\nexports.AnnotationReplyType = AnnotationReplyType;\nconst AnnotationFlag = {\n INVISIBLE: 0x01,\n HIDDEN: 0x02,\n PRINT: 0x04,\n NOZOOM: 0x08,\n NOROTATE: 0x10,\n NOVIEW: 0x20,\n READONLY: 0x40,\n LOCKED: 0x80,\n TOGGLENOVIEW: 0x100,\n LOCKEDCONTENTS: 0x200\n};\nexports.AnnotationFlag = AnnotationFlag;\nconst AnnotationFieldFlag = {\n READONLY: 0x0000001,\n REQUIRED: 0x0000002,\n NOEXPORT: 0x0000004,\n MULTILINE: 0x0001000,\n PASSWORD: 0x0002000,\n NOTOGGLETOOFF: 0x0004000,\n RADIO: 0x0008000,\n PUSHBUTTON: 0x0010000,\n COMBO: 0x0020000,\n EDIT: 0x0040000,\n SORT: 0x0080000,\n FILESELECT: 0x0100000,\n MULTISELECT: 0x0200000,\n DONOTSPELLCHECK: 0x0400000,\n DONOTSCROLL: 0x0800000,\n COMB: 0x1000000,\n RICHTEXT: 0x2000000,\n RADIOSINUNISON: 0x2000000,\n COMMITONSELCHANGE: 0x4000000\n};\nexports.AnnotationFieldFlag = AnnotationFieldFlag;\nconst AnnotationBorderStyleType = {\n SOLID: 1,\n DASHED: 2,\n BEVELED: 3,\n INSET: 4,\n UNDERLINE: 5\n};\nexports.AnnotationBorderStyleType = AnnotationBorderStyleType;\nconst AnnotationActionEventType = {\n E: \"Mouse Enter\",\n X: \"Mouse Exit\",\n D: \"Mouse Down\",\n U: \"Mouse Up\",\n Fo: \"Focus\",\n Bl: \"Blur\",\n PO: \"PageOpen\",\n PC: \"PageClose\",\n PV: \"PageVisible\",\n PI: \"PageInvisible\",\n K: \"Keystroke\",\n F: \"Format\",\n V: \"Validate\",\n C: \"Calculate\"\n};\nexports.AnnotationActionEventType = AnnotationActionEventType;\nconst DocumentActionEventType = {\n WC: \"WillClose\",\n WS: \"WillSave\",\n DS: \"DidSave\",\n WP: \"WillPrint\",\n DP: \"DidPrint\"\n};\nexports.DocumentActionEventType = DocumentActionEventType;\nconst PageActionEventType = {\n O: \"PageOpen\",\n C: \"PageClose\"\n};\nexports.PageActionEventType = PageActionEventType;\nconst VerbosityLevel = {\n ERRORS: 0,\n WARNINGS: 1,\n INFOS: 5\n};\nexports.VerbosityLevel = VerbosityLevel;\nconst CMapCompressionType = {\n NONE: 0,\n BINARY: 1\n};\nexports.CMapCompressionType = CMapCompressionType;\nconst OPS = {\n dependency: 1,\n setLineWidth: 2,\n setLineCap: 3,\n setLineJoin: 4,\n setMiterLimit: 5,\n setDash: 6,\n setRenderingIntent: 7,\n setFlatness: 8,\n setGState: 9,\n save: 10,\n restore: 11,\n transform: 12,\n moveTo: 13,\n lineTo: 14,\n curveTo: 15,\n curveTo2: 16,\n curveTo3: 17,\n closePath: 18,\n rectangle: 19,\n stroke: 20,\n closeStroke: 21,\n fill: 22,\n eoFill: 23,\n fillStroke: 24,\n eoFillStroke: 25,\n closeFillStroke: 26,\n closeEOFillStroke: 27,\n endPath: 28,\n clip: 29,\n eoClip: 30,\n beginText: 31,\n endText: 32,\n setCharSpacing: 33,\n setWordSpacing: 34,\n setHScale: 35,\n setLeading: 36,\n setFont: 37,\n setTextRenderingMode: 38,\n setTextRise: 39,\n moveText: 40,\n setLeadingMoveText: 41,\n setTextMatrix: 42,\n nextLine: 43,\n showText: 44,\n showSpacedText: 45,\n nextLineShowText: 46,\n nextLineSetSpacingShowText: 47,\n setCharWidth: 48,\n setCharWidthAndBounds: 49,\n setStrokeColorSpace: 50,\n setFillColorSpace: 51,\n setStrokeColor: 52,\n setStrokeColorN: 53,\n setFillColor: 54,\n setFillColorN: 55,\n setStrokeGray: 56,\n setFillGray: 57,\n setStrokeRGBColor: 58,\n setFillRGBColor: 59,\n setStrokeCMYKColor: 60,\n setFillCMYKColor: 61,\n shadingFill: 62,\n beginInlineImage: 63,\n beginImageData: 64,\n endInlineImage: 65,\n paintXObject: 66,\n markPoint: 67,\n markPointProps: 68,\n beginMarkedContent: 69,\n beginMarkedContentProps: 70,\n endMarkedContent: 71,\n beginCompat: 72,\n endCompat: 73,\n paintFormXObjectBegin: 74,\n paintFormXObjectEnd: 75,\n beginGroup: 76,\n endGroup: 77,\n beginAnnotation: 80,\n endAnnotation: 81,\n paintImageMaskXObject: 83,\n paintImageMaskXObjectGroup: 84,\n paintImageXObject: 85,\n paintInlineImageXObject: 86,\n paintInlineImageXObjectGroup: 87,\n paintImageXObjectRepeat: 88,\n paintImageMaskXObjectRepeat: 89,\n paintSolidColorImageMask: 90,\n constructPath: 91\n};\nexports.OPS = OPS;\nconst PasswordResponses = {\n NEED_PASSWORD: 1,\n INCORRECT_PASSWORD: 2\n};\nexports.PasswordResponses = PasswordResponses;\nlet verbosity = VerbosityLevel.WARNINGS;\nfunction setVerbosityLevel(level) {\n if (Number.isInteger(level)) {\n verbosity = level;\n }\n}\nfunction getVerbosityLevel() {\n return verbosity;\n}\nfunction info(msg) {\n if (verbosity >= VerbosityLevel.INFOS) {\n console.log(`Info: ${msg}`);\n }\n}\nfunction warn(msg) {\n if (verbosity >= VerbosityLevel.WARNINGS) {\n console.log(`Warning: ${msg}`);\n }\n}\nfunction unreachable(msg) {\n throw new Error(msg);\n}\nfunction assert(cond, msg) {\n if (!cond) {\n unreachable(msg);\n }\n}\nfunction _isValidProtocol(url) {\n switch (url?.protocol) {\n case \"http:\":\n case \"https:\":\n case \"ftp:\":\n case \"mailto:\":\n case \"tel:\":\n return true;\n default:\n return false;\n }\n}\nfunction createValidAbsoluteUrl(url, baseUrl = null, options = null) {\n if (!url) {\n return null;\n }\n try {\n if (options && typeof url === \"string\") {\n if (options.addDefaultProtocol && url.startsWith(\"www.\")) {\n const dots = url.match(/\\./g);\n if (dots?.length >= 2) {\n url = `http://${url}`;\n }\n }\n if (options.tryConvertEncoding) {\n try {\n url = stringToUTF8String(url);\n } catch {}\n }\n }\n const absoluteUrl = baseUrl ? new URL(url, baseUrl) : new URL(url);\n if (_isValidProtocol(absoluteUrl)) {\n return absoluteUrl;\n }\n } catch {}\n return null;\n}\nfunction shadow(obj, prop, value, nonSerializable = false) {\n Object.defineProperty(obj, prop, {\n value,\n enumerable: !nonSerializable,\n configurable: true,\n writable: false\n });\n return value;\n}\nconst BaseException = function BaseExceptionClosure() {\n function BaseException(message, name) {\n if (this.constructor === BaseException) {\n unreachable(\"Cannot initialize BaseException.\");\n }\n this.message = message;\n this.name = name;\n }\n BaseException.prototype = new Error();\n BaseException.constructor = BaseException;\n return BaseException;\n}();\nexports.BaseException = BaseException;\nclass PasswordException extends BaseException {\n constructor(msg, code) {\n super(msg, \"PasswordException\");\n this.code = code;\n }\n}\nexports.PasswordException = PasswordException;\nclass UnknownErrorException extends BaseException {\n constructor(msg, details) {\n super(msg, \"UnknownErrorException\");\n this.details = details;\n }\n}\nexports.UnknownErrorException = UnknownErrorException;\nclass InvalidPDFException extends BaseException {\n constructor(msg) {\n super(msg, \"InvalidPDFException\");\n }\n}\nexports.InvalidPDFException = InvalidPDFException;\nclass MissingPDFException extends BaseException {\n constructor(msg) {\n super(msg, \"MissingPDFException\");\n }\n}\nexports.MissingPDFException = MissingPDFException;\nclass UnexpectedResponseException extends BaseException {\n constructor(msg, status) {\n super(msg, \"UnexpectedResponseException\");\n this.status = status;\n }\n}\nexports.UnexpectedResponseException = UnexpectedResponseException;\nclass FormatError extends BaseException {\n constructor(msg) {\n super(msg, \"FormatError\");\n }\n}\nexports.FormatError = FormatError;\nclass AbortException extends BaseException {\n constructor(msg) {\n super(msg, \"AbortException\");\n }\n}\nexports.AbortException = AbortException;\nfunction bytesToString(bytes) {\n if (typeof bytes !== \"object\" || bytes?.length === undefined) {\n unreachable(\"Invalid argument for bytesToString\");\n }\n const length = bytes.length;\n const MAX_ARGUMENT_COUNT = 8192;\n if (length < MAX_ARGUMENT_COUNT) {\n return String.fromCharCode.apply(null, bytes);\n }\n const strBuf = [];\n for (let i = 0; i < length; i += MAX_ARGUMENT_COUNT) {\n const chunkEnd = Math.min(i + MAX_ARGUMENT_COUNT, length);\n const chunk = bytes.subarray(i, chunkEnd);\n strBuf.push(String.fromCharCode.apply(null, chunk));\n }\n return strBuf.join(\"\");\n}\nfunction stringToBytes(str) {\n if (typeof str !== \"string\") {\n unreachable(\"Invalid argument for stringToBytes\");\n }\n const length = str.length;\n const bytes = new Uint8Array(length);\n for (let i = 0; i < length; ++i) {\n bytes[i] = str.charCodeAt(i) & 0xff;\n }\n return bytes;\n}\nfunction string32(value) {\n return String.fromCharCode(value >> 24 & 0xff, value >> 16 & 0xff, value >> 8 & 0xff, value & 0xff);\n}\nfunction objectSize(obj) {\n return Object.keys(obj).length;\n}\nfunction objectFromMap(map) {\n const obj = Object.create(null);\n for (const [key, value] of map) {\n obj[key] = value;\n }\n return obj;\n}\nfunction isLittleEndian() {\n const buffer8 = new Uint8Array(4);\n buffer8[0] = 1;\n const view32 = new Uint32Array(buffer8.buffer, 0, 1);\n return view32[0] === 1;\n}\nfunction isEvalSupported() {\n try {\n new Function(\"\");\n return true;\n } catch {\n return false;\n }\n}\nclass FeatureTest {\n static get isLittleEndian() {\n return shadow(this, \"isLittleEndian\", isLittleEndian());\n }\n static get isEvalSupported() {\n return shadow(this, \"isEvalSupported\", isEvalSupported());\n }\n static get isOffscreenCanvasSupported() {\n return shadow(this, \"isOffscreenCanvasSupported\", typeof OffscreenCanvas !== \"undefined\");\n }\n static get platform() {\n if (typeof navigator === \"undefined\") {\n return shadow(this, \"platform\", {\n isWin: false,\n isMac: false\n });\n }\n return shadow(this, \"platform\", {\n isWin: navigator.platform.includes(\"Win\"),\n isMac: navigator.platform.includes(\"Mac\")\n });\n }\n static get isCSSRoundSupported() {\n return shadow(this, \"isCSSRoundSupported\", globalThis.CSS?.supports?.(\"width: round(1.5px, 1px)\"));\n }\n}\nexports.FeatureTest = FeatureTest;\nconst hexNumbers = [...Array(256).keys()].map(n => n.toString(16).padStart(2, \"0\"));\nclass Util {\n static makeHexColor(r, g, b) {\n return `#${hexNumbers[r]}${hexNumbers[g]}${hexNumbers[b]}`;\n }\n static scaleMinMax(transform, minMax) {\n let temp;\n if (transform[0]) {\n if (transform[0] < 0) {\n temp = minMax[0];\n minMax[0] = minMax[1];\n minMax[1] = temp;\n }\n minMax[0] *= transform[0];\n minMax[1] *= transform[0];\n if (transform[3] < 0) {\n temp = minMax[2];\n minMax[2] = minMax[3];\n minMax[3] = temp;\n }\n minMax[2] *= transform[3];\n minMax[3] *= transform[3];\n } else {\n temp = minMax[0];\n minMax[0] = minMax[2];\n minMax[2] = temp;\n temp = minMax[1];\n minMax[1] = minMax[3];\n minMax[3] = temp;\n if (transform[1] < 0) {\n temp = minMax[2];\n minMax[2] = minMax[3];\n minMax[3] = temp;\n }\n minMax[2] *= transform[1];\n minMax[3] *= transform[1];\n if (transform[2] < 0) {\n temp = minMax[0];\n minMax[0] = minMax[1];\n minMax[1] = temp;\n }\n minMax[0] *= transform[2];\n minMax[1] *= transform[2];\n }\n minMax[0] += transform[4];\n minMax[1] += transform[4];\n minMax[2] += transform[5];\n minMax[3] += transform[5];\n }\n static transform(m1, m2) {\n 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]];\n }\n static applyTransform(p, m) {\n const xt = p[0] * m[0] + p[1] * m[2] + m[4];\n const yt = p[0] * m[1] + p[1] * m[3] + m[5];\n return [xt, yt];\n }\n static applyInverseTransform(p, m) {\n const d = m[0] * m[3] - m[1] * m[2];\n const xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d;\n const yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d;\n return [xt, yt];\n }\n static getAxialAlignedBoundingBox(r, m) {\n const p1 = this.applyTransform(r, m);\n const p2 = this.applyTransform(r.slice(2, 4), m);\n const p3 = this.applyTransform([r[0], r[3]], m);\n const p4 = this.applyTransform([r[2], r[1]], m);\n 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])];\n }\n static inverseTransform(m) {\n const d = m[0] * m[3] - m[1] * m[2];\n 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];\n }\n static singularValueDecompose2dScale(m) {\n const transpose = [m[0], m[2], m[1], m[3]];\n const a = m[0] * transpose[0] + m[1] * transpose[2];\n const b = m[0] * transpose[1] + m[1] * transpose[3];\n const c = m[2] * transpose[0] + m[3] * transpose[2];\n const d = m[2] * transpose[1] + m[3] * transpose[3];\n const first = (a + d) / 2;\n const second = Math.sqrt((a + d) ** 2 - 4 * (a * d - c * b)) / 2;\n const sx = first + second || 1;\n const sy = first - second || 1;\n return [Math.sqrt(sx), Math.sqrt(sy)];\n }\n static normalizeRect(rect) {\n const r = rect.slice(0);\n if (rect[0] > rect[2]) {\n r[0] = rect[2];\n r[2] = rect[0];\n }\n if (rect[1] > rect[3]) {\n r[1] = rect[3];\n r[3] = rect[1];\n }\n return r;\n }\n static intersect(rect1, rect2) {\n const xLow = Math.max(Math.min(rect1[0], rect1[2]), Math.min(rect2[0], rect2[2]));\n const xHigh = Math.min(Math.max(rect1[0], rect1[2]), Math.max(rect2[0], rect2[2]));\n if (xLow > xHigh) {\n return null;\n }\n const yLow = Math.max(Math.min(rect1[1], rect1[3]), Math.min(rect2[1], rect2[3]));\n const yHigh = Math.min(Math.max(rect1[1], rect1[3]), Math.max(rect2[1], rect2[3]));\n if (yLow > yHigh) {\n return null;\n }\n return [xLow, yLow, xHigh, yHigh];\n }\n static bezierBoundingBox(x0, y0, x1, y1, x2, y2, x3, y3) {\n const tvalues = [],\n bounds = [[], []];\n let a, b, c, t, t1, t2, b2ac, sqrtb2ac;\n for (let i = 0; i < 2; ++i) {\n if (i === 0) {\n b = 6 * x0 - 12 * x1 + 6 * x2;\n a = -3 * x0 + 9 * x1 - 9 * x2 + 3 * x3;\n c = 3 * x1 - 3 * x0;\n } else {\n b = 6 * y0 - 12 * y1 + 6 * y2;\n a = -3 * y0 + 9 * y1 - 9 * y2 + 3 * y3;\n c = 3 * y1 - 3 * y0;\n }\n if (Math.abs(a) < 1e-12) {\n if (Math.abs(b) < 1e-12) {\n continue;\n }\n t = -c / b;\n if (0 < t && t < 1) {\n tvalues.push(t);\n }\n continue;\n }\n b2ac = b * b - 4 * c * a;\n sqrtb2ac = Math.sqrt(b2ac);\n if (b2ac < 0) {\n continue;\n }\n t1 = (-b + sqrtb2ac) / (2 * a);\n if (0 < t1 && t1 < 1) {\n tvalues.push(t1);\n }\n t2 = (-b - sqrtb2ac) / (2 * a);\n if (0 < t2 && t2 < 1) {\n tvalues.push(t2);\n }\n }\n let j = tvalues.length,\n mt;\n const jlen = j;\n while (j--) {\n t = tvalues[j];\n mt = 1 - t;\n bounds[0][j] = mt * mt * mt * x0 + 3 * mt * mt * t * x1 + 3 * mt * t * t * x2 + t * t * t * x3;\n bounds[1][j] = mt * mt * mt * y0 + 3 * mt * mt * t * y1 + 3 * mt * t * t * y2 + t * t * t * y3;\n }\n bounds[0][jlen] = x0;\n bounds[1][jlen] = y0;\n bounds[0][jlen + 1] = x3;\n bounds[1][jlen + 1] = y3;\n bounds[0].length = bounds[1].length = jlen + 2;\n return [Math.min(...bounds[0]), Math.min(...bounds[1]), Math.max(...bounds[0]), Math.max(...bounds[1])];\n }\n}\nexports.Util = Util;\nconst 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];\nfunction stringToPDFString(str) {\n if (str[0] >= \"\\xEF\") {\n let encoding;\n if (str[0] === \"\\xFE\" && str[1] === \"\\xFF\") {\n encoding = \"utf-16be\";\n } else if (str[0] === \"\\xFF\" && str[1] === \"\\xFE\") {\n encoding = \"utf-16le\";\n } else if (str[0] === \"\\xEF\" && str[1] === \"\\xBB\" && str[2] === \"\\xBF\") {\n encoding = \"utf-8\";\n }\n if (encoding) {\n try {\n const decoder = new TextDecoder(encoding, {\n fatal: true\n });\n const buffer = stringToBytes(str);\n return decoder.decode(buffer);\n } catch (ex) {\n warn(`stringToPDFString: \"${ex}\".`);\n }\n }\n }\n const strBuf = [];\n for (let i = 0, ii = str.length; i < ii; i++) {\n const code = PDFStringTranslateTable[str.charCodeAt(i)];\n strBuf.push(code ? String.fromCharCode(code) : str.charAt(i));\n }\n return strBuf.join(\"\");\n}\nfunction stringToUTF8String(str) {\n return decodeURIComponent(escape(str));\n}\nfunction utf8StringToString(str) {\n return unescape(encodeURIComponent(str));\n}\nfunction isArrayBuffer(v) {\n return typeof v === \"object\" && v?.byteLength !== undefined;\n}\nfunction isArrayEqual(arr1, arr2) {\n if (arr1.length !== arr2.length) {\n return false;\n }\n for (let i = 0, ii = arr1.length; i < ii; i++) {\n if (arr1[i] !== arr2[i]) {\n return false;\n }\n }\n return true;\n}\nfunction getModificationDate(date = new Date()) {\n 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\")];\n return buffer.join(\"\");\n}\nclass PromiseCapability {\n #settled = false;\n constructor() {\n this.promise = new Promise((resolve, reject) => {\n this.resolve = data => {\n this.#settled = true;\n resolve(data);\n };\n this.reject = reason => {\n this.#settled = true;\n reject(reason);\n };\n });\n }\n get settled() {\n return this.#settled;\n }\n}\nexports.PromiseCapability = PromiseCapability;\nlet NormalizeRegex = null;\nlet NormalizationMap = null;\nfunction normalizeUnicode(str) {\n if (!NormalizeRegex) {\n 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;\n NormalizationMap = new Map([[\"ſt\", \"ſt\"]]);\n }\n return str.replaceAll(NormalizeRegex, (_, p1, p2) => {\n return p1 ? p1.normalize(\"NFKC\") : NormalizationMap.get(p2);\n });\n}\nfunction getUuid() {\n if (typeof crypto !== \"undefined\" && typeof crypto?.randomUUID === \"function\") {\n return crypto.randomUUID();\n }\n const buf = new Uint8Array(32);\n if (typeof crypto !== \"undefined\" && typeof crypto?.getRandomValues === \"function\") {\n crypto.getRandomValues(buf);\n } else {\n for (let i = 0; i < 32; i++) {\n buf[i] = Math.floor(Math.random() * 255);\n }\n }\n return bytesToString(buf);\n}\nconst AnnotationPrefix = \"pdfjs_internal_id_\";\nexports.AnnotationPrefix = AnnotationPrefix;\n\n/***/ }),\n/* 2 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.RenderTask = exports.PDFWorkerUtil = exports.PDFWorker = exports.PDFPageProxy = exports.PDFDocumentProxy = exports.PDFDocumentLoadingTask = exports.PDFDataRangeTransport = exports.LoopbackPort = exports.DefaultStandardFontDataFactory = exports.DefaultFilterFactory = exports.DefaultCanvasFactory = exports.DefaultCMapReaderFactory = void 0;\nObject.defineProperty(exports, \"SVGGraphics\", ({\n enumerable: true,\n get: function () {\n return _displaySvg.SVGGraphics;\n }\n}));\nexports.build = void 0;\nexports.getDocument = getDocument;\nexports.version = void 0;\nvar _util = __w_pdfjs_require__(1);\nvar _annotation_storage = __w_pdfjs_require__(3);\nvar _display_utils = __w_pdfjs_require__(6);\nvar _font_loader = __w_pdfjs_require__(9);\nvar _displayNode_utils = __w_pdfjs_require__(10);\nvar _canvas = __w_pdfjs_require__(11);\nvar _worker_options = __w_pdfjs_require__(14);\nvar _message_handler = __w_pdfjs_require__(15);\nvar _metadata = __w_pdfjs_require__(16);\nvar _optional_content_config = __w_pdfjs_require__(17);\nvar _transport_stream = __w_pdfjs_require__(18);\nvar _displayFetch_stream = __w_pdfjs_require__(19);\nvar _displayNetwork = __w_pdfjs_require__(22);\nvar _displayNode_stream = __w_pdfjs_require__(23);\nvar _displaySvg = __w_pdfjs_require__(24);\nvar _xfa_text = __w_pdfjs_require__(25);\nconst DEFAULT_RANGE_CHUNK_SIZE = 65536;\nconst RENDERING_CANCELLED_TIMEOUT = 100;\nconst DELAYED_CLEANUP_TIMEOUT = 5000;\nconst DefaultCanvasFactory = _util.isNodeJS ? _displayNode_utils.NodeCanvasFactory : _display_utils.DOMCanvasFactory;\nexports.DefaultCanvasFactory = DefaultCanvasFactory;\nconst DefaultCMapReaderFactory = _util.isNodeJS ? _displayNode_utils.NodeCMapReaderFactory : _display_utils.DOMCMapReaderFactory;\nexports.DefaultCMapReaderFactory = DefaultCMapReaderFactory;\nconst DefaultFilterFactory = _util.isNodeJS ? _displayNode_utils.NodeFilterFactory : _display_utils.DOMFilterFactory;\nexports.DefaultFilterFactory = DefaultFilterFactory;\nconst DefaultStandardFontDataFactory = _util.isNodeJS ? _displayNode_utils.NodeStandardFontDataFactory : _display_utils.DOMStandardFontDataFactory;\nexports.DefaultStandardFontDataFactory = DefaultStandardFontDataFactory;\nfunction getDocument(src) {\n if (typeof src === \"string\" || src instanceof URL) {\n src = {\n url: src\n };\n } else if ((0, _util.isArrayBuffer)(src)) {\n src = {\n data: src\n };\n }\n if (typeof src !== \"object\") {\n throw new Error(\"Invalid parameter in getDocument, need parameter object.\");\n }\n if (!src.url && !src.data && !src.range) {\n throw new Error(\"Invalid parameter object: need either .data, .range or .url\");\n }\n const task = new PDFDocumentLoadingTask();\n const {\n docId\n } = task;\n const url = src.url ? getUrlProp(src.url) : null;\n const data = src.data ? getDataProp(src.data) : null;\n const httpHeaders = src.httpHeaders || null;\n const withCredentials = src.withCredentials === true;\n const password = src.password ?? null;\n const rangeTransport = src.range instanceof PDFDataRangeTransport ? src.range : null;\n const rangeChunkSize = Number.isInteger(src.rangeChunkSize) && src.rangeChunkSize > 0 ? src.rangeChunkSize : DEFAULT_RANGE_CHUNK_SIZE;\n let worker = src.worker instanceof PDFWorker ? src.worker : null;\n const verbosity = src.verbosity;\n const docBaseUrl = typeof src.docBaseUrl === \"string\" && !(0, _display_utils.isDataScheme)(src.docBaseUrl) ? src.docBaseUrl : null;\n const cMapUrl = typeof src.cMapUrl === \"string\" ? src.cMapUrl : null;\n const cMapPacked = src.cMapPacked !== false;\n const CMapReaderFactory = src.CMapReaderFactory || DefaultCMapReaderFactory;\n const standardFontDataUrl = typeof src.standardFontDataUrl === \"string\" ? src.standardFontDataUrl : null;\n const StandardFontDataFactory = src.StandardFontDataFactory || DefaultStandardFontDataFactory;\n const ignoreErrors = src.stopAtErrors !== true;\n const maxImageSize = Number.isInteger(src.maxImageSize) && src.maxImageSize > -1 ? src.maxImageSize : -1;\n const isEvalSupported = src.isEvalSupported !== false;\n const isOffscreenCanvasSupported = typeof src.isOffscreenCanvasSupported === \"boolean\" ? src.isOffscreenCanvasSupported : !_util.isNodeJS;\n const canvasMaxAreaInBytes = Number.isInteger(src.canvasMaxAreaInBytes) ? src.canvasMaxAreaInBytes : -1;\n const disableFontFace = typeof src.disableFontFace === \"boolean\" ? src.disableFontFace : _util.isNodeJS;\n const fontExtraProperties = src.fontExtraProperties === true;\n const enableXfa = src.enableXfa === true;\n const ownerDocument = src.ownerDocument || globalThis.document;\n const disableRange = src.disableRange === true;\n const disableStream = src.disableStream === true;\n const disableAutoFetch = src.disableAutoFetch === true;\n const pdfBug = src.pdfBug === true;\n const length = rangeTransport ? rangeTransport.length : src.length ?? NaN;\n const useSystemFonts = typeof src.useSystemFonts === \"boolean\" ? src.useSystemFonts : !_util.isNodeJS && !disableFontFace;\n const useWorkerFetch = typeof src.useWorkerFetch === \"boolean\" ? src.useWorkerFetch : CMapReaderFactory === _display_utils.DOMCMapReaderFactory && StandardFontDataFactory === _display_utils.DOMStandardFontDataFactory && cMapUrl && standardFontDataUrl && (0, _display_utils.isValidFetchUrl)(cMapUrl, document.baseURI) && (0, _display_utils.isValidFetchUrl)(standardFontDataUrl, document.baseURI);\n const canvasFactory = src.canvasFactory || new DefaultCanvasFactory({\n ownerDocument\n });\n const filterFactory = src.filterFactory || new DefaultFilterFactory({\n docId,\n ownerDocument\n });\n const styleElement = null;\n (0, _util.setVerbosityLevel)(verbosity);\n const transportFactory = {\n canvasFactory,\n filterFactory\n };\n if (!useWorkerFetch) {\n transportFactory.cMapReaderFactory = new CMapReaderFactory({\n baseUrl: cMapUrl,\n isCompressed: cMapPacked\n });\n transportFactory.standardFontDataFactory = new StandardFontDataFactory({\n baseUrl: standardFontDataUrl\n });\n }\n if (!worker) {\n const workerParams = {\n verbosity,\n port: _worker_options.GlobalWorkerOptions.workerPort\n };\n worker = workerParams.port ? PDFWorker.fromPort(workerParams) : new PDFWorker(workerParams);\n task._worker = worker;\n }\n const fetchDocParams = {\n docId,\n apiVersion: '3.11.174',\n data,\n password,\n disableAutoFetch,\n rangeChunkSize,\n length,\n docBaseUrl,\n enableXfa,\n evaluatorOptions: {\n maxImageSize,\n disableFontFace,\n ignoreErrors,\n isEvalSupported,\n isOffscreenCanvasSupported,\n canvasMaxAreaInBytes,\n fontExtraProperties,\n useSystemFonts,\n cMapUrl: useWorkerFetch ? cMapUrl : null,\n standardFontDataUrl: useWorkerFetch ? standardFontDataUrl : null\n }\n };\n const transportParams = {\n ignoreErrors,\n isEvalSupported,\n disableFontFace,\n fontExtraProperties,\n enableXfa,\n ownerDocument,\n disableAutoFetch,\n pdfBug,\n styleElement\n };\n worker.promise.then(function () {\n if (task.destroyed) {\n throw new Error(\"Loading aborted\");\n }\n const workerIdPromise = _fetchDocument(worker, fetchDocParams);\n const networkStreamPromise = new Promise(function (resolve) {\n let networkStream;\n if (rangeTransport) {\n networkStream = new _transport_stream.PDFDataTransportStream({\n length,\n initialData: rangeTransport.initialData,\n progressiveDone: rangeTransport.progressiveDone,\n contentDispositionFilename: rangeTransport.contentDispositionFilename,\n disableRange,\n disableStream\n }, rangeTransport);\n } else if (!data) {\n const createPDFNetworkStream = params => {\n if (_util.isNodeJS) {\n return new _displayNode_stream.PDFNodeStream(params);\n }\n return (0, _display_utils.isValidFetchUrl)(params.url) ? new _displayFetch_stream.PDFFetchStream(params) : new _displayNetwork.PDFNetworkStream(params);\n };\n networkStream = createPDFNetworkStream({\n url,\n length,\n httpHeaders,\n withCredentials,\n rangeChunkSize,\n disableRange,\n disableStream\n });\n }\n resolve(networkStream);\n });\n return Promise.all([workerIdPromise, networkStreamPromise]).then(function ([workerId, networkStream]) {\n if (task.destroyed) {\n throw new Error(\"Loading aborted\");\n }\n const messageHandler = new _message_handler.MessageHandler(docId, workerId, worker.port);\n const transport = new WorkerTransport(messageHandler, task, networkStream, transportParams, transportFactory);\n task._transport = transport;\n messageHandler.send(\"Ready\", null);\n });\n }).catch(task._capability.reject);\n return task;\n}\nasync function _fetchDocument(worker, source) {\n if (worker.destroyed) {\n throw new Error(\"Worker was destroyed\");\n }\n const workerId = await worker.messageHandler.sendWithPromise(\"GetDocRequest\", source, source.data ? [source.data.buffer] : null);\n if (worker.destroyed) {\n throw new Error(\"Worker was destroyed\");\n }\n return workerId;\n}\nfunction getUrlProp(val) {\n if (val instanceof URL) {\n return val.href;\n }\n try {\n return new URL(val, window.location).href;\n } catch {\n if (_util.isNodeJS && typeof val === \"string\") {\n return val;\n }\n }\n throw new Error(\"Invalid PDF url data: \" + \"either string or URL-object is expected in the url property.\");\n}\nfunction getDataProp(val) {\n if (_util.isNodeJS && typeof Buffer !== \"undefined\" && val instanceof Buffer) {\n throw new Error(\"Please provide binary data as `Uint8Array`, rather than `Buffer`.\");\n }\n if (val instanceof Uint8Array && val.byteLength === val.buffer.byteLength) {\n return val;\n }\n if (typeof val === \"string\") {\n return (0, _util.stringToBytes)(val);\n }\n if (typeof val === \"object\" && !isNaN(val?.length) || (0, _util.isArrayBuffer)(val)) {\n return new Uint8Array(val);\n }\n throw new Error(\"Invalid PDF binary data: either TypedArray, \" + \"string, or array-like object is expected in the data property.\");\n}\nclass PDFDocumentLoadingTask {\n static #docId = 0;\n constructor() {\n this._capability = new _util.PromiseCapability();\n this._transport = null;\n this._worker = null;\n this.docId = `d${PDFDocumentLoadingTask.#docId++}`;\n this.destroyed = false;\n this.onPassword = null;\n this.onProgress = null;\n }\n get promise() {\n return this._capability.promise;\n }\n async destroy() {\n this.destroyed = true;\n try {\n if (this._worker?.port) {\n this._worker._pendingDestroy = true;\n }\n await this._transport?.destroy();\n } catch (ex) {\n if (this._worker?.port) {\n delete this._worker._pendingDestroy;\n }\n throw ex;\n }\n this._transport = null;\n if (this._worker) {\n this._worker.destroy();\n this._worker = null;\n }\n }\n}\nexports.PDFDocumentLoadingTask = PDFDocumentLoadingTask;\nclass PDFDataRangeTransport {\n constructor(length, initialData, progressiveDone = false, contentDispositionFilename = null) {\n this.length = length;\n this.initialData = initialData;\n this.progressiveDone = progressiveDone;\n this.contentDispositionFilename = contentDispositionFilename;\n this._rangeListeners = [];\n this._progressListeners = [];\n this._progressiveReadListeners = [];\n this._progressiveDoneListeners = [];\n this._readyCapability = new _util.PromiseCapability();\n }\n addRangeListener(listener) {\n this._rangeListeners.push(listener);\n }\n addProgressListener(listener) {\n this._progressListeners.push(listener);\n }\n addProgressiveReadListener(listener) {\n this._progressiveReadListeners.push(listener);\n }\n addProgressiveDoneListener(listener) {\n this._progressiveDoneListeners.push(listener);\n }\n onDataRange(begin, chunk) {\n for (const listener of this._rangeListeners) {\n listener(begin, chunk);\n }\n }\n onDataProgress(loaded, total) {\n this._readyCapability.promise.then(() => {\n for (const listener of this._progressListeners) {\n listener(loaded, total);\n }\n });\n }\n onDataProgressiveRead(chunk) {\n this._readyCapability.promise.then(() => {\n for (const listener of this._progressiveReadListeners) {\n listener(chunk);\n }\n });\n }\n onDataProgressiveDone() {\n this._readyCapability.promise.then(() => {\n for (const listener of this._progressiveDoneListeners) {\n listener();\n }\n });\n }\n transportReady() {\n this._readyCapability.resolve();\n }\n requestDataRange(begin, end) {\n (0, _util.unreachable)(\"Abstract method PDFDataRangeTransport.requestDataRange\");\n }\n abort() {}\n}\nexports.PDFDataRangeTransport = PDFDataRangeTransport;\nclass PDFDocumentProxy {\n constructor(pdfInfo, transport) {\n this._pdfInfo = pdfInfo;\n this._transport = transport;\n Object.defineProperty(this, \"getJavaScript\", {\n value: () => {\n (0, _display_utils.deprecated)(\"`PDFDocumentProxy.getJavaScript`, \" + \"please use `PDFDocumentProxy.getJSActions` instead.\");\n return this.getJSActions().then(js => {\n if (!js) {\n return js;\n }\n const jsArr = [];\n for (const name in js) {\n jsArr.push(...js[name]);\n }\n return jsArr;\n });\n }\n });\n }\n get annotationStorage() {\n return this._transport.annotationStorage;\n }\n get filterFactory() {\n return this._transport.filterFactory;\n }\n get numPages() {\n return this._pdfInfo.numPages;\n }\n get fingerprints() {\n return this._pdfInfo.fingerprints;\n }\n get isPureXfa() {\n return (0, _util.shadow)(this, \"isPureXfa\", !!this._transport._htmlForXfa);\n }\n get allXfaHtml() {\n return this._transport._htmlForXfa;\n }\n getPage(pageNumber) {\n return this._transport.getPage(pageNumber);\n }\n getPageIndex(ref) {\n return this._transport.getPageIndex(ref);\n }\n getDestinations() {\n return this._transport.getDestinations();\n }\n getDestination(id) {\n return this._transport.getDestination(id);\n }\n getPageLabels() {\n return this._transport.getPageLabels();\n }\n getPageLayout() {\n return this._transport.getPageLayout();\n }\n getPageMode() {\n return this._transport.getPageMode();\n }\n getViewerPreferences() {\n return this._transport.getViewerPreferences();\n }\n getOpenAction() {\n return this._transport.getOpenAction();\n }\n getAttachments() {\n return this._transport.getAttachments();\n }\n getJSActions() {\n return this._transport.getDocJSActions();\n }\n getOutline() {\n return this._transport.getOutline();\n }\n getOptionalContentConfig() {\n return this._transport.getOptionalContentConfig();\n }\n getPermissions() {\n return this._transport.getPermissions();\n }\n getMetadata() {\n return this._transport.getMetadata();\n }\n getMarkInfo() {\n return this._transport.getMarkInfo();\n }\n getData() {\n return this._transport.getData();\n }\n saveDocument() {\n return this._transport.saveDocument();\n }\n getDownloadInfo() {\n return this._transport.downloadInfoCapability.promise;\n }\n cleanup(keepLoadedFonts = false) {\n return this._transport.startCleanup(keepLoadedFonts || this.isPureXfa);\n }\n destroy() {\n return this.loadingTask.destroy();\n }\n get loadingParams() {\n return this._transport.loadingParams;\n }\n get loadingTask() {\n return this._transport.loadingTask;\n }\n getFieldObjects() {\n return this._transport.getFieldObjects();\n }\n hasJSActions() {\n return this._transport.hasJSActions();\n }\n getCalculationOrderIds() {\n return this._transport.getCalculationOrderIds();\n }\n}\nexports.PDFDocumentProxy = PDFDocumentProxy;\nclass PDFPageProxy {\n #delayedCleanupTimeout = null;\n #pendingCleanup = false;\n constructor(pageIndex, pageInfo, transport, pdfBug = false) {\n this._pageIndex = pageIndex;\n this._pageInfo = pageInfo;\n this._transport = transport;\n this._stats = pdfBug ? new _display_utils.StatTimer() : null;\n this._pdfBug = pdfBug;\n this.commonObjs = transport.commonObjs;\n this.objs = new PDFObjects();\n this._maybeCleanupAfterRender = false;\n this._intentStates = new Map();\n this.destroyed = false;\n }\n get pageNumber() {\n return this._pageIndex + 1;\n }\n get rotate() {\n return this._pageInfo.rotate;\n }\n get ref() {\n return this._pageInfo.ref;\n }\n get userUnit() {\n return this._pageInfo.userUnit;\n }\n get view() {\n return this._pageInfo.view;\n }\n getViewport({\n scale,\n rotation = this.rotate,\n offsetX = 0,\n offsetY = 0,\n dontFlip = false\n } = {}) {\n return new _display_utils.PageViewport({\n viewBox: this.view,\n scale,\n rotation,\n offsetX,\n offsetY,\n dontFlip\n });\n }\n getAnnotations({\n intent = \"display\"\n } = {}) {\n const intentArgs = this._transport.getRenderingIntent(intent);\n return this._transport.getAnnotations(this._pageIndex, intentArgs.renderingIntent);\n }\n getJSActions() {\n return this._transport.getPageJSActions(this._pageIndex);\n }\n get filterFactory() {\n return this._transport.filterFactory;\n }\n get isPureXfa() {\n return (0, _util.shadow)(this, \"isPureXfa\", !!this._transport._htmlForXfa);\n }\n async getXfa() {\n return this._transport._htmlForXfa?.children[this._pageIndex] || null;\n }\n render({\n canvasContext,\n viewport,\n intent = \"display\",\n annotationMode = _util.AnnotationMode.ENABLE,\n transform = null,\n background = null,\n optionalContentConfigPromise = null,\n annotationCanvasMap = null,\n pageColors = null,\n printAnnotationStorage = null\n }) {\n this._stats?.time(\"Overall\");\n const intentArgs = this._transport.getRenderingIntent(intent, annotationMode, printAnnotationStorage);\n this.#pendingCleanup = false;\n this.#abortDelayedCleanup();\n if (!optionalContentConfigPromise) {\n optionalContentConfigPromise = this._transport.getOptionalContentConfig();\n }\n let intentState = this._intentStates.get(intentArgs.cacheKey);\n if (!intentState) {\n intentState = Object.create(null);\n this._intentStates.set(intentArgs.cacheKey, intentState);\n }\n if (intentState.streamReaderCancelTimeout) {\n clearTimeout(intentState.streamReaderCancelTimeout);\n intentState.streamReaderCancelTimeout = null;\n }\n const intentPrint = !!(intentArgs.renderingIntent & _util.RenderingIntentFlag.PRINT);\n if (!intentState.displayReadyCapability) {\n intentState.displayReadyCapability = new _util.PromiseCapability();\n intentState.operatorList = {\n fnArray: [],\n argsArray: [],\n lastChunk: false,\n separateAnnots: null\n };\n this._stats?.time(\"Page Request\");\n this._pumpOperatorList(intentArgs);\n }\n const complete = error => {\n intentState.renderTasks.delete(internalRenderTask);\n if (this._maybeCleanupAfterRender || intentPrint) {\n this.#pendingCleanup = true;\n }\n this.#tryCleanup(!intentPrint);\n if (error) {\n internalRenderTask.capability.reject(error);\n this._abortOperatorList({\n intentState,\n reason: error instanceof Error ? error : new Error(error)\n });\n } else {\n internalRenderTask.capability.resolve();\n }\n this._stats?.timeEnd(\"Rendering\");\n this._stats?.timeEnd(\"Overall\");\n };\n const internalRenderTask = new InternalRenderTask({\n callback: complete,\n params: {\n canvasContext,\n viewport,\n transform,\n background\n },\n objs: this.objs,\n commonObjs: this.commonObjs,\n annotationCanvasMap,\n operatorList: intentState.operatorList,\n pageIndex: this._pageIndex,\n canvasFactory: this._transport.canvasFactory,\n filterFactory: this._transport.filterFactory,\n useRequestAnimationFrame: !intentPrint,\n pdfBug: this._pdfBug,\n pageColors\n });\n (intentState.renderTasks ||= new Set()).add(internalRenderTask);\n const renderTask = internalRenderTask.task;\n Promise.all([intentState.displayReadyCapability.promise, optionalContentConfigPromise]).then(([transparency, optionalContentConfig]) => {\n if (this.destroyed) {\n complete();\n return;\n }\n this._stats?.time(\"Rendering\");\n internalRenderTask.initializeGraphics({\n transparency,\n optionalContentConfig\n });\n internalRenderTask.operatorListChanged();\n }).catch(complete);\n return renderTask;\n }\n getOperatorList({\n intent = \"display\",\n annotationMode = _util.AnnotationMode.ENABLE,\n printAnnotationStorage = null\n } = {}) {\n function operatorListChanged() {\n if (intentState.operatorList.lastChunk) {\n intentState.opListReadCapability.resolve(intentState.operatorList);\n intentState.renderTasks.delete(opListTask);\n }\n }\n const intentArgs = this._transport.getRenderingIntent(intent, annotationMode, printAnnotationStorage, true);\n let intentState = this._intentStates.get(intentArgs.cacheKey);\n if (!intentState) {\n intentState = Object.create(null);\n this._intentStates.set(intentArgs.cacheKey, intentState);\n }\n let opListTask;\n if (!intentState.opListReadCapability) {\n opListTask = Object.create(null);\n opListTask.operatorListChanged = operatorListChanged;\n intentState.opListReadCapability = new _util.PromiseCapability();\n (intentState.renderTasks ||= new Set()).add(opListTask);\n intentState.operatorList = {\n fnArray: [],\n argsArray: [],\n lastChunk: false,\n separateAnnots: null\n };\n this._stats?.time(\"Page Request\");\n this._pumpOperatorList(intentArgs);\n }\n return intentState.opListReadCapability.promise;\n }\n streamTextContent({\n includeMarkedContent = false,\n disableNormalization = false\n } = {}) {\n const TEXT_CONTENT_CHUNK_SIZE = 100;\n return this._transport.messageHandler.sendWithStream(\"GetTextContent\", {\n pageIndex: this._pageIndex,\n includeMarkedContent: includeMarkedContent === true,\n disableNormalization: disableNormalization === true\n }, {\n highWaterMark: TEXT_CONTENT_CHUNK_SIZE,\n size(textContent) {\n return textContent.items.length;\n }\n });\n }\n getTextContent(params = {}) {\n if (this._transport._htmlForXfa) {\n return this.getXfa().then(xfa => {\n return _xfa_text.XfaText.textContent(xfa);\n });\n }\n const readableStream = this.streamTextContent(params);\n return new Promise(function (resolve, reject) {\n function pump() {\n reader.read().then(function ({\n value,\n done\n }) {\n if (done) {\n resolve(textContent);\n return;\n }\n Object.assign(textContent.styles, value.styles);\n textContent.items.push(...value.items);\n pump();\n }, reject);\n }\n const reader = readableStream.getReader();\n const textContent = {\n items: [],\n styles: Object.create(null)\n };\n pump();\n });\n }\n getStructTree() {\n return this._transport.getStructTree(this._pageIndex);\n }\n _destroy() {\n this.destroyed = true;\n const waitOn = [];\n for (const intentState of this._intentStates.values()) {\n this._abortOperatorList({\n intentState,\n reason: new Error(\"Page was destroyed.\"),\n force: true\n });\n if (intentState.opListReadCapability) {\n continue;\n }\n for (const internalRenderTask of intentState.renderTasks) {\n waitOn.push(internalRenderTask.completed);\n internalRenderTask.cancel();\n }\n }\n this.objs.clear();\n this.#pendingCleanup = false;\n this.#abortDelayedCleanup();\n return Promise.all(waitOn);\n }\n cleanup(resetStats = false) {\n this.#pendingCleanup = true;\n const success = this.#tryCleanup(false);\n if (resetStats && success) {\n this._stats &&= new _display_utils.StatTimer();\n }\n return success;\n }\n #tryCleanup(delayed = false) {\n this.#abortDelayedCleanup();\n if (!this.#pendingCleanup || this.destroyed) {\n return false;\n }\n if (delayed) {\n this.#delayedCleanupTimeout = setTimeout(() => {\n this.#delayedCleanupTimeout = null;\n this.#tryCleanup(false);\n }, DELAYED_CLEANUP_TIMEOUT);\n return false;\n }\n for (const {\n renderTasks,\n operatorList\n } of this._intentStates.values()) {\n if (renderTasks.size > 0 || !operatorList.lastChunk) {\n return false;\n }\n }\n this._intentStates.clear();\n this.objs.clear();\n this.#pendingCleanup = false;\n return true;\n }\n #abortDelayedCleanup() {\n if (this.#delayedCleanupTimeout) {\n clearTimeout(this.#delayedCleanupTimeout);\n this.#delayedCleanupTimeout = null;\n }\n }\n _startRenderPage(transparency, cacheKey) {\n const intentState = this._intentStates.get(cacheKey);\n if (!intentState) {\n return;\n }\n this._stats?.timeEnd(\"Page Request\");\n intentState.displayReadyCapability?.resolve(transparency);\n }\n _renderPageChunk(operatorListChunk, intentState) {\n for (let i = 0, ii = operatorListChunk.length; i < ii; i++) {\n intentState.operatorList.fnArray.push(operatorListChunk.fnArray[i]);\n intentState.operatorList.argsArray.push(operatorListChunk.argsArray[i]);\n }\n intentState.operatorList.lastChunk = operatorListChunk.lastChunk;\n intentState.operatorList.separateAnnots = operatorListChunk.separateAnnots;\n for (const internalRenderTask of intentState.renderTasks) {\n internalRenderTask.operatorListChanged();\n }\n if (operatorListChunk.lastChunk) {\n this.#tryCleanup(true);\n }\n }\n _pumpOperatorList({\n renderingIntent,\n cacheKey,\n annotationStorageSerializable\n }) {\n const {\n map,\n transfers\n } = annotationStorageSerializable;\n const readableStream = this._transport.messageHandler.sendWithStream(\"GetOperatorList\", {\n pageIndex: this._pageIndex,\n intent: renderingIntent,\n cacheKey,\n annotationStorage: map\n }, transfers);\n const reader = readableStream.getReader();\n const intentState = this._intentStates.get(cacheKey);\n intentState.streamReader = reader;\n const pump = () => {\n reader.read().then(({\n value,\n done\n }) => {\n if (done) {\n intentState.streamReader = null;\n return;\n }\n if (this._transport.destroyed) {\n return;\n }\n this._renderPageChunk(value, intentState);\n pump();\n }, reason => {\n intentState.streamReader = null;\n if (this._transport.destroyed) {\n return;\n }\n if (intentState.operatorList) {\n intentState.operatorList.lastChunk = true;\n for (const internalRenderTask of intentState.renderTasks) {\n internalRenderTask.operatorListChanged();\n }\n this.#tryCleanup(true);\n }\n if (intentState.displayReadyCapability) {\n intentState.displayReadyCapability.reject(reason);\n } else if (intentState.opListReadCapability) {\n intentState.opListReadCapability.reject(reason);\n } else {\n throw reason;\n }\n });\n };\n pump();\n }\n _abortOperatorList({\n intentState,\n reason,\n force = false\n }) {\n if (!intentState.streamReader) {\n return;\n }\n if (intentState.streamReaderCancelTimeout) {\n clearTimeout(intentState.streamReaderCancelTimeout);\n intentState.streamReaderCancelTimeout = null;\n }\n if (!force) {\n if (intentState.renderTasks.size > 0) {\n return;\n }\n if (reason instanceof _display_utils.RenderingCancelledException) {\n let delay = RENDERING_CANCELLED_TIMEOUT;\n if (reason.extraDelay > 0 && reason.extraDelay < 1000) {\n delay += reason.extraDelay;\n }\n intentState.streamReaderCancelTimeout = setTimeout(() => {\n intentState.streamReaderCancelTimeout = null;\n this._abortOperatorList({\n intentState,\n reason,\n force: true\n });\n }, delay);\n return;\n }\n }\n intentState.streamReader.cancel(new _util.AbortException(reason.message)).catch(() => {});\n intentState.streamReader = null;\n if (this._transport.destroyed) {\n return;\n }\n for (const [curCacheKey, curIntentState] of this._intentStates) {\n if (curIntentState === intentState) {\n this._intentStates.delete(curCacheKey);\n break;\n }\n }\n this.cleanup();\n }\n get stats() {\n return this._stats;\n }\n}\nexports.PDFPageProxy = PDFPageProxy;\nclass LoopbackPort {\n #listeners = new Set();\n #deferred = Promise.resolve();\n postMessage(obj, transfer) {\n const event = {\n data: structuredClone(obj, transfer ? {\n transfer\n } : null)\n };\n this.#deferred.then(() => {\n for (const listener of this.#listeners) {\n listener.call(this, event);\n }\n });\n }\n addEventListener(name, listener) {\n this.#listeners.add(listener);\n }\n removeEventListener(name, listener) {\n this.#listeners.delete(listener);\n }\n terminate() {\n this.#listeners.clear();\n }\n}\nexports.LoopbackPort = LoopbackPort;\nconst PDFWorkerUtil = {\n isWorkerDisabled: false,\n fallbackWorkerSrc: null,\n fakeWorkerId: 0\n};\nexports.PDFWorkerUtil = PDFWorkerUtil;\n{\n if (_util.isNodeJS && typeof require === \"function\") {\n PDFWorkerUtil.isWorkerDisabled = true;\n PDFWorkerUtil.fallbackWorkerSrc = \"./pdf.worker.js\";\n } else if (typeof document === \"object\") {\n const pdfjsFilePath = document?.currentScript?.src;\n if (pdfjsFilePath) {\n PDFWorkerUtil.fallbackWorkerSrc = pdfjsFilePath.replace(/(\\.(?:min\\.)?js)(\\?.*)?$/i, \".worker$1$2\");\n }\n }\n PDFWorkerUtil.isSameOrigin = function (baseUrl, otherUrl) {\n let base;\n try {\n base = new URL(baseUrl);\n if (!base.origin || base.origin === \"null\") {\n return false;\n }\n } catch {\n return false;\n }\n const other = new URL(otherUrl, base);\n return base.origin === other.origin;\n };\n PDFWorkerUtil.createCDNWrapper = function (url) {\n const wrapper = `importScripts(\"${url}\");`;\n return URL.createObjectURL(new Blob([wrapper]));\n };\n}\nclass PDFWorker {\n static #workerPorts;\n constructor({\n name = null,\n port = null,\n verbosity = (0, _util.getVerbosityLevel)()\n } = {}) {\n this.name = name;\n this.destroyed = false;\n this.verbosity = verbosity;\n this._readyCapability = new _util.PromiseCapability();\n this._port = null;\n this._webWorker = null;\n this._messageHandler = null;\n if (port) {\n if (PDFWorker.#workerPorts?.has(port)) {\n throw new Error(\"Cannot use more than one PDFWorker per port.\");\n }\n (PDFWorker.#workerPorts ||= new WeakMap()).set(port, this);\n this._initializeFromPort(port);\n return;\n }\n this._initialize();\n }\n get promise() {\n return this._readyCapability.promise;\n }\n get port() {\n return this._port;\n }\n get messageHandler() {\n return this._messageHandler;\n }\n _initializeFromPort(port) {\n this._port = port;\n this._messageHandler = new _message_handler.MessageHandler(\"main\", \"worker\", port);\n this._messageHandler.on(\"ready\", function () {});\n this._readyCapability.resolve();\n this._messageHandler.send(\"configure\", {\n verbosity: this.verbosity\n });\n }\n _initialize() {\n if (!PDFWorkerUtil.isWorkerDisabled && !PDFWorker._mainThreadWorkerMessageHandler) {\n let {\n workerSrc\n } = PDFWorker;\n try {\n if (!PDFWorkerUtil.isSameOrigin(window.location.href, workerSrc)) {\n workerSrc = PDFWorkerUtil.createCDNWrapper(new URL(workerSrc, window.location).href);\n }\n const worker = new Worker(workerSrc);\n const messageHandler = new _message_handler.MessageHandler(\"main\", \"worker\", worker);\n const terminateEarly = () => {\n worker.removeEventListener(\"error\", onWorkerError);\n messageHandler.destroy();\n worker.terminate();\n if (this.destroyed) {\n this._readyCapability.reject(new Error(\"Worker was destroyed\"));\n } else {\n this._setupFakeWorker();\n }\n };\n const onWorkerError = () => {\n if (!this._webWorker) {\n terminateEarly();\n }\n };\n worker.addEventListener(\"error\", onWorkerError);\n messageHandler.on(\"test\", data => {\n worker.removeEventListener(\"error\", onWorkerError);\n if (this.destroyed) {\n terminateEarly();\n return;\n }\n if (data) {\n this._messageHandler = messageHandler;\n this._port = worker;\n this._webWorker = worker;\n this._readyCapability.resolve();\n messageHandler.send(\"configure\", {\n verbosity: this.verbosity\n });\n } else {\n this._setupFakeWorker();\n messageHandler.destroy();\n worker.terminate();\n }\n });\n messageHandler.on(\"ready\", data => {\n worker.removeEventListener(\"error\", onWorkerError);\n if (this.destroyed) {\n terminateEarly();\n return;\n }\n try {\n sendTest();\n } catch {\n this._setupFakeWorker();\n }\n });\n const sendTest = () => {\n const testObj = new Uint8Array();\n messageHandler.send(\"test\", testObj, [testObj.buffer]);\n };\n sendTest();\n return;\n } catch {\n (0, _util.info)(\"The worker has been disabled.\");\n }\n }\n this._setupFakeWorker();\n }\n _setupFakeWorker() {\n if (!PDFWorkerUtil.isWorkerDisabled) {\n (0, _util.warn)(\"Setting up fake worker.\");\n PDFWorkerUtil.isWorkerDisabled = true;\n }\n PDFWorker._setupFakeWorkerGlobal.then(WorkerMessageHandler => {\n if (this.destroyed) {\n this._readyCapability.reject(new Error(\"Worker was destroyed\"));\n return;\n }\n const port = new LoopbackPort();\n this._port = port;\n const id = `fake${PDFWorkerUtil.fakeWorkerId++}`;\n const workerHandler = new _message_handler.MessageHandler(id + \"_worker\", id, port);\n WorkerMessageHandler.setup(workerHandler, port);\n const messageHandler = new _message_handler.MessageHandler(id, id + \"_worker\", port);\n this._messageHandler = messageHandler;\n this._readyCapability.resolve();\n messageHandler.send(\"configure\", {\n verbosity: this.verbosity\n });\n }).catch(reason => {\n this._readyCapability.reject(new Error(`Setting up fake worker failed: \"${reason.message}\".`));\n });\n }\n destroy() {\n this.destroyed = true;\n if (this._webWorker) {\n this._webWorker.terminate();\n this._webWorker = null;\n }\n PDFWorker.#workerPorts?.delete(this._port);\n this._port = null;\n if (this._messageHandler) {\n this._messageHandler.destroy();\n this._messageHandler = null;\n }\n }\n static fromPort(params) {\n if (!params?.port) {\n throw new Error(\"PDFWorker.fromPort - invalid method signature.\");\n }\n const cachedPort = this.#workerPorts?.get(params.port);\n if (cachedPort) {\n if (cachedPort._pendingDestroy) {\n throw new Error(\"PDFWorker.fromPort - the worker is being destroyed.\\n\" + \"Please remember to await `PDFDocumentLoadingTask.destroy()`-calls.\");\n }\n return cachedPort;\n }\n return new PDFWorker(params);\n }\n static get workerSrc() {\n if (_worker_options.GlobalWorkerOptions.workerSrc) {\n return _worker_options.GlobalWorkerOptions.workerSrc;\n }\n if (PDFWorkerUtil.fallbackWorkerSrc !== null) {\n if (!_util.isNodeJS) {\n (0, _display_utils.deprecated)('No \"GlobalWorkerOptions.workerSrc\" specified.');\n }\n return PDFWorkerUtil.fallbackWorkerSrc;\n }\n throw new Error('No \"GlobalWorkerOptions.workerSrc\" specified.');\n }\n static get _mainThreadWorkerMessageHandler() {\n try {\n return globalThis.pdfjsWorker?.WorkerMessageHandler || null;\n } catch {\n return null;\n }\n }\n static get _setupFakeWorkerGlobal() {\n const loader = async () => {\n const mainWorkerMessageHandler = this._mainThreadWorkerMessageHandler;\n if (mainWorkerMessageHandler) {\n return mainWorkerMessageHandler;\n }\n if (_util.isNodeJS && typeof require === \"function\") {\n const worker = eval(\"require\")(this.workerSrc);\n return worker.WorkerMessageHandler;\n }\n await (0, _display_utils.loadScript)(this.workerSrc);\n return window.pdfjsWorker.WorkerMessageHandler;\n };\n return (0, _util.shadow)(this, \"_setupFakeWorkerGlobal\", loader());\n }\n}\nexports.PDFWorker = PDFWorker;\nclass WorkerTransport {\n #methodPromises = new Map();\n #pageCache = new Map();\n #pagePromises = new Map();\n #passwordCapability = null;\n constructor(messageHandler, loadingTask, networkStream, params, factory) {\n this.messageHandler = messageHandler;\n this.loadingTask = loadingTask;\n this.commonObjs = new PDFObjects();\n this.fontLoader = new _font_loader.FontLoader({\n ownerDocument: params.ownerDocument,\n styleElement: params.styleElement\n });\n this._params = params;\n this.canvasFactory = factory.canvasFactory;\n this.filterFactory = factory.filterFactory;\n this.cMapReaderFactory = factory.cMapReaderFactory;\n this.standardFontDataFactory = factory.standardFontDataFactory;\n this.destroyed = false;\n this.destroyCapability = null;\n this._networkStream = networkStream;\n this._fullReader = null;\n this._lastProgress = null;\n this.downloadInfoCapability = new _util.PromiseCapability();\n this.setupMessageHandler();\n }\n #cacheSimpleMethod(name, data = null) {\n const cachedPromise = this.#methodPromises.get(name);\n if (cachedPromise) {\n return cachedPromise;\n }\n const promise = this.messageHandler.sendWithPromise(name, data);\n this.#methodPromises.set(name, promise);\n return promise;\n }\n get annotationStorage() {\n return (0, _util.shadow)(this, \"annotationStorage\", new _annotation_storage.AnnotationStorage());\n }\n getRenderingIntent(intent, annotationMode = _util.AnnotationMode.ENABLE, printAnnotationStorage = null, isOpList = false) {\n let renderingIntent = _util.RenderingIntentFlag.DISPLAY;\n let annotationStorageSerializable = _annotation_storage.SerializableEmpty;\n switch (intent) {\n case \"any\":\n renderingIntent = _util.RenderingIntentFlag.ANY;\n break;\n case \"display\":\n break;\n case \"print\":\n renderingIntent = _util.RenderingIntentFlag.PRINT;\n break;\n default:\n (0, _util.warn)(`getRenderingIntent - invalid intent: ${intent}`);\n }\n switch (annotationMode) {\n case _util.AnnotationMode.DISABLE:\n renderingIntent += _util.RenderingIntentFlag.ANNOTATIONS_DISABLE;\n break;\n case _util.AnnotationMode.ENABLE:\n break;\n case _util.AnnotationMode.ENABLE_FORMS:\n renderingIntent += _util.RenderingIntentFlag.ANNOTATIONS_FORMS;\n break;\n case _util.AnnotationMode.ENABLE_STORAGE:\n renderingIntent += _util.RenderingIntentFlag.ANNOTATIONS_STORAGE;\n const annotationStorage = renderingIntent & _util.RenderingIntentFlag.PRINT && printAnnotationStorage instanceof _annotation_storage.PrintAnnotationStorage ? printAnnotationStorage : this.annotationStorage;\n annotationStorageSerializable = annotationStorage.serializable;\n break;\n default:\n (0, _util.warn)(`getRenderingIntent - invalid annotationMode: ${annotationMode}`);\n }\n if (isOpList) {\n renderingIntent += _util.RenderingIntentFlag.OPLIST;\n }\n return {\n renderingIntent,\n cacheKey: `${renderingIntent}_${annotationStorageSerializable.hash}`,\n annotationStorageSerializable\n };\n }\n destroy() {\n if (this.destroyCapability) {\n return this.destroyCapability.promise;\n }\n this.destroyed = true;\n this.destroyCapability = new _util.PromiseCapability();\n this.#passwordCapability?.reject(new Error(\"Worker was destroyed during onPassword callback\"));\n const waitOn = [];\n for (const page of this.#pageCache.values()) {\n waitOn.push(page._destroy());\n }\n this.#pageCache.clear();\n this.#pagePromises.clear();\n if (this.hasOwnProperty(\"annotationStorage\")) {\n this.annotationStorage.resetModified();\n }\n const terminated = this.messageHandler.sendWithPromise(\"Terminate\", null);\n waitOn.push(terminated);\n Promise.all(waitOn).then(() => {\n this.commonObjs.clear();\n this.fontLoader.clear();\n this.#methodPromises.clear();\n this.filterFactory.destroy();\n this._networkStream?.cancelAllRequests(new _util.AbortException(\"Worker was terminated.\"));\n if (this.messageHandler) {\n this.messageHandler.destroy();\n this.messageHandler = null;\n }\n this.destroyCapability.resolve();\n }, this.destroyCapability.reject);\n return this.destroyCapability.promise;\n }\n setupMessageHandler() {\n const {\n messageHandler,\n loadingTask\n } = this;\n messageHandler.on(\"GetReader\", (data, sink) => {\n (0, _util.assert)(this._networkStream, \"GetReader - no `IPDFStream` instance available.\");\n this._fullReader = this._networkStream.getFullReader();\n this._fullReader.onProgress = evt => {\n this._lastProgress = {\n loaded: evt.loaded,\n total: evt.total\n };\n };\n sink.onPull = () => {\n this._fullReader.read().then(function ({\n value,\n done\n }) {\n if (done) {\n sink.close();\n return;\n }\n (0, _util.assert)(value instanceof ArrayBuffer, \"GetReader - expected an ArrayBuffer.\");\n sink.enqueue(new Uint8Array(value), 1, [value]);\n }).catch(reason => {\n sink.error(reason);\n });\n };\n sink.onCancel = reason => {\n this._fullReader.cancel(reason);\n sink.ready.catch(readyReason => {\n if (this.destroyed) {\n return;\n }\n throw readyReason;\n });\n };\n });\n messageHandler.on(\"ReaderHeadersReady\", data => {\n const headersCapability = new _util.PromiseCapability();\n const fullReader = this._fullReader;\n fullReader.headersReady.then(() => {\n if (!fullReader.isStreamingSupported || !fullReader.isRangeSupported) {\n if (this._lastProgress) {\n loadingTask.onProgress?.(this._lastProgress);\n }\n fullReader.onProgress = evt => {\n loadingTask.onProgress?.({\n loaded: evt.loaded,\n total: evt.total\n });\n };\n }\n headersCapability.resolve({\n isStreamingSupported: fullReader.isStreamingSupported,\n isRangeSupported: fullReader.isRangeSupported,\n contentLength: fullReader.contentLength\n });\n }, headersCapability.reject);\n return headersCapability.promise;\n });\n messageHandler.on(\"GetRangeReader\", (data, sink) => {\n (0, _util.assert)(this._networkStream, \"GetRangeReader - no `IPDFStream` instance available.\");\n const rangeReader = this._networkStream.getRangeReader(data.begin, data.end);\n if (!rangeReader) {\n sink.close();\n return;\n }\n sink.onPull = () => {\n rangeReader.read().then(function ({\n value,\n done\n }) {\n if (done) {\n sink.close();\n return;\n }\n (0, _util.assert)(value instanceof ArrayBuffer, \"GetRangeReader - expected an ArrayBuffer.\");\n sink.enqueue(new Uint8Array(value), 1, [value]);\n }).catch(reason => {\n sink.error(reason);\n });\n };\n sink.onCancel = reason => {\n rangeReader.cancel(reason);\n sink.ready.catch(readyReason => {\n if (this.destroyed) {\n return;\n }\n throw readyReason;\n });\n };\n });\n messageHandler.on(\"GetDoc\", ({\n pdfInfo\n }) => {\n this._numPages = pdfInfo.numPages;\n this._htmlForXfa = pdfInfo.htmlForXfa;\n delete pdfInfo.htmlForXfa;\n loadingTask._capability.resolve(new PDFDocumentProxy(pdfInfo, this));\n });\n messageHandler.on(\"DocException\", function (ex) {\n let reason;\n switch (ex.name) {\n case \"PasswordException\":\n reason = new _util.PasswordException(ex.message, ex.code);\n break;\n case \"InvalidPDFException\":\n reason = new _util.InvalidPDFException(ex.message);\n break;\n case \"MissingPDFException\":\n reason = new _util.MissingPDFException(ex.message);\n break;\n case \"UnexpectedResponseException\":\n reason = new _util.UnexpectedResponseException(ex.message, ex.status);\n break;\n case \"UnknownErrorException\":\n reason = new _util.UnknownErrorException(ex.message, ex.details);\n break;\n default:\n (0, _util.unreachable)(\"DocException - expected a valid Error.\");\n }\n loadingTask._capability.reject(reason);\n });\n messageHandler.on(\"PasswordRequest\", exception => {\n this.#passwordCapability = new _util.PromiseCapability();\n if (loadingTask.onPassword) {\n const updatePassword = password => {\n if (password instanceof Error) {\n this.#passwordCapability.reject(password);\n } else {\n this.#passwordCapability.resolve({\n password\n });\n }\n };\n try {\n loadingTask.onPassword(updatePassword, exception.code);\n } catch (ex) {\n this.#passwordCapability.reject(ex);\n }\n } else {\n this.#passwordCapability.reject(new _util.PasswordException(exception.message, exception.code));\n }\n return this.#passwordCapability.promise;\n });\n messageHandler.on(\"DataLoaded\", data => {\n loadingTask.onProgress?.({\n loaded: data.length,\n total: data.length\n });\n this.downloadInfoCapability.resolve(data);\n });\n messageHandler.on(\"StartRenderPage\", data => {\n if (this.destroyed) {\n return;\n }\n const page = this.#pageCache.get(data.pageIndex);\n page._startRenderPage(data.transparency, data.cacheKey);\n });\n messageHandler.on(\"commonobj\", ([id, type, exportedData]) => {\n if (this.destroyed) {\n return;\n }\n if (this.commonObjs.has(id)) {\n return;\n }\n switch (type) {\n case \"Font\":\n const params = this._params;\n if (\"error\" in exportedData) {\n const exportedError = exportedData.error;\n (0, _util.warn)(`Error during font loading: ${exportedError}`);\n this.commonObjs.resolve(id, exportedError);\n break;\n }\n const inspectFont = params.pdfBug && globalThis.FontInspector?.enabled ? (font, url) => globalThis.FontInspector.fontAdded(font, url) : null;\n const font = new _font_loader.FontFaceObject(exportedData, {\n isEvalSupported: params.isEvalSupported,\n disableFontFace: params.disableFontFace,\n ignoreErrors: params.ignoreErrors,\n inspectFont\n });\n this.fontLoader.bind(font).catch(reason => {\n return messageHandler.sendWithPromise(\"FontFallback\", {\n id\n });\n }).finally(() => {\n if (!params.fontExtraProperties && font.data) {\n font.data = null;\n }\n this.commonObjs.resolve(id, font);\n });\n break;\n case \"FontPath\":\n case \"Image\":\n case \"Pattern\":\n this.commonObjs.resolve(id, exportedData);\n break;\n default:\n throw new Error(`Got unknown common object type ${type}`);\n }\n });\n messageHandler.on(\"obj\", ([id, pageIndex, type, imageData]) => {\n if (this.destroyed) {\n return;\n }\n const pageProxy = this.#pageCache.get(pageIndex);\n if (pageProxy.objs.has(id)) {\n return;\n }\n switch (type) {\n case \"Image\":\n pageProxy.objs.resolve(id, imageData);\n if (imageData) {\n let length;\n if (imageData.bitmap) {\n const {\n width,\n height\n } = imageData;\n length = width * height * 4;\n } else {\n length = imageData.data?.length || 0;\n }\n if (length > _util.MAX_IMAGE_SIZE_TO_CACHE) {\n pageProxy._maybeCleanupAfterRender = true;\n }\n }\n break;\n case \"Pattern\":\n pageProxy.objs.resolve(id, imageData);\n break;\n default:\n throw new Error(`Got unknown object type ${type}`);\n }\n });\n messageHandler.on(\"DocProgress\", data => {\n if (this.destroyed) {\n return;\n }\n loadingTask.onProgress?.({\n loaded: data.loaded,\n total: data.total\n });\n });\n messageHandler.on(\"FetchBuiltInCMap\", data => {\n if (this.destroyed) {\n return Promise.reject(new Error(\"Worker was destroyed.\"));\n }\n if (!this.cMapReaderFactory) {\n return Promise.reject(new Error(\"CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.\"));\n }\n return this.cMapReaderFactory.fetch(data);\n });\n messageHandler.on(\"FetchStandardFontData\", data => {\n if (this.destroyed) {\n return Promise.reject(new Error(\"Worker was destroyed.\"));\n }\n if (!this.standardFontDataFactory) {\n return Promise.reject(new Error(\"StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.\"));\n }\n return this.standardFontDataFactory.fetch(data);\n });\n }\n getData() {\n return this.messageHandler.sendWithPromise(\"GetData\", null);\n }\n saveDocument() {\n if (this.annotationStorage.size <= 0) {\n (0, _util.warn)(\"saveDocument called while `annotationStorage` is empty, \" + \"please use the getData-method instead.\");\n }\n const {\n map,\n transfers\n } = this.annotationStorage.serializable;\n return this.messageHandler.sendWithPromise(\"SaveDocument\", {\n isPureXfa: !!this._htmlForXfa,\n numPages: this._numPages,\n annotationStorage: map,\n filename: this._fullReader?.filename ?? null\n }, transfers).finally(() => {\n this.annotationStorage.resetModified();\n });\n }\n getPage(pageNumber) {\n if (!Number.isInteger(pageNumber) || pageNumber <= 0 || pageNumber > this._numPages) {\n return Promise.reject(new Error(\"Invalid page request.\"));\n }\n const pageIndex = pageNumber - 1,\n cachedPromise = this.#pagePromises.get(pageIndex);\n if (cachedPromise) {\n return cachedPromise;\n }\n const promise = this.messageHandler.sendWithPromise(\"GetPage\", {\n pageIndex\n }).then(pageInfo => {\n if (this.destroyed) {\n throw new Error(\"Transport destroyed\");\n }\n const page = new PDFPageProxy(pageIndex, pageInfo, this, this._params.pdfBug);\n this.#pageCache.set(pageIndex, page);\n return page;\n });\n this.#pagePromises.set(pageIndex, promise);\n return promise;\n }\n getPageIndex(ref) {\n if (typeof ref !== \"object\" || ref === null || !Number.isInteger(ref.num) || ref.num < 0 || !Number.isInteger(ref.gen) || ref.gen < 0) {\n return Promise.reject(new Error(\"Invalid pageIndex request.\"));\n }\n return this.messageHandler.sendWithPromise(\"GetPageIndex\", {\n num: ref.num,\n gen: ref.gen\n });\n }\n getAnnotations(pageIndex, intent) {\n return this.messageHandler.sendWithPromise(\"GetAnnotations\", {\n pageIndex,\n intent\n });\n }\n getFieldObjects() {\n return this.#cacheSimpleMethod(\"GetFieldObjects\");\n }\n hasJSActions() {\n return this.#cacheSimpleMethod(\"HasJSActions\");\n }\n getCalculationOrderIds() {\n return this.messageHandler.sendWithPromise(\"GetCalculationOrderIds\", null);\n }\n getDestinations() {\n return this.messageHandler.sendWithPromise(\"GetDestinations\", null);\n }\n getDestination(id) {\n if (typeof id !== \"string\") {\n return Promise.reject(new Error(\"Invalid destination request.\"));\n }\n return this.messageHandler.sendWithPromise(\"GetDestination\", {\n id\n });\n }\n getPageLabels() {\n return this.messageHandler.sendWithPromise(\"GetPageLabels\", null);\n }\n getPageLayout() {\n return this.messageHandler.sendWithPromise(\"GetPageLayout\", null);\n }\n getPageMode() {\n return this.messageHandler.sendWithPromise(\"GetPageMode\", null);\n }\n getViewerPreferences() {\n return this.messageHandler.sendWithPromise(\"GetViewerPreferences\", null);\n }\n getOpenAction() {\n return this.messageHandler.sendWithPromise(\"GetOpenAction\", null);\n }\n getAttachments() {\n return this.messageHandler.sendWithPromise(\"GetAttachments\", null);\n }\n getDocJSActions() {\n return this.#cacheSimpleMethod(\"GetDocJSActions\");\n }\n getPageJSActions(pageIndex) {\n return this.messageHandler.sendWithPromise(\"GetPageJSActions\", {\n pageIndex\n });\n }\n getStructTree(pageIndex) {\n return this.messageHandler.sendWithPromise(\"GetStructTree\", {\n pageIndex\n });\n }\n getOutline() {\n return this.messageHandler.sendWithPromise(\"GetOutline\", null);\n }\n getOptionalContentConfig() {\n return this.messageHandler.sendWithPromise(\"GetOptionalContentConfig\", null).then(results => {\n return new _optional_content_config.OptionalContentConfig(results);\n });\n }\n getPermissions() {\n return this.messageHandler.sendWithPromise(\"GetPermissions\", null);\n }\n getMetadata() {\n const name = \"GetMetadata\",\n cachedPromise = this.#methodPromises.get(name);\n if (cachedPromise) {\n return cachedPromise;\n }\n const promise = this.messageHandler.sendWithPromise(name, null).then(results => {\n return {\n info: results[0],\n metadata: results[1] ? new _metadata.Metadata(results[1]) : null,\n contentDispositionFilename: this._fullReader?.filename ?? null,\n contentLength: this._fullReader?.contentLength ?? null\n };\n });\n this.#methodPromises.set(name, promise);\n return promise;\n }\n getMarkInfo() {\n return this.messageHandler.sendWithPromise(\"GetMarkInfo\", null);\n }\n async startCleanup(keepLoadedFonts = false) {\n if (this.destroyed) {\n return;\n }\n await this.messageHandler.sendWithPromise(\"Cleanup\", null);\n for (const page of this.#pageCache.values()) {\n const cleanupSuccessful = page.cleanup();\n if (!cleanupSuccessful) {\n throw new Error(`startCleanup: Page ${page.pageNumber} is currently rendering.`);\n }\n }\n this.commonObjs.clear();\n if (!keepLoadedFonts) {\n this.fontLoader.clear();\n }\n this.#methodPromises.clear();\n this.filterFactory.destroy(true);\n }\n get loadingParams() {\n const {\n disableAutoFetch,\n enableXfa\n } = this._params;\n return (0, _util.shadow)(this, \"loadingParams\", {\n disableAutoFetch,\n enableXfa\n });\n }\n}\nclass PDFObjects {\n #objs = Object.create(null);\n #ensureObj(objId) {\n return this.#objs[objId] ||= {\n capability: new _util.PromiseCapability(),\n data: null\n };\n }\n get(objId, callback = null) {\n if (callback) {\n const obj = this.#ensureObj(objId);\n obj.capability.promise.then(() => callback(obj.data));\n return null;\n }\n const obj = this.#objs[objId];\n if (!obj?.capability.settled) {\n throw new Error(`Requesting object that isn't resolved yet ${objId}.`);\n }\n return obj.data;\n }\n has(objId) {\n const obj = this.#objs[objId];\n return obj?.capability.settled || false;\n }\n resolve(objId, data = null) {\n const obj = this.#ensureObj(objId);\n obj.data = data;\n obj.capability.resolve();\n }\n clear() {\n for (const objId in this.#objs) {\n const {\n data\n } = this.#objs[objId];\n data?.bitmap?.close();\n }\n this.#objs = Object.create(null);\n }\n}\nclass RenderTask {\n #internalRenderTask = null;\n constructor(internalRenderTask) {\n this.#internalRenderTask = internalRenderTask;\n this.onContinue = null;\n }\n get promise() {\n return this.#internalRenderTask.capability.promise;\n }\n cancel(extraDelay = 0) {\n this.#internalRenderTask.cancel(null, extraDelay);\n }\n get separateAnnots() {\n const {\n separateAnnots\n } = this.#internalRenderTask.operatorList;\n if (!separateAnnots) {\n return false;\n }\n const {\n annotationCanvasMap\n } = this.#internalRenderTask;\n return separateAnnots.form || separateAnnots.canvas && annotationCanvasMap?.size > 0;\n }\n}\nexports.RenderTask = RenderTask;\nclass InternalRenderTask {\n static #canvasInUse = new WeakSet();\n constructor({\n callback,\n params,\n objs,\n commonObjs,\n annotationCanvasMap,\n operatorList,\n pageIndex,\n canvasFactory,\n filterFactory,\n useRequestAnimationFrame = false,\n pdfBug = false,\n pageColors = null\n }) {\n this.callback = callback;\n this.params = params;\n this.objs = objs;\n this.commonObjs = commonObjs;\n this.annotationCanvasMap = annotationCanvasMap;\n this.operatorListIdx = null;\n this.operatorList = operatorList;\n this._pageIndex = pageIndex;\n this.canvasFactory = canvasFactory;\n this.filterFactory = filterFactory;\n this._pdfBug = pdfBug;\n this.pageColors = pageColors;\n this.running = false;\n this.graphicsReadyCallback = null;\n this.graphicsReady = false;\n this._useRequestAnimationFrame = useRequestAnimationFrame === true && typeof window !== \"undefined\";\n this.cancelled = false;\n this.capability = new _util.PromiseCapability();\n this.task = new RenderTask(this);\n this._cancelBound = this.cancel.bind(this);\n this._continueBound = this._continue.bind(this);\n this._scheduleNextBound = this._scheduleNext.bind(this);\n this._nextBound = this._next.bind(this);\n this._canvas = params.canvasContext.canvas;\n }\n get completed() {\n return this.capability.promise.catch(function () {});\n }\n initializeGraphics({\n transparency = false,\n optionalContentConfig\n }) {\n if (this.cancelled) {\n return;\n }\n if (this._canvas) {\n if (InternalRenderTask.#canvasInUse.has(this._canvas)) {\n throw new Error(\"Cannot use the same canvas during multiple render() operations. \" + \"Use different canvas or ensure previous operations were \" + \"cancelled or completed.\");\n }\n InternalRenderTask.#canvasInUse.add(this._canvas);\n }\n if (this._pdfBug && globalThis.StepperManager?.enabled) {\n this.stepper = globalThis.StepperManager.create(this._pageIndex);\n this.stepper.init(this.operatorList);\n this.stepper.nextBreakPoint = this.stepper.getNextBreakPoint();\n }\n const {\n canvasContext,\n viewport,\n transform,\n background\n } = this.params;\n this.gfx = new _canvas.CanvasGraphics(canvasContext, this.commonObjs, this.objs, this.canvasFactory, this.filterFactory, {\n optionalContentConfig\n }, this.annotationCanvasMap, this.pageColors);\n this.gfx.beginDrawing({\n transform,\n viewport,\n transparency,\n background\n });\n this.operatorListIdx = 0;\n this.graphicsReady = true;\n this.graphicsReadyCallback?.();\n }\n cancel(error = null, extraDelay = 0) {\n this.running = false;\n this.cancelled = true;\n this.gfx?.endDrawing();\n InternalRenderTask.#canvasInUse.delete(this._canvas);\n this.callback(error || new _display_utils.RenderingCancelledException(`Rendering cancelled, page ${this._pageIndex + 1}`, extraDelay));\n }\n operatorListChanged() {\n if (!this.graphicsReady) {\n this.graphicsReadyCallback ||= this._continueBound;\n return;\n }\n this.stepper?.updateOperatorList(this.operatorList);\n if (this.running) {\n return;\n }\n this._continue();\n }\n _continue() {\n this.running = true;\n if (this.cancelled) {\n return;\n }\n if (this.task.onContinue) {\n this.task.onContinue(this._scheduleNextBound);\n } else {\n this._scheduleNext();\n }\n }\n _scheduleNext() {\n if (this._useRequestAnimationFrame) {\n window.requestAnimationFrame(() => {\n this._nextBound().catch(this._cancelBound);\n });\n } else {\n Promise.resolve().then(this._nextBound).catch(this._cancelBound);\n }\n }\n async _next() {\n if (this.cancelled) {\n return;\n }\n this.operatorListIdx = this.gfx.executeOperatorList(this.operatorList, this.operatorListIdx, this._continueBound, this.stepper);\n if (this.operatorListIdx === this.operatorList.argsArray.length) {\n this.running = false;\n if (this.operatorList.lastChunk) {\n this.gfx.endDrawing();\n InternalRenderTask.#canvasInUse.delete(this._canvas);\n this.callback();\n }\n }\n }\n}\nconst version = '3.11.174';\nexports.version = version;\nconst build = 'ce8716743';\nexports.build = build;\n\n/***/ }),\n/* 3 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.SerializableEmpty = exports.PrintAnnotationStorage = exports.AnnotationStorage = void 0;\nvar _util = __w_pdfjs_require__(1);\nvar _editor = __w_pdfjs_require__(4);\nvar _murmurhash = __w_pdfjs_require__(8);\nconst SerializableEmpty = Object.freeze({\n map: null,\n hash: \"\",\n transfers: undefined\n});\nexports.SerializableEmpty = SerializableEmpty;\nclass AnnotationStorage {\n #modified = false;\n #storage = new Map();\n constructor() {\n this.onSetModified = null;\n this.onResetModified = null;\n this.onAnnotationEditor = null;\n }\n getValue(key, defaultValue) {\n const value = this.#storage.get(key);\n if (value === undefined) {\n return defaultValue;\n }\n return Object.assign(defaultValue, value);\n }\n getRawValue(key) {\n return this.#storage.get(key);\n }\n remove(key) {\n this.#storage.delete(key);\n if (this.#storage.size === 0) {\n this.resetModified();\n }\n if (typeof this.onAnnotationEditor === \"function\") {\n for (const value of this.#storage.values()) {\n if (value instanceof _editor.AnnotationEditor) {\n return;\n }\n }\n this.onAnnotationEditor(null);\n }\n }\n setValue(key, value) {\n const obj = this.#storage.get(key);\n let modified = false;\n if (obj !== undefined) {\n for (const [entry, val] of Object.entries(value)) {\n if (obj[entry] !== val) {\n modified = true;\n obj[entry] = val;\n }\n }\n } else {\n modified = true;\n this.#storage.set(key, value);\n }\n if (modified) {\n this.#setModified();\n }\n if (value instanceof _editor.AnnotationEditor && typeof this.onAnnotationEditor === \"function\") {\n this.onAnnotationEditor(value.constructor._type);\n }\n }\n has(key) {\n return this.#storage.has(key);\n }\n getAll() {\n return this.#storage.size > 0 ? (0, _util.objectFromMap)(this.#storage) : null;\n }\n setAll(obj) {\n for (const [key, val] of Object.entries(obj)) {\n this.setValue(key, val);\n }\n }\n get size() {\n return this.#storage.size;\n }\n #setModified() {\n if (!this.#modified) {\n this.#modified = true;\n if (typeof this.onSetModified === \"function\") {\n this.onSetModified();\n }\n }\n }\n resetModified() {\n if (this.#modified) {\n this.#modified = false;\n if (typeof this.onResetModified === \"function\") {\n this.onResetModified();\n }\n }\n }\n get print() {\n return new PrintAnnotationStorage(this);\n }\n get serializable() {\n if (this.#storage.size === 0) {\n return SerializableEmpty;\n }\n const map = new Map(),\n hash = new _murmurhash.MurmurHash3_64(),\n transfers = [];\n const context = Object.create(null);\n let hasBitmap = false;\n for (const [key, val] of this.#storage) {\n const serialized = val instanceof _editor.AnnotationEditor ? val.serialize(false, context) : val;\n if (serialized) {\n map.set(key, serialized);\n hash.update(`${key}:${JSON.stringify(serialized)}`);\n hasBitmap ||= !!serialized.bitmap;\n }\n }\n if (hasBitmap) {\n for (const value of map.values()) {\n if (value.bitmap) {\n transfers.push(value.bitmap);\n }\n }\n }\n return map.size > 0 ? {\n map,\n hash: hash.hexdigest(),\n transfers\n } : SerializableEmpty;\n }\n}\nexports.AnnotationStorage = AnnotationStorage;\nclass PrintAnnotationStorage extends AnnotationStorage {\n #serializable;\n constructor(parent) {\n super();\n const {\n map,\n hash,\n transfers\n } = parent.serializable;\n const clone = structuredClone(map, transfers ? {\n transfer: transfers\n } : null);\n this.#serializable = {\n map: clone,\n hash,\n transfers\n };\n }\n get print() {\n (0, _util.unreachable)(\"Should not call PrintAnnotationStorage.print\");\n }\n get serializable() {\n return this.#serializable;\n }\n}\nexports.PrintAnnotationStorage = PrintAnnotationStorage;\n\n/***/ }),\n/* 4 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.AnnotationEditor = void 0;\nvar _tools = __w_pdfjs_require__(5);\nvar _util = __w_pdfjs_require__(1);\nvar _display_utils = __w_pdfjs_require__(6);\nclass AnnotationEditor {\n #altText = \"\";\n #altTextDecorative = false;\n #altTextButton = null;\n #altTextTooltip = null;\n #altTextTooltipTimeout = null;\n #keepAspectRatio = false;\n #resizersDiv = null;\n #boundFocusin = this.focusin.bind(this);\n #boundFocusout = this.focusout.bind(this);\n #hasBeenClicked = false;\n #isEditing = false;\n #isInEditMode = false;\n _initialOptions = Object.create(null);\n _uiManager = null;\n _focusEventsAllowed = true;\n _l10nPromise = null;\n #isDraggable = false;\n #zIndex = AnnotationEditor._zIndex++;\n static _borderLineWidth = -1;\n static _colorManager = new _tools.ColorManager();\n static _zIndex = 1;\n static SMALL_EDITOR_SIZE = 0;\n constructor(parameters) {\n if (this.constructor === AnnotationEditor) {\n (0, _util.unreachable)(\"Cannot initialize AnnotationEditor.\");\n }\n this.parent = parameters.parent;\n this.id = parameters.id;\n this.width = this.height = null;\n this.pageIndex = parameters.parent.pageIndex;\n this.name = parameters.name;\n this.div = null;\n this._uiManager = parameters.uiManager;\n this.annotationElementId = null;\n this._willKeepAspectRatio = false;\n this._initialOptions.isCentered = parameters.isCentered;\n this._structTreeParentId = null;\n const {\n rotation,\n rawDims: {\n pageWidth,\n pageHeight,\n pageX,\n pageY\n }\n } = this.parent.viewport;\n this.rotation = rotation;\n this.pageRotation = (360 + rotation - this._uiManager.viewParameters.rotation) % 360;\n this.pageDimensions = [pageWidth, pageHeight];\n this.pageTranslation = [pageX, pageY];\n const [width, height] = this.parentDimensions;\n this.x = parameters.x / width;\n this.y = parameters.y / height;\n this.isAttachedToDOM = false;\n this.deleted = false;\n }\n get editorType() {\n return Object.getPrototypeOf(this).constructor._type;\n }\n static get _defaultLineColor() {\n return (0, _util.shadow)(this, \"_defaultLineColor\", this._colorManager.getHexCode(\"CanvasText\"));\n }\n static deleteAnnotationElement(editor) {\n const fakeEditor = new FakeEditor({\n id: editor.parent.getNextId(),\n parent: editor.parent,\n uiManager: editor._uiManager\n });\n fakeEditor.annotationElementId = editor.annotationElementId;\n fakeEditor.deleted = true;\n fakeEditor._uiManager.addToAnnotationStorage(fakeEditor);\n }\n static initialize(l10n, options = null) {\n AnnotationEditor._l10nPromise ||= new Map([\"editor_alt_text_button_label\", \"editor_alt_text_edit_button_label\", \"editor_alt_text_decorative_tooltip\"].map(str => [str, l10n.get(str)]));\n if (options?.strings) {\n for (const str of options.strings) {\n AnnotationEditor._l10nPromise.set(str, l10n.get(str));\n }\n }\n if (AnnotationEditor._borderLineWidth !== -1) {\n return;\n }\n const style = getComputedStyle(document.documentElement);\n AnnotationEditor._borderLineWidth = parseFloat(style.getPropertyValue(\"--outline-width\")) || 0;\n }\n static updateDefaultParams(_type, _value) {}\n static get defaultPropertiesToUpdate() {\n return [];\n }\n static isHandlingMimeForPasting(mime) {\n return false;\n }\n static paste(item, parent) {\n (0, _util.unreachable)(\"Not implemented\");\n }\n get propertiesToUpdate() {\n return [];\n }\n get _isDraggable() {\n return this.#isDraggable;\n }\n set _isDraggable(value) {\n this.#isDraggable = value;\n this.div?.classList.toggle(\"draggable\", value);\n }\n center() {\n const [pageWidth, pageHeight] = this.pageDimensions;\n switch (this.parentRotation) {\n case 90:\n this.x -= this.height * pageHeight / (pageWidth * 2);\n this.y += this.width * pageWidth / (pageHeight * 2);\n break;\n case 180:\n this.x += this.width / 2;\n this.y += this.height / 2;\n break;\n case 270:\n this.x += this.height * pageHeight / (pageWidth * 2);\n this.y -= this.width * pageWidth / (pageHeight * 2);\n break;\n default:\n this.x -= this.width / 2;\n this.y -= this.height / 2;\n break;\n }\n this.fixAndSetPosition();\n }\n addCommands(params) {\n this._uiManager.addCommands(params);\n }\n get currentLayer() {\n return this._uiManager.currentLayer;\n }\n setInBackground() {\n this.div.style.zIndex = 0;\n }\n setInForeground() {\n this.div.style.zIndex = this.#zIndex;\n }\n setParent(parent) {\n if (parent !== null) {\n this.pageIndex = parent.pageIndex;\n this.pageDimensions = parent.pageDimensions;\n }\n this.parent = parent;\n }\n focusin(event) {\n if (!this._focusEventsAllowed) {\n return;\n }\n if (!this.#hasBeenClicked) {\n this.parent.setSelected(this);\n } else {\n this.#hasBeenClicked = false;\n }\n }\n focusout(event) {\n if (!this._focusEventsAllowed) {\n return;\n }\n if (!this.isAttachedToDOM) {\n return;\n }\n const target = event.relatedTarget;\n if (target?.closest(`#${this.id}`)) {\n return;\n }\n event.preventDefault();\n if (!this.parent?.isMultipleSelection) {\n this.commitOrRemove();\n }\n }\n commitOrRemove() {\n if (this.isEmpty()) {\n this.remove();\n } else {\n this.commit();\n }\n }\n commit() {\n this.addToAnnotationStorage();\n }\n addToAnnotationStorage() {\n this._uiManager.addToAnnotationStorage(this);\n }\n setAt(x, y, tx, ty) {\n const [width, height] = this.parentDimensions;\n [tx, ty] = this.screenToPageTranslation(tx, ty);\n this.x = (x + tx) / width;\n this.y = (y + ty) / height;\n this.fixAndSetPosition();\n }\n #translate([width, height], x, y) {\n [x, y] = this.screenToPageTranslation(x, y);\n this.x += x / width;\n this.y += y / height;\n this.fixAndSetPosition();\n }\n translate(x, y) {\n this.#translate(this.parentDimensions, x, y);\n }\n translateInPage(x, y) {\n this.#translate(this.pageDimensions, x, y);\n this.div.scrollIntoView({\n block: \"nearest\"\n });\n }\n drag(tx, ty) {\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.x += tx / parentWidth;\n this.y += ty / parentHeight;\n if (this.parent && (this.x < 0 || this.x > 1 || this.y < 0 || this.y > 1)) {\n const {\n x,\n y\n } = this.div.getBoundingClientRect();\n if (this.parent.findNewParent(this, x, y)) {\n this.x -= Math.floor(this.x);\n this.y -= Math.floor(this.y);\n }\n }\n let {\n x,\n y\n } = this;\n const [bx, by] = this.#getBaseTranslation();\n x += bx;\n y += by;\n this.div.style.left = `${(100 * x).toFixed(2)}%`;\n this.div.style.top = `${(100 * y).toFixed(2)}%`;\n this.div.scrollIntoView({\n block: \"nearest\"\n });\n }\n #getBaseTranslation() {\n const [parentWidth, parentHeight] = this.parentDimensions;\n const {\n _borderLineWidth\n } = AnnotationEditor;\n const x = _borderLineWidth / parentWidth;\n const y = _borderLineWidth / parentHeight;\n switch (this.rotation) {\n case 90:\n return [-x, y];\n case 180:\n return [x, y];\n case 270:\n return [x, -y];\n default:\n return [-x, -y];\n }\n }\n fixAndSetPosition() {\n const [pageWidth, pageHeight] = this.pageDimensions;\n let {\n x,\n y,\n width,\n height\n } = this;\n width *= pageWidth;\n height *= pageHeight;\n x *= pageWidth;\n y *= pageHeight;\n switch (this.rotation) {\n case 0:\n x = Math.max(0, Math.min(pageWidth - width, x));\n y = Math.max(0, Math.min(pageHeight - height, y));\n break;\n case 90:\n x = Math.max(0, Math.min(pageWidth - height, x));\n y = Math.min(pageHeight, Math.max(width, y));\n break;\n case 180:\n x = Math.min(pageWidth, Math.max(width, x));\n y = Math.min(pageHeight, Math.max(height, y));\n break;\n case 270:\n x = Math.min(pageWidth, Math.max(height, x));\n y = Math.max(0, Math.min(pageHeight - width, y));\n break;\n }\n this.x = x /= pageWidth;\n this.y = y /= pageHeight;\n const [bx, by] = this.#getBaseTranslation();\n x += bx;\n y += by;\n const {\n style\n } = this.div;\n style.left = `${(100 * x).toFixed(2)}%`;\n style.top = `${(100 * y).toFixed(2)}%`;\n this.moveInDOM();\n }\n static #rotatePoint(x, y, angle) {\n switch (angle) {\n case 90:\n return [y, -x];\n case 180:\n return [-x, -y];\n case 270:\n return [-y, x];\n default:\n return [x, y];\n }\n }\n screenToPageTranslation(x, y) {\n return AnnotationEditor.#rotatePoint(x, y, this.parentRotation);\n }\n pageTranslationToScreen(x, y) {\n return AnnotationEditor.#rotatePoint(x, y, 360 - this.parentRotation);\n }\n #getRotationMatrix(rotation) {\n switch (rotation) {\n case 90:\n {\n const [pageWidth, pageHeight] = this.pageDimensions;\n return [0, -pageWidth / pageHeight, pageHeight / pageWidth, 0];\n }\n case 180:\n return [-1, 0, 0, -1];\n case 270:\n {\n const [pageWidth, pageHeight] = this.pageDimensions;\n return [0, pageWidth / pageHeight, -pageHeight / pageWidth, 0];\n }\n default:\n return [1, 0, 0, 1];\n }\n }\n get parentScale() {\n return this._uiManager.viewParameters.realScale;\n }\n get parentRotation() {\n return (this._uiManager.viewParameters.rotation + this.pageRotation) % 360;\n }\n get parentDimensions() {\n const {\n parentScale,\n pageDimensions: [pageWidth, pageHeight]\n } = this;\n const scaledWidth = pageWidth * parentScale;\n const scaledHeight = pageHeight * parentScale;\n return _util.FeatureTest.isCSSRoundSupported ? [Math.round(scaledWidth), Math.round(scaledHeight)] : [scaledWidth, scaledHeight];\n }\n setDims(width, height) {\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.div.style.width = `${(100 * width / parentWidth).toFixed(2)}%`;\n if (!this.#keepAspectRatio) {\n this.div.style.height = `${(100 * height / parentHeight).toFixed(2)}%`;\n }\n this.#altTextButton?.classList.toggle(\"small\", width < AnnotationEditor.SMALL_EDITOR_SIZE || height < AnnotationEditor.SMALL_EDITOR_SIZE);\n }\n fixDims() {\n const {\n style\n } = this.div;\n const {\n height,\n width\n } = style;\n const widthPercent = width.endsWith(\"%\");\n const heightPercent = !this.#keepAspectRatio && height.endsWith(\"%\");\n if (widthPercent && heightPercent) {\n return;\n }\n const [parentWidth, parentHeight] = this.parentDimensions;\n if (!widthPercent) {\n style.width = `${(100 * parseFloat(width) / parentWidth).toFixed(2)}%`;\n }\n if (!this.#keepAspectRatio && !heightPercent) {\n style.height = `${(100 * parseFloat(height) / parentHeight).toFixed(2)}%`;\n }\n }\n getInitialTranslation() {\n return [0, 0];\n }\n #createResizers() {\n if (this.#resizersDiv) {\n return;\n }\n this.#resizersDiv = document.createElement(\"div\");\n this.#resizersDiv.classList.add(\"resizers\");\n const classes = [\"topLeft\", \"topRight\", \"bottomRight\", \"bottomLeft\"];\n if (!this._willKeepAspectRatio) {\n classes.push(\"topMiddle\", \"middleRight\", \"bottomMiddle\", \"middleLeft\");\n }\n for (const name of classes) {\n const div = document.createElement(\"div\");\n this.#resizersDiv.append(div);\n div.classList.add(\"resizer\", name);\n div.addEventListener(\"pointerdown\", this.#resizerPointerdown.bind(this, name));\n div.addEventListener(\"contextmenu\", _display_utils.noContextMenu);\n }\n this.div.prepend(this.#resizersDiv);\n }\n #resizerPointerdown(name, event) {\n event.preventDefault();\n const {\n isMac\n } = _util.FeatureTest.platform;\n if (event.button !== 0 || event.ctrlKey && isMac) {\n return;\n }\n const boundResizerPointermove = this.#resizerPointermove.bind(this, name);\n const savedDraggable = this._isDraggable;\n this._isDraggable = false;\n const pointerMoveOptions = {\n passive: true,\n capture: true\n };\n window.addEventListener(\"pointermove\", boundResizerPointermove, pointerMoveOptions);\n const savedX = this.x;\n const savedY = this.y;\n const savedWidth = this.width;\n const savedHeight = this.height;\n const savedParentCursor = this.parent.div.style.cursor;\n const savedCursor = this.div.style.cursor;\n this.div.style.cursor = this.parent.div.style.cursor = window.getComputedStyle(event.target).cursor;\n const pointerUpCallback = () => {\n this._isDraggable = savedDraggable;\n window.removeEventListener(\"pointerup\", pointerUpCallback);\n window.removeEventListener(\"blur\", pointerUpCallback);\n window.removeEventListener(\"pointermove\", boundResizerPointermove, pointerMoveOptions);\n this.parent.div.style.cursor = savedParentCursor;\n this.div.style.cursor = savedCursor;\n const newX = this.x;\n const newY = this.y;\n const newWidth = this.width;\n const newHeight = this.height;\n if (newX === savedX && newY === savedY && newWidth === savedWidth && newHeight === savedHeight) {\n return;\n }\n this.addCommands({\n cmd: () => {\n this.width = newWidth;\n this.height = newHeight;\n this.x = newX;\n this.y = newY;\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.setDims(parentWidth * newWidth, parentHeight * newHeight);\n this.fixAndSetPosition();\n },\n undo: () => {\n this.width = savedWidth;\n this.height = savedHeight;\n this.x = savedX;\n this.y = savedY;\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.setDims(parentWidth * savedWidth, parentHeight * savedHeight);\n this.fixAndSetPosition();\n },\n mustExec: true\n });\n };\n window.addEventListener(\"pointerup\", pointerUpCallback);\n window.addEventListener(\"blur\", pointerUpCallback);\n }\n #resizerPointermove(name, event) {\n const [parentWidth, parentHeight] = this.parentDimensions;\n const savedX = this.x;\n const savedY = this.y;\n const savedWidth = this.width;\n const savedHeight = this.height;\n const minWidth = AnnotationEditor.MIN_SIZE / parentWidth;\n const minHeight = AnnotationEditor.MIN_SIZE / parentHeight;\n const round = x => Math.round(x * 10000) / 10000;\n const rotationMatrix = this.#getRotationMatrix(this.rotation);\n const transf = (x, y) => [rotationMatrix[0] * x + rotationMatrix[2] * y, rotationMatrix[1] * x + rotationMatrix[3] * y];\n const invRotationMatrix = this.#getRotationMatrix(360 - this.rotation);\n const invTransf = (x, y) => [invRotationMatrix[0] * x + invRotationMatrix[2] * y, invRotationMatrix[1] * x + invRotationMatrix[3] * y];\n let getPoint;\n let getOpposite;\n let isDiagonal = false;\n let isHorizontal = false;\n switch (name) {\n case \"topLeft\":\n isDiagonal = true;\n getPoint = (w, h) => [0, 0];\n getOpposite = (w, h) => [w, h];\n break;\n case \"topMiddle\":\n getPoint = (w, h) => [w / 2, 0];\n getOpposite = (w, h) => [w / 2, h];\n break;\n case \"topRight\":\n isDiagonal = true;\n getPoint = (w, h) => [w, 0];\n getOpposite = (w, h) => [0, h];\n break;\n case \"middleRight\":\n isHorizontal = true;\n getPoint = (w, h) => [w, h / 2];\n getOpposite = (w, h) => [0, h / 2];\n break;\n case \"bottomRight\":\n isDiagonal = true;\n getPoint = (w, h) => [w, h];\n getOpposite = (w, h) => [0, 0];\n break;\n case \"bottomMiddle\":\n getPoint = (w, h) => [w / 2, h];\n getOpposite = (w, h) => [w / 2, 0];\n break;\n case \"bottomLeft\":\n isDiagonal = true;\n getPoint = (w, h) => [0, h];\n getOpposite = (w, h) => [w, 0];\n break;\n case \"middleLeft\":\n isHorizontal = true;\n getPoint = (w, h) => [0, h / 2];\n getOpposite = (w, h) => [w, h / 2];\n break;\n }\n const point = getPoint(savedWidth, savedHeight);\n const oppositePoint = getOpposite(savedWidth, savedHeight);\n let transfOppositePoint = transf(...oppositePoint);\n const oppositeX = round(savedX + transfOppositePoint[0]);\n const oppositeY = round(savedY + transfOppositePoint[1]);\n let ratioX = 1;\n let ratioY = 1;\n let [deltaX, deltaY] = this.screenToPageTranslation(event.movementX, event.movementY);\n [deltaX, deltaY] = invTransf(deltaX / parentWidth, deltaY / parentHeight);\n if (isDiagonal) {\n const oldDiag = Math.hypot(savedWidth, savedHeight);\n ratioX = ratioY = Math.max(Math.min(Math.hypot(oppositePoint[0] - point[0] - deltaX, oppositePoint[1] - point[1] - deltaY) / oldDiag, 1 / savedWidth, 1 / savedHeight), minWidth / savedWidth, minHeight / savedHeight);\n } else if (isHorizontal) {\n ratioX = Math.max(minWidth, Math.min(1, Math.abs(oppositePoint[0] - point[0] - deltaX))) / savedWidth;\n } else {\n ratioY = Math.max(minHeight, Math.min(1, Math.abs(oppositePoint[1] - point[1] - deltaY))) / savedHeight;\n }\n const newWidth = round(savedWidth * ratioX);\n const newHeight = round(savedHeight * ratioY);\n transfOppositePoint = transf(...getOpposite(newWidth, newHeight));\n const newX = oppositeX - transfOppositePoint[0];\n const newY = oppositeY - transfOppositePoint[1];\n this.width = newWidth;\n this.height = newHeight;\n this.x = newX;\n this.y = newY;\n this.setDims(parentWidth * newWidth, parentHeight * newHeight);\n this.fixAndSetPosition();\n }\n async addAltTextButton() {\n if (this.#altTextButton) {\n return;\n }\n const altText = this.#altTextButton = document.createElement(\"button\");\n altText.className = \"altText\";\n const msg = await AnnotationEditor._l10nPromise.get(\"editor_alt_text_button_label\");\n altText.textContent = msg;\n altText.setAttribute(\"aria-label\", msg);\n altText.tabIndex = \"0\";\n altText.addEventListener(\"contextmenu\", _display_utils.noContextMenu);\n altText.addEventListener(\"pointerdown\", event => event.stopPropagation());\n altText.addEventListener(\"click\", event => {\n event.preventDefault();\n this._uiManager.editAltText(this);\n }, {\n capture: true\n });\n altText.addEventListener(\"keydown\", event => {\n if (event.target === altText && event.key === \"Enter\") {\n event.preventDefault();\n this._uiManager.editAltText(this);\n }\n });\n this.#setAltTextButtonState();\n this.div.append(altText);\n if (!AnnotationEditor.SMALL_EDITOR_SIZE) {\n const PERCENT = 40;\n AnnotationEditor.SMALL_EDITOR_SIZE = Math.min(128, Math.round(altText.getBoundingClientRect().width * (1 + PERCENT / 100)));\n }\n }\n async #setAltTextButtonState() {\n const button = this.#altTextButton;\n if (!button) {\n return;\n }\n if (!this.#altText && !this.#altTextDecorative) {\n button.classList.remove(\"done\");\n this.#altTextTooltip?.remove();\n return;\n }\n AnnotationEditor._l10nPromise.get(\"editor_alt_text_edit_button_label\").then(msg => {\n button.setAttribute(\"aria-label\", msg);\n });\n let tooltip = this.#altTextTooltip;\n if (!tooltip) {\n this.#altTextTooltip = tooltip = document.createElement(\"span\");\n tooltip.className = \"tooltip\";\n tooltip.setAttribute(\"role\", \"tooltip\");\n const id = tooltip.id = `alt-text-tooltip-${this.id}`;\n button.setAttribute(\"aria-describedby\", id);\n const DELAY_TO_SHOW_TOOLTIP = 100;\n button.addEventListener(\"mouseenter\", () => {\n this.#altTextTooltipTimeout = setTimeout(() => {\n this.#altTextTooltipTimeout = null;\n this.#altTextTooltip.classList.add(\"show\");\n this._uiManager._eventBus.dispatch(\"reporttelemetry\", {\n source: this,\n details: {\n type: \"editing\",\n subtype: this.editorType,\n data: {\n action: \"alt_text_tooltip\"\n }\n }\n });\n }, DELAY_TO_SHOW_TOOLTIP);\n });\n button.addEventListener(\"mouseleave\", () => {\n clearTimeout(this.#altTextTooltipTimeout);\n this.#altTextTooltipTimeout = null;\n this.#altTextTooltip?.classList.remove(\"show\");\n });\n }\n button.classList.add(\"done\");\n tooltip.innerText = this.#altTextDecorative ? await AnnotationEditor._l10nPromise.get(\"editor_alt_text_decorative_tooltip\") : this.#altText;\n if (!tooltip.parentNode) {\n button.append(tooltip);\n }\n }\n getClientDimensions() {\n return this.div.getBoundingClientRect();\n }\n get altTextData() {\n return {\n altText: this.#altText,\n decorative: this.#altTextDecorative\n };\n }\n set altTextData({\n altText,\n decorative\n }) {\n if (this.#altText === altText && this.#altTextDecorative === decorative) {\n return;\n }\n this.#altText = altText;\n this.#altTextDecorative = decorative;\n this.#setAltTextButtonState();\n }\n render() {\n this.div = document.createElement(\"div\");\n this.div.setAttribute(\"data-editor-rotation\", (360 - this.rotation) % 360);\n this.div.className = this.name;\n this.div.setAttribute(\"id\", this.id);\n this.div.setAttribute(\"tabIndex\", 0);\n this.setInForeground();\n this.div.addEventListener(\"focusin\", this.#boundFocusin);\n this.div.addEventListener(\"focusout\", this.#boundFocusout);\n const [parentWidth, parentHeight] = this.parentDimensions;\n if (this.parentRotation % 180 !== 0) {\n this.div.style.maxWidth = `${(100 * parentHeight / parentWidth).toFixed(2)}%`;\n this.div.style.maxHeight = `${(100 * parentWidth / parentHeight).toFixed(2)}%`;\n }\n const [tx, ty] = this.getInitialTranslation();\n this.translate(tx, ty);\n (0, _tools.bindEvents)(this, this.div, [\"pointerdown\"]);\n return this.div;\n }\n pointerdown(event) {\n const {\n isMac\n } = _util.FeatureTest.platform;\n if (event.button !== 0 || event.ctrlKey && isMac) {\n event.preventDefault();\n return;\n }\n this.#hasBeenClicked = true;\n this.#setUpDragSession(event);\n }\n #setUpDragSession(event) {\n if (!this._isDraggable) {\n return;\n }\n const isSelected = this._uiManager.isSelected(this);\n this._uiManager.setUpDragSession();\n let pointerMoveOptions, pointerMoveCallback;\n if (isSelected) {\n pointerMoveOptions = {\n passive: true,\n capture: true\n };\n pointerMoveCallback = e => {\n const [tx, ty] = this.screenToPageTranslation(e.movementX, e.movementY);\n this._uiManager.dragSelectedEditors(tx, ty);\n };\n window.addEventListener(\"pointermove\", pointerMoveCallback, pointerMoveOptions);\n }\n const pointerUpCallback = () => {\n window.removeEventListener(\"pointerup\", pointerUpCallback);\n window.removeEventListener(\"blur\", pointerUpCallback);\n if (isSelected) {\n window.removeEventListener(\"pointermove\", pointerMoveCallback, pointerMoveOptions);\n }\n this.#hasBeenClicked = false;\n if (!this._uiManager.endDragSession()) {\n const {\n isMac\n } = _util.FeatureTest.platform;\n if (event.ctrlKey && !isMac || event.shiftKey || event.metaKey && isMac) {\n this.parent.toggleSelected(this);\n } else {\n this.parent.setSelected(this);\n }\n }\n };\n window.addEventListener(\"pointerup\", pointerUpCallback);\n window.addEventListener(\"blur\", pointerUpCallback);\n }\n moveInDOM() {\n this.parent?.moveEditorInDOM(this);\n }\n _setParentAndPosition(parent, x, y) {\n parent.changeParent(this);\n this.x = x;\n this.y = y;\n this.fixAndSetPosition();\n }\n getRect(tx, ty) {\n const scale = this.parentScale;\n const [pageWidth, pageHeight] = this.pageDimensions;\n const [pageX, pageY] = this.pageTranslation;\n const shiftX = tx / scale;\n const shiftY = ty / scale;\n const x = this.x * pageWidth;\n const y = this.y * pageHeight;\n const width = this.width * pageWidth;\n const height = this.height * pageHeight;\n switch (this.rotation) {\n case 0:\n return [x + shiftX + pageX, pageHeight - y - shiftY - height + pageY, x + shiftX + width + pageX, pageHeight - y - shiftY + pageY];\n case 90:\n return [x + shiftY + pageX, pageHeight - y + shiftX + pageY, x + shiftY + height + pageX, pageHeight - y + shiftX + width + pageY];\n case 180:\n return [x - shiftX - width + pageX, pageHeight - y + shiftY + pageY, x - shiftX + pageX, pageHeight - y + shiftY + height + pageY];\n case 270:\n return [x - shiftY - height + pageX, pageHeight - y - shiftX - width + pageY, x - shiftY + pageX, pageHeight - y - shiftX + pageY];\n default:\n throw new Error(\"Invalid rotation\");\n }\n }\n getRectInCurrentCoords(rect, pageHeight) {\n const [x1, y1, x2, y2] = rect;\n const width = x2 - x1;\n const height = y2 - y1;\n switch (this.rotation) {\n case 0:\n return [x1, pageHeight - y2, width, height];\n case 90:\n return [x1, pageHeight - y1, height, width];\n case 180:\n return [x2, pageHeight - y1, width, height];\n case 270:\n return [x2, pageHeight - y2, height, width];\n default:\n throw new Error(\"Invalid rotation\");\n }\n }\n onceAdded() {}\n isEmpty() {\n return false;\n }\n enableEditMode() {\n this.#isInEditMode = true;\n }\n disableEditMode() {\n this.#isInEditMode = false;\n }\n isInEditMode() {\n return this.#isInEditMode;\n }\n shouldGetKeyboardEvents() {\n return false;\n }\n needsToBeRebuilt() {\n return this.div && !this.isAttachedToDOM;\n }\n rebuild() {\n this.div?.addEventListener(\"focusin\", this.#boundFocusin);\n this.div?.addEventListener(\"focusout\", this.#boundFocusout);\n }\n serialize(isForCopying = false, context = null) {\n (0, _util.unreachable)(\"An editor must be serializable\");\n }\n static deserialize(data, parent, uiManager) {\n const editor = new this.prototype.constructor({\n parent,\n id: parent.getNextId(),\n uiManager\n });\n editor.rotation = data.rotation;\n const [pageWidth, pageHeight] = editor.pageDimensions;\n const [x, y, width, height] = editor.getRectInCurrentCoords(data.rect, pageHeight);\n editor.x = x / pageWidth;\n editor.y = y / pageHeight;\n editor.width = width / pageWidth;\n editor.height = height / pageHeight;\n return editor;\n }\n remove() {\n this.div.removeEventListener(\"focusin\", this.#boundFocusin);\n this.div.removeEventListener(\"focusout\", this.#boundFocusout);\n if (!this.isEmpty()) {\n this.commit();\n }\n if (this.parent) {\n this.parent.remove(this);\n } else {\n this._uiManager.removeEditor(this);\n }\n this.#altTextButton?.remove();\n this.#altTextButton = null;\n this.#altTextTooltip = null;\n }\n get isResizable() {\n return false;\n }\n makeResizable() {\n if (this.isResizable) {\n this.#createResizers();\n this.#resizersDiv.classList.remove(\"hidden\");\n }\n }\n select() {\n this.makeResizable();\n this.div?.classList.add(\"selectedEditor\");\n }\n unselect() {\n this.#resizersDiv?.classList.add(\"hidden\");\n this.div?.classList.remove(\"selectedEditor\");\n if (this.div?.contains(document.activeElement)) {\n this._uiManager.currentLayer.div.focus();\n }\n }\n updateParams(type, value) {}\n disableEditing() {\n if (this.#altTextButton) {\n this.#altTextButton.hidden = true;\n }\n }\n enableEditing() {\n if (this.#altTextButton) {\n this.#altTextButton.hidden = false;\n }\n }\n enterInEditMode() {}\n get contentDiv() {\n return this.div;\n }\n get isEditing() {\n return this.#isEditing;\n }\n set isEditing(value) {\n this.#isEditing = value;\n if (!this.parent) {\n return;\n }\n if (value) {\n this.parent.setSelected(this);\n this.parent.setActiveEditor(this);\n } else {\n this.parent.setActiveEditor(null);\n }\n }\n setAspectRatio(width, height) {\n this.#keepAspectRatio = true;\n const aspectRatio = width / height;\n const {\n style\n } = this.div;\n style.aspectRatio = aspectRatio;\n style.height = \"auto\";\n }\n static get MIN_SIZE() {\n return 16;\n }\n}\nexports.AnnotationEditor = AnnotationEditor;\nclass FakeEditor extends AnnotationEditor {\n constructor(params) {\n super(params);\n this.annotationElementId = params.annotationElementId;\n this.deleted = true;\n }\n serialize() {\n return {\n id: this.annotationElementId,\n deleted: true,\n pageIndex: this.pageIndex\n };\n }\n}\n\n/***/ }),\n/* 5 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.KeyboardManager = exports.CommandManager = exports.ColorManager = exports.AnnotationEditorUIManager = void 0;\nexports.bindEvents = bindEvents;\nexports.opacityToHex = opacityToHex;\nvar _util = __w_pdfjs_require__(1);\nvar _display_utils = __w_pdfjs_require__(6);\nfunction bindEvents(obj, element, names) {\n for (const name of names) {\n element.addEventListener(name, obj[name].bind(obj));\n }\n}\nfunction opacityToHex(opacity) {\n return Math.round(Math.min(255, Math.max(1, 255 * opacity))).toString(16).padStart(2, \"0\");\n}\nclass IdManager {\n #id = 0;\n getId() {\n return `${_util.AnnotationEditorPrefix}${this.#id++}`;\n }\n}\nclass ImageManager {\n #baseId = (0, _util.getUuid)();\n #id = 0;\n #cache = null;\n static get _isSVGFittingCanvas() {\n const svg = `data:image/svg+xml;charset=UTF-8,<svg viewBox=\"0 0 1 1\" width=\"1\" height=\"1\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"1\" height=\"1\" style=\"fill:red;\"/></svg>`;\n const canvas = new OffscreenCanvas(1, 3);\n const ctx = canvas.getContext(\"2d\");\n const image = new Image();\n image.src = svg;\n const promise = image.decode().then(() => {\n ctx.drawImage(image, 0, 0, 1, 1, 0, 0, 1, 3);\n return new Uint32Array(ctx.getImageData(0, 0, 1, 1).data.buffer)[0] === 0;\n });\n return (0, _util.shadow)(this, \"_isSVGFittingCanvas\", promise);\n }\n async #get(key, rawData) {\n this.#cache ||= new Map();\n let data = this.#cache.get(key);\n if (data === null) {\n return null;\n }\n if (data?.bitmap) {\n data.refCounter += 1;\n return data;\n }\n try {\n data ||= {\n bitmap: null,\n id: `image_${this.#baseId}_${this.#id++}`,\n refCounter: 0,\n isSvg: false\n };\n let image;\n if (typeof rawData === \"string\") {\n data.url = rawData;\n const response = await fetch(rawData);\n if (!response.ok) {\n throw new Error(response.statusText);\n }\n image = await response.blob();\n } else {\n image = data.file = rawData;\n }\n if (image.type === \"image/svg+xml\") {\n const mustRemoveAspectRatioPromise = ImageManager._isSVGFittingCanvas;\n const fileReader = new FileReader();\n const imageElement = new Image();\n const imagePromise = new Promise((resolve, reject) => {\n imageElement.onload = () => {\n data.bitmap = imageElement;\n data.isSvg = true;\n resolve();\n };\n fileReader.onload = async () => {\n const url = data.svgUrl = fileReader.result;\n imageElement.src = (await mustRemoveAspectRatioPromise) ? `${url}#svgView(preserveAspectRatio(none))` : url;\n };\n imageElement.onerror = fileReader.onerror = reject;\n });\n fileReader.readAsDataURL(image);\n await imagePromise;\n } else {\n data.bitmap = await createImageBitmap(image);\n }\n data.refCounter = 1;\n } catch (e) {\n console.error(e);\n data = null;\n }\n this.#cache.set(key, data);\n if (data) {\n this.#cache.set(data.id, data);\n }\n return data;\n }\n async getFromFile(file) {\n const {\n lastModified,\n name,\n size,\n type\n } = file;\n return this.#get(`${lastModified}_${name}_${size}_${type}`, file);\n }\n async getFromUrl(url) {\n return this.#get(url, url);\n }\n async getFromId(id) {\n this.#cache ||= new Map();\n const data = this.#cache.get(id);\n if (!data) {\n return null;\n }\n if (data.bitmap) {\n data.refCounter += 1;\n return data;\n }\n if (data.file) {\n return this.getFromFile(data.file);\n }\n return this.getFromUrl(data.url);\n }\n getSvgUrl(id) {\n const data = this.#cache.get(id);\n if (!data?.isSvg) {\n return null;\n }\n return data.svgUrl;\n }\n deleteId(id) {\n this.#cache ||= new Map();\n const data = this.#cache.get(id);\n if (!data) {\n return;\n }\n data.refCounter -= 1;\n if (data.refCounter !== 0) {\n return;\n }\n data.bitmap = null;\n }\n isValidId(id) {\n return id.startsWith(`image_${this.#baseId}_`);\n }\n}\nclass CommandManager {\n #commands = [];\n #locked = false;\n #maxSize;\n #position = -1;\n constructor(maxSize = 128) {\n this.#maxSize = maxSize;\n }\n add({\n cmd,\n undo,\n mustExec,\n type = NaN,\n overwriteIfSameType = false,\n keepUndo = false\n }) {\n if (mustExec) {\n cmd();\n }\n if (this.#locked) {\n return;\n }\n const save = {\n cmd,\n undo,\n type\n };\n if (this.#position === -1) {\n if (this.#commands.length > 0) {\n this.#commands.length = 0;\n }\n this.#position = 0;\n this.#commands.push(save);\n return;\n }\n if (overwriteIfSameType && this.#commands[this.#position].type === type) {\n if (keepUndo) {\n save.undo = this.#commands[this.#position].undo;\n }\n this.#commands[this.#position] = save;\n return;\n }\n const next = this.#position + 1;\n if (next === this.#maxSize) {\n this.#commands.splice(0, 1);\n } else {\n this.#position = next;\n if (next < this.#commands.length) {\n this.#commands.splice(next);\n }\n }\n this.#commands.push(save);\n }\n undo() {\n if (this.#position === -1) {\n return;\n }\n this.#locked = true;\n this.#commands[this.#position].undo();\n this.#locked = false;\n this.#position -= 1;\n }\n redo() {\n if (this.#position < this.#commands.length - 1) {\n this.#position += 1;\n this.#locked = true;\n this.#commands[this.#position].cmd();\n this.#locked = false;\n }\n }\n hasSomethingToUndo() {\n return this.#position !== -1;\n }\n hasSomethingToRedo() {\n return this.#position < this.#commands.length - 1;\n }\n destroy() {\n this.#commands = null;\n }\n}\nexports.CommandManager = CommandManager;\nclass KeyboardManager {\n constructor(callbacks) {\n this.buffer = [];\n this.callbacks = new Map();\n this.allKeys = new Set();\n const {\n isMac\n } = _util.FeatureTest.platform;\n for (const [keys, callback, options = {}] of callbacks) {\n for (const key of keys) {\n const isMacKey = key.startsWith(\"mac+\");\n if (isMac && isMacKey) {\n this.callbacks.set(key.slice(4), {\n callback,\n options\n });\n this.allKeys.add(key.split(\"+\").at(-1));\n } else if (!isMac && !isMacKey) {\n this.callbacks.set(key, {\n callback,\n options\n });\n this.allKeys.add(key.split(\"+\").at(-1));\n }\n }\n }\n }\n #serialize(event) {\n if (event.altKey) {\n this.buffer.push(\"alt\");\n }\n if (event.ctrlKey) {\n this.buffer.push(\"ctrl\");\n }\n if (event.metaKey) {\n this.buffer.push(\"meta\");\n }\n if (event.shiftKey) {\n this.buffer.push(\"shift\");\n }\n this.buffer.push(event.key);\n const str = this.buffer.join(\"+\");\n this.buffer.length = 0;\n return str;\n }\n exec(self, event) {\n if (!this.allKeys.has(event.key)) {\n return;\n }\n const info = this.callbacks.get(this.#serialize(event));\n if (!info) {\n return;\n }\n const {\n callback,\n options: {\n bubbles = false,\n args = [],\n checker = null\n }\n } = info;\n if (checker && !checker(self, event)) {\n return;\n }\n callback.bind(self, ...args)();\n if (!bubbles) {\n event.stopPropagation();\n event.preventDefault();\n }\n }\n}\nexports.KeyboardManager = KeyboardManager;\nclass ColorManager {\n static _colorsMapping = new Map([[\"CanvasText\", [0, 0, 0]], [\"Canvas\", [255, 255, 255]]]);\n get _colors() {\n const colors = new Map([[\"CanvasText\", null], [\"Canvas\", null]]);\n (0, _display_utils.getColorValues)(colors);\n return (0, _util.shadow)(this, \"_colors\", colors);\n }\n convert(color) {\n const rgb = (0, _display_utils.getRGB)(color);\n if (!window.matchMedia(\"(forced-colors: active)\").matches) {\n return rgb;\n }\n for (const [name, RGB] of this._colors) {\n if (RGB.every((x, i) => x === rgb[i])) {\n return ColorManager._colorsMapping.get(name);\n }\n }\n return rgb;\n }\n getHexCode(name) {\n const rgb = this._colors.get(name);\n if (!rgb) {\n return name;\n }\n return _util.Util.makeHexColor(...rgb);\n }\n}\nexports.ColorManager = ColorManager;\nclass AnnotationEditorUIManager {\n #activeEditor = null;\n #allEditors = new Map();\n #allLayers = new Map();\n #altTextManager = null;\n #annotationStorage = null;\n #commandManager = new CommandManager();\n #currentPageIndex = 0;\n #deletedAnnotationsElementIds = new Set();\n #draggingEditors = null;\n #editorTypes = null;\n #editorsToRescale = new Set();\n #filterFactory = null;\n #idManager = new IdManager();\n #isEnabled = false;\n #isWaiting = false;\n #lastActiveElement = null;\n #mode = _util.AnnotationEditorType.NONE;\n #selectedEditors = new Set();\n #pageColors = null;\n #boundBlur = this.blur.bind(this);\n #boundFocus = this.focus.bind(this);\n #boundCopy = this.copy.bind(this);\n #boundCut = this.cut.bind(this);\n #boundPaste = this.paste.bind(this);\n #boundKeydown = this.keydown.bind(this);\n #boundOnEditingAction = this.onEditingAction.bind(this);\n #boundOnPageChanging = this.onPageChanging.bind(this);\n #boundOnScaleChanging = this.onScaleChanging.bind(this);\n #boundOnRotationChanging = this.onRotationChanging.bind(this);\n #previousStates = {\n isEditing: false,\n isEmpty: true,\n hasSomethingToUndo: false,\n hasSomethingToRedo: false,\n hasSelectedEditor: false\n };\n #translation = [0, 0];\n #translationTimeoutId = null;\n #container = null;\n #viewer = null;\n static TRANSLATE_SMALL = 1;\n static TRANSLATE_BIG = 10;\n static get _keyboardManager() {\n const proto = AnnotationEditorUIManager.prototype;\n const arrowChecker = self => {\n const {\n activeElement\n } = document;\n return activeElement && self.#container.contains(activeElement) && self.hasSomethingToControl();\n };\n const small = this.TRANSLATE_SMALL;\n const big = this.TRANSLATE_BIG;\n return (0, _util.shadow)(this, \"_keyboardManager\", new KeyboardManager([[[\"ctrl+a\", \"mac+meta+a\"], proto.selectAll], [[\"ctrl+z\", \"mac+meta+z\"], proto.undo], [[\"ctrl+y\", \"ctrl+shift+z\", \"mac+meta+shift+z\", \"ctrl+shift+Z\", \"mac+meta+shift+Z\"], proto.redo], [[\"Backspace\", \"alt+Backspace\", \"ctrl+Backspace\", \"shift+Backspace\", \"mac+Backspace\", \"mac+alt+Backspace\", \"mac+ctrl+Backspace\", \"Delete\", \"ctrl+Delete\", \"shift+Delete\", \"mac+Delete\"], proto.delete], [[\"Escape\", \"mac+Escape\"], proto.unselectAll], [[\"ArrowLeft\", \"mac+ArrowLeft\"], proto.translateSelectedEditors, {\n args: [-small, 0],\n checker: arrowChecker\n }], [[\"ctrl+ArrowLeft\", \"mac+shift+ArrowLeft\"], proto.translateSelectedEditors, {\n args: [-big, 0],\n checker: arrowChecker\n }], [[\"ArrowRight\", \"mac+ArrowRight\"], proto.translateSelectedEditors, {\n args: [small, 0],\n checker: arrowChecker\n }], [[\"ctrl+ArrowRight\", \"mac+shift+ArrowRight\"], proto.translateSelectedEditors, {\n args: [big, 0],\n checker: arrowChecker\n }], [[\"ArrowUp\", \"mac+ArrowUp\"], proto.translateSelectedEditors, {\n args: [0, -small],\n checker: arrowChecker\n }], [[\"ctrl+ArrowUp\", \"mac+shift+ArrowUp\"], proto.translateSelectedEditors, {\n args: [0, -big],\n checker: arrowChecker\n }], [[\"ArrowDown\", \"mac+ArrowDown\"], proto.translateSelectedEditors, {\n args: [0, small],\n checker: arrowChecker\n }], [[\"ctrl+ArrowDown\", \"mac+shift+ArrowDown\"], proto.translateSelectedEditors, {\n args: [0, big],\n checker: arrowChecker\n }]]));\n }\n constructor(container, viewer, altTextManager, eventBus, pdfDocument, pageColors) {\n this.#container = container;\n this.#viewer = viewer;\n this.#altTextManager = altTextManager;\n this._eventBus = eventBus;\n this._eventBus._on(\"editingaction\", this.#boundOnEditingAction);\n this._eventBus._on(\"pagechanging\", this.#boundOnPageChanging);\n this._eventBus._on(\"scalechanging\", this.#boundOnScaleChanging);\n this._eventBus._on(\"rotationchanging\", this.#boundOnRotationChanging);\n this.#annotationStorage = pdfDocument.annotationStorage;\n this.#filterFactory = pdfDocument.filterFactory;\n this.#pageColors = pageColors;\n this.viewParameters = {\n realScale: _display_utils.PixelsPerInch.PDF_TO_CSS_UNITS,\n rotation: 0\n };\n }\n destroy() {\n this.#removeKeyboardManager();\n this.#removeFocusManager();\n this._eventBus._off(\"editingaction\", this.#boundOnEditingAction);\n this._eventBus._off(\"pagechanging\", this.#boundOnPageChanging);\n this._eventBus._off(\"scalechanging\", this.#boundOnScaleChanging);\n this._eventBus._off(\"rotationchanging\", this.#boundOnRotationChanging);\n for (const layer of this.#allLayers.values()) {\n layer.destroy();\n }\n this.#allLayers.clear();\n this.#allEditors.clear();\n this.#editorsToRescale.clear();\n this.#activeEditor = null;\n this.#selectedEditors.clear();\n this.#commandManager.destroy();\n this.#altTextManager.destroy();\n }\n get hcmFilter() {\n return (0, _util.shadow)(this, \"hcmFilter\", this.#pageColors ? this.#filterFactory.addHCMFilter(this.#pageColors.foreground, this.#pageColors.background) : \"none\");\n }\n get direction() {\n return (0, _util.shadow)(this, \"direction\", getComputedStyle(this.#container).direction);\n }\n editAltText(editor) {\n this.#altTextManager?.editAltText(this, editor);\n }\n onPageChanging({\n pageNumber\n }) {\n this.#currentPageIndex = pageNumber - 1;\n }\n focusMainContainer() {\n this.#container.focus();\n }\n findParent(x, y) {\n for (const layer of this.#allLayers.values()) {\n const {\n x: layerX,\n y: layerY,\n width,\n height\n } = layer.div.getBoundingClientRect();\n if (x >= layerX && x <= layerX + width && y >= layerY && y <= layerY + height) {\n return layer;\n }\n }\n return null;\n }\n disableUserSelect(value = false) {\n this.#viewer.classList.toggle(\"noUserSelect\", value);\n }\n addShouldRescale(editor) {\n this.#editorsToRescale.add(editor);\n }\n removeShouldRescale(editor) {\n this.#editorsToRescale.delete(editor);\n }\n onScaleChanging({\n scale\n }) {\n this.commitOrRemove();\n this.viewParameters.realScale = scale * _display_utils.PixelsPerInch.PDF_TO_CSS_UNITS;\n for (const editor of this.#editorsToRescale) {\n editor.onScaleChanging();\n }\n }\n onRotationChanging({\n pagesRotation\n }) {\n this.commitOrRemove();\n this.viewParameters.rotation = pagesRotation;\n }\n addToAnnotationStorage(editor) {\n if (!editor.isEmpty() && this.#annotationStorage && !this.#annotationStorage.has(editor.id)) {\n this.#annotationStorage.setValue(editor.id, editor);\n }\n }\n #addFocusManager() {\n window.addEventListener(\"focus\", this.#boundFocus);\n window.addEventListener(\"blur\", this.#boundBlur);\n }\n #removeFocusManager() {\n window.removeEventListener(\"focus\", this.#boundFocus);\n window.removeEventListener(\"blur\", this.#boundBlur);\n }\n blur() {\n if (!this.hasSelection) {\n return;\n }\n const {\n activeElement\n } = document;\n for (const editor of this.#selectedEditors) {\n if (editor.div.contains(activeElement)) {\n this.#lastActiveElement = [editor, activeElement];\n editor._focusEventsAllowed = false;\n break;\n }\n }\n }\n focus() {\n if (!this.#lastActiveElement) {\n return;\n }\n const [lastEditor, lastActiveElement] = this.#lastActiveElement;\n this.#lastActiveElement = null;\n lastActiveElement.addEventListener(\"focusin\", () => {\n lastEditor._focusEventsAllowed = true;\n }, {\n once: true\n });\n lastActiveElement.focus();\n }\n #addKeyboardManager() {\n window.addEventListener(\"keydown\", this.#boundKeydown, {\n capture: true\n });\n }\n #removeKeyboardManager() {\n window.removeEventListener(\"keydown\", this.#boundKeydown, {\n capture: true\n });\n }\n #addCopyPasteListeners() {\n document.addEventListener(\"copy\", this.#boundCopy);\n document.addEventListener(\"cut\", this.#boundCut);\n document.addEventListener(\"paste\", this.#boundPaste);\n }\n #removeCopyPasteListeners() {\n document.removeEventListener(\"copy\", this.#boundCopy);\n document.removeEventListener(\"cut\", this.#boundCut);\n document.removeEventListener(\"paste\", this.#boundPaste);\n }\n addEditListeners() {\n this.#addKeyboardManager();\n this.#addCopyPasteListeners();\n }\n removeEditListeners() {\n this.#removeKeyboardManager();\n this.#removeCopyPasteListeners();\n }\n copy(event) {\n event.preventDefault();\n this.#activeEditor?.commitOrRemove();\n if (!this.hasSelection) {\n return;\n }\n const editors = [];\n for (const editor of this.#selectedEditors) {\n const serialized = editor.serialize(true);\n if (serialized) {\n editors.push(serialized);\n }\n }\n if (editors.length === 0) {\n return;\n }\n event.clipboardData.setData(\"application/pdfjs\", JSON.stringify(editors));\n }\n cut(event) {\n this.copy(event);\n this.delete();\n }\n paste(event) {\n event.preventDefault();\n const {\n clipboardData\n } = event;\n for (const item of clipboardData.items) {\n for (const editorType of this.#editorTypes) {\n if (editorType.isHandlingMimeForPasting(item.type)) {\n editorType.paste(item, this.currentLayer);\n return;\n }\n }\n }\n let data = clipboardData.getData(\"application/pdfjs\");\n if (!data) {\n return;\n }\n try {\n data = JSON.parse(data);\n } catch (ex) {\n (0, _util.warn)(`paste: \"${ex.message}\".`);\n return;\n }\n if (!Array.isArray(data)) {\n return;\n }\n this.unselectAll();\n const layer = this.currentLayer;\n try {\n const newEditors = [];\n for (const editor of data) {\n const deserializedEditor = layer.deserialize(editor);\n if (!deserializedEditor) {\n return;\n }\n newEditors.push(deserializedEditor);\n }\n const cmd = () => {\n for (const editor of newEditors) {\n this.#addEditorToLayer(editor);\n }\n this.#selectEditors(newEditors);\n };\n const undo = () => {\n for (const editor of newEditors) {\n editor.remove();\n }\n };\n this.addCommands({\n cmd,\n undo,\n mustExec: true\n });\n } catch (ex) {\n (0, _util.warn)(`paste: \"${ex.message}\".`);\n }\n }\n keydown(event) {\n if (!this.getActive()?.shouldGetKeyboardEvents()) {\n AnnotationEditorUIManager._keyboardManager.exec(this, event);\n }\n }\n onEditingAction(details) {\n if ([\"undo\", \"redo\", \"delete\", \"selectAll\"].includes(details.name)) {\n this[details.name]();\n }\n }\n #dispatchUpdateStates(details) {\n const hasChanged = Object.entries(details).some(([key, value]) => this.#previousStates[key] !== value);\n if (hasChanged) {\n this._eventBus.dispatch(\"annotationeditorstateschanged\", {\n source: this,\n details: Object.assign(this.#previousStates, details)\n });\n }\n }\n #dispatchUpdateUI(details) {\n this._eventBus.dispatch(\"annotationeditorparamschanged\", {\n source: this,\n details\n });\n }\n setEditingState(isEditing) {\n if (isEditing) {\n this.#addFocusManager();\n this.#addKeyboardManager();\n this.#addCopyPasteListeners();\n this.#dispatchUpdateStates({\n isEditing: this.#mode !== _util.AnnotationEditorType.NONE,\n isEmpty: this.#isEmpty(),\n hasSomethingToUndo: this.#commandManager.hasSomethingToUndo(),\n hasSomethingToRedo: this.#commandManager.hasSomethingToRedo(),\n hasSelectedEditor: false\n });\n } else {\n this.#removeFocusManager();\n this.#removeKeyboardManager();\n this.#removeCopyPasteListeners();\n this.#dispatchUpdateStates({\n isEditing: false\n });\n this.disableUserSelect(false);\n }\n }\n registerEditorTypes(types) {\n if (this.#editorTypes) {\n return;\n }\n this.#editorTypes = types;\n for (const editorType of this.#editorTypes) {\n this.#dispatchUpdateUI(editorType.defaultPropertiesToUpdate);\n }\n }\n getId() {\n return this.#idManager.getId();\n }\n get currentLayer() {\n return this.#allLayers.get(this.#currentPageIndex);\n }\n getLayer(pageIndex) {\n return this.#allLayers.get(pageIndex);\n }\n get currentPageIndex() {\n return this.#currentPageIndex;\n }\n addLayer(layer) {\n this.#allLayers.set(layer.pageIndex, layer);\n if (this.#isEnabled) {\n layer.enable();\n } else {\n layer.disable();\n }\n }\n removeLayer(layer) {\n this.#allLayers.delete(layer.pageIndex);\n }\n updateMode(mode, editId = null) {\n if (this.#mode === mode) {\n return;\n }\n this.#mode = mode;\n if (mode === _util.AnnotationEditorType.NONE) {\n this.setEditingState(false);\n this.#disableAll();\n return;\n }\n this.setEditingState(true);\n this.#enableAll();\n this.unselectAll();\n for (const layer of this.#allLayers.values()) {\n layer.updateMode(mode);\n }\n if (!editId) {\n return;\n }\n for (const editor of this.#allEditors.values()) {\n if (editor.annotationElementId === editId) {\n this.setSelected(editor);\n editor.enterInEditMode();\n break;\n }\n }\n }\n updateToolbar(mode) {\n if (mode === this.#mode) {\n return;\n }\n this._eventBus.dispatch(\"switchannotationeditormode\", {\n source: this,\n mode\n });\n }\n updateParams(type, value) {\n if (!this.#editorTypes) {\n return;\n }\n if (type === _util.AnnotationEditorParamsType.CREATE) {\n this.currentLayer.addNewEditor(type);\n return;\n }\n for (const editor of this.#selectedEditors) {\n editor.updateParams(type, value);\n }\n for (const editorType of this.#editorTypes) {\n editorType.updateDefaultParams(type, value);\n }\n }\n enableWaiting(mustWait = false) {\n if (this.#isWaiting === mustWait) {\n return;\n }\n this.#isWaiting = mustWait;\n for (const layer of this.#allLayers.values()) {\n if (mustWait) {\n layer.disableClick();\n } else {\n layer.enableClick();\n }\n layer.div.classList.toggle(\"waiting\", mustWait);\n }\n }\n #enableAll() {\n if (!this.#isEnabled) {\n this.#isEnabled = true;\n for (const layer of this.#allLayers.values()) {\n layer.enable();\n }\n }\n }\n #disableAll() {\n this.unselectAll();\n if (this.#isEnabled) {\n this.#isEnabled = false;\n for (const layer of this.#allLayers.values()) {\n layer.disable();\n }\n }\n }\n getEditors(pageIndex) {\n const editors = [];\n for (const editor of this.#allEditors.values()) {\n if (editor.pageIndex === pageIndex) {\n editors.push(editor);\n }\n }\n return editors;\n }\n getEditor(id) {\n return this.#allEditors.get(id);\n }\n addEditor(editor) {\n this.#allEditors.set(editor.id, editor);\n }\n removeEditor(editor) {\n this.#allEditors.delete(editor.id);\n this.unselect(editor);\n if (!editor.annotationElementId || !this.#deletedAnnotationsElementIds.has(editor.annotationElementId)) {\n this.#annotationStorage?.remove(editor.id);\n }\n }\n addDeletedAnnotationElement(editor) {\n this.#deletedAnnotationsElementIds.add(editor.annotationElementId);\n editor.deleted = true;\n }\n isDeletedAnnotationElement(annotationElementId) {\n return this.#deletedAnnotationsElementIds.has(annotationElementId);\n }\n removeDeletedAnnotationElement(editor) {\n this.#deletedAnnotationsElementIds.delete(editor.annotationElementId);\n editor.deleted = false;\n }\n #addEditorToLayer(editor) {\n const layer = this.#allLayers.get(editor.pageIndex);\n if (layer) {\n layer.addOrRebuild(editor);\n } else {\n this.addEditor(editor);\n }\n }\n setActiveEditor(editor) {\n if (this.#activeEditor === editor) {\n return;\n }\n this.#activeEditor = editor;\n if (editor) {\n this.#dispatchUpdateUI(editor.propertiesToUpdate);\n }\n }\n toggleSelected(editor) {\n if (this.#selectedEditors.has(editor)) {\n this.#selectedEditors.delete(editor);\n editor.unselect();\n this.#dispatchUpdateStates({\n hasSelectedEditor: this.hasSelection\n });\n return;\n }\n this.#selectedEditors.add(editor);\n editor.select();\n this.#dispatchUpdateUI(editor.propertiesToUpdate);\n this.#dispatchUpdateStates({\n hasSelectedEditor: true\n });\n }\n setSelected(editor) {\n for (const ed of this.#selectedEditors) {\n if (ed !== editor) {\n ed.unselect();\n }\n }\n this.#selectedEditors.clear();\n this.#selectedEditors.add(editor);\n editor.select();\n this.#dispatchUpdateUI(editor.propertiesToUpdate);\n this.#dispatchUpdateStates({\n hasSelectedEditor: true\n });\n }\n isSelected(editor) {\n return this.#selectedEditors.has(editor);\n }\n unselect(editor) {\n editor.unselect();\n this.#selectedEditors.delete(editor);\n this.#dispatchUpdateStates({\n hasSelectedEditor: this.hasSelection\n });\n }\n get hasSelection() {\n return this.#selectedEditors.size !== 0;\n }\n undo() {\n this.#commandManager.undo();\n this.#dispatchUpdateStates({\n hasSomethingToUndo: this.#commandManager.hasSomethingToUndo(),\n hasSomethingToRedo: true,\n isEmpty: this.#isEmpty()\n });\n }\n redo() {\n this.#commandManager.redo();\n this.#dispatchUpdateStates({\n hasSomethingToUndo: true,\n hasSomethingToRedo: this.#commandManager.hasSomethingToRedo(),\n isEmpty: this.#isEmpty()\n });\n }\n addCommands(params) {\n this.#commandManager.add(params);\n this.#dispatchUpdateStates({\n hasSomethingToUndo: true,\n hasSomethingToRedo: false,\n isEmpty: this.#isEmpty()\n });\n }\n #isEmpty() {\n if (this.#allEditors.size === 0) {\n return true;\n }\n if (this.#allEditors.size === 1) {\n for (const editor of this.#allEditors.values()) {\n return editor.isEmpty();\n }\n }\n return false;\n }\n delete() {\n this.commitOrRemove();\n if (!this.hasSelection) {\n return;\n }\n const editors = [...this.#selectedEditors];\n const cmd = () => {\n for (const editor of editors) {\n editor.remove();\n }\n };\n const undo = () => {\n for (const editor of editors) {\n this.#addEditorToLayer(editor);\n }\n };\n this.addCommands({\n cmd,\n undo,\n mustExec: true\n });\n }\n commitOrRemove() {\n this.#activeEditor?.commitOrRemove();\n }\n hasSomethingToControl() {\n return this.#activeEditor || this.hasSelection;\n }\n #selectEditors(editors) {\n this.#selectedEditors.clear();\n for (const editor of editors) {\n if (editor.isEmpty()) {\n continue;\n }\n this.#selectedEditors.add(editor);\n editor.select();\n }\n this.#dispatchUpdateStates({\n hasSelectedEditor: true\n });\n }\n selectAll() {\n for (const editor of this.#selectedEditors) {\n editor.commit();\n }\n this.#selectEditors(this.#allEditors.values());\n }\n unselectAll() {\n if (this.#activeEditor) {\n this.#activeEditor.commitOrRemove();\n return;\n }\n if (!this.hasSelection) {\n return;\n }\n for (const editor of this.#selectedEditors) {\n editor.unselect();\n }\n this.#selectedEditors.clear();\n this.#dispatchUpdateStates({\n hasSelectedEditor: false\n });\n }\n translateSelectedEditors(x, y, noCommit = false) {\n if (!noCommit) {\n this.commitOrRemove();\n }\n if (!this.hasSelection) {\n return;\n }\n this.#translation[0] += x;\n this.#translation[1] += y;\n const [totalX, totalY] = this.#translation;\n const editors = [...this.#selectedEditors];\n const TIME_TO_WAIT = 1000;\n if (this.#translationTimeoutId) {\n clearTimeout(this.#translationTimeoutId);\n }\n this.#translationTimeoutId = setTimeout(() => {\n this.#translationTimeoutId = null;\n this.#translation[0] = this.#translation[1] = 0;\n this.addCommands({\n cmd: () => {\n for (const editor of editors) {\n if (this.#allEditors.has(editor.id)) {\n editor.translateInPage(totalX, totalY);\n }\n }\n },\n undo: () => {\n for (const editor of editors) {\n if (this.#allEditors.has(editor.id)) {\n editor.translateInPage(-totalX, -totalY);\n }\n }\n },\n mustExec: false\n });\n }, TIME_TO_WAIT);\n for (const editor of editors) {\n editor.translateInPage(x, y);\n }\n }\n setUpDragSession() {\n if (!this.hasSelection) {\n return;\n }\n this.disableUserSelect(true);\n this.#draggingEditors = new Map();\n for (const editor of this.#selectedEditors) {\n this.#draggingEditors.set(editor, {\n savedX: editor.x,\n savedY: editor.y,\n savedPageIndex: editor.pageIndex,\n newX: 0,\n newY: 0,\n newPageIndex: -1\n });\n }\n }\n endDragSession() {\n if (!this.#draggingEditors) {\n return false;\n }\n this.disableUserSelect(false);\n const map = this.#draggingEditors;\n this.#draggingEditors = null;\n let mustBeAddedInUndoStack = false;\n for (const [{\n x,\n y,\n pageIndex\n }, value] of map) {\n value.newX = x;\n value.newY = y;\n value.newPageIndex = pageIndex;\n mustBeAddedInUndoStack ||= x !== value.savedX || y !== value.savedY || pageIndex !== value.savedPageIndex;\n }\n if (!mustBeAddedInUndoStack) {\n return false;\n }\n const move = (editor, x, y, pageIndex) => {\n if (this.#allEditors.has(editor.id)) {\n const parent = this.#allLayers.get(pageIndex);\n if (parent) {\n editor._setParentAndPosition(parent, x, y);\n } else {\n editor.pageIndex = pageIndex;\n editor.x = x;\n editor.y = y;\n }\n }\n };\n this.addCommands({\n cmd: () => {\n for (const [editor, {\n newX,\n newY,\n newPageIndex\n }] of map) {\n move(editor, newX, newY, newPageIndex);\n }\n },\n undo: () => {\n for (const [editor, {\n savedX,\n savedY,\n savedPageIndex\n }] of map) {\n move(editor, savedX, savedY, savedPageIndex);\n }\n },\n mustExec: true\n });\n return true;\n }\n dragSelectedEditors(tx, ty) {\n if (!this.#draggingEditors) {\n return;\n }\n for (const editor of this.#draggingEditors.keys()) {\n editor.drag(tx, ty);\n }\n }\n rebuild(editor) {\n if (editor.parent === null) {\n const parent = this.getLayer(editor.pageIndex);\n if (parent) {\n parent.changeParent(editor);\n parent.addOrRebuild(editor);\n } else {\n this.addEditor(editor);\n this.addToAnnotationStorage(editor);\n editor.rebuild();\n }\n } else {\n editor.parent.addOrRebuild(editor);\n }\n }\n isActive(editor) {\n return this.#activeEditor === editor;\n }\n getActive() {\n return this.#activeEditor;\n }\n getMode() {\n return this.#mode;\n }\n get imageManager() {\n return (0, _util.shadow)(this, \"imageManager\", new ImageManager());\n }\n}\nexports.AnnotationEditorUIManager = AnnotationEditorUIManager;\n\n/***/ }),\n/* 6 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.StatTimer = exports.RenderingCancelledException = exports.PixelsPerInch = exports.PageViewport = exports.PDFDateString = exports.DOMStandardFontDataFactory = exports.DOMSVGFactory = exports.DOMFilterFactory = exports.DOMCanvasFactory = exports.DOMCMapReaderFactory = void 0;\nexports.deprecated = deprecated;\nexports.getColorValues = getColorValues;\nexports.getCurrentTransform = getCurrentTransform;\nexports.getCurrentTransformInverse = getCurrentTransformInverse;\nexports.getFilenameFromUrl = getFilenameFromUrl;\nexports.getPdfFilenameFromUrl = getPdfFilenameFromUrl;\nexports.getRGB = getRGB;\nexports.getXfaPageViewport = getXfaPageViewport;\nexports.isDataScheme = isDataScheme;\nexports.isPdfFile = isPdfFile;\nexports.isValidFetchUrl = isValidFetchUrl;\nexports.loadScript = loadScript;\nexports.noContextMenu = noContextMenu;\nexports.setLayerDimensions = setLayerDimensions;\nvar _base_factory = __w_pdfjs_require__(7);\nvar _util = __w_pdfjs_require__(1);\nconst SVG_NS = \"http://www.w3.org/2000/svg\";\nclass PixelsPerInch {\n static CSS = 96.0;\n static PDF = 72.0;\n static PDF_TO_CSS_UNITS = this.CSS / this.PDF;\n}\nexports.PixelsPerInch = PixelsPerInch;\nclass DOMFilterFactory extends _base_factory.BaseFilterFactory {\n #_cache;\n #_defs;\n #docId;\n #document;\n #hcmFilter;\n #hcmKey;\n #hcmUrl;\n #hcmHighlightFilter;\n #hcmHighlightKey;\n #hcmHighlightUrl;\n #id = 0;\n constructor({\n docId,\n ownerDocument = globalThis.document\n } = {}) {\n super();\n this.#docId = docId;\n this.#document = ownerDocument;\n }\n get #cache() {\n return this.#_cache ||= new Map();\n }\n get #defs() {\n if (!this.#_defs) {\n const div = this.#document.createElement(\"div\");\n const {\n style\n } = div;\n style.visibility = \"hidden\";\n style.contain = \"strict\";\n style.width = style.height = 0;\n style.position = \"absolute\";\n style.top = style.left = 0;\n style.zIndex = -1;\n const svg = this.#document.createElementNS(SVG_NS, \"svg\");\n svg.setAttribute(\"width\", 0);\n svg.setAttribute(\"height\", 0);\n this.#_defs = this.#document.createElementNS(SVG_NS, \"defs\");\n div.append(svg);\n svg.append(this.#_defs);\n this.#document.body.append(div);\n }\n return this.#_defs;\n }\n addFilter(maps) {\n if (!maps) {\n return \"none\";\n }\n let value = this.#cache.get(maps);\n if (value) {\n return value;\n }\n let tableR, tableG, tableB, key;\n if (maps.length === 1) {\n const mapR = maps[0];\n const buffer = new Array(256);\n for (let i = 0; i < 256; i++) {\n buffer[i] = mapR[i] / 255;\n }\n key = tableR = tableG = tableB = buffer.join(\",\");\n } else {\n const [mapR, mapG, mapB] = maps;\n const bufferR = new Array(256);\n const bufferG = new Array(256);\n const bufferB = new Array(256);\n for (let i = 0; i < 256; i++) {\n bufferR[i] = mapR[i] / 255;\n bufferG[i] = mapG[i] / 255;\n bufferB[i] = mapB[i] / 255;\n }\n tableR = bufferR.join(\",\");\n tableG = bufferG.join(\",\");\n tableB = bufferB.join(\",\");\n key = `${tableR}${tableG}${tableB}`;\n }\n value = this.#cache.get(key);\n if (value) {\n this.#cache.set(maps, value);\n return value;\n }\n const id = `g_${this.#docId}_transfer_map_${this.#id++}`;\n const url = `url(#${id})`;\n this.#cache.set(maps, url);\n this.#cache.set(key, url);\n const filter = this.#createFilter(id);\n this.#addTransferMapConversion(tableR, tableG, tableB, filter);\n return url;\n }\n addHCMFilter(fgColor, bgColor) {\n const key = `${fgColor}-${bgColor}`;\n if (this.#hcmKey === key) {\n return this.#hcmUrl;\n }\n this.#hcmKey = key;\n this.#hcmUrl = \"none\";\n this.#hcmFilter?.remove();\n if (!fgColor || !bgColor) {\n return this.#hcmUrl;\n }\n const fgRGB = this.#getRGB(fgColor);\n fgColor = _util.Util.makeHexColor(...fgRGB);\n const bgRGB = this.#getRGB(bgColor);\n bgColor = _util.Util.makeHexColor(...bgRGB);\n this.#defs.style.color = \"\";\n if (fgColor === \"#000000\" && bgColor === \"#ffffff\" || fgColor === bgColor) {\n return this.#hcmUrl;\n }\n const map = new Array(256);\n for (let i = 0; i <= 255; i++) {\n const x = i / 255;\n map[i] = x <= 0.03928 ? x / 12.92 : ((x + 0.055) / 1.055) ** 2.4;\n }\n const table = map.join(\",\");\n const id = `g_${this.#docId}_hcm_filter`;\n const filter = this.#hcmHighlightFilter = this.#createFilter(id);\n this.#addTransferMapConversion(table, table, table, filter);\n this.#addGrayConversion(filter);\n const getSteps = (c, n) => {\n const start = fgRGB[c] / 255;\n const end = bgRGB[c] / 255;\n const arr = new Array(n + 1);\n for (let i = 0; i <= n; i++) {\n arr[i] = start + i / n * (end - start);\n }\n return arr.join(\",\");\n };\n this.#addTransferMapConversion(getSteps(0, 5), getSteps(1, 5), getSteps(2, 5), filter);\n this.#hcmUrl = `url(#${id})`;\n return this.#hcmUrl;\n }\n addHighlightHCMFilter(fgColor, bgColor, newFgColor, newBgColor) {\n const key = `${fgColor}-${bgColor}-${newFgColor}-${newBgColor}`;\n if (this.#hcmHighlightKey === key) {\n return this.#hcmHighlightUrl;\n }\n this.#hcmHighlightKey = key;\n this.#hcmHighlightUrl = \"none\";\n this.#hcmHighlightFilter?.remove();\n if (!fgColor || !bgColor) {\n return this.#hcmHighlightUrl;\n }\n const [fgRGB, bgRGB] = [fgColor, bgColor].map(this.#getRGB.bind(this));\n let fgGray = Math.round(0.2126 * fgRGB[0] + 0.7152 * fgRGB[1] + 0.0722 * fgRGB[2]);\n let bgGray = Math.round(0.2126 * bgRGB[0] + 0.7152 * bgRGB[1] + 0.0722 * bgRGB[2]);\n let [newFgRGB, newBgRGB] = [newFgColor, newBgColor].map(this.#getRGB.bind(this));\n if (bgGray < fgGray) {\n [fgGray, bgGray, newFgRGB, newBgRGB] = [bgGray, fgGray, newBgRGB, newFgRGB];\n }\n this.#defs.style.color = \"\";\n const getSteps = (fg, bg, n) => {\n const arr = new Array(256);\n const step = (bgGray - fgGray) / n;\n const newStart = fg / 255;\n const newStep = (bg - fg) / (255 * n);\n let prev = 0;\n for (let i = 0; i <= n; i++) {\n const k = Math.round(fgGray + i * step);\n const value = newStart + i * newStep;\n for (let j = prev; j <= k; j++) {\n arr[j] = value;\n }\n prev = k + 1;\n }\n for (let i = prev; i < 256; i++) {\n arr[i] = arr[prev - 1];\n }\n return arr.join(\",\");\n };\n const id = `g_${this.#docId}_hcm_highlight_filter`;\n const filter = this.#hcmHighlightFilter = this.#createFilter(id);\n this.#addGrayConversion(filter);\n this.#addTransferMapConversion(getSteps(newFgRGB[0], newBgRGB[0], 5), getSteps(newFgRGB[1], newBgRGB[1], 5), getSteps(newFgRGB[2], newBgRGB[2], 5), filter);\n this.#hcmHighlightUrl = `url(#${id})`;\n return this.#hcmHighlightUrl;\n }\n destroy(keepHCM = false) {\n if (keepHCM && (this.#hcmUrl || this.#hcmHighlightUrl)) {\n return;\n }\n if (this.#_defs) {\n this.#_defs.parentNode.parentNode.remove();\n this.#_defs = null;\n }\n if (this.#_cache) {\n this.#_cache.clear();\n this.#_cache = null;\n }\n this.#id = 0;\n }\n #addGrayConversion(filter) {\n const feColorMatrix = this.#document.createElementNS(SVG_NS, \"feColorMatrix\");\n feColorMatrix.setAttribute(\"type\", \"matrix\");\n feColorMatrix.setAttribute(\"values\", \"0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0\");\n filter.append(feColorMatrix);\n }\n #createFilter(id) {\n const filter = this.#document.createElementNS(SVG_NS, \"filter\");\n filter.setAttribute(\"color-interpolation-filters\", \"sRGB\");\n filter.setAttribute(\"id\", id);\n this.#defs.append(filter);\n return filter;\n }\n #appendFeFunc(feComponentTransfer, func, table) {\n const feFunc = this.#document.createElementNS(SVG_NS, func);\n feFunc.setAttribute(\"type\", \"discrete\");\n feFunc.setAttribute(\"tableValues\", table);\n feComponentTransfer.append(feFunc);\n }\n #addTransferMapConversion(rTable, gTable, bTable, filter) {\n const feComponentTransfer = this.#document.createElementNS(SVG_NS, \"feComponentTransfer\");\n filter.append(feComponentTransfer);\n this.#appendFeFunc(feComponentTransfer, \"feFuncR\", rTable);\n this.#appendFeFunc(feComponentTransfer, \"feFuncG\", gTable);\n this.#appendFeFunc(feComponentTransfer, \"feFuncB\", bTable);\n }\n #getRGB(color) {\n this.#defs.style.color = color;\n return getRGB(getComputedStyle(this.#defs).getPropertyValue(\"color\"));\n }\n}\nexports.DOMFilterFactory = DOMFilterFactory;\nclass DOMCanvasFactory extends _base_factory.BaseCanvasFactory {\n constructor({\n ownerDocument = globalThis.document\n } = {}) {\n super();\n this._document = ownerDocument;\n }\n _createCanvas(width, height) {\n const canvas = this._document.createElement(\"canvas\");\n canvas.width = width;\n canvas.height = height;\n return canvas;\n }\n}\nexports.DOMCanvasFactory = DOMCanvasFactory;\nasync function fetchData(url, asTypedArray = false) {\n if (isValidFetchUrl(url, document.baseURI)) {\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(response.statusText);\n }\n return asTypedArray ? new Uint8Array(await response.arrayBuffer()) : (0, _util.stringToBytes)(await response.text());\n }\n return new Promise((resolve, reject) => {\n const request = new XMLHttpRequest();\n request.open(\"GET\", url, true);\n if (asTypedArray) {\n request.responseType = \"arraybuffer\";\n }\n request.onreadystatechange = () => {\n if (request.readyState !== XMLHttpRequest.DONE) {\n return;\n }\n if (request.status === 200 || request.status === 0) {\n let data;\n if (asTypedArray && request.response) {\n data = new Uint8Array(request.response);\n } else if (!asTypedArray && request.responseText) {\n data = (0, _util.stringToBytes)(request.responseText);\n }\n if (data) {\n resolve(data);\n return;\n }\n }\n reject(new Error(request.statusText));\n };\n request.send(null);\n });\n}\nclass DOMCMapReaderFactory extends _base_factory.BaseCMapReaderFactory {\n _fetchData(url, compressionType) {\n return fetchData(url, this.isCompressed).then(data => {\n return {\n cMapData: data,\n compressionType\n };\n });\n }\n}\nexports.DOMCMapReaderFactory = DOMCMapReaderFactory;\nclass DOMStandardFontDataFactory extends _base_factory.BaseStandardFontDataFactory {\n _fetchData(url) {\n return fetchData(url, true);\n }\n}\nexports.DOMStandardFontDataFactory = DOMStandardFontDataFactory;\nclass DOMSVGFactory extends _base_factory.BaseSVGFactory {\n _createSVG(type) {\n return document.createElementNS(SVG_NS, type);\n }\n}\nexports.DOMSVGFactory = DOMSVGFactory;\nclass PageViewport {\n constructor({\n viewBox,\n scale,\n rotation,\n offsetX = 0,\n offsetY = 0,\n dontFlip = false\n }) {\n this.viewBox = viewBox;\n this.scale = scale;\n this.rotation = rotation;\n this.offsetX = offsetX;\n this.offsetY = offsetY;\n const centerX = (viewBox[2] + viewBox[0]) / 2;\n const centerY = (viewBox[3] + viewBox[1]) / 2;\n let rotateA, rotateB, rotateC, rotateD;\n rotation %= 360;\n if (rotation < 0) {\n rotation += 360;\n }\n switch (rotation) {\n case 180:\n rotateA = -1;\n rotateB = 0;\n rotateC = 0;\n rotateD = 1;\n break;\n case 90:\n rotateA = 0;\n rotateB = 1;\n rotateC = 1;\n rotateD = 0;\n break;\n case 270:\n rotateA = 0;\n rotateB = -1;\n rotateC = -1;\n rotateD = 0;\n break;\n case 0:\n rotateA = 1;\n rotateB = 0;\n rotateC = 0;\n rotateD = -1;\n break;\n default:\n throw new Error(\"PageViewport: Invalid rotation, must be a multiple of 90 degrees.\");\n }\n if (dontFlip) {\n rotateC = -rotateC;\n rotateD = -rotateD;\n }\n let offsetCanvasX, offsetCanvasY;\n let width, height;\n if (rotateA === 0) {\n offsetCanvasX = Math.abs(centerY - viewBox[1]) * scale + offsetX;\n offsetCanvasY = Math.abs(centerX - viewBox[0]) * scale + offsetY;\n width = (viewBox[3] - viewBox[1]) * scale;\n height = (viewBox[2] - viewBox[0]) * scale;\n } else {\n offsetCanvasX = Math.abs(centerX - viewBox[0]) * scale + offsetX;\n offsetCanvasY = Math.abs(centerY - viewBox[1]) * scale + offsetY;\n width = (viewBox[2] - viewBox[0]) * scale;\n height = (viewBox[3] - viewBox[1]) * scale;\n }\n this.transform = [rotateA * scale, rotateB * scale, rotateC * scale, rotateD * scale, offsetCanvasX - rotateA * scale * centerX - rotateC * scale * centerY, offsetCanvasY - rotateB * scale * centerX - rotateD * scale * centerY];\n this.width = width;\n this.height = height;\n }\n get rawDims() {\n const {\n viewBox\n } = this;\n return (0, _util.shadow)(this, \"rawDims\", {\n pageWidth: viewBox[2] - viewBox[0],\n pageHeight: viewBox[3] - viewBox[1],\n pageX: viewBox[0],\n pageY: viewBox[1]\n });\n }\n clone({\n scale = this.scale,\n rotation = this.rotation,\n offsetX = this.offsetX,\n offsetY = this.offsetY,\n dontFlip = false\n } = {}) {\n return new PageViewport({\n viewBox: this.viewBox.slice(),\n scale,\n rotation,\n offsetX,\n offsetY,\n dontFlip\n });\n }\n convertToViewportPoint(x, y) {\n return _util.Util.applyTransform([x, y], this.transform);\n }\n convertToViewportRectangle(rect) {\n const topLeft = _util.Util.applyTransform([rect[0], rect[1]], this.transform);\n const bottomRight = _util.Util.applyTransform([rect[2], rect[3]], this.transform);\n return [topLeft[0], topLeft[1], bottomRight[0], bottomRight[1]];\n }\n convertToPdfPoint(x, y) {\n return _util.Util.applyInverseTransform([x, y], this.transform);\n }\n}\nexports.PageViewport = PageViewport;\nclass RenderingCancelledException extends _util.BaseException {\n constructor(msg, extraDelay = 0) {\n super(msg, \"RenderingCancelledException\");\n this.extraDelay = extraDelay;\n }\n}\nexports.RenderingCancelledException = RenderingCancelledException;\nfunction isDataScheme(url) {\n const ii = url.length;\n let i = 0;\n while (i < ii && url[i].trim() === \"\") {\n i++;\n }\n return url.substring(i, i + 5).toLowerCase() === \"data:\";\n}\nfunction isPdfFile(filename) {\n return typeof filename === \"string\" && /\\.pdf$/i.test(filename);\n}\nfunction getFilenameFromUrl(url, onlyStripPath = false) {\n if (!onlyStripPath) {\n [url] = url.split(/[#?]/, 1);\n }\n return url.substring(url.lastIndexOf(\"/\") + 1);\n}\nfunction getPdfFilenameFromUrl(url, defaultFilename = \"document.pdf\") {\n if (typeof url !== \"string\") {\n return defaultFilename;\n }\n if (isDataScheme(url)) {\n (0, _util.warn)('getPdfFilenameFromUrl: ignore \"data:\"-URL for performance reasons.');\n return defaultFilename;\n }\n const reURI = /^(?:(?:[^:]+:)?\\/\\/[^/]+)?([^?#]*)(\\?[^#]*)?(#.*)?$/;\n const reFilename = /[^/?#=]+\\.pdf\\b(?!.*\\.pdf\\b)/i;\n const splitURI = reURI.exec(url);\n let suggestedFilename = reFilename.exec(splitURI[1]) || reFilename.exec(splitURI[2]) || reFilename.exec(splitURI[3]);\n if (suggestedFilename) {\n suggestedFilename = suggestedFilename[0];\n if (suggestedFilename.includes(\"%\")) {\n try {\n suggestedFilename = reFilename.exec(decodeURIComponent(suggestedFilename))[0];\n } catch {}\n }\n }\n return suggestedFilename || defaultFilename;\n}\nclass StatTimer {\n started = Object.create(null);\n times = [];\n time(name) {\n if (name in this.started) {\n (0, _util.warn)(`Timer is already running for ${name}`);\n }\n this.started[name] = Date.now();\n }\n timeEnd(name) {\n if (!(name in this.started)) {\n (0, _util.warn)(`Timer has not been started for ${name}`);\n }\n this.times.push({\n name,\n start: this.started[name],\n end: Date.now()\n });\n delete this.started[name];\n }\n toString() {\n const outBuf = [];\n let longest = 0;\n for (const {\n name\n } of this.times) {\n longest = Math.max(name.length, longest);\n }\n for (const {\n name,\n start,\n end\n } of this.times) {\n outBuf.push(`${name.padEnd(longest)} ${end - start}ms\\n`);\n }\n return outBuf.join(\"\");\n }\n}\nexports.StatTimer = StatTimer;\nfunction isValidFetchUrl(url, baseUrl) {\n try {\n const {\n protocol\n } = baseUrl ? new URL(url, baseUrl) : new URL(url);\n return protocol === \"http:\" || protocol === \"https:\";\n } catch {\n return false;\n }\n}\nfunction noContextMenu(e) {\n e.preventDefault();\n}\nfunction loadScript(src, removeScriptElement = false) {\n return new Promise((resolve, reject) => {\n const script = document.createElement(\"script\");\n script.src = src;\n script.onload = function (evt) {\n if (removeScriptElement) {\n script.remove();\n }\n resolve(evt);\n };\n script.onerror = function () {\n reject(new Error(`Cannot load script at: ${script.src}`));\n };\n (document.head || document.documentElement).append(script);\n });\n}\nfunction deprecated(details) {\n console.log(\"Deprecated API usage: \" + details);\n}\nlet pdfDateStringRegex;\nclass PDFDateString {\n static toDateObject(input) {\n if (!input || typeof input !== \"string\") {\n return null;\n }\n pdfDateStringRegex ||= new RegExp(\"^D:\" + \"(\\\\d{4})\" + \"(\\\\d{2})?\" + \"(\\\\d{2})?\" + \"(\\\\d{2})?\" + \"(\\\\d{2})?\" + \"(\\\\d{2})?\" + \"([Z|+|-])?\" + \"(\\\\d{2})?\" + \"'?\" + \"(\\\\d{2})?\" + \"'?\");\n const matches = pdfDateStringRegex.exec(input);\n if (!matches) {\n return null;\n }\n const year = parseInt(matches[1], 10);\n let month = parseInt(matches[2], 10);\n month = month >= 1 && month <= 12 ? month - 1 : 0;\n let day = parseInt(matches[3], 10);\n day = day >= 1 && day <= 31 ? day : 1;\n let hour = parseInt(matches[4], 10);\n hour = hour >= 0 && hour <= 23 ? hour : 0;\n let minute = parseInt(matches[5], 10);\n minute = minute >= 0 && minute <= 59 ? minute : 0;\n let second = parseInt(matches[6], 10);\n second = second >= 0 && second <= 59 ? second : 0;\n const universalTimeRelation = matches[7] || \"Z\";\n let offsetHour = parseInt(matches[8], 10);\n offsetHour = offsetHour >= 0 && offsetHour <= 23 ? offsetHour : 0;\n let offsetMinute = parseInt(matches[9], 10) || 0;\n offsetMinute = offsetMinute >= 0 && offsetMinute <= 59 ? offsetMinute : 0;\n if (universalTimeRelation === \"-\") {\n hour += offsetHour;\n minute += offsetMinute;\n } else if (universalTimeRelation === \"+\") {\n hour -= offsetHour;\n minute -= offsetMinute;\n }\n return new Date(Date.UTC(year, month, day, hour, minute, second));\n }\n}\nexports.PDFDateString = PDFDateString;\nfunction getXfaPageViewport(xfaPage, {\n scale = 1,\n rotation = 0\n}) {\n const {\n width,\n height\n } = xfaPage.attributes.style;\n const viewBox = [0, 0, parseInt(width), parseInt(height)];\n return new PageViewport({\n viewBox,\n scale,\n rotation\n });\n}\nfunction getRGB(color) {\n if (color.startsWith(\"#\")) {\n const colorRGB = parseInt(color.slice(1), 16);\n return [(colorRGB & 0xff0000) >> 16, (colorRGB & 0x00ff00) >> 8, colorRGB & 0x0000ff];\n }\n if (color.startsWith(\"rgb(\")) {\n return color.slice(4, -1).split(\",\").map(x => parseInt(x));\n }\n if (color.startsWith(\"rgba(\")) {\n return color.slice(5, -1).split(\",\").map(x => parseInt(x)).slice(0, 3);\n }\n (0, _util.warn)(`Not a valid color format: \"${color}\"`);\n return [0, 0, 0];\n}\nfunction getColorValues(colors) {\n const span = document.createElement(\"span\");\n span.style.visibility = \"hidden\";\n document.body.append(span);\n for (const name of colors.keys()) {\n span.style.color = name;\n const computedColor = window.getComputedStyle(span).color;\n colors.set(name, getRGB(computedColor));\n }\n span.remove();\n}\nfunction getCurrentTransform(ctx) {\n const {\n a,\n b,\n c,\n d,\n e,\n f\n } = ctx.getTransform();\n return [a, b, c, d, e, f];\n}\nfunction getCurrentTransformInverse(ctx) {\n const {\n a,\n b,\n c,\n d,\n e,\n f\n } = ctx.getTransform().invertSelf();\n return [a, b, c, d, e, f];\n}\nfunction setLayerDimensions(div, viewport, mustFlip = false, mustRotate = true) {\n if (viewport instanceof PageViewport) {\n const {\n pageWidth,\n pageHeight\n } = viewport.rawDims;\n const {\n style\n } = div;\n const useRound = _util.FeatureTest.isCSSRoundSupported;\n const w = `var(--scale-factor) * ${pageWidth}px`,\n h = `var(--scale-factor) * ${pageHeight}px`;\n const widthStr = useRound ? `round(${w}, 1px)` : `calc(${w})`,\n heightStr = useRound ? `round(${h}, 1px)` : `calc(${h})`;\n if (!mustFlip || viewport.rotation % 180 === 0) {\n style.width = widthStr;\n style.height = heightStr;\n } else {\n style.width = heightStr;\n style.height = widthStr;\n }\n }\n if (mustRotate) {\n div.setAttribute(\"data-main-rotation\", viewport.rotation);\n }\n}\n\n/***/ }),\n/* 7 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.BaseStandardFontDataFactory = exports.BaseSVGFactory = exports.BaseFilterFactory = exports.BaseCanvasFactory = exports.BaseCMapReaderFactory = void 0;\nvar _util = __w_pdfjs_require__(1);\nclass BaseFilterFactory {\n constructor() {\n if (this.constructor === BaseFilterFactory) {\n (0, _util.unreachable)(\"Cannot initialize BaseFilterFactory.\");\n }\n }\n addFilter(maps) {\n return \"none\";\n }\n addHCMFilter(fgColor, bgColor) {\n return \"none\";\n }\n addHighlightHCMFilter(fgColor, bgColor, newFgColor, newBgColor) {\n return \"none\";\n }\n destroy(keepHCM = false) {}\n}\nexports.BaseFilterFactory = BaseFilterFactory;\nclass BaseCanvasFactory {\n constructor() {\n if (this.constructor === BaseCanvasFactory) {\n (0, _util.unreachable)(\"Cannot initialize BaseCanvasFactory.\");\n }\n }\n create(width, height) {\n if (width <= 0 || height <= 0) {\n throw new Error(\"Invalid canvas size\");\n }\n const canvas = this._createCanvas(width, height);\n return {\n canvas,\n context: canvas.getContext(\"2d\")\n };\n }\n reset(canvasAndContext, width, height) {\n if (!canvasAndContext.canvas) {\n throw new Error(\"Canvas is not specified\");\n }\n if (width <= 0 || height <= 0) {\n throw new Error(\"Invalid canvas size\");\n }\n canvasAndContext.canvas.width = width;\n canvasAndContext.canvas.height = height;\n }\n destroy(canvasAndContext) {\n if (!canvasAndContext.canvas) {\n throw new Error(\"Canvas is not specified\");\n }\n canvasAndContext.canvas.width = 0;\n canvasAndContext.canvas.height = 0;\n canvasAndContext.canvas = null;\n canvasAndContext.context = null;\n }\n _createCanvas(width, height) {\n (0, _util.unreachable)(\"Abstract method `_createCanvas` called.\");\n }\n}\nexports.BaseCanvasFactory = BaseCanvasFactory;\nclass BaseCMapReaderFactory {\n constructor({\n baseUrl = null,\n isCompressed = true\n }) {\n if (this.constructor === BaseCMapReaderFactory) {\n (0, _util.unreachable)(\"Cannot initialize BaseCMapReaderFactory.\");\n }\n this.baseUrl = baseUrl;\n this.isCompressed = isCompressed;\n }\n async fetch({\n name\n }) {\n if (!this.baseUrl) {\n throw new Error('The CMap \"baseUrl\" parameter must be specified, ensure that ' + 'the \"cMapUrl\" and \"cMapPacked\" API parameters are provided.');\n }\n if (!name) {\n throw new Error(\"CMap name must be specified.\");\n }\n const url = this.baseUrl + name + (this.isCompressed ? \".bcmap\" : \"\");\n const compressionType = this.isCompressed ? _util.CMapCompressionType.BINARY : _util.CMapCompressionType.NONE;\n return this._fetchData(url, compressionType).catch(reason => {\n throw new Error(`Unable to load ${this.isCompressed ? \"binary \" : \"\"}CMap at: ${url}`);\n });\n }\n _fetchData(url, compressionType) {\n (0, _util.unreachable)(\"Abstract method `_fetchData` called.\");\n }\n}\nexports.BaseCMapReaderFactory = BaseCMapReaderFactory;\nclass BaseStandardFontDataFactory {\n constructor({\n baseUrl = null\n }) {\n if (this.constructor === BaseStandardFontDataFactory) {\n (0, _util.unreachable)(\"Cannot initialize BaseStandardFontDataFactory.\");\n }\n this.baseUrl = baseUrl;\n }\n async fetch({\n filename\n }) {\n if (!this.baseUrl) {\n throw new Error('The standard font \"baseUrl\" parameter must be specified, ensure that ' + 'the \"standardFontDataUrl\" API parameter is provided.');\n }\n if (!filename) {\n throw new Error(\"Font filename must be specified.\");\n }\n const url = `${this.baseUrl}${filename}`;\n return this._fetchData(url).catch(reason => {\n throw new Error(`Unable to load font data at: ${url}`);\n });\n }\n _fetchData(url) {\n (0, _util.unreachable)(\"Abstract method `_fetchData` called.\");\n }\n}\nexports.BaseStandardFontDataFactory = BaseStandardFontDataFactory;\nclass BaseSVGFactory {\n constructor() {\n if (this.constructor === BaseSVGFactory) {\n (0, _util.unreachable)(\"Cannot initialize BaseSVGFactory.\");\n }\n }\n create(width, height, skipDimensions = false) {\n if (width <= 0 || height <= 0) {\n throw new Error(\"Invalid SVG dimensions\");\n }\n const svg = this._createSVG(\"svg:svg\");\n svg.setAttribute(\"version\", \"1.1\");\n if (!skipDimensions) {\n svg.setAttribute(\"width\", `${width}px`);\n svg.setAttribute(\"height\", `${height}px`);\n }\n svg.setAttribute(\"preserveAspectRatio\", \"none\");\n svg.setAttribute(\"viewBox\", `0 0 ${width} ${height}`);\n return svg;\n }\n createElement(type) {\n if (typeof type !== \"string\") {\n throw new Error(\"Invalid SVG element type\");\n }\n return this._createSVG(type);\n }\n _createSVG(type) {\n (0, _util.unreachable)(\"Abstract method `_createSVG` called.\");\n }\n}\nexports.BaseSVGFactory = BaseSVGFactory;\n\n/***/ }),\n/* 8 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.MurmurHash3_64 = void 0;\nvar _util = __w_pdfjs_require__(1);\nconst SEED = 0xc3d2e1f0;\nconst MASK_HIGH = 0xffff0000;\nconst MASK_LOW = 0xffff;\nclass MurmurHash3_64 {\n constructor(seed) {\n this.h1 = seed ? seed & 0xffffffff : SEED;\n this.h2 = seed ? seed & 0xffffffff : SEED;\n }\n update(input) {\n let data, length;\n if (typeof input === \"string\") {\n data = new Uint8Array(input.length * 2);\n length = 0;\n for (let i = 0, ii = input.length; i < ii; i++) {\n const code = input.charCodeAt(i);\n if (code <= 0xff) {\n data[length++] = code;\n } else {\n data[length++] = code >>> 8;\n data[length++] = code & 0xff;\n }\n }\n } else if ((0, _util.isArrayBuffer)(input)) {\n data = input.slice();\n length = data.byteLength;\n } else {\n throw new Error(\"Wrong data format in MurmurHash3_64_update. \" + \"Input must be a string or array.\");\n }\n const blockCounts = length >> 2;\n const tailLength = length - blockCounts * 4;\n const dataUint32 = new Uint32Array(data.buffer, 0, blockCounts);\n let k1 = 0,\n k2 = 0;\n let h1 = this.h1,\n h2 = this.h2;\n const C1 = 0xcc9e2d51,\n C2 = 0x1b873593;\n const C1_LOW = C1 & MASK_LOW,\n C2_LOW = C2 & MASK_LOW;\n for (let i = 0; i < blockCounts; i++) {\n if (i & 1) {\n k1 = dataUint32[i];\n k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW;\n k1 = k1 << 15 | k1 >>> 17;\n k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW;\n h1 ^= k1;\n h1 = h1 << 13 | h1 >>> 19;\n h1 = h1 * 5 + 0xe6546b64;\n } else {\n k2 = dataUint32[i];\n k2 = k2 * C1 & MASK_HIGH | k2 * C1_LOW & MASK_LOW;\n k2 = k2 << 15 | k2 >>> 17;\n k2 = k2 * C2 & MASK_HIGH | k2 * C2_LOW & MASK_LOW;\n h2 ^= k2;\n h2 = h2 << 13 | h2 >>> 19;\n h2 = h2 * 5 + 0xe6546b64;\n }\n }\n k1 = 0;\n switch (tailLength) {\n case 3:\n k1 ^= data[blockCounts * 4 + 2] << 16;\n case 2:\n k1 ^= data[blockCounts * 4 + 1] << 8;\n case 1:\n k1 ^= data[blockCounts * 4];\n k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW;\n k1 = k1 << 15 | k1 >>> 17;\n k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW;\n if (blockCounts & 1) {\n h1 ^= k1;\n } else {\n h2 ^= k1;\n }\n }\n this.h1 = h1;\n this.h2 = h2;\n }\n hexdigest() {\n let h1 = this.h1,\n h2 = this.h2;\n h1 ^= h2 >>> 1;\n h1 = h1 * 0xed558ccd & MASK_HIGH | h1 * 0x8ccd & MASK_LOW;\n h2 = h2 * 0xff51afd7 & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xafd7ed55 & MASK_HIGH) >>> 16;\n h1 ^= h2 >>> 1;\n h1 = h1 * 0x1a85ec53 & MASK_HIGH | h1 * 0xec53 & MASK_LOW;\n h2 = h2 * 0xc4ceb9fe & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xb9fe1a85 & MASK_HIGH) >>> 16;\n h1 ^= h2 >>> 1;\n return (h1 >>> 0).toString(16).padStart(8, \"0\") + (h2 >>> 0).toString(16).padStart(8, \"0\");\n }\n}\nexports.MurmurHash3_64 = MurmurHash3_64;\n\n/***/ }),\n/* 9 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.FontLoader = exports.FontFaceObject = void 0;\nvar _util = __w_pdfjs_require__(1);\nclass FontLoader {\n #systemFonts = new Set();\n constructor({\n ownerDocument = globalThis.document,\n styleElement = null\n }) {\n this._document = ownerDocument;\n this.nativeFontFaces = new Set();\n this.styleElement = null;\n this.loadingRequests = [];\n this.loadTestFontId = 0;\n }\n addNativeFontFace(nativeFontFace) {\n this.nativeFontFaces.add(nativeFontFace);\n this._document.fonts.add(nativeFontFace);\n }\n removeNativeFontFace(nativeFontFace) {\n this.nativeFontFaces.delete(nativeFontFace);\n this._document.fonts.delete(nativeFontFace);\n }\n insertRule(rule) {\n if (!this.styleElement) {\n this.styleElement = this._document.createElement(\"style\");\n this._document.documentElement.getElementsByTagName(\"head\")[0].append(this.styleElement);\n }\n const styleSheet = this.styleElement.sheet;\n styleSheet.insertRule(rule, styleSheet.cssRules.length);\n }\n clear() {\n for (const nativeFontFace of this.nativeFontFaces) {\n this._document.fonts.delete(nativeFontFace);\n }\n this.nativeFontFaces.clear();\n this.#systemFonts.clear();\n if (this.styleElement) {\n this.styleElement.remove();\n this.styleElement = null;\n }\n }\n async loadSystemFont(info) {\n if (!info || this.#systemFonts.has(info.loadedName)) {\n return;\n }\n (0, _util.assert)(!this.disableFontFace, \"loadSystemFont shouldn't be called when `disableFontFace` is set.\");\n if (this.isFontLoadingAPISupported) {\n const {\n loadedName,\n src,\n style\n } = info;\n const fontFace = new FontFace(loadedName, src, style);\n this.addNativeFontFace(fontFace);\n try {\n await fontFace.load();\n this.#systemFonts.add(loadedName);\n } catch {\n (0, _util.warn)(`Cannot load system font: ${info.baseFontName}, installing it could help to improve PDF rendering.`);\n this.removeNativeFontFace(fontFace);\n }\n return;\n }\n (0, _util.unreachable)(\"Not implemented: loadSystemFont without the Font Loading API.\");\n }\n async bind(font) {\n if (font.attached || font.missingFile && !font.systemFontInfo) {\n return;\n }\n font.attached = true;\n if (font.systemFontInfo) {\n await this.loadSystemFont(font.systemFontInfo);\n return;\n }\n if (this.isFontLoadingAPISupported) {\n const nativeFontFace = font.createNativeFontFace();\n if (nativeFontFace) {\n this.addNativeFontFace(nativeFontFace);\n try {\n await nativeFontFace.loaded;\n } catch (ex) {\n (0, _util.warn)(`Failed to load font '${nativeFontFace.family}': '${ex}'.`);\n font.disableFontFace = true;\n throw ex;\n }\n }\n return;\n }\n const rule = font.createFontFaceRule();\n if (rule) {\n this.insertRule(rule);\n if (this.isSyncFontLoadingSupported) {\n return;\n }\n await new Promise(resolve => {\n const request = this._queueLoadingCallback(resolve);\n this._prepareFontLoadEvent(font, request);\n });\n }\n }\n get isFontLoadingAPISupported() {\n const hasFonts = !!this._document?.fonts;\n return (0, _util.shadow)(this, \"isFontLoadingAPISupported\", hasFonts);\n }\n get isSyncFontLoadingSupported() {\n let supported = false;\n if (_util.isNodeJS) {\n supported = true;\n } else if (typeof navigator !== \"undefined\" && /Mozilla\\/5.0.*?rv:\\d+.*? Gecko/.test(navigator.userAgent)) {\n supported = true;\n }\n return (0, _util.shadow)(this, \"isSyncFontLoadingSupported\", supported);\n }\n _queueLoadingCallback(callback) {\n function completeRequest() {\n (0, _util.assert)(!request.done, \"completeRequest() cannot be called twice.\");\n request.done = true;\n while (loadingRequests.length > 0 && loadingRequests[0].done) {\n const otherRequest = loadingRequests.shift();\n setTimeout(otherRequest.callback, 0);\n }\n }\n const {\n loadingRequests\n } = this;\n const request = {\n done: false,\n complete: completeRequest,\n callback\n };\n loadingRequests.push(request);\n return request;\n }\n get _loadTestFont() {\n const testFont = atob(\"T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQA\" + \"FQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAA\" + \"ALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgA\" + \"AAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1\" + \"AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQ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" + \"AQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3\" + \"Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTj\" + \"FQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==\");\n return (0, _util.shadow)(this, \"_loadTestFont\", testFont);\n }\n _prepareFontLoadEvent(font, request) {\n function int32(data, offset) {\n return data.charCodeAt(offset) << 24 | data.charCodeAt(offset + 1) << 16 | data.charCodeAt(offset + 2) << 8 | data.charCodeAt(offset + 3) & 0xff;\n }\n function spliceString(s, offset, remove, insert) {\n const chunk1 = s.substring(0, offset);\n const chunk2 = s.substring(offset + remove);\n return chunk1 + insert + chunk2;\n }\n let i, ii;\n const canvas = this._document.createElement(\"canvas\");\n canvas.width = 1;\n canvas.height = 1;\n const ctx = canvas.getContext(\"2d\");\n let called = 0;\n function isFontReady(name, callback) {\n if (++called > 30) {\n (0, _util.warn)(\"Load test font never loaded.\");\n callback();\n return;\n }\n ctx.font = \"30px \" + name;\n ctx.fillText(\".\", 0, 20);\n const imageData = ctx.getImageData(0, 0, 1, 1);\n if (imageData.data[3] > 0) {\n callback();\n return;\n }\n setTimeout(isFontReady.bind(null, name, callback));\n }\n const loadTestFontId = `lt${Date.now()}${this.loadTestFontId++}`;\n let data = this._loadTestFont;\n const COMMENT_OFFSET = 976;\n data = spliceString(data, COMMENT_OFFSET, loadTestFontId.length, loadTestFontId);\n const CFF_CHECKSUM_OFFSET = 16;\n const XXXX_VALUE = 0x58585858;\n let checksum = int32(data, CFF_CHECKSUM_OFFSET);\n for (i = 0, ii = loadTestFontId.length - 3; i < ii; i += 4) {\n checksum = checksum - XXXX_VALUE + int32(loadTestFontId, i) | 0;\n }\n if (i < loadTestFontId.length) {\n checksum = checksum - XXXX_VALUE + int32(loadTestFontId + \"XXX\", i) | 0;\n }\n data = spliceString(data, CFF_CHECKSUM_OFFSET, 4, (0, _util.string32)(checksum));\n const url = `url(data:font/opentype;base64,${btoa(data)});`;\n const rule = `@font-face {font-family:\"${loadTestFontId}\";src:${url}}`;\n this.insertRule(rule);\n const div = this._document.createElement(\"div\");\n div.style.visibility = \"hidden\";\n div.style.width = div.style.height = \"10px\";\n div.style.position = \"absolute\";\n div.style.top = div.style.left = \"0px\";\n for (const name of [font.loadedName, loadTestFontId]) {\n const span = this._document.createElement(\"span\");\n span.textContent = \"Hi\";\n span.style.fontFamily = name;\n div.append(span);\n }\n this._document.body.append(div);\n isFontReady(loadTestFontId, () => {\n div.remove();\n request.complete();\n });\n }\n}\nexports.FontLoader = FontLoader;\nclass FontFaceObject {\n constructor(translatedData, {\n isEvalSupported = true,\n disableFontFace = false,\n ignoreErrors = false,\n inspectFont = null\n }) {\n this.compiledGlyphs = Object.create(null);\n for (const i in translatedData) {\n this[i] = translatedData[i];\n }\n this.isEvalSupported = isEvalSupported !== false;\n this.disableFontFace = disableFontFace === true;\n this.ignoreErrors = ignoreErrors === true;\n this._inspectFont = inspectFont;\n }\n createNativeFontFace() {\n if (!this.data || this.disableFontFace) {\n return null;\n }\n let nativeFontFace;\n if (!this.cssFontInfo) {\n nativeFontFace = new FontFace(this.loadedName, this.data, {});\n } else {\n const css = {\n weight: this.cssFontInfo.fontWeight\n };\n if (this.cssFontInfo.italicAngle) {\n css.style = `oblique ${this.cssFontInfo.italicAngle}deg`;\n }\n nativeFontFace = new FontFace(this.cssFontInfo.fontFamily, this.data, css);\n }\n this._inspectFont?.(this);\n return nativeFontFace;\n }\n createFontFaceRule() {\n if (!this.data || this.disableFontFace) {\n return null;\n }\n const data = (0, _util.bytesToString)(this.data);\n const url = `url(data:${this.mimetype};base64,${btoa(data)});`;\n let rule;\n if (!this.cssFontInfo) {\n rule = `@font-face {font-family:\"${this.loadedName}\";src:${url}}`;\n } else {\n let css = `font-weight: ${this.cssFontInfo.fontWeight};`;\n if (this.cssFontInfo.italicAngle) {\n css += `font-style: oblique ${this.cssFontInfo.italicAngle}deg;`;\n }\n rule = `@font-face {font-family:\"${this.cssFontInfo.fontFamily}\";${css}src:${url}}`;\n }\n this._inspectFont?.(this, url);\n return rule;\n }\n getPathGenerator(objs, character) {\n if (this.compiledGlyphs[character] !== undefined) {\n return this.compiledGlyphs[character];\n }\n let cmds;\n try {\n cmds = objs.get(this.loadedName + \"_path_\" + character);\n } catch (ex) {\n if (!this.ignoreErrors) {\n throw ex;\n }\n (0, _util.warn)(`getPathGenerator - ignoring character: \"${ex}\".`);\n return this.compiledGlyphs[character] = function (c, size) {};\n }\n if (this.isEvalSupported && _util.FeatureTest.isEvalSupported) {\n const jsBuf = [];\n for (const current of cmds) {\n const args = current.args !== undefined ? current.args.join(\",\") : \"\";\n jsBuf.push(\"c.\", current.cmd, \"(\", args, \");\\n\");\n }\n return this.compiledGlyphs[character] = new Function(\"c\", \"size\", jsBuf.join(\"\"));\n }\n return this.compiledGlyphs[character] = function (c, size) {\n for (const current of cmds) {\n if (current.cmd === \"scale\") {\n current.args = [size, -size];\n }\n c[current.cmd].apply(c, current.args);\n }\n };\n }\n}\nexports.FontFaceObject = FontFaceObject;\n\n/***/ }),\n/* 10 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.NodeStandardFontDataFactory = exports.NodeFilterFactory = exports.NodeCanvasFactory = exports.NodeCMapReaderFactory = void 0;\nvar _base_factory = __w_pdfjs_require__(7);\nvar _util = __w_pdfjs_require__(1);\n;\n;\nconst fetchData = function (url) {\n return new Promise((resolve, reject) => {\n const fs = require(\"fs\");\n fs.readFile(url, (error, data) => {\n if (error || !data) {\n reject(new Error(error));\n return;\n }\n resolve(new Uint8Array(data));\n });\n });\n};\nclass NodeFilterFactory extends _base_factory.BaseFilterFactory {}\nexports.NodeFilterFactory = NodeFilterFactory;\nclass NodeCanvasFactory extends _base_factory.BaseCanvasFactory {\n _createCanvas(width, height) {\n const Canvas = require(\"canvas\");\n return Canvas.createCanvas(width, height);\n }\n}\nexports.NodeCanvasFactory = NodeCanvasFactory;\nclass NodeCMapReaderFactory extends _base_factory.BaseCMapReaderFactory {\n _fetchData(url, compressionType) {\n return fetchData(url).then(data => {\n return {\n cMapData: data,\n compressionType\n };\n });\n }\n}\nexports.NodeCMapReaderFactory = NodeCMapReaderFactory;\nclass NodeStandardFontDataFactory extends _base_factory.BaseStandardFontDataFactory {\n _fetchData(url) {\n return fetchData(url);\n }\n}\nexports.NodeStandardFontDataFactory = NodeStandardFontDataFactory;\n\n/***/ }),\n/* 11 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.CanvasGraphics = void 0;\nvar _util = __w_pdfjs_require__(1);\nvar _display_utils = __w_pdfjs_require__(6);\nvar _pattern_helper = __w_pdfjs_require__(12);\nvar _image_utils = __w_pdfjs_require__(13);\nconst MIN_FONT_SIZE = 16;\nconst MAX_FONT_SIZE = 100;\nconst MAX_GROUP_SIZE = 4096;\nconst EXECUTION_TIME = 15;\nconst EXECUTION_STEPS = 10;\nconst MAX_SIZE_TO_COMPILE = 1000;\nconst FULL_CHUNK_HEIGHT = 16;\nfunction mirrorContextOperations(ctx, destCtx) {\n if (ctx._removeMirroring) {\n throw new Error(\"Context is already forwarding operations.\");\n }\n ctx.__originalSave = ctx.save;\n ctx.__originalRestore = ctx.restore;\n ctx.__originalRotate = ctx.rotate;\n ctx.__originalScale = ctx.scale;\n ctx.__originalTranslate = ctx.translate;\n ctx.__originalTransform = ctx.transform;\n ctx.__originalSetTransform = ctx.setTransform;\n ctx.__originalResetTransform = ctx.resetTransform;\n ctx.__originalClip = ctx.clip;\n ctx.__originalMoveTo = ctx.moveTo;\n ctx.__originalLineTo = ctx.lineTo;\n ctx.__originalBezierCurveTo = ctx.bezierCurveTo;\n ctx.__originalRect = ctx.rect;\n ctx.__originalClosePath = ctx.closePath;\n ctx.__originalBeginPath = ctx.beginPath;\n ctx._removeMirroring = () => {\n ctx.save = ctx.__originalSave;\n ctx.restore = ctx.__originalRestore;\n ctx.rotate = ctx.__originalRotate;\n ctx.scale = ctx.__originalScale;\n ctx.translate = ctx.__originalTranslate;\n ctx.transform = ctx.__originalTransform;\n ctx.setTransform = ctx.__originalSetTransform;\n ctx.resetTransform = ctx.__originalResetTransform;\n ctx.clip = ctx.__originalClip;\n ctx.moveTo = ctx.__originalMoveTo;\n ctx.lineTo = ctx.__originalLineTo;\n ctx.bezierCurveTo = ctx.__originalBezierCurveTo;\n ctx.rect = ctx.__originalRect;\n ctx.closePath = ctx.__originalClosePath;\n ctx.beginPath = ctx.__originalBeginPath;\n delete ctx._removeMirroring;\n };\n ctx.save = function ctxSave() {\n destCtx.save();\n this.__originalSave();\n };\n ctx.restore = function ctxRestore() {\n destCtx.restore();\n this.__originalRestore();\n };\n ctx.translate = function ctxTranslate(x, y) {\n destCtx.translate(x, y);\n this.__originalTranslate(x, y);\n };\n ctx.scale = function ctxScale(x, y) {\n destCtx.scale(x, y);\n this.__originalScale(x, y);\n };\n ctx.transform = function ctxTransform(a, b, c, d, e, f) {\n destCtx.transform(a, b, c, d, e, f);\n this.__originalTransform(a, b, c, d, e, f);\n };\n ctx.setTransform = function ctxSetTransform(a, b, c, d, e, f) {\n destCtx.setTransform(a, b, c, d, e, f);\n this.__originalSetTransform(a, b, c, d, e, f);\n };\n ctx.resetTransform = function ctxResetTransform() {\n destCtx.resetTransform();\n this.__originalResetTransform();\n };\n ctx.rotate = function ctxRotate(angle) {\n destCtx.rotate(angle);\n this.__originalRotate(angle);\n };\n ctx.clip = function ctxRotate(rule) {\n destCtx.clip(rule);\n this.__originalClip(rule);\n };\n ctx.moveTo = function (x, y) {\n destCtx.moveTo(x, y);\n this.__originalMoveTo(x, y);\n };\n ctx.lineTo = function (x, y) {\n destCtx.lineTo(x, y);\n this.__originalLineTo(x, y);\n };\n ctx.bezierCurveTo = function (cp1x, cp1y, cp2x, cp2y, x, y) {\n destCtx.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);\n this.__originalBezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y);\n };\n ctx.rect = function (x, y, width, height) {\n destCtx.rect(x, y, width, height);\n this.__originalRect(x, y, width, height);\n };\n ctx.closePath = function () {\n destCtx.closePath();\n this.__originalClosePath();\n };\n ctx.beginPath = function () {\n destCtx.beginPath();\n this.__originalBeginPath();\n };\n}\nclass CachedCanvases {\n constructor(canvasFactory) {\n this.canvasFactory = canvasFactory;\n this.cache = Object.create(null);\n }\n getCanvas(id, width, height) {\n let canvasEntry;\n if (this.cache[id] !== undefined) {\n canvasEntry = this.cache[id];\n this.canvasFactory.reset(canvasEntry, width, height);\n } else {\n canvasEntry = this.canvasFactory.create(width, height);\n this.cache[id] = canvasEntry;\n }\n return canvasEntry;\n }\n delete(id) {\n delete this.cache[id];\n }\n clear() {\n for (const id in this.cache) {\n const canvasEntry = this.cache[id];\n this.canvasFactory.destroy(canvasEntry);\n delete this.cache[id];\n }\n }\n}\nfunction drawImageAtIntegerCoords(ctx, srcImg, srcX, srcY, srcW, srcH, destX, destY, destW, destH) {\n const [a, b, c, d, tx, ty] = (0, _display_utils.getCurrentTransform)(ctx);\n if (b === 0 && c === 0) {\n const tlX = destX * a + tx;\n const rTlX = Math.round(tlX);\n const tlY = destY * d + ty;\n const rTlY = Math.round(tlY);\n const brX = (destX + destW) * a + tx;\n const rWidth = Math.abs(Math.round(brX) - rTlX) || 1;\n const brY = (destY + destH) * d + ty;\n const rHeight = Math.abs(Math.round(brY) - rTlY) || 1;\n ctx.setTransform(Math.sign(a), 0, 0, Math.sign(d), rTlX, rTlY);\n ctx.drawImage(srcImg, srcX, srcY, srcW, srcH, 0, 0, rWidth, rHeight);\n ctx.setTransform(a, b, c, d, tx, ty);\n return [rWidth, rHeight];\n }\n if (a === 0 && d === 0) {\n const tlX = destY * c + tx;\n const rTlX = Math.round(tlX);\n const tlY = destX * b + ty;\n const rTlY = Math.round(tlY);\n const brX = (destY + destH) * c + tx;\n const rWidth = Math.abs(Math.round(brX) - rTlX) || 1;\n const brY = (destX + destW) * b + ty;\n const rHeight = Math.abs(Math.round(brY) - rTlY) || 1;\n ctx.setTransform(0, Math.sign(b), Math.sign(c), 0, rTlX, rTlY);\n ctx.drawImage(srcImg, srcX, srcY, srcW, srcH, 0, 0, rHeight, rWidth);\n ctx.setTransform(a, b, c, d, tx, ty);\n return [rHeight, rWidth];\n }\n ctx.drawImage(srcImg, srcX, srcY, srcW, srcH, destX, destY, destW, destH);\n const scaleX = Math.hypot(a, b);\n const scaleY = Math.hypot(c, d);\n return [scaleX * destW, scaleY * destH];\n}\nfunction compileType3Glyph(imgData) {\n const {\n width,\n height\n } = imgData;\n if (width > MAX_SIZE_TO_COMPILE || height > MAX_SIZE_TO_COMPILE) {\n return null;\n }\n const POINT_TO_PROCESS_LIMIT = 1000;\n const POINT_TYPES = new Uint8Array([0, 2, 4, 0, 1, 0, 5, 4, 8, 10, 0, 8, 0, 2, 1, 0]);\n const width1 = width + 1;\n let points = new Uint8Array(width1 * (height + 1));\n let i, j, j0;\n const lineSize = width + 7 & ~7;\n let data = new Uint8Array(lineSize * height),\n pos = 0;\n for (const elem of imgData.data) {\n let mask = 128;\n while (mask > 0) {\n data[pos++] = elem & mask ? 0 : 255;\n mask >>= 1;\n }\n }\n let count = 0;\n pos = 0;\n if (data[pos] !== 0) {\n points[0] = 1;\n ++count;\n }\n for (j = 1; j < width; j++) {\n if (data[pos] !== data[pos + 1]) {\n points[j] = data[pos] ? 2 : 1;\n ++count;\n }\n pos++;\n }\n if (data[pos] !== 0) {\n points[j] = 2;\n ++count;\n }\n for (i = 1; i < height; i++) {\n pos = i * lineSize;\n j0 = i * width1;\n if (data[pos - lineSize] !== data[pos]) {\n points[j0] = data[pos] ? 1 : 8;\n ++count;\n }\n let sum = (data[pos] ? 4 : 0) + (data[pos - lineSize] ? 8 : 0);\n for (j = 1; j < width; j++) {\n sum = (sum >> 2) + (data[pos + 1] ? 4 : 0) + (data[pos - lineSize + 1] ? 8 : 0);\n if (POINT_TYPES[sum]) {\n points[j0 + j] = POINT_TYPES[sum];\n ++count;\n }\n pos++;\n }\n if (data[pos - lineSize] !== data[pos]) {\n points[j0 + j] = data[pos] ? 2 : 4;\n ++count;\n }\n if (count > POINT_TO_PROCESS_LIMIT) {\n return null;\n }\n }\n pos = lineSize * (height - 1);\n j0 = i * width1;\n if (data[pos] !== 0) {\n points[j0] = 8;\n ++count;\n }\n for (j = 1; j < width; j++) {\n if (data[pos] !== data[pos + 1]) {\n points[j0 + j] = data[pos] ? 4 : 8;\n ++count;\n }\n pos++;\n }\n if (data[pos] !== 0) {\n points[j0 + j] = 4;\n ++count;\n }\n if (count > POINT_TO_PROCESS_LIMIT) {\n return null;\n }\n const steps = new Int32Array([0, width1, -1, 0, -width1, 0, 0, 0, 1]);\n const path = new Path2D();\n for (i = 0; count && i <= height; i++) {\n let p = i * width1;\n const end = p + width;\n while (p < end && !points[p]) {\n p++;\n }\n if (p === end) {\n continue;\n }\n path.moveTo(p % width1, i);\n const p0 = p;\n let type = points[p];\n do {\n const step = steps[type];\n do {\n p += step;\n } while (!points[p]);\n const pp = points[p];\n if (pp !== 5 && pp !== 10) {\n type = pp;\n points[p] = 0;\n } else {\n type = pp & 0x33 * type >> 4;\n points[p] &= type >> 2 | type << 2;\n }\n path.lineTo(p % width1, p / width1 | 0);\n if (!points[p]) {\n --count;\n }\n } while (p0 !== p);\n --i;\n }\n data = null;\n points = null;\n const drawOutline = function (c) {\n c.save();\n c.scale(1 / width, -1 / height);\n c.translate(0, -height);\n c.fill(path);\n c.beginPath();\n c.restore();\n };\n return drawOutline;\n}\nclass CanvasExtraState {\n constructor(width, height) {\n this.alphaIsShape = false;\n this.fontSize = 0;\n this.fontSizeScale = 1;\n this.textMatrix = _util.IDENTITY_MATRIX;\n this.textMatrixScale = 1;\n this.fontMatrix = _util.FONT_IDENTITY_MATRIX;\n this.leading = 0;\n this.x = 0;\n this.y = 0;\n this.lineX = 0;\n this.lineY = 0;\n this.charSpacing = 0;\n this.wordSpacing = 0;\n this.textHScale = 1;\n this.textRenderingMode = _util.TextRenderingMode.FILL;\n this.textRise = 0;\n this.fillColor = \"#000000\";\n this.strokeColor = \"#000000\";\n this.patternFill = false;\n this.fillAlpha = 1;\n this.strokeAlpha = 1;\n this.lineWidth = 1;\n this.activeSMask = null;\n this.transferMaps = \"none\";\n this.startNewPathAndClipBox([0, 0, width, height]);\n }\n clone() {\n const clone = Object.create(this);\n clone.clipBox = this.clipBox.slice();\n return clone;\n }\n setCurrentPoint(x, y) {\n this.x = x;\n this.y = y;\n }\n updatePathMinMax(transform, x, y) {\n [x, y] = _util.Util.applyTransform([x, y], transform);\n this.minX = Math.min(this.minX, x);\n this.minY = Math.min(this.minY, y);\n this.maxX = Math.max(this.maxX, x);\n this.maxY = Math.max(this.maxY, y);\n }\n updateRectMinMax(transform, rect) {\n const p1 = _util.Util.applyTransform(rect, transform);\n const p2 = _util.Util.applyTransform(rect.slice(2), transform);\n this.minX = Math.min(this.minX, p1[0], p2[0]);\n this.minY = Math.min(this.minY, p1[1], p2[1]);\n this.maxX = Math.max(this.maxX, p1[0], p2[0]);\n this.maxY = Math.max(this.maxY, p1[1], p2[1]);\n }\n updateScalingPathMinMax(transform, minMax) {\n _util.Util.scaleMinMax(transform, minMax);\n this.minX = Math.min(this.minX, minMax[0]);\n this.maxX = Math.max(this.maxX, minMax[1]);\n this.minY = Math.min(this.minY, minMax[2]);\n this.maxY = Math.max(this.maxY, minMax[3]);\n }\n updateCurvePathMinMax(transform, x0, y0, x1, y1, x2, y2, x3, y3, minMax) {\n const box = _util.Util.bezierBoundingBox(x0, y0, x1, y1, x2, y2, x3, y3);\n if (minMax) {\n minMax[0] = Math.min(minMax[0], box[0], box[2]);\n minMax[1] = Math.max(minMax[1], box[0], box[2]);\n minMax[2] = Math.min(minMax[2], box[1], box[3]);\n minMax[3] = Math.max(minMax[3], box[1], box[3]);\n return;\n }\n this.updateRectMinMax(transform, box);\n }\n getPathBoundingBox(pathType = _pattern_helper.PathType.FILL, transform = null) {\n const box = [this.minX, this.minY, this.maxX, this.maxY];\n if (pathType === _pattern_helper.PathType.STROKE) {\n if (!transform) {\n (0, _util.unreachable)(\"Stroke bounding box must include transform.\");\n }\n const scale = _util.Util.singularValueDecompose2dScale(transform);\n const xStrokePad = scale[0] * this.lineWidth / 2;\n const yStrokePad = scale[1] * this.lineWidth / 2;\n box[0] -= xStrokePad;\n box[1] -= yStrokePad;\n box[2] += xStrokePad;\n box[3] += yStrokePad;\n }\n return box;\n }\n updateClipFromPath() {\n const intersect = _util.Util.intersect(this.clipBox, this.getPathBoundingBox());\n this.startNewPathAndClipBox(intersect || [0, 0, 0, 0]);\n }\n isEmptyClip() {\n return this.minX === Infinity;\n }\n startNewPathAndClipBox(box) {\n this.clipBox = box;\n this.minX = Infinity;\n this.minY = Infinity;\n this.maxX = 0;\n this.maxY = 0;\n }\n getClippedPathBoundingBox(pathType = _pattern_helper.PathType.FILL, transform = null) {\n return _util.Util.intersect(this.clipBox, this.getPathBoundingBox(pathType, transform));\n }\n}\nfunction putBinaryImageData(ctx, imgData) {\n if (typeof ImageData !== \"undefined\" && imgData instanceof ImageData) {\n ctx.putImageData(imgData, 0, 0);\n return;\n }\n const height = imgData.height,\n width = imgData.width;\n const partialChunkHeight = height % FULL_CHUNK_HEIGHT;\n const fullChunks = (height - partialChunkHeight) / FULL_CHUNK_HEIGHT;\n const totalChunks = partialChunkHeight === 0 ? fullChunks : fullChunks + 1;\n const chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT);\n let srcPos = 0,\n destPos;\n const src = imgData.data;\n const dest = chunkImgData.data;\n let i, j, thisChunkHeight, elemsInThisChunk;\n if (imgData.kind === _util.ImageKind.GRAYSCALE_1BPP) {\n const srcLength = src.byteLength;\n const dest32 = new Uint32Array(dest.buffer, 0, dest.byteLength >> 2);\n const dest32DataLength = dest32.length;\n const fullSrcDiff = width + 7 >> 3;\n const white = 0xffffffff;\n const black = _util.FeatureTest.isLittleEndian ? 0xff000000 : 0x000000ff;\n for (i = 0; i < totalChunks; i++) {\n thisChunkHeight = i < fullChunks ? FULL_CHUNK_HEIGHT : partialChunkHeight;\n destPos = 0;\n for (j = 0; j < thisChunkHeight; j++) {\n const srcDiff = srcLength - srcPos;\n let k = 0;\n const kEnd = srcDiff > fullSrcDiff ? width : srcDiff * 8 - 7;\n const kEndUnrolled = kEnd & ~7;\n let mask = 0;\n let srcByte = 0;\n for (; k < kEndUnrolled; k += 8) {\n srcByte = src[srcPos++];\n dest32[destPos++] = srcByte & 128 ? white : black;\n dest32[destPos++] = srcByte & 64 ? white : black;\n dest32[destPos++] = srcByte & 32 ? white : black;\n dest32[destPos++] = srcByte & 16 ? white : black;\n dest32[destPos++] = srcByte & 8 ? white : black;\n dest32[destPos++] = srcByte & 4 ? white : black;\n dest32[destPos++] = srcByte & 2 ? white : black;\n dest32[destPos++] = srcByte & 1 ? white : black;\n }\n for (; k < kEnd; k++) {\n if (mask === 0) {\n srcByte = src[srcPos++];\n mask = 128;\n }\n dest32[destPos++] = srcByte & mask ? white : black;\n mask >>= 1;\n }\n }\n while (destPos < dest32DataLength) {\n dest32[destPos++] = 0;\n }\n ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);\n }\n } else if (imgData.kind === _util.ImageKind.RGBA_32BPP) {\n j = 0;\n elemsInThisChunk = width * FULL_CHUNK_HEIGHT * 4;\n for (i = 0; i < fullChunks; i++) {\n dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk));\n srcPos += elemsInThisChunk;\n ctx.putImageData(chunkImgData, 0, j);\n j += FULL_CHUNK_HEIGHT;\n }\n if (i < totalChunks) {\n elemsInThisChunk = width * partialChunkHeight * 4;\n dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk));\n ctx.putImageData(chunkImgData, 0, j);\n }\n } else if (imgData.kind === _util.ImageKind.RGB_24BPP) {\n thisChunkHeight = FULL_CHUNK_HEIGHT;\n elemsInThisChunk = width * thisChunkHeight;\n for (i = 0; i < totalChunks; i++) {\n if (i >= fullChunks) {\n thisChunkHeight = partialChunkHeight;\n elemsInThisChunk = width * thisChunkHeight;\n }\n destPos = 0;\n for (j = elemsInThisChunk; j--;) {\n dest[destPos++] = src[srcPos++];\n dest[destPos++] = src[srcPos++];\n dest[destPos++] = src[srcPos++];\n dest[destPos++] = 255;\n }\n ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);\n }\n } else {\n throw new Error(`bad image kind: ${imgData.kind}`);\n }\n}\nfunction putBinaryImageMask(ctx, imgData) {\n if (imgData.bitmap) {\n ctx.drawImage(imgData.bitmap, 0, 0);\n return;\n }\n const height = imgData.height,\n width = imgData.width;\n const partialChunkHeight = height % FULL_CHUNK_HEIGHT;\n const fullChunks = (height - partialChunkHeight) / FULL_CHUNK_HEIGHT;\n const totalChunks = partialChunkHeight === 0 ? fullChunks : fullChunks + 1;\n const chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT);\n let srcPos = 0;\n const src = imgData.data;\n const dest = chunkImgData.data;\n for (let i = 0; i < totalChunks; i++) {\n const thisChunkHeight = i < fullChunks ? FULL_CHUNK_HEIGHT : partialChunkHeight;\n ({\n srcPos\n } = (0, _image_utils.convertBlackAndWhiteToRGBA)({\n src,\n srcPos,\n dest,\n width,\n height: thisChunkHeight,\n nonBlackColor: 0\n }));\n ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT);\n }\n}\nfunction copyCtxState(sourceCtx, destCtx) {\n const properties = [\"strokeStyle\", \"fillStyle\", \"fillRule\", \"globalAlpha\", \"lineWidth\", \"lineCap\", \"lineJoin\", \"miterLimit\", \"globalCompositeOperation\", \"font\", \"filter\"];\n for (const property of properties) {\n if (sourceCtx[property] !== undefined) {\n destCtx[property] = sourceCtx[property];\n }\n }\n if (sourceCtx.setLineDash !== undefined) {\n destCtx.setLineDash(sourceCtx.getLineDash());\n destCtx.lineDashOffset = sourceCtx.lineDashOffset;\n }\n}\nfunction resetCtxToDefault(ctx) {\n ctx.strokeStyle = ctx.fillStyle = \"#000000\";\n ctx.fillRule = \"nonzero\";\n ctx.globalAlpha = 1;\n ctx.lineWidth = 1;\n ctx.lineCap = \"butt\";\n ctx.lineJoin = \"miter\";\n ctx.miterLimit = 10;\n ctx.globalCompositeOperation = \"source-over\";\n ctx.font = \"10px sans-serif\";\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash([]);\n ctx.lineDashOffset = 0;\n }\n if (!_util.isNodeJS) {\n const {\n filter\n } = ctx;\n if (filter !== \"none\" && filter !== \"\") {\n ctx.filter = \"none\";\n }\n }\n}\nfunction composeSMaskBackdrop(bytes, r0, g0, b0) {\n const length = bytes.length;\n for (let i = 3; i < length; i += 4) {\n const alpha = bytes[i];\n if (alpha === 0) {\n bytes[i - 3] = r0;\n bytes[i - 2] = g0;\n bytes[i - 1] = b0;\n } else if (alpha < 255) {\n const alpha_ = 255 - alpha;\n bytes[i - 3] = bytes[i - 3] * alpha + r0 * alpha_ >> 8;\n bytes[i - 2] = bytes[i - 2] * alpha + g0 * alpha_ >> 8;\n bytes[i - 1] = bytes[i - 1] * alpha + b0 * alpha_ >> 8;\n }\n }\n}\nfunction composeSMaskAlpha(maskData, layerData, transferMap) {\n const length = maskData.length;\n const scale = 1 / 255;\n for (let i = 3; i < length; i += 4) {\n const alpha = transferMap ? transferMap[maskData[i]] : maskData[i];\n layerData[i] = layerData[i] * alpha * scale | 0;\n }\n}\nfunction composeSMaskLuminosity(maskData, layerData, transferMap) {\n const length = maskData.length;\n for (let i = 3; i < length; i += 4) {\n const y = maskData[i - 3] * 77 + maskData[i - 2] * 152 + maskData[i - 1] * 28;\n layerData[i] = transferMap ? layerData[i] * transferMap[y >> 8] >> 8 : layerData[i] * y >> 16;\n }\n}\nfunction genericComposeSMask(maskCtx, layerCtx, width, height, subtype, backdrop, transferMap, layerOffsetX, layerOffsetY, maskOffsetX, maskOffsetY) {\n const hasBackdrop = !!backdrop;\n const r0 = hasBackdrop ? backdrop[0] : 0;\n const g0 = hasBackdrop ? backdrop[1] : 0;\n const b0 = hasBackdrop ? backdrop[2] : 0;\n const composeFn = subtype === \"Luminosity\" ? composeSMaskLuminosity : composeSMaskAlpha;\n const PIXELS_TO_PROCESS = 1048576;\n const chunkSize = Math.min(height, Math.ceil(PIXELS_TO_PROCESS / width));\n for (let row = 0; row < height; row += chunkSize) {\n const chunkHeight = Math.min(chunkSize, height - row);\n const maskData = maskCtx.getImageData(layerOffsetX - maskOffsetX, row + (layerOffsetY - maskOffsetY), width, chunkHeight);\n const layerData = layerCtx.getImageData(layerOffsetX, row + layerOffsetY, width, chunkHeight);\n if (hasBackdrop) {\n composeSMaskBackdrop(maskData.data, r0, g0, b0);\n }\n composeFn(maskData.data, layerData.data, transferMap);\n layerCtx.putImageData(layerData, layerOffsetX, row + layerOffsetY);\n }\n}\nfunction composeSMask(ctx, smask, layerCtx, layerBox) {\n const layerOffsetX = layerBox[0];\n const layerOffsetY = layerBox[1];\n const layerWidth = layerBox[2] - layerOffsetX;\n const layerHeight = layerBox[3] - layerOffsetY;\n if (layerWidth === 0 || layerHeight === 0) {\n return;\n }\n genericComposeSMask(smask.context, layerCtx, layerWidth, layerHeight, smask.subtype, smask.backdrop, smask.transferMap, layerOffsetX, layerOffsetY, smask.offsetX, smask.offsetY);\n ctx.save();\n ctx.globalAlpha = 1;\n ctx.globalCompositeOperation = \"source-over\";\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(layerCtx.canvas, 0, 0);\n ctx.restore();\n}\nfunction getImageSmoothingEnabled(transform, interpolate) {\n const scale = _util.Util.singularValueDecompose2dScale(transform);\n scale[0] = Math.fround(scale[0]);\n scale[1] = Math.fround(scale[1]);\n const actualScale = Math.fround((globalThis.devicePixelRatio || 1) * _display_utils.PixelsPerInch.PDF_TO_CSS_UNITS);\n if (interpolate !== undefined) {\n return interpolate;\n } else if (scale[0] <= actualScale || scale[1] <= actualScale) {\n return true;\n }\n return false;\n}\nconst LINE_CAP_STYLES = [\"butt\", \"round\", \"square\"];\nconst LINE_JOIN_STYLES = [\"miter\", \"round\", \"bevel\"];\nconst NORMAL_CLIP = {};\nconst EO_CLIP = {};\nclass CanvasGraphics {\n constructor(canvasCtx, commonObjs, objs, canvasFactory, filterFactory, {\n optionalContentConfig,\n markedContentStack = null\n }, annotationCanvasMap, pageColors) {\n this.ctx = canvasCtx;\n this.current = new CanvasExtraState(this.ctx.canvas.width, this.ctx.canvas.height);\n this.stateStack = [];\n this.pendingClip = null;\n this.pendingEOFill = false;\n this.res = null;\n this.xobjs = null;\n this.commonObjs = commonObjs;\n this.objs = objs;\n this.canvasFactory = canvasFactory;\n this.filterFactory = filterFactory;\n this.groupStack = [];\n this.processingType3 = null;\n this.baseTransform = null;\n this.baseTransformStack = [];\n this.groupLevel = 0;\n this.smaskStack = [];\n this.smaskCounter = 0;\n this.tempSMask = null;\n this.suspendedCtx = null;\n this.contentVisible = true;\n this.markedContentStack = markedContentStack || [];\n this.optionalContentConfig = optionalContentConfig;\n this.cachedCanvases = new CachedCanvases(this.canvasFactory);\n this.cachedPatterns = new Map();\n this.annotationCanvasMap = annotationCanvasMap;\n this.viewportScale = 1;\n this.outputScaleX = 1;\n this.outputScaleY = 1;\n this.pageColors = pageColors;\n this._cachedScaleForStroking = [-1, 0];\n this._cachedGetSinglePixelWidth = null;\n this._cachedBitmapsMap = new Map();\n }\n getObject(data, fallback = null) {\n if (typeof data === \"string\") {\n return data.startsWith(\"g_\") ? this.commonObjs.get(data) : this.objs.get(data);\n }\n return fallback;\n }\n beginDrawing({\n transform,\n viewport,\n transparency = false,\n background = null\n }) {\n const width = this.ctx.canvas.width;\n const height = this.ctx.canvas.height;\n const savedFillStyle = this.ctx.fillStyle;\n this.ctx.fillStyle = background || \"#ffffff\";\n this.ctx.fillRect(0, 0, width, height);\n this.ctx.fillStyle = savedFillStyle;\n if (transparency) {\n const transparentCanvas = this.cachedCanvases.getCanvas(\"transparent\", width, height);\n this.compositeCtx = this.ctx;\n this.transparentCanvas = transparentCanvas.canvas;\n this.ctx = transparentCanvas.context;\n this.ctx.save();\n this.ctx.transform(...(0, _display_utils.getCurrentTransform)(this.compositeCtx));\n }\n this.ctx.save();\n resetCtxToDefault(this.ctx);\n if (transform) {\n this.ctx.transform(...transform);\n this.outputScaleX = transform[0];\n this.outputScaleY = transform[0];\n }\n this.ctx.transform(...viewport.transform);\n this.viewportScale = viewport.scale;\n this.baseTransform = (0, _display_utils.getCurrentTransform)(this.ctx);\n }\n executeOperatorList(operatorList, executionStartIdx, continueCallback, stepper) {\n const argsArray = operatorList.argsArray;\n const fnArray = operatorList.fnArray;\n let i = executionStartIdx || 0;\n const argsArrayLen = argsArray.length;\n if (argsArrayLen === i) {\n return i;\n }\n const chunkOperations = argsArrayLen - i > EXECUTION_STEPS && typeof continueCallback === \"function\";\n const endTime = chunkOperations ? Date.now() + EXECUTION_TIME : 0;\n let steps = 0;\n const commonObjs = this.commonObjs;\n const objs = this.objs;\n let fnId;\n while (true) {\n if (stepper !== undefined && i === stepper.nextBreakPoint) {\n stepper.breakIt(i, continueCallback);\n return i;\n }\n fnId = fnArray[i];\n if (fnId !== _util.OPS.dependency) {\n this[fnId].apply(this, argsArray[i]);\n } else {\n for (const depObjId of argsArray[i]) {\n const objsPool = depObjId.startsWith(\"g_\") ? commonObjs : objs;\n if (!objsPool.has(depObjId)) {\n objsPool.get(depObjId, continueCallback);\n return i;\n }\n }\n }\n i++;\n if (i === argsArrayLen) {\n return i;\n }\n if (chunkOperations && ++steps > EXECUTION_STEPS) {\n if (Date.now() > endTime) {\n continueCallback();\n return i;\n }\n steps = 0;\n }\n }\n }\n #restoreInitialState() {\n while (this.stateStack.length || this.inSMaskMode) {\n this.restore();\n }\n this.ctx.restore();\n if (this.transparentCanvas) {\n this.ctx = this.compositeCtx;\n this.ctx.save();\n this.ctx.setTransform(1, 0, 0, 1, 0, 0);\n this.ctx.drawImage(this.transparentCanvas, 0, 0);\n this.ctx.restore();\n this.transparentCanvas = null;\n }\n }\n endDrawing() {\n this.#restoreInitialState();\n this.cachedCanvases.clear();\n this.cachedPatterns.clear();\n for (const cache of this._cachedBitmapsMap.values()) {\n for (const canvas of cache.values()) {\n if (typeof HTMLCanvasElement !== \"undefined\" && canvas instanceof HTMLCanvasElement) {\n canvas.width = canvas.height = 0;\n }\n }\n cache.clear();\n }\n this._cachedBitmapsMap.clear();\n this.#drawFilter();\n }\n #drawFilter() {\n if (this.pageColors) {\n const hcmFilterId = this.filterFactory.addHCMFilter(this.pageColors.foreground, this.pageColors.background);\n if (hcmFilterId !== \"none\") {\n const savedFilter = this.ctx.filter;\n this.ctx.filter = hcmFilterId;\n this.ctx.drawImage(this.ctx.canvas, 0, 0);\n this.ctx.filter = savedFilter;\n }\n }\n }\n _scaleImage(img, inverseTransform) {\n const width = img.width;\n const height = img.height;\n let widthScale = Math.max(Math.hypot(inverseTransform[0], inverseTransform[1]), 1);\n let heightScale = Math.max(Math.hypot(inverseTransform[2], inverseTransform[3]), 1);\n let paintWidth = width,\n paintHeight = height;\n let tmpCanvasId = \"prescale1\";\n let tmpCanvas, tmpCtx;\n while (widthScale > 2 && paintWidth > 1 || heightScale > 2 && paintHeight > 1) {\n let newWidth = paintWidth,\n newHeight = paintHeight;\n if (widthScale > 2 && paintWidth > 1) {\n newWidth = paintWidth >= 16384 ? Math.floor(paintWidth / 2) - 1 || 1 : Math.ceil(paintWidth / 2);\n widthScale /= paintWidth / newWidth;\n }\n if (heightScale > 2 && paintHeight > 1) {\n newHeight = paintHeight >= 16384 ? Math.floor(paintHeight / 2) - 1 || 1 : Math.ceil(paintHeight) / 2;\n heightScale /= paintHeight / newHeight;\n }\n tmpCanvas = this.cachedCanvases.getCanvas(tmpCanvasId, newWidth, newHeight);\n tmpCtx = tmpCanvas.context;\n tmpCtx.clearRect(0, 0, newWidth, newHeight);\n tmpCtx.drawImage(img, 0, 0, paintWidth, paintHeight, 0, 0, newWidth, newHeight);\n img = tmpCanvas.canvas;\n paintWidth = newWidth;\n paintHeight = newHeight;\n tmpCanvasId = tmpCanvasId === \"prescale1\" ? \"prescale2\" : \"prescale1\";\n }\n return {\n img,\n paintWidth,\n paintHeight\n };\n }\n _createMaskCanvas(img) {\n const ctx = this.ctx;\n const {\n width,\n height\n } = img;\n const fillColor = this.current.fillColor;\n const isPatternFill = this.current.patternFill;\n const currentTransform = (0, _display_utils.getCurrentTransform)(ctx);\n let cache, cacheKey, scaled, maskCanvas;\n if ((img.bitmap || img.data) && img.count > 1) {\n const mainKey = img.bitmap || img.data.buffer;\n cacheKey = JSON.stringify(isPatternFill ? currentTransform : [currentTransform.slice(0, 4), fillColor]);\n cache = this._cachedBitmapsMap.get(mainKey);\n if (!cache) {\n cache = new Map();\n this._cachedBitmapsMap.set(mainKey, cache);\n }\n const cachedImage = cache.get(cacheKey);\n if (cachedImage && !isPatternFill) {\n const offsetX = Math.round(Math.min(currentTransform[0], currentTransform[2]) + currentTransform[4]);\n const offsetY = Math.round(Math.min(currentTransform[1], currentTransform[3]) + currentTransform[5]);\n return {\n canvas: cachedImage,\n offsetX,\n offsetY\n };\n }\n scaled = cachedImage;\n }\n if (!scaled) {\n maskCanvas = this.cachedCanvases.getCanvas(\"maskCanvas\", width, height);\n putBinaryImageMask(maskCanvas.context, img);\n }\n let maskToCanvas = _util.Util.transform(currentTransform, [1 / width, 0, 0, -1 / height, 0, 0]);\n maskToCanvas = _util.Util.transform(maskToCanvas, [1, 0, 0, 1, 0, -height]);\n const cord1 = _util.Util.applyTransform([0, 0], maskToCanvas);\n const cord2 = _util.Util.applyTransform([width, height], maskToCanvas);\n const rect = _util.Util.normalizeRect([cord1[0], cord1[1], cord2[0], cord2[1]]);\n const drawnWidth = Math.round(rect[2] - rect[0]) || 1;\n const drawnHeight = Math.round(rect[3] - rect[1]) || 1;\n const fillCanvas = this.cachedCanvases.getCanvas(\"fillCanvas\", drawnWidth, drawnHeight);\n const fillCtx = fillCanvas.context;\n const offsetX = Math.min(cord1[0], cord2[0]);\n const offsetY = Math.min(cord1[1], cord2[1]);\n fillCtx.translate(-offsetX, -offsetY);\n fillCtx.transform(...maskToCanvas);\n if (!scaled) {\n scaled = this._scaleImage(maskCanvas.canvas, (0, _display_utils.getCurrentTransformInverse)(fillCtx));\n scaled = scaled.img;\n if (cache && isPatternFill) {\n cache.set(cacheKey, scaled);\n }\n }\n fillCtx.imageSmoothingEnabled = getImageSmoothingEnabled((0, _display_utils.getCurrentTransform)(fillCtx), img.interpolate);\n drawImageAtIntegerCoords(fillCtx, scaled, 0, 0, scaled.width, scaled.height, 0, 0, width, height);\n fillCtx.globalCompositeOperation = \"source-in\";\n const inverse = _util.Util.transform((0, _display_utils.getCurrentTransformInverse)(fillCtx), [1, 0, 0, 1, -offsetX, -offsetY]);\n fillCtx.fillStyle = isPatternFill ? fillColor.getPattern(ctx, this, inverse, _pattern_helper.PathType.FILL) : fillColor;\n fillCtx.fillRect(0, 0, width, height);\n if (cache && !isPatternFill) {\n this.cachedCanvases.delete(\"fillCanvas\");\n cache.set(cacheKey, fillCanvas.canvas);\n }\n return {\n canvas: fillCanvas.canvas,\n offsetX: Math.round(offsetX),\n offsetY: Math.round(offsetY)\n };\n }\n setLineWidth(width) {\n if (width !== this.current.lineWidth) {\n this._cachedScaleForStroking[0] = -1;\n }\n this.current.lineWidth = width;\n this.ctx.lineWidth = width;\n }\n setLineCap(style) {\n this.ctx.lineCap = LINE_CAP_STYLES[style];\n }\n setLineJoin(style) {\n this.ctx.lineJoin = LINE_JOIN_STYLES[style];\n }\n setMiterLimit(limit) {\n this.ctx.miterLimit = limit;\n }\n setDash(dashArray, dashPhase) {\n const ctx = this.ctx;\n if (ctx.setLineDash !== undefined) {\n ctx.setLineDash(dashArray);\n ctx.lineDashOffset = dashPhase;\n }\n }\n setRenderingIntent(intent) {}\n setFlatness(flatness) {}\n setGState(states) {\n for (const [key, value] of states) {\n switch (key) {\n case \"LW\":\n this.setLineWidth(value);\n break;\n case \"LC\":\n this.setLineCap(value);\n break;\n case \"LJ\":\n this.setLineJoin(value);\n break;\n case \"ML\":\n this.setMiterLimit(value);\n break;\n case \"D\":\n this.setDash(value[0], value[1]);\n break;\n case \"RI\":\n this.setRenderingIntent(value);\n break;\n case \"FL\":\n this.setFlatness(value);\n break;\n case \"Font\":\n this.setFont(value[0], value[1]);\n break;\n case \"CA\":\n this.current.strokeAlpha = value;\n break;\n case \"ca\":\n this.current.fillAlpha = value;\n this.ctx.globalAlpha = value;\n break;\n case \"BM\":\n this.ctx.globalCompositeOperation = value;\n break;\n case \"SMask\":\n this.current.activeSMask = value ? this.tempSMask : null;\n this.tempSMask = null;\n this.checkSMaskState();\n break;\n case \"TR\":\n this.ctx.filter = this.current.transferMaps = this.filterFactory.addFilter(value);\n break;\n }\n }\n }\n get inSMaskMode() {\n return !!this.suspendedCtx;\n }\n checkSMaskState() {\n const inSMaskMode = this.inSMaskMode;\n if (this.current.activeSMask && !inSMaskMode) {\n this.beginSMaskMode();\n } else if (!this.current.activeSMask && inSMaskMode) {\n this.endSMaskMode();\n }\n }\n beginSMaskMode() {\n if (this.inSMaskMode) {\n throw new Error(\"beginSMaskMode called while already in smask mode\");\n }\n const drawnWidth = this.ctx.canvas.width;\n const drawnHeight = this.ctx.canvas.height;\n const cacheId = \"smaskGroupAt\" + this.groupLevel;\n const scratchCanvas = this.cachedCanvases.getCanvas(cacheId, drawnWidth, drawnHeight);\n this.suspendedCtx = this.ctx;\n this.ctx = scratchCanvas.context;\n const ctx = this.ctx;\n ctx.setTransform(...(0, _display_utils.getCurrentTransform)(this.suspendedCtx));\n copyCtxState(this.suspendedCtx, ctx);\n mirrorContextOperations(ctx, this.suspendedCtx);\n this.setGState([[\"BM\", \"source-over\"], [\"ca\", 1], [\"CA\", 1]]);\n }\n endSMaskMode() {\n if (!this.inSMaskMode) {\n throw new Error(\"endSMaskMode called while not in smask mode\");\n }\n this.ctx._removeMirroring();\n copyCtxState(this.ctx, this.suspendedCtx);\n this.ctx = this.suspendedCtx;\n this.suspendedCtx = null;\n }\n compose(dirtyBox) {\n if (!this.current.activeSMask) {\n return;\n }\n if (!dirtyBox) {\n dirtyBox = [0, 0, this.ctx.canvas.width, this.ctx.canvas.height];\n } else {\n dirtyBox[0] = Math.floor(dirtyBox[0]);\n dirtyBox[1] = Math.floor(dirtyBox[1]);\n dirtyBox[2] = Math.ceil(dirtyBox[2]);\n dirtyBox[3] = Math.ceil(dirtyBox[3]);\n }\n const smask = this.current.activeSMask;\n const suspendedCtx = this.suspendedCtx;\n composeSMask(suspendedCtx, smask, this.ctx, dirtyBox);\n this.ctx.save();\n this.ctx.setTransform(1, 0, 0, 1, 0, 0);\n this.ctx.clearRect(0, 0, this.ctx.canvas.width, this.ctx.canvas.height);\n this.ctx.restore();\n }\n save() {\n if (this.inSMaskMode) {\n copyCtxState(this.ctx, this.suspendedCtx);\n this.suspendedCtx.save();\n } else {\n this.ctx.save();\n }\n const old = this.current;\n this.stateStack.push(old);\n this.current = old.clone();\n }\n restore() {\n if (this.stateStack.length === 0 && this.inSMaskMode) {\n this.endSMaskMode();\n }\n if (this.stateStack.length !== 0) {\n this.current = this.stateStack.pop();\n if (this.inSMaskMode) {\n this.suspendedCtx.restore();\n copyCtxState(this.suspendedCtx, this.ctx);\n } else {\n this.ctx.restore();\n }\n this.checkSMaskState();\n this.pendingClip = null;\n this._cachedScaleForStroking[0] = -1;\n this._cachedGetSinglePixelWidth = null;\n }\n }\n transform(a, b, c, d, e, f) {\n this.ctx.transform(a, b, c, d, e, f);\n this._cachedScaleForStroking[0] = -1;\n this._cachedGetSinglePixelWidth = null;\n }\n constructPath(ops, args, minMax) {\n const ctx = this.ctx;\n const current = this.current;\n let x = current.x,\n y = current.y;\n let startX, startY;\n const currentTransform = (0, _display_utils.getCurrentTransform)(ctx);\n const isScalingMatrix = currentTransform[0] === 0 && currentTransform[3] === 0 || currentTransform[1] === 0 && currentTransform[2] === 0;\n const minMaxForBezier = isScalingMatrix ? minMax.slice(0) : null;\n for (let i = 0, j = 0, ii = ops.length; i < ii; i++) {\n switch (ops[i] | 0) {\n case _util.OPS.rectangle:\n x = args[j++];\n y = args[j++];\n const width = args[j++];\n const height = args[j++];\n const xw = x + width;\n const yh = y + height;\n ctx.moveTo(x, y);\n if (width === 0 || height === 0) {\n ctx.lineTo(xw, yh);\n } else {\n ctx.lineTo(xw, y);\n ctx.lineTo(xw, yh);\n ctx.lineTo(x, yh);\n }\n if (!isScalingMatrix) {\n current.updateRectMinMax(currentTransform, [x, y, xw, yh]);\n }\n ctx.closePath();\n break;\n case _util.OPS.moveTo:\n x = args[j++];\n y = args[j++];\n ctx.moveTo(x, y);\n if (!isScalingMatrix) {\n current.updatePathMinMax(currentTransform, x, y);\n }\n break;\n case _util.OPS.lineTo:\n x = args[j++];\n y = args[j++];\n ctx.lineTo(x, y);\n if (!isScalingMatrix) {\n current.updatePathMinMax(currentTransform, x, y);\n }\n break;\n case _util.OPS.curveTo:\n startX = x;\n startY = y;\n x = args[j + 4];\n y = args[j + 5];\n ctx.bezierCurveTo(args[j], args[j + 1], args[j + 2], args[j + 3], x, y);\n current.updateCurvePathMinMax(currentTransform, startX, startY, args[j], args[j + 1], args[j + 2], args[j + 3], x, y, minMaxForBezier);\n j += 6;\n break;\n case _util.OPS.curveTo2:\n startX = x;\n startY = y;\n ctx.bezierCurveTo(x, y, args[j], args[j + 1], args[j + 2], args[j + 3]);\n current.updateCurvePathMinMax(currentTransform, startX, startY, x, y, args[j], args[j + 1], args[j + 2], args[j + 3], minMaxForBezier);\n x = args[j + 2];\n y = args[j + 3];\n j += 4;\n break;\n case _util.OPS.curveTo3:\n startX = x;\n startY = y;\n x = args[j + 2];\n y = args[j + 3];\n ctx.bezierCurveTo(args[j], args[j + 1], x, y, x, y);\n current.updateCurvePathMinMax(currentTransform, startX, startY, args[j], args[j + 1], x, y, x, y, minMaxForBezier);\n j += 4;\n break;\n case _util.OPS.closePath:\n ctx.closePath();\n break;\n }\n }\n if (isScalingMatrix) {\n current.updateScalingPathMinMax(currentTransform, minMaxForBezier);\n }\n current.setCurrentPoint(x, y);\n }\n closePath() {\n this.ctx.closePath();\n }\n stroke(consumePath = true) {\n const ctx = this.ctx;\n const strokeColor = this.current.strokeColor;\n ctx.globalAlpha = this.current.strokeAlpha;\n if (this.contentVisible) {\n if (typeof strokeColor === \"object\" && strokeColor?.getPattern) {\n ctx.save();\n ctx.strokeStyle = strokeColor.getPattern(ctx, this, (0, _display_utils.getCurrentTransformInverse)(ctx), _pattern_helper.PathType.STROKE);\n this.rescaleAndStroke(false);\n ctx.restore();\n } else {\n this.rescaleAndStroke(true);\n }\n }\n if (consumePath) {\n this.consumePath(this.current.getClippedPathBoundingBox());\n }\n ctx.globalAlpha = this.current.fillAlpha;\n }\n closeStroke() {\n this.closePath();\n this.stroke();\n }\n fill(consumePath = true) {\n const ctx = this.ctx;\n const fillColor = this.current.fillColor;\n const isPatternFill = this.current.patternFill;\n let needRestore = false;\n if (isPatternFill) {\n ctx.save();\n ctx.fillStyle = fillColor.getPattern(ctx, this, (0, _display_utils.getCurrentTransformInverse)(ctx), _pattern_helper.PathType.FILL);\n needRestore = true;\n }\n const intersect = this.current.getClippedPathBoundingBox();\n if (this.contentVisible && intersect !== null) {\n if (this.pendingEOFill) {\n ctx.fill(\"evenodd\");\n this.pendingEOFill = false;\n } else {\n ctx.fill();\n }\n }\n if (needRestore) {\n ctx.restore();\n }\n if (consumePath) {\n this.consumePath(intersect);\n }\n }\n eoFill() {\n this.pendingEOFill = true;\n this.fill();\n }\n fillStroke() {\n this.fill(false);\n this.stroke(false);\n this.consumePath();\n }\n eoFillStroke() {\n this.pendingEOFill = true;\n this.fillStroke();\n }\n closeFillStroke() {\n this.closePath();\n this.fillStroke();\n }\n closeEOFillStroke() {\n this.pendingEOFill = true;\n this.closePath();\n this.fillStroke();\n }\n endPath() {\n this.consumePath();\n }\n clip() {\n this.pendingClip = NORMAL_CLIP;\n }\n eoClip() {\n this.pendingClip = EO_CLIP;\n }\n beginText() {\n this.current.textMatrix = _util.IDENTITY_MATRIX;\n this.current.textMatrixScale = 1;\n this.current.x = this.current.lineX = 0;\n this.current.y = this.current.lineY = 0;\n }\n endText() {\n const paths = this.pendingTextPaths;\n const ctx = this.ctx;\n if (paths === undefined) {\n ctx.beginPath();\n return;\n }\n ctx.save();\n ctx.beginPath();\n for (const path of paths) {\n ctx.setTransform(...path.transform);\n ctx.translate(path.x, path.y);\n path.addToPath(ctx, path.fontSize);\n }\n ctx.restore();\n ctx.clip();\n ctx.beginPath();\n delete this.pendingTextPaths;\n }\n setCharSpacing(spacing) {\n this.current.charSpacing = spacing;\n }\n setWordSpacing(spacing) {\n this.current.wordSpacing = spacing;\n }\n setHScale(scale) {\n this.current.textHScale = scale / 100;\n }\n setLeading(leading) {\n this.current.leading = -leading;\n }\n setFont(fontRefName, size) {\n const fontObj = this.commonObjs.get(fontRefName);\n const current = this.current;\n if (!fontObj) {\n throw new Error(`Can't find font for ${fontRefName}`);\n }\n current.fontMatrix = fontObj.fontMatrix || _util.FONT_IDENTITY_MATRIX;\n if (current.fontMatrix[0] === 0 || current.fontMatrix[3] === 0) {\n (0, _util.warn)(\"Invalid font matrix for font \" + fontRefName);\n }\n if (size < 0) {\n size = -size;\n current.fontDirection = -1;\n } else {\n current.fontDirection = 1;\n }\n this.current.font = fontObj;\n this.current.fontSize = size;\n if (fontObj.isType3Font) {\n return;\n }\n const name = fontObj.loadedName || \"sans-serif\";\n const typeface = fontObj.systemFontInfo?.css || `\"${name}\", ${fontObj.fallbackName}`;\n let bold = \"normal\";\n if (fontObj.black) {\n bold = \"900\";\n } else if (fontObj.bold) {\n bold = \"bold\";\n }\n const italic = fontObj.italic ? \"italic\" : \"normal\";\n let browserFontSize = size;\n if (size < MIN_FONT_SIZE) {\n browserFontSize = MIN_FONT_SIZE;\n } else if (size > MAX_FONT_SIZE) {\n browserFontSize = MAX_FONT_SIZE;\n }\n this.current.fontSizeScale = size / browserFontSize;\n this.ctx.font = `${italic} ${bold} ${browserFontSize}px ${typeface}`;\n }\n setTextRenderingMode(mode) {\n this.current.textRenderingMode = mode;\n }\n setTextRise(rise) {\n this.current.textRise = rise;\n }\n moveText(x, y) {\n this.current.x = this.current.lineX += x;\n this.current.y = this.current.lineY += y;\n }\n setLeadingMoveText(x, y) {\n this.setLeading(-y);\n this.moveText(x, y);\n }\n setTextMatrix(a, b, c, d, e, f) {\n this.current.textMatrix = [a, b, c, d, e, f];\n this.current.textMatrixScale = Math.hypot(a, b);\n this.current.x = this.current.lineX = 0;\n this.current.y = this.current.lineY = 0;\n }\n nextLine() {\n this.moveText(0, this.current.leading);\n }\n paintChar(character, x, y, patternTransform) {\n const ctx = this.ctx;\n const current = this.current;\n const font = current.font;\n const textRenderingMode = current.textRenderingMode;\n const fontSize = current.fontSize / current.fontSizeScale;\n const fillStrokeMode = textRenderingMode & _util.TextRenderingMode.FILL_STROKE_MASK;\n const isAddToPathSet = !!(textRenderingMode & _util.TextRenderingMode.ADD_TO_PATH_FLAG);\n const patternFill = current.patternFill && !font.missingFile;\n let addToPath;\n if (font.disableFontFace || isAddToPathSet || patternFill) {\n addToPath = font.getPathGenerator(this.commonObjs, character);\n }\n if (font.disableFontFace || patternFill) {\n ctx.save();\n ctx.translate(x, y);\n ctx.beginPath();\n addToPath(ctx, fontSize);\n if (patternTransform) {\n ctx.setTransform(...patternTransform);\n }\n if (fillStrokeMode === _util.TextRenderingMode.FILL || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) {\n ctx.fill();\n }\n if (fillStrokeMode === _util.TextRenderingMode.STROKE || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) {\n ctx.stroke();\n }\n ctx.restore();\n } else {\n if (fillStrokeMode === _util.TextRenderingMode.FILL || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) {\n ctx.fillText(character, x, y);\n }\n if (fillStrokeMode === _util.TextRenderingMode.STROKE || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) {\n ctx.strokeText(character, x, y);\n }\n }\n if (isAddToPathSet) {\n const paths = this.pendingTextPaths ||= [];\n paths.push({\n transform: (0, _display_utils.getCurrentTransform)(ctx),\n x,\n y,\n fontSize,\n addToPath\n });\n }\n }\n get isFontSubpixelAAEnabled() {\n const {\n context: ctx\n } = this.cachedCanvases.getCanvas(\"isFontSubpixelAAEnabled\", 10, 10);\n ctx.scale(1.5, 1);\n ctx.fillText(\"I\", 0, 10);\n const data = ctx.getImageData(0, 0, 10, 10).data;\n let enabled = false;\n for (let i = 3; i < data.length; i += 4) {\n if (data[i] > 0 && data[i] < 255) {\n enabled = true;\n break;\n }\n }\n return (0, _util.shadow)(this, \"isFontSubpixelAAEnabled\", enabled);\n }\n showText(glyphs) {\n const current = this.current;\n const font = current.font;\n if (font.isType3Font) {\n return this.showType3Text(glyphs);\n }\n const fontSize = current.fontSize;\n if (fontSize === 0) {\n return undefined;\n }\n const ctx = this.ctx;\n const fontSizeScale = current.fontSizeScale;\n const charSpacing = current.charSpacing;\n const wordSpacing = current.wordSpacing;\n const fontDirection = current.fontDirection;\n const textHScale = current.textHScale * fontDirection;\n const glyphsLength = glyphs.length;\n const vertical = font.vertical;\n const spacingDir = vertical ? 1 : -1;\n const defaultVMetrics = font.defaultVMetrics;\n const widthAdvanceScale = fontSize * current.fontMatrix[0];\n const simpleFillText = current.textRenderingMode === _util.TextRenderingMode.FILL && !font.disableFontFace && !current.patternFill;\n ctx.save();\n ctx.transform(...current.textMatrix);\n ctx.translate(current.x, current.y + current.textRise);\n if (fontDirection > 0) {\n ctx.scale(textHScale, -1);\n } else {\n ctx.scale(textHScale, 1);\n }\n let patternTransform;\n if (current.patternFill) {\n ctx.save();\n const pattern = current.fillColor.getPattern(ctx, this, (0, _display_utils.getCurrentTransformInverse)(ctx), _pattern_helper.PathType.FILL);\n patternTransform = (0, _display_utils.getCurrentTransform)(ctx);\n ctx.restore();\n ctx.fillStyle = pattern;\n }\n let lineWidth = current.lineWidth;\n const scale = current.textMatrixScale;\n if (scale === 0 || lineWidth === 0) {\n const fillStrokeMode = current.textRenderingMode & _util.TextRenderingMode.FILL_STROKE_MASK;\n if (fillStrokeMode === _util.TextRenderingMode.STROKE || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) {\n lineWidth = this.getSinglePixelWidth();\n }\n } else {\n lineWidth /= scale;\n }\n if (fontSizeScale !== 1.0) {\n ctx.scale(fontSizeScale, fontSizeScale);\n lineWidth /= fontSizeScale;\n }\n ctx.lineWidth = lineWidth;\n if (font.isInvalidPDFjsFont) {\n const chars = [];\n let width = 0;\n for (const glyph of glyphs) {\n chars.push(glyph.unicode);\n width += glyph.width;\n }\n ctx.fillText(chars.join(\"\"), 0, 0);\n current.x += width * widthAdvanceScale * textHScale;\n ctx.restore();\n this.compose();\n return undefined;\n }\n let x = 0,\n i;\n for (i = 0; i < glyphsLength; ++i) {\n const glyph = glyphs[i];\n if (typeof glyph === \"number\") {\n x += spacingDir * glyph * fontSize / 1000;\n continue;\n }\n let restoreNeeded = false;\n const spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing;\n const character = glyph.fontChar;\n const accent = glyph.accent;\n let scaledX, scaledY;\n let width = glyph.width;\n if (vertical) {\n const vmetric = glyph.vmetric || defaultVMetrics;\n const vx = -(glyph.vmetric ? vmetric[1] : width * 0.5) * widthAdvanceScale;\n const vy = vmetric[2] * widthAdvanceScale;\n width = vmetric ? -vmetric[0] : width;\n scaledX = vx / fontSizeScale;\n scaledY = (x + vy) / fontSizeScale;\n } else {\n scaledX = x / fontSizeScale;\n scaledY = 0;\n }\n if (font.remeasure && width > 0) {\n const measuredWidth = ctx.measureText(character).width * 1000 / fontSize * fontSizeScale;\n if (width < measuredWidth && this.isFontSubpixelAAEnabled) {\n const characterScaleX = width / measuredWidth;\n restoreNeeded = true;\n ctx.save();\n ctx.scale(characterScaleX, 1);\n scaledX /= characterScaleX;\n } else if (width !== measuredWidth) {\n scaledX += (width - measuredWidth) / 2000 * fontSize / fontSizeScale;\n }\n }\n if (this.contentVisible && (glyph.isInFont || font.missingFile)) {\n if (simpleFillText && !accent) {\n ctx.fillText(character, scaledX, scaledY);\n } else {\n this.paintChar(character, scaledX, scaledY, patternTransform);\n if (accent) {\n const scaledAccentX = scaledX + fontSize * accent.offset.x / fontSizeScale;\n const scaledAccentY = scaledY - fontSize * accent.offset.y / fontSizeScale;\n this.paintChar(accent.fontChar, scaledAccentX, scaledAccentY, patternTransform);\n }\n }\n }\n const charWidth = vertical ? width * widthAdvanceScale - spacing * fontDirection : width * widthAdvanceScale + spacing * fontDirection;\n x += charWidth;\n if (restoreNeeded) {\n ctx.restore();\n }\n }\n if (vertical) {\n current.y -= x;\n } else {\n current.x += x * textHScale;\n }\n ctx.restore();\n this.compose();\n return undefined;\n }\n showType3Text(glyphs) {\n const ctx = this.ctx;\n const current = this.current;\n const font = current.font;\n const fontSize = current.fontSize;\n const fontDirection = current.fontDirection;\n const spacingDir = font.vertical ? 1 : -1;\n const charSpacing = current.charSpacing;\n const wordSpacing = current.wordSpacing;\n const textHScale = current.textHScale * fontDirection;\n const fontMatrix = current.fontMatrix || _util.FONT_IDENTITY_MATRIX;\n const glyphsLength = glyphs.length;\n const isTextInvisible = current.textRenderingMode === _util.TextRenderingMode.INVISIBLE;\n let i, glyph, width, spacingLength;\n if (isTextInvisible || fontSize === 0) {\n return;\n }\n this._cachedScaleForStroking[0] = -1;\n this._cachedGetSinglePixelWidth = null;\n ctx.save();\n ctx.transform(...current.textMatrix);\n ctx.translate(current.x, current.y);\n ctx.scale(textHScale, fontDirection);\n for (i = 0; i < glyphsLength; ++i) {\n glyph = glyphs[i];\n if (typeof glyph === \"number\") {\n spacingLength = spacingDir * glyph * fontSize / 1000;\n this.ctx.translate(spacingLength, 0);\n current.x += spacingLength * textHScale;\n continue;\n }\n const spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing;\n const operatorList = font.charProcOperatorList[glyph.operatorListId];\n if (!operatorList) {\n (0, _util.warn)(`Type3 character \"${glyph.operatorListId}\" is not available.`);\n continue;\n }\n if (this.contentVisible) {\n this.processingType3 = glyph;\n this.save();\n ctx.scale(fontSize, fontSize);\n ctx.transform(...fontMatrix);\n this.executeOperatorList(operatorList);\n this.restore();\n }\n const transformed = _util.Util.applyTransform([glyph.width, 0], fontMatrix);\n width = transformed[0] * fontSize + spacing;\n ctx.translate(width, 0);\n current.x += width * textHScale;\n }\n ctx.restore();\n this.processingType3 = null;\n }\n setCharWidth(xWidth, yWidth) {}\n setCharWidthAndBounds(xWidth, yWidth, llx, lly, urx, ury) {\n this.ctx.rect(llx, lly, urx - llx, ury - lly);\n this.ctx.clip();\n this.endPath();\n }\n getColorN_Pattern(IR) {\n let pattern;\n if (IR[0] === \"TilingPattern\") {\n const color = IR[1];\n const baseTransform = this.baseTransform || (0, _display_utils.getCurrentTransform)(this.ctx);\n const canvasGraphicsFactory = {\n createCanvasGraphics: ctx => {\n return new CanvasGraphics(ctx, this.commonObjs, this.objs, this.canvasFactory, this.filterFactory, {\n optionalContentConfig: this.optionalContentConfig,\n markedContentStack: this.markedContentStack\n });\n }\n };\n pattern = new _pattern_helper.TilingPattern(IR, color, this.ctx, canvasGraphicsFactory, baseTransform);\n } else {\n pattern = this._getPattern(IR[1], IR[2]);\n }\n return pattern;\n }\n setStrokeColorN() {\n this.current.strokeColor = this.getColorN_Pattern(arguments);\n }\n setFillColorN() {\n this.current.fillColor = this.getColorN_Pattern(arguments);\n this.current.patternFill = true;\n }\n setStrokeRGBColor(r, g, b) {\n const color = _util.Util.makeHexColor(r, g, b);\n this.ctx.strokeStyle = color;\n this.current.strokeColor = color;\n }\n setFillRGBColor(r, g, b) {\n const color = _util.Util.makeHexColor(r, g, b);\n this.ctx.fillStyle = color;\n this.current.fillColor = color;\n this.current.patternFill = false;\n }\n _getPattern(objId, matrix = null) {\n let pattern;\n if (this.cachedPatterns.has(objId)) {\n pattern = this.cachedPatterns.get(objId);\n } else {\n pattern = (0, _pattern_helper.getShadingPattern)(this.getObject(objId));\n this.cachedPatterns.set(objId, pattern);\n }\n if (matrix) {\n pattern.matrix = matrix;\n }\n return pattern;\n }\n shadingFill(objId) {\n if (!this.contentVisible) {\n return;\n }\n const ctx = this.ctx;\n this.save();\n const pattern = this._getPattern(objId);\n ctx.fillStyle = pattern.getPattern(ctx, this, (0, _display_utils.getCurrentTransformInverse)(ctx), _pattern_helper.PathType.SHADING);\n const inv = (0, _display_utils.getCurrentTransformInverse)(ctx);\n if (inv) {\n const {\n width,\n height\n } = ctx.canvas;\n const [x0, y0, x1, y1] = _util.Util.getAxialAlignedBoundingBox([0, 0, width, height], inv);\n this.ctx.fillRect(x0, y0, x1 - x0, y1 - y0);\n } else {\n this.ctx.fillRect(-1e10, -1e10, 2e10, 2e10);\n }\n this.compose(this.current.getClippedPathBoundingBox());\n this.restore();\n }\n beginInlineImage() {\n (0, _util.unreachable)(\"Should not call beginInlineImage\");\n }\n beginImageData() {\n (0, _util.unreachable)(\"Should not call beginImageData\");\n }\n paintFormXObjectBegin(matrix, bbox) {\n if (!this.contentVisible) {\n return;\n }\n this.save();\n this.baseTransformStack.push(this.baseTransform);\n if (Array.isArray(matrix) && matrix.length === 6) {\n this.transform(...matrix);\n }\n this.baseTransform = (0, _display_utils.getCurrentTransform)(this.ctx);\n if (bbox) {\n const width = bbox[2] - bbox[0];\n const height = bbox[3] - bbox[1];\n this.ctx.rect(bbox[0], bbox[1], width, height);\n this.current.updateRectMinMax((0, _display_utils.getCurrentTransform)(this.ctx), bbox);\n this.clip();\n this.endPath();\n }\n }\n paintFormXObjectEnd() {\n if (!this.contentVisible) {\n return;\n }\n this.restore();\n this.baseTransform = this.baseTransformStack.pop();\n }\n beginGroup(group) {\n if (!this.contentVisible) {\n return;\n }\n this.save();\n if (this.inSMaskMode) {\n this.endSMaskMode();\n this.current.activeSMask = null;\n }\n const currentCtx = this.ctx;\n if (!group.isolated) {\n (0, _util.info)(\"TODO: Support non-isolated groups.\");\n }\n if (group.knockout) {\n (0, _util.warn)(\"Knockout groups not supported.\");\n }\n const currentTransform = (0, _display_utils.getCurrentTransform)(currentCtx);\n if (group.matrix) {\n currentCtx.transform(...group.matrix);\n }\n if (!group.bbox) {\n throw new Error(\"Bounding box is required.\");\n }\n let bounds = _util.Util.getAxialAlignedBoundingBox(group.bbox, (0, _display_utils.getCurrentTransform)(currentCtx));\n const canvasBounds = [0, 0, currentCtx.canvas.width, currentCtx.canvas.height];\n bounds = _util.Util.intersect(bounds, canvasBounds) || [0, 0, 0, 0];\n const offsetX = Math.floor(bounds[0]);\n const offsetY = Math.floor(bounds[1]);\n let drawnWidth = Math.max(Math.ceil(bounds[2]) - offsetX, 1);\n let drawnHeight = Math.max(Math.ceil(bounds[3]) - offsetY, 1);\n let scaleX = 1,\n scaleY = 1;\n if (drawnWidth > MAX_GROUP_SIZE) {\n scaleX = drawnWidth / MAX_GROUP_SIZE;\n drawnWidth = MAX_GROUP_SIZE;\n }\n if (drawnHeight > MAX_GROUP_SIZE) {\n scaleY = drawnHeight / MAX_GROUP_SIZE;\n drawnHeight = MAX_GROUP_SIZE;\n }\n this.current.startNewPathAndClipBox([0, 0, drawnWidth, drawnHeight]);\n let cacheId = \"groupAt\" + this.groupLevel;\n if (group.smask) {\n cacheId += \"_smask_\" + this.smaskCounter++ % 2;\n }\n const scratchCanvas = this.cachedCanvases.getCanvas(cacheId, drawnWidth, drawnHeight);\n const groupCtx = scratchCanvas.context;\n groupCtx.scale(1 / scaleX, 1 / scaleY);\n groupCtx.translate(-offsetX, -offsetY);\n groupCtx.transform(...currentTransform);\n if (group.smask) {\n this.smaskStack.push({\n canvas: scratchCanvas.canvas,\n context: groupCtx,\n offsetX,\n offsetY,\n scaleX,\n scaleY,\n subtype: group.smask.subtype,\n backdrop: group.smask.backdrop,\n transferMap: group.smask.transferMap || null,\n startTransformInverse: null\n });\n } else {\n currentCtx.setTransform(1, 0, 0, 1, 0, 0);\n currentCtx.translate(offsetX, offsetY);\n currentCtx.scale(scaleX, scaleY);\n currentCtx.save();\n }\n copyCtxState(currentCtx, groupCtx);\n this.ctx = groupCtx;\n this.setGState([[\"BM\", \"source-over\"], [\"ca\", 1], [\"CA\", 1]]);\n this.groupStack.push(currentCtx);\n this.groupLevel++;\n }\n endGroup(group) {\n if (!this.contentVisible) {\n return;\n }\n this.groupLevel--;\n const groupCtx = this.ctx;\n const ctx = this.groupStack.pop();\n this.ctx = ctx;\n this.ctx.imageSmoothingEnabled = false;\n if (group.smask) {\n this.tempSMask = this.smaskStack.pop();\n this.restore();\n } else {\n this.ctx.restore();\n const currentMtx = (0, _display_utils.getCurrentTransform)(this.ctx);\n this.restore();\n this.ctx.save();\n this.ctx.setTransform(...currentMtx);\n const dirtyBox = _util.Util.getAxialAlignedBoundingBox([0, 0, groupCtx.canvas.width, groupCtx.canvas.height], currentMtx);\n this.ctx.drawImage(groupCtx.canvas, 0, 0);\n this.ctx.restore();\n this.compose(dirtyBox);\n }\n }\n beginAnnotation(id, rect, transform, matrix, hasOwnCanvas) {\n this.#restoreInitialState();\n resetCtxToDefault(this.ctx);\n this.ctx.save();\n this.save();\n if (this.baseTransform) {\n this.ctx.setTransform(...this.baseTransform);\n }\n if (Array.isArray(rect) && rect.length === 4) {\n const width = rect[2] - rect[0];\n const height = rect[3] - rect[1];\n if (hasOwnCanvas && this.annotationCanvasMap) {\n transform = transform.slice();\n transform[4] -= rect[0];\n transform[5] -= rect[1];\n rect = rect.slice();\n rect[0] = rect[1] = 0;\n rect[2] = width;\n rect[3] = height;\n const [scaleX, scaleY] = _util.Util.singularValueDecompose2dScale((0, _display_utils.getCurrentTransform)(this.ctx));\n const {\n viewportScale\n } = this;\n const canvasWidth = Math.ceil(width * this.outputScaleX * viewportScale);\n const canvasHeight = Math.ceil(height * this.outputScaleY * viewportScale);\n this.annotationCanvas = this.canvasFactory.create(canvasWidth, canvasHeight);\n const {\n canvas,\n context\n } = this.annotationCanvas;\n this.annotationCanvasMap.set(id, canvas);\n this.annotationCanvas.savedCtx = this.ctx;\n this.ctx = context;\n this.ctx.save();\n this.ctx.setTransform(scaleX, 0, 0, -scaleY, 0, height * scaleY);\n resetCtxToDefault(this.ctx);\n } else {\n resetCtxToDefault(this.ctx);\n this.ctx.rect(rect[0], rect[1], width, height);\n this.ctx.clip();\n this.endPath();\n }\n }\n this.current = new CanvasExtraState(this.ctx.canvas.width, this.ctx.canvas.height);\n this.transform(...transform);\n this.transform(...matrix);\n }\n endAnnotation() {\n if (this.annotationCanvas) {\n this.ctx.restore();\n this.#drawFilter();\n this.ctx = this.annotationCanvas.savedCtx;\n delete this.annotationCanvas.savedCtx;\n delete this.annotationCanvas;\n }\n }\n paintImageMaskXObject(img) {\n if (!this.contentVisible) {\n return;\n }\n const count = img.count;\n img = this.getObject(img.data, img);\n img.count = count;\n const ctx = this.ctx;\n const glyph = this.processingType3;\n if (glyph) {\n if (glyph.compiled === undefined) {\n glyph.compiled = compileType3Glyph(img);\n }\n if (glyph.compiled) {\n glyph.compiled(ctx);\n return;\n }\n }\n const mask = this._createMaskCanvas(img);\n const maskCanvas = mask.canvas;\n ctx.save();\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(maskCanvas, mask.offsetX, mask.offsetY);\n ctx.restore();\n this.compose();\n }\n paintImageMaskXObjectRepeat(img, scaleX, skewX = 0, skewY = 0, scaleY, positions) {\n if (!this.contentVisible) {\n return;\n }\n img = this.getObject(img.data, img);\n const ctx = this.ctx;\n ctx.save();\n const currentTransform = (0, _display_utils.getCurrentTransform)(ctx);\n ctx.transform(scaleX, skewX, skewY, scaleY, 0, 0);\n const mask = this._createMaskCanvas(img);\n ctx.setTransform(1, 0, 0, 1, mask.offsetX - currentTransform[4], mask.offsetY - currentTransform[5]);\n for (let i = 0, ii = positions.length; i < ii; i += 2) {\n const trans = _util.Util.transform(currentTransform, [scaleX, skewX, skewY, scaleY, positions[i], positions[i + 1]]);\n const [x, y] = _util.Util.applyTransform([0, 0], trans);\n ctx.drawImage(mask.canvas, x, y);\n }\n ctx.restore();\n this.compose();\n }\n paintImageMaskXObjectGroup(images) {\n if (!this.contentVisible) {\n return;\n }\n const ctx = this.ctx;\n const fillColor = this.current.fillColor;\n const isPatternFill = this.current.patternFill;\n for (const image of images) {\n const {\n data,\n width,\n height,\n transform\n } = image;\n const maskCanvas = this.cachedCanvases.getCanvas(\"maskCanvas\", width, height);\n const maskCtx = maskCanvas.context;\n maskCtx.save();\n const img = this.getObject(data, image);\n putBinaryImageMask(maskCtx, img);\n maskCtx.globalCompositeOperation = \"source-in\";\n maskCtx.fillStyle = isPatternFill ? fillColor.getPattern(maskCtx, this, (0, _display_utils.getCurrentTransformInverse)(ctx), _pattern_helper.PathType.FILL) : fillColor;\n maskCtx.fillRect(0, 0, width, height);\n maskCtx.restore();\n ctx.save();\n ctx.transform(...transform);\n ctx.scale(1, -1);\n drawImageAtIntegerCoords(ctx, maskCanvas.canvas, 0, 0, width, height, 0, -1, 1, 1);\n ctx.restore();\n }\n this.compose();\n }\n paintImageXObject(objId) {\n if (!this.contentVisible) {\n return;\n }\n const imgData = this.getObject(objId);\n if (!imgData) {\n (0, _util.warn)(\"Dependent image isn't ready yet\");\n return;\n }\n this.paintInlineImageXObject(imgData);\n }\n paintImageXObjectRepeat(objId, scaleX, scaleY, positions) {\n if (!this.contentVisible) {\n return;\n }\n const imgData = this.getObject(objId);\n if (!imgData) {\n (0, _util.warn)(\"Dependent image isn't ready yet\");\n return;\n }\n const width = imgData.width;\n const height = imgData.height;\n const map = [];\n for (let i = 0, ii = positions.length; i < ii; i += 2) {\n map.push({\n transform: [scaleX, 0, 0, scaleY, positions[i], positions[i + 1]],\n x: 0,\n y: 0,\n w: width,\n h: height\n });\n }\n this.paintInlineImageXObjectGroup(imgData, map);\n }\n applyTransferMapsToCanvas(ctx) {\n if (this.current.transferMaps !== \"none\") {\n ctx.filter = this.current.transferMaps;\n ctx.drawImage(ctx.canvas, 0, 0);\n ctx.filter = \"none\";\n }\n return ctx.canvas;\n }\n applyTransferMapsToBitmap(imgData) {\n if (this.current.transferMaps === \"none\") {\n return imgData.bitmap;\n }\n const {\n bitmap,\n width,\n height\n } = imgData;\n const tmpCanvas = this.cachedCanvases.getCanvas(\"inlineImage\", width, height);\n const tmpCtx = tmpCanvas.context;\n tmpCtx.filter = this.current.transferMaps;\n tmpCtx.drawImage(bitmap, 0, 0);\n tmpCtx.filter = \"none\";\n return tmpCanvas.canvas;\n }\n paintInlineImageXObject(imgData) {\n if (!this.contentVisible) {\n return;\n }\n const width = imgData.width;\n const height = imgData.height;\n const ctx = this.ctx;\n this.save();\n if (!_util.isNodeJS) {\n const {\n filter\n } = ctx;\n if (filter !== \"none\" && filter !== \"\") {\n ctx.filter = \"none\";\n }\n }\n ctx.scale(1 / width, -1 / height);\n let imgToPaint;\n if (imgData.bitmap) {\n imgToPaint = this.applyTransferMapsToBitmap(imgData);\n } else if (typeof HTMLElement === \"function\" && imgData instanceof HTMLElement || !imgData.data) {\n imgToPaint = imgData;\n } else {\n const tmpCanvas = this.cachedCanvases.getCanvas(\"inlineImage\", width, height);\n const tmpCtx = tmpCanvas.context;\n putBinaryImageData(tmpCtx, imgData);\n imgToPaint = this.applyTransferMapsToCanvas(tmpCtx);\n }\n const scaled = this._scaleImage(imgToPaint, (0, _display_utils.getCurrentTransformInverse)(ctx));\n ctx.imageSmoothingEnabled = getImageSmoothingEnabled((0, _display_utils.getCurrentTransform)(ctx), imgData.interpolate);\n drawImageAtIntegerCoords(ctx, scaled.img, 0, 0, scaled.paintWidth, scaled.paintHeight, 0, -height, width, height);\n this.compose();\n this.restore();\n }\n paintInlineImageXObjectGroup(imgData, map) {\n if (!this.contentVisible) {\n return;\n }\n const ctx = this.ctx;\n let imgToPaint;\n if (imgData.bitmap) {\n imgToPaint = imgData.bitmap;\n } else {\n const w = imgData.width;\n const h = imgData.height;\n const tmpCanvas = this.cachedCanvases.getCanvas(\"inlineImage\", w, h);\n const tmpCtx = tmpCanvas.context;\n putBinaryImageData(tmpCtx, imgData);\n imgToPaint = this.applyTransferMapsToCanvas(tmpCtx);\n }\n for (const entry of map) {\n ctx.save();\n ctx.transform(...entry.transform);\n ctx.scale(1, -1);\n drawImageAtIntegerCoords(ctx, imgToPaint, entry.x, entry.y, entry.w, entry.h, 0, -1, 1, 1);\n ctx.restore();\n }\n this.compose();\n }\n paintSolidColorImageMask() {\n if (!this.contentVisible) {\n return;\n }\n this.ctx.fillRect(0, 0, 1, 1);\n this.compose();\n }\n markPoint(tag) {}\n markPointProps(tag, properties) {}\n beginMarkedContent(tag) {\n this.markedContentStack.push({\n visible: true\n });\n }\n beginMarkedContentProps(tag, properties) {\n if (tag === \"OC\") {\n this.markedContentStack.push({\n visible: this.optionalContentConfig.isVisible(properties)\n });\n } else {\n this.markedContentStack.push({\n visible: true\n });\n }\n this.contentVisible = this.isContentVisible();\n }\n endMarkedContent() {\n this.markedContentStack.pop();\n this.contentVisible = this.isContentVisible();\n }\n beginCompat() {}\n endCompat() {}\n consumePath(clipBox) {\n const isEmpty = this.current.isEmptyClip();\n if (this.pendingClip) {\n this.current.updateClipFromPath();\n }\n if (!this.pendingClip) {\n this.compose(clipBox);\n }\n const ctx = this.ctx;\n if (this.pendingClip) {\n if (!isEmpty) {\n if (this.pendingClip === EO_CLIP) {\n ctx.clip(\"evenodd\");\n } else {\n ctx.clip();\n }\n }\n this.pendingClip = null;\n }\n this.current.startNewPathAndClipBox(this.current.clipBox);\n ctx.beginPath();\n }\n getSinglePixelWidth() {\n if (!this._cachedGetSinglePixelWidth) {\n const m = (0, _display_utils.getCurrentTransform)(this.ctx);\n if (m[1] === 0 && m[2] === 0) {\n this._cachedGetSinglePixelWidth = 1 / Math.min(Math.abs(m[0]), Math.abs(m[3]));\n } else {\n const absDet = Math.abs(m[0] * m[3] - m[2] * m[1]);\n const normX = Math.hypot(m[0], m[2]);\n const normY = Math.hypot(m[1], m[3]);\n this._cachedGetSinglePixelWidth = Math.max(normX, normY) / absDet;\n }\n }\n return this._cachedGetSinglePixelWidth;\n }\n getScaleForStroking() {\n if (this._cachedScaleForStroking[0] === -1) {\n const {\n lineWidth\n } = this.current;\n const {\n a,\n b,\n c,\n d\n } = this.ctx.getTransform();\n let scaleX, scaleY;\n if (b === 0 && c === 0) {\n const normX = Math.abs(a);\n const normY = Math.abs(d);\n if (normX === normY) {\n if (lineWidth === 0) {\n scaleX = scaleY = 1 / normX;\n } else {\n const scaledLineWidth = normX * lineWidth;\n scaleX = scaleY = scaledLineWidth < 1 ? 1 / scaledLineWidth : 1;\n }\n } else if (lineWidth === 0) {\n scaleX = 1 / normX;\n scaleY = 1 / normY;\n } else {\n const scaledXLineWidth = normX * lineWidth;\n const scaledYLineWidth = normY * lineWidth;\n scaleX = scaledXLineWidth < 1 ? 1 / scaledXLineWidth : 1;\n scaleY = scaledYLineWidth < 1 ? 1 / scaledYLineWidth : 1;\n }\n } else {\n const absDet = Math.abs(a * d - b * c);\n const normX = Math.hypot(a, b);\n const normY = Math.hypot(c, d);\n if (lineWidth === 0) {\n scaleX = normY / absDet;\n scaleY = normX / absDet;\n } else {\n const baseArea = lineWidth * absDet;\n scaleX = normY > baseArea ? normY / baseArea : 1;\n scaleY = normX > baseArea ? normX / baseArea : 1;\n }\n }\n this._cachedScaleForStroking[0] = scaleX;\n this._cachedScaleForStroking[1] = scaleY;\n }\n return this._cachedScaleForStroking;\n }\n rescaleAndStroke(saveRestore) {\n const {\n ctx\n } = this;\n const {\n lineWidth\n } = this.current;\n const [scaleX, scaleY] = this.getScaleForStroking();\n ctx.lineWidth = lineWidth || 1;\n if (scaleX === 1 && scaleY === 1) {\n ctx.stroke();\n return;\n }\n const dashes = ctx.getLineDash();\n if (saveRestore) {\n ctx.save();\n }\n ctx.scale(scaleX, scaleY);\n if (dashes.length > 0) {\n const scale = Math.max(scaleX, scaleY);\n ctx.setLineDash(dashes.map(x => x / scale));\n ctx.lineDashOffset /= scale;\n }\n ctx.stroke();\n if (saveRestore) {\n ctx.restore();\n }\n }\n isContentVisible() {\n for (let i = this.markedContentStack.length - 1; i >= 0; i--) {\n if (!this.markedContentStack[i].visible) {\n return false;\n }\n }\n return true;\n }\n}\nexports.CanvasGraphics = CanvasGraphics;\nfor (const op in _util.OPS) {\n if (CanvasGraphics.prototype[op] !== undefined) {\n CanvasGraphics.prototype[_util.OPS[op]] = CanvasGraphics.prototype[op];\n }\n}\n\n/***/ }),\n/* 12 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.TilingPattern = exports.PathType = void 0;\nexports.getShadingPattern = getShadingPattern;\nvar _util = __w_pdfjs_require__(1);\nvar _display_utils = __w_pdfjs_require__(6);\nconst PathType = {\n FILL: \"Fill\",\n STROKE: \"Stroke\",\n SHADING: \"Shading\"\n};\nexports.PathType = PathType;\nfunction applyBoundingBox(ctx, bbox) {\n if (!bbox) {\n return;\n }\n const width = bbox[2] - bbox[0];\n const height = bbox[3] - bbox[1];\n const region = new Path2D();\n region.rect(bbox[0], bbox[1], width, height);\n ctx.clip(region);\n}\nclass BaseShadingPattern {\n constructor() {\n if (this.constructor === BaseShadingPattern) {\n (0, _util.unreachable)(\"Cannot initialize BaseShadingPattern.\");\n }\n }\n getPattern() {\n (0, _util.unreachable)(\"Abstract method `getPattern` called.\");\n }\n}\nclass RadialAxialShadingPattern extends BaseShadingPattern {\n constructor(IR) {\n super();\n this._type = IR[1];\n this._bbox = IR[2];\n this._colorStops = IR[3];\n this._p0 = IR[4];\n this._p1 = IR[5];\n this._r0 = IR[6];\n this._r1 = IR[7];\n this.matrix = null;\n }\n _createGradient(ctx) {\n let grad;\n if (this._type === \"axial\") {\n grad = ctx.createLinearGradient(this._p0[0], this._p0[1], this._p1[0], this._p1[1]);\n } else if (this._type === \"radial\") {\n grad = ctx.createRadialGradient(this._p0[0], this._p0[1], this._r0, this._p1[0], this._p1[1], this._r1);\n }\n for (const colorStop of this._colorStops) {\n grad.addColorStop(colorStop[0], colorStop[1]);\n }\n return grad;\n }\n getPattern(ctx, owner, inverse, pathType) {\n let pattern;\n if (pathType === PathType.STROKE || pathType === PathType.FILL) {\n const ownerBBox = owner.current.getClippedPathBoundingBox(pathType, (0, _display_utils.getCurrentTransform)(ctx)) || [0, 0, 0, 0];\n const width = Math.ceil(ownerBBox[2] - ownerBBox[0]) || 1;\n const height = Math.ceil(ownerBBox[3] - ownerBBox[1]) || 1;\n const tmpCanvas = owner.cachedCanvases.getCanvas(\"pattern\", width, height, true);\n const tmpCtx = tmpCanvas.context;\n tmpCtx.clearRect(0, 0, tmpCtx.canvas.width, tmpCtx.canvas.height);\n tmpCtx.beginPath();\n tmpCtx.rect(0, 0, tmpCtx.canvas.width, tmpCtx.canvas.height);\n tmpCtx.translate(-ownerBBox[0], -ownerBBox[1]);\n inverse = _util.Util.transform(inverse, [1, 0, 0, 1, ownerBBox[0], ownerBBox[1]]);\n tmpCtx.transform(...owner.baseTransform);\n if (this.matrix) {\n tmpCtx.transform(...this.matrix);\n }\n applyBoundingBox(tmpCtx, this._bbox);\n tmpCtx.fillStyle = this._createGradient(tmpCtx);\n tmpCtx.fill();\n pattern = ctx.createPattern(tmpCanvas.canvas, \"no-repeat\");\n const domMatrix = new DOMMatrix(inverse);\n pattern.setTransform(domMatrix);\n } else {\n applyBoundingBox(ctx, this._bbox);\n pattern = this._createGradient(ctx);\n }\n return pattern;\n }\n}\nfunction drawTriangle(data, context, p1, p2, p3, c1, c2, c3) {\n const coords = context.coords,\n colors = context.colors;\n const bytes = data.data,\n rowSize = data.width * 4;\n let tmp;\n if (coords[p1 + 1] > coords[p2 + 1]) {\n tmp = p1;\n p1 = p2;\n p2 = tmp;\n tmp = c1;\n c1 = c2;\n c2 = tmp;\n }\n if (coords[p2 + 1] > coords[p3 + 1]) {\n tmp = p2;\n p2 = p3;\n p3 = tmp;\n tmp = c2;\n c2 = c3;\n c3 = tmp;\n }\n if (coords[p1 + 1] > coords[p2 + 1]) {\n tmp = p1;\n p1 = p2;\n p2 = tmp;\n tmp = c1;\n c1 = c2;\n c2 = tmp;\n }\n const x1 = (coords[p1] + context.offsetX) * context.scaleX;\n const y1 = (coords[p1 + 1] + context.offsetY) * context.scaleY;\n const x2 = (coords[p2] + context.offsetX) * context.scaleX;\n const y2 = (coords[p2 + 1] + context.offsetY) * context.scaleY;\n const x3 = (coords[p3] + context.offsetX) * context.scaleX;\n const y3 = (coords[p3 + 1] + context.offsetY) * context.scaleY;\n if (y1 >= y3) {\n return;\n }\n const c1r = colors[c1],\n c1g = colors[c1 + 1],\n c1b = colors[c1 + 2];\n const c2r = colors[c2],\n c2g = colors[c2 + 1],\n c2b = colors[c2 + 2];\n const c3r = colors[c3],\n c3g = colors[c3 + 1],\n c3b = colors[c3 + 2];\n const minY = Math.round(y1),\n maxY = Math.round(y3);\n let xa, car, cag, cab;\n let xb, cbr, cbg, cbb;\n for (let y = minY; y <= maxY; y++) {\n if (y < y2) {\n const k = y < y1 ? 0 : (y1 - y) / (y1 - y2);\n xa = x1 - (x1 - x2) * k;\n car = c1r - (c1r - c2r) * k;\n cag = c1g - (c1g - c2g) * k;\n cab = c1b - (c1b - c2b) * k;\n } else {\n let k;\n if (y > y3) {\n k = 1;\n } else if (y2 === y3) {\n k = 0;\n } else {\n k = (y2 - y) / (y2 - y3);\n }\n xa = x2 - (x2 - x3) * k;\n car = c2r - (c2r - c3r) * k;\n cag = c2g - (c2g - c3g) * k;\n cab = c2b - (c2b - c3b) * k;\n }\n let k;\n if (y < y1) {\n k = 0;\n } else if (y > y3) {\n k = 1;\n } else {\n k = (y1 - y) / (y1 - y3);\n }\n xb = x1 - (x1 - x3) * k;\n cbr = c1r - (c1r - c3r) * k;\n cbg = c1g - (c1g - c3g) * k;\n cbb = c1b - (c1b - c3b) * k;\n const x1_ = Math.round(Math.min(xa, xb));\n const x2_ = Math.round(Math.max(xa, xb));\n let j = rowSize * y + x1_ * 4;\n for (let x = x1_; x <= x2_; x++) {\n k = (xa - x) / (xa - xb);\n if (k < 0) {\n k = 0;\n } else if (k > 1) {\n k = 1;\n }\n bytes[j++] = car - (car - cbr) * k | 0;\n bytes[j++] = cag - (cag - cbg) * k | 0;\n bytes[j++] = cab - (cab - cbb) * k | 0;\n bytes[j++] = 255;\n }\n }\n}\nfunction drawFigure(data, figure, context) {\n const ps = figure.coords;\n const cs = figure.colors;\n let i, ii;\n switch (figure.type) {\n case \"lattice\":\n const verticesPerRow = figure.verticesPerRow;\n const rows = Math.floor(ps.length / verticesPerRow) - 1;\n const cols = verticesPerRow - 1;\n for (i = 0; i < rows; i++) {\n let q = i * verticesPerRow;\n for (let j = 0; j < cols; j++, q++) {\n drawTriangle(data, context, ps[q], ps[q + 1], ps[q + verticesPerRow], cs[q], cs[q + 1], cs[q + verticesPerRow]);\n drawTriangle(data, context, ps[q + verticesPerRow + 1], ps[q + 1], ps[q + verticesPerRow], cs[q + verticesPerRow + 1], cs[q + 1], cs[q + verticesPerRow]);\n }\n }\n break;\n case \"triangles\":\n for (i = 0, ii = ps.length; i < ii; i += 3) {\n drawTriangle(data, context, ps[i], ps[i + 1], ps[i + 2], cs[i], cs[i + 1], cs[i + 2]);\n }\n break;\n default:\n throw new Error(\"illegal figure\");\n }\n}\nclass MeshShadingPattern extends BaseShadingPattern {\n constructor(IR) {\n super();\n this._coords = IR[2];\n this._colors = IR[3];\n this._figures = IR[4];\n this._bounds = IR[5];\n this._bbox = IR[7];\n this._background = IR[8];\n this.matrix = null;\n }\n _createMeshCanvas(combinedScale, backgroundColor, cachedCanvases) {\n const EXPECTED_SCALE = 1.1;\n const MAX_PATTERN_SIZE = 3000;\n const BORDER_SIZE = 2;\n const offsetX = Math.floor(this._bounds[0]);\n const offsetY = Math.floor(this._bounds[1]);\n const boundsWidth = Math.ceil(this._bounds[2]) - offsetX;\n const boundsHeight = Math.ceil(this._bounds[3]) - offsetY;\n const width = Math.min(Math.ceil(Math.abs(boundsWidth * combinedScale[0] * EXPECTED_SCALE)), MAX_PATTERN_SIZE);\n const height = Math.min(Math.ceil(Math.abs(boundsHeight * combinedScale[1] * EXPECTED_SCALE)), MAX_PATTERN_SIZE);\n const scaleX = boundsWidth / width;\n const scaleY = boundsHeight / height;\n const context = {\n coords: this._coords,\n colors: this._colors,\n offsetX: -offsetX,\n offsetY: -offsetY,\n scaleX: 1 / scaleX,\n scaleY: 1 / scaleY\n };\n const paddedWidth = width + BORDER_SIZE * 2;\n const paddedHeight = height + BORDER_SIZE * 2;\n const tmpCanvas = cachedCanvases.getCanvas(\"mesh\", paddedWidth, paddedHeight, false);\n const tmpCtx = tmpCanvas.context;\n const data = tmpCtx.createImageData(width, height);\n if (backgroundColor) {\n const bytes = data.data;\n for (let i = 0, ii = bytes.length; i < ii; i += 4) {\n bytes[i] = backgroundColor[0];\n bytes[i + 1] = backgroundColor[1];\n bytes[i + 2] = backgroundColor[2];\n bytes[i + 3] = 255;\n }\n }\n for (const figure of this._figures) {\n drawFigure(data, figure, context);\n }\n tmpCtx.putImageData(data, BORDER_SIZE, BORDER_SIZE);\n const canvas = tmpCanvas.canvas;\n return {\n canvas,\n offsetX: offsetX - BORDER_SIZE * scaleX,\n offsetY: offsetY - BORDER_SIZE * scaleY,\n scaleX,\n scaleY\n };\n }\n getPattern(ctx, owner, inverse, pathType) {\n applyBoundingBox(ctx, this._bbox);\n let scale;\n if (pathType === PathType.SHADING) {\n scale = _util.Util.singularValueDecompose2dScale((0, _display_utils.getCurrentTransform)(ctx));\n } else {\n scale = _util.Util.singularValueDecompose2dScale(owner.baseTransform);\n if (this.matrix) {\n const matrixScale = _util.Util.singularValueDecompose2dScale(this.matrix);\n scale = [scale[0] * matrixScale[0], scale[1] * matrixScale[1]];\n }\n }\n const temporaryPatternCanvas = this._createMeshCanvas(scale, pathType === PathType.SHADING ? null : this._background, owner.cachedCanvases);\n if (pathType !== PathType.SHADING) {\n ctx.setTransform(...owner.baseTransform);\n if (this.matrix) {\n ctx.transform(...this.matrix);\n }\n }\n ctx.translate(temporaryPatternCanvas.offsetX, temporaryPatternCanvas.offsetY);\n ctx.scale(temporaryPatternCanvas.scaleX, temporaryPatternCanvas.scaleY);\n return ctx.createPattern(temporaryPatternCanvas.canvas, \"no-repeat\");\n }\n}\nclass DummyShadingPattern extends BaseShadingPattern {\n getPattern() {\n return \"hotpink\";\n }\n}\nfunction getShadingPattern(IR) {\n switch (IR[0]) {\n case \"RadialAxial\":\n return new RadialAxialShadingPattern(IR);\n case \"Mesh\":\n return new MeshShadingPattern(IR);\n case \"Dummy\":\n return new DummyShadingPattern();\n }\n throw new Error(`Unknown IR type: ${IR[0]}`);\n}\nconst PaintType = {\n COLORED: 1,\n UNCOLORED: 2\n};\nclass TilingPattern {\n static MAX_PATTERN_SIZE = 3000;\n constructor(IR, color, ctx, canvasGraphicsFactory, baseTransform) {\n this.operatorList = IR[2];\n this.matrix = IR[3] || [1, 0, 0, 1, 0, 0];\n this.bbox = IR[4];\n this.xstep = IR[5];\n this.ystep = IR[6];\n this.paintType = IR[7];\n this.tilingType = IR[8];\n this.color = color;\n this.ctx = ctx;\n this.canvasGraphicsFactory = canvasGraphicsFactory;\n this.baseTransform = baseTransform;\n }\n createPatternCanvas(owner) {\n const operatorList = this.operatorList;\n const bbox = this.bbox;\n const xstep = this.xstep;\n const ystep = this.ystep;\n const paintType = this.paintType;\n const tilingType = this.tilingType;\n const color = this.color;\n const canvasGraphicsFactory = this.canvasGraphicsFactory;\n (0, _util.info)(\"TilingType: \" + tilingType);\n const x0 = bbox[0],\n y0 = bbox[1],\n x1 = bbox[2],\n y1 = bbox[3];\n const matrixScale = _util.Util.singularValueDecompose2dScale(this.matrix);\n const curMatrixScale = _util.Util.singularValueDecompose2dScale(this.baseTransform);\n const combinedScale = [matrixScale[0] * curMatrixScale[0], matrixScale[1] * curMatrixScale[1]];\n const dimx = this.getSizeAndScale(xstep, this.ctx.canvas.width, combinedScale[0]);\n const dimy = this.getSizeAndScale(ystep, this.ctx.canvas.height, combinedScale[1]);\n const tmpCanvas = owner.cachedCanvases.getCanvas(\"pattern\", dimx.size, dimy.size, true);\n const tmpCtx = tmpCanvas.context;\n const graphics = canvasGraphicsFactory.createCanvasGraphics(tmpCtx);\n graphics.groupLevel = owner.groupLevel;\n this.setFillAndStrokeStyleToContext(graphics, paintType, color);\n let adjustedX0 = x0;\n let adjustedY0 = y0;\n let adjustedX1 = x1;\n let adjustedY1 = y1;\n if (x0 < 0) {\n adjustedX0 = 0;\n adjustedX1 += Math.abs(x0);\n }\n if (y0 < 0) {\n adjustedY0 = 0;\n adjustedY1 += Math.abs(y0);\n }\n tmpCtx.translate(-(dimx.scale * adjustedX0), -(dimy.scale * adjustedY0));\n graphics.transform(dimx.scale, 0, 0, dimy.scale, 0, 0);\n tmpCtx.save();\n this.clipBbox(graphics, adjustedX0, adjustedY0, adjustedX1, adjustedY1);\n graphics.baseTransform = (0, _display_utils.getCurrentTransform)(graphics.ctx);\n graphics.executeOperatorList(operatorList);\n graphics.endDrawing();\n return {\n canvas: tmpCanvas.canvas,\n scaleX: dimx.scale,\n scaleY: dimy.scale,\n offsetX: adjustedX0,\n offsetY: adjustedY0\n };\n }\n getSizeAndScale(step, realOutputSize, scale) {\n step = Math.abs(step);\n const maxSize = Math.max(TilingPattern.MAX_PATTERN_SIZE, realOutputSize);\n let size = Math.ceil(step * scale);\n if (size >= maxSize) {\n size = maxSize;\n } else {\n scale = size / step;\n }\n return {\n scale,\n size\n };\n }\n clipBbox(graphics, x0, y0, x1, y1) {\n const bboxWidth = x1 - x0;\n const bboxHeight = y1 - y0;\n graphics.ctx.rect(x0, y0, bboxWidth, bboxHeight);\n graphics.current.updateRectMinMax((0, _display_utils.getCurrentTransform)(graphics.ctx), [x0, y0, x1, y1]);\n graphics.clip();\n graphics.endPath();\n }\n setFillAndStrokeStyleToContext(graphics, paintType, color) {\n const context = graphics.ctx,\n current = graphics.current;\n switch (paintType) {\n case PaintType.COLORED:\n const ctx = this.ctx;\n context.fillStyle = ctx.fillStyle;\n context.strokeStyle = ctx.strokeStyle;\n current.fillColor = ctx.fillStyle;\n current.strokeColor = ctx.strokeStyle;\n break;\n case PaintType.UNCOLORED:\n const cssColor = _util.Util.makeHexColor(color[0], color[1], color[2]);\n context.fillStyle = cssColor;\n context.strokeStyle = cssColor;\n current.fillColor = cssColor;\n current.strokeColor = cssColor;\n break;\n default:\n throw new _util.FormatError(`Unsupported paint type: ${paintType}`);\n }\n }\n getPattern(ctx, owner, inverse, pathType) {\n let matrix = inverse;\n if (pathType !== PathType.SHADING) {\n matrix = _util.Util.transform(matrix, owner.baseTransform);\n if (this.matrix) {\n matrix = _util.Util.transform(matrix, this.matrix);\n }\n }\n const temporaryPatternCanvas = this.createPatternCanvas(owner);\n let domMatrix = new DOMMatrix(matrix);\n domMatrix = domMatrix.translate(temporaryPatternCanvas.offsetX, temporaryPatternCanvas.offsetY);\n domMatrix = domMatrix.scale(1 / temporaryPatternCanvas.scaleX, 1 / temporaryPatternCanvas.scaleY);\n const pattern = ctx.createPattern(temporaryPatternCanvas.canvas, \"repeat\");\n pattern.setTransform(domMatrix);\n return pattern;\n }\n}\nexports.TilingPattern = TilingPattern;\n\n/***/ }),\n/* 13 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.convertBlackAndWhiteToRGBA = convertBlackAndWhiteToRGBA;\nexports.convertToRGBA = convertToRGBA;\nexports.grayToRGBA = grayToRGBA;\nvar _util = __w_pdfjs_require__(1);\nfunction convertToRGBA(params) {\n switch (params.kind) {\n case _util.ImageKind.GRAYSCALE_1BPP:\n return convertBlackAndWhiteToRGBA(params);\n case _util.ImageKind.RGB_24BPP:\n return convertRGBToRGBA(params);\n }\n return null;\n}\nfunction convertBlackAndWhiteToRGBA({\n src,\n srcPos = 0,\n dest,\n width,\n height,\n nonBlackColor = 0xffffffff,\n inverseDecode = false\n}) {\n const black = _util.FeatureTest.isLittleEndian ? 0xff000000 : 0x000000ff;\n const [zeroMapping, oneMapping] = inverseDecode ? [nonBlackColor, black] : [black, nonBlackColor];\n const widthInSource = width >> 3;\n const widthRemainder = width & 7;\n const srcLength = src.length;\n dest = new Uint32Array(dest.buffer);\n let destPos = 0;\n for (let i = 0; i < height; i++) {\n for (const max = srcPos + widthInSource; srcPos < max; srcPos++) {\n const elem = srcPos < srcLength ? src[srcPos] : 255;\n dest[destPos++] = elem & 0b10000000 ? oneMapping : zeroMapping;\n dest[destPos++] = elem & 0b1000000 ? oneMapping : zeroMapping;\n dest[destPos++] = elem & 0b100000 ? oneMapping : zeroMapping;\n dest[destPos++] = elem & 0b10000 ? oneMapping : zeroMapping;\n dest[destPos++] = elem & 0b1000 ? oneMapping : zeroMapping;\n dest[destPos++] = elem & 0b100 ? oneMapping : zeroMapping;\n dest[destPos++] = elem & 0b10 ? oneMapping : zeroMapping;\n dest[destPos++] = elem & 0b1 ? oneMapping : zeroMapping;\n }\n if (widthRemainder === 0) {\n continue;\n }\n const elem = srcPos < srcLength ? src[srcPos++] : 255;\n for (let j = 0; j < widthRemainder; j++) {\n dest[destPos++] = elem & 1 << 7 - j ? oneMapping : zeroMapping;\n }\n }\n return {\n srcPos,\n destPos\n };\n}\nfunction convertRGBToRGBA({\n src,\n srcPos = 0,\n dest,\n destPos = 0,\n width,\n height\n}) {\n let i = 0;\n const len32 = src.length >> 2;\n const src32 = new Uint32Array(src.buffer, srcPos, len32);\n if (_util.FeatureTest.isLittleEndian) {\n for (; i < len32 - 2; i += 3, destPos += 4) {\n const s1 = src32[i];\n const s2 = src32[i + 1];\n const s3 = src32[i + 2];\n dest[destPos] = s1 | 0xff000000;\n dest[destPos + 1] = s1 >>> 24 | s2 << 8 | 0xff000000;\n dest[destPos + 2] = s2 >>> 16 | s3 << 16 | 0xff000000;\n dest[destPos + 3] = s3 >>> 8 | 0xff000000;\n }\n for (let j = i * 4, jj = src.length; j < jj; j += 3) {\n dest[destPos++] = src[j] | src[j + 1] << 8 | src[j + 2] << 16 | 0xff000000;\n }\n } else {\n for (; i < len32 - 2; i += 3, destPos += 4) {\n const s1 = src32[i];\n const s2 = src32[i + 1];\n const s3 = src32[i + 2];\n dest[destPos] = s1 | 0xff;\n dest[destPos + 1] = s1 << 24 | s2 >>> 8 | 0xff;\n dest[destPos + 2] = s2 << 16 | s3 >>> 16 | 0xff;\n dest[destPos + 3] = s3 << 8 | 0xff;\n }\n for (let j = i * 4, jj = src.length; j < jj; j += 3) {\n dest[destPos++] = src[j] << 24 | src[j + 1] << 16 | src[j + 2] << 8 | 0xff;\n }\n }\n return {\n srcPos,\n destPos\n };\n}\nfunction grayToRGBA(src, dest) {\n if (_util.FeatureTest.isLittleEndian) {\n for (let i = 0, ii = src.length; i < ii; i++) {\n dest[i] = src[i] * 0x10101 | 0xff000000;\n }\n } else {\n for (let i = 0, ii = src.length; i < ii; i++) {\n dest[i] = src[i] * 0x1010100 | 0x000000ff;\n }\n }\n}\n\n/***/ }),\n/* 14 */\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.GlobalWorkerOptions = void 0;\nconst GlobalWorkerOptions = Object.create(null);\nexports.GlobalWorkerOptions = GlobalWorkerOptions;\nGlobalWorkerOptions.workerPort = null;\nGlobalWorkerOptions.workerSrc = \"\";\n\n/***/ }),\n/* 15 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.MessageHandler = void 0;\nvar _util = __w_pdfjs_require__(1);\nconst CallbackKind = {\n UNKNOWN: 0,\n DATA: 1,\n ERROR: 2\n};\nconst StreamKind = {\n UNKNOWN: 0,\n CANCEL: 1,\n CANCEL_COMPLETE: 2,\n CLOSE: 3,\n ENQUEUE: 4,\n ERROR: 5,\n PULL: 6,\n PULL_COMPLETE: 7,\n START_COMPLETE: 8\n};\nfunction wrapReason(reason) {\n if (!(reason instanceof Error || typeof reason === \"object\" && reason !== null)) {\n (0, _util.unreachable)('wrapReason: Expected \"reason\" to be a (possibly cloned) Error.');\n }\n switch (reason.name) {\n case \"AbortException\":\n return new _util.AbortException(reason.message);\n case \"MissingPDFException\":\n return new _util.MissingPDFException(reason.message);\n case \"PasswordException\":\n return new _util.PasswordException(reason.message, reason.code);\n case \"UnexpectedResponseException\":\n return new _util.UnexpectedResponseException(reason.message, reason.status);\n case \"UnknownErrorException\":\n return new _util.UnknownErrorException(reason.message, reason.details);\n default:\n return new _util.UnknownErrorException(reason.message, reason.toString());\n }\n}\nclass MessageHandler {\n constructor(sourceName, targetName, comObj) {\n this.sourceName = sourceName;\n this.targetName = targetName;\n this.comObj = comObj;\n this.callbackId = 1;\n this.streamId = 1;\n this.streamSinks = Object.create(null);\n this.streamControllers = Object.create(null);\n this.callbackCapabilities = Object.create(null);\n this.actionHandler = Object.create(null);\n this._onComObjOnMessage = event => {\n const data = event.data;\n if (data.targetName !== this.sourceName) {\n return;\n }\n if (data.stream) {\n this.#processStreamMessage(data);\n return;\n }\n if (data.callback) {\n const callbackId = data.callbackId;\n const capability = this.callbackCapabilities[callbackId];\n if (!capability) {\n throw new Error(`Cannot resolve callback ${callbackId}`);\n }\n delete this.callbackCapabilities[callbackId];\n if (data.callback === CallbackKind.DATA) {\n capability.resolve(data.data);\n } else if (data.callback === CallbackKind.ERROR) {\n capability.reject(wrapReason(data.reason));\n } else {\n throw new Error(\"Unexpected callback case\");\n }\n return;\n }\n const action = this.actionHandler[data.action];\n if (!action) {\n throw new Error(`Unknown action from worker: ${data.action}`);\n }\n if (data.callbackId) {\n const cbSourceName = this.sourceName;\n const cbTargetName = data.sourceName;\n new Promise(function (resolve) {\n resolve(action(data.data));\n }).then(function (result) {\n comObj.postMessage({\n sourceName: cbSourceName,\n targetName: cbTargetName,\n callback: CallbackKind.DATA,\n callbackId: data.callbackId,\n data: result\n });\n }, function (reason) {\n comObj.postMessage({\n sourceName: cbSourceName,\n targetName: cbTargetName,\n callback: CallbackKind.ERROR,\n callbackId: data.callbackId,\n reason: wrapReason(reason)\n });\n });\n return;\n }\n if (data.streamId) {\n this.#createStreamSink(data);\n return;\n }\n action(data.data);\n };\n comObj.addEventListener(\"message\", this._onComObjOnMessage);\n }\n on(actionName, handler) {\n const ah = this.actionHandler;\n if (ah[actionName]) {\n throw new Error(`There is already an actionName called \"${actionName}\"`);\n }\n ah[actionName] = handler;\n }\n send(actionName, data, transfers) {\n this.comObj.postMessage({\n sourceName: this.sourceName,\n targetName: this.targetName,\n action: actionName,\n data\n }, transfers);\n }\n sendWithPromise(actionName, data, transfers) {\n const callbackId = this.callbackId++;\n const capability = new _util.PromiseCapability();\n this.callbackCapabilities[callbackId] = capability;\n try {\n this.comObj.postMessage({\n sourceName: this.sourceName,\n targetName: this.targetName,\n action: actionName,\n callbackId,\n data\n }, transfers);\n } catch (ex) {\n capability.reject(ex);\n }\n return capability.promise;\n }\n sendWithStream(actionName, data, queueingStrategy, transfers) {\n const streamId = this.streamId++,\n sourceName = this.sourceName,\n targetName = this.targetName,\n comObj = this.comObj;\n return new ReadableStream({\n start: controller => {\n const startCapability = new _util.PromiseCapability();\n this.streamControllers[streamId] = {\n controller,\n startCall: startCapability,\n pullCall: null,\n cancelCall: null,\n isClosed: false\n };\n comObj.postMessage({\n sourceName,\n targetName,\n action: actionName,\n streamId,\n data,\n desiredSize: controller.desiredSize\n }, transfers);\n return startCapability.promise;\n },\n pull: controller => {\n const pullCapability = new _util.PromiseCapability();\n this.streamControllers[streamId].pullCall = pullCapability;\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.PULL,\n streamId,\n desiredSize: controller.desiredSize\n });\n return pullCapability.promise;\n },\n cancel: reason => {\n (0, _util.assert)(reason instanceof Error, \"cancel must have a valid reason\");\n const cancelCapability = new _util.PromiseCapability();\n this.streamControllers[streamId].cancelCall = cancelCapability;\n this.streamControllers[streamId].isClosed = true;\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.CANCEL,\n streamId,\n reason: wrapReason(reason)\n });\n return cancelCapability.promise;\n }\n }, queueingStrategy);\n }\n #createStreamSink(data) {\n const streamId = data.streamId,\n sourceName = this.sourceName,\n targetName = data.sourceName,\n comObj = this.comObj;\n const self = this,\n action = this.actionHandler[data.action];\n const streamSink = {\n enqueue(chunk, size = 1, transfers) {\n if (this.isCancelled) {\n return;\n }\n const lastDesiredSize = this.desiredSize;\n this.desiredSize -= size;\n if (lastDesiredSize > 0 && this.desiredSize <= 0) {\n this.sinkCapability = new _util.PromiseCapability();\n this.ready = this.sinkCapability.promise;\n }\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.ENQUEUE,\n streamId,\n chunk\n }, transfers);\n },\n close() {\n if (this.isCancelled) {\n return;\n }\n this.isCancelled = true;\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.CLOSE,\n streamId\n });\n delete self.streamSinks[streamId];\n },\n error(reason) {\n (0, _util.assert)(reason instanceof Error, \"error must have a valid reason\");\n if (this.isCancelled) {\n return;\n }\n this.isCancelled = true;\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.ERROR,\n streamId,\n reason: wrapReason(reason)\n });\n },\n sinkCapability: new _util.PromiseCapability(),\n onPull: null,\n onCancel: null,\n isCancelled: false,\n desiredSize: data.desiredSize,\n ready: null\n };\n streamSink.sinkCapability.resolve();\n streamSink.ready = streamSink.sinkCapability.promise;\n this.streamSinks[streamId] = streamSink;\n new Promise(function (resolve) {\n resolve(action(data.data, streamSink));\n }).then(function () {\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.START_COMPLETE,\n streamId,\n success: true\n });\n }, function (reason) {\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.START_COMPLETE,\n streamId,\n reason: wrapReason(reason)\n });\n });\n }\n #processStreamMessage(data) {\n const streamId = data.streamId,\n sourceName = this.sourceName,\n targetName = data.sourceName,\n comObj = this.comObj;\n const streamController = this.streamControllers[streamId],\n streamSink = this.streamSinks[streamId];\n switch (data.stream) {\n case StreamKind.START_COMPLETE:\n if (data.success) {\n streamController.startCall.resolve();\n } else {\n streamController.startCall.reject(wrapReason(data.reason));\n }\n break;\n case StreamKind.PULL_COMPLETE:\n if (data.success) {\n streamController.pullCall.resolve();\n } else {\n streamController.pullCall.reject(wrapReason(data.reason));\n }\n break;\n case StreamKind.PULL:\n if (!streamSink) {\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.PULL_COMPLETE,\n streamId,\n success: true\n });\n break;\n }\n if (streamSink.desiredSize <= 0 && data.desiredSize > 0) {\n streamSink.sinkCapability.resolve();\n }\n streamSink.desiredSize = data.desiredSize;\n new Promise(function (resolve) {\n resolve(streamSink.onPull?.());\n }).then(function () {\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.PULL_COMPLETE,\n streamId,\n success: true\n });\n }, function (reason) {\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.PULL_COMPLETE,\n streamId,\n reason: wrapReason(reason)\n });\n });\n break;\n case StreamKind.ENQUEUE:\n (0, _util.assert)(streamController, \"enqueue should have stream controller\");\n if (streamController.isClosed) {\n break;\n }\n streamController.controller.enqueue(data.chunk);\n break;\n case StreamKind.CLOSE:\n (0, _util.assert)(streamController, \"close should have stream controller\");\n if (streamController.isClosed) {\n break;\n }\n streamController.isClosed = true;\n streamController.controller.close();\n this.#deleteStreamController(streamController, streamId);\n break;\n case StreamKind.ERROR:\n (0, _util.assert)(streamController, \"error should have stream controller\");\n streamController.controller.error(wrapReason(data.reason));\n this.#deleteStreamController(streamController, streamId);\n break;\n case StreamKind.CANCEL_COMPLETE:\n if (data.success) {\n streamController.cancelCall.resolve();\n } else {\n streamController.cancelCall.reject(wrapReason(data.reason));\n }\n this.#deleteStreamController(streamController, streamId);\n break;\n case StreamKind.CANCEL:\n if (!streamSink) {\n break;\n }\n new Promise(function (resolve) {\n resolve(streamSink.onCancel?.(wrapReason(data.reason)));\n }).then(function () {\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.CANCEL_COMPLETE,\n streamId,\n success: true\n });\n }, function (reason) {\n comObj.postMessage({\n sourceName,\n targetName,\n stream: StreamKind.CANCEL_COMPLETE,\n streamId,\n reason: wrapReason(reason)\n });\n });\n streamSink.sinkCapability.reject(wrapReason(data.reason));\n streamSink.isCancelled = true;\n delete this.streamSinks[streamId];\n break;\n default:\n throw new Error(\"Unexpected stream case\");\n }\n }\n async #deleteStreamController(streamController, streamId) {\n await Promise.allSettled([streamController.startCall?.promise, streamController.pullCall?.promise, streamController.cancelCall?.promise]);\n delete this.streamControllers[streamId];\n }\n destroy() {\n this.comObj.removeEventListener(\"message\", this._onComObjOnMessage);\n }\n}\nexports.MessageHandler = MessageHandler;\n\n/***/ }),\n/* 16 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.Metadata = void 0;\nvar _util = __w_pdfjs_require__(1);\nclass Metadata {\n #metadataMap;\n #data;\n constructor({\n parsedData,\n rawData\n }) {\n this.#metadataMap = parsedData;\n this.#data = rawData;\n }\n getRaw() {\n return this.#data;\n }\n get(name) {\n return this.#metadataMap.get(name) ?? null;\n }\n getAll() {\n return (0, _util.objectFromMap)(this.#metadataMap);\n }\n has(name) {\n return this.#metadataMap.has(name);\n }\n}\nexports.Metadata = Metadata;\n\n/***/ }),\n/* 17 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.OptionalContentConfig = void 0;\nvar _util = __w_pdfjs_require__(1);\nvar _murmurhash = __w_pdfjs_require__(8);\nconst INTERNAL = Symbol(\"INTERNAL\");\nclass OptionalContentGroup {\n #visible = true;\n constructor(name, intent) {\n this.name = name;\n this.intent = intent;\n }\n get visible() {\n return this.#visible;\n }\n _setVisible(internal, visible) {\n if (internal !== INTERNAL) {\n (0, _util.unreachable)(\"Internal method `_setVisible` called.\");\n }\n this.#visible = visible;\n }\n}\nclass OptionalContentConfig {\n #cachedGetHash = null;\n #groups = new Map();\n #initialHash = null;\n #order = null;\n constructor(data) {\n this.name = null;\n this.creator = null;\n if (data === null) {\n return;\n }\n this.name = data.name;\n this.creator = data.creator;\n this.#order = data.order;\n for (const group of data.groups) {\n this.#groups.set(group.id, new OptionalContentGroup(group.name, group.intent));\n }\n if (data.baseState === \"OFF\") {\n for (const group of this.#groups.values()) {\n group._setVisible(INTERNAL, false);\n }\n }\n for (const on of data.on) {\n this.#groups.get(on)._setVisible(INTERNAL, true);\n }\n for (const off of data.off) {\n this.#groups.get(off)._setVisible(INTERNAL, false);\n }\n this.#initialHash = this.getHash();\n }\n #evaluateVisibilityExpression(array) {\n const length = array.length;\n if (length < 2) {\n return true;\n }\n const operator = array[0];\n for (let i = 1; i < length; i++) {\n const element = array[i];\n let state;\n if (Array.isArray(element)) {\n state = this.#evaluateVisibilityExpression(element);\n } else if (this.#groups.has(element)) {\n state = this.#groups.get(element).visible;\n } else {\n (0, _util.warn)(`Optional content group not found: ${element}`);\n return true;\n }\n switch (operator) {\n case \"And\":\n if (!state) {\n return false;\n }\n break;\n case \"Or\":\n if (state) {\n return true;\n }\n break;\n case \"Not\":\n return !state;\n default:\n return true;\n }\n }\n return operator === \"And\";\n }\n isVisible(group) {\n if (this.#groups.size === 0) {\n return true;\n }\n if (!group) {\n (0, _util.warn)(\"Optional content group not defined.\");\n return true;\n }\n if (group.type === \"OCG\") {\n if (!this.#groups.has(group.id)) {\n (0, _util.warn)(`Optional content group not found: ${group.id}`);\n return true;\n }\n return this.#groups.get(group.id).visible;\n } else if (group.type === \"OCMD\") {\n if (group.expression) {\n return this.#evaluateVisibilityExpression(group.expression);\n }\n if (!group.policy || group.policy === \"AnyOn\") {\n for (const id of group.ids) {\n if (!this.#groups.has(id)) {\n (0, _util.warn)(`Optional content group not found: ${id}`);\n return true;\n }\n if (this.#groups.get(id).visible) {\n return true;\n }\n }\n return false;\n } else if (group.policy === \"AllOn\") {\n for (const id of group.ids) {\n if (!this.#groups.has(id)) {\n (0, _util.warn)(`Optional content group not found: ${id}`);\n return true;\n }\n if (!this.#groups.get(id).visible) {\n return false;\n }\n }\n return true;\n } else if (group.policy === \"AnyOff\") {\n for (const id of group.ids) {\n if (!this.#groups.has(id)) {\n (0, _util.warn)(`Optional content group not found: ${id}`);\n return true;\n }\n if (!this.#groups.get(id).visible) {\n return true;\n }\n }\n return false;\n } else if (group.policy === \"AllOff\") {\n for (const id of group.ids) {\n if (!this.#groups.has(id)) {\n (0, _util.warn)(`Optional content group not found: ${id}`);\n return true;\n }\n if (this.#groups.get(id).visible) {\n return false;\n }\n }\n return true;\n }\n (0, _util.warn)(`Unknown optional content policy ${group.policy}.`);\n return true;\n }\n (0, _util.warn)(`Unknown group type ${group.type}.`);\n return true;\n }\n setVisibility(id, visible = true) {\n if (!this.#groups.has(id)) {\n (0, _util.warn)(`Optional content group not found: ${id}`);\n return;\n }\n this.#groups.get(id)._setVisible(INTERNAL, !!visible);\n this.#cachedGetHash = null;\n }\n get hasInitialVisibility() {\n return this.#initialHash === null || this.getHash() === this.#initialHash;\n }\n getOrder() {\n if (!this.#groups.size) {\n return null;\n }\n if (this.#order) {\n return this.#order.slice();\n }\n return [...this.#groups.keys()];\n }\n getGroups() {\n return this.#groups.size > 0 ? (0, _util.objectFromMap)(this.#groups) : null;\n }\n getGroup(id) {\n return this.#groups.get(id) || null;\n }\n getHash() {\n if (this.#cachedGetHash !== null) {\n return this.#cachedGetHash;\n }\n const hash = new _murmurhash.MurmurHash3_64();\n for (const [id, group] of this.#groups) {\n hash.update(`${id}:${group.visible}`);\n }\n return this.#cachedGetHash = hash.hexdigest();\n }\n}\nexports.OptionalContentConfig = OptionalContentConfig;\n\n/***/ }),\n/* 18 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.PDFDataTransportStream = void 0;\nvar _util = __w_pdfjs_require__(1);\nvar _display_utils = __w_pdfjs_require__(6);\nclass PDFDataTransportStream {\n constructor({\n length,\n initialData,\n progressiveDone = false,\n contentDispositionFilename = null,\n disableRange = false,\n disableStream = false\n }, pdfDataRangeTransport) {\n (0, _util.assert)(pdfDataRangeTransport, 'PDFDataTransportStream - missing required \"pdfDataRangeTransport\" argument.');\n this._queuedChunks = [];\n this._progressiveDone = progressiveDone;\n this._contentDispositionFilename = contentDispositionFilename;\n if (initialData?.length > 0) {\n const buffer = initialData instanceof Uint8Array && initialData.byteLength === initialData.buffer.byteLength ? initialData.buffer : new Uint8Array(initialData).buffer;\n this._queuedChunks.push(buffer);\n }\n this._pdfDataRangeTransport = pdfDataRangeTransport;\n this._isStreamingSupported = !disableStream;\n this._isRangeSupported = !disableRange;\n this._contentLength = length;\n this._fullRequestReader = null;\n this._rangeReaders = [];\n this._pdfDataRangeTransport.addRangeListener((begin, chunk) => {\n this._onReceiveData({\n begin,\n chunk\n });\n });\n this._pdfDataRangeTransport.addProgressListener((loaded, total) => {\n this._onProgress({\n loaded,\n total\n });\n });\n this._pdfDataRangeTransport.addProgressiveReadListener(chunk => {\n this._onReceiveData({\n chunk\n });\n });\n this._pdfDataRangeTransport.addProgressiveDoneListener(() => {\n this._onProgressiveDone();\n });\n this._pdfDataRangeTransport.transportReady();\n }\n _onReceiveData({\n begin,\n chunk\n }) {\n const buffer = chunk instanceof Uint8Array && chunk.byteLength === chunk.buffer.byteLength ? chunk.buffer : new Uint8Array(chunk).buffer;\n if (begin === undefined) {\n if (this._fullRequestReader) {\n this._fullRequestReader._enqueue(buffer);\n } else {\n this._queuedChunks.push(buffer);\n }\n } else {\n const found = this._rangeReaders.some(function (rangeReader) {\n if (rangeReader._begin !== begin) {\n return false;\n }\n rangeReader._enqueue(buffer);\n return true;\n });\n (0, _util.assert)(found, \"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.\");\n }\n }\n get _progressiveDataLength() {\n return this._fullRequestReader?._loaded ?? 0;\n }\n _onProgress(evt) {\n if (evt.total === undefined) {\n this._rangeReaders[0]?.onProgress?.({\n loaded: evt.loaded\n });\n } else {\n this._fullRequestReader?.onProgress?.({\n loaded: evt.loaded,\n total: evt.total\n });\n }\n }\n _onProgressiveDone() {\n this._fullRequestReader?.progressiveDone();\n this._progressiveDone = true;\n }\n _removeRangeReader(reader) {\n const i = this._rangeReaders.indexOf(reader);\n if (i >= 0) {\n this._rangeReaders.splice(i, 1);\n }\n }\n getFullReader() {\n (0, _util.assert)(!this._fullRequestReader, \"PDFDataTransportStream.getFullReader can only be called once.\");\n const queuedChunks = this._queuedChunks;\n this._queuedChunks = null;\n return new PDFDataTransportStreamReader(this, queuedChunks, this._progressiveDone, this._contentDispositionFilename);\n }\n getRangeReader(begin, end) {\n if (end <= this._progressiveDataLength) {\n return null;\n }\n const reader = new PDFDataTransportStreamRangeReader(this, begin, end);\n this._pdfDataRangeTransport.requestDataRange(begin, end);\n this._rangeReaders.push(reader);\n return reader;\n }\n cancelAllRequests(reason) {\n this._fullRequestReader?.cancel(reason);\n for (const reader of this._rangeReaders.slice(0)) {\n reader.cancel(reason);\n }\n this._pdfDataRangeTransport.abort();\n }\n}\nexports.PDFDataTransportStream = PDFDataTransportStream;\nclass PDFDataTransportStreamReader {\n constructor(stream, queuedChunks, progressiveDone = false, contentDispositionFilename = null) {\n this._stream = stream;\n this._done = progressiveDone || false;\n this._filename = (0, _display_utils.isPdfFile)(contentDispositionFilename) ? contentDispositionFilename : null;\n this._queuedChunks = queuedChunks || [];\n this._loaded = 0;\n for (const chunk of this._queuedChunks) {\n this._loaded += chunk.byteLength;\n }\n this._requests = [];\n this._headersReady = Promise.resolve();\n stream._fullRequestReader = this;\n this.onProgress = null;\n }\n _enqueue(chunk) {\n if (this._done) {\n return;\n }\n if (this._requests.length > 0) {\n const requestCapability = this._requests.shift();\n requestCapability.resolve({\n value: chunk,\n done: false\n });\n } else {\n this._queuedChunks.push(chunk);\n }\n this._loaded += chunk.byteLength;\n }\n get headersReady() {\n return this._headersReady;\n }\n get filename() {\n return this._filename;\n }\n get isRangeSupported() {\n return this._stream._isRangeSupported;\n }\n get isStreamingSupported() {\n return this._stream._isStreamingSupported;\n }\n get contentLength() {\n return this._stream._contentLength;\n }\n async read() {\n if (this._queuedChunks.length > 0) {\n const chunk = this._queuedChunks.shift();\n return {\n value: chunk,\n done: false\n };\n }\n if (this._done) {\n return {\n value: undefined,\n done: true\n };\n }\n const requestCapability = new _util.PromiseCapability();\n this._requests.push(requestCapability);\n return requestCapability.promise;\n }\n cancel(reason) {\n this._done = true;\n for (const requestCapability of this._requests) {\n requestCapability.resolve({\n value: undefined,\n done: true\n });\n }\n this._requests.length = 0;\n }\n progressiveDone() {\n if (this._done) {\n return;\n }\n this._done = true;\n }\n}\nclass PDFDataTransportStreamRangeReader {\n constructor(stream, begin, end) {\n this._stream = stream;\n this._begin = begin;\n this._end = end;\n this._queuedChunk = null;\n this._requests = [];\n this._done = false;\n this.onProgress = null;\n }\n _enqueue(chunk) {\n if (this._done) {\n return;\n }\n if (this._requests.length === 0) {\n this._queuedChunk = chunk;\n } else {\n const requestsCapability = this._requests.shift();\n requestsCapability.resolve({\n value: chunk,\n done: false\n });\n for (const requestCapability of this._requests) {\n requestCapability.resolve({\n value: undefined,\n done: true\n });\n }\n this._requests.length = 0;\n }\n this._done = true;\n this._stream._removeRangeReader(this);\n }\n get isStreamingSupported() {\n return false;\n }\n async read() {\n if (this._queuedChunk) {\n const chunk = this._queuedChunk;\n this._queuedChunk = null;\n return {\n value: chunk,\n done: false\n };\n }\n if (this._done) {\n return {\n value: undefined,\n done: true\n };\n }\n const requestCapability = new _util.PromiseCapability();\n this._requests.push(requestCapability);\n return requestCapability.promise;\n }\n cancel(reason) {\n this._done = true;\n for (const requestCapability of this._requests) {\n requestCapability.resolve({\n value: undefined,\n done: true\n });\n }\n this._requests.length = 0;\n this._stream._removeRangeReader(this);\n }\n}\n\n/***/ }),\n/* 19 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.PDFFetchStream = void 0;\nvar _util = __w_pdfjs_require__(1);\nvar _network_utils = __w_pdfjs_require__(20);\n;\nfunction createFetchOptions(headers, withCredentials, abortController) {\n return {\n method: \"GET\",\n headers,\n signal: abortController.signal,\n mode: \"cors\",\n credentials: withCredentials ? \"include\" : \"same-origin\",\n redirect: \"follow\"\n };\n}\nfunction createHeaders(httpHeaders) {\n const headers = new Headers();\n for (const property in httpHeaders) {\n const value = httpHeaders[property];\n if (value === undefined) {\n continue;\n }\n headers.append(property, value);\n }\n return headers;\n}\nfunction getArrayBuffer(val) {\n if (val instanceof Uint8Array) {\n return val.buffer;\n }\n if (val instanceof ArrayBuffer) {\n return val;\n }\n (0, _util.warn)(`getArrayBuffer - unexpected data format: ${val}`);\n return new Uint8Array(val).buffer;\n}\nclass PDFFetchStream {\n constructor(source) {\n this.source = source;\n this.isHttp = /^https?:/i.test(source.url);\n this.httpHeaders = this.isHttp && source.httpHeaders || {};\n this._fullRequestReader = null;\n this._rangeRequestReaders = [];\n }\n get _progressiveDataLength() {\n return this._fullRequestReader?._loaded ?? 0;\n }\n getFullReader() {\n (0, _util.assert)(!this._fullRequestReader, \"PDFFetchStream.getFullReader can only be called once.\");\n this._fullRequestReader = new PDFFetchStreamReader(this);\n return this._fullRequestReader;\n }\n getRangeReader(begin, end) {\n if (end <= this._progressiveDataLength) {\n return null;\n }\n const reader = new PDFFetchStreamRangeReader(this, begin, end);\n this._rangeRequestReaders.push(reader);\n return reader;\n }\n cancelAllRequests(reason) {\n this._fullRequestReader?.cancel(reason);\n for (const reader of this._rangeRequestReaders.slice(0)) {\n reader.cancel(reason);\n }\n }\n}\nexports.PDFFetchStream = PDFFetchStream;\nclass PDFFetchStreamReader {\n constructor(stream) {\n this._stream = stream;\n this._reader = null;\n this._loaded = 0;\n this._filename = null;\n const source = stream.source;\n this._withCredentials = source.withCredentials || false;\n this._contentLength = source.length;\n this._headersCapability = new _util.PromiseCapability();\n this._disableRange = source.disableRange || false;\n this._rangeChunkSize = source.rangeChunkSize;\n if (!this._rangeChunkSize && !this._disableRange) {\n this._disableRange = true;\n }\n this._abortController = new AbortController();\n this._isStreamingSupported = !source.disableStream;\n this._isRangeSupported = !source.disableRange;\n this._headers = createHeaders(this._stream.httpHeaders);\n const url = source.url;\n fetch(url, createFetchOptions(this._headers, this._withCredentials, this._abortController)).then(response => {\n if (!(0, _network_utils.validateResponseStatus)(response.status)) {\n throw (0, _network_utils.createResponseStatusError)(response.status, url);\n }\n this._reader = response.body.getReader();\n this._headersCapability.resolve();\n const getResponseHeader = name => {\n return response.headers.get(name);\n };\n const {\n allowRangeRequests,\n suggestedLength\n } = (0, _network_utils.validateRangeRequestCapabilities)({\n getResponseHeader,\n isHttp: this._stream.isHttp,\n rangeChunkSize: this._rangeChunkSize,\n disableRange: this._disableRange\n });\n this._isRangeSupported = allowRangeRequests;\n this._contentLength = suggestedLength || this._contentLength;\n this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader);\n if (!this._isStreamingSupported && this._isRangeSupported) {\n this.cancel(new _util.AbortException(\"Streaming is disabled.\"));\n }\n }).catch(this._headersCapability.reject);\n this.onProgress = null;\n }\n get headersReady() {\n return this._headersCapability.promise;\n }\n get filename() {\n return this._filename;\n }\n get contentLength() {\n return this._contentLength;\n }\n get isRangeSupported() {\n return this._isRangeSupported;\n }\n get isStreamingSupported() {\n return this._isStreamingSupported;\n }\n async read() {\n await this._headersCapability.promise;\n const {\n value,\n done\n } = await this._reader.read();\n if (done) {\n return {\n value,\n done\n };\n }\n this._loaded += value.byteLength;\n this.onProgress?.({\n loaded: this._loaded,\n total: this._contentLength\n });\n return {\n value: getArrayBuffer(value),\n done: false\n };\n }\n cancel(reason) {\n this._reader?.cancel(reason);\n this._abortController.abort();\n }\n}\nclass PDFFetchStreamRangeReader {\n constructor(stream, begin, end) {\n this._stream = stream;\n this._reader = null;\n this._loaded = 0;\n const source = stream.source;\n this._withCredentials = source.withCredentials || false;\n this._readCapability = new _util.PromiseCapability();\n this._isStreamingSupported = !source.disableStream;\n this._abortController = new AbortController();\n this._headers = createHeaders(this._stream.httpHeaders);\n this._headers.append(\"Range\", `bytes=${begin}-${end - 1}`);\n const url = source.url;\n fetch(url, createFetchOptions(this._headers, this._withCredentials, this._abortController)).then(response => {\n if (!(0, _network_utils.validateResponseStatus)(response.status)) {\n throw (0, _network_utils.createResponseStatusError)(response.status, url);\n }\n this._readCapability.resolve();\n this._reader = response.body.getReader();\n }).catch(this._readCapability.reject);\n this.onProgress = null;\n }\n get isStreamingSupported() {\n return this._isStreamingSupported;\n }\n async read() {\n await this._readCapability.promise;\n const {\n value,\n done\n } = await this._reader.read();\n if (done) {\n return {\n value,\n done\n };\n }\n this._loaded += value.byteLength;\n this.onProgress?.({\n loaded: this._loaded\n });\n return {\n value: getArrayBuffer(value),\n done: false\n };\n }\n cancel(reason) {\n this._reader?.cancel(reason);\n this._abortController.abort();\n }\n}\n\n/***/ }),\n/* 20 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.createResponseStatusError = createResponseStatusError;\nexports.extractFilenameFromHeader = extractFilenameFromHeader;\nexports.validateRangeRequestCapabilities = validateRangeRequestCapabilities;\nexports.validateResponseStatus = validateResponseStatus;\nvar _util = __w_pdfjs_require__(1);\nvar _content_disposition = __w_pdfjs_require__(21);\nvar _display_utils = __w_pdfjs_require__(6);\nfunction validateRangeRequestCapabilities({\n getResponseHeader,\n isHttp,\n rangeChunkSize,\n disableRange\n}) {\n const returnValues = {\n allowRangeRequests: false,\n suggestedLength: undefined\n };\n const length = parseInt(getResponseHeader(\"Content-Length\"), 10);\n if (!Number.isInteger(length)) {\n return returnValues;\n }\n returnValues.suggestedLength = length;\n if (length <= 2 * rangeChunkSize) {\n return returnValues;\n }\n if (disableRange || !isHttp) {\n return returnValues;\n }\n if (getResponseHeader(\"Accept-Ranges\") !== \"bytes\") {\n return returnValues;\n }\n const contentEncoding = getResponseHeader(\"Content-Encoding\") || \"identity\";\n if (contentEncoding !== \"identity\") {\n return returnValues;\n }\n returnValues.allowRangeRequests = true;\n return returnValues;\n}\nfunction extractFilenameFromHeader(getResponseHeader) {\n const contentDisposition = getResponseHeader(\"Content-Disposition\");\n if (contentDisposition) {\n let filename = (0, _content_disposition.getFilenameFromContentDispositionHeader)(contentDisposition);\n if (filename.includes(\"%\")) {\n try {\n filename = decodeURIComponent(filename);\n } catch {}\n }\n if ((0, _display_utils.isPdfFile)(filename)) {\n return filename;\n }\n }\n return null;\n}\nfunction createResponseStatusError(status, url) {\n if (status === 404 || status === 0 && url.startsWith(\"file:\")) {\n return new _util.MissingPDFException('Missing PDF \"' + url + '\".');\n }\n return new _util.UnexpectedResponseException(`Unexpected server response (${status}) while retrieving PDF \"${url}\".`, status);\n}\nfunction validateResponseStatus(status) {\n return status === 200 || status === 206;\n}\n\n/***/ }),\n/* 21 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.getFilenameFromContentDispositionHeader = getFilenameFromContentDispositionHeader;\nvar _util = __w_pdfjs_require__(1);\nfunction getFilenameFromContentDispositionHeader(contentDisposition) {\n let needsEncodingFixup = true;\n let tmp = toParamRegExp(\"filename\\\\*\", \"i\").exec(contentDisposition);\n if (tmp) {\n tmp = tmp[1];\n let filename = rfc2616unquote(tmp);\n filename = unescape(filename);\n filename = rfc5987decode(filename);\n filename = rfc2047decode(filename);\n return fixupEncoding(filename);\n }\n tmp = rfc2231getparam(contentDisposition);\n if (tmp) {\n const filename = rfc2047decode(tmp);\n return fixupEncoding(filename);\n }\n tmp = toParamRegExp(\"filename\", \"i\").exec(contentDisposition);\n if (tmp) {\n tmp = tmp[1];\n let filename = rfc2616unquote(tmp);\n filename = rfc2047decode(filename);\n return fixupEncoding(filename);\n }\n function toParamRegExp(attributePattern, flags) {\n return new RegExp(\"(?:^|;)\\\\s*\" + attributePattern + \"\\\\s*=\\\\s*\" + \"(\" + '[^\";\\\\s][^;\\\\s]*' + \"|\" + '\"(?:[^\"\\\\\\\\]|\\\\\\\\\"?)+\"?' + \")\", flags);\n }\n function textdecode(encoding, value) {\n if (encoding) {\n if (!/^[\\x00-\\xFF]+$/.test(value)) {\n return value;\n }\n try {\n const decoder = new TextDecoder(encoding, {\n fatal: true\n });\n const buffer = (0, _util.stringToBytes)(value);\n value = decoder.decode(buffer);\n needsEncodingFixup = false;\n } catch {}\n }\n return value;\n }\n function fixupEncoding(value) {\n if (needsEncodingFixup && /[\\x80-\\xff]/.test(value)) {\n value = textdecode(\"utf-8\", value);\n if (needsEncodingFixup) {\n value = textdecode(\"iso-8859-1\", value);\n }\n }\n return value;\n }\n function rfc2231getparam(contentDispositionStr) {\n const matches = [];\n let match;\n const iter = toParamRegExp(\"filename\\\\*((?!0\\\\d)\\\\d+)(\\\\*?)\", \"ig\");\n while ((match = iter.exec(contentDispositionStr)) !== null) {\n let [, n, quot, part] = match;\n n = parseInt(n, 10);\n if (n in matches) {\n if (n === 0) {\n break;\n }\n continue;\n }\n matches[n] = [quot, part];\n }\n const parts = [];\n for (let n = 0; n < matches.length; ++n) {\n if (!(n in matches)) {\n break;\n }\n let [quot, part] = matches[n];\n part = rfc2616unquote(part);\n if (quot) {\n part = unescape(part);\n if (n === 0) {\n part = rfc5987decode(part);\n }\n }\n parts.push(part);\n }\n return parts.join(\"\");\n }\n function rfc2616unquote(value) {\n if (value.startsWith('\"')) {\n const parts = value.slice(1).split('\\\\\"');\n for (let i = 0; i < parts.length; ++i) {\n const quotindex = parts[i].indexOf('\"');\n if (quotindex !== -1) {\n parts[i] = parts[i].slice(0, quotindex);\n parts.length = i + 1;\n }\n parts[i] = parts[i].replaceAll(/\\\\(.)/g, \"$1\");\n }\n value = parts.join('\"');\n }\n return value;\n }\n function rfc5987decode(extvalue) {\n const encodingend = extvalue.indexOf(\"'\");\n if (encodingend === -1) {\n return extvalue;\n }\n const encoding = extvalue.slice(0, encodingend);\n const langvalue = extvalue.slice(encodingend + 1);\n const value = langvalue.replace(/^[^']*'/, \"\");\n return textdecode(encoding, value);\n }\n function rfc2047decode(value) {\n if (!value.startsWith(\"=?\") || /[\\x00-\\x19\\x80-\\xff]/.test(value)) {\n return value;\n }\n return value.replaceAll(/=\\?([\\w-]*)\\?([QqBb])\\?((?:[^?]|\\?(?!=))*)\\?=/g, function (matches, charset, encoding, text) {\n if (encoding === \"q\" || encoding === \"Q\") {\n text = text.replaceAll(\"_\", \" \");\n text = text.replaceAll(/=([0-9a-fA-F]{2})/g, function (match, hex) {\n return String.fromCharCode(parseInt(hex, 16));\n });\n return textdecode(charset, text);\n }\n try {\n text = atob(text);\n } catch {}\n return textdecode(charset, text);\n });\n }\n return \"\";\n}\n\n/***/ }),\n/* 22 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.PDFNetworkStream = void 0;\nvar _util = __w_pdfjs_require__(1);\nvar _network_utils = __w_pdfjs_require__(20);\n;\nconst OK_RESPONSE = 200;\nconst PARTIAL_CONTENT_RESPONSE = 206;\nfunction getArrayBuffer(xhr) {\n const data = xhr.response;\n if (typeof data !== \"string\") {\n return data;\n }\n return (0, _util.stringToBytes)(data).buffer;\n}\nclass NetworkManager {\n constructor(url, args = {}) {\n this.url = url;\n this.isHttp = /^https?:/i.test(url);\n this.httpHeaders = this.isHttp && args.httpHeaders || Object.create(null);\n this.withCredentials = args.withCredentials || false;\n this.currXhrId = 0;\n this.pendingRequests = Object.create(null);\n }\n requestRange(begin, end, listeners) {\n const args = {\n begin,\n end\n };\n for (const prop in listeners) {\n args[prop] = listeners[prop];\n }\n return this.request(args);\n }\n requestFull(listeners) {\n return this.request(listeners);\n }\n request(args) {\n const xhr = new XMLHttpRequest();\n const xhrId = this.currXhrId++;\n const pendingRequest = this.pendingRequests[xhrId] = {\n xhr\n };\n xhr.open(\"GET\", this.url);\n xhr.withCredentials = this.withCredentials;\n for (const property in this.httpHeaders) {\n const value = this.httpHeaders[property];\n if (value === undefined) {\n continue;\n }\n xhr.setRequestHeader(property, value);\n }\n if (this.isHttp && \"begin\" in args && \"end\" in args) {\n xhr.setRequestHeader(\"Range\", `bytes=${args.begin}-${args.end - 1}`);\n pendingRequest.expectedStatus = PARTIAL_CONTENT_RESPONSE;\n } else {\n pendingRequest.expectedStatus = OK_RESPONSE;\n }\n xhr.responseType = \"arraybuffer\";\n if (args.onError) {\n xhr.onerror = function (evt) {\n args.onError(xhr.status);\n };\n }\n xhr.onreadystatechange = this.onStateChange.bind(this, xhrId);\n xhr.onprogress = this.onProgress.bind(this, xhrId);\n pendingRequest.onHeadersReceived = args.onHeadersReceived;\n pendingRequest.onDone = args.onDone;\n pendingRequest.onError = args.onError;\n pendingRequest.onProgress = args.onProgress;\n xhr.send(null);\n return xhrId;\n }\n onProgress(xhrId, evt) {\n const pendingRequest = this.pendingRequests[xhrId];\n if (!pendingRequest) {\n return;\n }\n pendingRequest.onProgress?.(evt);\n }\n onStateChange(xhrId, evt) {\n const pendingRequest = this.pendingRequests[xhrId];\n if (!pendingRequest) {\n return;\n }\n const xhr = pendingRequest.xhr;\n if (xhr.readyState >= 2 && pendingRequest.onHeadersReceived) {\n pendingRequest.onHeadersReceived();\n delete pendingRequest.onHeadersReceived;\n }\n if (xhr.readyState !== 4) {\n return;\n }\n if (!(xhrId in this.pendingRequests)) {\n return;\n }\n delete this.pendingRequests[xhrId];\n if (xhr.status === 0 && this.isHttp) {\n pendingRequest.onError?.(xhr.status);\n return;\n }\n const xhrStatus = xhr.status || OK_RESPONSE;\n const ok_response_on_range_request = xhrStatus === OK_RESPONSE && pendingRequest.expectedStatus === PARTIAL_CONTENT_RESPONSE;\n if (!ok_response_on_range_request && xhrStatus !== pendingRequest.expectedStatus) {\n pendingRequest.onError?.(xhr.status);\n return;\n }\n const chunk = getArrayBuffer(xhr);\n if (xhrStatus === PARTIAL_CONTENT_RESPONSE) {\n const rangeHeader = xhr.getResponseHeader(\"Content-Range\");\n const matches = /bytes (\\d+)-(\\d+)\\/(\\d+)/.exec(rangeHeader);\n pendingRequest.onDone({\n begin: parseInt(matches[1], 10),\n chunk\n });\n } else if (chunk) {\n pendingRequest.onDone({\n begin: 0,\n chunk\n });\n } else {\n pendingRequest.onError?.(xhr.status);\n }\n }\n getRequestXhr(xhrId) {\n return this.pendingRequests[xhrId].xhr;\n }\n isPendingRequest(xhrId) {\n return xhrId in this.pendingRequests;\n }\n abortRequest(xhrId) {\n const xhr = this.pendingRequests[xhrId].xhr;\n delete this.pendingRequests[xhrId];\n xhr.abort();\n }\n}\nclass PDFNetworkStream {\n constructor(source) {\n this._source = source;\n this._manager = new NetworkManager(source.url, {\n httpHeaders: source.httpHeaders,\n withCredentials: source.withCredentials\n });\n this._rangeChunkSize = source.rangeChunkSize;\n this._fullRequestReader = null;\n this._rangeRequestReaders = [];\n }\n _onRangeRequestReaderClosed(reader) {\n const i = this._rangeRequestReaders.indexOf(reader);\n if (i >= 0) {\n this._rangeRequestReaders.splice(i, 1);\n }\n }\n getFullReader() {\n (0, _util.assert)(!this._fullRequestReader, \"PDFNetworkStream.getFullReader can only be called once.\");\n this._fullRequestReader = new PDFNetworkStreamFullRequestReader(this._manager, this._source);\n return this._fullRequestReader;\n }\n getRangeReader(begin, end) {\n const reader = new PDFNetworkStreamRangeRequestReader(this._manager, begin, end);\n reader.onClosed = this._onRangeRequestReaderClosed.bind(this);\n this._rangeRequestReaders.push(reader);\n return reader;\n }\n cancelAllRequests(reason) {\n this._fullRequestReader?.cancel(reason);\n for (const reader of this._rangeRequestReaders.slice(0)) {\n reader.cancel(reason);\n }\n }\n}\nexports.PDFNetworkStream = PDFNetworkStream;\nclass PDFNetworkStreamFullRequestReader {\n constructor(manager, source) {\n this._manager = manager;\n const args = {\n onHeadersReceived: this._onHeadersReceived.bind(this),\n onDone: this._onDone.bind(this),\n onError: this._onError.bind(this),\n onProgress: this._onProgress.bind(this)\n };\n this._url = source.url;\n this._fullRequestId = manager.requestFull(args);\n this._headersReceivedCapability = new _util.PromiseCapability();\n this._disableRange = source.disableRange || false;\n this._contentLength = source.length;\n this._rangeChunkSize = source.rangeChunkSize;\n if (!this._rangeChunkSize && !this._disableRange) {\n this._disableRange = true;\n }\n this._isStreamingSupported = false;\n this._isRangeSupported = false;\n this._cachedChunks = [];\n this._requests = [];\n this._done = false;\n this._storedError = undefined;\n this._filename = null;\n this.onProgress = null;\n }\n _onHeadersReceived() {\n const fullRequestXhrId = this._fullRequestId;\n const fullRequestXhr = this._manager.getRequestXhr(fullRequestXhrId);\n const getResponseHeader = name => {\n return fullRequestXhr.getResponseHeader(name);\n };\n const {\n allowRangeRequests,\n suggestedLength\n } = (0, _network_utils.validateRangeRequestCapabilities)({\n getResponseHeader,\n isHttp: this._manager.isHttp,\n rangeChunkSize: this._rangeChunkSize,\n disableRange: this._disableRange\n });\n if (allowRangeRequests) {\n this._isRangeSupported = true;\n }\n this._contentLength = suggestedLength || this._contentLength;\n this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader);\n if (this._isRangeSupported) {\n this._manager.abortRequest(fullRequestXhrId);\n }\n this._headersReceivedCapability.resolve();\n }\n _onDone(data) {\n if (data) {\n if (this._requests.length > 0) {\n const requestCapability = this._requests.shift();\n requestCapability.resolve({\n value: data.chunk,\n done: false\n });\n } else {\n this._cachedChunks.push(data.chunk);\n }\n }\n this._done = true;\n if (this._cachedChunks.length > 0) {\n return;\n }\n for (const requestCapability of this._requests) {\n requestCapability.resolve({\n value: undefined,\n done: true\n });\n }\n this._requests.length = 0;\n }\n _onError(status) {\n this._storedError = (0, _network_utils.createResponseStatusError)(status, this._url);\n this._headersReceivedCapability.reject(this._storedError);\n for (const requestCapability of this._requests) {\n requestCapability.reject(this._storedError);\n }\n this._requests.length = 0;\n this._cachedChunks.length = 0;\n }\n _onProgress(evt) {\n this.onProgress?.({\n loaded: evt.loaded,\n total: evt.lengthComputable ? evt.total : this._contentLength\n });\n }\n get filename() {\n return this._filename;\n }\n get isRangeSupported() {\n return this._isRangeSupported;\n }\n get isStreamingSupported() {\n return this._isStreamingSupported;\n }\n get contentLength() {\n return this._contentLength;\n }\n get headersReady() {\n return this._headersReceivedCapability.promise;\n }\n async read() {\n if (this._storedError) {\n throw this._storedError;\n }\n if (this._cachedChunks.length > 0) {\n const chunk = this._cachedChunks.shift();\n return {\n value: chunk,\n done: false\n };\n }\n if (this._done) {\n return {\n value: undefined,\n done: true\n };\n }\n const requestCapability = new _util.PromiseCapability();\n this._requests.push(requestCapability);\n return requestCapability.promise;\n }\n cancel(reason) {\n this._done = true;\n this._headersReceivedCapability.reject(reason);\n for (const requestCapability of this._requests) {\n requestCapability.resolve({\n value: undefined,\n done: true\n });\n }\n this._requests.length = 0;\n if (this._manager.isPendingRequest(this._fullRequestId)) {\n this._manager.abortRequest(this._fullRequestId);\n }\n this._fullRequestReader = null;\n }\n}\nclass PDFNetworkStreamRangeRequestReader {\n constructor(manager, begin, end) {\n this._manager = manager;\n const args = {\n onDone: this._onDone.bind(this),\n onError: this._onError.bind(this),\n onProgress: this._onProgress.bind(this)\n };\n this._url = manager.url;\n this._requestId = manager.requestRange(begin, end, args);\n this._requests = [];\n this._queuedChunk = null;\n this._done = false;\n this._storedError = undefined;\n this.onProgress = null;\n this.onClosed = null;\n }\n _close() {\n this.onClosed?.(this);\n }\n _onDone(data) {\n const chunk = data.chunk;\n if (this._requests.length > 0) {\n const requestCapability = this._requests.shift();\n requestCapability.resolve({\n value: chunk,\n done: false\n });\n } else {\n this._queuedChunk = chunk;\n }\n this._done = true;\n for (const requestCapability of this._requests) {\n requestCapability.resolve({\n value: undefined,\n done: true\n });\n }\n this._requests.length = 0;\n this._close();\n }\n _onError(status) {\n this._storedError = (0, _network_utils.createResponseStatusError)(status, this._url);\n for (const requestCapability of this._requests) {\n requestCapability.reject(this._storedError);\n }\n this._requests.length = 0;\n this._queuedChunk = null;\n }\n _onProgress(evt) {\n if (!this.isStreamingSupported) {\n this.onProgress?.({\n loaded: evt.loaded\n });\n }\n }\n get isStreamingSupported() {\n return false;\n }\n async read() {\n if (this._storedError) {\n throw this._storedError;\n }\n if (this._queuedChunk !== null) {\n const chunk = this._queuedChunk;\n this._queuedChunk = null;\n return {\n value: chunk,\n done: false\n };\n }\n if (this._done) {\n return {\n value: undefined,\n done: true\n };\n }\n const requestCapability = new _util.PromiseCapability();\n this._requests.push(requestCapability);\n return requestCapability.promise;\n }\n cancel(reason) {\n this._done = true;\n for (const requestCapability of this._requests) {\n requestCapability.resolve({\n value: undefined,\n done: true\n });\n }\n this._requests.length = 0;\n if (this._manager.isPendingRequest(this._requestId)) {\n this._manager.abortRequest(this._requestId);\n }\n this._close();\n }\n}\n\n/***/ }),\n/* 23 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.PDFNodeStream = void 0;\nvar _util = __w_pdfjs_require__(1);\nvar _network_utils = __w_pdfjs_require__(20);\n;\nconst fileUriRegex = /^file:\\/\\/\\/[a-zA-Z]:\\//;\nfunction parseUrl(sourceUrl) {\n const url = require(\"url\");\n const parsedUrl = url.parse(sourceUrl);\n if (parsedUrl.protocol === \"file:\" || parsedUrl.host) {\n return parsedUrl;\n }\n if (/^[a-z]:[/\\\\]/i.test(sourceUrl)) {\n return url.parse(`file:///${sourceUrl}`);\n }\n if (!parsedUrl.host) {\n parsedUrl.protocol = \"file:\";\n }\n return parsedUrl;\n}\nclass PDFNodeStream {\n constructor(source) {\n this.source = source;\n this.url = parseUrl(source.url);\n this.isHttp = this.url.protocol === \"http:\" || this.url.protocol === \"https:\";\n this.isFsUrl = this.url.protocol === \"file:\";\n this.httpHeaders = this.isHttp && source.httpHeaders || {};\n this._fullRequestReader = null;\n this._rangeRequestReaders = [];\n }\n get _progressiveDataLength() {\n return this._fullRequestReader?._loaded ?? 0;\n }\n getFullReader() {\n (0, _util.assert)(!this._fullRequestReader, \"PDFNodeStream.getFullReader can only be called once.\");\n this._fullRequestReader = this.isFsUrl ? new PDFNodeStreamFsFullReader(this) : new PDFNodeStreamFullReader(this);\n return this._fullRequestReader;\n }\n getRangeReader(start, end) {\n if (end <= this._progressiveDataLength) {\n return null;\n }\n const rangeReader = this.isFsUrl ? new PDFNodeStreamFsRangeReader(this, start, end) : new PDFNodeStreamRangeReader(this, start, end);\n this._rangeRequestReaders.push(rangeReader);\n return rangeReader;\n }\n cancelAllRequests(reason) {\n this._fullRequestReader?.cancel(reason);\n for (const reader of this._rangeRequestReaders.slice(0)) {\n reader.cancel(reason);\n }\n }\n}\nexports.PDFNodeStream = PDFNodeStream;\nclass BaseFullReader {\n constructor(stream) {\n this._url = stream.url;\n this._done = false;\n this._storedError = null;\n this.onProgress = null;\n const source = stream.source;\n this._contentLength = source.length;\n this._loaded = 0;\n this._filename = null;\n this._disableRange = source.disableRange || false;\n this._rangeChunkSize = source.rangeChunkSize;\n if (!this._rangeChunkSize && !this._disableRange) {\n this._disableRange = true;\n }\n this._isStreamingSupported = !source.disableStream;\n this._isRangeSupported = !source.disableRange;\n this._readableStream = null;\n this._readCapability = new _util.PromiseCapability();\n this._headersCapability = new _util.PromiseCapability();\n }\n get headersReady() {\n return this._headersCapability.promise;\n }\n get filename() {\n return this._filename;\n }\n get contentLength() {\n return this._contentLength;\n }\n get isRangeSupported() {\n return this._isRangeSupported;\n }\n get isStreamingSupported() {\n return this._isStreamingSupported;\n }\n async read() {\n await this._readCapability.promise;\n if (this._done) {\n return {\n value: undefined,\n done: true\n };\n }\n if (this._storedError) {\n throw this._storedError;\n }\n const chunk = this._readableStream.read();\n if (chunk === null) {\n this._readCapability = new _util.PromiseCapability();\n return this.read();\n }\n this._loaded += chunk.length;\n this.onProgress?.({\n loaded: this._loaded,\n total: this._contentLength\n });\n const buffer = new Uint8Array(chunk).buffer;\n return {\n value: buffer,\n done: false\n };\n }\n cancel(reason) {\n if (!this._readableStream) {\n this._error(reason);\n return;\n }\n this._readableStream.destroy(reason);\n }\n _error(reason) {\n this._storedError = reason;\n this._readCapability.resolve();\n }\n _setReadableStream(readableStream) {\n this._readableStream = readableStream;\n readableStream.on(\"readable\", () => {\n this._readCapability.resolve();\n });\n readableStream.on(\"end\", () => {\n readableStream.destroy();\n this._done = true;\n this._readCapability.resolve();\n });\n readableStream.on(\"error\", reason => {\n this._error(reason);\n });\n if (!this._isStreamingSupported && this._isRangeSupported) {\n this._error(new _util.AbortException(\"streaming is disabled\"));\n }\n if (this._storedError) {\n this._readableStream.destroy(this._storedError);\n }\n }\n}\nclass BaseRangeReader {\n constructor(stream) {\n this._url = stream.url;\n this._done = false;\n this._storedError = null;\n this.onProgress = null;\n this._loaded = 0;\n this._readableStream = null;\n this._readCapability = new _util.PromiseCapability();\n const source = stream.source;\n this._isStreamingSupported = !source.disableStream;\n }\n get isStreamingSupported() {\n return this._isStreamingSupported;\n }\n async read() {\n await this._readCapability.promise;\n if (this._done) {\n return {\n value: undefined,\n done: true\n };\n }\n if (this._storedError) {\n throw this._storedError;\n }\n const chunk = this._readableStream.read();\n if (chunk === null) {\n this._readCapability = new _util.PromiseCapability();\n return this.read();\n }\n this._loaded += chunk.length;\n this.onProgress?.({\n loaded: this._loaded\n });\n const buffer = new Uint8Array(chunk).buffer;\n return {\n value: buffer,\n done: false\n };\n }\n cancel(reason) {\n if (!this._readableStream) {\n this._error(reason);\n return;\n }\n this._readableStream.destroy(reason);\n }\n _error(reason) {\n this._storedError = reason;\n this._readCapability.resolve();\n }\n _setReadableStream(readableStream) {\n this._readableStream = readableStream;\n readableStream.on(\"readable\", () => {\n this._readCapability.resolve();\n });\n readableStream.on(\"end\", () => {\n readableStream.destroy();\n this._done = true;\n this._readCapability.resolve();\n });\n readableStream.on(\"error\", reason => {\n this._error(reason);\n });\n if (this._storedError) {\n this._readableStream.destroy(this._storedError);\n }\n }\n}\nfunction createRequestOptions(parsedUrl, headers) {\n return {\n protocol: parsedUrl.protocol,\n auth: parsedUrl.auth,\n host: parsedUrl.hostname,\n port: parsedUrl.port,\n path: parsedUrl.path,\n method: \"GET\",\n headers\n };\n}\nclass PDFNodeStreamFullReader extends BaseFullReader {\n constructor(stream) {\n super(stream);\n const handleResponse = response => {\n if (response.statusCode === 404) {\n const error = new _util.MissingPDFException(`Missing PDF \"${this._url}\".`);\n this._storedError = error;\n this._headersCapability.reject(error);\n return;\n }\n this._headersCapability.resolve();\n this._setReadableStream(response);\n const getResponseHeader = name => {\n return this._readableStream.headers[name.toLowerCase()];\n };\n const {\n allowRangeRequests,\n suggestedLength\n } = (0, _network_utils.validateRangeRequestCapabilities)({\n getResponseHeader,\n isHttp: stream.isHttp,\n rangeChunkSize: this._rangeChunkSize,\n disableRange: this._disableRange\n });\n this._isRangeSupported = allowRangeRequests;\n this._contentLength = suggestedLength || this._contentLength;\n this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader);\n };\n this._request = null;\n if (this._url.protocol === \"http:\") {\n const http = require(\"http\");\n this._request = http.request(createRequestOptions(this._url, stream.httpHeaders), handleResponse);\n } else {\n const https = require(\"https\");\n this._request = https.request(createRequestOptions(this._url, stream.httpHeaders), handleResponse);\n }\n this._request.on(\"error\", reason => {\n this._storedError = reason;\n this._headersCapability.reject(reason);\n });\n this._request.end();\n }\n}\nclass PDFNodeStreamRangeReader extends BaseRangeReader {\n constructor(stream, start, end) {\n super(stream);\n this._httpHeaders = {};\n for (const property in stream.httpHeaders) {\n const value = stream.httpHeaders[property];\n if (value === undefined) {\n continue;\n }\n this._httpHeaders[property] = value;\n }\n this._httpHeaders.Range = `bytes=${start}-${end - 1}`;\n const handleResponse = response => {\n if (response.statusCode === 404) {\n const error = new _util.MissingPDFException(`Missing PDF \"${this._url}\".`);\n this._storedError = error;\n return;\n }\n this._setReadableStream(response);\n };\n this._request = null;\n if (this._url.protocol === \"http:\") {\n const http = require(\"http\");\n this._request = http.request(createRequestOptions(this._url, this._httpHeaders), handleResponse);\n } else {\n const https = require(\"https\");\n this._request = https.request(createRequestOptions(this._url, this._httpHeaders), handleResponse);\n }\n this._request.on(\"error\", reason => {\n this._storedError = reason;\n });\n this._request.end();\n }\n}\nclass PDFNodeStreamFsFullReader extends BaseFullReader {\n constructor(stream) {\n super(stream);\n let path = decodeURIComponent(this._url.path);\n if (fileUriRegex.test(this._url.href)) {\n path = path.replace(/^\\//, \"\");\n }\n const fs = require(\"fs\");\n fs.lstat(path, (error, stat) => {\n if (error) {\n if (error.code === \"ENOENT\") {\n error = new _util.MissingPDFException(`Missing PDF \"${path}\".`);\n }\n this._storedError = error;\n this._headersCapability.reject(error);\n return;\n }\n this._contentLength = stat.size;\n this._setReadableStream(fs.createReadStream(path));\n this._headersCapability.resolve();\n });\n }\n}\nclass PDFNodeStreamFsRangeReader extends BaseRangeReader {\n constructor(stream, start, end) {\n super(stream);\n let path = decodeURIComponent(this._url.path);\n if (fileUriRegex.test(this._url.href)) {\n path = path.replace(/^\\//, \"\");\n }\n const fs = require(\"fs\");\n this._setReadableStream(fs.createReadStream(path, {\n start,\n end: end - 1\n }));\n }\n}\n\n/***/ }),\n/* 24 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.SVGGraphics = void 0;\nvar _display_utils = __w_pdfjs_require__(6);\nvar _util = __w_pdfjs_require__(1);\n;\nconst SVG_DEFAULTS = {\n fontStyle: \"normal\",\n fontWeight: \"normal\",\n fillColor: \"#000000\"\n};\nconst XML_NS = \"http://www.w3.org/XML/1998/namespace\";\nconst XLINK_NS = \"http://www.w3.org/1999/xlink\";\nconst LINE_CAP_STYLES = [\"butt\", \"round\", \"square\"];\nconst LINE_JOIN_STYLES = [\"miter\", \"round\", \"bevel\"];\nconst createObjectURL = function (data, contentType = \"\", forceDataSchema = false) {\n if (URL.createObjectURL && typeof Blob !== \"undefined\" && !forceDataSchema) {\n return URL.createObjectURL(new Blob([data], {\n type: contentType\n }));\n }\n const digits = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n let buffer = `data:${contentType};base64,`;\n for (let i = 0, ii = data.length; i < ii; i += 3) {\n const b1 = data[i] & 0xff;\n const b2 = data[i + 1] & 0xff;\n const b3 = data[i + 2] & 0xff;\n const d1 = b1 >> 2,\n d2 = (b1 & 3) << 4 | b2 >> 4;\n const d3 = i + 1 < ii ? (b2 & 0xf) << 2 | b3 >> 6 : 64;\n const d4 = i + 2 < ii ? b3 & 0x3f : 64;\n buffer += digits[d1] + digits[d2] + digits[d3] + digits[d4];\n }\n return buffer;\n};\nconst convertImgDataToPng = function () {\n const PNG_HEADER = new Uint8Array([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);\n const CHUNK_WRAPPER_SIZE = 12;\n const crcTable = new Int32Array(256);\n for (let i = 0; i < 256; i++) {\n let c = i;\n for (let h = 0; h < 8; h++) {\n c = c & 1 ? 0xedb88320 ^ c >> 1 & 0x7fffffff : c >> 1 & 0x7fffffff;\n }\n crcTable[i] = c;\n }\n function crc32(data, start, end) {\n let crc = -1;\n for (let i = start; i < end; i++) {\n const a = (crc ^ data[i]) & 0xff;\n const b = crcTable[a];\n crc = crc >>> 8 ^ b;\n }\n return crc ^ -1;\n }\n function writePngChunk(type, body, data, offset) {\n let p = offset;\n const len = body.length;\n data[p] = len >> 24 & 0xff;\n data[p + 1] = len >> 16 & 0xff;\n data[p + 2] = len >> 8 & 0xff;\n data[p + 3] = len & 0xff;\n p += 4;\n data[p] = type.charCodeAt(0) & 0xff;\n data[p + 1] = type.charCodeAt(1) & 0xff;\n data[p + 2] = type.charCodeAt(2) & 0xff;\n data[p + 3] = type.charCodeAt(3) & 0xff;\n p += 4;\n data.set(body, p);\n p += body.length;\n const crc = crc32(data, offset + 4, p);\n data[p] = crc >> 24 & 0xff;\n data[p + 1] = crc >> 16 & 0xff;\n data[p + 2] = crc >> 8 & 0xff;\n data[p + 3] = crc & 0xff;\n }\n function adler32(data, start, end) {\n let a = 1;\n let b = 0;\n for (let i = start; i < end; ++i) {\n a = (a + (data[i] & 0xff)) % 65521;\n b = (b + a) % 65521;\n }\n return b << 16 | a;\n }\n function deflateSync(literals) {\n if (!_util.isNodeJS) {\n return deflateSyncUncompressed(literals);\n }\n try {\n const input = parseInt(process.versions.node) >= 8 ? literals : Buffer.from(literals);\n const output = require(\"zlib\").deflateSync(input, {\n level: 9\n });\n return output instanceof Uint8Array ? output : new Uint8Array(output);\n } catch (e) {\n (0, _util.warn)(\"Not compressing PNG because zlib.deflateSync is unavailable: \" + e);\n }\n return deflateSyncUncompressed(literals);\n }\n function deflateSyncUncompressed(literals) {\n let len = literals.length;\n const maxBlockLength = 0xffff;\n const deflateBlocks = Math.ceil(len / maxBlockLength);\n const idat = new Uint8Array(2 + len + deflateBlocks * 5 + 4);\n let pi = 0;\n idat[pi++] = 0x78;\n idat[pi++] = 0x9c;\n let pos = 0;\n while (len > maxBlockLength) {\n idat[pi++] = 0x00;\n idat[pi++] = 0xff;\n idat[pi++] = 0xff;\n idat[pi++] = 0x00;\n idat[pi++] = 0x00;\n idat.set(literals.subarray(pos, pos + maxBlockLength), pi);\n pi += maxBlockLength;\n pos += maxBlockLength;\n len -= maxBlockLength;\n }\n idat[pi++] = 0x01;\n idat[pi++] = len & 0xff;\n idat[pi++] = len >> 8 & 0xff;\n idat[pi++] = ~len & 0xffff & 0xff;\n idat[pi++] = (~len & 0xffff) >> 8 & 0xff;\n idat.set(literals.subarray(pos), pi);\n pi += literals.length - pos;\n const adler = adler32(literals, 0, literals.length);\n idat[pi++] = adler >> 24 & 0xff;\n idat[pi++] = adler >> 16 & 0xff;\n idat[pi++] = adler >> 8 & 0xff;\n idat[pi++] = adler & 0xff;\n return idat;\n }\n function encode(imgData, kind, forceDataSchema, isMask) {\n const width = imgData.width;\n const height = imgData.height;\n let bitDepth, colorType, lineSize;\n const bytes = imgData.data;\n switch (kind) {\n case _util.ImageKind.GRAYSCALE_1BPP:\n colorType = 0;\n bitDepth = 1;\n lineSize = width + 7 >> 3;\n break;\n case _util.ImageKind.RGB_24BPP:\n colorType = 2;\n bitDepth = 8;\n lineSize = width * 3;\n break;\n case _util.ImageKind.RGBA_32BPP:\n colorType = 6;\n bitDepth = 8;\n lineSize = width * 4;\n break;\n default:\n throw new Error(\"invalid format\");\n }\n const literals = new Uint8Array((1 + lineSize) * height);\n let offsetLiterals = 0,\n offsetBytes = 0;\n for (let y = 0; y < height; ++y) {\n literals[offsetLiterals++] = 0;\n literals.set(bytes.subarray(offsetBytes, offsetBytes + lineSize), offsetLiterals);\n offsetBytes += lineSize;\n offsetLiterals += lineSize;\n }\n if (kind === _util.ImageKind.GRAYSCALE_1BPP && isMask) {\n offsetLiterals = 0;\n for (let y = 0; y < height; y++) {\n offsetLiterals++;\n for (let i = 0; i < lineSize; i++) {\n literals[offsetLiterals++] ^= 0xff;\n }\n }\n }\n const ihdr = new Uint8Array([width >> 24 & 0xff, width >> 16 & 0xff, width >> 8 & 0xff, width & 0xff, height >> 24 & 0xff, height >> 16 & 0xff, height >> 8 & 0xff, height & 0xff, bitDepth, colorType, 0x00, 0x00, 0x00]);\n const idat = deflateSync(literals);\n const pngLength = PNG_HEADER.length + CHUNK_WRAPPER_SIZE * 3 + ihdr.length + idat.length;\n const data = new Uint8Array(pngLength);\n let offset = 0;\n data.set(PNG_HEADER, offset);\n offset += PNG_HEADER.length;\n writePngChunk(\"IHDR\", ihdr, data, offset);\n offset += CHUNK_WRAPPER_SIZE + ihdr.length;\n writePngChunk(\"IDATA\", idat, data, offset);\n offset += CHUNK_WRAPPER_SIZE + idat.length;\n writePngChunk(\"IEND\", new Uint8Array(0), data, offset);\n return createObjectURL(data, \"image/png\", forceDataSchema);\n }\n return function convertImgDataToPng(imgData, forceDataSchema, isMask) {\n const kind = imgData.kind === undefined ? _util.ImageKind.GRAYSCALE_1BPP : imgData.kind;\n return encode(imgData, kind, forceDataSchema, isMask);\n };\n}();\nclass SVGExtraState {\n constructor() {\n this.fontSizeScale = 1;\n this.fontWeight = SVG_DEFAULTS.fontWeight;\n this.fontSize = 0;\n this.textMatrix = _util.IDENTITY_MATRIX;\n this.fontMatrix = _util.FONT_IDENTITY_MATRIX;\n this.leading = 0;\n this.textRenderingMode = _util.TextRenderingMode.FILL;\n this.textMatrixScale = 1;\n this.x = 0;\n this.y = 0;\n this.lineX = 0;\n this.lineY = 0;\n this.charSpacing = 0;\n this.wordSpacing = 0;\n this.textHScale = 1;\n this.textRise = 0;\n this.fillColor = SVG_DEFAULTS.fillColor;\n this.strokeColor = \"#000000\";\n this.fillAlpha = 1;\n this.strokeAlpha = 1;\n this.lineWidth = 1;\n this.lineJoin = \"\";\n this.lineCap = \"\";\n this.miterLimit = 0;\n this.dashArray = [];\n this.dashPhase = 0;\n this.dependencies = [];\n this.activeClipUrl = null;\n this.clipGroup = null;\n this.maskId = \"\";\n }\n clone() {\n return Object.create(this);\n }\n setCurrentPoint(x, y) {\n this.x = x;\n this.y = y;\n }\n}\nfunction opListToTree(opList) {\n let opTree = [];\n const tmp = [];\n for (const opListElement of opList) {\n if (opListElement.fn === \"save\") {\n opTree.push({\n fnId: 92,\n fn: \"group\",\n items: []\n });\n tmp.push(opTree);\n opTree = opTree.at(-1).items;\n continue;\n }\n if (opListElement.fn === \"restore\") {\n opTree = tmp.pop();\n } else {\n opTree.push(opListElement);\n }\n }\n return opTree;\n}\nfunction pf(value) {\n if (Number.isInteger(value)) {\n return value.toString();\n }\n const s = value.toFixed(10);\n let i = s.length - 1;\n if (s[i] !== \"0\") {\n return s;\n }\n do {\n i--;\n } while (s[i] === \"0\");\n return s.substring(0, s[i] === \".\" ? i : i + 1);\n}\nfunction pm(m) {\n if (m[4] === 0 && m[5] === 0) {\n if (m[1] === 0 && m[2] === 0) {\n if (m[0] === 1 && m[3] === 1) {\n return \"\";\n }\n return `scale(${pf(m[0])} ${pf(m[3])})`;\n }\n if (m[0] === m[3] && m[1] === -m[2]) {\n const a = Math.acos(m[0]) * 180 / Math.PI;\n return `rotate(${pf(a)})`;\n }\n } else if (m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 1) {\n return `translate(${pf(m[4])} ${pf(m[5])})`;\n }\n return `matrix(${pf(m[0])} ${pf(m[1])} ${pf(m[2])} ${pf(m[3])} ${pf(m[4])} ` + `${pf(m[5])})`;\n}\nlet clipCount = 0;\nlet maskCount = 0;\nlet shadingCount = 0;\nclass SVGGraphics {\n constructor(commonObjs, objs, forceDataSchema = false) {\n (0, _display_utils.deprecated)(\"The SVG back-end is no longer maintained and *may* be removed in the future.\");\n this.svgFactory = new _display_utils.DOMSVGFactory();\n this.current = new SVGExtraState();\n this.transformMatrix = _util.IDENTITY_MATRIX;\n this.transformStack = [];\n this.extraStack = [];\n this.commonObjs = commonObjs;\n this.objs = objs;\n this.pendingClip = null;\n this.pendingEOFill = false;\n this.embedFonts = false;\n this.embeddedFonts = Object.create(null);\n this.cssStyle = null;\n this.forceDataSchema = !!forceDataSchema;\n this._operatorIdMapping = [];\n for (const op in _util.OPS) {\n this._operatorIdMapping[_util.OPS[op]] = op;\n }\n }\n getObject(data, fallback = null) {\n if (typeof data === \"string\") {\n return data.startsWith(\"g_\") ? this.commonObjs.get(data) : this.objs.get(data);\n }\n return fallback;\n }\n save() {\n this.transformStack.push(this.transformMatrix);\n const old = this.current;\n this.extraStack.push(old);\n this.current = old.clone();\n }\n restore() {\n this.transformMatrix = this.transformStack.pop();\n this.current = this.extraStack.pop();\n this.pendingClip = null;\n this.tgrp = null;\n }\n group(items) {\n this.save();\n this.executeOpTree(items);\n this.restore();\n }\n loadDependencies(operatorList) {\n const fnArray = operatorList.fnArray;\n const argsArray = operatorList.argsArray;\n for (let i = 0, ii = fnArray.length; i < ii; i++) {\n if (fnArray[i] !== _util.OPS.dependency) {\n continue;\n }\n for (const obj of argsArray[i]) {\n const objsPool = obj.startsWith(\"g_\") ? this.commonObjs : this.objs;\n const promise = new Promise(resolve => {\n objsPool.get(obj, resolve);\n });\n this.current.dependencies.push(promise);\n }\n }\n return Promise.all(this.current.dependencies);\n }\n transform(a, b, c, d, e, f) {\n const transformMatrix = [a, b, c, d, e, f];\n this.transformMatrix = _util.Util.transform(this.transformMatrix, transformMatrix);\n this.tgrp = null;\n }\n getSVG(operatorList, viewport) {\n this.viewport = viewport;\n const svgElement = this._initialize(viewport);\n return this.loadDependencies(operatorList).then(() => {\n this.transformMatrix = _util.IDENTITY_MATRIX;\n this.executeOpTree(this.convertOpList(operatorList));\n return svgElement;\n });\n }\n convertOpList(operatorList) {\n const operatorIdMapping = this._operatorIdMapping;\n const argsArray = operatorList.argsArray;\n const fnArray = operatorList.fnArray;\n const opList = [];\n for (let i = 0, ii = fnArray.length; i < ii; i++) {\n const fnId = fnArray[i];\n opList.push({\n fnId,\n fn: operatorIdMapping[fnId],\n args: argsArray[i]\n });\n }\n return opListToTree(opList);\n }\n executeOpTree(opTree) {\n for (const opTreeElement of opTree) {\n const fn = opTreeElement.fn;\n const fnId = opTreeElement.fnId;\n const args = opTreeElement.args;\n switch (fnId | 0) {\n case _util.OPS.beginText:\n this.beginText();\n break;\n case _util.OPS.dependency:\n break;\n case _util.OPS.setLeading:\n this.setLeading(args);\n break;\n case _util.OPS.setLeadingMoveText:\n this.setLeadingMoveText(args[0], args[1]);\n break;\n case _util.OPS.setFont:\n this.setFont(args);\n break;\n case _util.OPS.showText:\n this.showText(args[0]);\n break;\n case _util.OPS.showSpacedText:\n this.showText(args[0]);\n break;\n case _util.OPS.endText:\n this.endText();\n break;\n case _util.OPS.moveText:\n this.moveText(args[0], args[1]);\n break;\n case _util.OPS.setCharSpacing:\n this.setCharSpacing(args[0]);\n break;\n case _util.OPS.setWordSpacing:\n this.setWordSpacing(args[0]);\n break;\n case _util.OPS.setHScale:\n this.setHScale(args[0]);\n break;\n case _util.OPS.setTextMatrix:\n this.setTextMatrix(args[0], args[1], args[2], args[3], args[4], args[5]);\n break;\n case _util.OPS.setTextRise:\n this.setTextRise(args[0]);\n break;\n case _util.OPS.setTextRenderingMode:\n this.setTextRenderingMode(args[0]);\n break;\n case _util.OPS.setLineWidth:\n this.setLineWidth(args[0]);\n break;\n case _util.OPS.setLineJoin:\n this.setLineJoin(args[0]);\n break;\n case _util.OPS.setLineCap:\n this.setLineCap(args[0]);\n break;\n case _util.OPS.setMiterLimit:\n this.setMiterLimit(args[0]);\n break;\n case _util.OPS.setFillRGBColor:\n this.setFillRGBColor(args[0], args[1], args[2]);\n break;\n case _util.OPS.setStrokeRGBColor:\n this.setStrokeRGBColor(args[0], args[1], args[2]);\n break;\n case _util.OPS.setStrokeColorN:\n this.setStrokeColorN(args);\n break;\n case _util.OPS.setFillColorN:\n this.setFillColorN(args);\n break;\n case _util.OPS.shadingFill:\n this.shadingFill(args[0]);\n break;\n case _util.OPS.setDash:\n this.setDash(args[0], args[1]);\n break;\n case _util.OPS.setRenderingIntent:\n this.setRenderingIntent(args[0]);\n break;\n case _util.OPS.setFlatness:\n this.setFlatness(args[0]);\n break;\n case _util.OPS.setGState:\n this.setGState(args[0]);\n break;\n case _util.OPS.fill:\n this.fill();\n break;\n case _util.OPS.eoFill:\n this.eoFill();\n break;\n case _util.OPS.stroke:\n this.stroke();\n break;\n case _util.OPS.fillStroke:\n this.fillStroke();\n break;\n case _util.OPS.eoFillStroke:\n this.eoFillStroke();\n break;\n case _util.OPS.clip:\n this.clip(\"nonzero\");\n break;\n case _util.OPS.eoClip:\n this.clip(\"evenodd\");\n break;\n case _util.OPS.paintSolidColorImageMask:\n this.paintSolidColorImageMask();\n break;\n case _util.OPS.paintImageXObject:\n this.paintImageXObject(args[0]);\n break;\n case _util.OPS.paintInlineImageXObject:\n this.paintInlineImageXObject(args[0]);\n break;\n case _util.OPS.paintImageMaskXObject:\n this.paintImageMaskXObject(args[0]);\n break;\n case _util.OPS.paintFormXObjectBegin:\n this.paintFormXObjectBegin(args[0], args[1]);\n break;\n case _util.OPS.paintFormXObjectEnd:\n this.paintFormXObjectEnd();\n break;\n case _util.OPS.closePath:\n this.closePath();\n break;\n case _util.OPS.closeStroke:\n this.closeStroke();\n break;\n case _util.OPS.closeFillStroke:\n this.closeFillStroke();\n break;\n case _util.OPS.closeEOFillStroke:\n this.closeEOFillStroke();\n break;\n case _util.OPS.nextLine:\n this.nextLine();\n break;\n case _util.OPS.transform:\n this.transform(args[0], args[1], args[2], args[3], args[4], args[5]);\n break;\n case _util.OPS.constructPath:\n this.constructPath(args[0], args[1]);\n break;\n case _util.OPS.endPath:\n this.endPath();\n break;\n case 92:\n this.group(opTreeElement.items);\n break;\n default:\n (0, _util.warn)(`Unimplemented operator ${fn}`);\n break;\n }\n }\n }\n setWordSpacing(wordSpacing) {\n this.current.wordSpacing = wordSpacing;\n }\n setCharSpacing(charSpacing) {\n this.current.charSpacing = charSpacing;\n }\n nextLine() {\n this.moveText(0, this.current.leading);\n }\n setTextMatrix(a, b, c, d, e, f) {\n const current = this.current;\n current.textMatrix = current.lineMatrix = [a, b, c, d, e, f];\n current.textMatrixScale = Math.hypot(a, b);\n current.x = current.lineX = 0;\n current.y = current.lineY = 0;\n current.xcoords = [];\n current.ycoords = [];\n current.tspan = this.svgFactory.createElement(\"svg:tspan\");\n current.tspan.setAttributeNS(null, \"font-family\", current.fontFamily);\n current.tspan.setAttributeNS(null, \"font-size\", `${pf(current.fontSize)}px`);\n current.tspan.setAttributeNS(null, \"y\", pf(-current.y));\n current.txtElement = this.svgFactory.createElement(\"svg:text\");\n current.txtElement.append(current.tspan);\n }\n beginText() {\n const current = this.current;\n current.x = current.lineX = 0;\n current.y = current.lineY = 0;\n current.textMatrix = _util.IDENTITY_MATRIX;\n current.lineMatrix = _util.IDENTITY_MATRIX;\n current.textMatrixScale = 1;\n current.tspan = this.svgFactory.createElement(\"svg:tspan\");\n current.txtElement = this.svgFactory.createElement(\"svg:text\");\n current.txtgrp = this.svgFactory.createElement(\"svg:g\");\n current.xcoords = [];\n current.ycoords = [];\n }\n moveText(x, y) {\n const current = this.current;\n current.x = current.lineX += x;\n current.y = current.lineY += y;\n current.xcoords = [];\n current.ycoords = [];\n current.tspan = this.svgFactory.createElement(\"svg:tspan\");\n current.tspan.setAttributeNS(null, \"font-family\", current.fontFamily);\n current.tspan.setAttributeNS(null, \"font-size\", `${pf(current.fontSize)}px`);\n current.tspan.setAttributeNS(null, \"y\", pf(-current.y));\n }\n showText(glyphs) {\n const current = this.current;\n const font = current.font;\n const fontSize = current.fontSize;\n if (fontSize === 0) {\n return;\n }\n const fontSizeScale = current.fontSizeScale;\n const charSpacing = current.charSpacing;\n const wordSpacing = current.wordSpacing;\n const fontDirection = current.fontDirection;\n const textHScale = current.textHScale * fontDirection;\n const vertical = font.vertical;\n const spacingDir = vertical ? 1 : -1;\n const defaultVMetrics = font.defaultVMetrics;\n const widthAdvanceScale = fontSize * current.fontMatrix[0];\n let x = 0;\n for (const glyph of glyphs) {\n if (glyph === null) {\n x += fontDirection * wordSpacing;\n continue;\n } else if (typeof glyph === \"number\") {\n x += spacingDir * glyph * fontSize / 1000;\n continue;\n }\n const spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing;\n const character = glyph.fontChar;\n let scaledX, scaledY;\n let width = glyph.width;\n if (vertical) {\n let vx;\n const vmetric = glyph.vmetric || defaultVMetrics;\n vx = glyph.vmetric ? vmetric[1] : width * 0.5;\n vx = -vx * widthAdvanceScale;\n const vy = vmetric[2] * widthAdvanceScale;\n width = vmetric ? -vmetric[0] : width;\n scaledX = vx / fontSizeScale;\n scaledY = (x + vy) / fontSizeScale;\n } else {\n scaledX = x / fontSizeScale;\n scaledY = 0;\n }\n if (glyph.isInFont || font.missingFile) {\n current.xcoords.push(current.x + scaledX);\n if (vertical) {\n current.ycoords.push(-current.y + scaledY);\n }\n current.tspan.textContent += character;\n } else {}\n const charWidth = vertical ? width * widthAdvanceScale - spacing * fontDirection : width * widthAdvanceScale + spacing * fontDirection;\n x += charWidth;\n }\n current.tspan.setAttributeNS(null, \"x\", current.xcoords.map(pf).join(\" \"));\n if (vertical) {\n current.tspan.setAttributeNS(null, \"y\", current.ycoords.map(pf).join(\" \"));\n } else {\n current.tspan.setAttributeNS(null, \"y\", pf(-current.y));\n }\n if (vertical) {\n current.y -= x;\n } else {\n current.x += x * textHScale;\n }\n current.tspan.setAttributeNS(null, \"font-family\", current.fontFamily);\n current.tspan.setAttributeNS(null, \"font-size\", `${pf(current.fontSize)}px`);\n if (current.fontStyle !== SVG_DEFAULTS.fontStyle) {\n current.tspan.setAttributeNS(null, \"font-style\", current.fontStyle);\n }\n if (current.fontWeight !== SVG_DEFAULTS.fontWeight) {\n current.tspan.setAttributeNS(null, \"font-weight\", current.fontWeight);\n }\n const fillStrokeMode = current.textRenderingMode & _util.TextRenderingMode.FILL_STROKE_MASK;\n if (fillStrokeMode === _util.TextRenderingMode.FILL || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) {\n if (current.fillColor !== SVG_DEFAULTS.fillColor) {\n current.tspan.setAttributeNS(null, \"fill\", current.fillColor);\n }\n if (current.fillAlpha < 1) {\n current.tspan.setAttributeNS(null, \"fill-opacity\", current.fillAlpha);\n }\n } else if (current.textRenderingMode === _util.TextRenderingMode.ADD_TO_PATH) {\n current.tspan.setAttributeNS(null, \"fill\", \"transparent\");\n } else {\n current.tspan.setAttributeNS(null, \"fill\", \"none\");\n }\n if (fillStrokeMode === _util.TextRenderingMode.STROKE || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) {\n const lineWidthScale = 1 / (current.textMatrixScale || 1);\n this._setStrokeAttributes(current.tspan, lineWidthScale);\n }\n let textMatrix = current.textMatrix;\n if (current.textRise !== 0) {\n textMatrix = textMatrix.slice();\n textMatrix[5] += current.textRise;\n }\n current.txtElement.setAttributeNS(null, \"transform\", `${pm(textMatrix)} scale(${pf(textHScale)}, -1)`);\n current.txtElement.setAttributeNS(XML_NS, \"xml:space\", \"preserve\");\n current.txtElement.append(current.tspan);\n current.txtgrp.append(current.txtElement);\n this._ensureTransformGroup().append(current.txtElement);\n }\n setLeadingMoveText(x, y) {\n this.setLeading(-y);\n this.moveText(x, y);\n }\n addFontStyle(fontObj) {\n if (!fontObj.data) {\n throw new Error(\"addFontStyle: No font data available, \" + 'ensure that the \"fontExtraProperties\" API parameter is set.');\n }\n if (!this.cssStyle) {\n this.cssStyle = this.svgFactory.createElement(\"svg:style\");\n this.cssStyle.setAttributeNS(null, \"type\", \"text/css\");\n this.defs.append(this.cssStyle);\n }\n const url = createObjectURL(fontObj.data, fontObj.mimetype, this.forceDataSchema);\n this.cssStyle.textContent += `@font-face { font-family: \"${fontObj.loadedName}\";` + ` src: url(${url}); }\\n`;\n }\n setFont(details) {\n const current = this.current;\n const fontObj = this.commonObjs.get(details[0]);\n let size = details[1];\n current.font = fontObj;\n if (this.embedFonts && !fontObj.missingFile && !this.embeddedFonts[fontObj.loadedName]) {\n this.addFontStyle(fontObj);\n this.embeddedFonts[fontObj.loadedName] = fontObj;\n }\n current.fontMatrix = fontObj.fontMatrix || _util.FONT_IDENTITY_MATRIX;\n let bold = \"normal\";\n if (fontObj.black) {\n bold = \"900\";\n } else if (fontObj.bold) {\n bold = \"bold\";\n }\n const italic = fontObj.italic ? \"italic\" : \"normal\";\n if (size < 0) {\n size = -size;\n current.fontDirection = -1;\n } else {\n current.fontDirection = 1;\n }\n current.fontSize = size;\n current.fontFamily = fontObj.loadedName;\n current.fontWeight = bold;\n current.fontStyle = italic;\n current.tspan = this.svgFactory.createElement(\"svg:tspan\");\n current.tspan.setAttributeNS(null, \"y\", pf(-current.y));\n current.xcoords = [];\n current.ycoords = [];\n }\n endText() {\n const current = this.current;\n if (current.textRenderingMode & _util.TextRenderingMode.ADD_TO_PATH_FLAG && current.txtElement?.hasChildNodes()) {\n current.element = current.txtElement;\n this.clip(\"nonzero\");\n this.endPath();\n }\n }\n setLineWidth(width) {\n if (width > 0) {\n this.current.lineWidth = width;\n }\n }\n setLineCap(style) {\n this.current.lineCap = LINE_CAP_STYLES[style];\n }\n setLineJoin(style) {\n this.current.lineJoin = LINE_JOIN_STYLES[style];\n }\n setMiterLimit(limit) {\n this.current.miterLimit = limit;\n }\n setStrokeAlpha(strokeAlpha) {\n this.current.strokeAlpha = strokeAlpha;\n }\n setStrokeRGBColor(r, g, b) {\n this.current.strokeColor = _util.Util.makeHexColor(r, g, b);\n }\n setFillAlpha(fillAlpha) {\n this.current.fillAlpha = fillAlpha;\n }\n setFillRGBColor(r, g, b) {\n this.current.fillColor = _util.Util.makeHexColor(r, g, b);\n this.current.tspan = this.svgFactory.createElement(\"svg:tspan\");\n this.current.xcoords = [];\n this.current.ycoords = [];\n }\n setStrokeColorN(args) {\n this.current.strokeColor = this._makeColorN_Pattern(args);\n }\n setFillColorN(args) {\n this.current.fillColor = this._makeColorN_Pattern(args);\n }\n shadingFill(args) {\n const {\n width,\n height\n } = this.viewport;\n const inv = _util.Util.inverseTransform(this.transformMatrix);\n const [x0, y0, x1, y1] = _util.Util.getAxialAlignedBoundingBox([0, 0, width, height], inv);\n const rect = this.svgFactory.createElement(\"svg:rect\");\n rect.setAttributeNS(null, \"x\", x0);\n rect.setAttributeNS(null, \"y\", y0);\n rect.setAttributeNS(null, \"width\", x1 - x0);\n rect.setAttributeNS(null, \"height\", y1 - y0);\n rect.setAttributeNS(null, \"fill\", this._makeShadingPattern(args));\n if (this.current.fillAlpha < 1) {\n rect.setAttributeNS(null, \"fill-opacity\", this.current.fillAlpha);\n }\n this._ensureTransformGroup().append(rect);\n }\n _makeColorN_Pattern(args) {\n if (args[0] === \"TilingPattern\") {\n return this._makeTilingPattern(args);\n }\n return this._makeShadingPattern(args);\n }\n _makeTilingPattern(args) {\n const color = args[1];\n const operatorList = args[2];\n const matrix = args[3] || _util.IDENTITY_MATRIX;\n const [x0, y0, x1, y1] = args[4];\n const xstep = args[5];\n const ystep = args[6];\n const paintType = args[7];\n const tilingId = `shading${shadingCount++}`;\n const [tx0, ty0, tx1, ty1] = _util.Util.normalizeRect([..._util.Util.applyTransform([x0, y0], matrix), ..._util.Util.applyTransform([x1, y1], matrix)]);\n const [xscale, yscale] = _util.Util.singularValueDecompose2dScale(matrix);\n const txstep = xstep * xscale;\n const tystep = ystep * yscale;\n const tiling = this.svgFactory.createElement(\"svg:pattern\");\n tiling.setAttributeNS(null, \"id\", tilingId);\n tiling.setAttributeNS(null, \"patternUnits\", \"userSpaceOnUse\");\n tiling.setAttributeNS(null, \"width\", txstep);\n tiling.setAttributeNS(null, \"height\", tystep);\n tiling.setAttributeNS(null, \"x\", `${tx0}`);\n tiling.setAttributeNS(null, \"y\", `${ty0}`);\n const svg = this.svg;\n const transformMatrix = this.transformMatrix;\n const fillColor = this.current.fillColor;\n const strokeColor = this.current.strokeColor;\n const bbox = this.svgFactory.create(tx1 - tx0, ty1 - ty0);\n this.svg = bbox;\n this.transformMatrix = matrix;\n if (paintType === 2) {\n const cssColor = _util.Util.makeHexColor(...color);\n this.current.fillColor = cssColor;\n this.current.strokeColor = cssColor;\n }\n this.executeOpTree(this.convertOpList(operatorList));\n this.svg = svg;\n this.transformMatrix = transformMatrix;\n this.current.fillColor = fillColor;\n this.current.strokeColor = strokeColor;\n tiling.append(bbox.childNodes[0]);\n this.defs.append(tiling);\n return `url(#${tilingId})`;\n }\n _makeShadingPattern(args) {\n if (typeof args === \"string\") {\n args = this.objs.get(args);\n }\n switch (args[0]) {\n case \"RadialAxial\":\n const shadingId = `shading${shadingCount++}`;\n const colorStops = args[3];\n let gradient;\n switch (args[1]) {\n case \"axial\":\n const point0 = args[4];\n const point1 = args[5];\n gradient = this.svgFactory.createElement(\"svg:linearGradient\");\n gradient.setAttributeNS(null, \"id\", shadingId);\n gradient.setAttributeNS(null, \"gradientUnits\", \"userSpaceOnUse\");\n gradient.setAttributeNS(null, \"x1\", point0[0]);\n gradient.setAttributeNS(null, \"y1\", point0[1]);\n gradient.setAttributeNS(null, \"x2\", point1[0]);\n gradient.setAttributeNS(null, \"y2\", point1[1]);\n break;\n case \"radial\":\n const focalPoint = args[4];\n const circlePoint = args[5];\n const focalRadius = args[6];\n const circleRadius = args[7];\n gradient = this.svgFactory.createElement(\"svg:radialGradient\");\n gradient.setAttributeNS(null, \"id\", shadingId);\n gradient.setAttributeNS(null, \"gradientUnits\", \"userSpaceOnUse\");\n gradient.setAttributeNS(null, \"cx\", circlePoint[0]);\n gradient.setAttributeNS(null, \"cy\", circlePoint[1]);\n gradient.setAttributeNS(null, \"r\", circleRadius);\n gradient.setAttributeNS(null, \"fx\", focalPoint[0]);\n gradient.setAttributeNS(null, \"fy\", focalPoint[1]);\n gradient.setAttributeNS(null, \"fr\", focalRadius);\n break;\n default:\n throw new Error(`Unknown RadialAxial type: ${args[1]}`);\n }\n for (const colorStop of colorStops) {\n const stop = this.svgFactory.createElement(\"svg:stop\");\n stop.setAttributeNS(null, \"offset\", colorStop[0]);\n stop.setAttributeNS(null, \"stop-color\", colorStop[1]);\n gradient.append(stop);\n }\n this.defs.append(gradient);\n return `url(#${shadingId})`;\n case \"Mesh\":\n (0, _util.warn)(\"Unimplemented pattern Mesh\");\n return null;\n case \"Dummy\":\n return \"hotpink\";\n default:\n throw new Error(`Unknown IR type: ${args[0]}`);\n }\n }\n setDash(dashArray, dashPhase) {\n this.current.dashArray = dashArray;\n this.current.dashPhase = dashPhase;\n }\n constructPath(ops, args) {\n const current = this.current;\n let x = current.x,\n y = current.y;\n let d = [];\n let j = 0;\n for (const op of ops) {\n switch (op | 0) {\n case _util.OPS.rectangle:\n x = args[j++];\n y = args[j++];\n const width = args[j++];\n const height = args[j++];\n const xw = x + width;\n const yh = y + height;\n d.push(\"M\", pf(x), pf(y), \"L\", pf(xw), pf(y), \"L\", pf(xw), pf(yh), \"L\", pf(x), pf(yh), \"Z\");\n break;\n case _util.OPS.moveTo:\n x = args[j++];\n y = args[j++];\n d.push(\"M\", pf(x), pf(y));\n break;\n case _util.OPS.lineTo:\n x = args[j++];\n y = args[j++];\n d.push(\"L\", pf(x), pf(y));\n break;\n case _util.OPS.curveTo:\n x = args[j + 4];\n y = args[j + 5];\n d.push(\"C\", pf(args[j]), pf(args[j + 1]), pf(args[j + 2]), pf(args[j + 3]), pf(x), pf(y));\n j += 6;\n break;\n case _util.OPS.curveTo2:\n d.push(\"C\", pf(x), pf(y), pf(args[j]), pf(args[j + 1]), pf(args[j + 2]), pf(args[j + 3]));\n x = args[j + 2];\n y = args[j + 3];\n j += 4;\n break;\n case _util.OPS.curveTo3:\n x = args[j + 2];\n y = args[j + 3];\n d.push(\"C\", pf(args[j]), pf(args[j + 1]), pf(x), pf(y), pf(x), pf(y));\n j += 4;\n break;\n case _util.OPS.closePath:\n d.push(\"Z\");\n break;\n }\n }\n d = d.join(\" \");\n if (current.path && ops.length > 0 && ops[0] !== _util.OPS.rectangle && ops[0] !== _util.OPS.moveTo) {\n d = current.path.getAttributeNS(null, \"d\") + d;\n } else {\n current.path = this.svgFactory.createElement(\"svg:path\");\n this._ensureTransformGroup().append(current.path);\n }\n current.path.setAttributeNS(null, \"d\", d);\n current.path.setAttributeNS(null, \"fill\", \"none\");\n current.element = current.path;\n current.setCurrentPoint(x, y);\n }\n endPath() {\n const current = this.current;\n current.path = null;\n if (!this.pendingClip) {\n return;\n }\n if (!current.element) {\n this.pendingClip = null;\n return;\n }\n const clipId = `clippath${clipCount++}`;\n const clipPath = this.svgFactory.createElement(\"svg:clipPath\");\n clipPath.setAttributeNS(null, \"id\", clipId);\n clipPath.setAttributeNS(null, \"transform\", pm(this.transformMatrix));\n const clipElement = current.element.cloneNode(true);\n if (this.pendingClip === \"evenodd\") {\n clipElement.setAttributeNS(null, \"clip-rule\", \"evenodd\");\n } else {\n clipElement.setAttributeNS(null, \"clip-rule\", \"nonzero\");\n }\n this.pendingClip = null;\n clipPath.append(clipElement);\n this.defs.append(clipPath);\n if (current.activeClipUrl) {\n current.clipGroup = null;\n for (const prev of this.extraStack) {\n prev.clipGroup = null;\n }\n clipPath.setAttributeNS(null, \"clip-path\", current.activeClipUrl);\n }\n current.activeClipUrl = `url(#${clipId})`;\n this.tgrp = null;\n }\n clip(type) {\n this.pendingClip = type;\n }\n closePath() {\n const current = this.current;\n if (current.path) {\n const d = `${current.path.getAttributeNS(null, \"d\")}Z`;\n current.path.setAttributeNS(null, \"d\", d);\n }\n }\n setLeading(leading) {\n this.current.leading = -leading;\n }\n setTextRise(textRise) {\n this.current.textRise = textRise;\n }\n setTextRenderingMode(textRenderingMode) {\n this.current.textRenderingMode = textRenderingMode;\n }\n setHScale(scale) {\n this.current.textHScale = scale / 100;\n }\n setRenderingIntent(intent) {}\n setFlatness(flatness) {}\n setGState(states) {\n for (const [key, value] of states) {\n switch (key) {\n case \"LW\":\n this.setLineWidth(value);\n break;\n case \"LC\":\n this.setLineCap(value);\n break;\n case \"LJ\":\n this.setLineJoin(value);\n break;\n case \"ML\":\n this.setMiterLimit(value);\n break;\n case \"D\":\n this.setDash(value[0], value[1]);\n break;\n case \"RI\":\n this.setRenderingIntent(value);\n break;\n case \"FL\":\n this.setFlatness(value);\n break;\n case \"Font\":\n this.setFont(value);\n break;\n case \"CA\":\n this.setStrokeAlpha(value);\n break;\n case \"ca\":\n this.setFillAlpha(value);\n break;\n default:\n (0, _util.warn)(`Unimplemented graphic state operator ${key}`);\n break;\n }\n }\n }\n fill() {\n const current = this.current;\n if (current.element) {\n current.element.setAttributeNS(null, \"fill\", current.fillColor);\n current.element.setAttributeNS(null, \"fill-opacity\", current.fillAlpha);\n this.endPath();\n }\n }\n stroke() {\n const current = this.current;\n if (current.element) {\n this._setStrokeAttributes(current.element);\n current.element.setAttributeNS(null, \"fill\", \"none\");\n this.endPath();\n }\n }\n _setStrokeAttributes(element, lineWidthScale = 1) {\n const current = this.current;\n let dashArray = current.dashArray;\n if (lineWidthScale !== 1 && dashArray.length > 0) {\n dashArray = dashArray.map(function (value) {\n return lineWidthScale * value;\n });\n }\n element.setAttributeNS(null, \"stroke\", current.strokeColor);\n element.setAttributeNS(null, \"stroke-opacity\", current.strokeAlpha);\n element.setAttributeNS(null, \"stroke-miterlimit\", pf(current.miterLimit));\n element.setAttributeNS(null, \"stroke-linecap\", current.lineCap);\n element.setAttributeNS(null, \"stroke-linejoin\", current.lineJoin);\n element.setAttributeNS(null, \"stroke-width\", pf(lineWidthScale * current.lineWidth) + \"px\");\n element.setAttributeNS(null, \"stroke-dasharray\", dashArray.map(pf).join(\" \"));\n element.setAttributeNS(null, \"stroke-dashoffset\", pf(lineWidthScale * current.dashPhase) + \"px\");\n }\n eoFill() {\n this.current.element?.setAttributeNS(null, \"fill-rule\", \"evenodd\");\n this.fill();\n }\n fillStroke() {\n this.stroke();\n this.fill();\n }\n eoFillStroke() {\n this.current.element?.setAttributeNS(null, \"fill-rule\", \"evenodd\");\n this.fillStroke();\n }\n closeStroke() {\n this.closePath();\n this.stroke();\n }\n closeFillStroke() {\n this.closePath();\n this.fillStroke();\n }\n closeEOFillStroke() {\n this.closePath();\n this.eoFillStroke();\n }\n paintSolidColorImageMask() {\n const rect = this.svgFactory.createElement(\"svg:rect\");\n rect.setAttributeNS(null, \"x\", \"0\");\n rect.setAttributeNS(null, \"y\", \"0\");\n rect.setAttributeNS(null, \"width\", \"1px\");\n rect.setAttributeNS(null, \"height\", \"1px\");\n rect.setAttributeNS(null, \"fill\", this.current.fillColor);\n this._ensureTransformGroup().append(rect);\n }\n paintImageXObject(objId) {\n const imgData = this.getObject(objId);\n if (!imgData) {\n (0, _util.warn)(`Dependent image with object ID ${objId} is not ready yet`);\n return;\n }\n this.paintInlineImageXObject(imgData);\n }\n paintInlineImageXObject(imgData, mask) {\n const width = imgData.width;\n const height = imgData.height;\n const imgSrc = convertImgDataToPng(imgData, this.forceDataSchema, !!mask);\n const cliprect = this.svgFactory.createElement(\"svg:rect\");\n cliprect.setAttributeNS(null, \"x\", \"0\");\n cliprect.setAttributeNS(null, \"y\", \"0\");\n cliprect.setAttributeNS(null, \"width\", pf(width));\n cliprect.setAttributeNS(null, \"height\", pf(height));\n this.current.element = cliprect;\n this.clip(\"nonzero\");\n const imgEl = this.svgFactory.createElement(\"svg:image\");\n imgEl.setAttributeNS(XLINK_NS, \"xlink:href\", imgSrc);\n imgEl.setAttributeNS(null, \"x\", \"0\");\n imgEl.setAttributeNS(null, \"y\", pf(-height));\n imgEl.setAttributeNS(null, \"width\", pf(width) + \"px\");\n imgEl.setAttributeNS(null, \"height\", pf(height) + \"px\");\n imgEl.setAttributeNS(null, \"transform\", `scale(${pf(1 / width)} ${pf(-1 / height)})`);\n if (mask) {\n mask.append(imgEl);\n } else {\n this._ensureTransformGroup().append(imgEl);\n }\n }\n paintImageMaskXObject(img) {\n const imgData = this.getObject(img.data, img);\n if (imgData.bitmap) {\n (0, _util.warn)(\"paintImageMaskXObject: ImageBitmap support is not implemented, \" + \"ensure that the `isOffscreenCanvasSupported` API parameter is disabled.\");\n return;\n }\n const current = this.current;\n const width = imgData.width;\n const height = imgData.height;\n const fillColor = current.fillColor;\n current.maskId = `mask${maskCount++}`;\n const mask = this.svgFactory.createElement(\"svg:mask\");\n mask.setAttributeNS(null, \"id\", current.maskId);\n const rect = this.svgFactory.createElement(\"svg:rect\");\n rect.setAttributeNS(null, \"x\", \"0\");\n rect.setAttributeNS(null, \"y\", \"0\");\n rect.setAttributeNS(null, \"width\", pf(width));\n rect.setAttributeNS(null, \"height\", pf(height));\n rect.setAttributeNS(null, \"fill\", fillColor);\n rect.setAttributeNS(null, \"mask\", `url(#${current.maskId})`);\n this.defs.append(mask);\n this._ensureTransformGroup().append(rect);\n this.paintInlineImageXObject(imgData, mask);\n }\n paintFormXObjectBegin(matrix, bbox) {\n if (Array.isArray(matrix) && matrix.length === 6) {\n this.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\n }\n if (bbox) {\n const width = bbox[2] - bbox[0];\n const height = bbox[3] - bbox[1];\n const cliprect = this.svgFactory.createElement(\"svg:rect\");\n cliprect.setAttributeNS(null, \"x\", bbox[0]);\n cliprect.setAttributeNS(null, \"y\", bbox[1]);\n cliprect.setAttributeNS(null, \"width\", pf(width));\n cliprect.setAttributeNS(null, \"height\", pf(height));\n this.current.element = cliprect;\n this.clip(\"nonzero\");\n this.endPath();\n }\n }\n paintFormXObjectEnd() {}\n _initialize(viewport) {\n const svg = this.svgFactory.create(viewport.width, viewport.height);\n const definitions = this.svgFactory.createElement(\"svg:defs\");\n svg.append(definitions);\n this.defs = definitions;\n const rootGroup = this.svgFactory.createElement(\"svg:g\");\n rootGroup.setAttributeNS(null, \"transform\", pm(viewport.transform));\n svg.append(rootGroup);\n this.svg = rootGroup;\n return svg;\n }\n _ensureClipGroup() {\n if (!this.current.clipGroup) {\n const clipGroup = this.svgFactory.createElement(\"svg:g\");\n clipGroup.setAttributeNS(null, \"clip-path\", this.current.activeClipUrl);\n this.svg.append(clipGroup);\n this.current.clipGroup = clipGroup;\n }\n return this.current.clipGroup;\n }\n _ensureTransformGroup() {\n if (!this.tgrp) {\n this.tgrp = this.svgFactory.createElement(\"svg:g\");\n this.tgrp.setAttributeNS(null, \"transform\", pm(this.transformMatrix));\n if (this.current.activeClipUrl) {\n this._ensureClipGroup().append(this.tgrp);\n } else {\n this.svg.append(this.tgrp);\n }\n }\n return this.tgrp;\n }\n}\nexports.SVGGraphics = SVGGraphics;\n\n/***/ }),\n/* 25 */\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.XfaText = void 0;\nclass XfaText {\n static textContent(xfa) {\n const items = [];\n const output = {\n items,\n styles: Object.create(null)\n };\n function walk(node) {\n if (!node) {\n return;\n }\n let str = null;\n const name = node.name;\n if (name === \"#text\") {\n str = node.value;\n } else if (!XfaText.shouldBuildText(name)) {\n return;\n } else if (node?.attributes?.textContent) {\n str = node.attributes.textContent;\n } else if (node.value) {\n str = node.value;\n }\n if (str !== null) {\n items.push({\n str\n });\n }\n if (!node.children) {\n return;\n }\n for (const child of node.children) {\n walk(child);\n }\n }\n walk(xfa);\n return output;\n }\n static shouldBuildText(name) {\n return !(name === \"textarea\" || name === \"input\" || name === \"option\" || name === \"select\");\n }\n}\nexports.XfaText = XfaText;\n\n/***/ }),\n/* 26 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.TextLayerRenderTask = void 0;\nexports.renderTextLayer = renderTextLayer;\nexports.updateTextLayer = updateTextLayer;\nvar _util = __w_pdfjs_require__(1);\nvar _display_utils = __w_pdfjs_require__(6);\nconst MAX_TEXT_DIVS_TO_RENDER = 100000;\nconst DEFAULT_FONT_SIZE = 30;\nconst DEFAULT_FONT_ASCENT = 0.8;\nconst ascentCache = new Map();\nfunction getCtx(size, isOffscreenCanvasSupported) {\n let ctx;\n if (isOffscreenCanvasSupported && _util.FeatureTest.isOffscreenCanvasSupported) {\n ctx = new OffscreenCanvas(size, size).getContext(\"2d\", {\n alpha: false\n });\n } else {\n const canvas = document.createElement(\"canvas\");\n canvas.width = canvas.height = size;\n ctx = canvas.getContext(\"2d\", {\n alpha: false\n });\n }\n return ctx;\n}\nfunction getAscent(fontFamily, isOffscreenCanvasSupported) {\n const cachedAscent = ascentCache.get(fontFamily);\n if (cachedAscent) {\n return cachedAscent;\n }\n const ctx = getCtx(DEFAULT_FONT_SIZE, isOffscreenCanvasSupported);\n ctx.font = `${DEFAULT_FONT_SIZE}px ${fontFamily}`;\n const metrics = ctx.measureText(\"\");\n let ascent = metrics.fontBoundingBoxAscent;\n let descent = Math.abs(metrics.fontBoundingBoxDescent);\n if (ascent) {\n const ratio = ascent / (ascent + descent);\n ascentCache.set(fontFamily, ratio);\n ctx.canvas.width = ctx.canvas.height = 0;\n return ratio;\n }\n ctx.strokeStyle = \"red\";\n ctx.clearRect(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE);\n ctx.strokeText(\"g\", 0, 0);\n let pixels = ctx.getImageData(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE).data;\n descent = 0;\n for (let i = pixels.length - 1 - 3; i >= 0; i -= 4) {\n if (pixels[i] > 0) {\n descent = Math.ceil(i / 4 / DEFAULT_FONT_SIZE);\n break;\n }\n }\n ctx.clearRect(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE);\n ctx.strokeText(\"A\", 0, DEFAULT_FONT_SIZE);\n pixels = ctx.getImageData(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE).data;\n ascent = 0;\n for (let i = 0, ii = pixels.length; i < ii; i += 4) {\n if (pixels[i] > 0) {\n ascent = DEFAULT_FONT_SIZE - Math.floor(i / 4 / DEFAULT_FONT_SIZE);\n break;\n }\n }\n ctx.canvas.width = ctx.canvas.height = 0;\n if (ascent) {\n const ratio = ascent / (ascent + descent);\n ascentCache.set(fontFamily, ratio);\n return ratio;\n }\n ascentCache.set(fontFamily, DEFAULT_FONT_ASCENT);\n return DEFAULT_FONT_ASCENT;\n}\nfunction appendText(task, geom, styles) {\n const textDiv = document.createElement(\"span\");\n const textDivProperties = {\n angle: 0,\n canvasWidth: 0,\n hasText: geom.str !== \"\",\n hasEOL: geom.hasEOL,\n fontSize: 0\n };\n task._textDivs.push(textDiv);\n const tx = _util.Util.transform(task._transform, geom.transform);\n let angle = Math.atan2(tx[1], tx[0]);\n const style = styles[geom.fontName];\n if (style.vertical) {\n angle += Math.PI / 2;\n }\n const fontHeight = Math.hypot(tx[2], tx[3]);\n const fontAscent = fontHeight * getAscent(style.fontFamily, task._isOffscreenCanvasSupported);\n let left, top;\n if (angle === 0) {\n left = tx[4];\n top = tx[5] - fontAscent;\n } else {\n left = tx[4] + fontAscent * Math.sin(angle);\n top = tx[5] - fontAscent * Math.cos(angle);\n }\n const scaleFactorStr = \"calc(var(--scale-factor)*\";\n const divStyle = textDiv.style;\n if (task._container === task._rootContainer) {\n divStyle.left = `${(100 * left / task._pageWidth).toFixed(2)}%`;\n divStyle.top = `${(100 * top / task._pageHeight).toFixed(2)}%`;\n } else {\n divStyle.left = `${scaleFactorStr}${left.toFixed(2)}px)`;\n divStyle.top = `${scaleFactorStr}${top.toFixed(2)}px)`;\n }\n divStyle.fontSize = `${scaleFactorStr}${fontHeight.toFixed(2)}px)`;\n divStyle.fontFamily = style.fontFamily;\n textDivProperties.fontSize = fontHeight;\n textDiv.setAttribute(\"role\", \"presentation\");\n textDiv.textContent = geom.str;\n textDiv.dir = geom.dir;\n if (task._fontInspectorEnabled) {\n textDiv.dataset.fontName = geom.fontName;\n }\n if (angle !== 0) {\n textDivProperties.angle = angle * (180 / Math.PI);\n }\n let shouldScaleText = false;\n if (geom.str.length > 1) {\n shouldScaleText = true;\n } else if (geom.str !== \" \" && geom.transform[0] !== geom.transform[3]) {\n const absScaleX = Math.abs(geom.transform[0]),\n absScaleY = Math.abs(geom.transform[3]);\n if (absScaleX !== absScaleY && Math.max(absScaleX, absScaleY) / Math.min(absScaleX, absScaleY) > 1.5) {\n shouldScaleText = true;\n }\n }\n if (shouldScaleText) {\n textDivProperties.canvasWidth = style.vertical ? geom.height : geom.width;\n }\n task._textDivProperties.set(textDiv, textDivProperties);\n if (task._isReadableStream) {\n task._layoutText(textDiv);\n }\n}\nfunction layout(params) {\n const {\n div,\n scale,\n properties,\n ctx,\n prevFontSize,\n prevFontFamily\n } = params;\n const {\n style\n } = div;\n let transform = \"\";\n if (properties.canvasWidth !== 0 && properties.hasText) {\n const {\n fontFamily\n } = style;\n const {\n canvasWidth,\n fontSize\n } = properties;\n if (prevFontSize !== fontSize || prevFontFamily !== fontFamily) {\n ctx.font = `${fontSize * scale}px ${fontFamily}`;\n params.prevFontSize = fontSize;\n params.prevFontFamily = fontFamily;\n }\n const {\n width\n } = ctx.measureText(div.textContent);\n if (width > 0) {\n transform = `scaleX(${canvasWidth * scale / width})`;\n }\n }\n if (properties.angle !== 0) {\n transform = `rotate(${properties.angle}deg) ${transform}`;\n }\n if (transform.length > 0) {\n style.transform = transform;\n }\n}\nfunction render(task) {\n if (task._canceled) {\n return;\n }\n const textDivs = task._textDivs;\n const capability = task._capability;\n const textDivsLength = textDivs.length;\n if (textDivsLength > MAX_TEXT_DIVS_TO_RENDER) {\n capability.resolve();\n return;\n }\n if (!task._isReadableStream) {\n for (const textDiv of textDivs) {\n task._layoutText(textDiv);\n }\n }\n capability.resolve();\n}\nclass TextLayerRenderTask {\n constructor({\n textContentSource,\n container,\n viewport,\n textDivs,\n textDivProperties,\n textContentItemsStr,\n isOffscreenCanvasSupported\n }) {\n this._textContentSource = textContentSource;\n this._isReadableStream = textContentSource instanceof ReadableStream;\n this._container = this._rootContainer = container;\n this._textDivs = textDivs || [];\n this._textContentItemsStr = textContentItemsStr || [];\n this._isOffscreenCanvasSupported = isOffscreenCanvasSupported;\n this._fontInspectorEnabled = !!globalThis.FontInspector?.enabled;\n this._reader = null;\n this._textDivProperties = textDivProperties || new WeakMap();\n this._canceled = false;\n this._capability = new _util.PromiseCapability();\n this._layoutTextParams = {\n prevFontSize: null,\n prevFontFamily: null,\n div: null,\n scale: viewport.scale * (globalThis.devicePixelRatio || 1),\n properties: null,\n ctx: getCtx(0, isOffscreenCanvasSupported)\n };\n const {\n pageWidth,\n pageHeight,\n pageX,\n pageY\n } = viewport.rawDims;\n this._transform = [1, 0, 0, -1, -pageX, pageY + pageHeight];\n this._pageWidth = pageWidth;\n this._pageHeight = pageHeight;\n (0, _display_utils.setLayerDimensions)(container, viewport);\n this._capability.promise.finally(() => {\n this._layoutTextParams = null;\n }).catch(() => {});\n }\n get promise() {\n return this._capability.promise;\n }\n cancel() {\n this._canceled = true;\n if (this._reader) {\n this._reader.cancel(new _util.AbortException(\"TextLayer task cancelled.\")).catch(() => {});\n this._reader = null;\n }\n this._capability.reject(new _util.AbortException(\"TextLayer task cancelled.\"));\n }\n _processItems(items, styleCache) {\n for (const item of items) {\n if (item.str === undefined) {\n if (item.type === \"beginMarkedContentProps\" || item.type === \"beginMarkedContent\") {\n const parent = this._container;\n this._container = document.createElement(\"span\");\n this._container.classList.add(\"markedContent\");\n if (item.id !== null) {\n this._container.setAttribute(\"id\", `${item.id}`);\n }\n parent.append(this._container);\n } else if (item.type === \"endMarkedContent\") {\n this._container = this._container.parentNode;\n }\n continue;\n }\n this._textContentItemsStr.push(item.str);\n appendText(this, item, styleCache);\n }\n }\n _layoutText(textDiv) {\n const textDivProperties = this._layoutTextParams.properties = this._textDivProperties.get(textDiv);\n this._layoutTextParams.div = textDiv;\n layout(this._layoutTextParams);\n if (textDivProperties.hasText) {\n this._container.append(textDiv);\n }\n if (textDivProperties.hasEOL) {\n const br = document.createElement(\"br\");\n br.setAttribute(\"role\", \"presentation\");\n this._container.append(br);\n }\n }\n _render() {\n const capability = new _util.PromiseCapability();\n let styleCache = Object.create(null);\n if (this._isReadableStream) {\n const pump = () => {\n this._reader.read().then(({\n value,\n done\n }) => {\n if (done) {\n capability.resolve();\n return;\n }\n Object.assign(styleCache, value.styles);\n this._processItems(value.items, styleCache);\n pump();\n }, capability.reject);\n };\n this._reader = this._textContentSource.getReader();\n pump();\n } else if (this._textContentSource) {\n const {\n items,\n styles\n } = this._textContentSource;\n this._processItems(items, styles);\n capability.resolve();\n } else {\n throw new Error('No \"textContentSource\" parameter specified.');\n }\n capability.promise.then(() => {\n styleCache = null;\n render(this);\n }, this._capability.reject);\n }\n}\nexports.TextLayerRenderTask = TextLayerRenderTask;\nfunction renderTextLayer(params) {\n if (!params.textContentSource && (params.textContent || params.textContentStream)) {\n (0, _display_utils.deprecated)(\"The TextLayerRender `textContent`/`textContentStream` parameters \" + \"will be removed in the future, please use `textContentSource` instead.\");\n params.textContentSource = params.textContent || params.textContentStream;\n }\n const {\n container,\n viewport\n } = params;\n const style = getComputedStyle(container);\n const visibility = style.getPropertyValue(\"visibility\");\n const scaleFactor = parseFloat(style.getPropertyValue(\"--scale-factor\"));\n if (visibility === \"visible\" && (!scaleFactor || Math.abs(scaleFactor - viewport.scale) > 1e-5)) {\n console.error(\"The `--scale-factor` CSS-variable must be set, \" + \"to the same value as `viewport.scale`, \" + \"either on the `container`-element itself or higher up in the DOM.\");\n }\n const task = new TextLayerRenderTask(params);\n task._render();\n return task;\n}\nfunction updateTextLayer({\n container,\n viewport,\n textDivs,\n textDivProperties,\n isOffscreenCanvasSupported,\n mustRotate = true,\n mustRescale = true\n}) {\n if (mustRotate) {\n (0, _display_utils.setLayerDimensions)(container, {\n rotation: viewport.rotation\n });\n }\n if (mustRescale) {\n const ctx = getCtx(0, isOffscreenCanvasSupported);\n const scale = viewport.scale * (globalThis.devicePixelRatio || 1);\n const params = {\n prevFontSize: null,\n prevFontFamily: null,\n div: null,\n scale,\n properties: null,\n ctx\n };\n for (const div of textDivs) {\n params.properties = textDivProperties.get(div);\n params.div = div;\n layout(params);\n }\n }\n}\n\n/***/ }),\n/* 27 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.AnnotationEditorLayer = void 0;\nvar _util = __w_pdfjs_require__(1);\nvar _editor = __w_pdfjs_require__(4);\nvar _freetext = __w_pdfjs_require__(28);\nvar _ink = __w_pdfjs_require__(33);\nvar _display_utils = __w_pdfjs_require__(6);\nvar _stamp = __w_pdfjs_require__(34);\nclass AnnotationEditorLayer {\n #accessibilityManager;\n #allowClick = false;\n #annotationLayer = null;\n #boundPointerup = this.pointerup.bind(this);\n #boundPointerdown = this.pointerdown.bind(this);\n #editors = new Map();\n #hadPointerDown = false;\n #isCleaningUp = false;\n #isDisabling = false;\n #uiManager;\n static _initialized = false;\n constructor({\n uiManager,\n pageIndex,\n div,\n accessibilityManager,\n annotationLayer,\n viewport,\n l10n\n }) {\n const editorTypes = [_freetext.FreeTextEditor, _ink.InkEditor, _stamp.StampEditor];\n if (!AnnotationEditorLayer._initialized) {\n AnnotationEditorLayer._initialized = true;\n for (const editorType of editorTypes) {\n editorType.initialize(l10n);\n }\n }\n uiManager.registerEditorTypes(editorTypes);\n this.#uiManager = uiManager;\n this.pageIndex = pageIndex;\n this.div = div;\n this.#accessibilityManager = accessibilityManager;\n this.#annotationLayer = annotationLayer;\n this.viewport = viewport;\n this.#uiManager.addLayer(this);\n }\n get isEmpty() {\n return this.#editors.size === 0;\n }\n updateToolbar(mode) {\n this.#uiManager.updateToolbar(mode);\n }\n updateMode(mode = this.#uiManager.getMode()) {\n this.#cleanup();\n if (mode === _util.AnnotationEditorType.INK) {\n this.addInkEditorIfNeeded(false);\n this.disableClick();\n } else {\n this.enableClick();\n }\n if (mode !== _util.AnnotationEditorType.NONE) {\n this.div.classList.toggle(\"freeTextEditing\", mode === _util.AnnotationEditorType.FREETEXT);\n this.div.classList.toggle(\"inkEditing\", mode === _util.AnnotationEditorType.INK);\n this.div.classList.toggle(\"stampEditing\", mode === _util.AnnotationEditorType.STAMP);\n this.div.hidden = false;\n }\n }\n addInkEditorIfNeeded(isCommitting) {\n if (!isCommitting && this.#uiManager.getMode() !== _util.AnnotationEditorType.INK) {\n return;\n }\n if (!isCommitting) {\n for (const editor of this.#editors.values()) {\n if (editor.isEmpty()) {\n editor.setInBackground();\n return;\n }\n }\n }\n const editor = this.#createAndAddNewEditor({\n offsetX: 0,\n offsetY: 0\n }, false);\n editor.setInBackground();\n }\n setEditingState(isEditing) {\n this.#uiManager.setEditingState(isEditing);\n }\n addCommands(params) {\n this.#uiManager.addCommands(params);\n }\n enable() {\n this.div.style.pointerEvents = \"auto\";\n const annotationElementIds = new Set();\n for (const editor of this.#editors.values()) {\n editor.enableEditing();\n if (editor.annotationElementId) {\n annotationElementIds.add(editor.annotationElementId);\n }\n }\n if (!this.#annotationLayer) {\n return;\n }\n const editables = this.#annotationLayer.getEditableAnnotations();\n for (const editable of editables) {\n editable.hide();\n if (this.#uiManager.isDeletedAnnotationElement(editable.data.id)) {\n continue;\n }\n if (annotationElementIds.has(editable.data.id)) {\n continue;\n }\n const editor = this.deserialize(editable);\n if (!editor) {\n continue;\n }\n this.addOrRebuild(editor);\n editor.enableEditing();\n }\n }\n disable() {\n this.#isDisabling = true;\n this.div.style.pointerEvents = \"none\";\n const hiddenAnnotationIds = new Set();\n for (const editor of this.#editors.values()) {\n editor.disableEditing();\n if (!editor.annotationElementId || editor.serialize() !== null) {\n hiddenAnnotationIds.add(editor.annotationElementId);\n continue;\n }\n this.getEditableAnnotation(editor.annotationElementId)?.show();\n editor.remove();\n }\n if (this.#annotationLayer) {\n const editables = this.#annotationLayer.getEditableAnnotations();\n for (const editable of editables) {\n const {\n id\n } = editable.data;\n if (hiddenAnnotationIds.has(id) || this.#uiManager.isDeletedAnnotationElement(id)) {\n continue;\n }\n editable.show();\n }\n }\n this.#cleanup();\n if (this.isEmpty) {\n this.div.hidden = true;\n }\n this.#isDisabling = false;\n }\n getEditableAnnotation(id) {\n return this.#annotationLayer?.getEditableAnnotation(id) || null;\n }\n setActiveEditor(editor) {\n const currentActive = this.#uiManager.getActive();\n if (currentActive === editor) {\n return;\n }\n this.#uiManager.setActiveEditor(editor);\n }\n enableClick() {\n this.div.addEventListener(\"pointerdown\", this.#boundPointerdown);\n this.div.addEventListener(\"pointerup\", this.#boundPointerup);\n }\n disableClick() {\n this.div.removeEventListener(\"pointerdown\", this.#boundPointerdown);\n this.div.removeEventListener(\"pointerup\", this.#boundPointerup);\n }\n attach(editor) {\n this.#editors.set(editor.id, editor);\n const {\n annotationElementId\n } = editor;\n if (annotationElementId && this.#uiManager.isDeletedAnnotationElement(annotationElementId)) {\n this.#uiManager.removeDeletedAnnotationElement(editor);\n }\n }\n detach(editor) {\n this.#editors.delete(editor.id);\n this.#accessibilityManager?.removePointerInTextLayer(editor.contentDiv);\n if (!this.#isDisabling && editor.annotationElementId) {\n this.#uiManager.addDeletedAnnotationElement(editor);\n }\n }\n remove(editor) {\n this.detach(editor);\n this.#uiManager.removeEditor(editor);\n if (editor.div.contains(document.activeElement)) {\n setTimeout(() => {\n this.#uiManager.focusMainContainer();\n }, 0);\n }\n editor.div.remove();\n editor.isAttachedToDOM = false;\n if (!this.#isCleaningUp) {\n this.addInkEditorIfNeeded(false);\n }\n }\n changeParent(editor) {\n if (editor.parent === this) {\n return;\n }\n if (editor.annotationElementId) {\n this.#uiManager.addDeletedAnnotationElement(editor.annotationElementId);\n _editor.AnnotationEditor.deleteAnnotationElement(editor);\n editor.annotationElementId = null;\n }\n this.attach(editor);\n editor.parent?.detach(editor);\n editor.setParent(this);\n if (editor.div && editor.isAttachedToDOM) {\n editor.div.remove();\n this.div.append(editor.div);\n }\n }\n add(editor) {\n this.changeParent(editor);\n this.#uiManager.addEditor(editor);\n this.attach(editor);\n if (!editor.isAttachedToDOM) {\n const div = editor.render();\n this.div.append(div);\n editor.isAttachedToDOM = true;\n }\n editor.fixAndSetPosition();\n editor.onceAdded();\n this.#uiManager.addToAnnotationStorage(editor);\n }\n moveEditorInDOM(editor) {\n if (!editor.isAttachedToDOM) {\n return;\n }\n const {\n activeElement\n } = document;\n if (editor.div.contains(activeElement)) {\n editor._focusEventsAllowed = false;\n setTimeout(() => {\n if (!editor.div.contains(document.activeElement)) {\n editor.div.addEventListener(\"focusin\", () => {\n editor._focusEventsAllowed = true;\n }, {\n once: true\n });\n activeElement.focus();\n } else {\n editor._focusEventsAllowed = true;\n }\n }, 0);\n }\n editor._structTreeParentId = this.#accessibilityManager?.moveElementInDOM(this.div, editor.div, editor.contentDiv, true);\n }\n addOrRebuild(editor) {\n if (editor.needsToBeRebuilt()) {\n editor.rebuild();\n } else {\n this.add(editor);\n }\n }\n addUndoableEditor(editor) {\n const cmd = () => editor._uiManager.rebuild(editor);\n const undo = () => {\n editor.remove();\n };\n this.addCommands({\n cmd,\n undo,\n mustExec: false\n });\n }\n getNextId() {\n return this.#uiManager.getId();\n }\n #createNewEditor(params) {\n switch (this.#uiManager.getMode()) {\n case _util.AnnotationEditorType.FREETEXT:\n return new _freetext.FreeTextEditor(params);\n case _util.AnnotationEditorType.INK:\n return new _ink.InkEditor(params);\n case _util.AnnotationEditorType.STAMP:\n return new _stamp.StampEditor(params);\n }\n return null;\n }\n pasteEditor(mode, params) {\n this.#uiManager.updateToolbar(mode);\n this.#uiManager.updateMode(mode);\n const {\n offsetX,\n offsetY\n } = this.#getCenterPoint();\n const id = this.getNextId();\n const editor = this.#createNewEditor({\n parent: this,\n id,\n x: offsetX,\n y: offsetY,\n uiManager: this.#uiManager,\n isCentered: true,\n ...params\n });\n if (editor) {\n this.add(editor);\n }\n }\n deserialize(data) {\n switch (data.annotationType ?? data.annotationEditorType) {\n case _util.AnnotationEditorType.FREETEXT:\n return _freetext.FreeTextEditor.deserialize(data, this, this.#uiManager);\n case _util.AnnotationEditorType.INK:\n return _ink.InkEditor.deserialize(data, this, this.#uiManager);\n case _util.AnnotationEditorType.STAMP:\n return _stamp.StampEditor.deserialize(data, this, this.#uiManager);\n }\n return null;\n }\n #createAndAddNewEditor(event, isCentered) {\n const id = this.getNextId();\n const editor = this.#createNewEditor({\n parent: this,\n id,\n x: event.offsetX,\n y: event.offsetY,\n uiManager: this.#uiManager,\n isCentered\n });\n if (editor) {\n this.add(editor);\n }\n return editor;\n }\n #getCenterPoint() {\n const {\n x,\n y,\n width,\n height\n } = this.div.getBoundingClientRect();\n const tlX = Math.max(0, x);\n const tlY = Math.max(0, y);\n const brX = Math.min(window.innerWidth, x + width);\n const brY = Math.min(window.innerHeight, y + height);\n const centerX = (tlX + brX) / 2 - x;\n const centerY = (tlY + brY) / 2 - y;\n const [offsetX, offsetY] = this.viewport.rotation % 180 === 0 ? [centerX, centerY] : [centerY, centerX];\n return {\n offsetX,\n offsetY\n };\n }\n addNewEditor() {\n this.#createAndAddNewEditor(this.#getCenterPoint(), true);\n }\n setSelected(editor) {\n this.#uiManager.setSelected(editor);\n }\n toggleSelected(editor) {\n this.#uiManager.toggleSelected(editor);\n }\n isSelected(editor) {\n return this.#uiManager.isSelected(editor);\n }\n unselect(editor) {\n this.#uiManager.unselect(editor);\n }\n pointerup(event) {\n const {\n isMac\n } = _util.FeatureTest.platform;\n if (event.button !== 0 || event.ctrlKey && isMac) {\n return;\n }\n if (event.target !== this.div) {\n return;\n }\n if (!this.#hadPointerDown) {\n return;\n }\n this.#hadPointerDown = false;\n if (!this.#allowClick) {\n this.#allowClick = true;\n return;\n }\n if (this.#uiManager.getMode() === _util.AnnotationEditorType.STAMP) {\n this.#uiManager.unselectAll();\n return;\n }\n this.#createAndAddNewEditor(event, false);\n }\n pointerdown(event) {\n if (this.#hadPointerDown) {\n this.#hadPointerDown = false;\n return;\n }\n const {\n isMac\n } = _util.FeatureTest.platform;\n if (event.button !== 0 || event.ctrlKey && isMac) {\n return;\n }\n if (event.target !== this.div) {\n return;\n }\n this.#hadPointerDown = true;\n const editor = this.#uiManager.getActive();\n this.#allowClick = !editor || editor.isEmpty();\n }\n findNewParent(editor, x, y) {\n const layer = this.#uiManager.findParent(x, y);\n if (layer === null || layer === this) {\n return false;\n }\n layer.changeParent(editor);\n return true;\n }\n destroy() {\n if (this.#uiManager.getActive()?.parent === this) {\n this.#uiManager.commitOrRemove();\n this.#uiManager.setActiveEditor(null);\n }\n for (const editor of this.#editors.values()) {\n this.#accessibilityManager?.removePointerInTextLayer(editor.contentDiv);\n editor.setParent(null);\n editor.isAttachedToDOM = false;\n editor.div.remove();\n }\n this.div = null;\n this.#editors.clear();\n this.#uiManager.removeLayer(this);\n }\n #cleanup() {\n this.#isCleaningUp = true;\n for (const editor of this.#editors.values()) {\n if (editor.isEmpty()) {\n editor.remove();\n }\n }\n this.#isCleaningUp = false;\n }\n render({\n viewport\n }) {\n this.viewport = viewport;\n (0, _display_utils.setLayerDimensions)(this.div, viewport);\n for (const editor of this.#uiManager.getEditors(this.pageIndex)) {\n this.add(editor);\n }\n this.updateMode();\n }\n update({\n viewport\n }) {\n this.#uiManager.commitOrRemove();\n this.viewport = viewport;\n (0, _display_utils.setLayerDimensions)(this.div, {\n rotation: viewport.rotation\n });\n this.updateMode();\n }\n get pageDimensions() {\n const {\n pageWidth,\n pageHeight\n } = this.viewport.rawDims;\n return [pageWidth, pageHeight];\n }\n}\nexports.AnnotationEditorLayer = AnnotationEditorLayer;\n\n/***/ }),\n/* 28 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.FreeTextEditor = void 0;\nvar _util = __w_pdfjs_require__(1);\nvar _tools = __w_pdfjs_require__(5);\nvar _editor = __w_pdfjs_require__(4);\nvar _annotation_layer = __w_pdfjs_require__(29);\nclass FreeTextEditor extends _editor.AnnotationEditor {\n #boundEditorDivBlur = this.editorDivBlur.bind(this);\n #boundEditorDivFocus = this.editorDivFocus.bind(this);\n #boundEditorDivInput = this.editorDivInput.bind(this);\n #boundEditorDivKeydown = this.editorDivKeydown.bind(this);\n #color;\n #content = \"\";\n #editorDivId = `${this.id}-editor`;\n #fontSize;\n #initialData = null;\n static _freeTextDefaultContent = \"\";\n static _internalPadding = 0;\n static _defaultColor = null;\n static _defaultFontSize = 10;\n static get _keyboardManager() {\n const proto = FreeTextEditor.prototype;\n const arrowChecker = self => self.isEmpty();\n const small = _tools.AnnotationEditorUIManager.TRANSLATE_SMALL;\n const big = _tools.AnnotationEditorUIManager.TRANSLATE_BIG;\n return (0, _util.shadow)(this, \"_keyboardManager\", new _tools.KeyboardManager([[[\"ctrl+s\", \"mac+meta+s\", \"ctrl+p\", \"mac+meta+p\"], proto.commitOrRemove, {\n bubbles: true\n }], [[\"ctrl+Enter\", \"mac+meta+Enter\", \"Escape\", \"mac+Escape\"], proto.commitOrRemove], [[\"ArrowLeft\", \"mac+ArrowLeft\"], proto._translateEmpty, {\n args: [-small, 0],\n checker: arrowChecker\n }], [[\"ctrl+ArrowLeft\", \"mac+shift+ArrowLeft\"], proto._translateEmpty, {\n args: [-big, 0],\n checker: arrowChecker\n }], [[\"ArrowRight\", \"mac+ArrowRight\"], proto._translateEmpty, {\n args: [small, 0],\n checker: arrowChecker\n }], [[\"ctrl+ArrowRight\", \"mac+shift+ArrowRight\"], proto._translateEmpty, {\n args: [big, 0],\n checker: arrowChecker\n }], [[\"ArrowUp\", \"mac+ArrowUp\"], proto._translateEmpty, {\n args: [0, -small],\n checker: arrowChecker\n }], [[\"ctrl+ArrowUp\", \"mac+shift+ArrowUp\"], proto._translateEmpty, {\n args: [0, -big],\n checker: arrowChecker\n }], [[\"ArrowDown\", \"mac+ArrowDown\"], proto._translateEmpty, {\n args: [0, small],\n checker: arrowChecker\n }], [[\"ctrl+ArrowDown\", \"mac+shift+ArrowDown\"], proto._translateEmpty, {\n args: [0, big],\n checker: arrowChecker\n }]]));\n }\n static _type = \"freetext\";\n constructor(params) {\n super({\n ...params,\n name: \"freeTextEditor\"\n });\n this.#color = params.color || FreeTextEditor._defaultColor || _editor.AnnotationEditor._defaultLineColor;\n this.#fontSize = params.fontSize || FreeTextEditor._defaultFontSize;\n }\n static initialize(l10n) {\n _editor.AnnotationEditor.initialize(l10n, {\n strings: [\"free_text2_default_content\", \"editor_free_text2_aria_label\"]\n });\n const style = getComputedStyle(document.documentElement);\n this._internalPadding = parseFloat(style.getPropertyValue(\"--freetext-padding\"));\n }\n static updateDefaultParams(type, value) {\n switch (type) {\n case _util.AnnotationEditorParamsType.FREETEXT_SIZE:\n FreeTextEditor._defaultFontSize = value;\n break;\n case _util.AnnotationEditorParamsType.FREETEXT_COLOR:\n FreeTextEditor._defaultColor = value;\n break;\n }\n }\n updateParams(type, value) {\n switch (type) {\n case _util.AnnotationEditorParamsType.FREETEXT_SIZE:\n this.#updateFontSize(value);\n break;\n case _util.AnnotationEditorParamsType.FREETEXT_COLOR:\n this.#updateColor(value);\n break;\n }\n }\n static get defaultPropertiesToUpdate() {\n return [[_util.AnnotationEditorParamsType.FREETEXT_SIZE, FreeTextEditor._defaultFontSize], [_util.AnnotationEditorParamsType.FREETEXT_COLOR, FreeTextEditor._defaultColor || _editor.AnnotationEditor._defaultLineColor]];\n }\n get propertiesToUpdate() {\n return [[_util.AnnotationEditorParamsType.FREETEXT_SIZE, this.#fontSize], [_util.AnnotationEditorParamsType.FREETEXT_COLOR, this.#color]];\n }\n #updateFontSize(fontSize) {\n const setFontsize = size => {\n this.editorDiv.style.fontSize = `calc(${size}px * var(--scale-factor))`;\n this.translate(0, -(size - this.#fontSize) * this.parentScale);\n this.#fontSize = size;\n this.#setEditorDimensions();\n };\n const savedFontsize = this.#fontSize;\n this.addCommands({\n cmd: () => {\n setFontsize(fontSize);\n },\n undo: () => {\n setFontsize(savedFontsize);\n },\n mustExec: true,\n type: _util.AnnotationEditorParamsType.FREETEXT_SIZE,\n overwriteIfSameType: true,\n keepUndo: true\n });\n }\n #updateColor(color) {\n const savedColor = this.#color;\n this.addCommands({\n cmd: () => {\n this.#color = this.editorDiv.style.color = color;\n },\n undo: () => {\n this.#color = this.editorDiv.style.color = savedColor;\n },\n mustExec: true,\n type: _util.AnnotationEditorParamsType.FREETEXT_COLOR,\n overwriteIfSameType: true,\n keepUndo: true\n });\n }\n _translateEmpty(x, y) {\n this._uiManager.translateSelectedEditors(x, y, true);\n }\n getInitialTranslation() {\n const scale = this.parentScale;\n return [-FreeTextEditor._internalPadding * scale, -(FreeTextEditor._internalPadding + this.#fontSize) * scale];\n }\n rebuild() {\n if (!this.parent) {\n return;\n }\n super.rebuild();\n if (this.div === null) {\n return;\n }\n if (!this.isAttachedToDOM) {\n this.parent.add(this);\n }\n }\n enableEditMode() {\n if (this.isInEditMode()) {\n return;\n }\n this.parent.setEditingState(false);\n this.parent.updateToolbar(_util.AnnotationEditorType.FREETEXT);\n super.enableEditMode();\n this.overlayDiv.classList.remove(\"enabled\");\n this.editorDiv.contentEditable = true;\n this._isDraggable = false;\n this.div.removeAttribute(\"aria-activedescendant\");\n this.editorDiv.addEventListener(\"keydown\", this.#boundEditorDivKeydown);\n this.editorDiv.addEventListener(\"focus\", this.#boundEditorDivFocus);\n this.editorDiv.addEventListener(\"blur\", this.#boundEditorDivBlur);\n this.editorDiv.addEventListener(\"input\", this.#boundEditorDivInput);\n }\n disableEditMode() {\n if (!this.isInEditMode()) {\n return;\n }\n this.parent.setEditingState(true);\n super.disableEditMode();\n this.overlayDiv.classList.add(\"enabled\");\n this.editorDiv.contentEditable = false;\n this.div.setAttribute(\"aria-activedescendant\", this.#editorDivId);\n this._isDraggable = true;\n this.editorDiv.removeEventListener(\"keydown\", this.#boundEditorDivKeydown);\n this.editorDiv.removeEventListener(\"focus\", this.#boundEditorDivFocus);\n this.editorDiv.removeEventListener(\"blur\", this.#boundEditorDivBlur);\n this.editorDiv.removeEventListener(\"input\", this.#boundEditorDivInput);\n this.div.focus({\n preventScroll: true\n });\n this.isEditing = false;\n this.parent.div.classList.add(\"freeTextEditing\");\n }\n focusin(event) {\n if (!this._focusEventsAllowed) {\n return;\n }\n super.focusin(event);\n if (event.target !== this.editorDiv) {\n this.editorDiv.focus();\n }\n }\n onceAdded() {\n if (this.width) {\n this.#cheatInitialRect();\n return;\n }\n this.enableEditMode();\n this.editorDiv.focus();\n if (this._initialOptions?.isCentered) {\n this.center();\n }\n this._initialOptions = null;\n }\n isEmpty() {\n return !this.editorDiv || this.editorDiv.innerText.trim() === \"\";\n }\n remove() {\n this.isEditing = false;\n if (this.parent) {\n this.parent.setEditingState(true);\n this.parent.div.classList.add(\"freeTextEditing\");\n }\n super.remove();\n }\n #extractText() {\n const divs = this.editorDiv.getElementsByTagName(\"div\");\n if (divs.length === 0) {\n return this.editorDiv.innerText;\n }\n const buffer = [];\n for (const div of divs) {\n buffer.push(div.innerText.replace(/\\r\\n?|\\n/, \"\"));\n }\n return buffer.join(\"\\n\");\n }\n #setEditorDimensions() {\n const [parentWidth, parentHeight] = this.parentDimensions;\n let rect;\n if (this.isAttachedToDOM) {\n rect = this.div.getBoundingClientRect();\n } else {\n const {\n currentLayer,\n div\n } = this;\n const savedDisplay = div.style.display;\n div.style.display = \"hidden\";\n currentLayer.div.append(this.div);\n rect = div.getBoundingClientRect();\n div.remove();\n div.style.display = savedDisplay;\n }\n if (this.rotation % 180 === this.parentRotation % 180) {\n this.width = rect.width / parentWidth;\n this.height = rect.height / parentHeight;\n } else {\n this.width = rect.height / parentWidth;\n this.height = rect.width / parentHeight;\n }\n this.fixAndSetPosition();\n }\n commit() {\n if (!this.isInEditMode()) {\n return;\n }\n super.commit();\n this.disableEditMode();\n const savedText = this.#content;\n const newText = this.#content = this.#extractText().trimEnd();\n if (savedText === newText) {\n return;\n }\n const setText = text => {\n this.#content = text;\n if (!text) {\n this.remove();\n return;\n }\n this.#setContent();\n this._uiManager.rebuild(this);\n this.#setEditorDimensions();\n };\n this.addCommands({\n cmd: () => {\n setText(newText);\n },\n undo: () => {\n setText(savedText);\n },\n mustExec: false\n });\n this.#setEditorDimensions();\n }\n shouldGetKeyboardEvents() {\n return this.isInEditMode();\n }\n enterInEditMode() {\n this.enableEditMode();\n this.editorDiv.focus();\n }\n dblclick(event) {\n this.enterInEditMode();\n }\n keydown(event) {\n if (event.target === this.div && event.key === \"Enter\") {\n this.enterInEditMode();\n event.preventDefault();\n }\n }\n editorDivKeydown(event) {\n FreeTextEditor._keyboardManager.exec(this, event);\n }\n editorDivFocus(event) {\n this.isEditing = true;\n }\n editorDivBlur(event) {\n this.isEditing = false;\n }\n editorDivInput(event) {\n this.parent.div.classList.toggle(\"freeTextEditing\", this.isEmpty());\n }\n disableEditing() {\n this.editorDiv.setAttribute(\"role\", \"comment\");\n this.editorDiv.removeAttribute(\"aria-multiline\");\n }\n enableEditing() {\n this.editorDiv.setAttribute(\"role\", \"textbox\");\n this.editorDiv.setAttribute(\"aria-multiline\", true);\n }\n render() {\n if (this.div) {\n return this.div;\n }\n let baseX, baseY;\n if (this.width) {\n baseX = this.x;\n baseY = this.y;\n }\n super.render();\n this.editorDiv = document.createElement(\"div\");\n this.editorDiv.className = \"internal\";\n this.editorDiv.setAttribute(\"id\", this.#editorDivId);\n this.enableEditing();\n _editor.AnnotationEditor._l10nPromise.get(\"editor_free_text2_aria_label\").then(msg => this.editorDiv?.setAttribute(\"aria-label\", msg));\n _editor.AnnotationEditor._l10nPromise.get(\"free_text2_default_content\").then(msg => this.editorDiv?.setAttribute(\"default-content\", msg));\n this.editorDiv.contentEditable = true;\n const {\n style\n } = this.editorDiv;\n style.fontSize = `calc(${this.#fontSize}px * var(--scale-factor))`;\n style.color = this.#color;\n this.div.append(this.editorDiv);\n this.overlayDiv = document.createElement(\"div\");\n this.overlayDiv.classList.add(\"overlay\", \"enabled\");\n this.div.append(this.overlayDiv);\n (0, _tools.bindEvents)(this, this.div, [\"dblclick\", \"keydown\"]);\n if (this.width) {\n const [parentWidth, parentHeight] = this.parentDimensions;\n if (this.annotationElementId) {\n const {\n position\n } = this.#initialData;\n let [tx, ty] = this.getInitialTranslation();\n [tx, ty] = this.pageTranslationToScreen(tx, ty);\n const [pageWidth, pageHeight] = this.pageDimensions;\n const [pageX, pageY] = this.pageTranslation;\n let posX, posY;\n switch (this.rotation) {\n case 0:\n posX = baseX + (position[0] - pageX) / pageWidth;\n posY = baseY + this.height - (position[1] - pageY) / pageHeight;\n break;\n case 90:\n posX = baseX + (position[0] - pageX) / pageWidth;\n posY = baseY - (position[1] - pageY) / pageHeight;\n [tx, ty] = [ty, -tx];\n break;\n case 180:\n posX = baseX - this.width + (position[0] - pageX) / pageWidth;\n posY = baseY - (position[1] - pageY) / pageHeight;\n [tx, ty] = [-tx, -ty];\n break;\n case 270:\n posX = baseX + (position[0] - pageX - this.height * pageHeight) / pageWidth;\n posY = baseY + (position[1] - pageY - this.width * pageWidth) / pageHeight;\n [tx, ty] = [-ty, tx];\n break;\n }\n this.setAt(posX * parentWidth, posY * parentHeight, tx, ty);\n } else {\n this.setAt(baseX * parentWidth, baseY * parentHeight, this.width * parentWidth, this.height * parentHeight);\n }\n this.#setContent();\n this._isDraggable = true;\n this.editorDiv.contentEditable = false;\n } else {\n this._isDraggable = false;\n this.editorDiv.contentEditable = true;\n }\n return this.div;\n }\n #setContent() {\n this.editorDiv.replaceChildren();\n if (!this.#content) {\n return;\n }\n for (const line of this.#content.split(\"\\n\")) {\n const div = document.createElement(\"div\");\n div.append(line ? document.createTextNode(line) : document.createElement(\"br\"));\n this.editorDiv.append(div);\n }\n }\n get contentDiv() {\n return this.editorDiv;\n }\n static deserialize(data, parent, uiManager) {\n let initialData = null;\n if (data instanceof _annotation_layer.FreeTextAnnotationElement) {\n const {\n data: {\n defaultAppearanceData: {\n fontSize,\n fontColor\n },\n rect,\n rotation,\n id\n },\n textContent,\n textPosition,\n parent: {\n page: {\n pageNumber\n }\n }\n } = data;\n if (!textContent || textContent.length === 0) {\n return null;\n }\n initialData = data = {\n annotationType: _util.AnnotationEditorType.FREETEXT,\n color: Array.from(fontColor),\n fontSize,\n value: textContent.join(\"\\n\"),\n position: textPosition,\n pageIndex: pageNumber - 1,\n rect,\n rotation,\n id,\n deleted: false\n };\n }\n const editor = super.deserialize(data, parent, uiManager);\n editor.#fontSize = data.fontSize;\n editor.#color = _util.Util.makeHexColor(...data.color);\n editor.#content = data.value;\n editor.annotationElementId = data.id || null;\n editor.#initialData = initialData;\n return editor;\n }\n serialize(isForCopying = false) {\n if (this.isEmpty()) {\n return null;\n }\n if (this.deleted) {\n return {\n pageIndex: this.pageIndex,\n id: this.annotationElementId,\n deleted: true\n };\n }\n const padding = FreeTextEditor._internalPadding * this.parentScale;\n const rect = this.getRect(padding, padding);\n const color = _editor.AnnotationEditor._colorManager.convert(this.isAttachedToDOM ? getComputedStyle(this.editorDiv).color : this.#color);\n const serialized = {\n annotationType: _util.AnnotationEditorType.FREETEXT,\n color,\n fontSize: this.#fontSize,\n value: this.#content,\n pageIndex: this.pageIndex,\n rect,\n rotation: this.rotation,\n structTreeParentId: this._structTreeParentId\n };\n if (isForCopying) {\n return serialized;\n }\n if (this.annotationElementId && !this.#hasElementChanged(serialized)) {\n return null;\n }\n serialized.id = this.annotationElementId;\n return serialized;\n }\n #hasElementChanged(serialized) {\n const {\n value,\n fontSize,\n color,\n rect,\n pageIndex\n } = this.#initialData;\n return serialized.value !== value || serialized.fontSize !== fontSize || serialized.rect.some((x, i) => Math.abs(x - rect[i]) >= 1) || serialized.color.some((c, i) => c !== color[i]) || serialized.pageIndex !== pageIndex;\n }\n #cheatInitialRect(delayed = false) {\n if (!this.annotationElementId) {\n return;\n }\n this.#setEditorDimensions();\n if (!delayed && (this.width === 0 || this.height === 0)) {\n setTimeout(() => this.#cheatInitialRect(true), 0);\n return;\n }\n const padding = FreeTextEditor._internalPadding * this.parentScale;\n this.#initialData.rect = this.getRect(padding, padding);\n }\n}\nexports.FreeTextEditor = FreeTextEditor;\n\n/***/ }),\n/* 29 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.StampAnnotationElement = exports.InkAnnotationElement = exports.FreeTextAnnotationElement = exports.AnnotationLayer = void 0;\nvar _util = __w_pdfjs_require__(1);\nvar _display_utils = __w_pdfjs_require__(6);\nvar _annotation_storage = __w_pdfjs_require__(3);\nvar _scripting_utils = __w_pdfjs_require__(30);\nvar _displayL10n_utils = __w_pdfjs_require__(31);\nvar _xfa_layer = __w_pdfjs_require__(32);\nconst DEFAULT_TAB_INDEX = 1000;\nconst DEFAULT_FONT_SIZE = 9;\nconst GetElementsByNameSet = new WeakSet();\nfunction getRectDims(rect) {\n return {\n width: rect[2] - rect[0],\n height: rect[3] - rect[1]\n };\n}\nclass AnnotationElementFactory {\n static create(parameters) {\n const subtype = parameters.data.annotationType;\n switch (subtype) {\n case _util.AnnotationType.LINK:\n return new LinkAnnotationElement(parameters);\n case _util.AnnotationType.TEXT:\n return new TextAnnotationElement(parameters);\n case _util.AnnotationType.WIDGET:\n const fieldType = parameters.data.fieldType;\n switch (fieldType) {\n case \"Tx\":\n return new TextWidgetAnnotationElement(parameters);\n case \"Btn\":\n if (parameters.data.radioButton) {\n return new RadioButtonWidgetAnnotationElement(parameters);\n } else if (parameters.data.checkBox) {\n return new CheckboxWidgetAnnotationElement(parameters);\n }\n return new PushButtonWidgetAnnotationElement(parameters);\n case \"Ch\":\n return new ChoiceWidgetAnnotationElement(parameters);\n case \"Sig\":\n return new SignatureWidgetAnnotationElement(parameters);\n }\n return new WidgetAnnotationElement(parameters);\n case _util.AnnotationType.POPUP:\n return new PopupAnnotationElement(parameters);\n case _util.AnnotationType.FREETEXT:\n return new FreeTextAnnotationElement(parameters);\n case _util.AnnotationType.LINE:\n return new LineAnnotationElement(parameters);\n case _util.AnnotationType.SQUARE:\n return new SquareAnnotationElement(parameters);\n case _util.AnnotationType.CIRCLE:\n return new CircleAnnotationElement(parameters);\n case _util.AnnotationType.POLYLINE:\n return new PolylineAnnotationElement(parameters);\n case _util.AnnotationType.CARET:\n return new CaretAnnotationElement(parameters);\n case _util.AnnotationType.INK:\n return new InkAnnotationElement(parameters);\n case _util.AnnotationType.POLYGON:\n return new PolygonAnnotationElement(parameters);\n case _util.AnnotationType.HIGHLIGHT:\n return new HighlightAnnotationElement(parameters);\n case _util.AnnotationType.UNDERLINE:\n return new UnderlineAnnotationElement(parameters);\n case _util.AnnotationType.SQUIGGLY:\n return new SquigglyAnnotationElement(parameters);\n case _util.AnnotationType.STRIKEOUT:\n return new StrikeOutAnnotationElement(parameters);\n case _util.AnnotationType.STAMP:\n return new StampAnnotationElement(parameters);\n case _util.AnnotationType.FILEATTACHMENT:\n return new FileAttachmentAnnotationElement(parameters);\n default:\n return new AnnotationElement(parameters);\n }\n }\n}\nclass AnnotationElement {\n #hasBorder = false;\n constructor(parameters, {\n isRenderable = false,\n ignoreBorder = false,\n createQuadrilaterals = false\n } = {}) {\n this.isRenderable = isRenderable;\n this.data = parameters.data;\n this.layer = parameters.layer;\n this.linkService = parameters.linkService;\n this.downloadManager = parameters.downloadManager;\n this.imageResourcesPath = parameters.imageResourcesPath;\n this.renderForms = parameters.renderForms;\n this.svgFactory = parameters.svgFactory;\n this.annotationStorage = parameters.annotationStorage;\n this.enableScripting = parameters.enableScripting;\n this.hasJSActions = parameters.hasJSActions;\n this._fieldObjects = parameters.fieldObjects;\n this.parent = parameters.parent;\n if (isRenderable) {\n this.container = this._createContainer(ignoreBorder);\n }\n if (createQuadrilaterals) {\n this._createQuadrilaterals();\n }\n }\n static _hasPopupData({\n titleObj,\n contentsObj,\n richText\n }) {\n return !!(titleObj?.str || contentsObj?.str || richText?.str);\n }\n get hasPopupData() {\n return AnnotationElement._hasPopupData(this.data);\n }\n _createContainer(ignoreBorder) {\n const {\n data,\n parent: {\n page,\n viewport\n }\n } = this;\n const container = document.createElement(\"section\");\n container.setAttribute(\"data-annotation-id\", data.id);\n if (!(this instanceof WidgetAnnotationElement)) {\n container.tabIndex = DEFAULT_TAB_INDEX;\n }\n container.style.zIndex = this.parent.zIndex++;\n if (this.data.popupRef) {\n container.setAttribute(\"aria-haspopup\", \"dialog\");\n }\n if (data.noRotate) {\n container.classList.add(\"norotate\");\n }\n const {\n pageWidth,\n pageHeight,\n pageX,\n pageY\n } = viewport.rawDims;\n if (!data.rect || this instanceof PopupAnnotationElement) {\n const {\n rotation\n } = data;\n if (!data.hasOwnCanvas && rotation !== 0) {\n this.setRotation(rotation, container);\n }\n return container;\n }\n const {\n width,\n height\n } = getRectDims(data.rect);\n const rect = _util.Util.normalizeRect([data.rect[0], page.view[3] - data.rect[1] + page.view[1], data.rect[2], page.view[3] - data.rect[3] + page.view[1]]);\n if (!ignoreBorder && data.borderStyle.width > 0) {\n container.style.borderWidth = `${data.borderStyle.width}px`;\n const horizontalRadius = data.borderStyle.horizontalCornerRadius;\n const verticalRadius = data.borderStyle.verticalCornerRadius;\n if (horizontalRadius > 0 || verticalRadius > 0) {\n const radius = `calc(${horizontalRadius}px * var(--scale-factor)) / calc(${verticalRadius}px * var(--scale-factor))`;\n container.style.borderRadius = radius;\n } else if (this instanceof RadioButtonWidgetAnnotationElement) {\n const radius = `calc(${width}px * var(--scale-factor)) / calc(${height}px * var(--scale-factor))`;\n container.style.borderRadius = radius;\n }\n switch (data.borderStyle.style) {\n case _util.AnnotationBorderStyleType.SOLID:\n container.style.borderStyle = \"solid\";\n break;\n case _util.AnnotationBorderStyleType.DASHED:\n container.style.borderStyle = \"dashed\";\n break;\n case _util.AnnotationBorderStyleType.BEVELED:\n (0, _util.warn)(\"Unimplemented border style: beveled\");\n break;\n case _util.AnnotationBorderStyleType.INSET:\n (0, _util.warn)(\"Unimplemented border style: inset\");\n break;\n case _util.AnnotationBorderStyleType.UNDERLINE:\n container.style.borderBottomStyle = \"solid\";\n break;\n default:\n break;\n }\n const borderColor = data.borderColor || null;\n if (borderColor) {\n this.#hasBorder = true;\n container.style.borderColor = _util.Util.makeHexColor(borderColor[0] | 0, borderColor[1] | 0, borderColor[2] | 0);\n } else {\n container.style.borderWidth = 0;\n }\n }\n container.style.left = `${100 * (rect[0] - pageX) / pageWidth}%`;\n container.style.top = `${100 * (rect[1] - pageY) / pageHeight}%`;\n const {\n rotation\n } = data;\n if (data.hasOwnCanvas || rotation === 0) {\n container.style.width = `${100 * width / pageWidth}%`;\n container.style.height = `${100 * height / pageHeight}%`;\n } else {\n this.setRotation(rotation, container);\n }\n return container;\n }\n setRotation(angle, container = this.container) {\n if (!this.data.rect) {\n return;\n }\n const {\n pageWidth,\n pageHeight\n } = this.parent.viewport.rawDims;\n const {\n width,\n height\n } = getRectDims(this.data.rect);\n let elementWidth, elementHeight;\n if (angle % 180 === 0) {\n elementWidth = 100 * width / pageWidth;\n elementHeight = 100 * height / pageHeight;\n } else {\n elementWidth = 100 * height / pageWidth;\n elementHeight = 100 * width / pageHeight;\n }\n container.style.width = `${elementWidth}%`;\n container.style.height = `${elementHeight}%`;\n container.setAttribute(\"data-main-rotation\", (360 - angle) % 360);\n }\n get _commonActions() {\n const setColor = (jsName, styleName, event) => {\n const color = event.detail[jsName];\n const colorType = color[0];\n const colorArray = color.slice(1);\n event.target.style[styleName] = _scripting_utils.ColorConverters[`${colorType}_HTML`](colorArray);\n this.annotationStorage.setValue(this.data.id, {\n [styleName]: _scripting_utils.ColorConverters[`${colorType}_rgb`](colorArray)\n });\n };\n return (0, _util.shadow)(this, \"_commonActions\", {\n display: event => {\n const {\n display\n } = event.detail;\n const hidden = display % 2 === 1;\n this.container.style.visibility = hidden ? \"hidden\" : \"visible\";\n this.annotationStorage.setValue(this.data.id, {\n noView: hidden,\n noPrint: display === 1 || display === 2\n });\n },\n print: event => {\n this.annotationStorage.setValue(this.data.id, {\n noPrint: !event.detail.print\n });\n },\n hidden: event => {\n const {\n hidden\n } = event.detail;\n this.container.style.visibility = hidden ? \"hidden\" : \"visible\";\n this.annotationStorage.setValue(this.data.id, {\n noPrint: hidden,\n noView: hidden\n });\n },\n focus: event => {\n setTimeout(() => event.target.focus({\n preventScroll: false\n }), 0);\n },\n userName: event => {\n event.target.title = event.detail.userName;\n },\n readonly: event => {\n event.target.disabled = event.detail.readonly;\n },\n required: event => {\n this._setRequired(event.target, event.detail.required);\n },\n bgColor: event => {\n setColor(\"bgColor\", \"backgroundColor\", event);\n },\n fillColor: event => {\n setColor(\"fillColor\", \"backgroundColor\", event);\n },\n fgColor: event => {\n setColor(\"fgColor\", \"color\", event);\n },\n textColor: event => {\n setColor(\"textColor\", \"color\", event);\n },\n borderColor: event => {\n setColor(\"borderColor\", \"borderColor\", event);\n },\n strokeColor: event => {\n setColor(\"strokeColor\", \"borderColor\", event);\n },\n rotation: event => {\n const angle = event.detail.rotation;\n this.setRotation(angle);\n this.annotationStorage.setValue(this.data.id, {\n rotation: angle\n });\n }\n });\n }\n _dispatchEventFromSandbox(actions, jsEvent) {\n const commonActions = this._commonActions;\n for (const name of Object.keys(jsEvent.detail)) {\n const action = actions[name] || commonActions[name];\n action?.(jsEvent);\n }\n }\n _setDefaultPropertiesFromJS(element) {\n if (!this.enableScripting) {\n return;\n }\n const storedData = this.annotationStorage.getRawValue(this.data.id);\n if (!storedData) {\n return;\n }\n const commonActions = this._commonActions;\n for (const [actionName, detail] of Object.entries(storedData)) {\n const action = commonActions[actionName];\n if (action) {\n const eventProxy = {\n detail: {\n [actionName]: detail\n },\n target: element\n };\n action(eventProxy);\n delete storedData[actionName];\n }\n }\n }\n _createQuadrilaterals() {\n if (!this.container) {\n return;\n }\n const {\n quadPoints\n } = this.data;\n if (!quadPoints) {\n return;\n }\n const [rectBlX, rectBlY, rectTrX, rectTrY] = this.data.rect;\n if (quadPoints.length === 1) {\n const [, {\n x: trX,\n y: trY\n }, {\n x: blX,\n y: blY\n }] = quadPoints[0];\n if (rectTrX === trX && rectTrY === trY && rectBlX === blX && rectBlY === blY) {\n return;\n }\n }\n const {\n style\n } = this.container;\n let svgBuffer;\n if (this.#hasBorder) {\n const {\n borderColor,\n borderWidth\n } = style;\n style.borderWidth = 0;\n svgBuffer = [\"url('data:image/svg+xml;utf8,\", `<svg xmlns=\"http://www.w3.org/2000/svg\"`, ` preserveAspectRatio=\"none\" viewBox=\"0 0 1 1\">`, `<g fill=\"transparent\" stroke=\"${borderColor}\" stroke-width=\"${borderWidth}\">`];\n this.container.classList.add(\"hasBorder\");\n }\n const width = rectTrX - rectBlX;\n const height = rectTrY - rectBlY;\n const {\n svgFactory\n } = this;\n const svg = svgFactory.createElement(\"svg\");\n svg.classList.add(\"quadrilateralsContainer\");\n svg.setAttribute(\"width\", 0);\n svg.setAttribute(\"height\", 0);\n const defs = svgFactory.createElement(\"defs\");\n svg.append(defs);\n const clipPath = svgFactory.createElement(\"clipPath\");\n const id = `clippath_${this.data.id}`;\n clipPath.setAttribute(\"id\", id);\n clipPath.setAttribute(\"clipPathUnits\", \"objectBoundingBox\");\n defs.append(clipPath);\n for (const [, {\n x: trX,\n y: trY\n }, {\n x: blX,\n y: blY\n }] of quadPoints) {\n const rect = svgFactory.createElement(\"rect\");\n const x = (blX - rectBlX) / width;\n const y = (rectTrY - trY) / height;\n const rectWidth = (trX - blX) / width;\n const rectHeight = (trY - blY) / height;\n rect.setAttribute(\"x\", x);\n rect.setAttribute(\"y\", y);\n rect.setAttribute(\"width\", rectWidth);\n rect.setAttribute(\"height\", rectHeight);\n clipPath.append(rect);\n svgBuffer?.push(`<rect vector-effect=\"non-scaling-stroke\" x=\"${x}\" y=\"${y}\" width=\"${rectWidth}\" height=\"${rectHeight}\"/>`);\n }\n if (this.#hasBorder) {\n svgBuffer.push(`</g></svg>')`);\n style.backgroundImage = svgBuffer.join(\"\");\n }\n this.container.append(svg);\n this.container.style.clipPath = `url(#${id})`;\n }\n _createPopup() {\n const {\n container,\n data\n } = this;\n container.setAttribute(\"aria-haspopup\", \"dialog\");\n const popup = new PopupAnnotationElement({\n data: {\n color: data.color,\n titleObj: data.titleObj,\n modificationDate: data.modificationDate,\n contentsObj: data.contentsObj,\n richText: data.richText,\n parentRect: data.rect,\n borderStyle: 0,\n id: `popup_${data.id}`,\n rotation: data.rotation\n },\n parent: this.parent,\n elements: [this]\n });\n this.parent.div.append(popup.render());\n }\n render() {\n (0, _util.unreachable)(\"Abstract method `AnnotationElement.render` called\");\n }\n _getElementsByName(name, skipId = null) {\n const fields = [];\n if (this._fieldObjects) {\n const fieldObj = this._fieldObjects[name];\n if (fieldObj) {\n for (const {\n page,\n id,\n exportValues\n } of fieldObj) {\n if (page === -1) {\n continue;\n }\n if (id === skipId) {\n continue;\n }\n const exportValue = typeof exportValues === \"string\" ? exportValues : null;\n const domElement = document.querySelector(`[data-element-id=\"${id}\"]`);\n if (domElement && !GetElementsByNameSet.has(domElement)) {\n (0, _util.warn)(`_getElementsByName - element not allowed: ${id}`);\n continue;\n }\n fields.push({\n id,\n exportValue,\n domElement\n });\n }\n }\n return fields;\n }\n for (const domElement of document.getElementsByName(name)) {\n const {\n exportValue\n } = domElement;\n const id = domElement.getAttribute(\"data-element-id\");\n if (id === skipId) {\n continue;\n }\n if (!GetElementsByNameSet.has(domElement)) {\n continue;\n }\n fields.push({\n id,\n exportValue,\n domElement\n });\n }\n return fields;\n }\n show() {\n if (this.container) {\n this.container.hidden = false;\n }\n this.popup?.maybeShow();\n }\n hide() {\n if (this.container) {\n this.container.hidden = true;\n }\n this.popup?.forceHide();\n }\n getElementsToTriggerPopup() {\n return this.container;\n }\n addHighlightArea() {\n const triggers = this.getElementsToTriggerPopup();\n if (Array.isArray(triggers)) {\n for (const element of triggers) {\n element.classList.add(\"highlightArea\");\n }\n } else {\n triggers.classList.add(\"highlightArea\");\n }\n }\n _editOnDoubleClick() {\n const {\n annotationEditorType: mode,\n data: {\n id: editId\n }\n } = this;\n this.container.addEventListener(\"dblclick\", () => {\n this.linkService.eventBus?.dispatch(\"switchannotationeditormode\", {\n source: this,\n mode,\n editId\n });\n });\n }\n}\nclass LinkAnnotationElement extends AnnotationElement {\n constructor(parameters, options = null) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: !!options?.ignoreBorder,\n createQuadrilaterals: true\n });\n this.isTooltipOnly = parameters.data.isTooltipOnly;\n }\n render() {\n const {\n data,\n linkService\n } = this;\n const link = document.createElement(\"a\");\n link.setAttribute(\"data-element-id\", data.id);\n let isBound = false;\n if (data.url) {\n linkService.addLinkAttributes(link, data.url, data.newWindow);\n isBound = true;\n } else if (data.action) {\n this._bindNamedAction(link, data.action);\n isBound = true;\n } else if (data.attachment) {\n this._bindAttachment(link, data.attachment);\n isBound = true;\n } else if (data.setOCGState) {\n this.#bindSetOCGState(link, data.setOCGState);\n isBound = true;\n } else if (data.dest) {\n this._bindLink(link, data.dest);\n isBound = true;\n } else {\n if (data.actions && (data.actions.Action || data.actions[\"Mouse Up\"] || data.actions[\"Mouse Down\"]) && this.enableScripting && this.hasJSActions) {\n this._bindJSAction(link, data);\n isBound = true;\n }\n if (data.resetForm) {\n this._bindResetFormAction(link, data.resetForm);\n isBound = true;\n } else if (this.isTooltipOnly && !isBound) {\n this._bindLink(link, \"\");\n isBound = true;\n }\n }\n this.container.classList.add(\"linkAnnotation\");\n if (isBound) {\n this.container.append(link);\n }\n return this.container;\n }\n #setInternalLink() {\n this.container.setAttribute(\"data-internal-link\", \"\");\n }\n _bindLink(link, destination) {\n link.href = this.linkService.getDestinationHash(destination);\n link.onclick = () => {\n if (destination) {\n this.linkService.goToDestination(destination);\n }\n return false;\n };\n if (destination || destination === \"\") {\n this.#setInternalLink();\n }\n }\n _bindNamedAction(link, action) {\n link.href = this.linkService.getAnchorUrl(\"\");\n link.onclick = () => {\n this.linkService.executeNamedAction(action);\n return false;\n };\n this.#setInternalLink();\n }\n _bindAttachment(link, attachment) {\n link.href = this.linkService.getAnchorUrl(\"\");\n link.onclick = () => {\n this.downloadManager?.openOrDownloadData(this.container, attachment.content, attachment.filename);\n return false;\n };\n this.#setInternalLink();\n }\n #bindSetOCGState(link, action) {\n link.href = this.linkService.getAnchorUrl(\"\");\n link.onclick = () => {\n this.linkService.executeSetOCGState(action);\n return false;\n };\n this.#setInternalLink();\n }\n _bindJSAction(link, data) {\n link.href = this.linkService.getAnchorUrl(\"\");\n const map = new Map([[\"Action\", \"onclick\"], [\"Mouse Up\", \"onmouseup\"], [\"Mouse Down\", \"onmousedown\"]]);\n for (const name of Object.keys(data.actions)) {\n const jsName = map.get(name);\n if (!jsName) {\n continue;\n }\n link[jsName] = () => {\n this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n source: this,\n detail: {\n id: data.id,\n name\n }\n });\n return false;\n };\n }\n if (!link.onclick) {\n link.onclick = () => false;\n }\n this.#setInternalLink();\n }\n _bindResetFormAction(link, resetForm) {\n const otherClickAction = link.onclick;\n if (!otherClickAction) {\n link.href = this.linkService.getAnchorUrl(\"\");\n }\n this.#setInternalLink();\n if (!this._fieldObjects) {\n (0, _util.warn)(`_bindResetFormAction - \"resetForm\" action not supported, ` + \"ensure that the `fieldObjects` parameter is provided.\");\n if (!otherClickAction) {\n link.onclick = () => false;\n }\n return;\n }\n link.onclick = () => {\n otherClickAction?.();\n const {\n fields: resetFormFields,\n refs: resetFormRefs,\n include\n } = resetForm;\n const allFields = [];\n if (resetFormFields.length !== 0 || resetFormRefs.length !== 0) {\n const fieldIds = new Set(resetFormRefs);\n for (const fieldName of resetFormFields) {\n const fields = this._fieldObjects[fieldName] || [];\n for (const {\n id\n } of fields) {\n fieldIds.add(id);\n }\n }\n for (const fields of Object.values(this._fieldObjects)) {\n for (const field of fields) {\n if (fieldIds.has(field.id) === include) {\n allFields.push(field);\n }\n }\n }\n } else {\n for (const fields of Object.values(this._fieldObjects)) {\n allFields.push(...fields);\n }\n }\n const storage = this.annotationStorage;\n const allIds = [];\n for (const field of allFields) {\n const {\n id\n } = field;\n allIds.push(id);\n switch (field.type) {\n case \"text\":\n {\n const value = field.defaultValue || \"\";\n storage.setValue(id, {\n value\n });\n break;\n }\n case \"checkbox\":\n case \"radiobutton\":\n {\n const value = field.defaultValue === field.exportValues;\n storage.setValue(id, {\n value\n });\n break;\n }\n case \"combobox\":\n case \"listbox\":\n {\n const value = field.defaultValue || \"\";\n storage.setValue(id, {\n value\n });\n break;\n }\n default:\n continue;\n }\n const domElement = document.querySelector(`[data-element-id=\"${id}\"]`);\n if (!domElement) {\n continue;\n } else if (!GetElementsByNameSet.has(domElement)) {\n (0, _util.warn)(`_bindResetFormAction - element not allowed: ${id}`);\n continue;\n }\n domElement.dispatchEvent(new Event(\"resetform\"));\n }\n if (this.enableScripting) {\n this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n source: this,\n detail: {\n id: \"app\",\n ids: allIds,\n name: \"ResetForm\"\n }\n });\n }\n return false;\n };\n }\n}\nclass TextAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: true\n });\n }\n render() {\n this.container.classList.add(\"textAnnotation\");\n const image = document.createElement(\"img\");\n image.src = this.imageResourcesPath + \"annotation-\" + this.data.name.toLowerCase() + \".svg\";\n image.alt = \"[{{type}} Annotation]\";\n image.dataset.l10nId = \"text_annotation_type\";\n image.dataset.l10nArgs = JSON.stringify({\n type: this.data.name\n });\n if (!this.data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n this.container.append(image);\n return this.container;\n }\n}\nclass WidgetAnnotationElement extends AnnotationElement {\n render() {\n if (this.data.alternativeText) {\n this.container.title = this.data.alternativeText;\n }\n return this.container;\n }\n showElementAndHideCanvas(element) {\n if (this.data.hasOwnCanvas) {\n if (element.previousSibling?.nodeName === \"CANVAS\") {\n element.previousSibling.hidden = true;\n }\n element.hidden = false;\n }\n }\n _getKeyModifier(event) {\n const {\n isWin,\n isMac\n } = _util.FeatureTest.platform;\n return isWin && event.ctrlKey || isMac && event.metaKey;\n }\n _setEventListener(element, elementData, baseName, eventName, valueGetter) {\n if (baseName.includes(\"mouse\")) {\n element.addEventListener(baseName, event => {\n this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n source: this,\n detail: {\n id: this.data.id,\n name: eventName,\n value: valueGetter(event),\n shift: event.shiftKey,\n modifier: this._getKeyModifier(event)\n }\n });\n });\n } else {\n element.addEventListener(baseName, event => {\n if (baseName === \"blur\") {\n if (!elementData.focused || !event.relatedTarget) {\n return;\n }\n elementData.focused = false;\n } else if (baseName === \"focus\") {\n if (elementData.focused) {\n return;\n }\n elementData.focused = true;\n }\n if (!valueGetter) {\n return;\n }\n this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n source: this,\n detail: {\n id: this.data.id,\n name: eventName,\n value: valueGetter(event)\n }\n });\n });\n }\n }\n _setEventListeners(element, elementData, names, getter) {\n for (const [baseName, eventName] of names) {\n if (eventName === \"Action\" || this.data.actions?.[eventName]) {\n if (eventName === \"Focus\" || eventName === \"Blur\") {\n elementData ||= {\n focused: false\n };\n }\n this._setEventListener(element, elementData, baseName, eventName, getter);\n if (eventName === \"Focus\" && !this.data.actions?.Blur) {\n this._setEventListener(element, elementData, \"blur\", \"Blur\", null);\n } else if (eventName === \"Blur\" && !this.data.actions?.Focus) {\n this._setEventListener(element, elementData, \"focus\", \"Focus\", null);\n }\n }\n }\n }\n _setBackgroundColor(element) {\n const color = this.data.backgroundColor || null;\n element.style.backgroundColor = color === null ? \"transparent\" : _util.Util.makeHexColor(color[0], color[1], color[2]);\n }\n _setTextStyle(element) {\n const TEXT_ALIGNMENT = [\"left\", \"center\", \"right\"];\n const {\n fontColor\n } = this.data.defaultAppearanceData;\n const fontSize = this.data.defaultAppearanceData.fontSize || DEFAULT_FONT_SIZE;\n const style = element.style;\n let computedFontSize;\n const BORDER_SIZE = 2;\n const roundToOneDecimal = x => Math.round(10 * x) / 10;\n if (this.data.multiLine) {\n const height = Math.abs(this.data.rect[3] - this.data.rect[1] - BORDER_SIZE);\n const numberOfLines = Math.round(height / (_util.LINE_FACTOR * fontSize)) || 1;\n const lineHeight = height / numberOfLines;\n computedFontSize = Math.min(fontSize, roundToOneDecimal(lineHeight / _util.LINE_FACTOR));\n } else {\n const height = Math.abs(this.data.rect[3] - this.data.rect[1] - BORDER_SIZE);\n computedFontSize = Math.min(fontSize, roundToOneDecimal(height / _util.LINE_FACTOR));\n }\n style.fontSize = `calc(${computedFontSize}px * var(--scale-factor))`;\n style.color = _util.Util.makeHexColor(fontColor[0], fontColor[1], fontColor[2]);\n if (this.data.textAlignment !== null) {\n style.textAlign = TEXT_ALIGNMENT[this.data.textAlignment];\n }\n }\n _setRequired(element, isRequired) {\n if (isRequired) {\n element.setAttribute(\"required\", true);\n } else {\n element.removeAttribute(\"required\");\n }\n element.setAttribute(\"aria-required\", isRequired);\n }\n}\nclass TextWidgetAnnotationElement extends WidgetAnnotationElement {\n constructor(parameters) {\n const isRenderable = parameters.renderForms || !parameters.data.hasAppearance && !!parameters.data.fieldValue;\n super(parameters, {\n isRenderable\n });\n }\n setPropertyOnSiblings(base, key, value, keyInStorage) {\n const storage = this.annotationStorage;\n for (const element of this._getElementsByName(base.name, base.id)) {\n if (element.domElement) {\n element.domElement[key] = value;\n }\n storage.setValue(element.id, {\n [keyInStorage]: value\n });\n }\n }\n render() {\n const storage = this.annotationStorage;\n const id = this.data.id;\n this.container.classList.add(\"textWidgetAnnotation\");\n let element = null;\n if (this.renderForms) {\n const storedData = storage.getValue(id, {\n value: this.data.fieldValue\n });\n let textContent = storedData.value || \"\";\n const maxLen = storage.getValue(id, {\n charLimit: this.data.maxLen\n }).charLimit;\n if (maxLen && textContent.length > maxLen) {\n textContent = textContent.slice(0, maxLen);\n }\n let fieldFormattedValues = storedData.formattedValue || this.data.textContent?.join(\"\\n\") || null;\n if (fieldFormattedValues && this.data.comb) {\n fieldFormattedValues = fieldFormattedValues.replaceAll(/\\s+/g, \"\");\n }\n const elementData = {\n userValue: textContent,\n formattedValue: fieldFormattedValues,\n lastCommittedValue: null,\n commitKey: 1,\n focused: false\n };\n if (this.data.multiLine) {\n element = document.createElement(\"textarea\");\n element.textContent = fieldFormattedValues ?? textContent;\n if (this.data.doNotScroll) {\n element.style.overflowY = \"hidden\";\n }\n } else {\n element = document.createElement(\"input\");\n element.type = \"text\";\n element.setAttribute(\"value\", fieldFormattedValues ?? textContent);\n if (this.data.doNotScroll) {\n element.style.overflowX = \"hidden\";\n }\n }\n if (this.data.hasOwnCanvas) {\n element.hidden = true;\n }\n GetElementsByNameSet.add(element);\n element.setAttribute(\"data-element-id\", id);\n element.disabled = this.data.readOnly;\n element.name = this.data.fieldName;\n element.tabIndex = DEFAULT_TAB_INDEX;\n this._setRequired(element, this.data.required);\n if (maxLen) {\n element.maxLength = maxLen;\n }\n element.addEventListener(\"input\", event => {\n storage.setValue(id, {\n value: event.target.value\n });\n this.setPropertyOnSiblings(element, \"value\", event.target.value, \"value\");\n elementData.formattedValue = null;\n });\n element.addEventListener(\"resetform\", event => {\n const defaultValue = this.data.defaultFieldValue ?? \"\";\n element.value = elementData.userValue = defaultValue;\n elementData.formattedValue = null;\n });\n let blurListener = event => {\n const {\n formattedValue\n } = elementData;\n if (formattedValue !== null && formattedValue !== undefined) {\n event.target.value = formattedValue;\n }\n event.target.scrollLeft = 0;\n };\n if (this.enableScripting && this.hasJSActions) {\n element.addEventListener(\"focus\", event => {\n if (elementData.focused) {\n return;\n }\n const {\n target\n } = event;\n if (elementData.userValue) {\n target.value = elementData.userValue;\n }\n elementData.lastCommittedValue = target.value;\n elementData.commitKey = 1;\n elementData.focused = true;\n });\n element.addEventListener(\"updatefromsandbox\", jsEvent => {\n this.showElementAndHideCanvas(jsEvent.target);\n const actions = {\n value(event) {\n elementData.userValue = event.detail.value ?? \"\";\n storage.setValue(id, {\n value: elementData.userValue.toString()\n });\n event.target.value = elementData.userValue;\n },\n formattedValue(event) {\n const {\n formattedValue\n } = event.detail;\n elementData.formattedValue = formattedValue;\n if (formattedValue !== null && formattedValue !== undefined && event.target !== document.activeElement) {\n event.target.value = formattedValue;\n }\n storage.setValue(id, {\n formattedValue\n });\n },\n selRange(event) {\n event.target.setSelectionRange(...event.detail.selRange);\n },\n charLimit: event => {\n const {\n charLimit\n } = event.detail;\n const {\n target\n } = event;\n if (charLimit === 0) {\n target.removeAttribute(\"maxLength\");\n return;\n }\n target.setAttribute(\"maxLength\", charLimit);\n let value = elementData.userValue;\n if (!value || value.length <= charLimit) {\n return;\n }\n value = value.slice(0, charLimit);\n target.value = elementData.userValue = value;\n storage.setValue(id, {\n value\n });\n this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n source: this,\n detail: {\n id,\n name: \"Keystroke\",\n value,\n willCommit: true,\n commitKey: 1,\n selStart: target.selectionStart,\n selEnd: target.selectionEnd\n }\n });\n }\n };\n this._dispatchEventFromSandbox(actions, jsEvent);\n });\n element.addEventListener(\"keydown\", event => {\n elementData.commitKey = 1;\n let commitKey = -1;\n if (event.key === \"Escape\") {\n commitKey = 0;\n } else if (event.key === \"Enter\" && !this.data.multiLine) {\n commitKey = 2;\n } else if (event.key === \"Tab\") {\n elementData.commitKey = 3;\n }\n if (commitKey === -1) {\n return;\n }\n const {\n value\n } = event.target;\n if (elementData.lastCommittedValue === value) {\n return;\n }\n elementData.lastCommittedValue = value;\n elementData.userValue = value;\n this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n source: this,\n detail: {\n id,\n name: \"Keystroke\",\n value,\n willCommit: true,\n commitKey,\n selStart: event.target.selectionStart,\n selEnd: event.target.selectionEnd\n }\n });\n });\n const _blurListener = blurListener;\n blurListener = null;\n element.addEventListener(\"blur\", event => {\n if (!elementData.focused || !event.relatedTarget) {\n return;\n }\n elementData.focused = false;\n const {\n value\n } = event.target;\n elementData.userValue = value;\n if (elementData.lastCommittedValue !== value) {\n this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n source: this,\n detail: {\n id,\n name: \"Keystroke\",\n value,\n willCommit: true,\n commitKey: elementData.commitKey,\n selStart: event.target.selectionStart,\n selEnd: event.target.selectionEnd\n }\n });\n }\n _blurListener(event);\n });\n if (this.data.actions?.Keystroke) {\n element.addEventListener(\"beforeinput\", event => {\n elementData.lastCommittedValue = null;\n const {\n data,\n target\n } = event;\n const {\n value,\n selectionStart,\n selectionEnd\n } = target;\n let selStart = selectionStart,\n selEnd = selectionEnd;\n switch (event.inputType) {\n case \"deleteWordBackward\":\n {\n const match = value.substring(0, selectionStart).match(/\\w*[^\\w]*$/);\n if (match) {\n selStart -= match[0].length;\n }\n break;\n }\n case \"deleteWordForward\":\n {\n const match = value.substring(selectionStart).match(/^[^\\w]*\\w*/);\n if (match) {\n selEnd += match[0].length;\n }\n break;\n }\n case \"deleteContentBackward\":\n if (selectionStart === selectionEnd) {\n selStart -= 1;\n }\n break;\n case \"deleteContentForward\":\n if (selectionStart === selectionEnd) {\n selEnd += 1;\n }\n break;\n }\n event.preventDefault();\n this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n source: this,\n detail: {\n id,\n name: \"Keystroke\",\n value,\n change: data || \"\",\n willCommit: false,\n selStart,\n selEnd\n }\n });\n });\n }\n this._setEventListeners(element, elementData, [[\"focus\", \"Focus\"], [\"blur\", \"Blur\"], [\"mousedown\", \"Mouse Down\"], [\"mouseenter\", \"Mouse Enter\"], [\"mouseleave\", \"Mouse Exit\"], [\"mouseup\", \"Mouse Up\"]], event => event.target.value);\n }\n if (blurListener) {\n element.addEventListener(\"blur\", blurListener);\n }\n if (this.data.comb) {\n const fieldWidth = this.data.rect[2] - this.data.rect[0];\n const combWidth = fieldWidth / maxLen;\n element.classList.add(\"comb\");\n element.style.letterSpacing = `calc(${combWidth}px * var(--scale-factor) - 1ch)`;\n }\n } else {\n element = document.createElement(\"div\");\n element.textContent = this.data.fieldValue;\n element.style.verticalAlign = \"middle\";\n element.style.display = \"table-cell\";\n }\n this._setTextStyle(element);\n this._setBackgroundColor(element);\n this._setDefaultPropertiesFromJS(element);\n this.container.append(element);\n return this.container;\n }\n}\nclass SignatureWidgetAnnotationElement extends WidgetAnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: !!parameters.data.hasOwnCanvas\n });\n }\n}\nclass CheckboxWidgetAnnotationElement extends WidgetAnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: parameters.renderForms\n });\n }\n render() {\n const storage = this.annotationStorage;\n const data = this.data;\n const id = data.id;\n let value = storage.getValue(id, {\n value: data.exportValue === data.fieldValue\n }).value;\n if (typeof value === \"string\") {\n value = value !== \"Off\";\n storage.setValue(id, {\n value\n });\n }\n this.container.classList.add(\"buttonWidgetAnnotation\", \"checkBox\");\n const element = document.createElement(\"input\");\n GetElementsByNameSet.add(element);\n element.setAttribute(\"data-element-id\", id);\n element.disabled = data.readOnly;\n this._setRequired(element, this.data.required);\n element.type = \"checkbox\";\n element.name = data.fieldName;\n if (value) {\n element.setAttribute(\"checked\", true);\n }\n element.setAttribute(\"exportValue\", data.exportValue);\n element.tabIndex = DEFAULT_TAB_INDEX;\n element.addEventListener(\"change\", event => {\n const {\n name,\n checked\n } = event.target;\n for (const checkbox of this._getElementsByName(name, id)) {\n const curChecked = checked && checkbox.exportValue === data.exportValue;\n if (checkbox.domElement) {\n checkbox.domElement.checked = curChecked;\n }\n storage.setValue(checkbox.id, {\n value: curChecked\n });\n }\n storage.setValue(id, {\n value: checked\n });\n });\n element.addEventListener(\"resetform\", event => {\n const defaultValue = data.defaultFieldValue || \"Off\";\n event.target.checked = defaultValue === data.exportValue;\n });\n if (this.enableScripting && this.hasJSActions) {\n element.addEventListener(\"updatefromsandbox\", jsEvent => {\n const actions = {\n value(event) {\n event.target.checked = event.detail.value !== \"Off\";\n storage.setValue(id, {\n value: event.target.checked\n });\n }\n };\n this._dispatchEventFromSandbox(actions, jsEvent);\n });\n this._setEventListeners(element, null, [[\"change\", \"Validate\"], [\"change\", \"Action\"], [\"focus\", \"Focus\"], [\"blur\", \"Blur\"], [\"mousedown\", \"Mouse Down\"], [\"mouseenter\", \"Mouse Enter\"], [\"mouseleave\", \"Mouse Exit\"], [\"mouseup\", \"Mouse Up\"]], event => event.target.checked);\n }\n this._setBackgroundColor(element);\n this._setDefaultPropertiesFromJS(element);\n this.container.append(element);\n return this.container;\n }\n}\nclass RadioButtonWidgetAnnotationElement extends WidgetAnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: parameters.renderForms\n });\n }\n render() {\n this.container.classList.add(\"buttonWidgetAnnotation\", \"radioButton\");\n const storage = this.annotationStorage;\n const data = this.data;\n const id = data.id;\n let value = storage.getValue(id, {\n value: data.fieldValue === data.buttonValue\n }).value;\n if (typeof value === \"string\") {\n value = value !== data.buttonValue;\n storage.setValue(id, {\n value\n });\n }\n const element = document.createElement(\"input\");\n GetElementsByNameSet.add(element);\n element.setAttribute(\"data-element-id\", id);\n element.disabled = data.readOnly;\n this._setRequired(element, this.data.required);\n element.type = \"radio\";\n element.name = data.fieldName;\n if (value) {\n element.setAttribute(\"checked\", true);\n }\n element.tabIndex = DEFAULT_TAB_INDEX;\n element.addEventListener(\"change\", event => {\n const {\n name,\n checked\n } = event.target;\n for (const radio of this._getElementsByName(name, id)) {\n storage.setValue(radio.id, {\n value: false\n });\n }\n storage.setValue(id, {\n value: checked\n });\n });\n element.addEventListener(\"resetform\", event => {\n const defaultValue = data.defaultFieldValue;\n event.target.checked = defaultValue !== null && defaultValue !== undefined && defaultValue === data.buttonValue;\n });\n if (this.enableScripting && this.hasJSActions) {\n const pdfButtonValue = data.buttonValue;\n element.addEventListener(\"updatefromsandbox\", jsEvent => {\n const actions = {\n value: event => {\n const checked = pdfButtonValue === event.detail.value;\n for (const radio of this._getElementsByName(event.target.name)) {\n const curChecked = checked && radio.id === id;\n if (radio.domElement) {\n radio.domElement.checked = curChecked;\n }\n storage.setValue(radio.id, {\n value: curChecked\n });\n }\n }\n };\n this._dispatchEventFromSandbox(actions, jsEvent);\n });\n this._setEventListeners(element, null, [[\"change\", \"Validate\"], [\"change\", \"Action\"], [\"focus\", \"Focus\"], [\"blur\", \"Blur\"], [\"mousedown\", \"Mouse Down\"], [\"mouseenter\", \"Mouse Enter\"], [\"mouseleave\", \"Mouse Exit\"], [\"mouseup\", \"Mouse Up\"]], event => event.target.checked);\n }\n this._setBackgroundColor(element);\n this._setDefaultPropertiesFromJS(element);\n this.container.append(element);\n return this.container;\n }\n}\nclass PushButtonWidgetAnnotationElement extends LinkAnnotationElement {\n constructor(parameters) {\n super(parameters, {\n ignoreBorder: parameters.data.hasAppearance\n });\n }\n render() {\n const container = super.render();\n container.classList.add(\"buttonWidgetAnnotation\", \"pushButton\");\n if (this.data.alternativeText) {\n container.title = this.data.alternativeText;\n }\n const linkElement = container.lastChild;\n if (this.enableScripting && this.hasJSActions && linkElement) {\n this._setDefaultPropertiesFromJS(linkElement);\n linkElement.addEventListener(\"updatefromsandbox\", jsEvent => {\n this._dispatchEventFromSandbox({}, jsEvent);\n });\n }\n return container;\n }\n}\nclass ChoiceWidgetAnnotationElement extends WidgetAnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: parameters.renderForms\n });\n }\n render() {\n this.container.classList.add(\"choiceWidgetAnnotation\");\n const storage = this.annotationStorage;\n const id = this.data.id;\n const storedData = storage.getValue(id, {\n value: this.data.fieldValue\n });\n const selectElement = document.createElement(\"select\");\n GetElementsByNameSet.add(selectElement);\n selectElement.setAttribute(\"data-element-id\", id);\n selectElement.disabled = this.data.readOnly;\n this._setRequired(selectElement, this.data.required);\n selectElement.name = this.data.fieldName;\n selectElement.tabIndex = DEFAULT_TAB_INDEX;\n let addAnEmptyEntry = this.data.combo && this.data.options.length > 0;\n if (!this.data.combo) {\n selectElement.size = this.data.options.length;\n if (this.data.multiSelect) {\n selectElement.multiple = true;\n }\n }\n selectElement.addEventListener(\"resetform\", event => {\n const defaultValue = this.data.defaultFieldValue;\n for (const option of selectElement.options) {\n option.selected = option.value === defaultValue;\n }\n });\n for (const option of this.data.options) {\n const optionElement = document.createElement(\"option\");\n optionElement.textContent = option.displayValue;\n optionElement.value = option.exportValue;\n if (storedData.value.includes(option.exportValue)) {\n optionElement.setAttribute(\"selected\", true);\n addAnEmptyEntry = false;\n }\n selectElement.append(optionElement);\n }\n let removeEmptyEntry = null;\n if (addAnEmptyEntry) {\n const noneOptionElement = document.createElement(\"option\");\n noneOptionElement.value = \" \";\n noneOptionElement.setAttribute(\"hidden\", true);\n noneOptionElement.setAttribute(\"selected\", true);\n selectElement.prepend(noneOptionElement);\n removeEmptyEntry = () => {\n noneOptionElement.remove();\n selectElement.removeEventListener(\"input\", removeEmptyEntry);\n removeEmptyEntry = null;\n };\n selectElement.addEventListener(\"input\", removeEmptyEntry);\n }\n const getValue = isExport => {\n const name = isExport ? \"value\" : \"textContent\";\n const {\n options,\n multiple\n } = selectElement;\n if (!multiple) {\n return options.selectedIndex === -1 ? null : options[options.selectedIndex][name];\n }\n return Array.prototype.filter.call(options, option => option.selected).map(option => option[name]);\n };\n let selectedValues = getValue(false);\n const getItems = event => {\n const options = event.target.options;\n return Array.prototype.map.call(options, option => {\n return {\n displayValue: option.textContent,\n exportValue: option.value\n };\n });\n };\n if (this.enableScripting && this.hasJSActions) {\n selectElement.addEventListener(\"updatefromsandbox\", jsEvent => {\n const actions = {\n value(event) {\n removeEmptyEntry?.();\n const value = event.detail.value;\n const values = new Set(Array.isArray(value) ? value : [value]);\n for (const option of selectElement.options) {\n option.selected = values.has(option.value);\n }\n storage.setValue(id, {\n value: getValue(true)\n });\n selectedValues = getValue(false);\n },\n multipleSelection(event) {\n selectElement.multiple = true;\n },\n remove(event) {\n const options = selectElement.options;\n const index = event.detail.remove;\n options[index].selected = false;\n selectElement.remove(index);\n if (options.length > 0) {\n const i = Array.prototype.findIndex.call(options, option => option.selected);\n if (i === -1) {\n options[0].selected = true;\n }\n }\n storage.setValue(id, {\n value: getValue(true),\n items: getItems(event)\n });\n selectedValues = getValue(false);\n },\n clear(event) {\n while (selectElement.length !== 0) {\n selectElement.remove(0);\n }\n storage.setValue(id, {\n value: null,\n items: []\n });\n selectedValues = getValue(false);\n },\n insert(event) {\n const {\n index,\n displayValue,\n exportValue\n } = event.detail.insert;\n const selectChild = selectElement.children[index];\n const optionElement = document.createElement(\"option\");\n optionElement.textContent = displayValue;\n optionElement.value = exportValue;\n if (selectChild) {\n selectChild.before(optionElement);\n } else {\n selectElement.append(optionElement);\n }\n storage.setValue(id, {\n value: getValue(true),\n items: getItems(event)\n });\n selectedValues = getValue(false);\n },\n items(event) {\n const {\n items\n } = event.detail;\n while (selectElement.length !== 0) {\n selectElement.remove(0);\n }\n for (const item of items) {\n const {\n displayValue,\n exportValue\n } = item;\n const optionElement = document.createElement(\"option\");\n optionElement.textContent = displayValue;\n optionElement.value = exportValue;\n selectElement.append(optionElement);\n }\n if (selectElement.options.length > 0) {\n selectElement.options[0].selected = true;\n }\n storage.setValue(id, {\n value: getValue(true),\n items: getItems(event)\n });\n selectedValues = getValue(false);\n },\n indices(event) {\n const indices = new Set(event.detail.indices);\n for (const option of event.target.options) {\n option.selected = indices.has(option.index);\n }\n storage.setValue(id, {\n value: getValue(true)\n });\n selectedValues = getValue(false);\n },\n editable(event) {\n event.target.disabled = !event.detail.editable;\n }\n };\n this._dispatchEventFromSandbox(actions, jsEvent);\n });\n selectElement.addEventListener(\"input\", event => {\n const exportValue = getValue(true);\n storage.setValue(id, {\n value: exportValue\n });\n event.preventDefault();\n this.linkService.eventBus?.dispatch(\"dispatcheventinsandbox\", {\n source: this,\n detail: {\n id,\n name: \"Keystroke\",\n value: selectedValues,\n changeEx: exportValue,\n willCommit: false,\n commitKey: 1,\n keyDown: false\n }\n });\n });\n this._setEventListeners(selectElement, null, [[\"focus\", \"Focus\"], [\"blur\", \"Blur\"], [\"mousedown\", \"Mouse Down\"], [\"mouseenter\", \"Mouse Enter\"], [\"mouseleave\", \"Mouse Exit\"], [\"mouseup\", \"Mouse Up\"], [\"input\", \"Action\"], [\"input\", \"Validate\"]], event => event.target.value);\n } else {\n selectElement.addEventListener(\"input\", function (event) {\n storage.setValue(id, {\n value: getValue(true)\n });\n });\n }\n if (this.data.combo) {\n this._setTextStyle(selectElement);\n } else {}\n this._setBackgroundColor(selectElement);\n this._setDefaultPropertiesFromJS(selectElement);\n this.container.append(selectElement);\n return this.container;\n }\n}\nclass PopupAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n const {\n data,\n elements\n } = parameters;\n super(parameters, {\n isRenderable: AnnotationElement._hasPopupData(data)\n });\n this.elements = elements;\n }\n render() {\n this.container.classList.add(\"popupAnnotation\");\n const popup = new PopupElement({\n container: this.container,\n color: this.data.color,\n titleObj: this.data.titleObj,\n modificationDate: this.data.modificationDate,\n contentsObj: this.data.contentsObj,\n richText: this.data.richText,\n rect: this.data.rect,\n parentRect: this.data.parentRect || null,\n parent: this.parent,\n elements: this.elements,\n open: this.data.open\n });\n const elementIds = [];\n for (const element of this.elements) {\n element.popup = popup;\n elementIds.push(element.data.id);\n element.addHighlightArea();\n }\n this.container.setAttribute(\"aria-controls\", elementIds.map(id => `${_util.AnnotationPrefix}${id}`).join(\",\"));\n return this.container;\n }\n}\nclass PopupElement {\n #dateTimePromise = null;\n #boundKeyDown = this.#keyDown.bind(this);\n #boundHide = this.#hide.bind(this);\n #boundShow = this.#show.bind(this);\n #boundToggle = this.#toggle.bind(this);\n #color = null;\n #container = null;\n #contentsObj = null;\n #elements = null;\n #parent = null;\n #parentRect = null;\n #pinned = false;\n #popup = null;\n #rect = null;\n #richText = null;\n #titleObj = null;\n #wasVisible = false;\n constructor({\n container,\n color,\n elements,\n titleObj,\n modificationDate,\n contentsObj,\n richText,\n parent,\n rect,\n parentRect,\n open\n }) {\n this.#container = container;\n this.#titleObj = titleObj;\n this.#contentsObj = contentsObj;\n this.#richText = richText;\n this.#parent = parent;\n this.#color = color;\n this.#rect = rect;\n this.#parentRect = parentRect;\n this.#elements = elements;\n const dateObject = _display_utils.PDFDateString.toDateObject(modificationDate);\n if (dateObject) {\n this.#dateTimePromise = parent.l10n.get(\"annotation_date_string\", {\n date: dateObject.toLocaleDateString(),\n time: dateObject.toLocaleTimeString()\n });\n }\n this.trigger = elements.flatMap(e => e.getElementsToTriggerPopup());\n for (const element of this.trigger) {\n element.addEventListener(\"click\", this.#boundToggle);\n element.addEventListener(\"mouseenter\", this.#boundShow);\n element.addEventListener(\"mouseleave\", this.#boundHide);\n element.classList.add(\"popupTriggerArea\");\n }\n for (const element of elements) {\n element.container?.addEventListener(\"keydown\", this.#boundKeyDown);\n }\n this.#container.hidden = true;\n if (open) {\n this.#toggle();\n }\n }\n render() {\n if (this.#popup) {\n return;\n }\n const {\n page: {\n view\n },\n viewport: {\n rawDims: {\n pageWidth,\n pageHeight,\n pageX,\n pageY\n }\n }\n } = this.#parent;\n const popup = this.#popup = document.createElement(\"div\");\n popup.className = \"popup\";\n if (this.#color) {\n const baseColor = popup.style.outlineColor = _util.Util.makeHexColor(...this.#color);\n if (CSS.supports(\"background-color\", \"color-mix(in srgb, red 30%, white)\")) {\n popup.style.backgroundColor = `color-mix(in srgb, ${baseColor} 30%, white)`;\n } else {\n const BACKGROUND_ENLIGHT = 0.7;\n popup.style.backgroundColor = _util.Util.makeHexColor(...this.#color.map(c => Math.floor(BACKGROUND_ENLIGHT * (255 - c) + c)));\n }\n }\n const header = document.createElement(\"span\");\n header.className = \"header\";\n const title = document.createElement(\"h1\");\n header.append(title);\n ({\n dir: title.dir,\n str: title.textContent\n } = this.#titleObj);\n popup.append(header);\n if (this.#dateTimePromise) {\n const modificationDate = document.createElement(\"span\");\n modificationDate.classList.add(\"popupDate\");\n this.#dateTimePromise.then(localized => {\n modificationDate.textContent = localized;\n });\n header.append(modificationDate);\n }\n const contentsObj = this.#contentsObj;\n const richText = this.#richText;\n if (richText?.str && (!contentsObj?.str || contentsObj.str === richText.str)) {\n _xfa_layer.XfaLayer.render({\n xfaHtml: richText.html,\n intent: \"richText\",\n div: popup\n });\n popup.lastChild.classList.add(\"richText\", \"popupContent\");\n } else {\n const contents = this._formatContents(contentsObj);\n popup.append(contents);\n }\n let useParentRect = !!this.#parentRect;\n let rect = useParentRect ? this.#parentRect : this.#rect;\n for (const element of this.#elements) {\n if (!rect || _util.Util.intersect(element.data.rect, rect) !== null) {\n rect = element.data.rect;\n useParentRect = true;\n break;\n }\n }\n const normalizedRect = _util.Util.normalizeRect([rect[0], view[3] - rect[1] + view[1], rect[2], view[3] - rect[3] + view[1]]);\n const HORIZONTAL_SPACE_AFTER_ANNOTATION = 5;\n const parentWidth = useParentRect ? rect[2] - rect[0] + HORIZONTAL_SPACE_AFTER_ANNOTATION : 0;\n const popupLeft = normalizedRect[0] + parentWidth;\n const popupTop = normalizedRect[1];\n const {\n style\n } = this.#container;\n style.left = `${100 * (popupLeft - pageX) / pageWidth}%`;\n style.top = `${100 * (popupTop - pageY) / pageHeight}%`;\n this.#container.append(popup);\n }\n _formatContents({\n str,\n dir\n }) {\n const p = document.createElement(\"p\");\n p.classList.add(\"popupContent\");\n p.dir = dir;\n const lines = str.split(/(?:\\r\\n?|\\n)/);\n for (let i = 0, ii = lines.length; i < ii; ++i) {\n const line = lines[i];\n p.append(document.createTextNode(line));\n if (i < ii - 1) {\n p.append(document.createElement(\"br\"));\n }\n }\n return p;\n }\n #keyDown(event) {\n if (event.altKey || event.shiftKey || event.ctrlKey || event.metaKey) {\n return;\n }\n if (event.key === \"Enter\" || event.key === \"Escape\" && this.#pinned) {\n this.#toggle();\n }\n }\n #toggle() {\n this.#pinned = !this.#pinned;\n if (this.#pinned) {\n this.#show();\n this.#container.addEventListener(\"click\", this.#boundToggle);\n this.#container.addEventListener(\"keydown\", this.#boundKeyDown);\n } else {\n this.#hide();\n this.#container.removeEventListener(\"click\", this.#boundToggle);\n this.#container.removeEventListener(\"keydown\", this.#boundKeyDown);\n }\n }\n #show() {\n if (!this.#popup) {\n this.render();\n }\n if (!this.isVisible) {\n this.#container.hidden = false;\n this.#container.style.zIndex = parseInt(this.#container.style.zIndex) + 1000;\n } else if (this.#pinned) {\n this.#container.classList.add(\"focused\");\n }\n }\n #hide() {\n this.#container.classList.remove(\"focused\");\n if (this.#pinned || !this.isVisible) {\n return;\n }\n this.#container.hidden = true;\n this.#container.style.zIndex = parseInt(this.#container.style.zIndex) - 1000;\n }\n forceHide() {\n this.#wasVisible = this.isVisible;\n if (!this.#wasVisible) {\n return;\n }\n this.#container.hidden = true;\n }\n maybeShow() {\n if (!this.#wasVisible) {\n return;\n }\n this.#wasVisible = false;\n this.#container.hidden = false;\n }\n get isVisible() {\n return this.#container.hidden === false;\n }\n}\nclass FreeTextAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true\n });\n this.textContent = parameters.data.textContent;\n this.textPosition = parameters.data.textPosition;\n this.annotationEditorType = _util.AnnotationEditorType.FREETEXT;\n }\n render() {\n this.container.classList.add(\"freeTextAnnotation\");\n if (this.textContent) {\n const content = document.createElement(\"div\");\n content.classList.add(\"annotationTextContent\");\n content.setAttribute(\"role\", \"comment\");\n for (const line of this.textContent) {\n const lineSpan = document.createElement(\"span\");\n lineSpan.textContent = line;\n content.append(lineSpan);\n }\n this.container.append(content);\n }\n if (!this.data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n this._editOnDoubleClick();\n return this.container;\n }\n}\nexports.FreeTextAnnotationElement = FreeTextAnnotationElement;\nclass LineAnnotationElement extends AnnotationElement {\n #line = null;\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true\n });\n }\n render() {\n this.container.classList.add(\"lineAnnotation\");\n const data = this.data;\n const {\n width,\n height\n } = getRectDims(data.rect);\n const svg = this.svgFactory.create(width, height, true);\n const line = this.#line = this.svgFactory.createElement(\"svg:line\");\n line.setAttribute(\"x1\", data.rect[2] - data.lineCoordinates[0]);\n line.setAttribute(\"y1\", data.rect[3] - data.lineCoordinates[1]);\n line.setAttribute(\"x2\", data.rect[2] - data.lineCoordinates[2]);\n line.setAttribute(\"y2\", data.rect[3] - data.lineCoordinates[3]);\n line.setAttribute(\"stroke-width\", data.borderStyle.width || 1);\n line.setAttribute(\"stroke\", \"transparent\");\n line.setAttribute(\"fill\", \"transparent\");\n svg.append(line);\n this.container.append(svg);\n if (!data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n return this.container;\n }\n getElementsToTriggerPopup() {\n return this.#line;\n }\n addHighlightArea() {\n this.container.classList.add(\"highlightArea\");\n }\n}\nclass SquareAnnotationElement extends AnnotationElement {\n #square = null;\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true\n });\n }\n render() {\n this.container.classList.add(\"squareAnnotation\");\n const data = this.data;\n const {\n width,\n height\n } = getRectDims(data.rect);\n const svg = this.svgFactory.create(width, height, true);\n const borderWidth = data.borderStyle.width;\n const square = this.#square = this.svgFactory.createElement(\"svg:rect\");\n square.setAttribute(\"x\", borderWidth / 2);\n square.setAttribute(\"y\", borderWidth / 2);\n square.setAttribute(\"width\", width - borderWidth);\n square.setAttribute(\"height\", height - borderWidth);\n square.setAttribute(\"stroke-width\", borderWidth || 1);\n square.setAttribute(\"stroke\", \"transparent\");\n square.setAttribute(\"fill\", \"transparent\");\n svg.append(square);\n this.container.append(svg);\n if (!data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n return this.container;\n }\n getElementsToTriggerPopup() {\n return this.#square;\n }\n addHighlightArea() {\n this.container.classList.add(\"highlightArea\");\n }\n}\nclass CircleAnnotationElement extends AnnotationElement {\n #circle = null;\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true\n });\n }\n render() {\n this.container.classList.add(\"circleAnnotation\");\n const data = this.data;\n const {\n width,\n height\n } = getRectDims(data.rect);\n const svg = this.svgFactory.create(width, height, true);\n const borderWidth = data.borderStyle.width;\n const circle = this.#circle = this.svgFactory.createElement(\"svg:ellipse\");\n circle.setAttribute(\"cx\", width / 2);\n circle.setAttribute(\"cy\", height / 2);\n circle.setAttribute(\"rx\", width / 2 - borderWidth / 2);\n circle.setAttribute(\"ry\", height / 2 - borderWidth / 2);\n circle.setAttribute(\"stroke-width\", borderWidth || 1);\n circle.setAttribute(\"stroke\", \"transparent\");\n circle.setAttribute(\"fill\", \"transparent\");\n svg.append(circle);\n this.container.append(svg);\n if (!data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n return this.container;\n }\n getElementsToTriggerPopup() {\n return this.#circle;\n }\n addHighlightArea() {\n this.container.classList.add(\"highlightArea\");\n }\n}\nclass PolylineAnnotationElement extends AnnotationElement {\n #polyline = null;\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true\n });\n this.containerClassName = \"polylineAnnotation\";\n this.svgElementName = \"svg:polyline\";\n }\n render() {\n this.container.classList.add(this.containerClassName);\n const data = this.data;\n const {\n width,\n height\n } = getRectDims(data.rect);\n const svg = this.svgFactory.create(width, height, true);\n let points = [];\n for (const coordinate of data.vertices) {\n const x = coordinate.x - data.rect[0];\n const y = data.rect[3] - coordinate.y;\n points.push(x + \",\" + y);\n }\n points = points.join(\" \");\n const polyline = this.#polyline = this.svgFactory.createElement(this.svgElementName);\n polyline.setAttribute(\"points\", points);\n polyline.setAttribute(\"stroke-width\", data.borderStyle.width || 1);\n polyline.setAttribute(\"stroke\", \"transparent\");\n polyline.setAttribute(\"fill\", \"transparent\");\n svg.append(polyline);\n this.container.append(svg);\n if (!data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n return this.container;\n }\n getElementsToTriggerPopup() {\n return this.#polyline;\n }\n addHighlightArea() {\n this.container.classList.add(\"highlightArea\");\n }\n}\nclass PolygonAnnotationElement extends PolylineAnnotationElement {\n constructor(parameters) {\n super(parameters);\n this.containerClassName = \"polygonAnnotation\";\n this.svgElementName = \"svg:polygon\";\n }\n}\nclass CaretAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true\n });\n }\n render() {\n this.container.classList.add(\"caretAnnotation\");\n if (!this.data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n return this.container;\n }\n}\nclass InkAnnotationElement extends AnnotationElement {\n #polylines = [];\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true\n });\n this.containerClassName = \"inkAnnotation\";\n this.svgElementName = \"svg:polyline\";\n this.annotationEditorType = _util.AnnotationEditorType.INK;\n }\n render() {\n this.container.classList.add(this.containerClassName);\n const data = this.data;\n const {\n width,\n height\n } = getRectDims(data.rect);\n const svg = this.svgFactory.create(width, height, true);\n for (const inkList of data.inkLists) {\n let points = [];\n for (const coordinate of inkList) {\n const x = coordinate.x - data.rect[0];\n const y = data.rect[3] - coordinate.y;\n points.push(`${x},${y}`);\n }\n points = points.join(\" \");\n const polyline = this.svgFactory.createElement(this.svgElementName);\n this.#polylines.push(polyline);\n polyline.setAttribute(\"points\", points);\n polyline.setAttribute(\"stroke-width\", data.borderStyle.width || 1);\n polyline.setAttribute(\"stroke\", \"transparent\");\n polyline.setAttribute(\"fill\", \"transparent\");\n if (!data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n svg.append(polyline);\n }\n this.container.append(svg);\n return this.container;\n }\n getElementsToTriggerPopup() {\n return this.#polylines;\n }\n addHighlightArea() {\n this.container.classList.add(\"highlightArea\");\n }\n}\nexports.InkAnnotationElement = InkAnnotationElement;\nclass HighlightAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true,\n createQuadrilaterals: true\n });\n }\n render() {\n if (!this.data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n this.container.classList.add(\"highlightAnnotation\");\n return this.container;\n }\n}\nclass UnderlineAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true,\n createQuadrilaterals: true\n });\n }\n render() {\n if (!this.data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n this.container.classList.add(\"underlineAnnotation\");\n return this.container;\n }\n}\nclass SquigglyAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true,\n createQuadrilaterals: true\n });\n }\n render() {\n if (!this.data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n this.container.classList.add(\"squigglyAnnotation\");\n return this.container;\n }\n}\nclass StrikeOutAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true,\n createQuadrilaterals: true\n });\n }\n render() {\n if (!this.data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n this.container.classList.add(\"strikeoutAnnotation\");\n return this.container;\n }\n}\nclass StampAnnotationElement extends AnnotationElement {\n constructor(parameters) {\n super(parameters, {\n isRenderable: true,\n ignoreBorder: true\n });\n }\n render() {\n this.container.classList.add(\"stampAnnotation\");\n if (!this.data.popupRef && this.hasPopupData) {\n this._createPopup();\n }\n return this.container;\n }\n}\nexports.StampAnnotationElement = StampAnnotationElement;\nclass FileAttachmentAnnotationElement extends AnnotationElement {\n #trigger = null;\n constructor(parameters) {\n super(parameters, {\n isRenderable: true\n });\n const {\n filename,\n content\n } = this.data.file;\n this.filename = (0, _display_utils.getFilenameFromUrl)(filename, true);\n this.content = content;\n this.linkService.eventBus?.dispatch(\"fileattachmentannotation\", {\n source: this,\n filename,\n content\n });\n }\n render() {\n this.container.classList.add(\"fileAttachmentAnnotation\");\n const {\n container,\n data\n } = this;\n let trigger;\n if (data.hasAppearance || data.fillAlpha === 0) {\n trigger = document.createElement(\"div\");\n } else {\n trigger = document.createElement(\"img\");\n trigger.src = `${this.imageResourcesPath}annotation-${/paperclip/i.test(data.name) ? \"paperclip\" : \"pushpin\"}.svg`;\n if (data.fillAlpha && data.fillAlpha < 1) {\n trigger.style = `filter: opacity(${Math.round(data.fillAlpha * 100)}%);`;\n }\n }\n trigger.addEventListener(\"dblclick\", this.#download.bind(this));\n this.#trigger = trigger;\n const {\n isMac\n } = _util.FeatureTest.platform;\n container.addEventListener(\"keydown\", evt => {\n if (evt.key === \"Enter\" && (isMac ? evt.metaKey : evt.ctrlKey)) {\n this.#download();\n }\n });\n if (!data.popupRef && this.hasPopupData) {\n this._createPopup();\n } else {\n trigger.classList.add(\"popupTriggerArea\");\n }\n container.append(trigger);\n return container;\n }\n getElementsToTriggerPopup() {\n return this.#trigger;\n }\n addHighlightArea() {\n this.container.classList.add(\"highlightArea\");\n }\n #download() {\n this.downloadManager?.openOrDownloadData(this.container, this.content, this.filename);\n }\n}\nclass AnnotationLayer {\n #accessibilityManager = null;\n #annotationCanvasMap = null;\n #editableAnnotations = new Map();\n constructor({\n div,\n accessibilityManager,\n annotationCanvasMap,\n l10n,\n page,\n viewport\n }) {\n this.div = div;\n this.#accessibilityManager = accessibilityManager;\n this.#annotationCanvasMap = annotationCanvasMap;\n this.l10n = l10n;\n this.page = page;\n this.viewport = viewport;\n this.zIndex = 0;\n this.l10n ||= _displayL10n_utils.NullL10n;\n }\n #appendElement(element, id) {\n const contentElement = element.firstChild || element;\n contentElement.id = `${_util.AnnotationPrefix}${id}`;\n this.div.append(element);\n this.#accessibilityManager?.moveElementInDOM(this.div, element, contentElement, false);\n }\n async render(params) {\n const {\n annotations\n } = params;\n const layer = this.div;\n (0, _display_utils.setLayerDimensions)(layer, this.viewport);\n const popupToElements = new Map();\n const elementParams = {\n data: null,\n layer,\n linkService: params.linkService,\n downloadManager: params.downloadManager,\n imageResourcesPath: params.imageResourcesPath || \"\",\n renderForms: params.renderForms !== false,\n svgFactory: new _display_utils.DOMSVGFactory(),\n annotationStorage: params.annotationStorage || new _annotation_storage.AnnotationStorage(),\n enableScripting: params.enableScripting === true,\n hasJSActions: params.hasJSActions,\n fieldObjects: params.fieldObjects,\n parent: this,\n elements: null\n };\n for (const data of annotations) {\n if (data.noHTML) {\n continue;\n }\n const isPopupAnnotation = data.annotationType === _util.AnnotationType.POPUP;\n if (!isPopupAnnotation) {\n const {\n width,\n height\n } = getRectDims(data.rect);\n if (width <= 0 || height <= 0) {\n continue;\n }\n } else {\n const elements = popupToElements.get(data.id);\n if (!elements) {\n continue;\n }\n elementParams.elements = elements;\n }\n elementParams.data = data;\n const element = AnnotationElementFactory.create(elementParams);\n if (!element.isRenderable) {\n continue;\n }\n if (!isPopupAnnotation && data.popupRef) {\n const elements = popupToElements.get(data.popupRef);\n if (!elements) {\n popupToElements.set(data.popupRef, [element]);\n } else {\n elements.push(element);\n }\n }\n if (element.annotationEditorType > 0) {\n this.#editableAnnotations.set(element.data.id, element);\n }\n const rendered = element.render();\n if (data.hidden) {\n rendered.style.visibility = \"hidden\";\n }\n this.#appendElement(rendered, data.id);\n }\n this.#setAnnotationCanvasMap();\n await this.l10n.translate(layer);\n }\n update({\n viewport\n }) {\n const layer = this.div;\n this.viewport = viewport;\n (0, _display_utils.setLayerDimensions)(layer, {\n rotation: viewport.rotation\n });\n this.#setAnnotationCanvasMap();\n layer.hidden = false;\n }\n #setAnnotationCanvasMap() {\n if (!this.#annotationCanvasMap) {\n return;\n }\n const layer = this.div;\n for (const [id, canvas] of this.#annotationCanvasMap) {\n const element = layer.querySelector(`[data-annotation-id=\"${id}\"]`);\n if (!element) {\n continue;\n }\n const {\n firstChild\n } = element;\n if (!firstChild) {\n element.append(canvas);\n } else if (firstChild.nodeName === \"CANVAS\") {\n firstChild.replaceWith(canvas);\n } else {\n firstChild.before(canvas);\n }\n }\n this.#annotationCanvasMap.clear();\n }\n getEditableAnnotations() {\n return Array.from(this.#editableAnnotations.values());\n }\n getEditableAnnotation(id) {\n return this.#editableAnnotations.get(id);\n }\n}\nexports.AnnotationLayer = AnnotationLayer;\n\n/***/ }),\n/* 30 */\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.ColorConverters = void 0;\nfunction makeColorComp(n) {\n return Math.floor(Math.max(0, Math.min(1, n)) * 255).toString(16).padStart(2, \"0\");\n}\nfunction scaleAndClamp(x) {\n return Math.max(0, Math.min(255, 255 * x));\n}\nclass ColorConverters {\n static CMYK_G([c, y, m, k]) {\n return [\"G\", 1 - Math.min(1, 0.3 * c + 0.59 * m + 0.11 * y + k)];\n }\n static G_CMYK([g]) {\n return [\"CMYK\", 0, 0, 0, 1 - g];\n }\n static G_RGB([g]) {\n return [\"RGB\", g, g, g];\n }\n static G_rgb([g]) {\n g = scaleAndClamp(g);\n return [g, g, g];\n }\n static G_HTML([g]) {\n const G = makeColorComp(g);\n return `#${G}${G}${G}`;\n }\n static RGB_G([r, g, b]) {\n return [\"G\", 0.3 * r + 0.59 * g + 0.11 * b];\n }\n static RGB_rgb(color) {\n return color.map(scaleAndClamp);\n }\n static RGB_HTML(color) {\n return `#${color.map(makeColorComp).join(\"\")}`;\n }\n static T_HTML() {\n return \"#00000000\";\n }\n static T_rgb() {\n return [null];\n }\n static CMYK_RGB([c, y, m, k]) {\n return [\"RGB\", 1 - Math.min(1, c + k), 1 - Math.min(1, m + k), 1 - Math.min(1, y + k)];\n }\n static CMYK_rgb([c, y, m, k]) {\n return [scaleAndClamp(1 - Math.min(1, c + k)), scaleAndClamp(1 - Math.min(1, m + k)), scaleAndClamp(1 - Math.min(1, y + k))];\n }\n static CMYK_HTML(components) {\n const rgb = this.CMYK_RGB(components).slice(1);\n return this.RGB_HTML(rgb);\n }\n static RGB_CMYK([r, g, b]) {\n const c = 1 - r;\n const m = 1 - g;\n const y = 1 - b;\n const k = Math.min(c, m, y);\n return [\"CMYK\", c, m, y, k];\n }\n}\nexports.ColorConverters = ColorConverters;\n\n/***/ }),\n/* 31 */\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.NullL10n = void 0;\nexports.getL10nFallback = getL10nFallback;\nconst DEFAULT_L10N_STRINGS = {\n of_pages: \"of {{pagesCount}}\",\n page_of_pages: \"({{pageNumber}} of {{pagesCount}})\",\n document_properties_kb: \"{{size_kb}} KB ({{size_b}} bytes)\",\n document_properties_mb: \"{{size_mb}} MB ({{size_b}} bytes)\",\n document_properties_date_string: \"{{date}}, {{time}}\",\n document_properties_page_size_unit_inches: \"in\",\n document_properties_page_size_unit_millimeters: \"mm\",\n document_properties_page_size_orientation_portrait: \"portrait\",\n document_properties_page_size_orientation_landscape: \"landscape\",\n document_properties_page_size_name_a3: \"A3\",\n document_properties_page_size_name_a4: \"A4\",\n document_properties_page_size_name_letter: \"Letter\",\n document_properties_page_size_name_legal: \"Legal\",\n document_properties_page_size_dimension_string: \"{{width}} × {{height}} {{unit}} ({{orientation}})\",\n document_properties_page_size_dimension_name_string: \"{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})\",\n document_properties_linearized_yes: \"Yes\",\n document_properties_linearized_no: \"No\",\n additional_layers: \"Additional Layers\",\n page_landmark: \"Page {{page}}\",\n thumb_page_title: \"Page {{page}}\",\n thumb_page_canvas: \"Thumbnail of Page {{page}}\",\n find_reached_top: \"Reached top of document, continued from bottom\",\n find_reached_bottom: \"Reached end of document, continued from top\",\n \"find_match_count[one]\": \"{{current}} of {{total}} match\",\n \"find_match_count[other]\": \"{{current}} of {{total}} matches\",\n \"find_match_count_limit[one]\": \"More than {{limit}} match\",\n \"find_match_count_limit[other]\": \"More than {{limit}} matches\",\n find_not_found: \"Phrase not found\",\n page_scale_width: \"Page Width\",\n page_scale_fit: \"Page Fit\",\n page_scale_auto: \"Automatic Zoom\",\n page_scale_actual: \"Actual Size\",\n page_scale_percent: \"{{scale}}%\",\n loading_error: \"An error occurred while loading the PDF.\",\n invalid_file_error: \"Invalid or corrupted PDF file.\",\n missing_file_error: \"Missing PDF file.\",\n unexpected_response_error: \"Unexpected server response.\",\n rendering_error: \"An error occurred while rendering the page.\",\n annotation_date_string: \"{{date}}, {{time}}\",\n printing_not_supported: \"Warning: Printing is not fully supported by this browser.\",\n printing_not_ready: \"Warning: The PDF is not fully loaded for printing.\",\n web_fonts_disabled: \"Web fonts are disabled: unable to use embedded PDF fonts.\",\n free_text2_default_content: \"Start typing…\",\n editor_free_text2_aria_label: \"Text Editor\",\n editor_ink2_aria_label: \"Draw Editor\",\n editor_ink_canvas_aria_label: \"User-created image\",\n editor_alt_text_button_label: \"Alt text\",\n editor_alt_text_edit_button_label: \"Edit alt text\",\n editor_alt_text_decorative_tooltip: \"Marked as decorative\"\n};\n{\n DEFAULT_L10N_STRINGS.print_progress_percent = \"{{progress}}%\";\n}\nfunction getL10nFallback(key, args) {\n switch (key) {\n case \"find_match_count\":\n key = `find_match_count[${args.total === 1 ? \"one\" : \"other\"}]`;\n break;\n case \"find_match_count_limit\":\n key = `find_match_count_limit[${args.limit === 1 ? \"one\" : \"other\"}]`;\n break;\n }\n return DEFAULT_L10N_STRINGS[key] || \"\";\n}\nfunction formatL10nValue(text, args) {\n if (!args) {\n return text;\n }\n return text.replaceAll(/\\{\\{\\s*(\\w+)\\s*\\}\\}/g, (all, name) => {\n return name in args ? args[name] : \"{{\" + name + \"}}\";\n });\n}\nconst NullL10n = {\n async getLanguage() {\n return \"en-us\";\n },\n async getDirection() {\n return \"ltr\";\n },\n async get(key, args = null, fallback = getL10nFallback(key, args)) {\n return formatL10nValue(fallback, args);\n },\n async translate(element) {}\n};\nexports.NullL10n = NullL10n;\n\n/***/ }),\n/* 32 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.XfaLayer = void 0;\nvar _xfa_text = __w_pdfjs_require__(25);\nclass XfaLayer {\n static setupStorage(html, id, element, storage, intent) {\n const storedData = storage.getValue(id, {\n value: null\n });\n switch (element.name) {\n case \"textarea\":\n if (storedData.value !== null) {\n html.textContent = storedData.value;\n }\n if (intent === \"print\") {\n break;\n }\n html.addEventListener(\"input\", event => {\n storage.setValue(id, {\n value: event.target.value\n });\n });\n break;\n case \"input\":\n if (element.attributes.type === \"radio\" || element.attributes.type === \"checkbox\") {\n if (storedData.value === element.attributes.xfaOn) {\n html.setAttribute(\"checked\", true);\n } else if (storedData.value === element.attributes.xfaOff) {\n html.removeAttribute(\"checked\");\n }\n if (intent === \"print\") {\n break;\n }\n html.addEventListener(\"change\", event => {\n storage.setValue(id, {\n value: event.target.checked ? event.target.getAttribute(\"xfaOn\") : event.target.getAttribute(\"xfaOff\")\n });\n });\n } else {\n if (storedData.value !== null) {\n html.setAttribute(\"value\", storedData.value);\n }\n if (intent === \"print\") {\n break;\n }\n html.addEventListener(\"input\", event => {\n storage.setValue(id, {\n value: event.target.value\n });\n });\n }\n break;\n case \"select\":\n if (storedData.value !== null) {\n html.setAttribute(\"value\", storedData.value);\n for (const option of element.children) {\n if (option.attributes.value === storedData.value) {\n option.attributes.selected = true;\n } else if (option.attributes.hasOwnProperty(\"selected\")) {\n delete option.attributes.selected;\n }\n }\n }\n html.addEventListener(\"input\", event => {\n const options = event.target.options;\n const value = options.selectedIndex === -1 ? \"\" : options[options.selectedIndex].value;\n storage.setValue(id, {\n value\n });\n });\n break;\n }\n }\n static setAttributes({\n html,\n element,\n storage = null,\n intent,\n linkService\n }) {\n const {\n attributes\n } = element;\n const isHTMLAnchorElement = html instanceof HTMLAnchorElement;\n if (attributes.type === \"radio\") {\n attributes.name = `${attributes.name}-${intent}`;\n }\n for (const [key, value] of Object.entries(attributes)) {\n if (value === null || value === undefined) {\n continue;\n }\n switch (key) {\n case \"class\":\n if (value.length) {\n html.setAttribute(key, value.join(\" \"));\n }\n break;\n case \"dataId\":\n break;\n case \"id\":\n html.setAttribute(\"data-element-id\", value);\n break;\n case \"style\":\n Object.assign(html.style, value);\n break;\n case \"textContent\":\n html.textContent = value;\n break;\n default:\n if (!isHTMLAnchorElement || key !== \"href\" && key !== \"newWindow\") {\n html.setAttribute(key, value);\n }\n }\n }\n if (isHTMLAnchorElement) {\n linkService.addLinkAttributes(html, attributes.href, attributes.newWindow);\n }\n if (storage && attributes.dataId) {\n this.setupStorage(html, attributes.dataId, element, storage);\n }\n }\n static render(parameters) {\n const storage = parameters.annotationStorage;\n const linkService = parameters.linkService;\n const root = parameters.xfaHtml;\n const intent = parameters.intent || \"display\";\n const rootHtml = document.createElement(root.name);\n if (root.attributes) {\n this.setAttributes({\n html: rootHtml,\n element: root,\n intent,\n linkService\n });\n }\n const stack = [[root, -1, rootHtml]];\n const rootDiv = parameters.div;\n rootDiv.append(rootHtml);\n if (parameters.viewport) {\n const transform = `matrix(${parameters.viewport.transform.join(\",\")})`;\n rootDiv.style.transform = transform;\n }\n if (intent !== \"richText\") {\n rootDiv.setAttribute(\"class\", \"xfaLayer xfaFont\");\n }\n const textDivs = [];\n while (stack.length > 0) {\n const [parent, i, html] = stack.at(-1);\n if (i + 1 === parent.children.length) {\n stack.pop();\n continue;\n }\n const child = parent.children[++stack.at(-1)[1]];\n if (child === null) {\n continue;\n }\n const {\n name\n } = child;\n if (name === \"#text\") {\n const node = document.createTextNode(child.value);\n textDivs.push(node);\n html.append(node);\n continue;\n }\n const childHtml = child?.attributes?.xmlns ? document.createElementNS(child.attributes.xmlns, name) : document.createElement(name);\n html.append(childHtml);\n if (child.attributes) {\n this.setAttributes({\n html: childHtml,\n element: child,\n storage,\n intent,\n linkService\n });\n }\n if (child.children && child.children.length > 0) {\n stack.push([child, -1, childHtml]);\n } else if (child.value) {\n const node = document.createTextNode(child.value);\n if (_xfa_text.XfaText.shouldBuildText(name)) {\n textDivs.push(node);\n }\n childHtml.append(node);\n }\n }\n for (const el of rootDiv.querySelectorAll(\".xfaNonInteractive input, .xfaNonInteractive textarea\")) {\n el.setAttribute(\"readOnly\", true);\n }\n return {\n textDivs\n };\n }\n static update(parameters) {\n const transform = `matrix(${parameters.viewport.transform.join(\",\")})`;\n parameters.div.style.transform = transform;\n parameters.div.hidden = false;\n }\n}\nexports.XfaLayer = XfaLayer;\n\n/***/ }),\n/* 33 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.InkEditor = void 0;\nvar _util = __w_pdfjs_require__(1);\nvar _editor = __w_pdfjs_require__(4);\nvar _annotation_layer = __w_pdfjs_require__(29);\nvar _display_utils = __w_pdfjs_require__(6);\nvar _tools = __w_pdfjs_require__(5);\nclass InkEditor extends _editor.AnnotationEditor {\n #baseHeight = 0;\n #baseWidth = 0;\n #boundCanvasPointermove = this.canvasPointermove.bind(this);\n #boundCanvasPointerleave = this.canvasPointerleave.bind(this);\n #boundCanvasPointerup = this.canvasPointerup.bind(this);\n #boundCanvasPointerdown = this.canvasPointerdown.bind(this);\n #currentPath2D = new Path2D();\n #disableEditing = false;\n #hasSomethingToDraw = false;\n #isCanvasInitialized = false;\n #observer = null;\n #realWidth = 0;\n #realHeight = 0;\n #requestFrameCallback = null;\n static _defaultColor = null;\n static _defaultOpacity = 1;\n static _defaultThickness = 1;\n static _type = \"ink\";\n constructor(params) {\n super({\n ...params,\n name: \"inkEditor\"\n });\n this.color = params.color || null;\n this.thickness = params.thickness || null;\n this.opacity = params.opacity || null;\n this.paths = [];\n this.bezierPath2D = [];\n this.allRawPaths = [];\n this.currentPath = [];\n this.scaleFactor = 1;\n this.translationX = this.translationY = 0;\n this.x = 0;\n this.y = 0;\n this._willKeepAspectRatio = true;\n }\n static initialize(l10n) {\n _editor.AnnotationEditor.initialize(l10n, {\n strings: [\"editor_ink_canvas_aria_label\", \"editor_ink2_aria_label\"]\n });\n }\n static updateDefaultParams(type, value) {\n switch (type) {\n case _util.AnnotationEditorParamsType.INK_THICKNESS:\n InkEditor._defaultThickness = value;\n break;\n case _util.AnnotationEditorParamsType.INK_COLOR:\n InkEditor._defaultColor = value;\n break;\n case _util.AnnotationEditorParamsType.INK_OPACITY:\n InkEditor._defaultOpacity = value / 100;\n break;\n }\n }\n updateParams(type, value) {\n switch (type) {\n case _util.AnnotationEditorParamsType.INK_THICKNESS:\n this.#updateThickness(value);\n break;\n case _util.AnnotationEditorParamsType.INK_COLOR:\n this.#updateColor(value);\n break;\n case _util.AnnotationEditorParamsType.INK_OPACITY:\n this.#updateOpacity(value);\n break;\n }\n }\n static get defaultPropertiesToUpdate() {\n return [[_util.AnnotationEditorParamsType.INK_THICKNESS, InkEditor._defaultThickness], [_util.AnnotationEditorParamsType.INK_COLOR, InkEditor._defaultColor || _editor.AnnotationEditor._defaultLineColor], [_util.AnnotationEditorParamsType.INK_OPACITY, Math.round(InkEditor._defaultOpacity * 100)]];\n }\n get propertiesToUpdate() {\n return [[_util.AnnotationEditorParamsType.INK_THICKNESS, this.thickness || InkEditor._defaultThickness], [_util.AnnotationEditorParamsType.INK_COLOR, this.color || InkEditor._defaultColor || _editor.AnnotationEditor._defaultLineColor], [_util.AnnotationEditorParamsType.INK_OPACITY, Math.round(100 * (this.opacity ?? InkEditor._defaultOpacity))]];\n }\n #updateThickness(thickness) {\n const savedThickness = this.thickness;\n this.addCommands({\n cmd: () => {\n this.thickness = thickness;\n this.#fitToContent();\n },\n undo: () => {\n this.thickness = savedThickness;\n this.#fitToContent();\n },\n mustExec: true,\n type: _util.AnnotationEditorParamsType.INK_THICKNESS,\n overwriteIfSameType: true,\n keepUndo: true\n });\n }\n #updateColor(color) {\n const savedColor = this.color;\n this.addCommands({\n cmd: () => {\n this.color = color;\n this.#redraw();\n },\n undo: () => {\n this.color = savedColor;\n this.#redraw();\n },\n mustExec: true,\n type: _util.AnnotationEditorParamsType.INK_COLOR,\n overwriteIfSameType: true,\n keepUndo: true\n });\n }\n #updateOpacity(opacity) {\n opacity /= 100;\n const savedOpacity = this.opacity;\n this.addCommands({\n cmd: () => {\n this.opacity = opacity;\n this.#redraw();\n },\n undo: () => {\n this.opacity = savedOpacity;\n this.#redraw();\n },\n mustExec: true,\n type: _util.AnnotationEditorParamsType.INK_OPACITY,\n overwriteIfSameType: true,\n keepUndo: true\n });\n }\n rebuild() {\n if (!this.parent) {\n return;\n }\n super.rebuild();\n if (this.div === null) {\n return;\n }\n if (!this.canvas) {\n this.#createCanvas();\n this.#createObserver();\n }\n if (!this.isAttachedToDOM) {\n this.parent.add(this);\n this.#setCanvasDims();\n }\n this.#fitToContent();\n }\n remove() {\n if (this.canvas === null) {\n return;\n }\n if (!this.isEmpty()) {\n this.commit();\n }\n this.canvas.width = this.canvas.height = 0;\n this.canvas.remove();\n this.canvas = null;\n this.#observer.disconnect();\n this.#observer = null;\n super.remove();\n }\n setParent(parent) {\n if (!this.parent && parent) {\n this._uiManager.removeShouldRescale(this);\n } else if (this.parent && parent === null) {\n this._uiManager.addShouldRescale(this);\n }\n super.setParent(parent);\n }\n onScaleChanging() {\n const [parentWidth, parentHeight] = this.parentDimensions;\n const width = this.width * parentWidth;\n const height = this.height * parentHeight;\n this.setDimensions(width, height);\n }\n enableEditMode() {\n if (this.#disableEditing || this.canvas === null) {\n return;\n }\n super.enableEditMode();\n this._isDraggable = false;\n this.canvas.addEventListener(\"pointerdown\", this.#boundCanvasPointerdown);\n }\n disableEditMode() {\n if (!this.isInEditMode() || this.canvas === null) {\n return;\n }\n super.disableEditMode();\n this._isDraggable = !this.isEmpty();\n this.div.classList.remove(\"editing\");\n this.canvas.removeEventListener(\"pointerdown\", this.#boundCanvasPointerdown);\n }\n onceAdded() {\n this._isDraggable = !this.isEmpty();\n }\n isEmpty() {\n return this.paths.length === 0 || this.paths.length === 1 && this.paths[0].length === 0;\n }\n #getInitialBBox() {\n const {\n parentRotation,\n parentDimensions: [width, height]\n } = this;\n switch (parentRotation) {\n case 90:\n return [0, height, height, width];\n case 180:\n return [width, height, width, height];\n case 270:\n return [width, 0, height, width];\n default:\n return [0, 0, width, height];\n }\n }\n #setStroke() {\n const {\n ctx,\n color,\n opacity,\n thickness,\n parentScale,\n scaleFactor\n } = this;\n ctx.lineWidth = thickness * parentScale / scaleFactor;\n ctx.lineCap = \"round\";\n ctx.lineJoin = \"round\";\n ctx.miterLimit = 10;\n ctx.strokeStyle = `${color}${(0, _tools.opacityToHex)(opacity)}`;\n }\n #startDrawing(x, y) {\n this.canvas.addEventListener(\"contextmenu\", _display_utils.noContextMenu);\n this.canvas.addEventListener(\"pointerleave\", this.#boundCanvasPointerleave);\n this.canvas.addEventListener(\"pointermove\", this.#boundCanvasPointermove);\n this.canvas.addEventListener(\"pointerup\", this.#boundCanvasPointerup);\n this.canvas.removeEventListener(\"pointerdown\", this.#boundCanvasPointerdown);\n this.isEditing = true;\n if (!this.#isCanvasInitialized) {\n this.#isCanvasInitialized = true;\n this.#setCanvasDims();\n this.thickness ||= InkEditor._defaultThickness;\n this.color ||= InkEditor._defaultColor || _editor.AnnotationEditor._defaultLineColor;\n this.opacity ??= InkEditor._defaultOpacity;\n }\n this.currentPath.push([x, y]);\n this.#hasSomethingToDraw = false;\n this.#setStroke();\n this.#requestFrameCallback = () => {\n this.#drawPoints();\n if (this.#requestFrameCallback) {\n window.requestAnimationFrame(this.#requestFrameCallback);\n }\n };\n window.requestAnimationFrame(this.#requestFrameCallback);\n }\n #draw(x, y) {\n const [lastX, lastY] = this.currentPath.at(-1);\n if (this.currentPath.length > 1 && x === lastX && y === lastY) {\n return;\n }\n const currentPath = this.currentPath;\n let path2D = this.#currentPath2D;\n currentPath.push([x, y]);\n this.#hasSomethingToDraw = true;\n if (currentPath.length <= 2) {\n path2D.moveTo(...currentPath[0]);\n path2D.lineTo(x, y);\n return;\n }\n if (currentPath.length === 3) {\n this.#currentPath2D = path2D = new Path2D();\n path2D.moveTo(...currentPath[0]);\n }\n this.#makeBezierCurve(path2D, ...currentPath.at(-3), ...currentPath.at(-2), x, y);\n }\n #endPath() {\n if (this.currentPath.length === 0) {\n return;\n }\n const lastPoint = this.currentPath.at(-1);\n this.#currentPath2D.lineTo(...lastPoint);\n }\n #stopDrawing(x, y) {\n this.#requestFrameCallback = null;\n x = Math.min(Math.max(x, 0), this.canvas.width);\n y = Math.min(Math.max(y, 0), this.canvas.height);\n this.#draw(x, y);\n this.#endPath();\n let bezier;\n if (this.currentPath.length !== 1) {\n bezier = this.#generateBezierPoints();\n } else {\n const xy = [x, y];\n bezier = [[xy, xy.slice(), xy.slice(), xy]];\n }\n const path2D = this.#currentPath2D;\n const currentPath = this.currentPath;\n this.currentPath = [];\n this.#currentPath2D = new Path2D();\n const cmd = () => {\n this.allRawPaths.push(currentPath);\n this.paths.push(bezier);\n this.bezierPath2D.push(path2D);\n this.rebuild();\n };\n const undo = () => {\n this.allRawPaths.pop();\n this.paths.pop();\n this.bezierPath2D.pop();\n if (this.paths.length === 0) {\n this.remove();\n } else {\n if (!this.canvas) {\n this.#createCanvas();\n this.#createObserver();\n }\n this.#fitToContent();\n }\n };\n this.addCommands({\n cmd,\n undo,\n mustExec: true\n });\n }\n #drawPoints() {\n if (!this.#hasSomethingToDraw) {\n return;\n }\n this.#hasSomethingToDraw = false;\n const thickness = Math.ceil(this.thickness * this.parentScale);\n const lastPoints = this.currentPath.slice(-3);\n const x = lastPoints.map(xy => xy[0]);\n const y = lastPoints.map(xy => xy[1]);\n const xMin = Math.min(...x) - thickness;\n const xMax = Math.max(...x) + thickness;\n const yMin = Math.min(...y) - thickness;\n const yMax = Math.max(...y) + thickness;\n const {\n ctx\n } = this;\n ctx.save();\n ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);\n for (const path of this.bezierPath2D) {\n ctx.stroke(path);\n }\n ctx.stroke(this.#currentPath2D);\n ctx.restore();\n }\n #makeBezierCurve(path2D, x0, y0, x1, y1, x2, y2) {\n const prevX = (x0 + x1) / 2;\n const prevY = (y0 + y1) / 2;\n const x3 = (x1 + x2) / 2;\n const y3 = (y1 + y2) / 2;\n path2D.bezierCurveTo(prevX + 2 * (x1 - prevX) / 3, prevY + 2 * (y1 - prevY) / 3, x3 + 2 * (x1 - x3) / 3, y3 + 2 * (y1 - y3) / 3, x3, y3);\n }\n #generateBezierPoints() {\n const path = this.currentPath;\n if (path.length <= 2) {\n return [[path[0], path[0], path.at(-1), path.at(-1)]];\n }\n const bezierPoints = [];\n let i;\n let [x0, y0] = path[0];\n for (i = 1; i < path.length - 2; i++) {\n const [x1, y1] = path[i];\n const [x2, y2] = path[i + 1];\n const x3 = (x1 + x2) / 2;\n const y3 = (y1 + y2) / 2;\n const control1 = [x0 + 2 * (x1 - x0) / 3, y0 + 2 * (y1 - y0) / 3];\n const control2 = [x3 + 2 * (x1 - x3) / 3, y3 + 2 * (y1 - y3) / 3];\n bezierPoints.push([[x0, y0], control1, control2, [x3, y3]]);\n [x0, y0] = [x3, y3];\n }\n const [x1, y1] = path[i];\n const [x2, y2] = path[i + 1];\n const control1 = [x0 + 2 * (x1 - x0) / 3, y0 + 2 * (y1 - y0) / 3];\n const control2 = [x2 + 2 * (x1 - x2) / 3, y2 + 2 * (y1 - y2) / 3];\n bezierPoints.push([[x0, y0], control1, control2, [x2, y2]]);\n return bezierPoints;\n }\n #redraw() {\n if (this.isEmpty()) {\n this.#updateTransform();\n return;\n }\n this.#setStroke();\n const {\n canvas,\n ctx\n } = this;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n this.#updateTransform();\n for (const path of this.bezierPath2D) {\n ctx.stroke(path);\n }\n }\n commit() {\n if (this.#disableEditing) {\n return;\n }\n super.commit();\n this.isEditing = false;\n this.disableEditMode();\n this.setInForeground();\n this.#disableEditing = true;\n this.div.classList.add(\"disabled\");\n this.#fitToContent(true);\n this.makeResizable();\n this.parent.addInkEditorIfNeeded(true);\n this.moveInDOM();\n this.div.focus({\n preventScroll: true\n });\n }\n focusin(event) {\n if (!this._focusEventsAllowed) {\n return;\n }\n super.focusin(event);\n this.enableEditMode();\n }\n canvasPointerdown(event) {\n if (event.button !== 0 || !this.isInEditMode() || this.#disableEditing) {\n return;\n }\n this.setInForeground();\n event.preventDefault();\n if (event.type !== \"mouse\") {\n this.div.focus();\n }\n this.#startDrawing(event.offsetX, event.offsetY);\n }\n canvasPointermove(event) {\n event.preventDefault();\n this.#draw(event.offsetX, event.offsetY);\n }\n canvasPointerup(event) {\n event.preventDefault();\n this.#endDrawing(event);\n }\n canvasPointerleave(event) {\n this.#endDrawing(event);\n }\n #endDrawing(event) {\n this.canvas.removeEventListener(\"pointerleave\", this.#boundCanvasPointerleave);\n this.canvas.removeEventListener(\"pointermove\", this.#boundCanvasPointermove);\n this.canvas.removeEventListener(\"pointerup\", this.#boundCanvasPointerup);\n this.canvas.addEventListener(\"pointerdown\", this.#boundCanvasPointerdown);\n setTimeout(() => {\n this.canvas.removeEventListener(\"contextmenu\", _display_utils.noContextMenu);\n }, 10);\n this.#stopDrawing(event.offsetX, event.offsetY);\n this.addToAnnotationStorage();\n this.setInBackground();\n }\n #createCanvas() {\n this.canvas = document.createElement(\"canvas\");\n this.canvas.width = this.canvas.height = 0;\n this.canvas.className = \"inkEditorCanvas\";\n _editor.AnnotationEditor._l10nPromise.get(\"editor_ink_canvas_aria_label\").then(msg => this.canvas?.setAttribute(\"aria-label\", msg));\n this.div.append(this.canvas);\n this.ctx = this.canvas.getContext(\"2d\");\n }\n #createObserver() {\n this.#observer = new ResizeObserver(entries => {\n const rect = entries[0].contentRect;\n if (rect.width && rect.height) {\n this.setDimensions(rect.width, rect.height);\n }\n });\n this.#observer.observe(this.div);\n }\n get isResizable() {\n return !this.isEmpty() && this.#disableEditing;\n }\n render() {\n if (this.div) {\n return this.div;\n }\n let baseX, baseY;\n if (this.width) {\n baseX = this.x;\n baseY = this.y;\n }\n super.render();\n _editor.AnnotationEditor._l10nPromise.get(\"editor_ink2_aria_label\").then(msg => this.div?.setAttribute(\"aria-label\", msg));\n const [x, y, w, h] = this.#getInitialBBox();\n this.setAt(x, y, 0, 0);\n this.setDims(w, h);\n this.#createCanvas();\n if (this.width) {\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.setAspectRatio(this.width * parentWidth, this.height * parentHeight);\n this.setAt(baseX * parentWidth, baseY * parentHeight, this.width * parentWidth, this.height * parentHeight);\n this.#isCanvasInitialized = true;\n this.#setCanvasDims();\n this.setDims(this.width * parentWidth, this.height * parentHeight);\n this.#redraw();\n this.div.classList.add(\"disabled\");\n } else {\n this.div.classList.add(\"editing\");\n this.enableEditMode();\n }\n this.#createObserver();\n return this.div;\n }\n #setCanvasDims() {\n if (!this.#isCanvasInitialized) {\n return;\n }\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.canvas.width = Math.ceil(this.width * parentWidth);\n this.canvas.height = Math.ceil(this.height * parentHeight);\n this.#updateTransform();\n }\n setDimensions(width, height) {\n const roundedWidth = Math.round(width);\n const roundedHeight = Math.round(height);\n if (this.#realWidth === roundedWidth && this.#realHeight === roundedHeight) {\n return;\n }\n this.#realWidth = roundedWidth;\n this.#realHeight = roundedHeight;\n this.canvas.style.visibility = \"hidden\";\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.width = width / parentWidth;\n this.height = height / parentHeight;\n this.fixAndSetPosition();\n if (this.#disableEditing) {\n this.#setScaleFactor(width, height);\n }\n this.#setCanvasDims();\n this.#redraw();\n this.canvas.style.visibility = \"visible\";\n this.fixDims();\n }\n #setScaleFactor(width, height) {\n const padding = this.#getPadding();\n const scaleFactorW = (width - padding) / this.#baseWidth;\n const scaleFactorH = (height - padding) / this.#baseHeight;\n this.scaleFactor = Math.min(scaleFactorW, scaleFactorH);\n }\n #updateTransform() {\n const padding = this.#getPadding() / 2;\n this.ctx.setTransform(this.scaleFactor, 0, 0, this.scaleFactor, this.translationX * this.scaleFactor + padding, this.translationY * this.scaleFactor + padding);\n }\n static #buildPath2D(bezier) {\n const path2D = new Path2D();\n for (let i = 0, ii = bezier.length; i < ii; i++) {\n const [first, control1, control2, second] = bezier[i];\n if (i === 0) {\n path2D.moveTo(...first);\n }\n path2D.bezierCurveTo(control1[0], control1[1], control2[0], control2[1], second[0], second[1]);\n }\n return path2D;\n }\n static #toPDFCoordinates(points, rect, rotation) {\n const [blX, blY, trX, trY] = rect;\n switch (rotation) {\n case 0:\n for (let i = 0, ii = points.length; i < ii; i += 2) {\n points[i] += blX;\n points[i + 1] = trY - points[i + 1];\n }\n break;\n case 90:\n for (let i = 0, ii = points.length; i < ii; i += 2) {\n const x = points[i];\n points[i] = points[i + 1] + blX;\n points[i + 1] = x + blY;\n }\n break;\n case 180:\n for (let i = 0, ii = points.length; i < ii; i += 2) {\n points[i] = trX - points[i];\n points[i + 1] += blY;\n }\n break;\n case 270:\n for (let i = 0, ii = points.length; i < ii; i += 2) {\n const x = points[i];\n points[i] = trX - points[i + 1];\n points[i + 1] = trY - x;\n }\n break;\n default:\n throw new Error(\"Invalid rotation\");\n }\n return points;\n }\n static #fromPDFCoordinates(points, rect, rotation) {\n const [blX, blY, trX, trY] = rect;\n switch (rotation) {\n case 0:\n for (let i = 0, ii = points.length; i < ii; i += 2) {\n points[i] -= blX;\n points[i + 1] = trY - points[i + 1];\n }\n break;\n case 90:\n for (let i = 0, ii = points.length; i < ii; i += 2) {\n const x = points[i];\n points[i] = points[i + 1] - blY;\n points[i + 1] = x - blX;\n }\n break;\n case 180:\n for (let i = 0, ii = points.length; i < ii; i += 2) {\n points[i] = trX - points[i];\n points[i + 1] -= blY;\n }\n break;\n case 270:\n for (let i = 0, ii = points.length; i < ii; i += 2) {\n const x = points[i];\n points[i] = trY - points[i + 1];\n points[i + 1] = trX - x;\n }\n break;\n default:\n throw new Error(\"Invalid rotation\");\n }\n return points;\n }\n #serializePaths(s, tx, ty, rect) {\n const paths = [];\n const padding = this.thickness / 2;\n const shiftX = s * tx + padding;\n const shiftY = s * ty + padding;\n for (const bezier of this.paths) {\n const buffer = [];\n const points = [];\n for (let j = 0, jj = bezier.length; j < jj; j++) {\n const [first, control1, control2, second] = bezier[j];\n const p10 = s * first[0] + shiftX;\n const p11 = s * first[1] + shiftY;\n const p20 = s * control1[0] + shiftX;\n const p21 = s * control1[1] + shiftY;\n const p30 = s * control2[0] + shiftX;\n const p31 = s * control2[1] + shiftY;\n const p40 = s * second[0] + shiftX;\n const p41 = s * second[1] + shiftY;\n if (j === 0) {\n buffer.push(p10, p11);\n points.push(p10, p11);\n }\n buffer.push(p20, p21, p30, p31, p40, p41);\n points.push(p20, p21);\n if (j === jj - 1) {\n points.push(p40, p41);\n }\n }\n paths.push({\n bezier: InkEditor.#toPDFCoordinates(buffer, rect, this.rotation),\n points: InkEditor.#toPDFCoordinates(points, rect, this.rotation)\n });\n }\n return paths;\n }\n #getBbox() {\n let xMin = Infinity;\n let xMax = -Infinity;\n let yMin = Infinity;\n let yMax = -Infinity;\n for (const path of this.paths) {\n for (const [first, control1, control2, second] of path) {\n const bbox = _util.Util.bezierBoundingBox(...first, ...control1, ...control2, ...second);\n xMin = Math.min(xMin, bbox[0]);\n yMin = Math.min(yMin, bbox[1]);\n xMax = Math.max(xMax, bbox[2]);\n yMax = Math.max(yMax, bbox[3]);\n }\n }\n return [xMin, yMin, xMax, yMax];\n }\n #getPadding() {\n return this.#disableEditing ? Math.ceil(this.thickness * this.parentScale) : 0;\n }\n #fitToContent(firstTime = false) {\n if (this.isEmpty()) {\n return;\n }\n if (!this.#disableEditing) {\n this.#redraw();\n return;\n }\n const bbox = this.#getBbox();\n const padding = this.#getPadding();\n this.#baseWidth = Math.max(_editor.AnnotationEditor.MIN_SIZE, bbox[2] - bbox[0]);\n this.#baseHeight = Math.max(_editor.AnnotationEditor.MIN_SIZE, bbox[3] - bbox[1]);\n const width = Math.ceil(padding + this.#baseWidth * this.scaleFactor);\n const height = Math.ceil(padding + this.#baseHeight * this.scaleFactor);\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.width = width / parentWidth;\n this.height = height / parentHeight;\n this.setAspectRatio(width, height);\n const prevTranslationX = this.translationX;\n const prevTranslationY = this.translationY;\n this.translationX = -bbox[0];\n this.translationY = -bbox[1];\n this.#setCanvasDims();\n this.#redraw();\n this.#realWidth = width;\n this.#realHeight = height;\n this.setDims(width, height);\n const unscaledPadding = firstTime ? padding / this.scaleFactor / 2 : 0;\n this.translate(prevTranslationX - this.translationX - unscaledPadding, prevTranslationY - this.translationY - unscaledPadding);\n }\n static deserialize(data, parent, uiManager) {\n if (data instanceof _annotation_layer.InkAnnotationElement) {\n return null;\n }\n const editor = super.deserialize(data, parent, uiManager);\n editor.thickness = data.thickness;\n editor.color = _util.Util.makeHexColor(...data.color);\n editor.opacity = data.opacity;\n const [pageWidth, pageHeight] = editor.pageDimensions;\n const width = editor.width * pageWidth;\n const height = editor.height * pageHeight;\n const scaleFactor = editor.parentScale;\n const padding = data.thickness / 2;\n editor.#disableEditing = true;\n editor.#realWidth = Math.round(width);\n editor.#realHeight = Math.round(height);\n const {\n paths,\n rect,\n rotation\n } = data;\n for (let {\n bezier\n } of paths) {\n bezier = InkEditor.#fromPDFCoordinates(bezier, rect, rotation);\n const path = [];\n editor.paths.push(path);\n let p0 = scaleFactor * (bezier[0] - padding);\n let p1 = scaleFactor * (bezier[1] - padding);\n for (let i = 2, ii = bezier.length; i < ii; i += 6) {\n const p10 = scaleFactor * (bezier[i] - padding);\n const p11 = scaleFactor * (bezier[i + 1] - padding);\n const p20 = scaleFactor * (bezier[i + 2] - padding);\n const p21 = scaleFactor * (bezier[i + 3] - padding);\n const p30 = scaleFactor * (bezier[i + 4] - padding);\n const p31 = scaleFactor * (bezier[i + 5] - padding);\n path.push([[p0, p1], [p10, p11], [p20, p21], [p30, p31]]);\n p0 = p30;\n p1 = p31;\n }\n const path2D = this.#buildPath2D(path);\n editor.bezierPath2D.push(path2D);\n }\n const bbox = editor.#getBbox();\n editor.#baseWidth = Math.max(_editor.AnnotationEditor.MIN_SIZE, bbox[2] - bbox[0]);\n editor.#baseHeight = Math.max(_editor.AnnotationEditor.MIN_SIZE, bbox[3] - bbox[1]);\n editor.#setScaleFactor(width, height);\n return editor;\n }\n serialize() {\n if (this.isEmpty()) {\n return null;\n }\n const rect = this.getRect(0, 0);\n const color = _editor.AnnotationEditor._colorManager.convert(this.ctx.strokeStyle);\n return {\n annotationType: _util.AnnotationEditorType.INK,\n color,\n thickness: this.thickness,\n opacity: this.opacity,\n paths: this.#serializePaths(this.scaleFactor / this.parentScale, this.translationX, this.translationY, rect),\n pageIndex: this.pageIndex,\n rect,\n rotation: this.rotation,\n structTreeParentId: this._structTreeParentId\n };\n }\n}\nexports.InkEditor = InkEditor;\n\n/***/ }),\n/* 34 */\n/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.StampEditor = void 0;\nvar _util = __w_pdfjs_require__(1);\nvar _editor = __w_pdfjs_require__(4);\nvar _display_utils = __w_pdfjs_require__(6);\nvar _annotation_layer = __w_pdfjs_require__(29);\nclass StampEditor extends _editor.AnnotationEditor {\n #bitmap = null;\n #bitmapId = null;\n #bitmapPromise = null;\n #bitmapUrl = null;\n #bitmapFile = null;\n #canvas = null;\n #observer = null;\n #resizeTimeoutId = null;\n #isSvg = false;\n #hasBeenAddedInUndoStack = false;\n static _type = \"stamp\";\n constructor(params) {\n super({\n ...params,\n name: \"stampEditor\"\n });\n this.#bitmapUrl = params.bitmapUrl;\n this.#bitmapFile = params.bitmapFile;\n }\n static initialize(l10n) {\n _editor.AnnotationEditor.initialize(l10n);\n }\n static get supportedTypes() {\n const types = [\"apng\", \"avif\", \"bmp\", \"gif\", \"jpeg\", \"png\", \"svg+xml\", \"webp\", \"x-icon\"];\n return (0, _util.shadow)(this, \"supportedTypes\", types.map(type => `image/${type}`));\n }\n static get supportedTypesStr() {\n return (0, _util.shadow)(this, \"supportedTypesStr\", this.supportedTypes.join(\",\"));\n }\n static isHandlingMimeForPasting(mime) {\n return this.supportedTypes.includes(mime);\n }\n static paste(item, parent) {\n parent.pasteEditor(_util.AnnotationEditorType.STAMP, {\n bitmapFile: item.getAsFile()\n });\n }\n #getBitmapFetched(data, fromId = false) {\n if (!data) {\n this.remove();\n return;\n }\n this.#bitmap = data.bitmap;\n if (!fromId) {\n this.#bitmapId = data.id;\n this.#isSvg = data.isSvg;\n }\n this.#createCanvas();\n }\n #getBitmapDone() {\n this.#bitmapPromise = null;\n this._uiManager.enableWaiting(false);\n if (this.#canvas) {\n this.div.focus();\n }\n }\n #getBitmap() {\n if (this.#bitmapId) {\n this._uiManager.enableWaiting(true);\n this._uiManager.imageManager.getFromId(this.#bitmapId).then(data => this.#getBitmapFetched(data, true)).finally(() => this.#getBitmapDone());\n return;\n }\n if (this.#bitmapUrl) {\n const url = this.#bitmapUrl;\n this.#bitmapUrl = null;\n this._uiManager.enableWaiting(true);\n this.#bitmapPromise = this._uiManager.imageManager.getFromUrl(url).then(data => this.#getBitmapFetched(data)).finally(() => this.#getBitmapDone());\n return;\n }\n if (this.#bitmapFile) {\n const file = this.#bitmapFile;\n this.#bitmapFile = null;\n this._uiManager.enableWaiting(true);\n this.#bitmapPromise = this._uiManager.imageManager.getFromFile(file).then(data => this.#getBitmapFetched(data)).finally(() => this.#getBitmapDone());\n return;\n }\n const input = document.createElement(\"input\");\n input.type = \"file\";\n input.accept = StampEditor.supportedTypesStr;\n this.#bitmapPromise = new Promise(resolve => {\n input.addEventListener(\"change\", async () => {\n if (!input.files || input.files.length === 0) {\n this.remove();\n } else {\n this._uiManager.enableWaiting(true);\n const data = await this._uiManager.imageManager.getFromFile(input.files[0]);\n this.#getBitmapFetched(data);\n }\n resolve();\n });\n input.addEventListener(\"cancel\", () => {\n this.remove();\n resolve();\n });\n }).finally(() => this.#getBitmapDone());\n input.click();\n }\n remove() {\n if (this.#bitmapId) {\n this.#bitmap = null;\n this._uiManager.imageManager.deleteId(this.#bitmapId);\n this.#canvas?.remove();\n this.#canvas = null;\n this.#observer?.disconnect();\n this.#observer = null;\n }\n super.remove();\n }\n rebuild() {\n if (!this.parent) {\n if (this.#bitmapId) {\n this.#getBitmap();\n }\n return;\n }\n super.rebuild();\n if (this.div === null) {\n return;\n }\n if (this.#bitmapId) {\n this.#getBitmap();\n }\n if (!this.isAttachedToDOM) {\n this.parent.add(this);\n }\n }\n onceAdded() {\n this._isDraggable = true;\n this.div.focus();\n }\n isEmpty() {\n return !(this.#bitmapPromise || this.#bitmap || this.#bitmapUrl || this.#bitmapFile);\n }\n get isResizable() {\n return true;\n }\n render() {\n if (this.div) {\n return this.div;\n }\n let baseX, baseY;\n if (this.width) {\n baseX = this.x;\n baseY = this.y;\n }\n super.render();\n this.div.hidden = true;\n if (this.#bitmap) {\n this.#createCanvas();\n } else {\n this.#getBitmap();\n }\n if (this.width) {\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.setAt(baseX * parentWidth, baseY * parentHeight, this.width * parentWidth, this.height * parentHeight);\n }\n return this.div;\n }\n #createCanvas() {\n const {\n div\n } = this;\n let {\n width,\n height\n } = this.#bitmap;\n const [pageWidth, pageHeight] = this.pageDimensions;\n const MAX_RATIO = 0.75;\n if (this.width) {\n width = this.width * pageWidth;\n height = this.height * pageHeight;\n } else if (width > MAX_RATIO * pageWidth || height > MAX_RATIO * pageHeight) {\n const factor = Math.min(MAX_RATIO * pageWidth / width, MAX_RATIO * pageHeight / height);\n width *= factor;\n height *= factor;\n }\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.setDims(width * parentWidth / pageWidth, height * parentHeight / pageHeight);\n this._uiManager.enableWaiting(false);\n const canvas = this.#canvas = document.createElement(\"canvas\");\n div.append(canvas);\n div.hidden = false;\n this.#drawBitmap(width, height);\n this.#createObserver();\n if (!this.#hasBeenAddedInUndoStack) {\n this.parent.addUndoableEditor(this);\n this.#hasBeenAddedInUndoStack = true;\n }\n this._uiManager._eventBus.dispatch(\"reporttelemetry\", {\n source: this,\n details: {\n type: \"editing\",\n subtype: this.editorType,\n data: {\n action: \"inserted_image\"\n }\n }\n });\n this.addAltTextButton();\n }\n #setDimensions(width, height) {\n const [parentWidth, parentHeight] = this.parentDimensions;\n this.width = width / parentWidth;\n this.height = height / parentHeight;\n this.setDims(width, height);\n if (this._initialOptions?.isCentered) {\n this.center();\n } else {\n this.fixAndSetPosition();\n }\n this._initialOptions = null;\n if (this.#resizeTimeoutId !== null) {\n clearTimeout(this.#resizeTimeoutId);\n }\n const TIME_TO_WAIT = 200;\n this.#resizeTimeoutId = setTimeout(() => {\n this.#resizeTimeoutId = null;\n this.#drawBitmap(width, height);\n }, TIME_TO_WAIT);\n }\n #scaleBitmap(width, height) {\n const {\n width: bitmapWidth,\n height: bitmapHeight\n } = this.#bitmap;\n let newWidth = bitmapWidth;\n let newHeight = bitmapHeight;\n let bitmap = this.#bitmap;\n while (newWidth > 2 * width || newHeight > 2 * height) {\n const prevWidth = newWidth;\n const prevHeight = newHeight;\n if (newWidth > 2 * width) {\n newWidth = newWidth >= 16384 ? Math.floor(newWidth / 2) - 1 : Math.ceil(newWidth / 2);\n }\n if (newHeight > 2 * height) {\n newHeight = newHeight >= 16384 ? Math.floor(newHeight / 2) - 1 : Math.ceil(newHeight / 2);\n }\n const offscreen = new OffscreenCanvas(newWidth, newHeight);\n const ctx = offscreen.getContext(\"2d\");\n ctx.drawImage(bitmap, 0, 0, prevWidth, prevHeight, 0, 0, newWidth, newHeight);\n bitmap = offscreen.transferToImageBitmap();\n }\n return bitmap;\n }\n #drawBitmap(width, height) {\n width = Math.ceil(width);\n height = Math.ceil(height);\n const canvas = this.#canvas;\n if (!canvas || canvas.width === width && canvas.height === height) {\n return;\n }\n canvas.width = width;\n canvas.height = height;\n const bitmap = this.#isSvg ? this.#bitmap : this.#scaleBitmap(width, height);\n const ctx = canvas.getContext(\"2d\");\n ctx.filter = this._uiManager.hcmFilter;\n ctx.drawImage(bitmap, 0, 0, bitmap.width, bitmap.height, 0, 0, width, height);\n }\n #serializeBitmap(toUrl) {\n if (toUrl) {\n if (this.#isSvg) {\n const url = this._uiManager.imageManager.getSvgUrl(this.#bitmapId);\n if (url) {\n return url;\n }\n }\n const canvas = document.createElement(\"canvas\");\n ({\n width: canvas.width,\n height: canvas.height\n } = this.#bitmap);\n const ctx = canvas.getContext(\"2d\");\n ctx.drawImage(this.#bitmap, 0, 0);\n return canvas.toDataURL();\n }\n if (this.#isSvg) {\n const [pageWidth, pageHeight] = this.pageDimensions;\n const width = Math.round(this.width * pageWidth * _display_utils.PixelsPerInch.PDF_TO_CSS_UNITS);\n const height = Math.round(this.height * pageHeight * _display_utils.PixelsPerInch.PDF_TO_CSS_UNITS);\n const offscreen = new OffscreenCanvas(width, height);\n const ctx = offscreen.getContext(\"2d\");\n ctx.drawImage(this.#bitmap, 0, 0, this.#bitmap.width, this.#bitmap.height, 0, 0, width, height);\n return offscreen.transferToImageBitmap();\n }\n return structuredClone(this.#bitmap);\n }\n #createObserver() {\n this.#observer = new ResizeObserver(entries => {\n const rect = entries[0].contentRect;\n if (rect.width && rect.height) {\n this.#setDimensions(rect.width, rect.height);\n }\n });\n this.#observer.observe(this.div);\n }\n static deserialize(data, parent, uiManager) {\n if (data instanceof _annotation_layer.StampAnnotationElement) {\n return null;\n }\n const editor = super.deserialize(data, parent, uiManager);\n const {\n rect,\n bitmapUrl,\n bitmapId,\n isSvg,\n accessibilityData\n } = data;\n if (bitmapId && uiManager.imageManager.isValidId(bitmapId)) {\n editor.#bitmapId = bitmapId;\n } else {\n editor.#bitmapUrl = bitmapUrl;\n }\n editor.#isSvg = isSvg;\n const [parentWidth, parentHeight] = editor.pageDimensions;\n editor.width = (rect[2] - rect[0]) / parentWidth;\n editor.height = (rect[3] - rect[1]) / parentHeight;\n if (accessibilityData) {\n editor.altTextData = accessibilityData;\n }\n return editor;\n }\n serialize(isForCopying = false, context = null) {\n if (this.isEmpty()) {\n return null;\n }\n const serialized = {\n annotationType: _util.AnnotationEditorType.STAMP,\n bitmapId: this.#bitmapId,\n pageIndex: this.pageIndex,\n rect: this.getRect(0, 0),\n rotation: this.rotation,\n isSvg: this.#isSvg,\n structTreeParentId: this._structTreeParentId\n };\n if (isForCopying) {\n serialized.bitmapUrl = this.#serializeBitmap(true);\n serialized.accessibilityData = this.altTextData;\n return serialized;\n }\n const {\n decorative,\n altText\n } = this.altTextData;\n if (!decorative && altText) {\n serialized.accessibilityData = {\n type: \"Figure\",\n alt: altText\n };\n }\n if (context === null) {\n return serialized;\n }\n context.stamps ||= new Map();\n const area = this.#isSvg ? (serialized.rect[2] - serialized.rect[0]) * (serialized.rect[3] - serialized.rect[1]) : null;\n if (!context.stamps.has(this.#bitmapId)) {\n context.stamps.set(this.#bitmapId, {\n area,\n serialized\n });\n serialized.bitmap = this.#serializeBitmap(false);\n } else if (this.#isSvg) {\n const prevData = context.stamps.get(this.#bitmapId);\n if (area > prevData.area) {\n prevData.area = area;\n prevData.serialized.bitmap.close();\n prevData.serialized.bitmap = this.#serializeBitmap(false);\n }\n }\n return serialized;\n }\n}\nexports.StampEditor = StampEditor;\n\n/***/ })\n/******/ \t]);\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __w_pdfjs_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __w_pdfjs_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\nvar __webpack_exports__ = {};\n// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.\n(() => {\nvar exports = __webpack_exports__;\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"AbortException\", ({\n enumerable: true,\n get: function () {\n return _util.AbortException;\n }\n}));\nObject.defineProperty(exports, \"AnnotationEditorLayer\", ({\n enumerable: true,\n get: function () {\n return _annotation_editor_layer.AnnotationEditorLayer;\n }\n}));\nObject.defineProperty(exports, \"AnnotationEditorParamsType\", ({\n enumerable: true,\n get: function () {\n return _util.AnnotationEditorParamsType;\n }\n}));\nObject.defineProperty(exports, \"AnnotationEditorType\", ({\n enumerable: true,\n get: function () {\n return _util.AnnotationEditorType;\n }\n}));\nObject.defineProperty(exports, \"AnnotationEditorUIManager\", ({\n enumerable: true,\n get: function () {\n return _tools.AnnotationEditorUIManager;\n }\n}));\nObject.defineProperty(exports, \"AnnotationLayer\", ({\n enumerable: true,\n get: function () {\n return _annotation_layer.AnnotationLayer;\n }\n}));\nObject.defineProperty(exports, \"AnnotationMode\", ({\n enumerable: true,\n get: function () {\n return _util.AnnotationMode;\n }\n}));\nObject.defineProperty(exports, \"CMapCompressionType\", ({\n enumerable: true,\n get: function () {\n return _util.CMapCompressionType;\n }\n}));\nObject.defineProperty(exports, \"DOMSVGFactory\", ({\n enumerable: true,\n get: function () {\n return _display_utils.DOMSVGFactory;\n }\n}));\nObject.defineProperty(exports, \"FeatureTest\", ({\n enumerable: true,\n get: function () {\n return _util.FeatureTest;\n }\n}));\nObject.defineProperty(exports, \"GlobalWorkerOptions\", ({\n enumerable: true,\n get: function () {\n return _worker_options.GlobalWorkerOptions;\n }\n}));\nObject.defineProperty(exports, \"ImageKind\", ({\n enumerable: true,\n get: function () {\n return _util.ImageKind;\n }\n}));\nObject.defineProperty(exports, \"InvalidPDFException\", ({\n enumerable: true,\n get: function () {\n return _util.InvalidPDFException;\n }\n}));\nObject.defineProperty(exports, \"MissingPDFException\", ({\n enumerable: true,\n get: function () {\n return _util.MissingPDFException;\n }\n}));\nObject.defineProperty(exports, \"OPS\", ({\n enumerable: true,\n get: function () {\n return _util.OPS;\n }\n}));\nObject.defineProperty(exports, \"PDFDataRangeTransport\", ({\n enumerable: true,\n get: function () {\n return _api.PDFDataRangeTransport;\n }\n}));\nObject.defineProperty(exports, \"PDFDateString\", ({\n enumerable: true,\n get: function () {\n return _display_utils.PDFDateString;\n }\n}));\nObject.defineProperty(exports, \"PDFWorker\", ({\n enumerable: true,\n get: function () {\n return _api.PDFWorker;\n }\n}));\nObject.defineProperty(exports, \"PasswordResponses\", ({\n enumerable: true,\n get: function () {\n return _util.PasswordResponses;\n }\n}));\nObject.defineProperty(exports, \"PermissionFlag\", ({\n enumerable: true,\n get: function () {\n return _util.PermissionFlag;\n }\n}));\nObject.defineProperty(exports, \"PixelsPerInch\", ({\n enumerable: true,\n get: function () {\n return _display_utils.PixelsPerInch;\n }\n}));\nObject.defineProperty(exports, \"PromiseCapability\", ({\n enumerable: true,\n get: function () {\n return _util.PromiseCapability;\n }\n}));\nObject.defineProperty(exports, \"RenderingCancelledException\", ({\n enumerable: true,\n get: function () {\n return _display_utils.RenderingCancelledException;\n }\n}));\nObject.defineProperty(exports, \"SVGGraphics\", ({\n enumerable: true,\n get: function () {\n return _api.SVGGraphics;\n }\n}));\nObject.defineProperty(exports, \"UnexpectedResponseException\", ({\n enumerable: true,\n get: function () {\n return _util.UnexpectedResponseException;\n }\n}));\nObject.defineProperty(exports, \"Util\", ({\n enumerable: true,\n get: function () {\n return _util.Util;\n }\n}));\nObject.defineProperty(exports, \"VerbosityLevel\", ({\n enumerable: true,\n get: function () {\n return _util.VerbosityLevel;\n }\n}));\nObject.defineProperty(exports, \"XfaLayer\", ({\n enumerable: true,\n get: function () {\n return _xfa_layer.XfaLayer;\n }\n}));\nObject.defineProperty(exports, \"build\", ({\n enumerable: true,\n get: function () {\n return _api.build;\n }\n}));\nObject.defineProperty(exports, \"createValidAbsoluteUrl\", ({\n enumerable: true,\n get: function () {\n return _util.createValidAbsoluteUrl;\n }\n}));\nObject.defineProperty(exports, \"getDocument\", ({\n enumerable: true,\n get: function () {\n return _api.getDocument;\n }\n}));\nObject.defineProperty(exports, \"getFilenameFromUrl\", ({\n enumerable: true,\n get: function () {\n return _display_utils.getFilenameFromUrl;\n }\n}));\nObject.defineProperty(exports, \"getPdfFilenameFromUrl\", ({\n enumerable: true,\n get: function () {\n return _display_utils.getPdfFilenameFromUrl;\n }\n}));\nObject.defineProperty(exports, \"getXfaPageViewport\", ({\n enumerable: true,\n get: function () {\n return _display_utils.getXfaPageViewport;\n }\n}));\nObject.defineProperty(exports, \"isDataScheme\", ({\n enumerable: true,\n get: function () {\n return _display_utils.isDataScheme;\n }\n}));\nObject.defineProperty(exports, \"isPdfFile\", ({\n enumerable: true,\n get: function () {\n return _display_utils.isPdfFile;\n }\n}));\nObject.defineProperty(exports, \"loadScript\", ({\n enumerable: true,\n get: function () {\n return _display_utils.loadScript;\n }\n}));\nObject.defineProperty(exports, \"noContextMenu\", ({\n enumerable: true,\n get: function () {\n return _display_utils.noContextMenu;\n }\n}));\nObject.defineProperty(exports, \"normalizeUnicode\", ({\n enumerable: true,\n get: function () {\n return _util.normalizeUnicode;\n }\n}));\nObject.defineProperty(exports, \"renderTextLayer\", ({\n enumerable: true,\n get: function () {\n return _text_layer.renderTextLayer;\n }\n}));\nObject.defineProperty(exports, \"setLayerDimensions\", ({\n enumerable: true,\n get: function () {\n return _display_utils.setLayerDimensions;\n }\n}));\nObject.defineProperty(exports, \"shadow\", ({\n enumerable: true,\n get: function () {\n return _util.shadow;\n }\n}));\nObject.defineProperty(exports, \"updateTextLayer\", ({\n enumerable: true,\n get: function () {\n return _text_layer.updateTextLayer;\n }\n}));\nObject.defineProperty(exports, \"version\", ({\n enumerable: true,\n get: function () {\n return _api.version;\n }\n}));\nvar _util = __w_pdfjs_require__(1);\nvar _api = __w_pdfjs_require__(2);\nvar _display_utils = __w_pdfjs_require__(6);\nvar _text_layer = __w_pdfjs_require__(26);\nvar _annotation_editor_layer = __w_pdfjs_require__(27);\nvar _tools = __w_pdfjs_require__(5);\nvar _annotation_layer = __w_pdfjs_require__(29);\nvar _worker_options = __w_pdfjs_require__(14);\nvar _xfa_layer = __w_pdfjs_require__(32);\nconst pdfjsVersion = '3.11.174';\nconst pdfjsBuild = 'ce8716743';\n})();\n\n/******/ \treturn __webpack_exports__;\n/******/ })()\n;\n});\n//# sourceMappingURL=pdf.js.map"],"x_google_ignoreList":[1],"mappings":"yIAAA,EAAO,QAAU,CAAC,oDCsBjB,SAA0C,EAAM,EAAS,CACtD,OAAO,SAAY,UAAY,OAAO,QAAW,SACnD,OAAO,QAA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