diff --git a/package.json b/package.json index 74339f9..9a630d1 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,6 @@ "bootstrap": "^5.1.3", "bootstrap-icons": "^1.6.1", "core-js": "^3.6.5", - "pdfjs-dist": "^2.10.377", "vue": "^3.0.0" }, "devDependencies": { diff --git a/public/gdb.pdf b/public/gdb.pdf new file mode 100644 index 0000000..5798bb8 Binary files /dev/null and b/public/gdb.pdf differ diff --git a/public/pdfjs/LICENSE b/public/pdfjs/LICENSE new file mode 100644 index 0000000..f433b1a --- /dev/null +++ b/public/pdfjs/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/public/pdfjs/build/pdf.js b/public/pdfjs/build/pdf.js new file mode 100644 index 0000000..65a2e1c --- /dev/null +++ b/public/pdfjs/build/pdf.js @@ -0,0 +1,25991 @@ +/** + * @licstart The following is the entire license notice for the + * Javascript code in this page + * + * Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @licend The above is the entire license notice for the + * Javascript code in this page + */ + +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(); + else if(typeof define === 'function' && define.amd) + define("pdfjs-dist/build/pdf", [], factory); + else if(typeof exports === 'object') + exports["pdfjs-dist/build/pdf"] = factory(); + else + root["pdfjs-dist/build/pdf"] = root.pdfjsLib = factory(); +})(this, function() { +return /******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ([ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.addLinkAttributes = addLinkAttributes; +exports.deprecated = deprecated; +exports.getFilenameFromUrl = getFilenameFromUrl; +exports.getPdfFilenameFromUrl = getPdfFilenameFromUrl; +exports.getXfaPageViewport = getXfaPageViewport; +exports.isDataScheme = isDataScheme; +exports.isPdfFile = isPdfFile; +exports.isValidFetchUrl = isValidFetchUrl; +exports.loadScript = loadScript; +exports.StatTimer = exports.RenderingCancelledException = exports.PDFDateString = exports.PageViewport = exports.LinkTarget = exports.DOMSVGFactory = exports.DOMStandardFontDataFactory = exports.DOMCMapReaderFactory = exports.DOMCanvasFactory = exports.DEFAULT_LINK_REL = void 0; + +var _regenerator = _interopRequireDefault(__w_pdfjs_require__(2)); + +var _util = __w_pdfjs_require__(4); + +var _base_factory = __w_pdfjs_require__(114); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +var DEFAULT_LINK_REL = "noopener noreferrer nofollow"; +exports.DEFAULT_LINK_REL = DEFAULT_LINK_REL; +var SVG_NS = "http://www.w3.org/2000/svg"; + +var DOMCanvasFactory = /*#__PURE__*/function (_BaseCanvasFactory) { + _inherits(DOMCanvasFactory, _BaseCanvasFactory); + + var _super = _createSuper(DOMCanvasFactory); + + function DOMCanvasFactory() { + var _this; + + var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + _ref$ownerDocument = _ref.ownerDocument, + ownerDocument = _ref$ownerDocument === void 0 ? globalThis.document : _ref$ownerDocument; + + _classCallCheck(this, DOMCanvasFactory); + + _this = _super.call(this); + _this._document = ownerDocument; + return _this; + } + + _createClass(DOMCanvasFactory, [{ + key: "_createCanvas", + value: function _createCanvas(width, height) { + var canvas = this._document.createElement("canvas"); + + canvas.width = width; + canvas.height = height; + return canvas; + } + }]); + + return DOMCanvasFactory; +}(_base_factory.BaseCanvasFactory); + +exports.DOMCanvasFactory = DOMCanvasFactory; + +function fetchData(_x) { + return _fetchData.apply(this, arguments); +} + +function _fetchData() { + _fetchData = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee(url) { + var asTypedArray, + response, + _args = arguments; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + asTypedArray = _args.length > 1 && _args[1] !== undefined ? _args[1] : false; + + if (!isValidFetchUrl(url, document.baseURI)) { + _context.next = 21; + break; + } + + _context.next = 4; + return fetch(url); + + case 4: + response = _context.sent; + + if (response.ok) { + _context.next = 7; + break; + } + + throw new Error(response.statusText); + + case 7: + if (!asTypedArray) { + _context.next = 15; + break; + } + + _context.t1 = Uint8Array; + _context.next = 11; + return response.arrayBuffer(); + + case 11: + _context.t2 = _context.sent; + _context.t0 = new _context.t1(_context.t2); + _context.next = 20; + break; + + case 15: + _context.t3 = _util.stringToBytes; + _context.next = 18; + return response.text(); + + case 18: + _context.t4 = _context.sent; + _context.t0 = (0, _context.t3)(_context.t4); + + case 20: + return _context.abrupt("return", _context.t0); + + case 21: + return _context.abrupt("return", new Promise(function (resolve, reject) { + var request = new XMLHttpRequest(); + request.open("GET", url, true); + + if (asTypedArray) { + request.responseType = "arraybuffer"; + } + + request.onreadystatechange = function () { + if (request.readyState !== XMLHttpRequest.DONE) { + return; + } + + if (request.status === 200 || request.status === 0) { + var data; + + if (asTypedArray && request.response) { + data = new Uint8Array(request.response); + } else if (!asTypedArray && request.responseText) { + data = (0, _util.stringToBytes)(request.responseText); + } + + if (data) { + resolve(data); + return; + } + } + + reject(new Error(request.statusText)); + }; + + request.send(null); + })); + + case 22: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + return _fetchData.apply(this, arguments); +} + +var DOMCMapReaderFactory = /*#__PURE__*/function (_BaseCMapReaderFactor) { + _inherits(DOMCMapReaderFactory, _BaseCMapReaderFactor); + + var _super2 = _createSuper(DOMCMapReaderFactory); + + function DOMCMapReaderFactory() { + _classCallCheck(this, DOMCMapReaderFactory); + + return _super2.apply(this, arguments); + } + + _createClass(DOMCMapReaderFactory, [{ + key: "_fetchData", + value: function _fetchData(url, compressionType) { + return fetchData(url, this.isCompressed).then(function (data) { + return { + cMapData: data, + compressionType: compressionType + }; + }); + } + }]); + + return DOMCMapReaderFactory; +}(_base_factory.BaseCMapReaderFactory); + +exports.DOMCMapReaderFactory = DOMCMapReaderFactory; + +var DOMStandardFontDataFactory = /*#__PURE__*/function (_BaseStandardFontData) { + _inherits(DOMStandardFontDataFactory, _BaseStandardFontData); + + var _super3 = _createSuper(DOMStandardFontDataFactory); + + function DOMStandardFontDataFactory() { + _classCallCheck(this, DOMStandardFontDataFactory); + + return _super3.apply(this, arguments); + } + + _createClass(DOMStandardFontDataFactory, [{ + key: "_fetchData", + value: function _fetchData(url) { + return fetchData(url, true); + } + }]); + + return DOMStandardFontDataFactory; +}(_base_factory.BaseStandardFontDataFactory); + +exports.DOMStandardFontDataFactory = DOMStandardFontDataFactory; + +var DOMSVGFactory = /*#__PURE__*/function (_BaseSVGFactory) { + _inherits(DOMSVGFactory, _BaseSVGFactory); + + var _super4 = _createSuper(DOMSVGFactory); + + function DOMSVGFactory() { + _classCallCheck(this, DOMSVGFactory); + + return _super4.apply(this, arguments); + } + + _createClass(DOMSVGFactory, [{ + key: "_createSVG", + value: function _createSVG(type) { + return document.createElementNS(SVG_NS, type); + } + }]); + + return DOMSVGFactory; +}(_base_factory.BaseSVGFactory); + +exports.DOMSVGFactory = DOMSVGFactory; + +var PageViewport = /*#__PURE__*/function () { + function PageViewport(_ref2) { + var viewBox = _ref2.viewBox, + scale = _ref2.scale, + rotation = _ref2.rotation, + _ref2$offsetX = _ref2.offsetX, + offsetX = _ref2$offsetX === void 0 ? 0 : _ref2$offsetX, + _ref2$offsetY = _ref2.offsetY, + offsetY = _ref2$offsetY === void 0 ? 0 : _ref2$offsetY, + _ref2$dontFlip = _ref2.dontFlip, + dontFlip = _ref2$dontFlip === void 0 ? false : _ref2$dontFlip; + + _classCallCheck(this, PageViewport); + + this.viewBox = viewBox; + this.scale = scale; + this.rotation = rotation; + this.offsetX = offsetX; + this.offsetY = offsetY; + var centerX = (viewBox[2] + viewBox[0]) / 2; + var centerY = (viewBox[3] + viewBox[1]) / 2; + var rotateA, rotateB, rotateC, rotateD; + rotation %= 360; + + if (rotation < 0) { + rotation += 360; + } + + switch (rotation) { + case 180: + rotateA = -1; + rotateB = 0; + rotateC = 0; + rotateD = 1; + break; + + case 90: + rotateA = 0; + rotateB = 1; + rotateC = 1; + rotateD = 0; + break; + + case 270: + rotateA = 0; + rotateB = -1; + rotateC = -1; + rotateD = 0; + break; + + case 0: + rotateA = 1; + rotateB = 0; + rotateC = 0; + rotateD = -1; + break; + + default: + throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees."); + } + + if (dontFlip) { + rotateC = -rotateC; + rotateD = -rotateD; + } + + var offsetCanvasX, offsetCanvasY; + var width, height; + + if (rotateA === 0) { + offsetCanvasX = Math.abs(centerY - viewBox[1]) * scale + offsetX; + offsetCanvasY = Math.abs(centerX - viewBox[0]) * scale + offsetY; + width = Math.abs(viewBox[3] - viewBox[1]) * scale; + height = Math.abs(viewBox[2] - viewBox[0]) * scale; + } else { + offsetCanvasX = Math.abs(centerX - viewBox[0]) * scale + offsetX; + offsetCanvasY = Math.abs(centerY - viewBox[1]) * scale + offsetY; + width = Math.abs(viewBox[2] - viewBox[0]) * scale; + height = Math.abs(viewBox[3] - viewBox[1]) * scale; + } + + this.transform = [rotateA * scale, rotateB * scale, rotateC * scale, rotateD * scale, offsetCanvasX - rotateA * scale * centerX - rotateC * scale * centerY, offsetCanvasY - rotateB * scale * centerX - rotateD * scale * centerY]; + this.width = width; + this.height = height; + } + + _createClass(PageViewport, [{ + key: "clone", + value: function clone() { + var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + _ref3$scale = _ref3.scale, + scale = _ref3$scale === void 0 ? this.scale : _ref3$scale, + _ref3$rotation = _ref3.rotation, + rotation = _ref3$rotation === void 0 ? this.rotation : _ref3$rotation, + _ref3$offsetX = _ref3.offsetX, + offsetX = _ref3$offsetX === void 0 ? this.offsetX : _ref3$offsetX, + _ref3$offsetY = _ref3.offsetY, + offsetY = _ref3$offsetY === void 0 ? this.offsetY : _ref3$offsetY, + _ref3$dontFlip = _ref3.dontFlip, + dontFlip = _ref3$dontFlip === void 0 ? false : _ref3$dontFlip; + + return new PageViewport({ + viewBox: this.viewBox.slice(), + scale: scale, + rotation: rotation, + offsetX: offsetX, + offsetY: offsetY, + dontFlip: dontFlip + }); + } + }, { + key: "convertToViewportPoint", + value: function convertToViewportPoint(x, y) { + return _util.Util.applyTransform([x, y], this.transform); + } + }, { + key: "convertToViewportRectangle", + value: function convertToViewportRectangle(rect) { + var topLeft = _util.Util.applyTransform([rect[0], rect[1]], this.transform); + + var bottomRight = _util.Util.applyTransform([rect[2], rect[3]], this.transform); + + return [topLeft[0], topLeft[1], bottomRight[0], bottomRight[1]]; + } + }, { + key: "convertToPdfPoint", + value: function convertToPdfPoint(x, y) { + return _util.Util.applyInverseTransform([x, y], this.transform); + } + }]); + + return PageViewport; +}(); + +exports.PageViewport = PageViewport; + +var RenderingCancelledException = /*#__PURE__*/function (_BaseException) { + _inherits(RenderingCancelledException, _BaseException); + + var _super5 = _createSuper(RenderingCancelledException); + + function RenderingCancelledException(msg, type) { + var _this2; + + _classCallCheck(this, RenderingCancelledException); + + _this2 = _super5.call(this, msg); + _this2.type = type; + return _this2; + } + + return RenderingCancelledException; +}(_util.BaseException); + +exports.RenderingCancelledException = RenderingCancelledException; +var LinkTarget = { + NONE: 0, + SELF: 1, + BLANK: 2, + PARENT: 3, + TOP: 4 +}; +exports.LinkTarget = LinkTarget; + +function addLinkAttributes(link) { + var _ref4 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + url = _ref4.url, + target = _ref4.target, + rel = _ref4.rel, + _ref4$enabled = _ref4.enabled, + enabled = _ref4$enabled === void 0 ? true : _ref4$enabled; + + (0, _util.assert)(url && typeof url === "string", 'addLinkAttributes: A valid "url" parameter must provided.'); + var urlNullRemoved = (0, _util.removeNullCharacters)(url); + + if (enabled) { + link.href = link.title = urlNullRemoved; + } else { + link.href = ""; + link.title = "Disabled: ".concat(urlNullRemoved); + + link.onclick = function () { + return false; + }; + } + + var targetStr = ""; + + switch (target) { + case LinkTarget.NONE: + break; + + case LinkTarget.SELF: + targetStr = "_self"; + break; + + case LinkTarget.BLANK: + targetStr = "_blank"; + break; + + case LinkTarget.PARENT: + targetStr = "_parent"; + break; + + case LinkTarget.TOP: + targetStr = "_top"; + break; + } + + link.target = targetStr; + link.rel = typeof rel === "string" ? rel : DEFAULT_LINK_REL; +} + +function isDataScheme(url) { + var ii = url.length; + var i = 0; + + while (i < ii && url[i].trim() === "") { + i++; + } + + return url.substring(i, i + 5).toLowerCase() === "data:"; +} + +function isPdfFile(filename) { + return typeof filename === "string" && /\.pdf$/i.test(filename); +} + +function getFilenameFromUrl(url) { + var anchor = url.indexOf("#"); + var query = url.indexOf("?"); + var end = Math.min(anchor > 0 ? anchor : url.length, query > 0 ? query : url.length); + return url.substring(url.lastIndexOf("/", end) + 1, end); +} + +function getPdfFilenameFromUrl(url) { + var defaultFilename = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "document.pdf"; + + if (typeof url !== "string") { + return defaultFilename; + } + + if (isDataScheme(url)) { + (0, _util.warn)('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'); + return defaultFilename; + } + + var reURI = /^(?:(?:[^:]+:)?\/\/[^/]+)?([^?#]*)(\?[^#]*)?(#.*)?$/; + var reFilename = /[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i; + var splitURI = reURI.exec(url); + var suggestedFilename = reFilename.exec(splitURI[1]) || reFilename.exec(splitURI[2]) || reFilename.exec(splitURI[3]); + + if (suggestedFilename) { + suggestedFilename = suggestedFilename[0]; + + if (suggestedFilename.includes("%")) { + try { + suggestedFilename = reFilename.exec(decodeURIComponent(suggestedFilename))[0]; + } catch (ex) {} + } + } + + return suggestedFilename || defaultFilename; +} + +var StatTimer = /*#__PURE__*/function () { + function StatTimer() { + _classCallCheck(this, StatTimer); + + this.started = Object.create(null); + this.times = []; + } + + _createClass(StatTimer, [{ + key: "time", + value: function time(name) { + if (name in this.started) { + (0, _util.warn)("Timer is already running for ".concat(name)); + } + + this.started[name] = Date.now(); + } + }, { + key: "timeEnd", + value: function timeEnd(name) { + if (!(name in this.started)) { + (0, _util.warn)("Timer has not been started for ".concat(name)); + } + + this.times.push({ + name: name, + start: this.started[name], + end: Date.now() + }); + delete this.started[name]; + } + }, { + key: "toString", + value: function toString() { + var outBuf = []; + var longest = 0; + + var _iterator = _createForOfIteratorHelper(this.times), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var time = _step.value; + var name = time.name; + + if (name.length > longest) { + longest = name.length; + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + var _iterator2 = _createForOfIteratorHelper(this.times), + _step2; + + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + var _time = _step2.value; + var duration = _time.end - _time.start; + outBuf.push("".concat(_time.name.padEnd(longest), " ").concat(duration, "ms\n")); + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + + return outBuf.join(""); + } + }]); + + return StatTimer; +}(); + +exports.StatTimer = StatTimer; + +function isValidFetchUrl(url, baseUrl) { + try { + var _ref5 = baseUrl ? new URL(url, baseUrl) : new URL(url), + protocol = _ref5.protocol; + + return protocol === "http:" || protocol === "https:"; + } catch (ex) { + return false; + } +} + +function loadScript(src) { + var removeScriptElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + return new Promise(function (resolve, reject) { + var script = document.createElement("script"); + script.src = src; + + script.onload = function (evt) { + if (removeScriptElement) { + script.remove(); + } + + resolve(evt); + }; + + script.onerror = function () { + reject(new Error("Cannot load script at: ".concat(script.src))); + }; + + (document.head || document.documentElement).appendChild(script); + }); +} + +function deprecated(details) { + console.log("Deprecated API usage: " + details); +} + +var pdfDateStringRegex; + +var PDFDateString = /*#__PURE__*/function () { + function PDFDateString() { + _classCallCheck(this, PDFDateString); + } + + _createClass(PDFDateString, null, [{ + key: "toDateObject", + value: function toDateObject(input) { + if (!input || !(0, _util.isString)(input)) { + return null; + } + + if (!pdfDateStringRegex) { + pdfDateStringRegex = new RegExp("^D:" + "(\\d{4})" + "(\\d{2})?" + "(\\d{2})?" + "(\\d{2})?" + "(\\d{2})?" + "(\\d{2})?" + "([Z|+|-])?" + "(\\d{2})?" + "'?" + "(\\d{2})?" + "'?"); + } + + var matches = pdfDateStringRegex.exec(input); + + if (!matches) { + return null; + } + + var year = parseInt(matches[1], 10); + var month = parseInt(matches[2], 10); + month = month >= 1 && month <= 12 ? month - 1 : 0; + var day = parseInt(matches[3], 10); + day = day >= 1 && day <= 31 ? day : 1; + var hour = parseInt(matches[4], 10); + hour = hour >= 0 && hour <= 23 ? hour : 0; + var minute = parseInt(matches[5], 10); + minute = minute >= 0 && minute <= 59 ? minute : 0; + var second = parseInt(matches[6], 10); + second = second >= 0 && second <= 59 ? second : 0; + var universalTimeRelation = matches[7] || "Z"; + var offsetHour = parseInt(matches[8], 10); + offsetHour = offsetHour >= 0 && offsetHour <= 23 ? offsetHour : 0; + var offsetMinute = parseInt(matches[9], 10) || 0; + offsetMinute = offsetMinute >= 0 && offsetMinute <= 59 ? offsetMinute : 0; + + if (universalTimeRelation === "-") { + hour += offsetHour; + minute += offsetMinute; + } else if (universalTimeRelation === "+") { + hour -= offsetHour; + minute -= offsetMinute; + } + + return new Date(Date.UTC(year, month, day, hour, minute, second)); + } + }]); + + return PDFDateString; +}(); + +exports.PDFDateString = PDFDateString; + +function getXfaPageViewport(xfaPage, _ref6) { + var _ref6$scale = _ref6.scale, + scale = _ref6$scale === void 0 ? 1 : _ref6$scale, + _ref6$rotation = _ref6.rotation, + rotation = _ref6$rotation === void 0 ? 0 : _ref6$rotation; + var _xfaPage$attributes$s = xfaPage.attributes.style, + width = _xfaPage$attributes$s.width, + height = _xfaPage$attributes$s.height; + var viewBox = [0, 0, parseInt(width), parseInt(height)]; + return new PageViewport({ + viewBox: viewBox, + scale: scale, + rotation: rotation + }); +} + +/***/ }), +/* 2 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +"use strict"; + + +module.exports = __w_pdfjs_require__(3); + +/***/ }), +/* 3 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +"use strict"; +/* module decorator */ module = __w_pdfjs_require__.nmd(module); + + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +var runtime = function (exports) { + "use strict"; + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + function define(obj, key, value) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + return obj[key]; + } + + try { + define({}, ""); + } catch (err) { + define = function define(obj, key, value) { + return obj[key] = value; + }; + } + + function wrap(innerFn, outerFn, self, tryLocsList) { + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + generator._invoke = makeInvokeMethod(innerFn, self, context); + return generator; + } + + exports.wrap = wrap; + + function tryCatch(fn, obj, arg) { + try { + return { + type: "normal", + arg: fn.call(obj, arg) + }; + } catch (err) { + return { + type: "throw", + arg: err + }; + } + } + + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; + var ContinueSentinel = {}; + + function Generator() {} + + function GeneratorFunction() {} + + function GeneratorFunctionPrototype() {} + + var IteratorPrototype = {}; + define(IteratorPrototype, iteratorSymbol, function () { + return this; + }); + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + + if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = GeneratorFunctionPrototype; + define(Gp, "constructor", GeneratorFunctionPrototype); + define(GeneratorFunctionPrototype, "constructor", GeneratorFunction); + GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"); + + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function (method) { + define(prototype, method, function (arg) { + return this._invoke(method, arg); + }); + }); + } + + exports.isGeneratorFunction = function (genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor ? ctor === GeneratorFunction || (ctor.displayName || ctor.name) === "GeneratorFunction" : false; + }; + + exports.mark = function (genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + define(genFun, toStringTagSymbol, "GeneratorFunction"); + } + + genFun.prototype = Object.create(Gp); + return genFun; + }; + + exports.awrap = function (arg) { + return { + __await: arg + }; + }; + + function AsyncIterator(generator, PromiseImpl) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + + if (value && _typeof(value) === "object" && hasOwn.call(value, "__await")) { + return PromiseImpl.resolve(value.__await).then(function (value) { + invoke("next", value, resolve, reject); + }, function (err) { + invoke("throw", err, resolve, reject); + }); + } + + return PromiseImpl.resolve(value).then(function (unwrapped) { + result.value = unwrapped; + resolve(result); + }, function (error) { + return invoke("throw", error, resolve, reject); + }); + } + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new PromiseImpl(function (resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); + } + + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + define(AsyncIterator.prototype, asyncIteratorSymbol, function () { + return this; + }); + exports.AsyncIterator = AsyncIterator; + + exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { + if (PromiseImpl === void 0) PromiseImpl = Promise; + var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); + return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } + + if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; + } + + return doneResult(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === "next") { + context.sent = context._sent = context.arg; + } else if (context.method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + } else if (context.method === "return") { + context.abrupt("return", context.arg); + } + + state = GenStateExecuting; + var record = tryCatch(innerFn, self, context); + + if (record.type === "normal") { + state = context.done ? GenStateCompleted : GenStateSuspendedYield; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done + }; + } else if (record.type === "throw") { + state = GenStateCompleted; + context.method = "throw"; + context.arg = record.arg; + } + } + }; + } + + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + + if (method === undefined) { + context.delegate = null; + + if (context.method === "throw") { + if (delegate.iterator["return"]) { + context.method = "return"; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + + if (context.method === "throw") { + return ContinueSentinel; + } + } + + context.method = "throw"; + context.arg = new TypeError("The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === "throw") { + context.method = "throw"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (!info) { + context.method = "throw"; + context.arg = new TypeError("iterator result is not an object"); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + context[delegate.resultName] = info.value; + context.next = delegate.nextLoc; + + if (context.method !== "return") { + context.method = "next"; + context.arg = undefined; + } + } else { + return info; + } + + context.delegate = null; + return ContinueSentinel; + } + + defineIteratorMethods(Gp); + define(Gp, toStringTagSymbol, "Generator"); + define(Gp, iteratorSymbol, function () { + return this; + }); + define(Gp, "toString", function () { + return "[object Generator]"; + }); + + function pushTryEntry(locs) { + var entry = { + tryLoc: locs[0] + }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + this.tryEntries = [{ + tryLoc: "root" + }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + exports.keys = function (object) { + var keys = []; + + for (var key in object) { + keys.push(key); + } + + keys.reverse(); + return function next() { + while (keys.length) { + var key = keys.pop(); + + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === "function") { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, + next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + return next; + }; + + return next.next = next; + } + } + + return { + next: doneResult + }; + } + + exports.values = values; + + function doneResult() { + return { + value: undefined, + done: true + }; + } + + Context.prototype = { + constructor: Context, + reset: function reset(skipTempReset) { + this.prev = 0; + this.next = 0; + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + this.method = "next"; + this.arg = undefined; + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + stop: function stop() { + this.done = true; + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + + return this.rval; + }, + dispatchException: function dispatchException(exception) { + if (this.done) { + throw exception; + } + + var context = this; + + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + + if (caught) { + context.method = "next"; + context.arg = undefined; + } + + return !!caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === "root") { + return handle("end"); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, + abrupt: function abrupt(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + + if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.method = "next"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + complete: function complete(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } + + if (record.type === "break" || record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = this.arg = record.arg; + this.method = "return"; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + finish: function finish(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + "catch": function _catch(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + + return thrown; + } + } + + throw new Error("illegal catch attempt"); + }, + delegateYield: function delegateYield(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + + if (this.method === "next") { + this.arg = undefined; + } + + return ContinueSentinel; + } + }; + return exports; +}(( false ? 0 : _typeof(module)) === "object" ? module.exports : {}); + +try { + regeneratorRuntime = runtime; +} catch (accidentalStrictMode) { + if ((typeof globalThis === "undefined" ? "undefined" : _typeof(globalThis)) === "object") { + globalThis.regeneratorRuntime = runtime; + } else { + Function("r", "regeneratorRuntime = r")(runtime); + } +} + +/***/ }), +/* 4 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.arrayByteLength = arrayByteLength; +exports.arraysToBytes = arraysToBytes; +exports.assert = assert; +exports.bytesToString = bytesToString; +exports.createObjectURL = createObjectURL; +exports.createPromiseCapability = createPromiseCapability; +exports.createValidAbsoluteUrl = createValidAbsoluteUrl; +exports.escapeString = escapeString; +exports.getModificationDate = getModificationDate; +exports.getVerbosityLevel = getVerbosityLevel; +exports.info = info; +exports.isArrayBuffer = isArrayBuffer; +exports.isArrayEqual = isArrayEqual; +exports.isAscii = isAscii; +exports.isBool = isBool; +exports.isNum = isNum; +exports.isSameOrigin = isSameOrigin; +exports.isString = isString; +exports.objectFromMap = objectFromMap; +exports.objectSize = objectSize; +exports.removeNullCharacters = removeNullCharacters; +exports.setVerbosityLevel = setVerbosityLevel; +exports.shadow = shadow; +exports.string32 = string32; +exports.stringToBytes = stringToBytes; +exports.stringToPDFString = stringToPDFString; +exports.stringToUTF16BEString = stringToUTF16BEString; +exports.stringToUTF8String = stringToUTF8String; +exports.unreachable = unreachable; +exports.utf8StringToString = utf8StringToString; +exports.warn = warn; +exports.VerbosityLevel = exports.Util = exports.UNSUPPORTED_FEATURES = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.PermissionFlag = exports.PasswordResponses = exports.PasswordException = exports.PageActionEventType = exports.OPS = exports.MissingPDFException = exports.IsLittleEndianCached = exports.IsEvalSupportedCached = exports.InvalidPDFException = exports.ImageKind = exports.IDENTITY_MATRIX = exports.FormatError = exports.FontType = exports.FONT_IDENTITY_MATRIX = exports.DocumentActionEventType = exports.CMapCompressionType = exports.BaseException = exports.AnnotationType = exports.AnnotationStateModelType = exports.AnnotationReviewState = exports.AnnotationReplyType = exports.AnnotationMarkedState = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.AnnotationActionEventType = exports.AbortException = void 0; + +__w_pdfjs_require__(5); + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } + +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } + +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +var IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0]; +exports.IDENTITY_MATRIX = IDENTITY_MATRIX; +var FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0]; +exports.FONT_IDENTITY_MATRIX = FONT_IDENTITY_MATRIX; +var PermissionFlag = { + PRINT: 0x04, + MODIFY_CONTENTS: 0x08, + COPY: 0x10, + MODIFY_ANNOTATIONS: 0x20, + FILL_INTERACTIVE_FORMS: 0x100, + COPY_FOR_ACCESSIBILITY: 0x200, + ASSEMBLE: 0x400, + PRINT_HIGH_QUALITY: 0x800 +}; +exports.PermissionFlag = PermissionFlag; +var TextRenderingMode = { + FILL: 0, + STROKE: 1, + FILL_STROKE: 2, + INVISIBLE: 3, + FILL_ADD_TO_PATH: 4, + STROKE_ADD_TO_PATH: 5, + FILL_STROKE_ADD_TO_PATH: 6, + ADD_TO_PATH: 7, + FILL_STROKE_MASK: 3, + ADD_TO_PATH_FLAG: 4 +}; +exports.TextRenderingMode = TextRenderingMode; +var ImageKind = { + GRAYSCALE_1BPP: 1, + RGB_24BPP: 2, + RGBA_32BPP: 3 +}; +exports.ImageKind = ImageKind; +var AnnotationType = { + TEXT: 1, + LINK: 2, + FREETEXT: 3, + LINE: 4, + SQUARE: 5, + CIRCLE: 6, + POLYGON: 7, + POLYLINE: 8, + HIGHLIGHT: 9, + UNDERLINE: 10, + SQUIGGLY: 11, + STRIKEOUT: 12, + STAMP: 13, + CARET: 14, + INK: 15, + POPUP: 16, + FILEATTACHMENT: 17, + SOUND: 18, + MOVIE: 19, + WIDGET: 20, + SCREEN: 21, + PRINTERMARK: 22, + TRAPNET: 23, + WATERMARK: 24, + THREED: 25, + REDACT: 26 +}; +exports.AnnotationType = AnnotationType; +var AnnotationStateModelType = { + MARKED: "Marked", + REVIEW: "Review" +}; +exports.AnnotationStateModelType = AnnotationStateModelType; +var AnnotationMarkedState = { + MARKED: "Marked", + UNMARKED: "Unmarked" +}; +exports.AnnotationMarkedState = AnnotationMarkedState; +var AnnotationReviewState = { + ACCEPTED: "Accepted", + REJECTED: "Rejected", + CANCELLED: "Cancelled", + COMPLETED: "Completed", + NONE: "None" +}; +exports.AnnotationReviewState = AnnotationReviewState; +var AnnotationReplyType = { + GROUP: "Group", + REPLY: "R" +}; +exports.AnnotationReplyType = AnnotationReplyType; +var AnnotationFlag = { + INVISIBLE: 0x01, + HIDDEN: 0x02, + PRINT: 0x04, + NOZOOM: 0x08, + NOROTATE: 0x10, + NOVIEW: 0x20, + READONLY: 0x40, + LOCKED: 0x80, + TOGGLENOVIEW: 0x100, + LOCKEDCONTENTS: 0x200 +}; +exports.AnnotationFlag = AnnotationFlag; +var AnnotationFieldFlag = { + READONLY: 0x0000001, + REQUIRED: 0x0000002, + NOEXPORT: 0x0000004, + MULTILINE: 0x0001000, + PASSWORD: 0x0002000, + NOTOGGLETOOFF: 0x0004000, + RADIO: 0x0008000, + PUSHBUTTON: 0x0010000, + COMBO: 0x0020000, + EDIT: 0x0040000, + SORT: 0x0080000, + FILESELECT: 0x0100000, + MULTISELECT: 0x0200000, + DONOTSPELLCHECK: 0x0400000, + DONOTSCROLL: 0x0800000, + COMB: 0x1000000, + RICHTEXT: 0x2000000, + RADIOSINUNISON: 0x2000000, + COMMITONSELCHANGE: 0x4000000 +}; +exports.AnnotationFieldFlag = AnnotationFieldFlag; +var AnnotationBorderStyleType = { + SOLID: 1, + DASHED: 2, + BEVELED: 3, + INSET: 4, + UNDERLINE: 5 +}; +exports.AnnotationBorderStyleType = AnnotationBorderStyleType; +var AnnotationActionEventType = { + E: "Mouse Enter", + X: "Mouse Exit", + D: "Mouse Down", + U: "Mouse Up", + Fo: "Focus", + Bl: "Blur", + PO: "PageOpen", + PC: "PageClose", + PV: "PageVisible", + PI: "PageInvisible", + K: "Keystroke", + F: "Format", + V: "Validate", + C: "Calculate" +}; +exports.AnnotationActionEventType = AnnotationActionEventType; +var DocumentActionEventType = { + WC: "WillClose", + WS: "WillSave", + DS: "DidSave", + WP: "WillPrint", + DP: "DidPrint" +}; +exports.DocumentActionEventType = DocumentActionEventType; +var PageActionEventType = { + O: "PageOpen", + C: "PageClose" +}; +exports.PageActionEventType = PageActionEventType; +var StreamType = { + UNKNOWN: "UNKNOWN", + FLATE: "FLATE", + LZW: "LZW", + DCT: "DCT", + JPX: "JPX", + JBIG: "JBIG", + A85: "A85", + AHX: "AHX", + CCF: "CCF", + RLX: "RLX" +}; +exports.StreamType = StreamType; +var FontType = { + UNKNOWN: "UNKNOWN", + TYPE1: "TYPE1", + TYPE1STANDARD: "TYPE1STANDARD", + TYPE1C: "TYPE1C", + CIDFONTTYPE0: "CIDFONTTYPE0", + CIDFONTTYPE0C: "CIDFONTTYPE0C", + TRUETYPE: "TRUETYPE", + CIDFONTTYPE2: "CIDFONTTYPE2", + TYPE3: "TYPE3", + OPENTYPE: "OPENTYPE", + TYPE0: "TYPE0", + MMTYPE1: "MMTYPE1" +}; +exports.FontType = FontType; +var VerbosityLevel = { + ERRORS: 0, + WARNINGS: 1, + INFOS: 5 +}; +exports.VerbosityLevel = VerbosityLevel; +var CMapCompressionType = { + NONE: 0, + BINARY: 1, + STREAM: 2 +}; +exports.CMapCompressionType = CMapCompressionType; +var OPS = { + dependency: 1, + setLineWidth: 2, + setLineCap: 3, + setLineJoin: 4, + setMiterLimit: 5, + setDash: 6, + setRenderingIntent: 7, + setFlatness: 8, + setGState: 9, + save: 10, + restore: 11, + transform: 12, + moveTo: 13, + lineTo: 14, + curveTo: 15, + curveTo2: 16, + curveTo3: 17, + closePath: 18, + rectangle: 19, + stroke: 20, + closeStroke: 21, + fill: 22, + eoFill: 23, + fillStroke: 24, + eoFillStroke: 25, + closeFillStroke: 26, + closeEOFillStroke: 27, + endPath: 28, + clip: 29, + eoClip: 30, + beginText: 31, + endText: 32, + setCharSpacing: 33, + setWordSpacing: 34, + setHScale: 35, + setLeading: 36, + setFont: 37, + setTextRenderingMode: 38, + setTextRise: 39, + moveText: 40, + setLeadingMoveText: 41, + setTextMatrix: 42, + nextLine: 43, + showText: 44, + showSpacedText: 45, + nextLineShowText: 46, + nextLineSetSpacingShowText: 47, + setCharWidth: 48, + setCharWidthAndBounds: 49, + setStrokeColorSpace: 50, + setFillColorSpace: 51, + setStrokeColor: 52, + setStrokeColorN: 53, + setFillColor: 54, + setFillColorN: 55, + setStrokeGray: 56, + setFillGray: 57, + setStrokeRGBColor: 58, + setFillRGBColor: 59, + setStrokeCMYKColor: 60, + setFillCMYKColor: 61, + shadingFill: 62, + beginInlineImage: 63, + beginImageData: 64, + endInlineImage: 65, + paintXObject: 66, + markPoint: 67, + markPointProps: 68, + beginMarkedContent: 69, + beginMarkedContentProps: 70, + endMarkedContent: 71, + beginCompat: 72, + endCompat: 73, + paintFormXObjectBegin: 74, + paintFormXObjectEnd: 75, + beginGroup: 76, + endGroup: 77, + beginAnnotations: 78, + endAnnotations: 79, + beginAnnotation: 80, + endAnnotation: 81, + paintJpegXObject: 82, + paintImageMaskXObject: 83, + paintImageMaskXObjectGroup: 84, + paintImageXObject: 85, + paintInlineImageXObject: 86, + paintInlineImageXObjectGroup: 87, + paintImageXObjectRepeat: 88, + paintImageMaskXObjectRepeat: 89, + paintSolidColorImageMask: 90, + constructPath: 91 +}; +exports.OPS = OPS; +var UNSUPPORTED_FEATURES = { + unknown: "unknown", + forms: "forms", + javaScript: "javaScript", + signatures: "signatures", + smask: "smask", + shadingPattern: "shadingPattern", + font: "font", + errorTilingPattern: "errorTilingPattern", + errorExtGState: "errorExtGState", + errorXObject: "errorXObject", + errorFontLoadType3: "errorFontLoadType3", + errorFontState: "errorFontState", + errorFontMissing: "errorFontMissing", + errorFontTranslate: "errorFontTranslate", + errorColorSpace: "errorColorSpace", + errorOperatorList: "errorOperatorList", + errorFontToUnicode: "errorFontToUnicode", + errorFontLoadNative: "errorFontLoadNative", + errorFontBuildPath: "errorFontBuildPath", + errorFontGetPath: "errorFontGetPath", + errorMarkedContent: "errorMarkedContent" +}; +exports.UNSUPPORTED_FEATURES = UNSUPPORTED_FEATURES; +var PasswordResponses = { + NEED_PASSWORD: 1, + INCORRECT_PASSWORD: 2 +}; +exports.PasswordResponses = PasswordResponses; +var verbosity = VerbosityLevel.WARNINGS; + +function setVerbosityLevel(level) { + if (Number.isInteger(level)) { + verbosity = level; + } +} + +function getVerbosityLevel() { + return verbosity; +} + +function info(msg) { + if (verbosity >= VerbosityLevel.INFOS) { + console.log("Info: ".concat(msg)); + } +} + +function warn(msg) { + if (verbosity >= VerbosityLevel.WARNINGS) { + console.log("Warning: ".concat(msg)); + } +} + +function unreachable(msg) { + throw new Error(msg); +} + +function assert(cond, msg) { + if (!cond) { + unreachable(msg); + } +} + +function isSameOrigin(baseUrl, otherUrl) { + var base; + + try { + base = new URL(baseUrl); + + if (!base.origin || base.origin === "null") { + return false; + } + } catch (e) { + return false; + } + + var other = new URL(otherUrl, base); + return base.origin === other.origin; +} + +function _isValidProtocol(url) { + if (!url) { + return false; + } + + switch (url.protocol) { + case "http:": + case "https:": + case "ftp:": + case "mailto:": + case "tel:": + return true; + + default: + return false; + } +} + +function createValidAbsoluteUrl(url, baseUrl) { + if (!url) { + return null; + } + + try { + var absoluteUrl = baseUrl ? new URL(url, baseUrl) : new URL(url); + + if (_isValidProtocol(absoluteUrl)) { + return absoluteUrl; + } + } catch (ex) {} + + return null; +} + +function shadow(obj, prop, value) { + Object.defineProperty(obj, prop, { + value: value, + enumerable: true, + configurable: true, + writable: false + }); + return value; +} + +var BaseException = function BaseExceptionClosure() { + function BaseException(message) { + if (this.constructor === BaseException) { + unreachable("Cannot initialize BaseException."); + } + + this.message = message; + this.name = this.constructor.name; + } + + BaseException.prototype = new Error(); + BaseException.constructor = BaseException; + return BaseException; +}(); + +exports.BaseException = BaseException; + +var PasswordException = /*#__PURE__*/function (_BaseException) { + _inherits(PasswordException, _BaseException); + + var _super = _createSuper(PasswordException); + + function PasswordException(msg, code) { + var _this; + + _classCallCheck(this, PasswordException); + + _this = _super.call(this, msg); + _this.code = code; + return _this; + } + + return PasswordException; +}(BaseException); + +exports.PasswordException = PasswordException; + +var UnknownErrorException = /*#__PURE__*/function (_BaseException2) { + _inherits(UnknownErrorException, _BaseException2); + + var _super2 = _createSuper(UnknownErrorException); + + function UnknownErrorException(msg, details) { + var _this2; + + _classCallCheck(this, UnknownErrorException); + + _this2 = _super2.call(this, msg); + _this2.details = details; + return _this2; + } + + return UnknownErrorException; +}(BaseException); + +exports.UnknownErrorException = UnknownErrorException; + +var InvalidPDFException = /*#__PURE__*/function (_BaseException3) { + _inherits(InvalidPDFException, _BaseException3); + + var _super3 = _createSuper(InvalidPDFException); + + function InvalidPDFException() { + _classCallCheck(this, InvalidPDFException); + + return _super3.apply(this, arguments); + } + + return InvalidPDFException; +}(BaseException); + +exports.InvalidPDFException = InvalidPDFException; + +var MissingPDFException = /*#__PURE__*/function (_BaseException4) { + _inherits(MissingPDFException, _BaseException4); + + var _super4 = _createSuper(MissingPDFException); + + function MissingPDFException() { + _classCallCheck(this, MissingPDFException); + + return _super4.apply(this, arguments); + } + + return MissingPDFException; +}(BaseException); + +exports.MissingPDFException = MissingPDFException; + +var UnexpectedResponseException = /*#__PURE__*/function (_BaseException5) { + _inherits(UnexpectedResponseException, _BaseException5); + + var _super5 = _createSuper(UnexpectedResponseException); + + function UnexpectedResponseException(msg, status) { + var _this3; + + _classCallCheck(this, UnexpectedResponseException); + + _this3 = _super5.call(this, msg); + _this3.status = status; + return _this3; + } + + return UnexpectedResponseException; +}(BaseException); + +exports.UnexpectedResponseException = UnexpectedResponseException; + +var FormatError = /*#__PURE__*/function (_BaseException6) { + _inherits(FormatError, _BaseException6); + + var _super6 = _createSuper(FormatError); + + function FormatError() { + _classCallCheck(this, FormatError); + + return _super6.apply(this, arguments); + } + + return FormatError; +}(BaseException); + +exports.FormatError = FormatError; + +var AbortException = /*#__PURE__*/function (_BaseException7) { + _inherits(AbortException, _BaseException7); + + var _super7 = _createSuper(AbortException); + + function AbortException() { + _classCallCheck(this, AbortException); + + return _super7.apply(this, arguments); + } + + return AbortException; +}(BaseException); + +exports.AbortException = AbortException; +var NullCharactersRegExp = /\x00/g; + +function removeNullCharacters(str) { + if (typeof str !== "string") { + warn("The argument for removeNullCharacters must be a string."); + return str; + } + + return str.replace(NullCharactersRegExp, ""); +} + +function bytesToString(bytes) { + assert(bytes !== null && _typeof(bytes) === "object" && bytes.length !== undefined, "Invalid argument for bytesToString"); + var length = bytes.length; + var MAX_ARGUMENT_COUNT = 8192; + + if (length < MAX_ARGUMENT_COUNT) { + return String.fromCharCode.apply(null, bytes); + } + + var strBuf = []; + + for (var i = 0; i < length; i += MAX_ARGUMENT_COUNT) { + var chunkEnd = Math.min(i + MAX_ARGUMENT_COUNT, length); + var chunk = bytes.subarray(i, chunkEnd); + strBuf.push(String.fromCharCode.apply(null, chunk)); + } + + return strBuf.join(""); +} + +function stringToBytes(str) { + assert(typeof str === "string", "Invalid argument for stringToBytes"); + var length = str.length; + var bytes = new Uint8Array(length); + + for (var i = 0; i < length; ++i) { + bytes[i] = str.charCodeAt(i) & 0xff; + } + + return bytes; +} + +function arrayByteLength(arr) { + if (arr.length !== undefined) { + return arr.length; + } + + assert(arr.byteLength !== undefined, "arrayByteLength - invalid argument."); + return arr.byteLength; +} + +function arraysToBytes(arr) { + var length = arr.length; + + if (length === 1 && arr[0] instanceof Uint8Array) { + return arr[0]; + } + + var resultLength = 0; + + for (var i = 0; i < length; i++) { + resultLength += arrayByteLength(arr[i]); + } + + var pos = 0; + var data = new Uint8Array(resultLength); + + for (var _i = 0; _i < length; _i++) { + var item = arr[_i]; + + if (!(item instanceof Uint8Array)) { + if (typeof item === "string") { + item = stringToBytes(item); + } else { + item = new Uint8Array(item); + } + } + + var itemLength = item.byteLength; + data.set(item, pos); + pos += itemLength; + } + + return data; +} + +function string32(value) { + return String.fromCharCode(value >> 24 & 0xff, value >> 16 & 0xff, value >> 8 & 0xff, value & 0xff); +} + +function objectSize(obj) { + return Object.keys(obj).length; +} + +function objectFromMap(map) { + var obj = Object.create(null); + + var _iterator = _createForOfIteratorHelper(map), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var _step$value = _slicedToArray(_step.value, 2), + key = _step$value[0], + value = _step$value[1]; + + obj[key] = value; + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + return obj; +} + +function isLittleEndian() { + var buffer8 = new Uint8Array(4); + buffer8[0] = 1; + var view32 = new Uint32Array(buffer8.buffer, 0, 1); + return view32[0] === 1; +} + +var IsLittleEndianCached = { + get value() { + return shadow(this, "value", isLittleEndian()); + } + +}; +exports.IsLittleEndianCached = IsLittleEndianCached; + +function isEvalSupported() { + try { + new Function(""); + return true; + } catch (e) { + return false; + } +} + +var IsEvalSupportedCached = { + get value() { + return shadow(this, "value", isEvalSupported()); + } + +}; +exports.IsEvalSupportedCached = IsEvalSupportedCached; + +var hexNumbers = _toConsumableArray(Array(256).keys()).map(function (n) { + return n.toString(16).padStart(2, "0"); +}); + +var Util = /*#__PURE__*/function () { + function Util() { + _classCallCheck(this, Util); + } + + _createClass(Util, null, [{ + key: "makeHexColor", + value: function makeHexColor(r, g, b) { + return "#".concat(hexNumbers[r]).concat(hexNumbers[g]).concat(hexNumbers[b]); + } + }, { + key: "transform", + value: function transform(m1, m2) { + 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]]; + } + }, { + key: "applyTransform", + value: function applyTransform(p, m) { + var xt = p[0] * m[0] + p[1] * m[2] + m[4]; + var yt = p[0] * m[1] + p[1] * m[3] + m[5]; + return [xt, yt]; + } + }, { + key: "applyInverseTransform", + value: function applyInverseTransform(p, m) { + var d = m[0] * m[3] - m[1] * m[2]; + var xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d; + var yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d; + return [xt, yt]; + } + }, { + key: "getAxialAlignedBoundingBox", + value: function getAxialAlignedBoundingBox(r, m) { + var p1 = Util.applyTransform(r, m); + var p2 = Util.applyTransform(r.slice(2, 4), m); + var p3 = Util.applyTransform([r[0], r[3]], m); + var p4 = Util.applyTransform([r[2], r[1]], m); + 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])]; + } + }, { + key: "inverseTransform", + value: function inverseTransform(m) { + var d = m[0] * m[3] - m[1] * m[2]; + 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]; + } + }, { + key: "apply3dTransform", + value: function apply3dTransform(m, v) { + return [m[0] * v[0] + m[1] * v[1] + m[2] * v[2], m[3] * v[0] + m[4] * v[1] + m[5] * v[2], m[6] * v[0] + m[7] * v[1] + m[8] * v[2]]; + } + }, { + key: "singularValueDecompose2dScale", + value: function singularValueDecompose2dScale(m) { + var transpose = [m[0], m[2], m[1], m[3]]; + var a = m[0] * transpose[0] + m[1] * transpose[2]; + var b = m[0] * transpose[1] + m[1] * transpose[3]; + var c = m[2] * transpose[0] + m[3] * transpose[2]; + var d = m[2] * transpose[1] + m[3] * transpose[3]; + var first = (a + d) / 2; + var second = Math.sqrt(Math.pow(a + d, 2) - 4 * (a * d - c * b)) / 2; + var sx = first + second || 1; + var sy = first - second || 1; + return [Math.sqrt(sx), Math.sqrt(sy)]; + } + }, { + key: "normalizeRect", + value: function normalizeRect(rect) { + var r = rect.slice(0); + + if (rect[0] > rect[2]) { + r[0] = rect[2]; + r[2] = rect[0]; + } + + if (rect[1] > rect[3]) { + r[1] = rect[3]; + r[3] = rect[1]; + } + + return r; + } + }, { + key: "intersect", + value: function intersect(rect1, rect2) { + function compare(a, b) { + return a - b; + } + + var orderedX = [rect1[0], rect1[2], rect2[0], rect2[2]].sort(compare); + var orderedY = [rect1[1], rect1[3], rect2[1], rect2[3]].sort(compare); + var result = []; + rect1 = Util.normalizeRect(rect1); + rect2 = Util.normalizeRect(rect2); + + if (orderedX[0] === rect1[0] && orderedX[1] === rect2[0] || orderedX[0] === rect2[0] && orderedX[1] === rect1[0]) { + result[0] = orderedX[1]; + result[2] = orderedX[2]; + } else { + return null; + } + + if (orderedY[0] === rect1[1] && orderedY[1] === rect2[1] || orderedY[0] === rect2[1] && orderedY[1] === rect1[1]) { + result[1] = orderedY[1]; + result[3] = orderedY[2]; + } else { + return null; + } + + return result; + } + }]); + + return Util; +}(); + +exports.Util = Util; +var 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]; + +function stringToPDFString(str) { + var length = str.length, + strBuf = []; + + if (str[0] === "\xFE" && str[1] === "\xFF") { + for (var i = 2; i < length; i += 2) { + strBuf.push(String.fromCharCode(str.charCodeAt(i) << 8 | str.charCodeAt(i + 1))); + } + } else if (str[0] === "\xFF" && str[1] === "\xFE") { + for (var _i2 = 2; _i2 < length; _i2 += 2) { + strBuf.push(String.fromCharCode(str.charCodeAt(_i2 + 1) << 8 | str.charCodeAt(_i2))); + } + } else { + for (var _i3 = 0; _i3 < length; ++_i3) { + var code = PDFStringTranslateTable[str.charCodeAt(_i3)]; + strBuf.push(code ? String.fromCharCode(code) : str.charAt(_i3)); + } + } + + return strBuf.join(""); +} + +function escapeString(str) { + return str.replace(/([()\\\n\r])/g, function (match) { + if (match === "\n") { + return "\\n"; + } else if (match === "\r") { + return "\\r"; + } + + return "\\".concat(match); + }); +} + +function isAscii(str) { + return /^[\x00-\x7F]*$/.test(str); +} + +function stringToUTF16BEString(str) { + var buf = ["\xFE\xFF"]; + + for (var i = 0, ii = str.length; i < ii; i++) { + var _char = str.charCodeAt(i); + + buf.push(String.fromCharCode(_char >> 8 & 0xff), String.fromCharCode(_char & 0xff)); + } + + return buf.join(""); +} + +function stringToUTF8String(str) { + return decodeURIComponent(escape(str)); +} + +function utf8StringToString(str) { + return unescape(encodeURIComponent(str)); +} + +function isBool(v) { + return typeof v === "boolean"; +} + +function isNum(v) { + return typeof v === "number"; +} + +function isString(v) { + return typeof v === "string"; +} + +function isArrayBuffer(v) { + return _typeof(v) === "object" && v !== null && v.byteLength !== undefined; +} + +function isArrayEqual(arr1, arr2) { + if (arr1.length !== arr2.length) { + return false; + } + + for (var i = 0, ii = arr1.length; i < ii; i++) { + if (arr1[i] !== arr2[i]) { + return false; + } + } + + return true; +} + +function getModificationDate() { + var date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Date(); + var 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")]; + return buffer.join(""); +} + +function createPromiseCapability() { + var capability = Object.create(null); + var isSettled = false; + Object.defineProperty(capability, "settled", { + get: function get() { + return isSettled; + } + }); + capability.promise = new Promise(function (resolve, reject) { + capability.resolve = function (data) { + isSettled = true; + resolve(data); + }; + + capability.reject = function (reason) { + isSettled = true; + reject(reason); + }; + }); + return capability; +} + +function createObjectURL(data) { + var contentType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ""; + var forceDataSchema = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + if (URL.createObjectURL && !forceDataSchema) { + return URL.createObjectURL(new Blob([data], { + type: contentType + })); + } + + var digits = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + var buffer = "data:".concat(contentType, ";base64,"); + + for (var i = 0, ii = data.length; i < ii; i += 3) { + var b1 = data[i] & 0xff; + var b2 = data[i + 1] & 0xff; + var b3 = data[i + 2] & 0xff; + var d1 = b1 >> 2, + d2 = (b1 & 3) << 4 | b2 >> 4; + var d3 = i + 1 < ii ? (b2 & 0xf) << 2 | b3 >> 6 : 64; + var d4 = i + 2 < ii ? b3 & 0x3f : 64; + buffer += digits[d1] + digits[d2] + digits[d3] + digits[d4]; + } + + return buffer; +} + +/***/ }), +/* 5 */ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => { + +"use strict"; + + +var _is_node = __w_pdfjs_require__(6); + +if (typeof globalThis === "undefined" || !globalThis._pdfjsCompatibilityChecked) { + if (typeof globalThis === "undefined" || globalThis.Math !== Math) { + globalThis = __w_pdfjs_require__(7); + } + + globalThis._pdfjsCompatibilityChecked = true; + + (function checkNodeBtoa() { + if (globalThis.btoa || !_is_node.isNodeJS) { + return; + } + + globalThis.btoa = function (chars) { + return Buffer.from(chars, "binary").toString("base64"); + }; + })(); + + (function checkNodeAtob() { + if (globalThis.atob || !_is_node.isNodeJS) { + return; + } + + globalThis.atob = function (input) { + return Buffer.from(input, "base64").toString("binary"); + }; + })(); + + (function checkDOMMatrix() { + if (globalThis.DOMMatrix || !_is_node.isNodeJS) { + return; + } + + globalThis.DOMMatrix = __w_pdfjs_require__(53); + })(); + + (function checkObjectFromEntries() { + if (Object.fromEntries) { + return; + } + + __w_pdfjs_require__(54); + })(); + + (function checkPromise() { + if (globalThis.Promise.allSettled) { + return; + } + + globalThis.Promise = __w_pdfjs_require__(85); + })(); + + (function checkReadableStream() { + var isReadableStreamSupported = false; + + if (typeof ReadableStream !== "undefined") { + try { + new ReadableStream({ + start: function start(controller) { + controller.close(); + } + }); + isReadableStreamSupported = true; + } catch (e) {} + } + + if (isReadableStreamSupported) { + return; + } + + globalThis.ReadableStream = __w_pdfjs_require__(113).ReadableStream; + })(); +} + +/***/ }), +/* 6 */ +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.isNodeJS = void 0; + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +var isNodeJS = (typeof process === "undefined" ? "undefined" : _typeof(process)) === "object" && process + "" === "[object process]" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== "browser"); +exports.isNodeJS = isNodeJS; + +/***/ }), +/* 7 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +__w_pdfjs_require__(8); +module.exports = __w_pdfjs_require__(10); + +/***/ }), +/* 8 */ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var $ = __w_pdfjs_require__(9); +var global = __w_pdfjs_require__(10); +$({ global: true }, { globalThis: global }); + +/***/ }), +/* 9 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var global = __w_pdfjs_require__(10); +var getOwnPropertyDescriptor = __w_pdfjs_require__(11).f; +var createNonEnumerableProperty = __w_pdfjs_require__(26); +var redefine = __w_pdfjs_require__(29); +var setGlobal = __w_pdfjs_require__(30); +var copyConstructorProperties = __w_pdfjs_require__(40); +var isForced = __w_pdfjs_require__(52); +module.exports = function (options, source) { + var TARGET = options.target; + var GLOBAL = options.global; + var STATIC = options.stat; + var FORCED, target, key, targetProperty, sourceProperty, descriptor; + if (GLOBAL) { + target = global; + } else if (STATIC) { + target = global[TARGET] || setGlobal(TARGET, {}); + } else { + target = (global[TARGET] || {}).prototype; + } + if (target) + for (key in source) { + sourceProperty = source[key]; + if (options.noTargetGet) { + descriptor = getOwnPropertyDescriptor(target, key); + targetProperty = descriptor && descriptor.value; + } else + targetProperty = target[key]; + FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); + if (!FORCED && targetProperty !== undefined) { + if (typeof sourceProperty === typeof targetProperty) + continue; + copyConstructorProperties(sourceProperty, targetProperty); + } + if (options.sham || targetProperty && targetProperty.sham) { + createNonEnumerableProperty(sourceProperty, 'sham', true); + } + redefine(target, key, sourceProperty, options); + } +}; + +/***/ }), +/* 10 */ +/***/ ((module) => { + +var check = function (it) { + return it && it.Math == Math && it; +}; +module.exports = check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || check(typeof self == 'object' && self) || check(typeof global == 'object' && global) || function () { + return this; +}() || Function('return this')(); + +/***/ }), +/* 11 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +var DESCRIPTORS = __w_pdfjs_require__(12); +var propertyIsEnumerableModule = __w_pdfjs_require__(14); +var createPropertyDescriptor = __w_pdfjs_require__(15); +var toIndexedObject = __w_pdfjs_require__(16); +var toPrimitive = __w_pdfjs_require__(20); +var has = __w_pdfjs_require__(22); +var IE8_DOM_DEFINE = __w_pdfjs_require__(24); +var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; +exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { + O = toIndexedObject(O); + P = toPrimitive(P, true); + if (IE8_DOM_DEFINE) + try { + return $getOwnPropertyDescriptor(O, P); + } catch (error) { + } + if (has(O, P)) + return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]); +}; + +/***/ }), +/* 12 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var fails = __w_pdfjs_require__(13); +module.exports = !fails(function () { + return Object.defineProperty({}, 1, { + get: function () { + return 7; + } + })[1] != 7; +}); + +/***/ }), +/* 13 */ +/***/ ((module) => { + +module.exports = function (exec) { + try { + return !!exec(); + } catch (error) { + return true; + } +}; + +/***/ }), +/* 14 */ +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +var $propertyIsEnumerable = {}.propertyIsEnumerable; +var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; +var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1); +exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) { + var descriptor = getOwnPropertyDescriptor(this, V); + return !!descriptor && descriptor.enumerable; +} : $propertyIsEnumerable; + +/***/ }), +/* 15 */ +/***/ ((module) => { + +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + +/***/ }), +/* 16 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var IndexedObject = __w_pdfjs_require__(17); +var requireObjectCoercible = __w_pdfjs_require__(19); +module.exports = function (it) { + return IndexedObject(requireObjectCoercible(it)); +}; + +/***/ }), +/* 17 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var fails = __w_pdfjs_require__(13); +var classof = __w_pdfjs_require__(18); +var split = ''.split; +module.exports = fails(function () { + return !Object('z').propertyIsEnumerable(0); +}) ? function (it) { + return classof(it) == 'String' ? split.call(it, '') : Object(it); +} : Object; + +/***/ }), +/* 18 */ +/***/ ((module) => { + +var toString = {}.toString; +module.exports = function (it) { + return toString.call(it).slice(8, -1); +}; + +/***/ }), +/* 19 */ +/***/ ((module) => { + +module.exports = function (it) { + if (it == undefined) + throw TypeError("Can't call method on " + it); + return it; +}; + +/***/ }), +/* 20 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var isObject = __w_pdfjs_require__(21); +module.exports = function (input, PREFERRED_STRING) { + if (!isObject(input)) + return input; + var fn, val; + if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) + return val; + if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) + return val; + if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) + return val; + throw TypeError("Can't convert object to primitive value"); +}; + +/***/ }), +/* 21 */ +/***/ ((module) => { + +module.exports = function (it) { + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; + +/***/ }), +/* 22 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var toObject = __w_pdfjs_require__(23); +var hasOwnProperty = {}.hasOwnProperty; +module.exports = Object.hasOwn || function hasOwn(it, key) { + return hasOwnProperty.call(toObject(it), key); +}; + +/***/ }), +/* 23 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var requireObjectCoercible = __w_pdfjs_require__(19); +module.exports = function (argument) { + return Object(requireObjectCoercible(argument)); +}; + +/***/ }), +/* 24 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var DESCRIPTORS = __w_pdfjs_require__(12); +var fails = __w_pdfjs_require__(13); +var createElement = __w_pdfjs_require__(25); +module.exports = !DESCRIPTORS && !fails(function () { + return Object.defineProperty(createElement('div'), 'a', { + get: function () { + return 7; + } + }).a != 7; +}); + +/***/ }), +/* 25 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var global = __w_pdfjs_require__(10); +var isObject = __w_pdfjs_require__(21); +var document = global.document; +var EXISTS = isObject(document) && isObject(document.createElement); +module.exports = function (it) { + return EXISTS ? document.createElement(it) : {}; +}; + +/***/ }), +/* 26 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var DESCRIPTORS = __w_pdfjs_require__(12); +var definePropertyModule = __w_pdfjs_require__(27); +var createPropertyDescriptor = __w_pdfjs_require__(15); +module.exports = DESCRIPTORS ? function (object, key, value) { + return definePropertyModule.f(object, key, createPropertyDescriptor(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + +/***/ }), +/* 27 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +var DESCRIPTORS = __w_pdfjs_require__(12); +var IE8_DOM_DEFINE = __w_pdfjs_require__(24); +var anObject = __w_pdfjs_require__(28); +var toPrimitive = __w_pdfjs_require__(20); +var $defineProperty = Object.defineProperty; +exports.f = DESCRIPTORS ? $defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if (IE8_DOM_DEFINE) + try { + return $defineProperty(O, P, Attributes); + } catch (error) { + } + if ('get' in Attributes || 'set' in Attributes) + throw TypeError('Accessors not supported'); + if ('value' in Attributes) + O[P] = Attributes.value; + return O; +}; + +/***/ }), +/* 28 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var isObject = __w_pdfjs_require__(21); +module.exports = function (it) { + if (!isObject(it)) { + throw TypeError(String(it) + ' is not an object'); + } + return it; +}; + +/***/ }), +/* 29 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var global = __w_pdfjs_require__(10); +var createNonEnumerableProperty = __w_pdfjs_require__(26); +var has = __w_pdfjs_require__(22); +var setGlobal = __w_pdfjs_require__(30); +var inspectSource = __w_pdfjs_require__(31); +var InternalStateModule = __w_pdfjs_require__(33); +var getInternalState = InternalStateModule.get; +var enforceInternalState = InternalStateModule.enforce; +var TEMPLATE = String(String).split('String'); +(module.exports = function (O, key, value, options) { + var unsafe = options ? !!options.unsafe : false; + var simple = options ? !!options.enumerable : false; + var noTargetGet = options ? !!options.noTargetGet : false; + var state; + if (typeof value == 'function') { + if (typeof key == 'string' && !has(value, 'name')) { + createNonEnumerableProperty(value, 'name', key); + } + state = enforceInternalState(value); + if (!state.source) { + state.source = TEMPLATE.join(typeof key == 'string' ? key : ''); + } + } + if (O === global) { + if (simple) + O[key] = value; + else + setGlobal(key, value); + return; + } else if (!unsafe) { + delete O[key]; + } else if (!noTargetGet && O[key]) { + simple = true; + } + if (simple) + O[key] = value; + else + createNonEnumerableProperty(O, key, value); +})(Function.prototype, 'toString', function toString() { + return typeof this == 'function' && getInternalState(this).source || inspectSource(this); +}); + +/***/ }), +/* 30 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var global = __w_pdfjs_require__(10); +var createNonEnumerableProperty = __w_pdfjs_require__(26); +module.exports = function (key, value) { + try { + createNonEnumerableProperty(global, key, value); + } catch (error) { + global[key] = value; + } + return value; +}; + +/***/ }), +/* 31 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var store = __w_pdfjs_require__(32); +var functionToString = Function.toString; +if (typeof store.inspectSource != 'function') { + store.inspectSource = function (it) { + return functionToString.call(it); + }; +} +module.exports = store.inspectSource; + +/***/ }), +/* 32 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var global = __w_pdfjs_require__(10); +var setGlobal = __w_pdfjs_require__(30); +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || setGlobal(SHARED, {}); +module.exports = store; + +/***/ }), +/* 33 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var NATIVE_WEAK_MAP = __w_pdfjs_require__(34); +var global = __w_pdfjs_require__(10); +var isObject = __w_pdfjs_require__(21); +var createNonEnumerableProperty = __w_pdfjs_require__(26); +var objectHas = __w_pdfjs_require__(22); +var shared = __w_pdfjs_require__(32); +var sharedKey = __w_pdfjs_require__(35); +var hiddenKeys = __w_pdfjs_require__(39); +var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; +var WeakMap = global.WeakMap; +var set, get, has; +var enforce = function (it) { + return has(it) ? get(it) : set(it, {}); +}; +var getterFor = function (TYPE) { + return function (it) { + var state; + if (!isObject(it) || (state = get(it)).type !== TYPE) { + throw TypeError('Incompatible receiver, ' + TYPE + ' required'); + } + return state; + }; +}; +if (NATIVE_WEAK_MAP || shared.state) { + var store = shared.state || (shared.state = new WeakMap()); + var wmget = store.get; + var wmhas = store.has; + var wmset = store.set; + set = function (it, metadata) { + if (wmhas.call(store, it)) + throw new TypeError(OBJECT_ALREADY_INITIALIZED); + metadata.facade = it; + wmset.call(store, it, metadata); + return metadata; + }; + get = function (it) { + return wmget.call(store, it) || {}; + }; + has = function (it) { + return wmhas.call(store, it); + }; +} else { + var STATE = sharedKey('state'); + hiddenKeys[STATE] = true; + set = function (it, metadata) { + if (objectHas(it, STATE)) + throw new TypeError(OBJECT_ALREADY_INITIALIZED); + metadata.facade = it; + createNonEnumerableProperty(it, STATE, metadata); + return metadata; + }; + get = function (it) { + return objectHas(it, STATE) ? it[STATE] : {}; + }; + has = function (it) { + return objectHas(it, STATE); + }; +} +module.exports = { + set: set, + get: get, + has: has, + enforce: enforce, + getterFor: getterFor +}; + +/***/ }), +/* 34 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var global = __w_pdfjs_require__(10); +var inspectSource = __w_pdfjs_require__(31); +var WeakMap = global.WeakMap; +module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap)); + +/***/ }), +/* 35 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var shared = __w_pdfjs_require__(36); +var uid = __w_pdfjs_require__(38); +var keys = shared('keys'); +module.exports = function (key) { + return keys[key] || (keys[key] = uid(key)); +}; + +/***/ }), +/* 36 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var IS_PURE = __w_pdfjs_require__(37); +var store = __w_pdfjs_require__(32); +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: '3.15.2', + mode: IS_PURE ? 'pure' : 'global', + copyright: '© 2021 Denis Pushkarev (zloirock.ru)' +}); + +/***/ }), +/* 37 */ +/***/ ((module) => { + +module.exports = false; + +/***/ }), +/* 38 */ +/***/ ((module) => { + +var id = 0; +var postfix = Math.random(); +module.exports = function (key) { + return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36); +}; + +/***/ }), +/* 39 */ +/***/ ((module) => { + +module.exports = {}; + +/***/ }), +/* 40 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var has = __w_pdfjs_require__(22); +var ownKeys = __w_pdfjs_require__(41); +var getOwnPropertyDescriptorModule = __w_pdfjs_require__(11); +var definePropertyModule = __w_pdfjs_require__(27); +module.exports = function (target, source) { + var keys = ownKeys(source); + var defineProperty = definePropertyModule.f; + var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!has(target, key)) + defineProperty(target, key, getOwnPropertyDescriptor(source, key)); + } +}; + +/***/ }), +/* 41 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var getBuiltIn = __w_pdfjs_require__(42); +var getOwnPropertyNamesModule = __w_pdfjs_require__(44); +var getOwnPropertySymbolsModule = __w_pdfjs_require__(51); +var anObject = __w_pdfjs_require__(28); +module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { + var keys = getOwnPropertyNamesModule.f(anObject(it)); + var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; + return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys; +}; + +/***/ }), +/* 42 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var path = __w_pdfjs_require__(43); +var global = __w_pdfjs_require__(10); +var aFunction = function (variable) { + return typeof variable == 'function' ? variable : undefined; +}; +module.exports = function (namespace, method) { + return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace]) : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method]; +}; + +/***/ }), +/* 43 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var global = __w_pdfjs_require__(10); +module.exports = global; + +/***/ }), +/* 44 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +var internalObjectKeys = __w_pdfjs_require__(45); +var enumBugKeys = __w_pdfjs_require__(50); +var hiddenKeys = enumBugKeys.concat('length', 'prototype'); +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return internalObjectKeys(O, hiddenKeys); +}; + +/***/ }), +/* 45 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var has = __w_pdfjs_require__(22); +var toIndexedObject = __w_pdfjs_require__(16); +var indexOf = __w_pdfjs_require__(46).indexOf; +var hiddenKeys = __w_pdfjs_require__(39); +module.exports = function (object, names) { + var O = toIndexedObject(object); + var i = 0; + var result = []; + var key; + for (key in O) + !has(hiddenKeys, key) && has(O, key) && result.push(key); + while (names.length > i) + if (has(O, key = names[i++])) { + ~indexOf(result, key) || result.push(key); + } + return result; +}; + +/***/ }), +/* 46 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var toIndexedObject = __w_pdfjs_require__(16); +var toLength = __w_pdfjs_require__(47); +var toAbsoluteIndex = __w_pdfjs_require__(49); +var createMethod = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIndexedObject($this); + var length = toLength(O.length); + var index = toAbsoluteIndex(fromIndex, length); + var value; + if (IS_INCLUDES && el != el) + while (length > index) { + value = O[index++]; + if (value != value) + return true; + } + else + for (; length > index; index++) { + if ((IS_INCLUDES || index in O) && O[index] === el) + return IS_INCLUDES || index || 0; + } + return !IS_INCLUDES && -1; + }; +}; +module.exports = { + includes: createMethod(true), + indexOf: createMethod(false) +}; + +/***/ }), +/* 47 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var toInteger = __w_pdfjs_require__(48); +var min = Math.min; +module.exports = function (argument) { + return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; +}; + +/***/ }), +/* 48 */ +/***/ ((module) => { + +var ceil = Math.ceil; +var floor = Math.floor; +module.exports = function (argument) { + return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument); +}; + +/***/ }), +/* 49 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var toInteger = __w_pdfjs_require__(48); +var max = Math.max; +var min = Math.min; +module.exports = function (index, length) { + var integer = toInteger(index); + return integer < 0 ? max(integer + length, 0) : min(integer, length); +}; + +/***/ }), +/* 50 */ +/***/ ((module) => { + +module.exports = [ + 'constructor', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'toLocaleString', + 'toString', + 'valueOf' +]; + +/***/ }), +/* 51 */ +/***/ ((__unused_webpack_module, exports) => { + +exports.f = Object.getOwnPropertySymbols; + +/***/ }), +/* 52 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var fails = __w_pdfjs_require__(13); +var replacement = /#|\.prototype\./; +var isForced = function (feature, detection) { + var value = data[normalize(feature)]; + return value == POLYFILL ? true : value == NATIVE ? false : typeof detection == 'function' ? fails(detection) : !!detection; +}; +var normalize = isForced.normalize = function (string) { + return String(string).replace(replacement, '.').toLowerCase(); +}; +var data = isForced.data = {}; +var NATIVE = isForced.NATIVE = 'N'; +var POLYFILL = isForced.POLYFILL = 'P'; +module.exports = isForced; + +/***/ }), +/* 53 */ +/***/ ((module, exports, __w_pdfjs_require__) => { + +"use strict"; +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__; + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +(function (global, factory) { + ( false ? 0 : _typeof(exports)) === 'object' && "object" !== 'undefined' ? module.exports = factory() : true ? !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __w_pdfjs_require__, exports, module)) : + __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : (0); +})(void 0, function () { + 'use strict'; + + var CSSMatrix = function CSSMatrix() { + var args = [], + len = arguments.length; + + while (len--) { + args[len] = arguments[len]; + } + + this.setIdentity(); + return args && args.length && this.setMatrixValue(args); + }; + + var prototypeAccessors = { + isIdentity: { + configurable: true + }, + is2D: { + configurable: true + } + }; + + prototypeAccessors.isIdentity.get = function () { + var m = this; + return m.m11 === 1 && m.m12 === 0 && m.m13 === 0 && m.m14 === 0 && m.m21 === 0 && m.m22 === 1 && m.m23 === 0 && m.m24 === 0 && m.m31 === 0 && m.m32 === 0 && m.m33 === 1 && m.m34 === 0 && m.m41 === 0 && m.m42 === 0 && m.m43 === 0 && m.m44 === 1; + }; + + prototypeAccessors.isIdentity.set = function (value) { + this.isIdentity = value; + }; + + prototypeAccessors.is2D.get = function () { + var m = this; + return m.m31 === 0 && m.m32 === 0 && m.m33 === 1 && m.m34 === 0 && m.m43 === 0 && m.m44 === 1; + }; + + prototypeAccessors.is2D.set = function (value) { + this.is2D = value; + }; + + Object.defineProperties(CSSMatrix.prototype, prototypeAccessors); + var CSSMatrixProto = CSSMatrix.prototype; + + function Translate(x, y, z) { + var m = new CSSMatrix(); + m.m41 = x; + m.e = x; + m.m42 = y; + m.f = y; + m.m43 = z; + return m; + } + + function Rotate(rx, ry, rz) { + var m = new CSSMatrix(); + var radX = rx * Math.PI / 180; + var radY = ry * Math.PI / 180; + var radZ = rz * Math.PI / 180; + var cosx = Math.cos(radX); + var sinx = -Math.sin(radX); + var cosy = Math.cos(radY); + var siny = -Math.sin(radY); + var cosz = Math.cos(radZ); + var sinz = -Math.sin(radZ); + var cycz = cosy * cosz; + var cysz = -cosy * sinz; + m.m11 = cycz; + m.a = cycz; + m.m12 = cysz; + m.b = cysz; + m.m13 = siny; + var sxsy = sinx * siny * cosz + cosx * sinz; + m.m21 = sxsy; + m.c = sxsy; + var cxcz = cosx * cosz - sinx * siny * sinz; + m.m22 = cxcz; + m.d = cxcz; + m.m23 = -sinx * cosy; + m.m31 = sinx * sinz - cosx * siny * cosz; + m.m32 = sinx * cosz + cosx * siny * sinz; + m.m33 = cosx * cosy; + return m; + } + + function RotateAxisAngle(x, y, z, angle) { + var m = new CSSMatrix(); + var radA = angle * Math.PI / 360; + var sinA = Math.sin(radA); + var cosA = Math.cos(radA); + var sinA2 = sinA * sinA; + var length = Math.sqrt(x * x + y * y + z * z); + var X = 0; + var Y = 0; + var Z = 1; + + if (length !== 0) { + X = x / length; + Y = y / length; + Z = z / length; + } + + var x2 = X * X; + var y2 = Y * Y; + var z2 = Z * Z; + var m11 = 1 - 2 * (y2 + z2) * sinA2; + m.m11 = m11; + m.a = m11; + var m12 = 2 * (x * y * sinA2 + z * sinA * cosA); + m.m12 = m12; + m.b = m12; + m.m13 = 2 * (x * z * sinA2 - y * sinA * cosA); + var m21 = 2 * (y * x * sinA2 - z * sinA * cosA); + m.m21 = m21; + m.c = m21; + var m22 = 1 - 2 * (z2 + x2) * sinA2; + m.m22 = m22; + m.d = m22; + m.m23 = 2 * (y * z * sinA2 + x * sinA * cosA); + m.m31 = 2 * (z * x * sinA2 + y * sinA * cosA); + m.m32 = 2 * (z * y * sinA2 - x * sinA * cosA); + m.m33 = 1 - 2 * (x2 + y2) * sinA2; + m.m14 = 0; + m.m24 = 0; + m.m34 = 0; + m.m41 = 0; + m.e = 0; + m.m42 = 0; + m.f = 0; + m.m43 = 0; + m.m44 = 1; + return m; + } + + function Scale(x, y, z) { + var m = new CSSMatrix(); + m.m11 = x; + m.a = x; + m.m22 = y; + m.d = y; + m.m33 = z; + return m; + } + + function SkewX(angle) { + var radA = angle * Math.PI / 180; + var m = new CSSMatrix(); + var t = Math.tan(radA); + m.m21 = t; + m.c = t; + return m; + } + + function SkewY(angle) { + var radA = angle * Math.PI / 180; + var m = new CSSMatrix(); + var t = Math.tan(radA); + m.m12 = t; + m.b = t; + return m; + } + + function Multiply(m1, m2) { + var m11 = m2.m11 * m1.m11 + m2.m12 * m1.m21 + m2.m13 * m1.m31 + m2.m14 * m1.m41; + var m12 = m2.m11 * m1.m12 + m2.m12 * m1.m22 + m2.m13 * m1.m32 + m2.m14 * m1.m42; + var m13 = m2.m11 * m1.m13 + m2.m12 * m1.m23 + m2.m13 * m1.m33 + m2.m14 * m1.m43; + var m14 = m2.m11 * m1.m14 + m2.m12 * m1.m24 + m2.m13 * m1.m34 + m2.m14 * m1.m44; + var m21 = m2.m21 * m1.m11 + m2.m22 * m1.m21 + m2.m23 * m1.m31 + m2.m24 * m1.m41; + var m22 = m2.m21 * m1.m12 + m2.m22 * m1.m22 + m2.m23 * m1.m32 + m2.m24 * m1.m42; + var m23 = m2.m21 * m1.m13 + m2.m22 * m1.m23 + m2.m23 * m1.m33 + m2.m24 * m1.m43; + var m24 = m2.m21 * m1.m14 + m2.m22 * m1.m24 + m2.m23 * m1.m34 + m2.m24 * m1.m44; + var m31 = m2.m31 * m1.m11 + m2.m32 * m1.m21 + m2.m33 * m1.m31 + m2.m34 * m1.m41; + var m32 = m2.m31 * m1.m12 + m2.m32 * m1.m22 + m2.m33 * m1.m32 + m2.m34 * m1.m42; + var m33 = m2.m31 * m1.m13 + m2.m32 * m1.m23 + m2.m33 * m1.m33 + m2.m34 * m1.m43; + var m34 = m2.m31 * m1.m14 + m2.m32 * m1.m24 + m2.m33 * m1.m34 + m2.m34 * m1.m44; + var m41 = m2.m41 * m1.m11 + m2.m42 * m1.m21 + m2.m43 * m1.m31 + m2.m44 * m1.m41; + var m42 = m2.m41 * m1.m12 + m2.m42 * m1.m22 + m2.m43 * m1.m32 + m2.m44 * m1.m42; + var m43 = m2.m41 * m1.m13 + m2.m42 * m1.m23 + m2.m43 * m1.m33 + m2.m44 * m1.m43; + var m44 = m2.m41 * m1.m14 + m2.m42 * m1.m24 + m2.m43 * m1.m34 + m2.m44 * m1.m44; + return new CSSMatrix([m11, m21, m31, m41, m12, m22, m32, m42, m13, m23, m33, m43, m14, m24, m34, m44]); + } + + function fromMatrix(m) { + return new CSSMatrix([m.m11, m.m21, m.m31, m.m41, m.m12, m.m22, m.m32, m.m42, m.m13, m.m23, m.m33, m.m43, m.m14, m.m24, m.m34, m.m44]); + } + + function feedFromArray(m, array) { + var a = Array.from(array); + + if (a.length === 16) { + var m11 = a[0]; + var m21 = a[1]; + var m31 = a[2]; + var m41 = a[3]; + var m12 = a[4]; + var m22 = a[5]; + var m32 = a[6]; + var m42 = a[7]; + var m13 = a[8]; + var m23 = a[9]; + var m33 = a[10]; + var m43 = a[11]; + var m14 = a[12]; + var m24 = a[13]; + var m34 = a[14]; + var m44 = a[15]; + m.m11 = m11; + m.a = m11; + m.m21 = m21; + m.c = m21; + m.m31 = m31; + m.m41 = m41; + m.e = m41; + m.m12 = m12; + m.b = m12; + m.m22 = m22; + m.d = m22; + m.m32 = m32; + m.m42 = m42; + m.f = m42; + m.m13 = m13; + m.m23 = m23; + m.m33 = m33; + m.m43 = m43; + m.m14 = m14; + m.m24 = m24; + m.m34 = m34; + m.m44 = m44; + } else if (a.length === 6) { + var m11$1 = a[0]; + var m12$1 = a[1]; + var m21$1 = a[2]; + var m22$1 = a[3]; + var m14$1 = a[4]; + var m24$1 = a[5]; + m.m11 = m11$1; + m.a = m11$1; + m.m12 = m12$1; + m.b = m12$1; + m.m21 = m21$1; + m.c = m21$1; + m.m22 = m22$1; + m.d = m22$1; + m.m14 = m14$1; + m.e = m14$1; + m.m24 = m24$1; + m.f = m24$1; + } else { + throw new TypeError('CSSMatrix: expecting a 6/16 values Array'); + } + + return m; + } + + function fromArray(a) { + return feedFromArray(new CSSMatrix(), a); + } + + CSSMatrixProto.setMatrixValue = function setMatrixValue(source) { + var m = this; + + if (!source || !source.length) { + return m; + } + + if (source.length && typeof source[0] === 'string' && source[0].length) { + var string = String(source[0]).trim(); + var type = ''; + var values = []; + + if (string === 'none') { + return m; + } + + type = string.slice(0, string.indexOf('(')); + values = string.slice(type === 'matrix' ? 7 : 9, -1).split(',').map(function (n) { + return Math.abs(n) < 1e-6 ? 0 : +n; + }); + + if ([6, 16].indexOf(values.length) > -1) { + feedFromArray(m, values); + } else { + throw new TypeError('CSSMatrix: expecting valid CSS matrix() / matrix3d() syntax'); + } + } else if (source[0] instanceof CSSMatrix) { + feedFromArray(m, source[0].toArray()); + } else if (Array.isArray(source[0])) { + feedFromArray(m, source[0]); + } else if (Array.isArray(source)) { + feedFromArray(m, source); + } + + return m; + }; + + CSSMatrixProto.toString = function toString() { + var m = this; + var type = m.is2D ? 'matrix' : 'matrix3d'; + return type + "(" + m.toArray(1).join(',') + ")"; + }; + + CSSMatrixProto.toArray = function toArray(transposed) { + var m = this; + var result; + + if (m.is2D) { + result = [m.a, m.b, m.c, m.d, m.e, m.f]; + } else if (transposed) { + result = [m.m11, m.m12, m.m13, m.m14, m.m21, m.m22, m.m23, m.m24, m.m31, m.m32, m.m33, m.m34, m.m41, m.m42, m.m43, m.m44]; + } else { + result = [m.m11, m.m21, m.m31, m.m41, m.m12, m.m22, m.m32, m.m42, m.m13, m.m23, m.m33, m.m43, m.m14, m.m24, m.m34, m.m44]; + } + + return result; + }; + + CSSMatrixProto.multiply = function multiply(m2) { + return Multiply(this, m2); + }; + + CSSMatrixProto.translate = function translate(x, y, z) { + var X = x; + var Y = y; + var Z = z; + + if (Z == null) { + Z = 0; + } + + if (Y == null) { + Y = 0; + } + + return Multiply(this, Translate(X, Y, Z)); + }; + + CSSMatrixProto.scale = function scale(x, y, z) { + var X = x; + var Y = y; + var Z = z; + + if (Y == null) { + Y = x; + } + + if (Z == null) { + Z = x; + } + + return Multiply(this, Scale(X, Y, Z)); + }; + + CSSMatrixProto.rotate = function rotate(rx, ry, rz) { + var RX = rx; + var RY = ry; + var RZ = rz; + + if (RY == null) { + RY = 0; + } + + if (RZ == null) { + RZ = RX; + RX = 0; + } + + return Multiply(this, Rotate(RX, RY, RZ)); + }; + + CSSMatrixProto.rotateAxisAngle = function rotateAxisAngle(x, y, z, angle) { + if (arguments.length !== 4) { + throw new TypeError('CSSMatrix: expecting 4 values'); + } + + return Multiply(this, RotateAxisAngle(x, y, z, angle)); + }; + + CSSMatrixProto.skewX = function skewX(angle) { + return Multiply(this, SkewX(angle)); + }; + + CSSMatrixProto.skewY = function skewY(angle) { + return Multiply(this, SkewY(angle)); + }; + + CSSMatrixProto.setIdentity = function setIdentity() { + var identity = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]; + return feedFromArray(this, identity); + }; + + CSSMatrixProto.transformPoint = function transformPoint(v) { + var M = this; + var m = Translate(v.x, v.y, v.z); + m.m44 = v.w || 1; + m = M.multiply(m); + return { + x: m.m41, + y: m.m42, + z: m.m43, + w: m.m44 + }; + }; + + CSSMatrixProto.transform = function transform(t) { + var m = this; + var x = m.m11 * t.x + m.m12 * t.y + m.m13 * t.z + m.m14 * t.w; + var y = m.m21 * t.x + m.m22 * t.y + m.m23 * t.z + m.m24 * t.w; + var z = m.m31 * t.x + m.m32 * t.y + m.m33 * t.z + m.m34 * t.w; + var w = m.m41 * t.x + m.m42 * t.y + m.m43 * t.z + m.m44 * t.w; + return { + x: x / w, + y: y / w, + z: z / w, + w: w + }; + }; + + CSSMatrix.Translate = Translate; + CSSMatrix.Rotate = Rotate; + CSSMatrix.RotateAxisAngle = RotateAxisAngle; + CSSMatrix.Scale = Scale; + CSSMatrix.SkewX = SkewX; + CSSMatrix.SkewY = SkewY; + CSSMatrix.Multiply = Multiply; + CSSMatrix.fromMatrix = fromMatrix; + CSSMatrix.fromArray = fromArray; + CSSMatrix.feedFromArray = feedFromArray; + return CSSMatrix; +}); + +/***/ }), +/* 54 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +__w_pdfjs_require__(55); +__w_pdfjs_require__(75); +var path = __w_pdfjs_require__(43); +module.exports = path.Object.fromEntries; + +/***/ }), +/* 55 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +"use strict"; + +var toIndexedObject = __w_pdfjs_require__(16); +var addToUnscopables = __w_pdfjs_require__(56); +var Iterators = __w_pdfjs_require__(66); +var InternalStateModule = __w_pdfjs_require__(33); +var defineIterator = __w_pdfjs_require__(67); +var ARRAY_ITERATOR = 'Array Iterator'; +var setInternalState = InternalStateModule.set; +var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR); +module.exports = defineIterator(Array, 'Array', function (iterated, kind) { + setInternalState(this, { + type: ARRAY_ITERATOR, + target: toIndexedObject(iterated), + index: 0, + kind: kind + }); +}, function () { + var state = getInternalState(this); + var target = state.target; + var kind = state.kind; + var index = state.index++; + if (!target || index >= target.length) { + state.target = undefined; + return { + value: undefined, + done: true + }; + } + if (kind == 'keys') + return { + value: index, + done: false + }; + if (kind == 'values') + return { + value: target[index], + done: false + }; + return { + value: [ + index, + target[index] + ], + done: false + }; +}, 'values'); +Iterators.Arguments = Iterators.Array; +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + +/***/ }), +/* 56 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var wellKnownSymbol = __w_pdfjs_require__(57); +var create = __w_pdfjs_require__(62); +var definePropertyModule = __w_pdfjs_require__(27); +var UNSCOPABLES = wellKnownSymbol('unscopables'); +var ArrayPrototype = Array.prototype; +if (ArrayPrototype[UNSCOPABLES] == undefined) { + definePropertyModule.f(ArrayPrototype, UNSCOPABLES, { + configurable: true, + value: create(null) + }); +} +module.exports = function (key) { + ArrayPrototype[UNSCOPABLES][key] = true; +}; + +/***/ }), +/* 57 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var global = __w_pdfjs_require__(10); +var shared = __w_pdfjs_require__(36); +var has = __w_pdfjs_require__(22); +var uid = __w_pdfjs_require__(38); +var NATIVE_SYMBOL = __w_pdfjs_require__(58); +var USE_SYMBOL_AS_UID = __w_pdfjs_require__(61); +var WellKnownSymbolsStore = shared('wks'); +var Symbol = global.Symbol; +var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid; +module.exports = function (name) { + if (!has(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) { + if (NATIVE_SYMBOL && has(Symbol, name)) { + WellKnownSymbolsStore[name] = Symbol[name]; + } else { + WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name); + } + } + return WellKnownSymbolsStore[name]; +}; + +/***/ }), +/* 58 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var V8_VERSION = __w_pdfjs_require__(59); +var fails = __w_pdfjs_require__(13); +module.exports = !!Object.getOwnPropertySymbols && !fails(function () { + var symbol = Symbol(); + return !String(symbol) || !(Object(symbol) instanceof Symbol) || !Symbol.sham && V8_VERSION && V8_VERSION < 41; +}); + +/***/ }), +/* 59 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var global = __w_pdfjs_require__(10); +var userAgent = __w_pdfjs_require__(60); +var process = global.process; +var versions = process && process.versions; +var v8 = versions && versions.v8; +var match, version; +if (v8) { + match = v8.split('.'); + version = match[0] < 4 ? 1 : match[0] + match[1]; +} else if (userAgent) { + match = userAgent.match(/Edge\/(\d+)/); + if (!match || match[1] >= 74) { + match = userAgent.match(/Chrome\/(\d+)/); + if (match) + version = match[1]; + } +} +module.exports = version && +version; + +/***/ }), +/* 60 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var getBuiltIn = __w_pdfjs_require__(42); +module.exports = getBuiltIn('navigator', 'userAgent') || ''; + +/***/ }), +/* 61 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var NATIVE_SYMBOL = __w_pdfjs_require__(58); +module.exports = NATIVE_SYMBOL && !Symbol.sham && typeof Symbol.iterator == 'symbol'; + +/***/ }), +/* 62 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var anObject = __w_pdfjs_require__(28); +var defineProperties = __w_pdfjs_require__(63); +var enumBugKeys = __w_pdfjs_require__(50); +var hiddenKeys = __w_pdfjs_require__(39); +var html = __w_pdfjs_require__(65); +var documentCreateElement = __w_pdfjs_require__(25); +var sharedKey = __w_pdfjs_require__(35); +var GT = '>'; +var LT = '<'; +var PROTOTYPE = 'prototype'; +var SCRIPT = 'script'; +var IE_PROTO = sharedKey('IE_PROTO'); +var EmptyConstructor = function () { +}; +var scriptTag = function (content) { + return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; +}; +var NullProtoObjectViaActiveX = function (activeXDocument) { + activeXDocument.write(scriptTag('')); + activeXDocument.close(); + var temp = activeXDocument.parentWindow.Object; + activeXDocument = null; + return temp; +}; +var NullProtoObjectViaIFrame = function () { + var iframe = documentCreateElement('iframe'); + var JS = 'java' + SCRIPT + ':'; + var iframeDocument; + iframe.style.display = 'none'; + html.appendChild(iframe); + iframe.src = String(JS); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(scriptTag('document.F=Object')); + iframeDocument.close(); + return iframeDocument.F; +}; +var activeXDocument; +var NullProtoObject = function () { + try { + activeXDocument = document.domain && new ActiveXObject('htmlfile'); + } catch (error) { + } + NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame(); + var length = enumBugKeys.length; + while (length--) + delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; + return NullProtoObject(); +}; +hiddenKeys[IE_PROTO] = true; +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + EmptyConstructor[PROTOTYPE] = anObject(O); + result = new EmptyConstructor(); + EmptyConstructor[PROTOTYPE] = null; + result[IE_PROTO] = O; + } else + result = NullProtoObject(); + return Properties === undefined ? result : defineProperties(result, Properties); +}; + +/***/ }), +/* 63 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var DESCRIPTORS = __w_pdfjs_require__(12); +var definePropertyModule = __w_pdfjs_require__(27); +var anObject = __w_pdfjs_require__(28); +var objectKeys = __w_pdfjs_require__(64); +module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var keys = objectKeys(Properties); + var length = keys.length; + var index = 0; + var key; + while (length > index) + definePropertyModule.f(O, key = keys[index++], Properties[key]); + return O; +}; + +/***/ }), +/* 64 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var internalObjectKeys = __w_pdfjs_require__(45); +var enumBugKeys = __w_pdfjs_require__(50); +module.exports = Object.keys || function keys(O) { + return internalObjectKeys(O, enumBugKeys); +}; + +/***/ }), +/* 65 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var getBuiltIn = __w_pdfjs_require__(42); +module.exports = getBuiltIn('document', 'documentElement'); + +/***/ }), +/* 66 */ +/***/ ((module) => { + +module.exports = {}; + +/***/ }), +/* 67 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +"use strict"; + +var $ = __w_pdfjs_require__(9); +var createIteratorConstructor = __w_pdfjs_require__(68); +var getPrototypeOf = __w_pdfjs_require__(70); +var setPrototypeOf = __w_pdfjs_require__(73); +var setToStringTag = __w_pdfjs_require__(72); +var createNonEnumerableProperty = __w_pdfjs_require__(26); +var redefine = __w_pdfjs_require__(29); +var wellKnownSymbol = __w_pdfjs_require__(57); +var IS_PURE = __w_pdfjs_require__(37); +var Iterators = __w_pdfjs_require__(66); +var IteratorsCore = __w_pdfjs_require__(69); +var IteratorPrototype = IteratorsCore.IteratorPrototype; +var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS; +var ITERATOR = wellKnownSymbol('iterator'); +var KEYS = 'keys'; +var VALUES = 'values'; +var ENTRIES = 'entries'; +var returnThis = function () { + return this; +}; +module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { + createIteratorConstructor(IteratorConstructor, NAME, next); + var getIterationMethod = function (KIND) { + if (KIND === DEFAULT && defaultIterator) + return defaultIterator; + if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) + return IterablePrototype[KIND]; + switch (KIND) { + case KEYS: + return function keys() { + return new IteratorConstructor(this, KIND); + }; + case VALUES: + return function values() { + return new IteratorConstructor(this, KIND); + }; + case ENTRIES: + return function entries() { + return new IteratorConstructor(this, KIND); + }; + } + return function () { + return new IteratorConstructor(this); + }; + }; + var TO_STRING_TAG = NAME + ' Iterator'; + var INCORRECT_VALUES_NAME = false; + var IterablePrototype = Iterable.prototype; + var nativeIterator = IterablePrototype[ITERATOR] || IterablePrototype['@@iterator'] || DEFAULT && IterablePrototype[DEFAULT]; + var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT); + var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator; + var CurrentIteratorPrototype, methods, KEY; + if (anyNativeIterator) { + CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable())); + if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) { + if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) { + if (setPrototypeOf) { + setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype); + } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') { + createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis); + } + } + setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true); + if (IS_PURE) + Iterators[TO_STRING_TAG] = returnThis; + } + } + if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) { + INCORRECT_VALUES_NAME = true; + defaultIterator = function values() { + return nativeIterator.call(this); + }; + } + if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) { + createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator); + } + Iterators[NAME] = defaultIterator; + if (DEFAULT) { + methods = { + values: getIterationMethod(VALUES), + keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), + entries: getIterationMethod(ENTRIES) + }; + if (FORCED) + for (KEY in methods) { + if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { + redefine(IterablePrototype, KEY, methods[KEY]); + } + } + else + $({ + target: NAME, + proto: true, + forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME + }, methods); + } + return methods; +}; + +/***/ }), +/* 68 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +"use strict"; + +var IteratorPrototype = __w_pdfjs_require__(69).IteratorPrototype; +var create = __w_pdfjs_require__(62); +var createPropertyDescriptor = __w_pdfjs_require__(15); +var setToStringTag = __w_pdfjs_require__(72); +var Iterators = __w_pdfjs_require__(66); +var returnThis = function () { + return this; +}; +module.exports = function (IteratorConstructor, NAME, next) { + var TO_STRING_TAG = NAME + ' Iterator'; + IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) }); + setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true); + Iterators[TO_STRING_TAG] = returnThis; + return IteratorConstructor; +}; + +/***/ }), +/* 69 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +"use strict"; + +var fails = __w_pdfjs_require__(13); +var getPrototypeOf = __w_pdfjs_require__(70); +var createNonEnumerableProperty = __w_pdfjs_require__(26); +var has = __w_pdfjs_require__(22); +var wellKnownSymbol = __w_pdfjs_require__(57); +var IS_PURE = __w_pdfjs_require__(37); +var ITERATOR = wellKnownSymbol('iterator'); +var BUGGY_SAFARI_ITERATORS = false; +var returnThis = function () { + return this; +}; +var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator; +if ([].keys) { + arrayIterator = [].keys(); + if (!('next' in arrayIterator)) + BUGGY_SAFARI_ITERATORS = true; + else { + PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator)); + if (PrototypeOfArrayIteratorPrototype !== Object.prototype) + IteratorPrototype = PrototypeOfArrayIteratorPrototype; + } +} +var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () { + var test = {}; + return IteratorPrototype[ITERATOR].call(test) !== test; +}); +if (NEW_ITERATOR_PROTOTYPE) + IteratorPrototype = {}; +if ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) { + createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis); +} +module.exports = { + IteratorPrototype: IteratorPrototype, + BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS +}; + +/***/ }), +/* 70 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var has = __w_pdfjs_require__(22); +var toObject = __w_pdfjs_require__(23); +var sharedKey = __w_pdfjs_require__(35); +var CORRECT_PROTOTYPE_GETTER = __w_pdfjs_require__(71); +var IE_PROTO = sharedKey('IE_PROTO'); +var ObjectPrototype = Object.prototype; +module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) { + O = toObject(O); + if (has(O, IE_PROTO)) + return O[IE_PROTO]; + if (typeof O.constructor == 'function' && O instanceof O.constructor) { + return O.constructor.prototype; + } + return O instanceof Object ? ObjectPrototype : null; +}; + +/***/ }), +/* 71 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var fails = __w_pdfjs_require__(13); +module.exports = !fails(function () { + function F() { + } + F.prototype.constructor = null; + return Object.getPrototypeOf(new F()) !== F.prototype; +}); + +/***/ }), +/* 72 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var defineProperty = __w_pdfjs_require__(27).f; +var has = __w_pdfjs_require__(22); +var wellKnownSymbol = __w_pdfjs_require__(57); +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); +module.exports = function (it, TAG, STATIC) { + if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) { + defineProperty(it, TO_STRING_TAG, { + configurable: true, + value: TAG + }); + } +}; + +/***/ }), +/* 73 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var anObject = __w_pdfjs_require__(28); +var aPossiblePrototype = __w_pdfjs_require__(74); +module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () { + var CORRECT_SETTER = false; + var test = {}; + var setter; + try { + setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set; + setter.call(test, []); + CORRECT_SETTER = test instanceof Array; + } catch (error) { + } + return function setPrototypeOf(O, proto) { + anObject(O); + aPossiblePrototype(proto); + if (CORRECT_SETTER) + setter.call(O, proto); + else + O.__proto__ = proto; + return O; + }; +}() : undefined); + +/***/ }), +/* 74 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var isObject = __w_pdfjs_require__(21); +module.exports = function (it) { + if (!isObject(it) && it !== null) { + throw TypeError("Can't set " + String(it) + ' as a prototype'); + } + return it; +}; + +/***/ }), +/* 75 */ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var $ = __w_pdfjs_require__(9); +var iterate = __w_pdfjs_require__(76); +var createProperty = __w_pdfjs_require__(84); +$({ + target: 'Object', + stat: true +}, { + fromEntries: function fromEntries(iterable) { + var obj = {}; + iterate(iterable, function (k, v) { + createProperty(obj, k, v); + }, { AS_ENTRIES: true }); + return obj; + } +}); + +/***/ }), +/* 76 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var anObject = __w_pdfjs_require__(28); +var isArrayIteratorMethod = __w_pdfjs_require__(77); +var toLength = __w_pdfjs_require__(47); +var bind = __w_pdfjs_require__(78); +var getIteratorMethod = __w_pdfjs_require__(80); +var iteratorClose = __w_pdfjs_require__(83); +var Result = function (stopped, result) { + this.stopped = stopped; + this.result = result; +}; +module.exports = function (iterable, unboundFunction, options) { + var that = options && options.that; + var AS_ENTRIES = !!(options && options.AS_ENTRIES); + var IS_ITERATOR = !!(options && options.IS_ITERATOR); + var INTERRUPTED = !!(options && options.INTERRUPTED); + var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED); + var iterator, iterFn, index, length, result, next, step; + var stop = function (condition) { + if (iterator) + iteratorClose(iterator); + return new Result(true, condition); + }; + var callFn = function (value) { + if (AS_ENTRIES) { + anObject(value); + return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]); + } + return INTERRUPTED ? fn(value, stop) : fn(value); + }; + if (IS_ITERATOR) { + iterator = iterable; + } else { + iterFn = getIteratorMethod(iterable); + if (typeof iterFn != 'function') + throw TypeError('Target is not iterable'); + if (isArrayIteratorMethod(iterFn)) { + for (index = 0, length = toLength(iterable.length); length > index; index++) { + result = callFn(iterable[index]); + if (result && result instanceof Result) + return result; + } + return new Result(false); + } + iterator = iterFn.call(iterable); + } + next = iterator.next; + while (!(step = next.call(iterator)).done) { + try { + result = callFn(step.value); + } catch (error) { + iteratorClose(iterator); + throw error; + } + if (typeof result == 'object' && result && result instanceof Result) + return result; + } + return new Result(false); +}; + +/***/ }), +/* 77 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var wellKnownSymbol = __w_pdfjs_require__(57); +var Iterators = __w_pdfjs_require__(66); +var ITERATOR = wellKnownSymbol('iterator'); +var ArrayPrototype = Array.prototype; +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it); +}; + +/***/ }), +/* 78 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var aFunction = __w_pdfjs_require__(79); +module.exports = function (fn, that, length) { + aFunction(fn); + if (that === undefined) + return fn; + switch (length) { + case 0: + return function () { + return fn.call(that); + }; + case 1: + return function (a) { + return fn.call(that, a); + }; + case 2: + return function (a, b) { + return fn.call(that, a, b); + }; + case 3: + return function (a, b, c) { + return fn.call(that, a, b, c); + }; + } + return function () { + return fn.apply(that, arguments); + }; +}; + +/***/ }), +/* 79 */ +/***/ ((module) => { + +module.exports = function (it) { + if (typeof it != 'function') { + throw TypeError(String(it) + ' is not a function'); + } + return it; +}; + +/***/ }), +/* 80 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var classof = __w_pdfjs_require__(81); +var Iterators = __w_pdfjs_require__(66); +var wellKnownSymbol = __w_pdfjs_require__(57); +var ITERATOR = wellKnownSymbol('iterator'); +module.exports = function (it) { + if (it != undefined) + return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; +}; + +/***/ }), +/* 81 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var TO_STRING_TAG_SUPPORT = __w_pdfjs_require__(82); +var classofRaw = __w_pdfjs_require__(18); +var wellKnownSymbol = __w_pdfjs_require__(57); +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); +var CORRECT_ARGUMENTS = classofRaw(function () { + return arguments; +}()) == 'Arguments'; +var tryGet = function (it, key) { + try { + return it[key]; + } catch (error) { + } +}; +module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) { + var O, tag, result; + return it === undefined ? 'Undefined' : it === null ? 'Null' : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag : CORRECT_ARGUMENTS ? classofRaw(O) : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result; +}; + +/***/ }), +/* 82 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var wellKnownSymbol = __w_pdfjs_require__(57); +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); +var test = {}; +test[TO_STRING_TAG] = 'z'; +module.exports = String(test) === '[object z]'; + +/***/ }), +/* 83 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var anObject = __w_pdfjs_require__(28); +module.exports = function (iterator) { + var returnMethod = iterator['return']; + if (returnMethod !== undefined) { + return anObject(returnMethod.call(iterator)).value; + } +}; + +/***/ }), +/* 84 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +"use strict"; + +var toPrimitive = __w_pdfjs_require__(20); +var definePropertyModule = __w_pdfjs_require__(27); +var createPropertyDescriptor = __w_pdfjs_require__(15); +module.exports = function (object, key, value) { + var propertyKey = toPrimitive(key); + if (propertyKey in object) + definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value)); + else + object[propertyKey] = value; +}; + +/***/ }), +/* 85 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +__w_pdfjs_require__(86); +__w_pdfjs_require__(87); +__w_pdfjs_require__(89); +__w_pdfjs_require__(106); +__w_pdfjs_require__(107); +__w_pdfjs_require__(108); +__w_pdfjs_require__(109); +__w_pdfjs_require__(111); +var path = __w_pdfjs_require__(43); +module.exports = path.Promise; + +/***/ }), +/* 86 */ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => { + +"use strict"; + +var $ = __w_pdfjs_require__(9); +var getPrototypeOf = __w_pdfjs_require__(70); +var setPrototypeOf = __w_pdfjs_require__(73); +var create = __w_pdfjs_require__(62); +var createNonEnumerableProperty = __w_pdfjs_require__(26); +var createPropertyDescriptor = __w_pdfjs_require__(15); +var iterate = __w_pdfjs_require__(76); +var $AggregateError = function AggregateError(errors, message) { + var that = this; + if (!(that instanceof $AggregateError)) + return new $AggregateError(errors, message); + if (setPrototypeOf) { + that = setPrototypeOf(new Error(undefined), getPrototypeOf(that)); + } + if (message !== undefined) + createNonEnumerableProperty(that, 'message', String(message)); + var errorsArray = []; + iterate(errors, errorsArray.push, { that: errorsArray }); + createNonEnumerableProperty(that, 'errors', errorsArray); + return that; +}; +$AggregateError.prototype = create(Error.prototype, { + constructor: createPropertyDescriptor(5, $AggregateError), + message: createPropertyDescriptor(5, ''), + name: createPropertyDescriptor(5, 'AggregateError') +}); +$({ global: true }, { AggregateError: $AggregateError }); + +/***/ }), +/* 87 */ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var TO_STRING_TAG_SUPPORT = __w_pdfjs_require__(82); +var redefine = __w_pdfjs_require__(29); +var toString = __w_pdfjs_require__(88); +if (!TO_STRING_TAG_SUPPORT) { + redefine(Object.prototype, 'toString', toString, { unsafe: true }); +} + +/***/ }), +/* 88 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +"use strict"; + +var TO_STRING_TAG_SUPPORT = __w_pdfjs_require__(82); +var classof = __w_pdfjs_require__(81); +module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() { + return '[object ' + classof(this) + ']'; +}; + +/***/ }), +/* 89 */ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => { + +"use strict"; + +var $ = __w_pdfjs_require__(9); +var IS_PURE = __w_pdfjs_require__(37); +var global = __w_pdfjs_require__(10); +var getBuiltIn = __w_pdfjs_require__(42); +var NativePromise = __w_pdfjs_require__(90); +var redefine = __w_pdfjs_require__(29); +var redefineAll = __w_pdfjs_require__(91); +var setPrototypeOf = __w_pdfjs_require__(73); +var setToStringTag = __w_pdfjs_require__(72); +var setSpecies = __w_pdfjs_require__(92); +var isObject = __w_pdfjs_require__(21); +var aFunction = __w_pdfjs_require__(79); +var anInstance = __w_pdfjs_require__(93); +var inspectSource = __w_pdfjs_require__(31); +var iterate = __w_pdfjs_require__(76); +var checkCorrectnessOfIteration = __w_pdfjs_require__(94); +var speciesConstructor = __w_pdfjs_require__(95); +var task = __w_pdfjs_require__(96).set; +var microtask = __w_pdfjs_require__(99); +var promiseResolve = __w_pdfjs_require__(101); +var hostReportErrors = __w_pdfjs_require__(103); +var newPromiseCapabilityModule = __w_pdfjs_require__(102); +var perform = __w_pdfjs_require__(104); +var InternalStateModule = __w_pdfjs_require__(33); +var isForced = __w_pdfjs_require__(52); +var wellKnownSymbol = __w_pdfjs_require__(57); +var IS_BROWSER = __w_pdfjs_require__(105); +var IS_NODE = __w_pdfjs_require__(98); +var V8_VERSION = __w_pdfjs_require__(59); +var SPECIES = wellKnownSymbol('species'); +var PROMISE = 'Promise'; +var getInternalState = InternalStateModule.get; +var setInternalState = InternalStateModule.set; +var getInternalPromiseState = InternalStateModule.getterFor(PROMISE); +var NativePromisePrototype = NativePromise && NativePromise.prototype; +var PromiseConstructor = NativePromise; +var PromiseConstructorPrototype = NativePromisePrototype; +var TypeError = global.TypeError; +var document = global.document; +var process = global.process; +var newPromiseCapability = newPromiseCapabilityModule.f; +var newGenericPromiseCapability = newPromiseCapability; +var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent); +var NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function'; +var UNHANDLED_REJECTION = 'unhandledrejection'; +var REJECTION_HANDLED = 'rejectionhandled'; +var PENDING = 0; +var FULFILLED = 1; +var REJECTED = 2; +var HANDLED = 1; +var UNHANDLED = 2; +var SUBCLASSING = false; +var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen; +var FORCED = isForced(PROMISE, function () { + var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor); + var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor); + if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) + return true; + if (IS_PURE && !PromiseConstructorPrototype['finally']) + return true; + if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) + return false; + var promise = new PromiseConstructor(function (resolve) { + resolve(1); + }); + var FakePromise = function (exec) { + exec(function () { + }, function () { + }); + }; + var constructor = promise.constructor = {}; + constructor[SPECIES] = FakePromise; + SUBCLASSING = promise.then(function () { + }) instanceof FakePromise; + if (!SUBCLASSING) + return true; + return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT; +}); +var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) { + PromiseConstructor.all(iterable)['catch'](function () { + }); +}); +var isThenable = function (it) { + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var notify = function (state, isReject) { + if (state.notified) + return; + state.notified = true; + var chain = state.reactions; + microtask(function () { + var value = state.value; + var ok = state.state == FULFILLED; + var index = 0; + while (chain.length > index) { + var reaction = chain[index++]; + var handler = ok ? reaction.ok : reaction.fail; + var resolve = reaction.resolve; + var reject = reaction.reject; + var domain = reaction.domain; + var result, then, exited; + try { + if (handler) { + if (!ok) { + if (state.rejection === UNHANDLED) + onHandleUnhandled(state); + state.rejection = HANDLED; + } + if (handler === true) + result = value; + else { + if (domain) + domain.enter(); + result = handler(value); + if (domain) { + domain.exit(); + exited = true; + } + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if (then = isThenable(result)) { + then.call(result, resolve, reject); + } else + resolve(result); + } else + reject(value); + } catch (error) { + if (domain && !exited) + domain.exit(); + reject(error); + } + } + state.reactions = []; + state.notified = false; + if (isReject && !state.rejection) + onUnhandled(state); + }); +}; +var dispatchEvent = function (name, promise, reason) { + var event, handler; + if (DISPATCH_EVENT) { + event = document.createEvent('Event'); + event.promise = promise; + event.reason = reason; + event.initEvent(name, false, true); + global.dispatchEvent(event); + } else + event = { + promise: promise, + reason: reason + }; + if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) + handler(event); + else if (name === UNHANDLED_REJECTION) + hostReportErrors('Unhandled promise rejection', reason); +}; +var onUnhandled = function (state) { + task.call(global, function () { + var promise = state.facade; + var value = state.value; + var IS_UNHANDLED = isUnhandled(state); + var result; + if (IS_UNHANDLED) { + result = perform(function () { + if (IS_NODE) { + process.emit('unhandledRejection', value, promise); + } else + dispatchEvent(UNHANDLED_REJECTION, promise, value); + }); + state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED; + if (result.error) + throw result.value; + } + }); +}; +var isUnhandled = function (state) { + return state.rejection !== HANDLED && !state.parent; +}; +var onHandleUnhandled = function (state) { + task.call(global, function () { + var promise = state.facade; + if (IS_NODE) { + process.emit('rejectionHandled', promise); + } else + dispatchEvent(REJECTION_HANDLED, promise, state.value); + }); +}; +var bind = function (fn, state, unwrap) { + return function (value) { + fn(state, value, unwrap); + }; +}; +var internalReject = function (state, value, unwrap) { + if (state.done) + return; + state.done = true; + if (unwrap) + state = unwrap; + state.value = value; + state.state = REJECTED; + notify(state, true); +}; +var internalResolve = function (state, value, unwrap) { + if (state.done) + return; + state.done = true; + if (unwrap) + state = unwrap; + try { + if (state.facade === value) + throw TypeError("Promise can't be resolved itself"); + var then = isThenable(value); + if (then) { + microtask(function () { + var wrapper = { done: false }; + try { + then.call(value, bind(internalResolve, wrapper, state), bind(internalReject, wrapper, state)); + } catch (error) { + internalReject(wrapper, error, state); + } + }); + } else { + state.value = value; + state.state = FULFILLED; + notify(state, false); + } + } catch (error) { + internalReject({ done: false }, error, state); + } +}; +if (FORCED) { + PromiseConstructor = function Promise(executor) { + anInstance(this, PromiseConstructor, PROMISE); + aFunction(executor); + Internal.call(this); + var state = getInternalState(this); + try { + executor(bind(internalResolve, state), bind(internalReject, state)); + } catch (error) { + internalReject(state, error); + } + }; + PromiseConstructorPrototype = PromiseConstructor.prototype; + Internal = function Promise(executor) { + setInternalState(this, { + type: PROMISE, + done: false, + notified: false, + parent: false, + reactions: [], + rejection: false, + state: PENDING, + value: undefined + }); + }; + Internal.prototype = redefineAll(PromiseConstructorPrototype, { + then: function then(onFulfilled, onRejected) { + var state = getInternalPromiseState(this); + var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = IS_NODE ? process.domain : undefined; + state.parent = true; + state.reactions.push(reaction); + if (state.state != PENDING) + notify(state, false); + return reaction.promise; + }, + 'catch': function (onRejected) { + return this.then(undefined, onRejected); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + var state = getInternalState(promise); + this.promise = promise; + this.resolve = bind(internalResolve, state); + this.reject = bind(internalReject, state); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === PromiseConstructor || C === PromiseWrapper ? new OwnPromiseCapability(C) : newGenericPromiseCapability(C); + }; + if (!IS_PURE && typeof NativePromise == 'function' && NativePromisePrototype !== Object.prototype) { + nativeThen = NativePromisePrototype.then; + if (!SUBCLASSING) { + redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) { + var that = this; + return new PromiseConstructor(function (resolve, reject) { + nativeThen.call(that, resolve, reject); + }).then(onFulfilled, onRejected); + }, { unsafe: true }); + redefine(NativePromisePrototype, 'catch', PromiseConstructorPrototype['catch'], { unsafe: true }); + } + try { + delete NativePromisePrototype.constructor; + } catch (error) { + } + if (setPrototypeOf) { + setPrototypeOf(NativePromisePrototype, PromiseConstructorPrototype); + } + } +} +$({ + global: true, + wrap: true, + forced: FORCED +}, { Promise: PromiseConstructor }); +setToStringTag(PromiseConstructor, PROMISE, false, true); +setSpecies(PROMISE); +PromiseWrapper = getBuiltIn(PROMISE); +$({ + target: PROMISE, + stat: true, + forced: FORCED +}, { + reject: function reject(r) { + var capability = newPromiseCapability(this); + capability.reject.call(undefined, r); + return capability.promise; + } +}); +$({ + target: PROMISE, + stat: true, + forced: IS_PURE || FORCED +}, { + resolve: function resolve(x) { + return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x); + } +}); +$({ + target: PROMISE, + stat: true, + forced: INCORRECT_ITERATION +}, { + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var $promiseResolve = aFunction(C.resolve); + var values = []; + var counter = 0; + var remaining = 1; + iterate(iterable, function (promise) { + var index = counter++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + $promiseResolve.call(C, promise).then(function (value) { + if (alreadyCalled) + return; + alreadyCalled = true; + values[index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.error) + reject(result.value); + return capability.promise; + }, + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + var $promiseResolve = aFunction(C.resolve); + iterate(iterable, function (promise) { + $promiseResolve.call(C, promise).then(capability.resolve, reject); + }); + }); + if (result.error) + reject(result.value); + return capability.promise; + } +}); + +/***/ }), +/* 90 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var global = __w_pdfjs_require__(10); +module.exports = global.Promise; + +/***/ }), +/* 91 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var redefine = __w_pdfjs_require__(29); +module.exports = function (target, src, options) { + for (var key in src) + redefine(target, key, src[key], options); + return target; +}; + +/***/ }), +/* 92 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +"use strict"; + +var getBuiltIn = __w_pdfjs_require__(42); +var definePropertyModule = __w_pdfjs_require__(27); +var wellKnownSymbol = __w_pdfjs_require__(57); +var DESCRIPTORS = __w_pdfjs_require__(12); +var SPECIES = wellKnownSymbol('species'); +module.exports = function (CONSTRUCTOR_NAME) { + var Constructor = getBuiltIn(CONSTRUCTOR_NAME); + var defineProperty = definePropertyModule.f; + if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) { + defineProperty(Constructor, SPECIES, { + configurable: true, + get: function () { + return this; + } + }); + } +}; + +/***/ }), +/* 93 */ +/***/ ((module) => { + +module.exports = function (it, Constructor, name) { + if (!(it instanceof Constructor)) { + throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation'); + } + return it; +}; + +/***/ }), +/* 94 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var wellKnownSymbol = __w_pdfjs_require__(57); +var ITERATOR = wellKnownSymbol('iterator'); +var SAFE_CLOSING = false; +try { + var called = 0; + var iteratorWithReturn = { + next: function () { + return { done: !!called++ }; + }, + 'return': function () { + SAFE_CLOSING = true; + } + }; + iteratorWithReturn[ITERATOR] = function () { + return this; + }; + Array.from(iteratorWithReturn, function () { + throw 2; + }); +} catch (error) { +} +module.exports = function (exec, SKIP_CLOSING) { + if (!SKIP_CLOSING && !SAFE_CLOSING) + return false; + var ITERATION_SUPPORT = false; + try { + var object = {}; + object[ITERATOR] = function () { + return { + next: function () { + return { done: ITERATION_SUPPORT = true }; + } + }; + }; + exec(object); + } catch (error) { + } + return ITERATION_SUPPORT; +}; + +/***/ }), +/* 95 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var anObject = __w_pdfjs_require__(28); +var aFunction = __w_pdfjs_require__(79); +var wellKnownSymbol = __w_pdfjs_require__(57); +var SPECIES = wellKnownSymbol('species'); +module.exports = function (O, defaultConstructor) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S); +}; + +/***/ }), +/* 96 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var global = __w_pdfjs_require__(10); +var fails = __w_pdfjs_require__(13); +var bind = __w_pdfjs_require__(78); +var html = __w_pdfjs_require__(65); +var createElement = __w_pdfjs_require__(25); +var IS_IOS = __w_pdfjs_require__(97); +var IS_NODE = __w_pdfjs_require__(98); +var location = global.location; +var set = global.setImmediate; +var clear = global.clearImmediate; +var process = global.process; +var MessageChannel = global.MessageChannel; +var Dispatch = global.Dispatch; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var defer, channel, port; +var run = function (id) { + if (queue.hasOwnProperty(id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; +var runner = function (id) { + return function () { + run(id); + }; +}; +var listener = function (event) { + run(event.data); +}; +var post = function (id) { + global.postMessage(id + '', location.protocol + '//' + location.host); +}; +if (!set || !clear) { + set = function setImmediate(fn) { + var args = []; + var i = 1; + while (arguments.length > i) + args.push(arguments[i++]); + queue[++counter] = function () { + (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args); + }; + defer(counter); + return counter; + }; + clear = function clearImmediate(id) { + delete queue[id]; + }; + if (IS_NODE) { + defer = function (id) { + process.nextTick(runner(id)); + }; + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(runner(id)); + }; + } else if (MessageChannel && !IS_IOS) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = bind(port.postMessage, port, 1); + } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts && location && location.protocol !== 'file:' && !fails(post)) { + defer = post; + global.addEventListener('message', listener, false); + } else if (ONREADYSTATECHANGE in createElement('script')) { + defer = function (id) { + html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run(id); + }; + }; + } else { + defer = function (id) { + setTimeout(runner(id), 0); + }; + } +} +module.exports = { + set: set, + clear: clear +}; + +/***/ }), +/* 97 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var userAgent = __w_pdfjs_require__(60); +module.exports = /(?:iphone|ipod|ipad).*applewebkit/i.test(userAgent); + +/***/ }), +/* 98 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var classof = __w_pdfjs_require__(18); +var global = __w_pdfjs_require__(10); +module.exports = classof(global.process) == 'process'; + +/***/ }), +/* 99 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var global = __w_pdfjs_require__(10); +var getOwnPropertyDescriptor = __w_pdfjs_require__(11).f; +var macrotask = __w_pdfjs_require__(96).set; +var IS_IOS = __w_pdfjs_require__(97); +var IS_WEBOS_WEBKIT = __w_pdfjs_require__(100); +var IS_NODE = __w_pdfjs_require__(98); +var MutationObserver = global.MutationObserver || global.WebKitMutationObserver; +var document = global.document; +var process = global.process; +var Promise = global.Promise; +var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask'); +var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value; +var flush, head, last, notify, toggle, node, promise, then; +if (!queueMicrotask) { + flush = function () { + var parent, fn; + if (IS_NODE && (parent = process.domain)) + parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (error) { + if (head) + notify(); + else + last = undefined; + throw error; + } + } + last = undefined; + if (parent) + parent.enter(); + }; + if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) { + toggle = true; + node = document.createTextNode(''); + new MutationObserver(flush).observe(node, { characterData: true }); + notify = function () { + node.data = toggle = !toggle; + }; + } else if (Promise && Promise.resolve) { + promise = Promise.resolve(undefined); + promise.constructor = Promise; + then = promise.then; + notify = function () { + then.call(promise, flush); + }; + } else if (IS_NODE) { + notify = function () { + process.nextTick(flush); + }; + } else { + notify = function () { + macrotask.call(global, flush); + }; + } +} +module.exports = queueMicrotask || function (fn) { + var task = { + fn: fn, + next: undefined + }; + if (last) + last.next = task; + if (!head) { + head = task; + notify(); + } + last = task; +}; + +/***/ }), +/* 100 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var userAgent = __w_pdfjs_require__(60); +module.exports = /web0s(?!.*chrome)/i.test(userAgent); + +/***/ }), +/* 101 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var anObject = __w_pdfjs_require__(28); +var isObject = __w_pdfjs_require__(21); +var newPromiseCapability = __w_pdfjs_require__(102); +module.exports = function (C, x) { + anObject(C); + if (isObject(x) && x.constructor === C) + return x; + var promiseCapability = newPromiseCapability.f(C); + var resolve = promiseCapability.resolve; + resolve(x); + return promiseCapability.promise; +}; + +/***/ }), +/* 102 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +"use strict"; + +var aFunction = __w_pdfjs_require__(79); +var PromiseCapability = function (C) { + var resolve, reject; + this.promise = new C(function ($$resolve, $$reject) { + if (resolve !== undefined || reject !== undefined) + throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +}; +module.exports.f = function (C) { + return new PromiseCapability(C); +}; + +/***/ }), +/* 103 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var global = __w_pdfjs_require__(10); +module.exports = function (a, b) { + var console = global.console; + if (console && console.error) { + arguments.length === 1 ? console.error(a) : console.error(a, b); + } +}; + +/***/ }), +/* 104 */ +/***/ ((module) => { + +module.exports = function (exec) { + try { + return { + error: false, + value: exec() + }; + } catch (error) { + return { + error: true, + value: error + }; + } +}; + +/***/ }), +/* 105 */ +/***/ ((module) => { + +module.exports = typeof window == 'object'; + +/***/ }), +/* 106 */ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => { + +"use strict"; + +var $ = __w_pdfjs_require__(9); +var aFunction = __w_pdfjs_require__(79); +var newPromiseCapabilityModule = __w_pdfjs_require__(102); +var perform = __w_pdfjs_require__(104); +var iterate = __w_pdfjs_require__(76); +$({ + target: 'Promise', + stat: true +}, { + allSettled: function allSettled(iterable) { + var C = this; + var capability = newPromiseCapabilityModule.f(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var promiseResolve = aFunction(C.resolve); + var values = []; + var counter = 0; + var remaining = 1; + iterate(iterable, function (promise) { + var index = counter++; + var alreadyCalled = false; + values.push(undefined); + remaining++; + promiseResolve.call(C, promise).then(function (value) { + if (alreadyCalled) + return; + alreadyCalled = true; + values[index] = { + status: 'fulfilled', + value: value + }; + --remaining || resolve(values); + }, function (error) { + if (alreadyCalled) + return; + alreadyCalled = true; + values[index] = { + status: 'rejected', + reason: error + }; + --remaining || resolve(values); + }); + }); + --remaining || resolve(values); + }); + if (result.error) + reject(result.value); + return capability.promise; + } +}); + +/***/ }), +/* 107 */ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => { + +"use strict"; + +var $ = __w_pdfjs_require__(9); +var aFunction = __w_pdfjs_require__(79); +var getBuiltIn = __w_pdfjs_require__(42); +var newPromiseCapabilityModule = __w_pdfjs_require__(102); +var perform = __w_pdfjs_require__(104); +var iterate = __w_pdfjs_require__(76); +var PROMISE_ANY_ERROR = 'No one promise resolved'; +$({ + target: 'Promise', + stat: true +}, { + any: function any(iterable) { + var C = this; + var capability = newPromiseCapabilityModule.f(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var promiseResolve = aFunction(C.resolve); + var errors = []; + var counter = 0; + var remaining = 1; + var alreadyResolved = false; + iterate(iterable, function (promise) { + var index = counter++; + var alreadyRejected = false; + errors.push(undefined); + remaining++; + promiseResolve.call(C, promise).then(function (value) { + if (alreadyRejected || alreadyResolved) + return; + alreadyResolved = true; + resolve(value); + }, function (error) { + if (alreadyRejected || alreadyResolved) + return; + alreadyRejected = true; + errors[index] = error; + --remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR)); + }); + }); + --remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR)); + }); + if (result.error) + reject(result.value); + return capability.promise; + } +}); + +/***/ }), +/* 108 */ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => { + +"use strict"; + +var $ = __w_pdfjs_require__(9); +var IS_PURE = __w_pdfjs_require__(37); +var NativePromise = __w_pdfjs_require__(90); +var fails = __w_pdfjs_require__(13); +var getBuiltIn = __w_pdfjs_require__(42); +var speciesConstructor = __w_pdfjs_require__(95); +var promiseResolve = __w_pdfjs_require__(101); +var redefine = __w_pdfjs_require__(29); +var NON_GENERIC = !!NativePromise && fails(function () { + NativePromise.prototype['finally'].call({ + then: function () { + } + }, function () { + }); +}); +$({ + target: 'Promise', + proto: true, + real: true, + forced: NON_GENERIC +}, { + 'finally': function (onFinally) { + var C = speciesConstructor(this, getBuiltIn('Promise')); + var isFunction = typeof onFinally == 'function'; + return this.then(isFunction ? function (x) { + return promiseResolve(C, onFinally()).then(function () { + return x; + }); + } : onFinally, isFunction ? function (e) { + return promiseResolve(C, onFinally()).then(function () { + throw e; + }); + } : onFinally); + } +}); +if (!IS_PURE && typeof NativePromise == 'function') { + var method = getBuiltIn('Promise').prototype['finally']; + if (NativePromise.prototype['finally'] !== method) { + redefine(NativePromise.prototype, 'finally', method, { unsafe: true }); + } +} + +/***/ }), +/* 109 */ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => { + +"use strict"; + +var charAt = __w_pdfjs_require__(110).charAt; +var InternalStateModule = __w_pdfjs_require__(33); +var defineIterator = __w_pdfjs_require__(67); +var STRING_ITERATOR = 'String Iterator'; +var setInternalState = InternalStateModule.set; +var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR); +defineIterator(String, 'String', function (iterated) { + setInternalState(this, { + type: STRING_ITERATOR, + string: String(iterated), + index: 0 + }); +}, function next() { + var state = getInternalState(this); + var string = state.string; + var index = state.index; + var point; + if (index >= string.length) + return { + value: undefined, + done: true + }; + point = charAt(string, index); + state.index += point.length; + return { + value: point, + done: false + }; +}); + +/***/ }), +/* 110 */ +/***/ ((module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var toInteger = __w_pdfjs_require__(48); +var requireObjectCoercible = __w_pdfjs_require__(19); +var createMethod = function (CONVERT_TO_STRING) { + return function ($this, pos) { + var S = String(requireObjectCoercible($this)); + var position = toInteger(pos); + var size = S.length; + var first, second; + if (position < 0 || position >= size) + return CONVERT_TO_STRING ? '' : undefined; + first = S.charCodeAt(position); + return first < 0xD800 || first > 0xDBFF || position + 1 === size || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF ? CONVERT_TO_STRING ? S.charAt(position) : first : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; + }; +}; +module.exports = { + codeAt: createMethod(false), + charAt: createMethod(true) +}; + +/***/ }), +/* 111 */ +/***/ ((__unused_webpack_module, __unused_webpack_exports, __w_pdfjs_require__) => { + +var global = __w_pdfjs_require__(10); +var DOMIterables = __w_pdfjs_require__(112); +var ArrayIteratorMethods = __w_pdfjs_require__(55); +var createNonEnumerableProperty = __w_pdfjs_require__(26); +var wellKnownSymbol = __w_pdfjs_require__(57); +var ITERATOR = wellKnownSymbol('iterator'); +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); +var ArrayValues = ArrayIteratorMethods.values; +for (var COLLECTION_NAME in DOMIterables) { + var Collection = global[COLLECTION_NAME]; + var CollectionPrototype = Collection && Collection.prototype; + if (CollectionPrototype) { + if (CollectionPrototype[ITERATOR] !== ArrayValues) + try { + createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues); + } catch (error) { + CollectionPrototype[ITERATOR] = ArrayValues; + } + if (!CollectionPrototype[TO_STRING_TAG]) { + createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME); + } + if (DOMIterables[COLLECTION_NAME]) + for (var METHOD_NAME in ArrayIteratorMethods) { + if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) + try { + createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]); + } catch (error) { + CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME]; + } + } + } +} + +/***/ }), +/* 112 */ +/***/ ((module) => { + +module.exports = { + CSSRuleList: 0, + CSSStyleDeclaration: 0, + CSSValueList: 0, + ClientRectList: 0, + DOMRectList: 0, + DOMStringList: 0, + DOMTokenList: 1, + DataTransferItemList: 0, + FileList: 0, + HTMLAllCollection: 0, + HTMLCollection: 0, + HTMLFormElement: 0, + HTMLSelectElement: 0, + MediaList: 0, + MimeTypeArray: 0, + NamedNodeMap: 0, + NodeList: 1, + PaintRequestList: 0, + Plugin: 0, + PluginArray: 0, + SVGLengthList: 0, + SVGNumberList: 0, + SVGPathSegList: 0, + SVGPointList: 0, + SVGStringList: 0, + SVGTransformList: 0, + SourceBufferList: 0, + StyleSheetList: 0, + TextTrackCueList: 0, + TextTrackList: 0, + TouchList: 0 +}; + +/***/ }), +/* 113 */ +/***/ (function(__unused_webpack_module, exports) { + +(function (global, factory) { + true ? factory(exports) : 0; +}(this, function (exports) { + 'use strict'; + var SymbolPolyfill = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol : function (description) { + return "Symbol(" + description + ")"; + }; + function noop() { + return undefined; + } + function getGlobals() { + if (typeof self !== 'undefined') { + return self; + } else if (typeof window !== 'undefined') { + return window; + } else if (typeof global !== 'undefined') { + return global; + } + return undefined; + } + var globals = getGlobals(); + function typeIsObject(x) { + return typeof x === 'object' && x !== null || typeof x === 'function'; + } + var rethrowAssertionErrorRejection = noop; + var originalPromise = Promise; + var originalPromiseThen = Promise.prototype.then; + var originalPromiseResolve = Promise.resolve.bind(originalPromise); + var originalPromiseReject = Promise.reject.bind(originalPromise); + function newPromise(executor) { + return new originalPromise(executor); + } + function promiseResolvedWith(value) { + return originalPromiseResolve(value); + } + function promiseRejectedWith(reason) { + return originalPromiseReject(reason); + } + function PerformPromiseThen(promise, onFulfilled, onRejected) { + return originalPromiseThen.call(promise, onFulfilled, onRejected); + } + function uponPromise(promise, onFulfilled, onRejected) { + PerformPromiseThen(PerformPromiseThen(promise, onFulfilled, onRejected), undefined, rethrowAssertionErrorRejection); + } + function uponFulfillment(promise, onFulfilled) { + uponPromise(promise, onFulfilled); + } + function uponRejection(promise, onRejected) { + uponPromise(promise, undefined, onRejected); + } + function transformPromiseWith(promise, fulfillmentHandler, rejectionHandler) { + return PerformPromiseThen(promise, fulfillmentHandler, rejectionHandler); + } + function setPromiseIsHandledToTrue(promise) { + PerformPromiseThen(promise, undefined, rethrowAssertionErrorRejection); + } + var queueMicrotask = function () { + var globalQueueMicrotask = globals && globals.queueMicrotask; + if (typeof globalQueueMicrotask === 'function') { + return globalQueueMicrotask; + } + var resolvedPromise = promiseResolvedWith(undefined); + return function (fn) { + return PerformPromiseThen(resolvedPromise, fn); + }; + }(); + function reflectCall(F, V, args) { + if (typeof F !== 'function') { + throw new TypeError('Argument is not a function'); + } + return Function.prototype.apply.call(F, V, args); + } + function promiseCall(F, V, args) { + try { + return promiseResolvedWith(reflectCall(F, V, args)); + } catch (value) { + return promiseRejectedWith(value); + } + } + var QUEUE_MAX_ARRAY_SIZE = 16384; + var SimpleQueue = function () { + function SimpleQueue() { + this._cursor = 0; + this._size = 0; + this._front = { + _elements: [], + _next: undefined + }; + this._back = this._front; + this._cursor = 0; + this._size = 0; + } + Object.defineProperty(SimpleQueue.prototype, "length", { + get: function () { + return this._size; + }, + enumerable: false, + configurable: true + }); + SimpleQueue.prototype.push = function (element) { + var oldBack = this._back; + var newBack = oldBack; + if (oldBack._elements.length === QUEUE_MAX_ARRAY_SIZE - 1) { + newBack = { + _elements: [], + _next: undefined + }; + } + oldBack._elements.push(element); + if (newBack !== oldBack) { + this._back = newBack; + oldBack._next = newBack; + } + ++this._size; + }; + SimpleQueue.prototype.shift = function () { + var oldFront = this._front; + var newFront = oldFront; + var oldCursor = this._cursor; + var newCursor = oldCursor + 1; + var elements = oldFront._elements; + var element = elements[oldCursor]; + if (newCursor === QUEUE_MAX_ARRAY_SIZE) { + newFront = oldFront._next; + newCursor = 0; + } + --this._size; + this._cursor = newCursor; + if (oldFront !== newFront) { + this._front = newFront; + } + elements[oldCursor] = undefined; + return element; + }; + SimpleQueue.prototype.forEach = function (callback) { + var i = this._cursor; + var node = this._front; + var elements = node._elements; + while (i !== elements.length || node._next !== undefined) { + if (i === elements.length) { + node = node._next; + elements = node._elements; + i = 0; + if (elements.length === 0) { + break; + } + } + callback(elements[i]); + ++i; + } + }; + SimpleQueue.prototype.peek = function () { + var front = this._front; + var cursor = this._cursor; + return front._elements[cursor]; + }; + return SimpleQueue; + }(); + function ReadableStreamReaderGenericInitialize(reader, stream) { + reader._ownerReadableStream = stream; + stream._reader = reader; + if (stream._state === 'readable') { + defaultReaderClosedPromiseInitialize(reader); + } else if (stream._state === 'closed') { + defaultReaderClosedPromiseInitializeAsResolved(reader); + } else { + defaultReaderClosedPromiseInitializeAsRejected(reader, stream._storedError); + } + } + function ReadableStreamReaderGenericCancel(reader, reason) { + var stream = reader._ownerReadableStream; + return ReadableStreamCancel(stream, reason); + } + function ReadableStreamReaderGenericRelease(reader) { + if (reader._ownerReadableStream._state === 'readable') { + defaultReaderClosedPromiseReject(reader, new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")); + } else { + defaultReaderClosedPromiseResetToRejected(reader, new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")); + } + reader._ownerReadableStream._reader = undefined; + reader._ownerReadableStream = undefined; + } + function readerLockException(name) { + return new TypeError('Cannot ' + name + ' a stream using a released reader'); + } + function defaultReaderClosedPromiseInitialize(reader) { + reader._closedPromise = newPromise(function (resolve, reject) { + reader._closedPromise_resolve = resolve; + reader._closedPromise_reject = reject; + }); + } + function defaultReaderClosedPromiseInitializeAsRejected(reader, reason) { + defaultReaderClosedPromiseInitialize(reader); + defaultReaderClosedPromiseReject(reader, reason); + } + function defaultReaderClosedPromiseInitializeAsResolved(reader) { + defaultReaderClosedPromiseInitialize(reader); + defaultReaderClosedPromiseResolve(reader); + } + function defaultReaderClosedPromiseReject(reader, reason) { + if (reader._closedPromise_reject === undefined) { + return; + } + setPromiseIsHandledToTrue(reader._closedPromise); + reader._closedPromise_reject(reason); + reader._closedPromise_resolve = undefined; + reader._closedPromise_reject = undefined; + } + function defaultReaderClosedPromiseResetToRejected(reader, reason) { + defaultReaderClosedPromiseInitializeAsRejected(reader, reason); + } + function defaultReaderClosedPromiseResolve(reader) { + if (reader._closedPromise_resolve === undefined) { + return; + } + reader._closedPromise_resolve(undefined); + reader._closedPromise_resolve = undefined; + reader._closedPromise_reject = undefined; + } + var AbortSteps = SymbolPolyfill('[[AbortSteps]]'); + var ErrorSteps = SymbolPolyfill('[[ErrorSteps]]'); + var CancelSteps = SymbolPolyfill('[[CancelSteps]]'); + var PullSteps = SymbolPolyfill('[[PullSteps]]'); + var NumberIsFinite = Number.isFinite || function (x) { + return typeof x === 'number' && isFinite(x); + }; + var MathTrunc = Math.trunc || function (v) { + return v < 0 ? Math.ceil(v) : Math.floor(v); + }; + function isDictionary(x) { + return typeof x === 'object' || typeof x === 'function'; + } + function assertDictionary(obj, context) { + if (obj !== undefined && !isDictionary(obj)) { + throw new TypeError(context + " is not an object."); + } + } + function assertFunction(x, context) { + if (typeof x !== 'function') { + throw new TypeError(context + " is not a function."); + } + } + function isObject(x) { + return typeof x === 'object' && x !== null || typeof x === 'function'; + } + function assertObject(x, context) { + if (!isObject(x)) { + throw new TypeError(context + " is not an object."); + } + } + function assertRequiredArgument(x, position, context) { + if (x === undefined) { + throw new TypeError("Parameter " + position + " is required in '" + context + "'."); + } + } + function assertRequiredField(x, field, context) { + if (x === undefined) { + throw new TypeError(field + " is required in '" + context + "'."); + } + } + function convertUnrestrictedDouble(value) { + return Number(value); + } + function censorNegativeZero(x) { + return x === 0 ? 0 : x; + } + function integerPart(x) { + return censorNegativeZero(MathTrunc(x)); + } + function convertUnsignedLongLongWithEnforceRange(value, context) { + var lowerBound = 0; + var upperBound = Number.MAX_SAFE_INTEGER; + var x = Number(value); + x = censorNegativeZero(x); + if (!NumberIsFinite(x)) { + throw new TypeError(context + " is not a finite number"); + } + x = integerPart(x); + if (x < lowerBound || x > upperBound) { + throw new TypeError(context + " is outside the accepted range of " + lowerBound + " to " + upperBound + ", inclusive"); + } + if (!NumberIsFinite(x) || x === 0) { + return 0; + } + return x; + } + function assertReadableStream(x, context) { + if (!IsReadableStream(x)) { + throw new TypeError(context + " is not a ReadableStream."); + } + } + function AcquireReadableStreamDefaultReader(stream) { + return new ReadableStreamDefaultReader(stream); + } + function ReadableStreamAddReadRequest(stream, readRequest) { + stream._reader._readRequests.push(readRequest); + } + function ReadableStreamFulfillReadRequest(stream, chunk, done) { + var reader = stream._reader; + var readRequest = reader._readRequests.shift(); + if (done) { + readRequest._closeSteps(); + } else { + readRequest._chunkSteps(chunk); + } + } + function ReadableStreamGetNumReadRequests(stream) { + return stream._reader._readRequests.length; + } + function ReadableStreamHasDefaultReader(stream) { + var reader = stream._reader; + if (reader === undefined) { + return false; + } + if (!IsReadableStreamDefaultReader(reader)) { + return false; + } + return true; + } + var ReadableStreamDefaultReader = function () { + function ReadableStreamDefaultReader(stream) { + assertRequiredArgument(stream, 1, 'ReadableStreamDefaultReader'); + assertReadableStream(stream, 'First parameter'); + if (IsReadableStreamLocked(stream)) { + throw new TypeError('This stream has already been locked for exclusive reading by another reader'); + } + ReadableStreamReaderGenericInitialize(this, stream); + this._readRequests = new SimpleQueue(); + } + Object.defineProperty(ReadableStreamDefaultReader.prototype, "closed", { + get: function () { + if (!IsReadableStreamDefaultReader(this)) { + return promiseRejectedWith(defaultReaderBrandCheckException('closed')); + } + return this._closedPromise; + }, + enumerable: false, + configurable: true + }); + ReadableStreamDefaultReader.prototype.cancel = function (reason) { + if (reason === void 0) { + reason = undefined; + } + if (!IsReadableStreamDefaultReader(this)) { + return promiseRejectedWith(defaultReaderBrandCheckException('cancel')); + } + if (this._ownerReadableStream === undefined) { + return promiseRejectedWith(readerLockException('cancel')); + } + return ReadableStreamReaderGenericCancel(this, reason); + }; + ReadableStreamDefaultReader.prototype.read = function () { + if (!IsReadableStreamDefaultReader(this)) { + return promiseRejectedWith(defaultReaderBrandCheckException('read')); + } + if (this._ownerReadableStream === undefined) { + return promiseRejectedWith(readerLockException('read from')); + } + var resolvePromise; + var rejectPromise; + var promise = newPromise(function (resolve, reject) { + resolvePromise = resolve; + rejectPromise = reject; + }); + var readRequest = { + _chunkSteps: function (chunk) { + return resolvePromise({ + value: chunk, + done: false + }); + }, + _closeSteps: function () { + return resolvePromise({ + value: undefined, + done: true + }); + }, + _errorSteps: function (e) { + return rejectPromise(e); + } + }; + ReadableStreamDefaultReaderRead(this, readRequest); + return promise; + }; + ReadableStreamDefaultReader.prototype.releaseLock = function () { + if (!IsReadableStreamDefaultReader(this)) { + throw defaultReaderBrandCheckException('releaseLock'); + } + if (this._ownerReadableStream === undefined) { + return; + } + if (this._readRequests.length > 0) { + throw new TypeError('Tried to release a reader lock when that reader has pending read() calls un-settled'); + } + ReadableStreamReaderGenericRelease(this); + }; + return ReadableStreamDefaultReader; + }(); + Object.defineProperties(ReadableStreamDefaultReader.prototype, { + cancel: { enumerable: true }, + read: { enumerable: true }, + releaseLock: { enumerable: true }, + closed: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(ReadableStreamDefaultReader.prototype, SymbolPolyfill.toStringTag, { + value: 'ReadableStreamDefaultReader', + configurable: true + }); + } + function IsReadableStreamDefaultReader(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_readRequests')) { + return false; + } + return x instanceof ReadableStreamDefaultReader; + } + function ReadableStreamDefaultReaderRead(reader, readRequest) { + var stream = reader._ownerReadableStream; + stream._disturbed = true; + if (stream._state === 'closed') { + readRequest._closeSteps(); + } else if (stream._state === 'errored') { + readRequest._errorSteps(stream._storedError); + } else { + stream._readableStreamController[PullSteps](readRequest); + } + } + function defaultReaderBrandCheckException(name) { + return new TypeError("ReadableStreamDefaultReader.prototype." + name + " can only be used on a ReadableStreamDefaultReader"); + } + var _a; + var AsyncIteratorPrototype; + if (typeof SymbolPolyfill.asyncIterator === 'symbol') { + AsyncIteratorPrototype = (_a = {}, _a[SymbolPolyfill.asyncIterator] = function () { + return this; + }, _a); + Object.defineProperty(AsyncIteratorPrototype, SymbolPolyfill.asyncIterator, { enumerable: false }); + } + var ReadableStreamAsyncIteratorImpl = function () { + function ReadableStreamAsyncIteratorImpl(reader, preventCancel) { + this._ongoingPromise = undefined; + this._isFinished = false; + this._reader = reader; + this._preventCancel = preventCancel; + } + ReadableStreamAsyncIteratorImpl.prototype.next = function () { + var _this = this; + var nextSteps = function () { + return _this._nextSteps(); + }; + this._ongoingPromise = this._ongoingPromise ? transformPromiseWith(this._ongoingPromise, nextSteps, nextSteps) : nextSteps(); + return this._ongoingPromise; + }; + ReadableStreamAsyncIteratorImpl.prototype.return = function (value) { + var _this = this; + var returnSteps = function () { + return _this._returnSteps(value); + }; + return this._ongoingPromise ? transformPromiseWith(this._ongoingPromise, returnSteps, returnSteps) : returnSteps(); + }; + ReadableStreamAsyncIteratorImpl.prototype._nextSteps = function () { + var _this = this; + if (this._isFinished) { + return Promise.resolve({ + value: undefined, + done: true + }); + } + var reader = this._reader; + if (reader._ownerReadableStream === undefined) { + return promiseRejectedWith(readerLockException('iterate')); + } + var resolvePromise; + var rejectPromise; + var promise = newPromise(function (resolve, reject) { + resolvePromise = resolve; + rejectPromise = reject; + }); + var readRequest = { + _chunkSteps: function (chunk) { + _this._ongoingPromise = undefined; + queueMicrotask(function () { + return resolvePromise({ + value: chunk, + done: false + }); + }); + }, + _closeSteps: function () { + _this._ongoingPromise = undefined; + _this._isFinished = true; + ReadableStreamReaderGenericRelease(reader); + resolvePromise({ + value: undefined, + done: true + }); + }, + _errorSteps: function (reason) { + _this._ongoingPromise = undefined; + _this._isFinished = true; + ReadableStreamReaderGenericRelease(reader); + rejectPromise(reason); + } + }; + ReadableStreamDefaultReaderRead(reader, readRequest); + return promise; + }; + ReadableStreamAsyncIteratorImpl.prototype._returnSteps = function (value) { + if (this._isFinished) { + return Promise.resolve({ + value: value, + done: true + }); + } + this._isFinished = true; + var reader = this._reader; + if (reader._ownerReadableStream === undefined) { + return promiseRejectedWith(readerLockException('finish iterating')); + } + if (!this._preventCancel) { + var result = ReadableStreamReaderGenericCancel(reader, value); + ReadableStreamReaderGenericRelease(reader); + return transformPromiseWith(result, function () { + return { + value: value, + done: true + }; + }); + } + ReadableStreamReaderGenericRelease(reader); + return promiseResolvedWith({ + value: value, + done: true + }); + }; + return ReadableStreamAsyncIteratorImpl; + }(); + var ReadableStreamAsyncIteratorPrototype = { + next: function () { + if (!IsReadableStreamAsyncIterator(this)) { + return promiseRejectedWith(streamAsyncIteratorBrandCheckException('next')); + } + return this._asyncIteratorImpl.next(); + }, + return: function (value) { + if (!IsReadableStreamAsyncIterator(this)) { + return promiseRejectedWith(streamAsyncIteratorBrandCheckException('return')); + } + return this._asyncIteratorImpl.return(value); + } + }; + if (AsyncIteratorPrototype !== undefined) { + Object.setPrototypeOf(ReadableStreamAsyncIteratorPrototype, AsyncIteratorPrototype); + } + function AcquireReadableStreamAsyncIterator(stream, preventCancel) { + var reader = AcquireReadableStreamDefaultReader(stream); + var impl = new ReadableStreamAsyncIteratorImpl(reader, preventCancel); + var iterator = Object.create(ReadableStreamAsyncIteratorPrototype); + iterator._asyncIteratorImpl = impl; + return iterator; + } + function IsReadableStreamAsyncIterator(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_asyncIteratorImpl')) { + return false; + } + try { + return x._asyncIteratorImpl instanceof ReadableStreamAsyncIteratorImpl; + } catch (_a) { + return false; + } + } + function streamAsyncIteratorBrandCheckException(name) { + return new TypeError("ReadableStreamAsyncIterator." + name + " can only be used on a ReadableSteamAsyncIterator"); + } + var NumberIsNaN = Number.isNaN || function (x) { + return x !== x; + }; + function CreateArrayFromList(elements) { + return elements.slice(); + } + function CopyDataBlockBytes(dest, destOffset, src, srcOffset, n) { + new Uint8Array(dest).set(new Uint8Array(src, srcOffset, n), destOffset); + } + function TransferArrayBuffer(O) { + return O; + } + function IsDetachedBuffer(O) { + return false; + } + function ArrayBufferSlice(buffer, begin, end) { + if (buffer.slice) { + return buffer.slice(begin, end); + } + var length = end - begin; + var slice = new ArrayBuffer(length); + CopyDataBlockBytes(slice, 0, buffer, begin, length); + return slice; + } + function IsNonNegativeNumber(v) { + if (typeof v !== 'number') { + return false; + } + if (NumberIsNaN(v)) { + return false; + } + if (v < 0) { + return false; + } + return true; + } + function CloneAsUint8Array(O) { + var buffer = ArrayBufferSlice(O.buffer, O.byteOffset, O.byteOffset + O.byteLength); + return new Uint8Array(buffer); + } + function DequeueValue(container) { + var pair = container._queue.shift(); + container._queueTotalSize -= pair.size; + if (container._queueTotalSize < 0) { + container._queueTotalSize = 0; + } + return pair.value; + } + function EnqueueValueWithSize(container, value, size) { + if (!IsNonNegativeNumber(size) || size === Infinity) { + throw new RangeError('Size must be a finite, non-NaN, non-negative number.'); + } + container._queue.push({ + value: value, + size: size + }); + container._queueTotalSize += size; + } + function PeekQueueValue(container) { + var pair = container._queue.peek(); + return pair.value; + } + function ResetQueue(container) { + container._queue = new SimpleQueue(); + container._queueTotalSize = 0; + } + var ReadableStreamBYOBRequest = function () { + function ReadableStreamBYOBRequest() { + throw new TypeError('Illegal constructor'); + } + Object.defineProperty(ReadableStreamBYOBRequest.prototype, "view", { + get: function () { + if (!IsReadableStreamBYOBRequest(this)) { + throw byobRequestBrandCheckException('view'); + } + return this._view; + }, + enumerable: false, + configurable: true + }); + ReadableStreamBYOBRequest.prototype.respond = function (bytesWritten) { + if (!IsReadableStreamBYOBRequest(this)) { + throw byobRequestBrandCheckException('respond'); + } + assertRequiredArgument(bytesWritten, 1, 'respond'); + bytesWritten = convertUnsignedLongLongWithEnforceRange(bytesWritten, 'First parameter'); + if (this._associatedReadableByteStreamController === undefined) { + throw new TypeError('This BYOB request has been invalidated'); + } + if (IsDetachedBuffer(this._view.buffer)); + ReadableByteStreamControllerRespond(this._associatedReadableByteStreamController, bytesWritten); + }; + ReadableStreamBYOBRequest.prototype.respondWithNewView = function (view) { + if (!IsReadableStreamBYOBRequest(this)) { + throw byobRequestBrandCheckException('respondWithNewView'); + } + assertRequiredArgument(view, 1, 'respondWithNewView'); + if (!ArrayBuffer.isView(view)) { + throw new TypeError('You can only respond with array buffer views'); + } + if (this._associatedReadableByteStreamController === undefined) { + throw new TypeError('This BYOB request has been invalidated'); + } + if (IsDetachedBuffer(view.buffer)); + ReadableByteStreamControllerRespondWithNewView(this._associatedReadableByteStreamController, view); + }; + return ReadableStreamBYOBRequest; + }(); + Object.defineProperties(ReadableStreamBYOBRequest.prototype, { + respond: { enumerable: true }, + respondWithNewView: { enumerable: true }, + view: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(ReadableStreamBYOBRequest.prototype, SymbolPolyfill.toStringTag, { + value: 'ReadableStreamBYOBRequest', + configurable: true + }); + } + var ReadableByteStreamController = function () { + function ReadableByteStreamController() { + throw new TypeError('Illegal constructor'); + } + Object.defineProperty(ReadableByteStreamController.prototype, "byobRequest", { + get: function () { + if (!IsReadableByteStreamController(this)) { + throw byteStreamControllerBrandCheckException('byobRequest'); + } + return ReadableByteStreamControllerGetBYOBRequest(this); + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(ReadableByteStreamController.prototype, "desiredSize", { + get: function () { + if (!IsReadableByteStreamController(this)) { + throw byteStreamControllerBrandCheckException('desiredSize'); + } + return ReadableByteStreamControllerGetDesiredSize(this); + }, + enumerable: false, + configurable: true + }); + ReadableByteStreamController.prototype.close = function () { + if (!IsReadableByteStreamController(this)) { + throw byteStreamControllerBrandCheckException('close'); + } + if (this._closeRequested) { + throw new TypeError('The stream has already been closed; do not close it again!'); + } + var state = this._controlledReadableByteStream._state; + if (state !== 'readable') { + throw new TypeError("The stream (in " + state + " state) is not in the readable state and cannot be closed"); + } + ReadableByteStreamControllerClose(this); + }; + ReadableByteStreamController.prototype.enqueue = function (chunk) { + if (!IsReadableByteStreamController(this)) { + throw byteStreamControllerBrandCheckException('enqueue'); + } + assertRequiredArgument(chunk, 1, 'enqueue'); + if (!ArrayBuffer.isView(chunk)) { + throw new TypeError('chunk must be an array buffer view'); + } + if (chunk.byteLength === 0) { + throw new TypeError('chunk must have non-zero byteLength'); + } + if (chunk.buffer.byteLength === 0) { + throw new TypeError("chunk's buffer must have non-zero byteLength"); + } + if (this._closeRequested) { + throw new TypeError('stream is closed or draining'); + } + var state = this._controlledReadableByteStream._state; + if (state !== 'readable') { + throw new TypeError("The stream (in " + state + " state) is not in the readable state and cannot be enqueued to"); + } + ReadableByteStreamControllerEnqueue(this, chunk); + }; + ReadableByteStreamController.prototype.error = function (e) { + if (e === void 0) { + e = undefined; + } + if (!IsReadableByteStreamController(this)) { + throw byteStreamControllerBrandCheckException('error'); + } + ReadableByteStreamControllerError(this, e); + }; + ReadableByteStreamController.prototype[CancelSteps] = function (reason) { + ReadableByteStreamControllerClearPendingPullIntos(this); + ResetQueue(this); + var result = this._cancelAlgorithm(reason); + ReadableByteStreamControllerClearAlgorithms(this); + return result; + }; + ReadableByteStreamController.prototype[PullSteps] = function (readRequest) { + var stream = this._controlledReadableByteStream; + if (this._queueTotalSize > 0) { + var entry = this._queue.shift(); + this._queueTotalSize -= entry.byteLength; + ReadableByteStreamControllerHandleQueueDrain(this); + var view = new Uint8Array(entry.buffer, entry.byteOffset, entry.byteLength); + readRequest._chunkSteps(view); + return; + } + var autoAllocateChunkSize = this._autoAllocateChunkSize; + if (autoAllocateChunkSize !== undefined) { + var buffer = void 0; + try { + buffer = new ArrayBuffer(autoAllocateChunkSize); + } catch (bufferE) { + readRequest._errorSteps(bufferE); + return; + } + var pullIntoDescriptor = { + buffer: buffer, + bufferByteLength: autoAllocateChunkSize, + byteOffset: 0, + byteLength: autoAllocateChunkSize, + bytesFilled: 0, + elementSize: 1, + viewConstructor: Uint8Array, + readerType: 'default' + }; + this._pendingPullIntos.push(pullIntoDescriptor); + } + ReadableStreamAddReadRequest(stream, readRequest); + ReadableByteStreamControllerCallPullIfNeeded(this); + }; + return ReadableByteStreamController; + }(); + Object.defineProperties(ReadableByteStreamController.prototype, { + close: { enumerable: true }, + enqueue: { enumerable: true }, + error: { enumerable: true }, + byobRequest: { enumerable: true }, + desiredSize: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(ReadableByteStreamController.prototype, SymbolPolyfill.toStringTag, { + value: 'ReadableByteStreamController', + configurable: true + }); + } + function IsReadableByteStreamController(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_controlledReadableByteStream')) { + return false; + } + return x instanceof ReadableByteStreamController; + } + function IsReadableStreamBYOBRequest(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_associatedReadableByteStreamController')) { + return false; + } + return x instanceof ReadableStreamBYOBRequest; + } + function ReadableByteStreamControllerCallPullIfNeeded(controller) { + var shouldPull = ReadableByteStreamControllerShouldCallPull(controller); + if (!shouldPull) { + return; + } + if (controller._pulling) { + controller._pullAgain = true; + return; + } + controller._pulling = true; + var pullPromise = controller._pullAlgorithm(); + uponPromise(pullPromise, function () { + controller._pulling = false; + if (controller._pullAgain) { + controller._pullAgain = false; + ReadableByteStreamControllerCallPullIfNeeded(controller); + } + }, function (e) { + ReadableByteStreamControllerError(controller, e); + }); + } + function ReadableByteStreamControllerClearPendingPullIntos(controller) { + ReadableByteStreamControllerInvalidateBYOBRequest(controller); + controller._pendingPullIntos = new SimpleQueue(); + } + function ReadableByteStreamControllerCommitPullIntoDescriptor(stream, pullIntoDescriptor) { + var done = false; + if (stream._state === 'closed') { + done = true; + } + var filledView = ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor); + if (pullIntoDescriptor.readerType === 'default') { + ReadableStreamFulfillReadRequest(stream, filledView, done); + } else { + ReadableStreamFulfillReadIntoRequest(stream, filledView, done); + } + } + function ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor) { + var bytesFilled = pullIntoDescriptor.bytesFilled; + var elementSize = pullIntoDescriptor.elementSize; + return new pullIntoDescriptor.viewConstructor(pullIntoDescriptor.buffer, pullIntoDescriptor.byteOffset, bytesFilled / elementSize); + } + function ReadableByteStreamControllerEnqueueChunkToQueue(controller, buffer, byteOffset, byteLength) { + controller._queue.push({ + buffer: buffer, + byteOffset: byteOffset, + byteLength: byteLength + }); + controller._queueTotalSize += byteLength; + } + function ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor) { + var elementSize = pullIntoDescriptor.elementSize; + var currentAlignedBytes = pullIntoDescriptor.bytesFilled - pullIntoDescriptor.bytesFilled % elementSize; + var maxBytesToCopy = Math.min(controller._queueTotalSize, pullIntoDescriptor.byteLength - pullIntoDescriptor.bytesFilled); + var maxBytesFilled = pullIntoDescriptor.bytesFilled + maxBytesToCopy; + var maxAlignedBytes = maxBytesFilled - maxBytesFilled % elementSize; + var totalBytesToCopyRemaining = maxBytesToCopy; + var ready = false; + if (maxAlignedBytes > currentAlignedBytes) { + totalBytesToCopyRemaining = maxAlignedBytes - pullIntoDescriptor.bytesFilled; + ready = true; + } + var queue = controller._queue; + while (totalBytesToCopyRemaining > 0) { + var headOfQueue = queue.peek(); + var bytesToCopy = Math.min(totalBytesToCopyRemaining, headOfQueue.byteLength); + var destStart = pullIntoDescriptor.byteOffset + pullIntoDescriptor.bytesFilled; + CopyDataBlockBytes(pullIntoDescriptor.buffer, destStart, headOfQueue.buffer, headOfQueue.byteOffset, bytesToCopy); + if (headOfQueue.byteLength === bytesToCopy) { + queue.shift(); + } else { + headOfQueue.byteOffset += bytesToCopy; + headOfQueue.byteLength -= bytesToCopy; + } + controller._queueTotalSize -= bytesToCopy; + ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, bytesToCopy, pullIntoDescriptor); + totalBytesToCopyRemaining -= bytesToCopy; + } + return ready; + } + function ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, size, pullIntoDescriptor) { + pullIntoDescriptor.bytesFilled += size; + } + function ReadableByteStreamControllerHandleQueueDrain(controller) { + if (controller._queueTotalSize === 0 && controller._closeRequested) { + ReadableByteStreamControllerClearAlgorithms(controller); + ReadableStreamClose(controller._controlledReadableByteStream); + } else { + ReadableByteStreamControllerCallPullIfNeeded(controller); + } + } + function ReadableByteStreamControllerInvalidateBYOBRequest(controller) { + if (controller._byobRequest === null) { + return; + } + controller._byobRequest._associatedReadableByteStreamController = undefined; + controller._byobRequest._view = null; + controller._byobRequest = null; + } + function ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller) { + while (controller._pendingPullIntos.length > 0) { + if (controller._queueTotalSize === 0) { + return; + } + var pullIntoDescriptor = controller._pendingPullIntos.peek(); + if (ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor)) { + ReadableByteStreamControllerShiftPendingPullInto(controller); + ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableByteStream, pullIntoDescriptor); + } + } + } + function ReadableByteStreamControllerPullInto(controller, view, readIntoRequest) { + var stream = controller._controlledReadableByteStream; + var elementSize = 1; + if (view.constructor !== DataView) { + elementSize = view.constructor.BYTES_PER_ELEMENT; + } + var ctor = view.constructor; + var buffer = TransferArrayBuffer(view.buffer); + var pullIntoDescriptor = { + buffer: buffer, + bufferByteLength: buffer.byteLength, + byteOffset: view.byteOffset, + byteLength: view.byteLength, + bytesFilled: 0, + elementSize: elementSize, + viewConstructor: ctor, + readerType: 'byob' + }; + if (controller._pendingPullIntos.length > 0) { + controller._pendingPullIntos.push(pullIntoDescriptor); + ReadableStreamAddReadIntoRequest(stream, readIntoRequest); + return; + } + if (stream._state === 'closed') { + var emptyView = new ctor(pullIntoDescriptor.buffer, pullIntoDescriptor.byteOffset, 0); + readIntoRequest._closeSteps(emptyView); + return; + } + if (controller._queueTotalSize > 0) { + if (ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor)) { + var filledView = ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor); + ReadableByteStreamControllerHandleQueueDrain(controller); + readIntoRequest._chunkSteps(filledView); + return; + } + if (controller._closeRequested) { + var e = new TypeError('Insufficient bytes to fill elements in the given buffer'); + ReadableByteStreamControllerError(controller, e); + readIntoRequest._errorSteps(e); + return; + } + } + controller._pendingPullIntos.push(pullIntoDescriptor); + ReadableStreamAddReadIntoRequest(stream, readIntoRequest); + ReadableByteStreamControllerCallPullIfNeeded(controller); + } + function ReadableByteStreamControllerRespondInClosedState(controller, firstDescriptor) { + var stream = controller._controlledReadableByteStream; + if (ReadableStreamHasBYOBReader(stream)) { + while (ReadableStreamGetNumReadIntoRequests(stream) > 0) { + var pullIntoDescriptor = ReadableByteStreamControllerShiftPendingPullInto(controller); + ReadableByteStreamControllerCommitPullIntoDescriptor(stream, pullIntoDescriptor); + } + } + } + function ReadableByteStreamControllerRespondInReadableState(controller, bytesWritten, pullIntoDescriptor) { + ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, bytesWritten, pullIntoDescriptor); + if (pullIntoDescriptor.bytesFilled < pullIntoDescriptor.elementSize) { + return; + } + ReadableByteStreamControllerShiftPendingPullInto(controller); + var remainderSize = pullIntoDescriptor.bytesFilled % pullIntoDescriptor.elementSize; + if (remainderSize > 0) { + var end = pullIntoDescriptor.byteOffset + pullIntoDescriptor.bytesFilled; + var remainder = ArrayBufferSlice(pullIntoDescriptor.buffer, end - remainderSize, end); + ReadableByteStreamControllerEnqueueChunkToQueue(controller, remainder, 0, remainder.byteLength); + } + pullIntoDescriptor.bytesFilled -= remainderSize; + ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableByteStream, pullIntoDescriptor); + ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller); + } + function ReadableByteStreamControllerRespondInternal(controller, bytesWritten) { + var firstDescriptor = controller._pendingPullIntos.peek(); + ReadableByteStreamControllerInvalidateBYOBRequest(controller); + var state = controller._controlledReadableByteStream._state; + if (state === 'closed') { + ReadableByteStreamControllerRespondInClosedState(controller); + } else { + ReadableByteStreamControllerRespondInReadableState(controller, bytesWritten, firstDescriptor); + } + ReadableByteStreamControllerCallPullIfNeeded(controller); + } + function ReadableByteStreamControllerShiftPendingPullInto(controller) { + var descriptor = controller._pendingPullIntos.shift(); + return descriptor; + } + function ReadableByteStreamControllerShouldCallPull(controller) { + var stream = controller._controlledReadableByteStream; + if (stream._state !== 'readable') { + return false; + } + if (controller._closeRequested) { + return false; + } + if (!controller._started) { + return false; + } + if (ReadableStreamHasDefaultReader(stream) && ReadableStreamGetNumReadRequests(stream) > 0) { + return true; + } + if (ReadableStreamHasBYOBReader(stream) && ReadableStreamGetNumReadIntoRequests(stream) > 0) { + return true; + } + var desiredSize = ReadableByteStreamControllerGetDesiredSize(controller); + if (desiredSize > 0) { + return true; + } + return false; + } + function ReadableByteStreamControllerClearAlgorithms(controller) { + controller._pullAlgorithm = undefined; + controller._cancelAlgorithm = undefined; + } + function ReadableByteStreamControllerClose(controller) { + var stream = controller._controlledReadableByteStream; + if (controller._closeRequested || stream._state !== 'readable') { + return; + } + if (controller._queueTotalSize > 0) { + controller._closeRequested = true; + return; + } + if (controller._pendingPullIntos.length > 0) { + var firstPendingPullInto = controller._pendingPullIntos.peek(); + if (firstPendingPullInto.bytesFilled > 0) { + var e = new TypeError('Insufficient bytes to fill elements in the given buffer'); + ReadableByteStreamControllerError(controller, e); + throw e; + } + } + ReadableByteStreamControllerClearAlgorithms(controller); + ReadableStreamClose(stream); + } + function ReadableByteStreamControllerEnqueue(controller, chunk) { + var stream = controller._controlledReadableByteStream; + if (controller._closeRequested || stream._state !== 'readable') { + return; + } + var buffer = chunk.buffer; + var byteOffset = chunk.byteOffset; + var byteLength = chunk.byteLength; + var transferredBuffer = TransferArrayBuffer(buffer); + if (controller._pendingPullIntos.length > 0) { + var firstPendingPullInto = controller._pendingPullIntos.peek(); + if (IsDetachedBuffer(firstPendingPullInto.buffer)); + firstPendingPullInto.buffer = TransferArrayBuffer(firstPendingPullInto.buffer); + } + ReadableByteStreamControllerInvalidateBYOBRequest(controller); + if (ReadableStreamHasDefaultReader(stream)) { + if (ReadableStreamGetNumReadRequests(stream) === 0) { + ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength); + } else { + var transferredView = new Uint8Array(transferredBuffer, byteOffset, byteLength); + ReadableStreamFulfillReadRequest(stream, transferredView, false); + } + } else if (ReadableStreamHasBYOBReader(stream)) { + ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength); + ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller); + } else { + ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength); + } + ReadableByteStreamControllerCallPullIfNeeded(controller); + } + function ReadableByteStreamControllerError(controller, e) { + var stream = controller._controlledReadableByteStream; + if (stream._state !== 'readable') { + return; + } + ReadableByteStreamControllerClearPendingPullIntos(controller); + ResetQueue(controller); + ReadableByteStreamControllerClearAlgorithms(controller); + ReadableStreamError(stream, e); + } + function ReadableByteStreamControllerGetBYOBRequest(controller) { + if (controller._byobRequest === null && controller._pendingPullIntos.length > 0) { + var firstDescriptor = controller._pendingPullIntos.peek(); + var view = new Uint8Array(firstDescriptor.buffer, firstDescriptor.byteOffset + firstDescriptor.bytesFilled, firstDescriptor.byteLength - firstDescriptor.bytesFilled); + var byobRequest = Object.create(ReadableStreamBYOBRequest.prototype); + SetUpReadableStreamBYOBRequest(byobRequest, controller, view); + controller._byobRequest = byobRequest; + } + return controller._byobRequest; + } + function ReadableByteStreamControllerGetDesiredSize(controller) { + var state = controller._controlledReadableByteStream._state; + if (state === 'errored') { + return null; + } + if (state === 'closed') { + return 0; + } + return controller._strategyHWM - controller._queueTotalSize; + } + function ReadableByteStreamControllerRespond(controller, bytesWritten) { + var firstDescriptor = controller._pendingPullIntos.peek(); + var state = controller._controlledReadableByteStream._state; + if (state === 'closed') { + if (bytesWritten !== 0) { + throw new TypeError('bytesWritten must be 0 when calling respond() on a closed stream'); + } + } else { + if (bytesWritten === 0) { + throw new TypeError('bytesWritten must be greater than 0 when calling respond() on a readable stream'); + } + if (firstDescriptor.bytesFilled + bytesWritten > firstDescriptor.byteLength) { + throw new RangeError('bytesWritten out of range'); + } + } + firstDescriptor.buffer = TransferArrayBuffer(firstDescriptor.buffer); + ReadableByteStreamControllerRespondInternal(controller, bytesWritten); + } + function ReadableByteStreamControllerRespondWithNewView(controller, view) { + var firstDescriptor = controller._pendingPullIntos.peek(); + var state = controller._controlledReadableByteStream._state; + if (state === 'closed') { + if (view.byteLength !== 0) { + throw new TypeError('The view\'s length must be 0 when calling respondWithNewView() on a closed stream'); + } + } else { + if (view.byteLength === 0) { + throw new TypeError('The view\'s length must be greater than 0 when calling respondWithNewView() on a readable stream'); + } + } + if (firstDescriptor.byteOffset + firstDescriptor.bytesFilled !== view.byteOffset) { + throw new RangeError('The region specified by view does not match byobRequest'); + } + if (firstDescriptor.bufferByteLength !== view.buffer.byteLength) { + throw new RangeError('The buffer of view has different capacity than byobRequest'); + } + if (firstDescriptor.bytesFilled + view.byteLength > firstDescriptor.byteLength) { + throw new RangeError('The region specified by view is larger than byobRequest'); + } + firstDescriptor.buffer = TransferArrayBuffer(view.buffer); + ReadableByteStreamControllerRespondInternal(controller, view.byteLength); + } + function SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, autoAllocateChunkSize) { + controller._controlledReadableByteStream = stream; + controller._pullAgain = false; + controller._pulling = false; + controller._byobRequest = null; + controller._queue = controller._queueTotalSize = undefined; + ResetQueue(controller); + controller._closeRequested = false; + controller._started = false; + controller._strategyHWM = highWaterMark; + controller._pullAlgorithm = pullAlgorithm; + controller._cancelAlgorithm = cancelAlgorithm; + controller._autoAllocateChunkSize = autoAllocateChunkSize; + controller._pendingPullIntos = new SimpleQueue(); + stream._readableStreamController = controller; + var startResult = startAlgorithm(); + uponPromise(promiseResolvedWith(startResult), function () { + controller._started = true; + ReadableByteStreamControllerCallPullIfNeeded(controller); + }, function (r) { + ReadableByteStreamControllerError(controller, r); + }); + } + function SetUpReadableByteStreamControllerFromUnderlyingSource(stream, underlyingByteSource, highWaterMark) { + var controller = Object.create(ReadableByteStreamController.prototype); + var startAlgorithm = function () { + return undefined; + }; + var pullAlgorithm = function () { + return promiseResolvedWith(undefined); + }; + var cancelAlgorithm = function () { + return promiseResolvedWith(undefined); + }; + if (underlyingByteSource.start !== undefined) { + startAlgorithm = function () { + return underlyingByteSource.start(controller); + }; + } + if (underlyingByteSource.pull !== undefined) { + pullAlgorithm = function () { + return underlyingByteSource.pull(controller); + }; + } + if (underlyingByteSource.cancel !== undefined) { + cancelAlgorithm = function (reason) { + return underlyingByteSource.cancel(reason); + }; + } + var autoAllocateChunkSize = underlyingByteSource.autoAllocateChunkSize; + if (autoAllocateChunkSize === 0) { + throw new TypeError('autoAllocateChunkSize must be greater than 0'); + } + SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, autoAllocateChunkSize); + } + function SetUpReadableStreamBYOBRequest(request, controller, view) { + request._associatedReadableByteStreamController = controller; + request._view = view; + } + function byobRequestBrandCheckException(name) { + return new TypeError("ReadableStreamBYOBRequest.prototype." + name + " can only be used on a ReadableStreamBYOBRequest"); + } + function byteStreamControllerBrandCheckException(name) { + return new TypeError("ReadableByteStreamController.prototype." + name + " can only be used on a ReadableByteStreamController"); + } + function AcquireReadableStreamBYOBReader(stream) { + return new ReadableStreamBYOBReader(stream); + } + function ReadableStreamAddReadIntoRequest(stream, readIntoRequest) { + stream._reader._readIntoRequests.push(readIntoRequest); + } + function ReadableStreamFulfillReadIntoRequest(stream, chunk, done) { + var reader = stream._reader; + var readIntoRequest = reader._readIntoRequests.shift(); + if (done) { + readIntoRequest._closeSteps(chunk); + } else { + readIntoRequest._chunkSteps(chunk); + } + } + function ReadableStreamGetNumReadIntoRequests(stream) { + return stream._reader._readIntoRequests.length; + } + function ReadableStreamHasBYOBReader(stream) { + var reader = stream._reader; + if (reader === undefined) { + return false; + } + if (!IsReadableStreamBYOBReader(reader)) { + return false; + } + return true; + } + var ReadableStreamBYOBReader = function () { + function ReadableStreamBYOBReader(stream) { + assertRequiredArgument(stream, 1, 'ReadableStreamBYOBReader'); + assertReadableStream(stream, 'First parameter'); + if (IsReadableStreamLocked(stream)) { + throw new TypeError('This stream has already been locked for exclusive reading by another reader'); + } + if (!IsReadableByteStreamController(stream._readableStreamController)) { + throw new TypeError('Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte ' + 'source'); + } + ReadableStreamReaderGenericInitialize(this, stream); + this._readIntoRequests = new SimpleQueue(); + } + Object.defineProperty(ReadableStreamBYOBReader.prototype, "closed", { + get: function () { + if (!IsReadableStreamBYOBReader(this)) { + return promiseRejectedWith(byobReaderBrandCheckException('closed')); + } + return this._closedPromise; + }, + enumerable: false, + configurable: true + }); + ReadableStreamBYOBReader.prototype.cancel = function (reason) { + if (reason === void 0) { + reason = undefined; + } + if (!IsReadableStreamBYOBReader(this)) { + return promiseRejectedWith(byobReaderBrandCheckException('cancel')); + } + if (this._ownerReadableStream === undefined) { + return promiseRejectedWith(readerLockException('cancel')); + } + return ReadableStreamReaderGenericCancel(this, reason); + }; + ReadableStreamBYOBReader.prototype.read = function (view) { + if (!IsReadableStreamBYOBReader(this)) { + return promiseRejectedWith(byobReaderBrandCheckException('read')); + } + if (!ArrayBuffer.isView(view)) { + return promiseRejectedWith(new TypeError('view must be an array buffer view')); + } + if (view.byteLength === 0) { + return promiseRejectedWith(new TypeError('view must have non-zero byteLength')); + } + if (view.buffer.byteLength === 0) { + return promiseRejectedWith(new TypeError("view's buffer must have non-zero byteLength")); + } + if (IsDetachedBuffer(view.buffer)); + if (this._ownerReadableStream === undefined) { + return promiseRejectedWith(readerLockException('read from')); + } + var resolvePromise; + var rejectPromise; + var promise = newPromise(function (resolve, reject) { + resolvePromise = resolve; + rejectPromise = reject; + }); + var readIntoRequest = { + _chunkSteps: function (chunk) { + return resolvePromise({ + value: chunk, + done: false + }); + }, + _closeSteps: function (chunk) { + return resolvePromise({ + value: chunk, + done: true + }); + }, + _errorSteps: function (e) { + return rejectPromise(e); + } + }; + ReadableStreamBYOBReaderRead(this, view, readIntoRequest); + return promise; + }; + ReadableStreamBYOBReader.prototype.releaseLock = function () { + if (!IsReadableStreamBYOBReader(this)) { + throw byobReaderBrandCheckException('releaseLock'); + } + if (this._ownerReadableStream === undefined) { + return; + } + if (this._readIntoRequests.length > 0) { + throw new TypeError('Tried to release a reader lock when that reader has pending read() calls un-settled'); + } + ReadableStreamReaderGenericRelease(this); + }; + return ReadableStreamBYOBReader; + }(); + Object.defineProperties(ReadableStreamBYOBReader.prototype, { + cancel: { enumerable: true }, + read: { enumerable: true }, + releaseLock: { enumerable: true }, + closed: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(ReadableStreamBYOBReader.prototype, SymbolPolyfill.toStringTag, { + value: 'ReadableStreamBYOBReader', + configurable: true + }); + } + function IsReadableStreamBYOBReader(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_readIntoRequests')) { + return false; + } + return x instanceof ReadableStreamBYOBReader; + } + function ReadableStreamBYOBReaderRead(reader, view, readIntoRequest) { + var stream = reader._ownerReadableStream; + stream._disturbed = true; + if (stream._state === 'errored') { + readIntoRequest._errorSteps(stream._storedError); + } else { + ReadableByteStreamControllerPullInto(stream._readableStreamController, view, readIntoRequest); + } + } + function byobReaderBrandCheckException(name) { + return new TypeError("ReadableStreamBYOBReader.prototype." + name + " can only be used on a ReadableStreamBYOBReader"); + } + function ExtractHighWaterMark(strategy, defaultHWM) { + var highWaterMark = strategy.highWaterMark; + if (highWaterMark === undefined) { + return defaultHWM; + } + if (NumberIsNaN(highWaterMark) || highWaterMark < 0) { + throw new RangeError('Invalid highWaterMark'); + } + return highWaterMark; + } + function ExtractSizeAlgorithm(strategy) { + var size = strategy.size; + if (!size) { + return function () { + return 1; + }; + } + return size; + } + function convertQueuingStrategy(init, context) { + assertDictionary(init, context); + var highWaterMark = init === null || init === void 0 ? void 0 : init.highWaterMark; + var size = init === null || init === void 0 ? void 0 : init.size; + return { + highWaterMark: highWaterMark === undefined ? undefined : convertUnrestrictedDouble(highWaterMark), + size: size === undefined ? undefined : convertQueuingStrategySize(size, context + " has member 'size' that") + }; + } + function convertQueuingStrategySize(fn, context) { + assertFunction(fn, context); + return function (chunk) { + return convertUnrestrictedDouble(fn(chunk)); + }; + } + function convertUnderlyingSink(original, context) { + assertDictionary(original, context); + var abort = original === null || original === void 0 ? void 0 : original.abort; + var close = original === null || original === void 0 ? void 0 : original.close; + var start = original === null || original === void 0 ? void 0 : original.start; + var type = original === null || original === void 0 ? void 0 : original.type; + var write = original === null || original === void 0 ? void 0 : original.write; + return { + abort: abort === undefined ? undefined : convertUnderlyingSinkAbortCallback(abort, original, context + " has member 'abort' that"), + close: close === undefined ? undefined : convertUnderlyingSinkCloseCallback(close, original, context + " has member 'close' that"), + start: start === undefined ? undefined : convertUnderlyingSinkStartCallback(start, original, context + " has member 'start' that"), + write: write === undefined ? undefined : convertUnderlyingSinkWriteCallback(write, original, context + " has member 'write' that"), + type: type + }; + } + function convertUnderlyingSinkAbortCallback(fn, original, context) { + assertFunction(fn, context); + return function (reason) { + return promiseCall(fn, original, [reason]); + }; + } + function convertUnderlyingSinkCloseCallback(fn, original, context) { + assertFunction(fn, context); + return function () { + return promiseCall(fn, original, []); + }; + } + function convertUnderlyingSinkStartCallback(fn, original, context) { + assertFunction(fn, context); + return function (controller) { + return reflectCall(fn, original, [controller]); + }; + } + function convertUnderlyingSinkWriteCallback(fn, original, context) { + assertFunction(fn, context); + return function (chunk, controller) { + return promiseCall(fn, original, [ + chunk, + controller + ]); + }; + } + function assertWritableStream(x, context) { + if (!IsWritableStream(x)) { + throw new TypeError(context + " is not a WritableStream."); + } + } + function isAbortSignal(value) { + if (typeof value !== 'object' || value === null) { + return false; + } + try { + return typeof value.aborted === 'boolean'; + } catch (_a) { + return false; + } + } + var supportsAbortController = typeof AbortController === 'function'; + function createAbortController() { + if (supportsAbortController) { + return new AbortController(); + } + return undefined; + } + var WritableStream = function () { + function WritableStream(rawUnderlyingSink, rawStrategy) { + if (rawUnderlyingSink === void 0) { + rawUnderlyingSink = {}; + } + if (rawStrategy === void 0) { + rawStrategy = {}; + } + if (rawUnderlyingSink === undefined) { + rawUnderlyingSink = null; + } else { + assertObject(rawUnderlyingSink, 'First parameter'); + } + var strategy = convertQueuingStrategy(rawStrategy, 'Second parameter'); + var underlyingSink = convertUnderlyingSink(rawUnderlyingSink, 'First parameter'); + InitializeWritableStream(this); + var type = underlyingSink.type; + if (type !== undefined) { + throw new RangeError('Invalid type is specified'); + } + var sizeAlgorithm = ExtractSizeAlgorithm(strategy); + var highWaterMark = ExtractHighWaterMark(strategy, 1); + SetUpWritableStreamDefaultControllerFromUnderlyingSink(this, underlyingSink, highWaterMark, sizeAlgorithm); + } + Object.defineProperty(WritableStream.prototype, "locked", { + get: function () { + if (!IsWritableStream(this)) { + throw streamBrandCheckException$2('locked'); + } + return IsWritableStreamLocked(this); + }, + enumerable: false, + configurable: true + }); + WritableStream.prototype.abort = function (reason) { + if (reason === void 0) { + reason = undefined; + } + if (!IsWritableStream(this)) { + return promiseRejectedWith(streamBrandCheckException$2('abort')); + } + if (IsWritableStreamLocked(this)) { + return promiseRejectedWith(new TypeError('Cannot abort a stream that already has a writer')); + } + return WritableStreamAbort(this, reason); + }; + WritableStream.prototype.close = function () { + if (!IsWritableStream(this)) { + return promiseRejectedWith(streamBrandCheckException$2('close')); + } + if (IsWritableStreamLocked(this)) { + return promiseRejectedWith(new TypeError('Cannot close a stream that already has a writer')); + } + if (WritableStreamCloseQueuedOrInFlight(this)) { + return promiseRejectedWith(new TypeError('Cannot close an already-closing stream')); + } + return WritableStreamClose(this); + }; + WritableStream.prototype.getWriter = function () { + if (!IsWritableStream(this)) { + throw streamBrandCheckException$2('getWriter'); + } + return AcquireWritableStreamDefaultWriter(this); + }; + return WritableStream; + }(); + Object.defineProperties(WritableStream.prototype, { + abort: { enumerable: true }, + close: { enumerable: true }, + getWriter: { enumerable: true }, + locked: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(WritableStream.prototype, SymbolPolyfill.toStringTag, { + value: 'WritableStream', + configurable: true + }); + } + function AcquireWritableStreamDefaultWriter(stream) { + return new WritableStreamDefaultWriter(stream); + } + function CreateWritableStream(startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm) { + if (highWaterMark === void 0) { + highWaterMark = 1; + } + if (sizeAlgorithm === void 0) { + sizeAlgorithm = function () { + return 1; + }; + } + var stream = Object.create(WritableStream.prototype); + InitializeWritableStream(stream); + var controller = Object.create(WritableStreamDefaultController.prototype); + SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm); + return stream; + } + function InitializeWritableStream(stream) { + stream._state = 'writable'; + stream._storedError = undefined; + stream._writer = undefined; + stream._writableStreamController = undefined; + stream._writeRequests = new SimpleQueue(); + stream._inFlightWriteRequest = undefined; + stream._closeRequest = undefined; + stream._inFlightCloseRequest = undefined; + stream._pendingAbortRequest = undefined; + stream._backpressure = false; + } + function IsWritableStream(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_writableStreamController')) { + return false; + } + return x instanceof WritableStream; + } + function IsWritableStreamLocked(stream) { + if (stream._writer === undefined) { + return false; + } + return true; + } + function WritableStreamAbort(stream, reason) { + var _a; + if (stream._state === 'closed' || stream._state === 'errored') { + return promiseResolvedWith(undefined); + } + stream._writableStreamController._abortReason = reason; + (_a = stream._writableStreamController._abortController) === null || _a === void 0 ? void 0 : _a.abort(); + var state = stream._state; + if (state === 'closed' || state === 'errored') { + return promiseResolvedWith(undefined); + } + if (stream._pendingAbortRequest !== undefined) { + return stream._pendingAbortRequest._promise; + } + var wasAlreadyErroring = false; + if (state === 'erroring') { + wasAlreadyErroring = true; + reason = undefined; + } + var promise = newPromise(function (resolve, reject) { + stream._pendingAbortRequest = { + _promise: undefined, + _resolve: resolve, + _reject: reject, + _reason: reason, + _wasAlreadyErroring: wasAlreadyErroring + }; + }); + stream._pendingAbortRequest._promise = promise; + if (!wasAlreadyErroring) { + WritableStreamStartErroring(stream, reason); + } + return promise; + } + function WritableStreamClose(stream) { + var state = stream._state; + if (state === 'closed' || state === 'errored') { + return promiseRejectedWith(new TypeError("The stream (in " + state + " state) is not in the writable state and cannot be closed")); + } + var promise = newPromise(function (resolve, reject) { + var closeRequest = { + _resolve: resolve, + _reject: reject + }; + stream._closeRequest = closeRequest; + }); + var writer = stream._writer; + if (writer !== undefined && stream._backpressure && state === 'writable') { + defaultWriterReadyPromiseResolve(writer); + } + WritableStreamDefaultControllerClose(stream._writableStreamController); + return promise; + } + function WritableStreamAddWriteRequest(stream) { + var promise = newPromise(function (resolve, reject) { + var writeRequest = { + _resolve: resolve, + _reject: reject + }; + stream._writeRequests.push(writeRequest); + }); + return promise; + } + function WritableStreamDealWithRejection(stream, error) { + var state = stream._state; + if (state === 'writable') { + WritableStreamStartErroring(stream, error); + return; + } + WritableStreamFinishErroring(stream); + } + function WritableStreamStartErroring(stream, reason) { + var controller = stream._writableStreamController; + stream._state = 'erroring'; + stream._storedError = reason; + var writer = stream._writer; + if (writer !== undefined) { + WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, reason); + } + if (!WritableStreamHasOperationMarkedInFlight(stream) && controller._started) { + WritableStreamFinishErroring(stream); + } + } + function WritableStreamFinishErroring(stream) { + stream._state = 'errored'; + stream._writableStreamController[ErrorSteps](); + var storedError = stream._storedError; + stream._writeRequests.forEach(function (writeRequest) { + writeRequest._reject(storedError); + }); + stream._writeRequests = new SimpleQueue(); + if (stream._pendingAbortRequest === undefined) { + WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream); + return; + } + var abortRequest = stream._pendingAbortRequest; + stream._pendingAbortRequest = undefined; + if (abortRequest._wasAlreadyErroring) { + abortRequest._reject(storedError); + WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream); + return; + } + var promise = stream._writableStreamController[AbortSteps](abortRequest._reason); + uponPromise(promise, function () { + abortRequest._resolve(); + WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream); + }, function (reason) { + abortRequest._reject(reason); + WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream); + }); + } + function WritableStreamFinishInFlightWrite(stream) { + stream._inFlightWriteRequest._resolve(undefined); + stream._inFlightWriteRequest = undefined; + } + function WritableStreamFinishInFlightWriteWithError(stream, error) { + stream._inFlightWriteRequest._reject(error); + stream._inFlightWriteRequest = undefined; + WritableStreamDealWithRejection(stream, error); + } + function WritableStreamFinishInFlightClose(stream) { + stream._inFlightCloseRequest._resolve(undefined); + stream._inFlightCloseRequest = undefined; + var state = stream._state; + if (state === 'erroring') { + stream._storedError = undefined; + if (stream._pendingAbortRequest !== undefined) { + stream._pendingAbortRequest._resolve(); + stream._pendingAbortRequest = undefined; + } + } + stream._state = 'closed'; + var writer = stream._writer; + if (writer !== undefined) { + defaultWriterClosedPromiseResolve(writer); + } + } + function WritableStreamFinishInFlightCloseWithError(stream, error) { + stream._inFlightCloseRequest._reject(error); + stream._inFlightCloseRequest = undefined; + if (stream._pendingAbortRequest !== undefined) { + stream._pendingAbortRequest._reject(error); + stream._pendingAbortRequest = undefined; + } + WritableStreamDealWithRejection(stream, error); + } + function WritableStreamCloseQueuedOrInFlight(stream) { + if (stream._closeRequest === undefined && stream._inFlightCloseRequest === undefined) { + return false; + } + return true; + } + function WritableStreamHasOperationMarkedInFlight(stream) { + if (stream._inFlightWriteRequest === undefined && stream._inFlightCloseRequest === undefined) { + return false; + } + return true; + } + function WritableStreamMarkCloseRequestInFlight(stream) { + stream._inFlightCloseRequest = stream._closeRequest; + stream._closeRequest = undefined; + } + function WritableStreamMarkFirstWriteRequestInFlight(stream) { + stream._inFlightWriteRequest = stream._writeRequests.shift(); + } + function WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream) { + if (stream._closeRequest !== undefined) { + stream._closeRequest._reject(stream._storedError); + stream._closeRequest = undefined; + } + var writer = stream._writer; + if (writer !== undefined) { + defaultWriterClosedPromiseReject(writer, stream._storedError); + } + } + function WritableStreamUpdateBackpressure(stream, backpressure) { + var writer = stream._writer; + if (writer !== undefined && backpressure !== stream._backpressure) { + if (backpressure) { + defaultWriterReadyPromiseReset(writer); + } else { + defaultWriterReadyPromiseResolve(writer); + } + } + stream._backpressure = backpressure; + } + var WritableStreamDefaultWriter = function () { + function WritableStreamDefaultWriter(stream) { + assertRequiredArgument(stream, 1, 'WritableStreamDefaultWriter'); + assertWritableStream(stream, 'First parameter'); + if (IsWritableStreamLocked(stream)) { + throw new TypeError('This stream has already been locked for exclusive writing by another writer'); + } + this._ownerWritableStream = stream; + stream._writer = this; + var state = stream._state; + if (state === 'writable') { + if (!WritableStreamCloseQueuedOrInFlight(stream) && stream._backpressure) { + defaultWriterReadyPromiseInitialize(this); + } else { + defaultWriterReadyPromiseInitializeAsResolved(this); + } + defaultWriterClosedPromiseInitialize(this); + } else if (state === 'erroring') { + defaultWriterReadyPromiseInitializeAsRejected(this, stream._storedError); + defaultWriterClosedPromiseInitialize(this); + } else if (state === 'closed') { + defaultWriterReadyPromiseInitializeAsResolved(this); + defaultWriterClosedPromiseInitializeAsResolved(this); + } else { + var storedError = stream._storedError; + defaultWriterReadyPromiseInitializeAsRejected(this, storedError); + defaultWriterClosedPromiseInitializeAsRejected(this, storedError); + } + } + Object.defineProperty(WritableStreamDefaultWriter.prototype, "closed", { + get: function () { + if (!IsWritableStreamDefaultWriter(this)) { + return promiseRejectedWith(defaultWriterBrandCheckException('closed')); + } + return this._closedPromise; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(WritableStreamDefaultWriter.prototype, "desiredSize", { + get: function () { + if (!IsWritableStreamDefaultWriter(this)) { + throw defaultWriterBrandCheckException('desiredSize'); + } + if (this._ownerWritableStream === undefined) { + throw defaultWriterLockException('desiredSize'); + } + return WritableStreamDefaultWriterGetDesiredSize(this); + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(WritableStreamDefaultWriter.prototype, "ready", { + get: function () { + if (!IsWritableStreamDefaultWriter(this)) { + return promiseRejectedWith(defaultWriterBrandCheckException('ready')); + } + return this._readyPromise; + }, + enumerable: false, + configurable: true + }); + WritableStreamDefaultWriter.prototype.abort = function (reason) { + if (reason === void 0) { + reason = undefined; + } + if (!IsWritableStreamDefaultWriter(this)) { + return promiseRejectedWith(defaultWriterBrandCheckException('abort')); + } + if (this._ownerWritableStream === undefined) { + return promiseRejectedWith(defaultWriterLockException('abort')); + } + return WritableStreamDefaultWriterAbort(this, reason); + }; + WritableStreamDefaultWriter.prototype.close = function () { + if (!IsWritableStreamDefaultWriter(this)) { + return promiseRejectedWith(defaultWriterBrandCheckException('close')); + } + var stream = this._ownerWritableStream; + if (stream === undefined) { + return promiseRejectedWith(defaultWriterLockException('close')); + } + if (WritableStreamCloseQueuedOrInFlight(stream)) { + return promiseRejectedWith(new TypeError('Cannot close an already-closing stream')); + } + return WritableStreamDefaultWriterClose(this); + }; + WritableStreamDefaultWriter.prototype.releaseLock = function () { + if (!IsWritableStreamDefaultWriter(this)) { + throw defaultWriterBrandCheckException('releaseLock'); + } + var stream = this._ownerWritableStream; + if (stream === undefined) { + return; + } + WritableStreamDefaultWriterRelease(this); + }; + WritableStreamDefaultWriter.prototype.write = function (chunk) { + if (chunk === void 0) { + chunk = undefined; + } + if (!IsWritableStreamDefaultWriter(this)) { + return promiseRejectedWith(defaultWriterBrandCheckException('write')); + } + if (this._ownerWritableStream === undefined) { + return promiseRejectedWith(defaultWriterLockException('write to')); + } + return WritableStreamDefaultWriterWrite(this, chunk); + }; + return WritableStreamDefaultWriter; + }(); + Object.defineProperties(WritableStreamDefaultWriter.prototype, { + abort: { enumerable: true }, + close: { enumerable: true }, + releaseLock: { enumerable: true }, + write: { enumerable: true }, + closed: { enumerable: true }, + desiredSize: { enumerable: true }, + ready: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(WritableStreamDefaultWriter.prototype, SymbolPolyfill.toStringTag, { + value: 'WritableStreamDefaultWriter', + configurable: true + }); + } + function IsWritableStreamDefaultWriter(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_ownerWritableStream')) { + return false; + } + return x instanceof WritableStreamDefaultWriter; + } + function WritableStreamDefaultWriterAbort(writer, reason) { + var stream = writer._ownerWritableStream; + return WritableStreamAbort(stream, reason); + } + function WritableStreamDefaultWriterClose(writer) { + var stream = writer._ownerWritableStream; + return WritableStreamClose(stream); + } + function WritableStreamDefaultWriterCloseWithErrorPropagation(writer) { + var stream = writer._ownerWritableStream; + var state = stream._state; + if (WritableStreamCloseQueuedOrInFlight(stream) || state === 'closed') { + return promiseResolvedWith(undefined); + } + if (state === 'errored') { + return promiseRejectedWith(stream._storedError); + } + return WritableStreamDefaultWriterClose(writer); + } + function WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer, error) { + if (writer._closedPromiseState === 'pending') { + defaultWriterClosedPromiseReject(writer, error); + } else { + defaultWriterClosedPromiseResetToRejected(writer, error); + } + } + function WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, error) { + if (writer._readyPromiseState === 'pending') { + defaultWriterReadyPromiseReject(writer, error); + } else { + defaultWriterReadyPromiseResetToRejected(writer, error); + } + } + function WritableStreamDefaultWriterGetDesiredSize(writer) { + var stream = writer._ownerWritableStream; + var state = stream._state; + if (state === 'errored' || state === 'erroring') { + return null; + } + if (state === 'closed') { + return 0; + } + return WritableStreamDefaultControllerGetDesiredSize(stream._writableStreamController); + } + function WritableStreamDefaultWriterRelease(writer) { + var stream = writer._ownerWritableStream; + var releasedError = new TypeError("Writer was released and can no longer be used to monitor the stream's closedness"); + WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, releasedError); + WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer, releasedError); + stream._writer = undefined; + writer._ownerWritableStream = undefined; + } + function WritableStreamDefaultWriterWrite(writer, chunk) { + var stream = writer._ownerWritableStream; + var controller = stream._writableStreamController; + var chunkSize = WritableStreamDefaultControllerGetChunkSize(controller, chunk); + if (stream !== writer._ownerWritableStream) { + return promiseRejectedWith(defaultWriterLockException('write to')); + } + var state = stream._state; + if (state === 'errored') { + return promiseRejectedWith(stream._storedError); + } + if (WritableStreamCloseQueuedOrInFlight(stream) || state === 'closed') { + return promiseRejectedWith(new TypeError('The stream is closing or closed and cannot be written to')); + } + if (state === 'erroring') { + return promiseRejectedWith(stream._storedError); + } + var promise = WritableStreamAddWriteRequest(stream); + WritableStreamDefaultControllerWrite(controller, chunk, chunkSize); + return promise; + } + var closeSentinel = {}; + var WritableStreamDefaultController = function () { + function WritableStreamDefaultController() { + throw new TypeError('Illegal constructor'); + } + Object.defineProperty(WritableStreamDefaultController.prototype, "abortReason", { + get: function () { + if (!IsWritableStreamDefaultController(this)) { + throw defaultControllerBrandCheckException$2('abortReason'); + } + return this._abortReason; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(WritableStreamDefaultController.prototype, "signal", { + get: function () { + if (!IsWritableStreamDefaultController(this)) { + throw defaultControllerBrandCheckException$2('signal'); + } + if (this._abortController === undefined) { + throw new TypeError('WritableStreamDefaultController.prototype.signal is not supported'); + } + return this._abortController.signal; + }, + enumerable: false, + configurable: true + }); + WritableStreamDefaultController.prototype.error = function (e) { + if (e === void 0) { + e = undefined; + } + if (!IsWritableStreamDefaultController(this)) { + throw defaultControllerBrandCheckException$2('error'); + } + var state = this._controlledWritableStream._state; + if (state !== 'writable') { + return; + } + WritableStreamDefaultControllerError(this, e); + }; + WritableStreamDefaultController.prototype[AbortSteps] = function (reason) { + var result = this._abortAlgorithm(reason); + WritableStreamDefaultControllerClearAlgorithms(this); + return result; + }; + WritableStreamDefaultController.prototype[ErrorSteps] = function () { + ResetQueue(this); + }; + return WritableStreamDefaultController; + }(); + Object.defineProperties(WritableStreamDefaultController.prototype, { error: { enumerable: true } }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(WritableStreamDefaultController.prototype, SymbolPolyfill.toStringTag, { + value: 'WritableStreamDefaultController', + configurable: true + }); + } + function IsWritableStreamDefaultController(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_controlledWritableStream')) { + return false; + } + return x instanceof WritableStreamDefaultController; + } + function SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm) { + controller._controlledWritableStream = stream; + stream._writableStreamController = controller; + controller._queue = undefined; + controller._queueTotalSize = undefined; + ResetQueue(controller); + controller._abortReason = undefined; + controller._abortController = createAbortController(); + controller._started = false; + controller._strategySizeAlgorithm = sizeAlgorithm; + controller._strategyHWM = highWaterMark; + controller._writeAlgorithm = writeAlgorithm; + controller._closeAlgorithm = closeAlgorithm; + controller._abortAlgorithm = abortAlgorithm; + var backpressure = WritableStreamDefaultControllerGetBackpressure(controller); + WritableStreamUpdateBackpressure(stream, backpressure); + var startResult = startAlgorithm(); + var startPromise = promiseResolvedWith(startResult); + uponPromise(startPromise, function () { + controller._started = true; + WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); + }, function (r) { + controller._started = true; + WritableStreamDealWithRejection(stream, r); + }); + } + function SetUpWritableStreamDefaultControllerFromUnderlyingSink(stream, underlyingSink, highWaterMark, sizeAlgorithm) { + var controller = Object.create(WritableStreamDefaultController.prototype); + var startAlgorithm = function () { + return undefined; + }; + var writeAlgorithm = function () { + return promiseResolvedWith(undefined); + }; + var closeAlgorithm = function () { + return promiseResolvedWith(undefined); + }; + var abortAlgorithm = function () { + return promiseResolvedWith(undefined); + }; + if (underlyingSink.start !== undefined) { + startAlgorithm = function () { + return underlyingSink.start(controller); + }; + } + if (underlyingSink.write !== undefined) { + writeAlgorithm = function (chunk) { + return underlyingSink.write(chunk, controller); + }; + } + if (underlyingSink.close !== undefined) { + closeAlgorithm = function () { + return underlyingSink.close(); + }; + } + if (underlyingSink.abort !== undefined) { + abortAlgorithm = function (reason) { + return underlyingSink.abort(reason); + }; + } + SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm); + } + function WritableStreamDefaultControllerClearAlgorithms(controller) { + controller._writeAlgorithm = undefined; + controller._closeAlgorithm = undefined; + controller._abortAlgorithm = undefined; + controller._strategySizeAlgorithm = undefined; + } + function WritableStreamDefaultControllerClose(controller) { + EnqueueValueWithSize(controller, closeSentinel, 0); + WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); + } + function WritableStreamDefaultControllerGetChunkSize(controller, chunk) { + try { + return controller._strategySizeAlgorithm(chunk); + } catch (chunkSizeE) { + WritableStreamDefaultControllerErrorIfNeeded(controller, chunkSizeE); + return 1; + } + } + function WritableStreamDefaultControllerGetDesiredSize(controller) { + return controller._strategyHWM - controller._queueTotalSize; + } + function WritableStreamDefaultControllerWrite(controller, chunk, chunkSize) { + try { + EnqueueValueWithSize(controller, chunk, chunkSize); + } catch (enqueueE) { + WritableStreamDefaultControllerErrorIfNeeded(controller, enqueueE); + return; + } + var stream = controller._controlledWritableStream; + if (!WritableStreamCloseQueuedOrInFlight(stream) && stream._state === 'writable') { + var backpressure = WritableStreamDefaultControllerGetBackpressure(controller); + WritableStreamUpdateBackpressure(stream, backpressure); + } + WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); + } + function WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller) { + var stream = controller._controlledWritableStream; + if (!controller._started) { + return; + } + if (stream._inFlightWriteRequest !== undefined) { + return; + } + var state = stream._state; + if (state === 'erroring') { + WritableStreamFinishErroring(stream); + return; + } + if (controller._queue.length === 0) { + return; + } + var value = PeekQueueValue(controller); + if (value === closeSentinel) { + WritableStreamDefaultControllerProcessClose(controller); + } else { + WritableStreamDefaultControllerProcessWrite(controller, value); + } + } + function WritableStreamDefaultControllerErrorIfNeeded(controller, error) { + if (controller._controlledWritableStream._state === 'writable') { + WritableStreamDefaultControllerError(controller, error); + } + } + function WritableStreamDefaultControllerProcessClose(controller) { + var stream = controller._controlledWritableStream; + WritableStreamMarkCloseRequestInFlight(stream); + DequeueValue(controller); + var sinkClosePromise = controller._closeAlgorithm(); + WritableStreamDefaultControllerClearAlgorithms(controller); + uponPromise(sinkClosePromise, function () { + WritableStreamFinishInFlightClose(stream); + }, function (reason) { + WritableStreamFinishInFlightCloseWithError(stream, reason); + }); + } + function WritableStreamDefaultControllerProcessWrite(controller, chunk) { + var stream = controller._controlledWritableStream; + WritableStreamMarkFirstWriteRequestInFlight(stream); + var sinkWritePromise = controller._writeAlgorithm(chunk); + uponPromise(sinkWritePromise, function () { + WritableStreamFinishInFlightWrite(stream); + var state = stream._state; + DequeueValue(controller); + if (!WritableStreamCloseQueuedOrInFlight(stream) && state === 'writable') { + var backpressure = WritableStreamDefaultControllerGetBackpressure(controller); + WritableStreamUpdateBackpressure(stream, backpressure); + } + WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); + }, function (reason) { + if (stream._state === 'writable') { + WritableStreamDefaultControllerClearAlgorithms(controller); + } + WritableStreamFinishInFlightWriteWithError(stream, reason); + }); + } + function WritableStreamDefaultControllerGetBackpressure(controller) { + var desiredSize = WritableStreamDefaultControllerGetDesiredSize(controller); + return desiredSize <= 0; + } + function WritableStreamDefaultControllerError(controller, error) { + var stream = controller._controlledWritableStream; + WritableStreamDefaultControllerClearAlgorithms(controller); + WritableStreamStartErroring(stream, error); + } + function streamBrandCheckException$2(name) { + return new TypeError("WritableStream.prototype." + name + " can only be used on a WritableStream"); + } + function defaultControllerBrandCheckException$2(name) { + return new TypeError("WritableStreamDefaultController.prototype." + name + " can only be used on a WritableStreamDefaultController"); + } + function defaultWriterBrandCheckException(name) { + return new TypeError("WritableStreamDefaultWriter.prototype." + name + " can only be used on a WritableStreamDefaultWriter"); + } + function defaultWriterLockException(name) { + return new TypeError('Cannot ' + name + ' a stream using a released writer'); + } + function defaultWriterClosedPromiseInitialize(writer) { + writer._closedPromise = newPromise(function (resolve, reject) { + writer._closedPromise_resolve = resolve; + writer._closedPromise_reject = reject; + writer._closedPromiseState = 'pending'; + }); + } + function defaultWriterClosedPromiseInitializeAsRejected(writer, reason) { + defaultWriterClosedPromiseInitialize(writer); + defaultWriterClosedPromiseReject(writer, reason); + } + function defaultWriterClosedPromiseInitializeAsResolved(writer) { + defaultWriterClosedPromiseInitialize(writer); + defaultWriterClosedPromiseResolve(writer); + } + function defaultWriterClosedPromiseReject(writer, reason) { + if (writer._closedPromise_reject === undefined) { + return; + } + setPromiseIsHandledToTrue(writer._closedPromise); + writer._closedPromise_reject(reason); + writer._closedPromise_resolve = undefined; + writer._closedPromise_reject = undefined; + writer._closedPromiseState = 'rejected'; + } + function defaultWriterClosedPromiseResetToRejected(writer, reason) { + defaultWriterClosedPromiseInitializeAsRejected(writer, reason); + } + function defaultWriterClosedPromiseResolve(writer) { + if (writer._closedPromise_resolve === undefined) { + return; + } + writer._closedPromise_resolve(undefined); + writer._closedPromise_resolve = undefined; + writer._closedPromise_reject = undefined; + writer._closedPromiseState = 'resolved'; + } + function defaultWriterReadyPromiseInitialize(writer) { + writer._readyPromise = newPromise(function (resolve, reject) { + writer._readyPromise_resolve = resolve; + writer._readyPromise_reject = reject; + }); + writer._readyPromiseState = 'pending'; + } + function defaultWriterReadyPromiseInitializeAsRejected(writer, reason) { + defaultWriterReadyPromiseInitialize(writer); + defaultWriterReadyPromiseReject(writer, reason); + } + function defaultWriterReadyPromiseInitializeAsResolved(writer) { + defaultWriterReadyPromiseInitialize(writer); + defaultWriterReadyPromiseResolve(writer); + } + function defaultWriterReadyPromiseReject(writer, reason) { + if (writer._readyPromise_reject === undefined) { + return; + } + setPromiseIsHandledToTrue(writer._readyPromise); + writer._readyPromise_reject(reason); + writer._readyPromise_resolve = undefined; + writer._readyPromise_reject = undefined; + writer._readyPromiseState = 'rejected'; + } + function defaultWriterReadyPromiseReset(writer) { + defaultWriterReadyPromiseInitialize(writer); + } + function defaultWriterReadyPromiseResetToRejected(writer, reason) { + defaultWriterReadyPromiseInitializeAsRejected(writer, reason); + } + function defaultWriterReadyPromiseResolve(writer) { + if (writer._readyPromise_resolve === undefined) { + return; + } + writer._readyPromise_resolve(undefined); + writer._readyPromise_resolve = undefined; + writer._readyPromise_reject = undefined; + writer._readyPromiseState = 'fulfilled'; + } + var NativeDOMException = typeof DOMException !== 'undefined' ? DOMException : undefined; + function isDOMExceptionConstructor(ctor) { + if (!(typeof ctor === 'function' || typeof ctor === 'object')) { + return false; + } + try { + new ctor(); + return true; + } catch (_a) { + return false; + } + } + function createDOMExceptionPolyfill() { + var ctor = function DOMException(message, name) { + this.message = message || ''; + this.name = name || 'Error'; + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + }; + ctor.prototype = Object.create(Error.prototype); + Object.defineProperty(ctor.prototype, 'constructor', { + value: ctor, + writable: true, + configurable: true + }); + return ctor; + } + var DOMException$1 = isDOMExceptionConstructor(NativeDOMException) ? NativeDOMException : createDOMExceptionPolyfill(); + function ReadableStreamPipeTo(source, dest, preventClose, preventAbort, preventCancel, signal) { + var reader = AcquireReadableStreamDefaultReader(source); + var writer = AcquireWritableStreamDefaultWriter(dest); + source._disturbed = true; + var shuttingDown = false; + var currentWrite = promiseResolvedWith(undefined); + return newPromise(function (resolve, reject) { + var abortAlgorithm; + if (signal !== undefined) { + abortAlgorithm = function () { + var error = new DOMException$1('Aborted', 'AbortError'); + var actions = []; + if (!preventAbort) { + actions.push(function () { + if (dest._state === 'writable') { + return WritableStreamAbort(dest, error); + } + return promiseResolvedWith(undefined); + }); + } + if (!preventCancel) { + actions.push(function () { + if (source._state === 'readable') { + return ReadableStreamCancel(source, error); + } + return promiseResolvedWith(undefined); + }); + } + shutdownWithAction(function () { + return Promise.all(actions.map(function (action) { + return action(); + })); + }, true, error); + }; + if (signal.aborted) { + abortAlgorithm(); + return; + } + signal.addEventListener('abort', abortAlgorithm); + } + function pipeLoop() { + return newPromise(function (resolveLoop, rejectLoop) { + function next(done) { + if (done) { + resolveLoop(); + } else { + PerformPromiseThen(pipeStep(), next, rejectLoop); + } + } + next(false); + }); + } + function pipeStep() { + if (shuttingDown) { + return promiseResolvedWith(true); + } + return PerformPromiseThen(writer._readyPromise, function () { + return newPromise(function (resolveRead, rejectRead) { + ReadableStreamDefaultReaderRead(reader, { + _chunkSteps: function (chunk) { + currentWrite = PerformPromiseThen(WritableStreamDefaultWriterWrite(writer, chunk), undefined, noop); + resolveRead(false); + }, + _closeSteps: function () { + return resolveRead(true); + }, + _errorSteps: rejectRead + }); + }); + }); + } + isOrBecomesErrored(source, reader._closedPromise, function (storedError) { + if (!preventAbort) { + shutdownWithAction(function () { + return WritableStreamAbort(dest, storedError); + }, true, storedError); + } else { + shutdown(true, storedError); + } + }); + isOrBecomesErrored(dest, writer._closedPromise, function (storedError) { + if (!preventCancel) { + shutdownWithAction(function () { + return ReadableStreamCancel(source, storedError); + }, true, storedError); + } else { + shutdown(true, storedError); + } + }); + isOrBecomesClosed(source, reader._closedPromise, function () { + if (!preventClose) { + shutdownWithAction(function () { + return WritableStreamDefaultWriterCloseWithErrorPropagation(writer); + }); + } else { + shutdown(); + } + }); + if (WritableStreamCloseQueuedOrInFlight(dest) || dest._state === 'closed') { + var destClosed_1 = new TypeError('the destination writable stream closed before all data could be piped to it'); + if (!preventCancel) { + shutdownWithAction(function () { + return ReadableStreamCancel(source, destClosed_1); + }, true, destClosed_1); + } else { + shutdown(true, destClosed_1); + } + } + setPromiseIsHandledToTrue(pipeLoop()); + function waitForWritesToFinish() { + var oldCurrentWrite = currentWrite; + return PerformPromiseThen(currentWrite, function () { + return oldCurrentWrite !== currentWrite ? waitForWritesToFinish() : undefined; + }); + } + function isOrBecomesErrored(stream, promise, action) { + if (stream._state === 'errored') { + action(stream._storedError); + } else { + uponRejection(promise, action); + } + } + function isOrBecomesClosed(stream, promise, action) { + if (stream._state === 'closed') { + action(); + } else { + uponFulfillment(promise, action); + } + } + function shutdownWithAction(action, originalIsError, originalError) { + if (shuttingDown) { + return; + } + shuttingDown = true; + if (dest._state === 'writable' && !WritableStreamCloseQueuedOrInFlight(dest)) { + uponFulfillment(waitForWritesToFinish(), doTheRest); + } else { + doTheRest(); + } + function doTheRest() { + uponPromise(action(), function () { + return finalize(originalIsError, originalError); + }, function (newError) { + return finalize(true, newError); + }); + } + } + function shutdown(isError, error) { + if (shuttingDown) { + return; + } + shuttingDown = true; + if (dest._state === 'writable' && !WritableStreamCloseQueuedOrInFlight(dest)) { + uponFulfillment(waitForWritesToFinish(), function () { + return finalize(isError, error); + }); + } else { + finalize(isError, error); + } + } + function finalize(isError, error) { + WritableStreamDefaultWriterRelease(writer); + ReadableStreamReaderGenericRelease(reader); + if (signal !== undefined) { + signal.removeEventListener('abort', abortAlgorithm); + } + if (isError) { + reject(error); + } else { + resolve(undefined); + } + } + }); + } + var ReadableStreamDefaultController = function () { + function ReadableStreamDefaultController() { + throw new TypeError('Illegal constructor'); + } + Object.defineProperty(ReadableStreamDefaultController.prototype, "desiredSize", { + get: function () { + if (!IsReadableStreamDefaultController(this)) { + throw defaultControllerBrandCheckException$1('desiredSize'); + } + return ReadableStreamDefaultControllerGetDesiredSize(this); + }, + enumerable: false, + configurable: true + }); + ReadableStreamDefaultController.prototype.close = function () { + if (!IsReadableStreamDefaultController(this)) { + throw defaultControllerBrandCheckException$1('close'); + } + if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(this)) { + throw new TypeError('The stream is not in a state that permits close'); + } + ReadableStreamDefaultControllerClose(this); + }; + ReadableStreamDefaultController.prototype.enqueue = function (chunk) { + if (chunk === void 0) { + chunk = undefined; + } + if (!IsReadableStreamDefaultController(this)) { + throw defaultControllerBrandCheckException$1('enqueue'); + } + if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(this)) { + throw new TypeError('The stream is not in a state that permits enqueue'); + } + return ReadableStreamDefaultControllerEnqueue(this, chunk); + }; + ReadableStreamDefaultController.prototype.error = function (e) { + if (e === void 0) { + e = undefined; + } + if (!IsReadableStreamDefaultController(this)) { + throw defaultControllerBrandCheckException$1('error'); + } + ReadableStreamDefaultControllerError(this, e); + }; + ReadableStreamDefaultController.prototype[CancelSteps] = function (reason) { + ResetQueue(this); + var result = this._cancelAlgorithm(reason); + ReadableStreamDefaultControllerClearAlgorithms(this); + return result; + }; + ReadableStreamDefaultController.prototype[PullSteps] = function (readRequest) { + var stream = this._controlledReadableStream; + if (this._queue.length > 0) { + var chunk = DequeueValue(this); + if (this._closeRequested && this._queue.length === 0) { + ReadableStreamDefaultControllerClearAlgorithms(this); + ReadableStreamClose(stream); + } else { + ReadableStreamDefaultControllerCallPullIfNeeded(this); + } + readRequest._chunkSteps(chunk); + } else { + ReadableStreamAddReadRequest(stream, readRequest); + ReadableStreamDefaultControllerCallPullIfNeeded(this); + } + }; + return ReadableStreamDefaultController; + }(); + Object.defineProperties(ReadableStreamDefaultController.prototype, { + close: { enumerable: true }, + enqueue: { enumerable: true }, + error: { enumerable: true }, + desiredSize: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(ReadableStreamDefaultController.prototype, SymbolPolyfill.toStringTag, { + value: 'ReadableStreamDefaultController', + configurable: true + }); + } + function IsReadableStreamDefaultController(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_controlledReadableStream')) { + return false; + } + return x instanceof ReadableStreamDefaultController; + } + function ReadableStreamDefaultControllerCallPullIfNeeded(controller) { + var shouldPull = ReadableStreamDefaultControllerShouldCallPull(controller); + if (!shouldPull) { + return; + } + if (controller._pulling) { + controller._pullAgain = true; + return; + } + controller._pulling = true; + var pullPromise = controller._pullAlgorithm(); + uponPromise(pullPromise, function () { + controller._pulling = false; + if (controller._pullAgain) { + controller._pullAgain = false; + ReadableStreamDefaultControllerCallPullIfNeeded(controller); + } + }, function (e) { + ReadableStreamDefaultControllerError(controller, e); + }); + } + function ReadableStreamDefaultControllerShouldCallPull(controller) { + var stream = controller._controlledReadableStream; + if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)) { + return false; + } + if (!controller._started) { + return false; + } + if (IsReadableStreamLocked(stream) && ReadableStreamGetNumReadRequests(stream) > 0) { + return true; + } + var desiredSize = ReadableStreamDefaultControllerGetDesiredSize(controller); + if (desiredSize > 0) { + return true; + } + return false; + } + function ReadableStreamDefaultControllerClearAlgorithms(controller) { + controller._pullAlgorithm = undefined; + controller._cancelAlgorithm = undefined; + controller._strategySizeAlgorithm = undefined; + } + function ReadableStreamDefaultControllerClose(controller) { + if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)) { + return; + } + var stream = controller._controlledReadableStream; + controller._closeRequested = true; + if (controller._queue.length === 0) { + ReadableStreamDefaultControllerClearAlgorithms(controller); + ReadableStreamClose(stream); + } + } + function ReadableStreamDefaultControllerEnqueue(controller, chunk) { + if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)) { + return; + } + var stream = controller._controlledReadableStream; + if (IsReadableStreamLocked(stream) && ReadableStreamGetNumReadRequests(stream) > 0) { + ReadableStreamFulfillReadRequest(stream, chunk, false); + } else { + var chunkSize = void 0; + try { + chunkSize = controller._strategySizeAlgorithm(chunk); + } catch (chunkSizeE) { + ReadableStreamDefaultControllerError(controller, chunkSizeE); + throw chunkSizeE; + } + try { + EnqueueValueWithSize(controller, chunk, chunkSize); + } catch (enqueueE) { + ReadableStreamDefaultControllerError(controller, enqueueE); + throw enqueueE; + } + } + ReadableStreamDefaultControllerCallPullIfNeeded(controller); + } + function ReadableStreamDefaultControllerError(controller, e) { + var stream = controller._controlledReadableStream; + if (stream._state !== 'readable') { + return; + } + ResetQueue(controller); + ReadableStreamDefaultControllerClearAlgorithms(controller); + ReadableStreamError(stream, e); + } + function ReadableStreamDefaultControllerGetDesiredSize(controller) { + var state = controller._controlledReadableStream._state; + if (state === 'errored') { + return null; + } + if (state === 'closed') { + return 0; + } + return controller._strategyHWM - controller._queueTotalSize; + } + function ReadableStreamDefaultControllerHasBackpressure(controller) { + if (ReadableStreamDefaultControllerShouldCallPull(controller)) { + return false; + } + return true; + } + function ReadableStreamDefaultControllerCanCloseOrEnqueue(controller) { + var state = controller._controlledReadableStream._state; + if (!controller._closeRequested && state === 'readable') { + return true; + } + return false; + } + function SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm) { + controller._controlledReadableStream = stream; + controller._queue = undefined; + controller._queueTotalSize = undefined; + ResetQueue(controller); + controller._started = false; + controller._closeRequested = false; + controller._pullAgain = false; + controller._pulling = false; + controller._strategySizeAlgorithm = sizeAlgorithm; + controller._strategyHWM = highWaterMark; + controller._pullAlgorithm = pullAlgorithm; + controller._cancelAlgorithm = cancelAlgorithm; + stream._readableStreamController = controller; + var startResult = startAlgorithm(); + uponPromise(promiseResolvedWith(startResult), function () { + controller._started = true; + ReadableStreamDefaultControllerCallPullIfNeeded(controller); + }, function (r) { + ReadableStreamDefaultControllerError(controller, r); + }); + } + function SetUpReadableStreamDefaultControllerFromUnderlyingSource(stream, underlyingSource, highWaterMark, sizeAlgorithm) { + var controller = Object.create(ReadableStreamDefaultController.prototype); + var startAlgorithm = function () { + return undefined; + }; + var pullAlgorithm = function () { + return promiseResolvedWith(undefined); + }; + var cancelAlgorithm = function () { + return promiseResolvedWith(undefined); + }; + if (underlyingSource.start !== undefined) { + startAlgorithm = function () { + return underlyingSource.start(controller); + }; + } + if (underlyingSource.pull !== undefined) { + pullAlgorithm = function () { + return underlyingSource.pull(controller); + }; + } + if (underlyingSource.cancel !== undefined) { + cancelAlgorithm = function (reason) { + return underlyingSource.cancel(reason); + }; + } + SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm); + } + function defaultControllerBrandCheckException$1(name) { + return new TypeError("ReadableStreamDefaultController.prototype." + name + " can only be used on a ReadableStreamDefaultController"); + } + function ReadableStreamTee(stream, cloneForBranch2) { + if (IsReadableByteStreamController(stream._readableStreamController)) { + return ReadableByteStreamTee(stream); + } + return ReadableStreamDefaultTee(stream); + } + function ReadableStreamDefaultTee(stream, cloneForBranch2) { + var reader = AcquireReadableStreamDefaultReader(stream); + var reading = false; + var canceled1 = false; + var canceled2 = false; + var reason1; + var reason2; + var branch1; + var branch2; + var resolveCancelPromise; + var cancelPromise = newPromise(function (resolve) { + resolveCancelPromise = resolve; + }); + function pullAlgorithm() { + if (reading) { + return promiseResolvedWith(undefined); + } + reading = true; + var readRequest = { + _chunkSteps: function (chunk) { + queueMicrotask(function () { + reading = false; + var chunk1 = chunk; + var chunk2 = chunk; + if (!canceled1) { + ReadableStreamDefaultControllerEnqueue(branch1._readableStreamController, chunk1); + } + if (!canceled2) { + ReadableStreamDefaultControllerEnqueue(branch2._readableStreamController, chunk2); + } + }); + }, + _closeSteps: function () { + reading = false; + if (!canceled1) { + ReadableStreamDefaultControllerClose(branch1._readableStreamController); + } + if (!canceled2) { + ReadableStreamDefaultControllerClose(branch2._readableStreamController); + } + if (!canceled1 || !canceled2) { + resolveCancelPromise(undefined); + } + }, + _errorSteps: function () { + reading = false; + } + }; + ReadableStreamDefaultReaderRead(reader, readRequest); + return promiseResolvedWith(undefined); + } + function cancel1Algorithm(reason) { + canceled1 = true; + reason1 = reason; + if (canceled2) { + var compositeReason = CreateArrayFromList([ + reason1, + reason2 + ]); + var cancelResult = ReadableStreamCancel(stream, compositeReason); + resolveCancelPromise(cancelResult); + } + return cancelPromise; + } + function cancel2Algorithm(reason) { + canceled2 = true; + reason2 = reason; + if (canceled1) { + var compositeReason = CreateArrayFromList([ + reason1, + reason2 + ]); + var cancelResult = ReadableStreamCancel(stream, compositeReason); + resolveCancelPromise(cancelResult); + } + return cancelPromise; + } + function startAlgorithm() { + } + branch1 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancel1Algorithm); + branch2 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancel2Algorithm); + uponRejection(reader._closedPromise, function (r) { + ReadableStreamDefaultControllerError(branch1._readableStreamController, r); + ReadableStreamDefaultControllerError(branch2._readableStreamController, r); + if (!canceled1 || !canceled2) { + resolveCancelPromise(undefined); + } + }); + return [ + branch1, + branch2 + ]; + } + function ReadableByteStreamTee(stream) { + var reader = AcquireReadableStreamDefaultReader(stream); + var reading = false; + var canceled1 = false; + var canceled2 = false; + var reason1; + var reason2; + var branch1; + var branch2; + var resolveCancelPromise; + var cancelPromise = newPromise(function (resolve) { + resolveCancelPromise = resolve; + }); + function forwardReaderError(thisReader) { + uponRejection(thisReader._closedPromise, function (r) { + if (thisReader !== reader) { + return; + } + ReadableByteStreamControllerError(branch1._readableStreamController, r); + ReadableByteStreamControllerError(branch2._readableStreamController, r); + if (!canceled1 || !canceled2) { + resolveCancelPromise(undefined); + } + }); + } + function pullWithDefaultReader() { + if (IsReadableStreamBYOBReader(reader)) { + ReadableStreamReaderGenericRelease(reader); + reader = AcquireReadableStreamDefaultReader(stream); + forwardReaderError(reader); + } + var readRequest = { + _chunkSteps: function (chunk) { + queueMicrotask(function () { + reading = false; + var chunk1 = chunk; + var chunk2 = chunk; + if (!canceled1 && !canceled2) { + try { + chunk2 = CloneAsUint8Array(chunk); + } catch (cloneE) { + ReadableByteStreamControllerError(branch1._readableStreamController, cloneE); + ReadableByteStreamControllerError(branch2._readableStreamController, cloneE); + resolveCancelPromise(ReadableStreamCancel(stream, cloneE)); + return; + } + } + if (!canceled1) { + ReadableByteStreamControllerEnqueue(branch1._readableStreamController, chunk1); + } + if (!canceled2) { + ReadableByteStreamControllerEnqueue(branch2._readableStreamController, chunk2); + } + }); + }, + _closeSteps: function () { + reading = false; + if (!canceled1) { + ReadableByteStreamControllerClose(branch1._readableStreamController); + } + if (!canceled2) { + ReadableByteStreamControllerClose(branch2._readableStreamController); + } + if (branch1._readableStreamController._pendingPullIntos.length > 0) { + ReadableByteStreamControllerRespond(branch1._readableStreamController, 0); + } + if (branch2._readableStreamController._pendingPullIntos.length > 0) { + ReadableByteStreamControllerRespond(branch2._readableStreamController, 0); + } + if (!canceled1 || !canceled2) { + resolveCancelPromise(undefined); + } + }, + _errorSteps: function () { + reading = false; + } + }; + ReadableStreamDefaultReaderRead(reader, readRequest); + } + function pullWithBYOBReader(view, forBranch2) { + if (IsReadableStreamDefaultReader(reader)) { + ReadableStreamReaderGenericRelease(reader); + reader = AcquireReadableStreamBYOBReader(stream); + forwardReaderError(reader); + } + var byobBranch = forBranch2 ? branch2 : branch1; + var otherBranch = forBranch2 ? branch1 : branch2; + var readIntoRequest = { + _chunkSteps: function (chunk) { + queueMicrotask(function () { + reading = false; + var byobCanceled = forBranch2 ? canceled2 : canceled1; + var otherCanceled = forBranch2 ? canceled1 : canceled2; + if (!otherCanceled) { + var clonedChunk = void 0; + try { + clonedChunk = CloneAsUint8Array(chunk); + } catch (cloneE) { + ReadableByteStreamControllerError(byobBranch._readableStreamController, cloneE); + ReadableByteStreamControllerError(otherBranch._readableStreamController, cloneE); + resolveCancelPromise(ReadableStreamCancel(stream, cloneE)); + return; + } + if (!byobCanceled) { + ReadableByteStreamControllerRespondWithNewView(byobBranch._readableStreamController, chunk); + } + ReadableByteStreamControllerEnqueue(otherBranch._readableStreamController, clonedChunk); + } else if (!byobCanceled) { + ReadableByteStreamControllerRespondWithNewView(byobBranch._readableStreamController, chunk); + } + }); + }, + _closeSteps: function (chunk) { + reading = false; + var byobCanceled = forBranch2 ? canceled2 : canceled1; + var otherCanceled = forBranch2 ? canceled1 : canceled2; + if (!byobCanceled) { + ReadableByteStreamControllerClose(byobBranch._readableStreamController); + } + if (!otherCanceled) { + ReadableByteStreamControllerClose(otherBranch._readableStreamController); + } + if (chunk !== undefined) { + if (!byobCanceled) { + ReadableByteStreamControllerRespondWithNewView(byobBranch._readableStreamController, chunk); + } + if (!otherCanceled && otherBranch._readableStreamController._pendingPullIntos.length > 0) { + ReadableByteStreamControllerRespond(otherBranch._readableStreamController, 0); + } + } + if (!byobCanceled || !otherCanceled) { + resolveCancelPromise(undefined); + } + }, + _errorSteps: function () { + reading = false; + } + }; + ReadableStreamBYOBReaderRead(reader, view, readIntoRequest); + } + function pull1Algorithm() { + if (reading) { + return promiseResolvedWith(undefined); + } + reading = true; + var byobRequest = ReadableByteStreamControllerGetBYOBRequest(branch1._readableStreamController); + if (byobRequest === null) { + pullWithDefaultReader(); + } else { + pullWithBYOBReader(byobRequest._view, false); + } + return promiseResolvedWith(undefined); + } + function pull2Algorithm() { + if (reading) { + return promiseResolvedWith(undefined); + } + reading = true; + var byobRequest = ReadableByteStreamControllerGetBYOBRequest(branch2._readableStreamController); + if (byobRequest === null) { + pullWithDefaultReader(); + } else { + pullWithBYOBReader(byobRequest._view, true); + } + return promiseResolvedWith(undefined); + } + function cancel1Algorithm(reason) { + canceled1 = true; + reason1 = reason; + if (canceled2) { + var compositeReason = CreateArrayFromList([ + reason1, + reason2 + ]); + var cancelResult = ReadableStreamCancel(stream, compositeReason); + resolveCancelPromise(cancelResult); + } + return cancelPromise; + } + function cancel2Algorithm(reason) { + canceled2 = true; + reason2 = reason; + if (canceled1) { + var compositeReason = CreateArrayFromList([ + reason1, + reason2 + ]); + var cancelResult = ReadableStreamCancel(stream, compositeReason); + resolveCancelPromise(cancelResult); + } + return cancelPromise; + } + function startAlgorithm() { + } + branch1 = CreateReadableByteStream(startAlgorithm, pull1Algorithm, cancel1Algorithm); + branch2 = CreateReadableByteStream(startAlgorithm, pull2Algorithm, cancel2Algorithm); + forwardReaderError(reader); + return [ + branch1, + branch2 + ]; + } + function convertUnderlyingDefaultOrByteSource(source, context) { + assertDictionary(source, context); + var original = source; + var autoAllocateChunkSize = original === null || original === void 0 ? void 0 : original.autoAllocateChunkSize; + var cancel = original === null || original === void 0 ? void 0 : original.cancel; + var pull = original === null || original === void 0 ? void 0 : original.pull; + var start = original === null || original === void 0 ? void 0 : original.start; + var type = original === null || original === void 0 ? void 0 : original.type; + return { + autoAllocateChunkSize: autoAllocateChunkSize === undefined ? undefined : convertUnsignedLongLongWithEnforceRange(autoAllocateChunkSize, context + " has member 'autoAllocateChunkSize' that"), + cancel: cancel === undefined ? undefined : convertUnderlyingSourceCancelCallback(cancel, original, context + " has member 'cancel' that"), + pull: pull === undefined ? undefined : convertUnderlyingSourcePullCallback(pull, original, context + " has member 'pull' that"), + start: start === undefined ? undefined : convertUnderlyingSourceStartCallback(start, original, context + " has member 'start' that"), + type: type === undefined ? undefined : convertReadableStreamType(type, context + " has member 'type' that") + }; + } + function convertUnderlyingSourceCancelCallback(fn, original, context) { + assertFunction(fn, context); + return function (reason) { + return promiseCall(fn, original, [reason]); + }; + } + function convertUnderlyingSourcePullCallback(fn, original, context) { + assertFunction(fn, context); + return function (controller) { + return promiseCall(fn, original, [controller]); + }; + } + function convertUnderlyingSourceStartCallback(fn, original, context) { + assertFunction(fn, context); + return function (controller) { + return reflectCall(fn, original, [controller]); + }; + } + function convertReadableStreamType(type, context) { + type = "" + type; + if (type !== 'bytes') { + throw new TypeError(context + " '" + type + "' is not a valid enumeration value for ReadableStreamType"); + } + return type; + } + function convertReaderOptions(options, context) { + assertDictionary(options, context); + var mode = options === null || options === void 0 ? void 0 : options.mode; + return { mode: mode === undefined ? undefined : convertReadableStreamReaderMode(mode, context + " has member 'mode' that") }; + } + function convertReadableStreamReaderMode(mode, context) { + mode = "" + mode; + if (mode !== 'byob') { + throw new TypeError(context + " '" + mode + "' is not a valid enumeration value for ReadableStreamReaderMode"); + } + return mode; + } + function convertIteratorOptions(options, context) { + assertDictionary(options, context); + var preventCancel = options === null || options === void 0 ? void 0 : options.preventCancel; + return { preventCancel: Boolean(preventCancel) }; + } + function convertPipeOptions(options, context) { + assertDictionary(options, context); + var preventAbort = options === null || options === void 0 ? void 0 : options.preventAbort; + var preventCancel = options === null || options === void 0 ? void 0 : options.preventCancel; + var preventClose = options === null || options === void 0 ? void 0 : options.preventClose; + var signal = options === null || options === void 0 ? void 0 : options.signal; + if (signal !== undefined) { + assertAbortSignal(signal, context + " has member 'signal' that"); + } + return { + preventAbort: Boolean(preventAbort), + preventCancel: Boolean(preventCancel), + preventClose: Boolean(preventClose), + signal: signal + }; + } + function assertAbortSignal(signal, context) { + if (!isAbortSignal(signal)) { + throw new TypeError(context + " is not an AbortSignal."); + } + } + function convertReadableWritablePair(pair, context) { + assertDictionary(pair, context); + var readable = pair === null || pair === void 0 ? void 0 : pair.readable; + assertRequiredField(readable, 'readable', 'ReadableWritablePair'); + assertReadableStream(readable, context + " has member 'readable' that"); + var writable = pair === null || pair === void 0 ? void 0 : pair.writable; + assertRequiredField(writable, 'writable', 'ReadableWritablePair'); + assertWritableStream(writable, context + " has member 'writable' that"); + return { + readable: readable, + writable: writable + }; + } + var ReadableStream = function () { + function ReadableStream(rawUnderlyingSource, rawStrategy) { + if (rawUnderlyingSource === void 0) { + rawUnderlyingSource = {}; + } + if (rawStrategy === void 0) { + rawStrategy = {}; + } + if (rawUnderlyingSource === undefined) { + rawUnderlyingSource = null; + } else { + assertObject(rawUnderlyingSource, 'First parameter'); + } + var strategy = convertQueuingStrategy(rawStrategy, 'Second parameter'); + var underlyingSource = convertUnderlyingDefaultOrByteSource(rawUnderlyingSource, 'First parameter'); + InitializeReadableStream(this); + if (underlyingSource.type === 'bytes') { + if (strategy.size !== undefined) { + throw new RangeError('The strategy for a byte stream cannot have a size function'); + } + var highWaterMark = ExtractHighWaterMark(strategy, 0); + SetUpReadableByteStreamControllerFromUnderlyingSource(this, underlyingSource, highWaterMark); + } else { + var sizeAlgorithm = ExtractSizeAlgorithm(strategy); + var highWaterMark = ExtractHighWaterMark(strategy, 1); + SetUpReadableStreamDefaultControllerFromUnderlyingSource(this, underlyingSource, highWaterMark, sizeAlgorithm); + } + } + Object.defineProperty(ReadableStream.prototype, "locked", { + get: function () { + if (!IsReadableStream(this)) { + throw streamBrandCheckException$1('locked'); + } + return IsReadableStreamLocked(this); + }, + enumerable: false, + configurable: true + }); + ReadableStream.prototype.cancel = function (reason) { + if (reason === void 0) { + reason = undefined; + } + if (!IsReadableStream(this)) { + return promiseRejectedWith(streamBrandCheckException$1('cancel')); + } + if (IsReadableStreamLocked(this)) { + return promiseRejectedWith(new TypeError('Cannot cancel a stream that already has a reader')); + } + return ReadableStreamCancel(this, reason); + }; + ReadableStream.prototype.getReader = function (rawOptions) { + if (rawOptions === void 0) { + rawOptions = undefined; + } + if (!IsReadableStream(this)) { + throw streamBrandCheckException$1('getReader'); + } + var options = convertReaderOptions(rawOptions, 'First parameter'); + if (options.mode === undefined) { + return AcquireReadableStreamDefaultReader(this); + } + return AcquireReadableStreamBYOBReader(this); + }; + ReadableStream.prototype.pipeThrough = function (rawTransform, rawOptions) { + if (rawOptions === void 0) { + rawOptions = {}; + } + if (!IsReadableStream(this)) { + throw streamBrandCheckException$1('pipeThrough'); + } + assertRequiredArgument(rawTransform, 1, 'pipeThrough'); + var transform = convertReadableWritablePair(rawTransform, 'First parameter'); + var options = convertPipeOptions(rawOptions, 'Second parameter'); + if (IsReadableStreamLocked(this)) { + throw new TypeError('ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream'); + } + if (IsWritableStreamLocked(transform.writable)) { + throw new TypeError('ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream'); + } + var promise = ReadableStreamPipeTo(this, transform.writable, options.preventClose, options.preventAbort, options.preventCancel, options.signal); + setPromiseIsHandledToTrue(promise); + return transform.readable; + }; + ReadableStream.prototype.pipeTo = function (destination, rawOptions) { + if (rawOptions === void 0) { + rawOptions = {}; + } + if (!IsReadableStream(this)) { + return promiseRejectedWith(streamBrandCheckException$1('pipeTo')); + } + if (destination === undefined) { + return promiseRejectedWith("Parameter 1 is required in 'pipeTo'."); + } + if (!IsWritableStream(destination)) { + return promiseRejectedWith(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream")); + } + var options; + try { + options = convertPipeOptions(rawOptions, 'Second parameter'); + } catch (e) { + return promiseRejectedWith(e); + } + if (IsReadableStreamLocked(this)) { + return promiseRejectedWith(new TypeError('ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream')); + } + if (IsWritableStreamLocked(destination)) { + return promiseRejectedWith(new TypeError('ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream')); + } + return ReadableStreamPipeTo(this, destination, options.preventClose, options.preventAbort, options.preventCancel, options.signal); + }; + ReadableStream.prototype.tee = function () { + if (!IsReadableStream(this)) { + throw streamBrandCheckException$1('tee'); + } + var branches = ReadableStreamTee(this); + return CreateArrayFromList(branches); + }; + ReadableStream.prototype.values = function (rawOptions) { + if (rawOptions === void 0) { + rawOptions = undefined; + } + if (!IsReadableStream(this)) { + throw streamBrandCheckException$1('values'); + } + var options = convertIteratorOptions(rawOptions, 'First parameter'); + return AcquireReadableStreamAsyncIterator(this, options.preventCancel); + }; + return ReadableStream; + }(); + Object.defineProperties(ReadableStream.prototype, { + cancel: { enumerable: true }, + getReader: { enumerable: true }, + pipeThrough: { enumerable: true }, + pipeTo: { enumerable: true }, + tee: { enumerable: true }, + values: { enumerable: true }, + locked: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(ReadableStream.prototype, SymbolPolyfill.toStringTag, { + value: 'ReadableStream', + configurable: true + }); + } + if (typeof SymbolPolyfill.asyncIterator === 'symbol') { + Object.defineProperty(ReadableStream.prototype, SymbolPolyfill.asyncIterator, { + value: ReadableStream.prototype.values, + writable: true, + configurable: true + }); + } + function CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm) { + if (highWaterMark === void 0) { + highWaterMark = 1; + } + if (sizeAlgorithm === void 0) { + sizeAlgorithm = function () { + return 1; + }; + } + var stream = Object.create(ReadableStream.prototype); + InitializeReadableStream(stream); + var controller = Object.create(ReadableStreamDefaultController.prototype); + SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm); + return stream; + } + function CreateReadableByteStream(startAlgorithm, pullAlgorithm, cancelAlgorithm) { + var stream = Object.create(ReadableStream.prototype); + InitializeReadableStream(stream); + var controller = Object.create(ReadableByteStreamController.prototype); + SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, 0, undefined); + return stream; + } + function InitializeReadableStream(stream) { + stream._state = 'readable'; + stream._reader = undefined; + stream._storedError = undefined; + stream._disturbed = false; + } + function IsReadableStream(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_readableStreamController')) { + return false; + } + return x instanceof ReadableStream; + } + function IsReadableStreamLocked(stream) { + if (stream._reader === undefined) { + return false; + } + return true; + } + function ReadableStreamCancel(stream, reason) { + stream._disturbed = true; + if (stream._state === 'closed') { + return promiseResolvedWith(undefined); + } + if (stream._state === 'errored') { + return promiseRejectedWith(stream._storedError); + } + ReadableStreamClose(stream); + var reader = stream._reader; + if (reader !== undefined && IsReadableStreamBYOBReader(reader)) { + reader._readIntoRequests.forEach(function (readIntoRequest) { + readIntoRequest._closeSteps(undefined); + }); + reader._readIntoRequests = new SimpleQueue(); + } + var sourceCancelPromise = stream._readableStreamController[CancelSteps](reason); + return transformPromiseWith(sourceCancelPromise, noop); + } + function ReadableStreamClose(stream) { + stream._state = 'closed'; + var reader = stream._reader; + if (reader === undefined) { + return; + } + defaultReaderClosedPromiseResolve(reader); + if (IsReadableStreamDefaultReader(reader)) { + reader._readRequests.forEach(function (readRequest) { + readRequest._closeSteps(); + }); + reader._readRequests = new SimpleQueue(); + } + } + function ReadableStreamError(stream, e) { + stream._state = 'errored'; + stream._storedError = e; + var reader = stream._reader; + if (reader === undefined) { + return; + } + defaultReaderClosedPromiseReject(reader, e); + if (IsReadableStreamDefaultReader(reader)) { + reader._readRequests.forEach(function (readRequest) { + readRequest._errorSteps(e); + }); + reader._readRequests = new SimpleQueue(); + } else { + reader._readIntoRequests.forEach(function (readIntoRequest) { + readIntoRequest._errorSteps(e); + }); + reader._readIntoRequests = new SimpleQueue(); + } + } + function streamBrandCheckException$1(name) { + return new TypeError("ReadableStream.prototype." + name + " can only be used on a ReadableStream"); + } + function convertQueuingStrategyInit(init, context) { + assertDictionary(init, context); + var highWaterMark = init === null || init === void 0 ? void 0 : init.highWaterMark; + assertRequiredField(highWaterMark, 'highWaterMark', 'QueuingStrategyInit'); + return { highWaterMark: convertUnrestrictedDouble(highWaterMark) }; + } + var byteLengthSizeFunction = function (chunk) { + return chunk.byteLength; + }; + Object.defineProperty(byteLengthSizeFunction, 'name', { + value: 'size', + configurable: true + }); + var ByteLengthQueuingStrategy = function () { + function ByteLengthQueuingStrategy(options) { + assertRequiredArgument(options, 1, 'ByteLengthQueuingStrategy'); + options = convertQueuingStrategyInit(options, 'First parameter'); + this._byteLengthQueuingStrategyHighWaterMark = options.highWaterMark; + } + Object.defineProperty(ByteLengthQueuingStrategy.prototype, "highWaterMark", { + get: function () { + if (!IsByteLengthQueuingStrategy(this)) { + throw byteLengthBrandCheckException('highWaterMark'); + } + return this._byteLengthQueuingStrategyHighWaterMark; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(ByteLengthQueuingStrategy.prototype, "size", { + get: function () { + if (!IsByteLengthQueuingStrategy(this)) { + throw byteLengthBrandCheckException('size'); + } + return byteLengthSizeFunction; + }, + enumerable: false, + configurable: true + }); + return ByteLengthQueuingStrategy; + }(); + Object.defineProperties(ByteLengthQueuingStrategy.prototype, { + highWaterMark: { enumerable: true }, + size: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(ByteLengthQueuingStrategy.prototype, SymbolPolyfill.toStringTag, { + value: 'ByteLengthQueuingStrategy', + configurable: true + }); + } + function byteLengthBrandCheckException(name) { + return new TypeError("ByteLengthQueuingStrategy.prototype." + name + " can only be used on a ByteLengthQueuingStrategy"); + } + function IsByteLengthQueuingStrategy(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_byteLengthQueuingStrategyHighWaterMark')) { + return false; + } + return x instanceof ByteLengthQueuingStrategy; + } + var countSizeFunction = function () { + return 1; + }; + Object.defineProperty(countSizeFunction, 'name', { + value: 'size', + configurable: true + }); + var CountQueuingStrategy = function () { + function CountQueuingStrategy(options) { + assertRequiredArgument(options, 1, 'CountQueuingStrategy'); + options = convertQueuingStrategyInit(options, 'First parameter'); + this._countQueuingStrategyHighWaterMark = options.highWaterMark; + } + Object.defineProperty(CountQueuingStrategy.prototype, "highWaterMark", { + get: function () { + if (!IsCountQueuingStrategy(this)) { + throw countBrandCheckException('highWaterMark'); + } + return this._countQueuingStrategyHighWaterMark; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(CountQueuingStrategy.prototype, "size", { + get: function () { + if (!IsCountQueuingStrategy(this)) { + throw countBrandCheckException('size'); + } + return countSizeFunction; + }, + enumerable: false, + configurable: true + }); + return CountQueuingStrategy; + }(); + Object.defineProperties(CountQueuingStrategy.prototype, { + highWaterMark: { enumerable: true }, + size: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(CountQueuingStrategy.prototype, SymbolPolyfill.toStringTag, { + value: 'CountQueuingStrategy', + configurable: true + }); + } + function countBrandCheckException(name) { + return new TypeError("CountQueuingStrategy.prototype." + name + " can only be used on a CountQueuingStrategy"); + } + function IsCountQueuingStrategy(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_countQueuingStrategyHighWaterMark')) { + return false; + } + return x instanceof CountQueuingStrategy; + } + function convertTransformer(original, context) { + assertDictionary(original, context); + var flush = original === null || original === void 0 ? void 0 : original.flush; + var readableType = original === null || original === void 0 ? void 0 : original.readableType; + var start = original === null || original === void 0 ? void 0 : original.start; + var transform = original === null || original === void 0 ? void 0 : original.transform; + var writableType = original === null || original === void 0 ? void 0 : original.writableType; + return { + flush: flush === undefined ? undefined : convertTransformerFlushCallback(flush, original, context + " has member 'flush' that"), + readableType: readableType, + start: start === undefined ? undefined : convertTransformerStartCallback(start, original, context + " has member 'start' that"), + transform: transform === undefined ? undefined : convertTransformerTransformCallback(transform, original, context + " has member 'transform' that"), + writableType: writableType + }; + } + function convertTransformerFlushCallback(fn, original, context) { + assertFunction(fn, context); + return function (controller) { + return promiseCall(fn, original, [controller]); + }; + } + function convertTransformerStartCallback(fn, original, context) { + assertFunction(fn, context); + return function (controller) { + return reflectCall(fn, original, [controller]); + }; + } + function convertTransformerTransformCallback(fn, original, context) { + assertFunction(fn, context); + return function (chunk, controller) { + return promiseCall(fn, original, [ + chunk, + controller + ]); + }; + } + var TransformStream = function () { + function TransformStream(rawTransformer, rawWritableStrategy, rawReadableStrategy) { + if (rawTransformer === void 0) { + rawTransformer = {}; + } + if (rawWritableStrategy === void 0) { + rawWritableStrategy = {}; + } + if (rawReadableStrategy === void 0) { + rawReadableStrategy = {}; + } + if (rawTransformer === undefined) { + rawTransformer = null; + } + var writableStrategy = convertQueuingStrategy(rawWritableStrategy, 'Second parameter'); + var readableStrategy = convertQueuingStrategy(rawReadableStrategy, 'Third parameter'); + var transformer = convertTransformer(rawTransformer, 'First parameter'); + if (transformer.readableType !== undefined) { + throw new RangeError('Invalid readableType specified'); + } + if (transformer.writableType !== undefined) { + throw new RangeError('Invalid writableType specified'); + } + var readableHighWaterMark = ExtractHighWaterMark(readableStrategy, 0); + var readableSizeAlgorithm = ExtractSizeAlgorithm(readableStrategy); + var writableHighWaterMark = ExtractHighWaterMark(writableStrategy, 1); + var writableSizeAlgorithm = ExtractSizeAlgorithm(writableStrategy); + var startPromise_resolve; + var startPromise = newPromise(function (resolve) { + startPromise_resolve = resolve; + }); + InitializeTransformStream(this, startPromise, writableHighWaterMark, writableSizeAlgorithm, readableHighWaterMark, readableSizeAlgorithm); + SetUpTransformStreamDefaultControllerFromTransformer(this, transformer); + if (transformer.start !== undefined) { + startPromise_resolve(transformer.start(this._transformStreamController)); + } else { + startPromise_resolve(undefined); + } + } + Object.defineProperty(TransformStream.prototype, "readable", { + get: function () { + if (!IsTransformStream(this)) { + throw streamBrandCheckException('readable'); + } + return this._readable; + }, + enumerable: false, + configurable: true + }); + Object.defineProperty(TransformStream.prototype, "writable", { + get: function () { + if (!IsTransformStream(this)) { + throw streamBrandCheckException('writable'); + } + return this._writable; + }, + enumerable: false, + configurable: true + }); + return TransformStream; + }(); + Object.defineProperties(TransformStream.prototype, { + readable: { enumerable: true }, + writable: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(TransformStream.prototype, SymbolPolyfill.toStringTag, { + value: 'TransformStream', + configurable: true + }); + } + function InitializeTransformStream(stream, startPromise, writableHighWaterMark, writableSizeAlgorithm, readableHighWaterMark, readableSizeAlgorithm) { + function startAlgorithm() { + return startPromise; + } + function writeAlgorithm(chunk) { + return TransformStreamDefaultSinkWriteAlgorithm(stream, chunk); + } + function abortAlgorithm(reason) { + return TransformStreamDefaultSinkAbortAlgorithm(stream, reason); + } + function closeAlgorithm() { + return TransformStreamDefaultSinkCloseAlgorithm(stream); + } + stream._writable = CreateWritableStream(startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, writableHighWaterMark, writableSizeAlgorithm); + function pullAlgorithm() { + return TransformStreamDefaultSourcePullAlgorithm(stream); + } + function cancelAlgorithm(reason) { + TransformStreamErrorWritableAndUnblockWrite(stream, reason); + return promiseResolvedWith(undefined); + } + stream._readable = CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, readableHighWaterMark, readableSizeAlgorithm); + stream._backpressure = undefined; + stream._backpressureChangePromise = undefined; + stream._backpressureChangePromise_resolve = undefined; + TransformStreamSetBackpressure(stream, true); + stream._transformStreamController = undefined; + } + function IsTransformStream(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_transformStreamController')) { + return false; + } + return x instanceof TransformStream; + } + function TransformStreamError(stream, e) { + ReadableStreamDefaultControllerError(stream._readable._readableStreamController, e); + TransformStreamErrorWritableAndUnblockWrite(stream, e); + } + function TransformStreamErrorWritableAndUnblockWrite(stream, e) { + TransformStreamDefaultControllerClearAlgorithms(stream._transformStreamController); + WritableStreamDefaultControllerErrorIfNeeded(stream._writable._writableStreamController, e); + if (stream._backpressure) { + TransformStreamSetBackpressure(stream, false); + } + } + function TransformStreamSetBackpressure(stream, backpressure) { + if (stream._backpressureChangePromise !== undefined) { + stream._backpressureChangePromise_resolve(); + } + stream._backpressureChangePromise = newPromise(function (resolve) { + stream._backpressureChangePromise_resolve = resolve; + }); + stream._backpressure = backpressure; + } + var TransformStreamDefaultController = function () { + function TransformStreamDefaultController() { + throw new TypeError('Illegal constructor'); + } + Object.defineProperty(TransformStreamDefaultController.prototype, "desiredSize", { + get: function () { + if (!IsTransformStreamDefaultController(this)) { + throw defaultControllerBrandCheckException('desiredSize'); + } + var readableController = this._controlledTransformStream._readable._readableStreamController; + return ReadableStreamDefaultControllerGetDesiredSize(readableController); + }, + enumerable: false, + configurable: true + }); + TransformStreamDefaultController.prototype.enqueue = function (chunk) { + if (chunk === void 0) { + chunk = undefined; + } + if (!IsTransformStreamDefaultController(this)) { + throw defaultControllerBrandCheckException('enqueue'); + } + TransformStreamDefaultControllerEnqueue(this, chunk); + }; + TransformStreamDefaultController.prototype.error = function (reason) { + if (reason === void 0) { + reason = undefined; + } + if (!IsTransformStreamDefaultController(this)) { + throw defaultControllerBrandCheckException('error'); + } + TransformStreamDefaultControllerError(this, reason); + }; + TransformStreamDefaultController.prototype.terminate = function () { + if (!IsTransformStreamDefaultController(this)) { + throw defaultControllerBrandCheckException('terminate'); + } + TransformStreamDefaultControllerTerminate(this); + }; + return TransformStreamDefaultController; + }(); + Object.defineProperties(TransformStreamDefaultController.prototype, { + enqueue: { enumerable: true }, + error: { enumerable: true }, + terminate: { enumerable: true }, + desiredSize: { enumerable: true } + }); + if (typeof SymbolPolyfill.toStringTag === 'symbol') { + Object.defineProperty(TransformStreamDefaultController.prototype, SymbolPolyfill.toStringTag, { + value: 'TransformStreamDefaultController', + configurable: true + }); + } + function IsTransformStreamDefaultController(x) { + if (!typeIsObject(x)) { + return false; + } + if (!Object.prototype.hasOwnProperty.call(x, '_controlledTransformStream')) { + return false; + } + return x instanceof TransformStreamDefaultController; + } + function SetUpTransformStreamDefaultController(stream, controller, transformAlgorithm, flushAlgorithm) { + controller._controlledTransformStream = stream; + stream._transformStreamController = controller; + controller._transformAlgorithm = transformAlgorithm; + controller._flushAlgorithm = flushAlgorithm; + } + function SetUpTransformStreamDefaultControllerFromTransformer(stream, transformer) { + var controller = Object.create(TransformStreamDefaultController.prototype); + var transformAlgorithm = function (chunk) { + try { + TransformStreamDefaultControllerEnqueue(controller, chunk); + return promiseResolvedWith(undefined); + } catch (transformResultE) { + return promiseRejectedWith(transformResultE); + } + }; + var flushAlgorithm = function () { + return promiseResolvedWith(undefined); + }; + if (transformer.transform !== undefined) { + transformAlgorithm = function (chunk) { + return transformer.transform(chunk, controller); + }; + } + if (transformer.flush !== undefined) { + flushAlgorithm = function () { + return transformer.flush(controller); + }; + } + SetUpTransformStreamDefaultController(stream, controller, transformAlgorithm, flushAlgorithm); + } + function TransformStreamDefaultControllerClearAlgorithms(controller) { + controller._transformAlgorithm = undefined; + controller._flushAlgorithm = undefined; + } + function TransformStreamDefaultControllerEnqueue(controller, chunk) { + var stream = controller._controlledTransformStream; + var readableController = stream._readable._readableStreamController; + if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(readableController)) { + throw new TypeError('Readable side is not in a state that permits enqueue'); + } + try { + ReadableStreamDefaultControllerEnqueue(readableController, chunk); + } catch (e) { + TransformStreamErrorWritableAndUnblockWrite(stream, e); + throw stream._readable._storedError; + } + var backpressure = ReadableStreamDefaultControllerHasBackpressure(readableController); + if (backpressure !== stream._backpressure) { + TransformStreamSetBackpressure(stream, true); + } + } + function TransformStreamDefaultControllerError(controller, e) { + TransformStreamError(controller._controlledTransformStream, e); + } + function TransformStreamDefaultControllerPerformTransform(controller, chunk) { + var transformPromise = controller._transformAlgorithm(chunk); + return transformPromiseWith(transformPromise, undefined, function (r) { + TransformStreamError(controller._controlledTransformStream, r); + throw r; + }); + } + function TransformStreamDefaultControllerTerminate(controller) { + var stream = controller._controlledTransformStream; + var readableController = stream._readable._readableStreamController; + ReadableStreamDefaultControllerClose(readableController); + var error = new TypeError('TransformStream terminated'); + TransformStreamErrorWritableAndUnblockWrite(stream, error); + } + function TransformStreamDefaultSinkWriteAlgorithm(stream, chunk) { + var controller = stream._transformStreamController; + if (stream._backpressure) { + var backpressureChangePromise = stream._backpressureChangePromise; + return transformPromiseWith(backpressureChangePromise, function () { + var writable = stream._writable; + var state = writable._state; + if (state === 'erroring') { + throw writable._storedError; + } + return TransformStreamDefaultControllerPerformTransform(controller, chunk); + }); + } + return TransformStreamDefaultControllerPerformTransform(controller, chunk); + } + function TransformStreamDefaultSinkAbortAlgorithm(stream, reason) { + TransformStreamError(stream, reason); + return promiseResolvedWith(undefined); + } + function TransformStreamDefaultSinkCloseAlgorithm(stream) { + var readable = stream._readable; + var controller = stream._transformStreamController; + var flushPromise = controller._flushAlgorithm(); + TransformStreamDefaultControllerClearAlgorithms(controller); + return transformPromiseWith(flushPromise, function () { + if (readable._state === 'errored') { + throw readable._storedError; + } + ReadableStreamDefaultControllerClose(readable._readableStreamController); + }, function (r) { + TransformStreamError(stream, r); + throw readable._storedError; + }); + } + function TransformStreamDefaultSourcePullAlgorithm(stream) { + TransformStreamSetBackpressure(stream, false); + return stream._backpressureChangePromise; + } + function defaultControllerBrandCheckException(name) { + return new TypeError("TransformStreamDefaultController.prototype." + name + " can only be used on a TransformStreamDefaultController"); + } + function streamBrandCheckException(name) { + return new TypeError("TransformStream.prototype." + name + " can only be used on a TransformStream"); + } + exports.ByteLengthQueuingStrategy = ByteLengthQueuingStrategy; + exports.CountQueuingStrategy = CountQueuingStrategy; + exports.ReadableByteStreamController = ReadableByteStreamController; + exports.ReadableStream = ReadableStream; + exports.ReadableStreamBYOBReader = ReadableStreamBYOBReader; + exports.ReadableStreamBYOBRequest = ReadableStreamBYOBRequest; + exports.ReadableStreamDefaultController = ReadableStreamDefaultController; + exports.ReadableStreamDefaultReader = ReadableStreamDefaultReader; + exports.TransformStream = TransformStream; + exports.TransformStreamDefaultController = TransformStreamDefaultController; + exports.WritableStream = WritableStream; + exports.WritableStreamDefaultController = WritableStreamDefaultController; + exports.WritableStreamDefaultWriter = WritableStreamDefaultWriter; + Object.defineProperty(exports, '__esModule', { value: true }); +})); + +/***/ }), +/* 114 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.BaseSVGFactory = exports.BaseStandardFontDataFactory = exports.BaseCMapReaderFactory = exports.BaseCanvasFactory = void 0; + +var _regenerator = _interopRequireDefault(__w_pdfjs_require__(2)); + +var _util = __w_pdfjs_require__(4); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var BaseCanvasFactory = /*#__PURE__*/function () { + function BaseCanvasFactory() { + _classCallCheck(this, BaseCanvasFactory); + + if (this.constructor === BaseCanvasFactory) { + (0, _util.unreachable)("Cannot initialize BaseCanvasFactory."); + } + } + + _createClass(BaseCanvasFactory, [{ + key: "create", + value: function create(width, height) { + if (width <= 0 || height <= 0) { + throw new Error("Invalid canvas size"); + } + + var canvas = this._createCanvas(width, height); + + return { + canvas: canvas, + context: canvas.getContext("2d") + }; + } + }, { + key: "reset", + value: function reset(canvasAndContext, width, height) { + if (!canvasAndContext.canvas) { + throw new Error("Canvas is not specified"); + } + + if (width <= 0 || height <= 0) { + throw new Error("Invalid canvas size"); + } + + canvasAndContext.canvas.width = width; + canvasAndContext.canvas.height = height; + } + }, { + key: "destroy", + value: function destroy(canvasAndContext) { + if (!canvasAndContext.canvas) { + throw new Error("Canvas is not specified"); + } + + canvasAndContext.canvas.width = 0; + canvasAndContext.canvas.height = 0; + canvasAndContext.canvas = null; + canvasAndContext.context = null; + } + }, { + key: "_createCanvas", + value: function _createCanvas(width, height) { + (0, _util.unreachable)("Abstract method `_createCanvas` called."); + } + }]); + + return BaseCanvasFactory; +}(); + +exports.BaseCanvasFactory = BaseCanvasFactory; + +var BaseCMapReaderFactory = /*#__PURE__*/function () { + function BaseCMapReaderFactory(_ref) { + var _ref$baseUrl = _ref.baseUrl, + baseUrl = _ref$baseUrl === void 0 ? null : _ref$baseUrl, + _ref$isCompressed = _ref.isCompressed, + isCompressed = _ref$isCompressed === void 0 ? false : _ref$isCompressed; + + _classCallCheck(this, BaseCMapReaderFactory); + + if (this.constructor === BaseCMapReaderFactory) { + (0, _util.unreachable)("Cannot initialize BaseCMapReaderFactory."); + } + + this.baseUrl = baseUrl; + this.isCompressed = isCompressed; + } + + _createClass(BaseCMapReaderFactory, [{ + key: "fetch", + value: function () { + var _fetch = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee(_ref2) { + var _this = this; + + var name, url, compressionType; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + name = _ref2.name; + + if (this.baseUrl) { + _context.next = 3; + break; + } + + throw new Error('The CMap "baseUrl" parameter must be specified, ensure that ' + 'the "cMapUrl" and "cMapPacked" API parameters are provided.'); + + case 3: + if (name) { + _context.next = 5; + break; + } + + throw new Error("CMap name must be specified."); + + case 5: + url = this.baseUrl + name + (this.isCompressed ? ".bcmap" : ""); + compressionType = this.isCompressed ? _util.CMapCompressionType.BINARY : _util.CMapCompressionType.NONE; + return _context.abrupt("return", this._fetchData(url, compressionType)["catch"](function (reason) { + throw new Error("Unable to load ".concat(_this.isCompressed ? "binary " : "", "CMap at: ").concat(url)); + })); + + case 8: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function fetch(_x) { + return _fetch.apply(this, arguments); + } + + return fetch; + }() + }, { + key: "_fetchData", + value: function _fetchData(url, compressionType) { + (0, _util.unreachable)("Abstract method `_fetchData` called."); + } + }]); + + return BaseCMapReaderFactory; +}(); + +exports.BaseCMapReaderFactory = BaseCMapReaderFactory; + +var BaseStandardFontDataFactory = /*#__PURE__*/function () { + function BaseStandardFontDataFactory(_ref3) { + var _ref3$baseUrl = _ref3.baseUrl, + baseUrl = _ref3$baseUrl === void 0 ? null : _ref3$baseUrl; + + _classCallCheck(this, BaseStandardFontDataFactory); + + if (this.constructor === BaseStandardFontDataFactory) { + (0, _util.unreachable)("Cannot initialize BaseStandardFontDataFactory."); + } + + this.baseUrl = baseUrl; + } + + _createClass(BaseStandardFontDataFactory, [{ + key: "fetch", + value: function () { + var _fetch2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee2(_ref4) { + var filename, url; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + filename = _ref4.filename; + + if (this.baseUrl) { + _context2.next = 3; + break; + } + + throw new Error('The standard font "baseUrl" parameter must be specified, ensure that ' + 'the "standardFontDataUrl" API parameter is provided.'); + + case 3: + if (filename) { + _context2.next = 5; + break; + } + + throw new Error("Font filename must be specified."); + + case 5: + url = "".concat(this.baseUrl).concat(filename); + return _context2.abrupt("return", this._fetchData(url)["catch"](function (reason) { + throw new Error("Unable to load font data at: ".concat(url)); + })); + + case 7: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function fetch(_x2) { + return _fetch2.apply(this, arguments); + } + + return fetch; + }() + }, { + key: "_fetchData", + value: function _fetchData(url) { + (0, _util.unreachable)("Abstract method `_fetchData` called."); + } + }]); + + return BaseStandardFontDataFactory; +}(); + +exports.BaseStandardFontDataFactory = BaseStandardFontDataFactory; + +var BaseSVGFactory = /*#__PURE__*/function () { + function BaseSVGFactory() { + _classCallCheck(this, BaseSVGFactory); + + if (this.constructor === BaseSVGFactory) { + (0, _util.unreachable)("Cannot initialize BaseSVGFactory."); + } + } + + _createClass(BaseSVGFactory, [{ + key: "create", + value: function create(width, height) { + if (width <= 0 || height <= 0) { + throw new Error("Invalid SVG dimensions"); + } + + var svg = this._createSVG("svg:svg"); + + svg.setAttribute("version", "1.1"); + svg.setAttribute("width", "".concat(width, "px")); + svg.setAttribute("height", "".concat(height, "px")); + svg.setAttribute("preserveAspectRatio", "none"); + svg.setAttribute("viewBox", "0 0 ".concat(width, " ").concat(height)); + return svg; + } + }, { + key: "createElement", + value: function createElement(type) { + if (typeof type !== "string") { + throw new Error("Invalid SVG element type"); + } + + return this._createSVG(type); + } + }, { + key: "_createSVG", + value: function _createSVG(type) { + (0, _util.unreachable)("Abstract method `_createSVG` called."); + } + }]); + + return BaseSVGFactory; +}(); + +exports.BaseSVGFactory = BaseSVGFactory; + +/***/ }), +/* 115 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.getDocument = getDocument; +exports.setPDFNetworkStreamFactory = setPDFNetworkStreamFactory; +exports.version = exports.PDFWorker = exports.PDFPageProxy = exports.PDFDocumentProxy = exports.PDFDataRangeTransport = exports.LoopbackPort = exports.DefaultStandardFontDataFactory = exports.DefaultCMapReaderFactory = exports.DefaultCanvasFactory = exports.build = void 0; + +var _regenerator = _interopRequireDefault(__w_pdfjs_require__(2)); + +var _util = __w_pdfjs_require__(4); + +var _display_utils = __w_pdfjs_require__(1); + +var _font_loader = __w_pdfjs_require__(116); + +var _node_utils = __w_pdfjs_require__(117); + +var _annotation_storage = __w_pdfjs_require__(118); + +var _canvas = __w_pdfjs_require__(119); + +var _worker_options = __w_pdfjs_require__(121); + +var _is_node = __w_pdfjs_require__(6); + +var _message_handler = __w_pdfjs_require__(122); + +var _metadata = __w_pdfjs_require__(123); + +var _optional_content_config = __w_pdfjs_require__(124); + +var _transport_stream = __w_pdfjs_require__(125); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } + +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } + +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +var DEFAULT_RANGE_CHUNK_SIZE = 65536; +var RENDERING_CANCELLED_TIMEOUT = 100; +var DefaultCanvasFactory = _is_node.isNodeJS ? _node_utils.NodeCanvasFactory : _display_utils.DOMCanvasFactory; +exports.DefaultCanvasFactory = DefaultCanvasFactory; +var DefaultCMapReaderFactory = _is_node.isNodeJS ? _node_utils.NodeCMapReaderFactory : _display_utils.DOMCMapReaderFactory; +exports.DefaultCMapReaderFactory = DefaultCMapReaderFactory; +var DefaultStandardFontDataFactory = _is_node.isNodeJS ? _node_utils.NodeStandardFontDataFactory : _display_utils.DOMStandardFontDataFactory; +exports.DefaultStandardFontDataFactory = DefaultStandardFontDataFactory; +var createPDFNetworkStream; + +function setPDFNetworkStreamFactory(pdfNetworkStreamFactory) { + createPDFNetworkStream = pdfNetworkStreamFactory; +} + +function getDocument(src) { + var task = new PDFDocumentLoadingTask(); + var source; + + if (typeof src === "string" || src instanceof URL) { + source = { + url: src + }; + } else if ((0, _util.isArrayBuffer)(src)) { + source = { + data: src + }; + } else if (src instanceof PDFDataRangeTransport) { + source = { + range: src + }; + } else { + if (_typeof(src) !== "object") { + throw new Error("Invalid parameter in getDocument, " + "need either string, URL, Uint8Array, or parameter object."); + } + + if (!src.url && !src.data && !src.range) { + throw new Error("Invalid parameter object: need either .data, .range or .url"); + } + + source = src; + } + + var params = Object.create(null); + var rangeTransport = null, + worker = null; + + for (var key in source) { + var value = source[key]; + + switch (key) { + case "url": + if (typeof window !== "undefined") { + try { + params[key] = new URL(value, window.location).href; + continue; + } catch (ex) { + (0, _util.warn)("Cannot create valid URL: \"".concat(ex, "\".")); + } + } else if (typeof value === "string" || value instanceof URL) { + params[key] = value.toString(); + continue; + } + + throw new Error("Invalid PDF url data: " + "either string or URL-object is expected in the url property."); + + case "range": + rangeTransport = value; + continue; + + case "worker": + worker = value; + continue; + + case "data": + if (_is_node.isNodeJS && typeof Buffer !== "undefined" && value instanceof Buffer) { + params[key] = new Uint8Array(value); + } else if (value instanceof Uint8Array) { + break; + } else if (typeof value === "string") { + params[key] = (0, _util.stringToBytes)(value); + } else if (_typeof(value) === "object" && value !== null && !isNaN(value.length)) { + params[key] = new Uint8Array(value); + } else if ((0, _util.isArrayBuffer)(value)) { + params[key] = new Uint8Array(value); + } else { + throw new Error("Invalid PDF binary data: either typed array, " + "string, or array-like object is expected in the data property."); + } + + continue; + } + + params[key] = value; + } + + params.rangeChunkSize = params.rangeChunkSize || DEFAULT_RANGE_CHUNK_SIZE; + params.CMapReaderFactory = params.CMapReaderFactory || DefaultCMapReaderFactory; + params.StandardFontDataFactory = params.StandardFontDataFactory || DefaultStandardFontDataFactory; + params.ignoreErrors = params.stopAtErrors !== true; + params.fontExtraProperties = params.fontExtraProperties === true; + params.pdfBug = params.pdfBug === true; + params.enableXfa = params.enableXfa === true; + + if (typeof params.docBaseUrl !== "string" || (0, _display_utils.isDataScheme)(params.docBaseUrl)) { + params.docBaseUrl = null; + } + + if (!Number.isInteger(params.maxImageSize)) { + params.maxImageSize = -1; + } + + if (typeof params.useWorkerFetch !== "boolean") { + params.useWorkerFetch = params.CMapReaderFactory === _display_utils.DOMCMapReaderFactory && params.StandardFontDataFactory === _display_utils.DOMStandardFontDataFactory; + } + + if (typeof params.isEvalSupported !== "boolean") { + params.isEvalSupported = true; + } + + if (typeof params.disableFontFace !== "boolean") { + params.disableFontFace = _is_node.isNodeJS; + } + + if (typeof params.useSystemFonts !== "boolean") { + params.useSystemFonts = !_is_node.isNodeJS && !params.disableFontFace; + } + + if (typeof params.ownerDocument === "undefined") { + params.ownerDocument = globalThis.document; + } + + if (typeof params.disableRange !== "boolean") { + params.disableRange = false; + } + + if (typeof params.disableStream !== "boolean") { + params.disableStream = false; + } + + if (typeof params.disableAutoFetch !== "boolean") { + params.disableAutoFetch = false; + } + + (0, _util.setVerbosityLevel)(params.verbosity); + + if (!worker) { + var workerParams = { + verbosity: params.verbosity, + port: _worker_options.GlobalWorkerOptions.workerPort + }; + worker = workerParams.port ? PDFWorker.fromPort(workerParams) : new PDFWorker(workerParams); + task._worker = worker; + } + + var docId = task.docId; + worker.promise.then(function () { + if (task.destroyed) { + throw new Error("Loading aborted"); + } + + var workerIdPromise = _fetchDocument(worker, params, rangeTransport, docId); + + var networkStreamPromise = new Promise(function (resolve) { + var networkStream; + + if (rangeTransport) { + networkStream = new _transport_stream.PDFDataTransportStream({ + length: params.length, + initialData: params.initialData, + progressiveDone: params.progressiveDone, + contentDispositionFilename: params.contentDispositionFilename, + disableRange: params.disableRange, + disableStream: params.disableStream + }, rangeTransport); + } else if (!params.data) { + networkStream = createPDFNetworkStream({ + url: params.url, + length: params.length, + httpHeaders: params.httpHeaders, + withCredentials: params.withCredentials, + rangeChunkSize: params.rangeChunkSize, + disableRange: params.disableRange, + disableStream: params.disableStream + }); + } + + resolve(networkStream); + }); + return Promise.all([workerIdPromise, networkStreamPromise]).then(function (_ref) { + var _ref2 = _slicedToArray(_ref, 2), + workerId = _ref2[0], + networkStream = _ref2[1]; + + if (task.destroyed) { + throw new Error("Loading aborted"); + } + + var messageHandler = new _message_handler.MessageHandler(docId, workerId, worker.port); + messageHandler.postMessageTransfers = worker.postMessageTransfers; + var transport = new WorkerTransport(messageHandler, task, networkStream, params); + task._transport = transport; + messageHandler.send("Ready", null); + }); + })["catch"](task._capability.reject); + return task; +} + +function _fetchDocument(worker, source, pdfDataRangeTransport, docId) { + if (worker.destroyed) { + return Promise.reject(new Error("Worker was destroyed")); + } + + if (pdfDataRangeTransport) { + source.length = pdfDataRangeTransport.length; + source.initialData = pdfDataRangeTransport.initialData; + source.progressiveDone = pdfDataRangeTransport.progressiveDone; + source.contentDispositionFilename = pdfDataRangeTransport.contentDispositionFilename; + } + + return worker.messageHandler.sendWithPromise("GetDocRequest", { + docId: docId, + apiVersion: '2.10.377', + source: { + data: source.data, + url: source.url, + password: source.password, + disableAutoFetch: source.disableAutoFetch, + rangeChunkSize: source.rangeChunkSize, + length: source.length + }, + maxImageSize: source.maxImageSize, + disableFontFace: source.disableFontFace, + postMessageTransfers: worker.postMessageTransfers, + docBaseUrl: source.docBaseUrl, + ignoreErrors: source.ignoreErrors, + isEvalSupported: source.isEvalSupported, + fontExtraProperties: source.fontExtraProperties, + enableXfa: source.enableXfa, + useSystemFonts: source.useSystemFonts, + cMapUrl: source.useWorkerFetch ? source.cMapUrl : null, + standardFontDataUrl: source.useWorkerFetch ? source.standardFontDataUrl : null + }).then(function (workerId) { + if (worker.destroyed) { + throw new Error("Worker was destroyed"); + } + + return workerId; + }); +} + +var PDFDocumentLoadingTask = function PDFDocumentLoadingTaskClosure() { + var nextDocumentId = 0; + + var PDFDocumentLoadingTask = /*#__PURE__*/function () { + function PDFDocumentLoadingTask() { + _classCallCheck(this, PDFDocumentLoadingTask); + + this._capability = (0, _util.createPromiseCapability)(); + this._transport = null; + this._worker = null; + this.docId = "d" + nextDocumentId++; + this.destroyed = false; + this.onPassword = null; + this.onProgress = null; + this.onUnsupportedFeature = null; + } + + _createClass(PDFDocumentLoadingTask, [{ + key: "promise", + get: function get() { + return this._capability.promise; + } + }, { + key: "destroy", + value: function destroy() { + var _this = this; + + this.destroyed = true; + var transportDestroyed = !this._transport ? Promise.resolve() : this._transport.destroy(); + return transportDestroyed.then(function () { + _this._transport = null; + + if (_this._worker) { + _this._worker.destroy(); + + _this._worker = null; + } + }); + } + }]); + + return PDFDocumentLoadingTask; + }(); + + return PDFDocumentLoadingTask; +}(); + +var PDFDataRangeTransport = /*#__PURE__*/function () { + function PDFDataRangeTransport(length, initialData) { + var progressiveDone = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var contentDispositionFilename = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; + + _classCallCheck(this, PDFDataRangeTransport); + + this.length = length; + this.initialData = initialData; + this.progressiveDone = progressiveDone; + this.contentDispositionFilename = contentDispositionFilename; + this._rangeListeners = []; + this._progressListeners = []; + this._progressiveReadListeners = []; + this._progressiveDoneListeners = []; + this._readyCapability = (0, _util.createPromiseCapability)(); + } + + _createClass(PDFDataRangeTransport, [{ + key: "addRangeListener", + value: function addRangeListener(listener) { + this._rangeListeners.push(listener); + } + }, { + key: "addProgressListener", + value: function addProgressListener(listener) { + this._progressListeners.push(listener); + } + }, { + key: "addProgressiveReadListener", + value: function addProgressiveReadListener(listener) { + this._progressiveReadListeners.push(listener); + } + }, { + key: "addProgressiveDoneListener", + value: function addProgressiveDoneListener(listener) { + this._progressiveDoneListeners.push(listener); + } + }, { + key: "onDataRange", + value: function onDataRange(begin, chunk) { + var _iterator = _createForOfIteratorHelper(this._rangeListeners), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var listener = _step.value; + listener(begin, chunk); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } + }, { + key: "onDataProgress", + value: function onDataProgress(loaded, total) { + var _this2 = this; + + this._readyCapability.promise.then(function () { + var _iterator2 = _createForOfIteratorHelper(_this2._progressListeners), + _step2; + + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + var listener = _step2.value; + listener(loaded, total); + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + }); + } + }, { + key: "onDataProgressiveRead", + value: function onDataProgressiveRead(chunk) { + var _this3 = this; + + this._readyCapability.promise.then(function () { + var _iterator3 = _createForOfIteratorHelper(_this3._progressiveReadListeners), + _step3; + + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { + var listener = _step3.value; + listener(chunk); + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); + } + }); + } + }, { + key: "onDataProgressiveDone", + value: function onDataProgressiveDone() { + var _this4 = this; + + this._readyCapability.promise.then(function () { + var _iterator4 = _createForOfIteratorHelper(_this4._progressiveDoneListeners), + _step4; + + try { + for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { + var listener = _step4.value; + listener(); + } + } catch (err) { + _iterator4.e(err); + } finally { + _iterator4.f(); + } + }); + } + }, { + key: "transportReady", + value: function transportReady() { + this._readyCapability.resolve(); + } + }, { + key: "requestDataRange", + value: function requestDataRange(begin, end) { + (0, _util.unreachable)("Abstract method PDFDataRangeTransport.requestDataRange"); + } + }, { + key: "abort", + value: function abort() {} + }]); + + return PDFDataRangeTransport; +}(); + +exports.PDFDataRangeTransport = PDFDataRangeTransport; + +var PDFDocumentProxy = /*#__PURE__*/function () { + function PDFDocumentProxy(pdfInfo, transport) { + _classCallCheck(this, PDFDocumentProxy); + + this._pdfInfo = pdfInfo; + this._transport = transport; + Object.defineProperty(this, "fingerprint", { + get: function get() { + (0, _display_utils.deprecated)("`PDFDocumentProxy.fingerprint`, " + "please use `PDFDocumentProxy.fingerprints` instead."); + return this.fingerprints[0]; + } + }); + } + + _createClass(PDFDocumentProxy, [{ + key: "annotationStorage", + get: function get() { + return this._transport.annotationStorage; + } + }, { + key: "numPages", + get: function get() { + return this._pdfInfo.numPages; + } + }, { + key: "fingerprints", + get: function get() { + return this._pdfInfo.fingerprints; + } + }, { + key: "isPureXfa", + get: function get() { + return !!this._transport._htmlForXfa; + } + }, { + key: "allXfaHtml", + get: function get() { + return this._transport._htmlForXfa; + } + }, { + key: "getPage", + value: function getPage(pageNumber) { + return this._transport.getPage(pageNumber); + } + }, { + key: "getPageIndex", + value: function getPageIndex(ref) { + return this._transport.getPageIndex(ref); + } + }, { + key: "getDestinations", + value: function getDestinations() { + return this._transport.getDestinations(); + } + }, { + key: "getDestination", + value: function getDestination(id) { + return this._transport.getDestination(id); + } + }, { + key: "getPageLabels", + value: function getPageLabels() { + return this._transport.getPageLabels(); + } + }, { + key: "getPageLayout", + value: function getPageLayout() { + return this._transport.getPageLayout(); + } + }, { + key: "getPageMode", + value: function getPageMode() { + return this._transport.getPageMode(); + } + }, { + key: "getViewerPreferences", + value: function getViewerPreferences() { + return this._transport.getViewerPreferences(); + } + }, { + key: "getOpenAction", + value: function getOpenAction() { + return this._transport.getOpenAction(); + } + }, { + key: "getAttachments", + value: function getAttachments() { + return this._transport.getAttachments(); + } + }, { + key: "getJavaScript", + value: function getJavaScript() { + return this._transport.getJavaScript(); + } + }, { + key: "getJSActions", + value: function getJSActions() { + return this._transport.getDocJSActions(); + } + }, { + key: "getOutline", + value: function getOutline() { + return this._transport.getOutline(); + } + }, { + key: "getOptionalContentConfig", + value: function getOptionalContentConfig() { + return this._transport.getOptionalContentConfig(); + } + }, { + key: "getPermissions", + value: function getPermissions() { + return this._transport.getPermissions(); + } + }, { + key: "getMetadata", + value: function getMetadata() { + return this._transport.getMetadata(); + } + }, { + key: "getMarkInfo", + value: function getMarkInfo() { + return this._transport.getMarkInfo(); + } + }, { + key: "getData", + value: function getData() { + return this._transport.getData(); + } + }, { + key: "getDownloadInfo", + value: function getDownloadInfo() { + return this._transport.downloadInfoCapability.promise; + } + }, { + key: "getStats", + value: function getStats() { + return this._transport.getStats(); + } + }, { + key: "cleanup", + value: function cleanup() { + var keepLoadedFonts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + return this._transport.startCleanup(keepLoadedFonts || this.isPureXfa); + } + }, { + key: "destroy", + value: function destroy() { + return this.loadingTask.destroy(); + } + }, { + key: "loadingParams", + get: function get() { + return this._transport.loadingParams; + } + }, { + key: "loadingTask", + get: function get() { + return this._transport.loadingTask; + } + }, { + key: "saveDocument", + value: function saveDocument() { + if (this._transport.annotationStorage.size <= 0) { + (0, _display_utils.deprecated)("saveDocument called while `annotationStorage` is empty, " + "please use the getData-method instead."); + } + + return this._transport.saveDocument(); + } + }, { + key: "getFieldObjects", + value: function getFieldObjects() { + return this._transport.getFieldObjects(); + } + }, { + key: "hasJSActions", + value: function hasJSActions() { + return this._transport.hasJSActions(); + } + }, { + key: "getCalculationOrderIds", + value: function getCalculationOrderIds() { + return this._transport.getCalculationOrderIds(); + } + }]); + + return PDFDocumentProxy; +}(); + +exports.PDFDocumentProxy = PDFDocumentProxy; + +var PDFPageProxy = /*#__PURE__*/function () { + function PDFPageProxy(pageIndex, pageInfo, transport, ownerDocument) { + var pdfBug = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; + + _classCallCheck(this, PDFPageProxy); + + this._pageIndex = pageIndex; + this._pageInfo = pageInfo; + this._ownerDocument = ownerDocument; + this._transport = transport; + this._stats = pdfBug ? new _display_utils.StatTimer() : null; + this._pdfBug = pdfBug; + this.commonObjs = transport.commonObjs; + this.objs = new PDFObjects(); + this.cleanupAfterRender = false; + this.pendingCleanup = false; + this._intentStates = new Map(); + this.destroyed = false; + } + + _createClass(PDFPageProxy, [{ + key: "pageNumber", + get: function get() { + return this._pageIndex + 1; + } + }, { + key: "rotate", + get: function get() { + return this._pageInfo.rotate; + } + }, { + key: "ref", + get: function get() { + return this._pageInfo.ref; + } + }, { + key: "userUnit", + get: function get() { + return this._pageInfo.userUnit; + } + }, { + key: "view", + get: function get() { + return this._pageInfo.view; + } + }, { + key: "getViewport", + value: function getViewport() { + var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + scale = _ref3.scale, + _ref3$rotation = _ref3.rotation, + rotation = _ref3$rotation === void 0 ? this.rotate : _ref3$rotation, + _ref3$offsetX = _ref3.offsetX, + offsetX = _ref3$offsetX === void 0 ? 0 : _ref3$offsetX, + _ref3$offsetY = _ref3.offsetY, + offsetY = _ref3$offsetY === void 0 ? 0 : _ref3$offsetY, + _ref3$dontFlip = _ref3.dontFlip, + dontFlip = _ref3$dontFlip === void 0 ? false : _ref3$dontFlip; + + return new _display_utils.PageViewport({ + viewBox: this.view, + scale: scale, + rotation: rotation, + offsetX: offsetX, + offsetY: offsetY, + dontFlip: dontFlip + }); + } + }, { + key: "getAnnotations", + value: function getAnnotations() { + var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + _ref4$intent = _ref4.intent, + intent = _ref4$intent === void 0 ? null : _ref4$intent; + + var renderingIntent = intent === "display" || intent === "print" ? intent : null; + + if (!this._annotationsPromise || this._annotationsIntent !== renderingIntent) { + this._annotationsPromise = this._transport.getAnnotations(this._pageIndex, renderingIntent); + this._annotationsIntent = renderingIntent; + } + + return this._annotationsPromise; + } + }, { + key: "getJSActions", + value: function getJSActions() { + return this._jsActionsPromise || (this._jsActionsPromise = this._transport.getPageJSActions(this._pageIndex)); + } + }, { + key: "getXfa", + value: function () { + var _getXfa = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee() { + var _this$_transport$_htm; + + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", ((_this$_transport$_htm = this._transport._htmlForXfa) === null || _this$_transport$_htm === void 0 ? void 0 : _this$_transport$_htm.children[this._pageIndex]) || null); + + case 1: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function getXfa() { + return _getXfa.apply(this, arguments); + } + + return getXfa; + }() + }, { + key: "render", + value: function render(_ref5) { + var _this5 = this, + _intentState; + + var canvasContext = _ref5.canvasContext, + viewport = _ref5.viewport, + _ref5$intent = _ref5.intent, + intent = _ref5$intent === void 0 ? "display" : _ref5$intent, + _ref5$renderInteracti = _ref5.renderInteractiveForms, + renderInteractiveForms = _ref5$renderInteracti === void 0 ? false : _ref5$renderInteracti, + _ref5$transform = _ref5.transform, + transform = _ref5$transform === void 0 ? null : _ref5$transform, + _ref5$imageLayer = _ref5.imageLayer, + imageLayer = _ref5$imageLayer === void 0 ? null : _ref5$imageLayer, + _ref5$canvasFactory = _ref5.canvasFactory, + canvasFactory = _ref5$canvasFactory === void 0 ? null : _ref5$canvasFactory, + _ref5$background = _ref5.background, + background = _ref5$background === void 0 ? null : _ref5$background, + _ref5$includeAnnotati = _ref5.includeAnnotationStorage, + includeAnnotationStorage = _ref5$includeAnnotati === void 0 ? false : _ref5$includeAnnotati, + _ref5$optionalContent = _ref5.optionalContentConfigPromise, + optionalContentConfigPromise = _ref5$optionalContent === void 0 ? null : _ref5$optionalContent; + + if (this._stats) { + this._stats.time("Overall"); + } + + var renderingIntent = intent === "print" ? "print" : "display"; + this.pendingCleanup = false; + + if (!optionalContentConfigPromise) { + optionalContentConfigPromise = this._transport.getOptionalContentConfig(); + } + + var intentState = this._intentStates.get(renderingIntent); + + if (!intentState) { + intentState = Object.create(null); + + this._intentStates.set(renderingIntent, intentState); + } + + if (intentState.streamReaderCancelTimeout) { + clearTimeout(intentState.streamReaderCancelTimeout); + intentState.streamReaderCancelTimeout = null; + } + + var canvasFactoryInstance = canvasFactory || new DefaultCanvasFactory({ + ownerDocument: this._ownerDocument + }); + var annotationStorage = includeAnnotationStorage ? this._transport.annotationStorage.serializable : null; + + if (!intentState.displayReadyCapability) { + intentState.displayReadyCapability = (0, _util.createPromiseCapability)(); + intentState.operatorList = { + fnArray: [], + argsArray: [], + lastChunk: false + }; + + if (this._stats) { + this._stats.time("Page Request"); + } + + this._pumpOperatorList({ + pageIndex: this._pageIndex, + intent: renderingIntent, + renderInteractiveForms: renderInteractiveForms === true, + annotationStorage: annotationStorage + }); + } + + var complete = function complete(error) { + intentState.renderTasks["delete"](internalRenderTask); + + if (_this5.cleanupAfterRender || renderingIntent === "print") { + _this5.pendingCleanup = true; + } + + _this5._tryCleanup(); + + if (error) { + internalRenderTask.capability.reject(error); + + _this5._abortOperatorList({ + intentState: intentState, + reason: error + }); + } else { + internalRenderTask.capability.resolve(); + } + + if (_this5._stats) { + _this5._stats.timeEnd("Rendering"); + + _this5._stats.timeEnd("Overall"); + } + }; + + var internalRenderTask = new InternalRenderTask({ + callback: complete, + params: { + canvasContext: canvasContext, + viewport: viewport, + transform: transform, + imageLayer: imageLayer, + background: background + }, + objs: this.objs, + commonObjs: this.commonObjs, + operatorList: intentState.operatorList, + pageIndex: this._pageIndex, + canvasFactory: canvasFactoryInstance, + useRequestAnimationFrame: renderingIntent !== "print", + pdfBug: this._pdfBug + }); + ((_intentState = intentState).renderTasks || (_intentState.renderTasks = new Set())).add(internalRenderTask); + var renderTask = internalRenderTask.task; + Promise.all([intentState.displayReadyCapability.promise, optionalContentConfigPromise]).then(function (_ref6) { + var _ref7 = _slicedToArray(_ref6, 2), + transparency = _ref7[0], + optionalContentConfig = _ref7[1]; + + if (_this5.pendingCleanup) { + complete(); + return; + } + + if (_this5._stats) { + _this5._stats.time("Rendering"); + } + + internalRenderTask.initializeGraphics({ + transparency: transparency, + optionalContentConfig: optionalContentConfig + }); + internalRenderTask.operatorListChanged(); + })["catch"](complete); + return renderTask; + } + }, { + key: "getOperatorList", + value: function getOperatorList() { + var _ref8 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + _ref8$intent = _ref8.intent, + intent = _ref8$intent === void 0 ? "display" : _ref8$intent; + + function operatorListChanged() { + if (intentState.operatorList.lastChunk) { + intentState.opListReadCapability.resolve(intentState.operatorList); + intentState.renderTasks["delete"](opListTask); + } + } + + var renderingIntent = "oplist-".concat(intent === "print" ? "print" : "display"); + + var intentState = this._intentStates.get(renderingIntent); + + if (!intentState) { + intentState = Object.create(null); + + this._intentStates.set(renderingIntent, intentState); + } + + var opListTask; + + if (!intentState.opListReadCapability) { + var _intentState2; + + opListTask = Object.create(null); + opListTask.operatorListChanged = operatorListChanged; + intentState.opListReadCapability = (0, _util.createPromiseCapability)(); + ((_intentState2 = intentState).renderTasks || (_intentState2.renderTasks = new Set())).add(opListTask); + intentState.operatorList = { + fnArray: [], + argsArray: [], + lastChunk: false + }; + + if (this._stats) { + this._stats.time("Page Request"); + } + + this._pumpOperatorList({ + pageIndex: this._pageIndex, + intent: renderingIntent + }); + } + + return intentState.opListReadCapability.promise; + } + }, { + key: "streamTextContent", + value: function streamTextContent() { + var _ref9 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + _ref9$normalizeWhites = _ref9.normalizeWhitespace, + normalizeWhitespace = _ref9$normalizeWhites === void 0 ? false : _ref9$normalizeWhites, + _ref9$disableCombineT = _ref9.disableCombineTextItems, + disableCombineTextItems = _ref9$disableCombineT === void 0 ? false : _ref9$disableCombineT, + _ref9$includeMarkedCo = _ref9.includeMarkedContent, + includeMarkedContent = _ref9$includeMarkedCo === void 0 ? false : _ref9$includeMarkedCo; + + var TEXT_CONTENT_CHUNK_SIZE = 100; + return this._transport.messageHandler.sendWithStream("GetTextContent", { + pageIndex: this._pageIndex, + normalizeWhitespace: normalizeWhitespace === true, + combineTextItems: disableCombineTextItems !== true, + includeMarkedContent: includeMarkedContent === true + }, { + highWaterMark: TEXT_CONTENT_CHUNK_SIZE, + size: function size(textContent) { + return textContent.items.length; + } + }); + } + }, { + key: "getTextContent", + value: function getTextContent() { + var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var readableStream = this.streamTextContent(params); + return new Promise(function (resolve, reject) { + function pump() { + reader.read().then(function (_ref10) { + var _textContent$items; + + var value = _ref10.value, + done = _ref10.done; + + if (done) { + resolve(textContent); + return; + } + + Object.assign(textContent.styles, value.styles); + + (_textContent$items = textContent.items).push.apply(_textContent$items, _toConsumableArray(value.items)); + + pump(); + }, reject); + } + + var reader = readableStream.getReader(); + var textContent = { + items: [], + styles: Object.create(null) + }; + pump(); + }); + } + }, { + key: "getStructTree", + value: function getStructTree() { + return this._structTreePromise || (this._structTreePromise = this._transport.getStructTree(this._pageIndex)); + } + }, { + key: "_destroy", + value: function _destroy() { + this.destroyed = true; + this._transport.pageCache[this._pageIndex] = null; + var waitOn = []; + + var _iterator5 = _createForOfIteratorHelper(this._intentStates), + _step5; + + try { + for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { + var _step5$value = _slicedToArray(_step5.value, 2), + intent = _step5$value[0], + intentState = _step5$value[1]; + + this._abortOperatorList({ + intentState: intentState, + reason: new Error("Page was destroyed."), + force: true + }); + + if (intent.startsWith("oplist-")) { + continue; + } + + var _iterator6 = _createForOfIteratorHelper(intentState.renderTasks), + _step6; + + try { + for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) { + var internalRenderTask = _step6.value; + waitOn.push(internalRenderTask.completed); + internalRenderTask.cancel(); + } + } catch (err) { + _iterator6.e(err); + } finally { + _iterator6.f(); + } + } + } catch (err) { + _iterator5.e(err); + } finally { + _iterator5.f(); + } + + this.objs.clear(); + this._annotationsPromise = null; + this._jsActionsPromise = null; + this._structTreePromise = null; + this.pendingCleanup = false; + return Promise.all(waitOn); + } + }, { + key: "cleanup", + value: function cleanup() { + var resetStats = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + this.pendingCleanup = true; + return this._tryCleanup(resetStats); + } + }, { + key: "_tryCleanup", + value: function _tryCleanup() { + var resetStats = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + if (!this.pendingCleanup) { + return false; + } + + var _iterator7 = _createForOfIteratorHelper(this._intentStates.values()), + _step7; + + try { + for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) { + var _step7$value = _step7.value, + renderTasks = _step7$value.renderTasks, + operatorList = _step7$value.operatorList; + + if (renderTasks.size > 0 || !operatorList.lastChunk) { + return false; + } + } + } catch (err) { + _iterator7.e(err); + } finally { + _iterator7.f(); + } + + this._intentStates.clear(); + + this.objs.clear(); + this._annotationsPromise = null; + this._jsActionsPromise = null; + this._structTreePromise = null; + + if (resetStats && this._stats) { + this._stats = new _display_utils.StatTimer(); + } + + this.pendingCleanup = false; + return true; + } + }, { + key: "_startRenderPage", + value: function _startRenderPage(transparency, intent) { + var intentState = this._intentStates.get(intent); + + if (!intentState) { + return; + } + + if (this._stats) { + this._stats.timeEnd("Page Request"); + } + + if (intentState.displayReadyCapability) { + intentState.displayReadyCapability.resolve(transparency); + } + } + }, { + key: "_renderPageChunk", + value: function _renderPageChunk(operatorListChunk, intentState) { + for (var i = 0, ii = operatorListChunk.length; i < ii; i++) { + intentState.operatorList.fnArray.push(operatorListChunk.fnArray[i]); + intentState.operatorList.argsArray.push(operatorListChunk.argsArray[i]); + } + + intentState.operatorList.lastChunk = operatorListChunk.lastChunk; + + var _iterator8 = _createForOfIteratorHelper(intentState.renderTasks), + _step8; + + try { + for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) { + var internalRenderTask = _step8.value; + internalRenderTask.operatorListChanged(); + } + } catch (err) { + _iterator8.e(err); + } finally { + _iterator8.f(); + } + + if (operatorListChunk.lastChunk) { + this._tryCleanup(); + } + } + }, { + key: "_pumpOperatorList", + value: function _pumpOperatorList(args) { + var _this6 = this; + + (0, _util.assert)(args.intent, 'PDFPageProxy._pumpOperatorList: Expected "intent" argument.'); + + var readableStream = this._transport.messageHandler.sendWithStream("GetOperatorList", args); + + var reader = readableStream.getReader(); + + var intentState = this._intentStates.get(args.intent); + + intentState.streamReader = reader; + + var pump = function pump() { + reader.read().then(function (_ref11) { + var value = _ref11.value, + done = _ref11.done; + + if (done) { + intentState.streamReader = null; + return; + } + + if (_this6._transport.destroyed) { + return; + } + + _this6._renderPageChunk(value, intentState); + + pump(); + }, function (reason) { + intentState.streamReader = null; + + if (_this6._transport.destroyed) { + return; + } + + if (intentState.operatorList) { + intentState.operatorList.lastChunk = true; + + var _iterator9 = _createForOfIteratorHelper(intentState.renderTasks), + _step9; + + try { + for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) { + var internalRenderTask = _step9.value; + internalRenderTask.operatorListChanged(); + } + } catch (err) { + _iterator9.e(err); + } finally { + _iterator9.f(); + } + + _this6._tryCleanup(); + } + + if (intentState.displayReadyCapability) { + intentState.displayReadyCapability.reject(reason); + } else if (intentState.opListReadCapability) { + intentState.opListReadCapability.reject(reason); + } else { + throw reason; + } + }); + }; + + pump(); + } + }, { + key: "_abortOperatorList", + value: function _abortOperatorList(_ref12) { + var _this7 = this; + + var intentState = _ref12.intentState, + reason = _ref12.reason, + _ref12$force = _ref12.force, + force = _ref12$force === void 0 ? false : _ref12$force; + (0, _util.assert)(reason instanceof Error || _typeof(reason) === "object" && reason !== null, 'PDFPageProxy._abortOperatorList: Expected "reason" argument.'); + + if (!intentState.streamReader) { + return; + } + + if (!force) { + if (intentState.renderTasks.size > 0) { + return; + } + + if (reason instanceof _display_utils.RenderingCancelledException) { + intentState.streamReaderCancelTimeout = setTimeout(function () { + _this7._abortOperatorList({ + intentState: intentState, + reason: reason, + force: true + }); + + intentState.streamReaderCancelTimeout = null; + }, RENDERING_CANCELLED_TIMEOUT); + return; + } + } + + intentState.streamReader.cancel(new _util.AbortException(reason === null || reason === void 0 ? void 0 : reason.message)); + intentState.streamReader = null; + + if (this._transport.destroyed) { + return; + } + + var _iterator10 = _createForOfIteratorHelper(this._intentStates), + _step10; + + try { + for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) { + var _step10$value = _slicedToArray(_step10.value, 2), + intent = _step10$value[0], + curIntentState = _step10$value[1]; + + if (curIntentState === intentState) { + this._intentStates["delete"](intent); + + break; + } + } + } catch (err) { + _iterator10.e(err); + } finally { + _iterator10.f(); + } + + this.cleanup(); + } + }, { + key: "stats", + get: function get() { + return this._stats; + } + }]); + + return PDFPageProxy; +}(); + +exports.PDFPageProxy = PDFPageProxy; + +var LoopbackPort = /*#__PURE__*/function () { + function LoopbackPort() { + _classCallCheck(this, LoopbackPort); + + this._listeners = []; + this._deferred = Promise.resolve(undefined); + } + + _createClass(LoopbackPort, [{ + key: "postMessage", + value: function postMessage(obj, transfers) { + var _this8 = this; + + function cloneValue(value) { + if (typeof value === "function" || _typeof(value) === "symbol" || value instanceof URL) { + throw new Error("LoopbackPort.postMessage - cannot clone: ".concat(value === null || value === void 0 ? void 0 : value.toString())); + } + + if (_typeof(value) !== "object" || value === null) { + return value; + } + + if (cloned.has(value)) { + return cloned.get(value); + } + + var buffer, result; + + if ((buffer = value.buffer) && (0, _util.isArrayBuffer)(buffer)) { + if (transfers !== null && transfers !== void 0 && transfers.includes(buffer)) { + result = new value.constructor(buffer, value.byteOffset, value.byteLength); + } else { + result = new value.constructor(value); + } + + cloned.set(value, result); + return result; + } + + if (value instanceof Map) { + result = new Map(); + cloned.set(value, result); + + var _iterator11 = _createForOfIteratorHelper(value), + _step11; + + try { + for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) { + var _step11$value = _slicedToArray(_step11.value, 2), + key = _step11$value[0], + val = _step11$value[1]; + + result.set(key, cloneValue(val)); + } + } catch (err) { + _iterator11.e(err); + } finally { + _iterator11.f(); + } + + return result; + } + + if (value instanceof Set) { + result = new Set(); + cloned.set(value, result); + + var _iterator12 = _createForOfIteratorHelper(value), + _step12; + + try { + for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) { + var _val = _step12.value; + result.add(cloneValue(_val)); + } + } catch (err) { + _iterator12.e(err); + } finally { + _iterator12.f(); + } + + return result; + } + + result = Array.isArray(value) ? [] : Object.create(null); + cloned.set(value, result); + + for (var i in value) { + var _value$hasOwnProperty; + + var desc = void 0, + p = value; + + while (!(desc = Object.getOwnPropertyDescriptor(p, i))) { + p = Object.getPrototypeOf(p); + } + + if (typeof desc.value === "undefined") { + continue; + } + + if (typeof desc.value === "function" && !((_value$hasOwnProperty = value.hasOwnProperty) !== null && _value$hasOwnProperty !== void 0 && _value$hasOwnProperty.call(value, i))) { + continue; + } + + result[i] = cloneValue(desc.value); + } + + return result; + } + + var cloned = new WeakMap(); + var event = { + data: cloneValue(obj) + }; + + this._deferred.then(function () { + var _iterator13 = _createForOfIteratorHelper(_this8._listeners), + _step13; + + try { + for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) { + var listener = _step13.value; + listener.call(_this8, event); + } + } catch (err) { + _iterator13.e(err); + } finally { + _iterator13.f(); + } + }); + } + }, { + key: "addEventListener", + value: function addEventListener(name, listener) { + this._listeners.push(listener); + } + }, { + key: "removeEventListener", + value: function removeEventListener(name, listener) { + var i = this._listeners.indexOf(listener); + + this._listeners.splice(i, 1); + } + }, { + key: "terminate", + value: function terminate() { + this._listeners.length = 0; + } + }]); + + return LoopbackPort; +}(); + +exports.LoopbackPort = LoopbackPort; + +var PDFWorker = function PDFWorkerClosure() { + var pdfWorkerPorts = new WeakMap(); + var isWorkerDisabled = false; + var fallbackWorkerSrc; + var nextFakeWorkerId = 0; + var fakeWorkerCapability; + + if (_is_node.isNodeJS && typeof require === "function") { + isWorkerDisabled = true; + fallbackWorkerSrc = "./pdf.worker.js"; + } else if ((typeof document === "undefined" ? "undefined" : _typeof(document)) === "object" && "currentScript" in document) { + var _document$currentScri; + + var pdfjsFilePath = (_document$currentScri = document.currentScript) === null || _document$currentScri === void 0 ? void 0 : _document$currentScri.src; + + if (pdfjsFilePath) { + fallbackWorkerSrc = pdfjsFilePath.replace(/(\.(?:min\.)?js)(\?.*)?$/i, ".worker$1$2"); + } + } + + function _getWorkerSrc() { + if (_worker_options.GlobalWorkerOptions.workerSrc) { + return _worker_options.GlobalWorkerOptions.workerSrc; + } + + if (typeof fallbackWorkerSrc !== "undefined") { + if (!_is_node.isNodeJS) { + (0, _display_utils.deprecated)('No "GlobalWorkerOptions.workerSrc" specified.'); + } + + return fallbackWorkerSrc; + } + + throw new Error('No "GlobalWorkerOptions.workerSrc" specified.'); + } + + function getMainThreadWorkerMessageHandler() { + var mainWorkerMessageHandler; + + try { + var _globalThis$pdfjsWork; + + mainWorkerMessageHandler = (_globalThis$pdfjsWork = globalThis.pdfjsWorker) === null || _globalThis$pdfjsWork === void 0 ? void 0 : _globalThis$pdfjsWork.WorkerMessageHandler; + } catch (ex) {} + + return mainWorkerMessageHandler || null; + } + + function setupFakeWorkerGlobal() { + if (fakeWorkerCapability) { + return fakeWorkerCapability.promise; + } + + fakeWorkerCapability = (0, _util.createPromiseCapability)(); + + var loader = /*#__PURE__*/function () { + var _ref13 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee2() { + var mainWorkerMessageHandler, worker; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + mainWorkerMessageHandler = getMainThreadWorkerMessageHandler(); + + if (!mainWorkerMessageHandler) { + _context2.next = 3; + break; + } + + return _context2.abrupt("return", mainWorkerMessageHandler); + + case 3: + if (!(_is_node.isNodeJS && typeof require === "function")) { + _context2.next = 6; + break; + } + + worker = eval("require")(_getWorkerSrc()); + return _context2.abrupt("return", worker.WorkerMessageHandler); + + case 6: + _context2.next = 8; + return (0, _display_utils.loadScript)(_getWorkerSrc()); + + case 8: + return _context2.abrupt("return", window.pdfjsWorker.WorkerMessageHandler); + + case 9: + case "end": + return _context2.stop(); + } + } + }, _callee2); + })); + + return function loader() { + return _ref13.apply(this, arguments); + }; + }(); + + loader().then(fakeWorkerCapability.resolve, fakeWorkerCapability.reject); + return fakeWorkerCapability.promise; + } + + function createCDNWrapper(url) { + var wrapper = "importScripts('" + url + "');"; + return URL.createObjectURL(new Blob([wrapper])); + } + + var PDFWorker = /*#__PURE__*/function () { + function PDFWorker() { + var _ref14 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + _ref14$name = _ref14.name, + name = _ref14$name === void 0 ? null : _ref14$name, + _ref14$port = _ref14.port, + port = _ref14$port === void 0 ? null : _ref14$port, + _ref14$verbosity = _ref14.verbosity, + verbosity = _ref14$verbosity === void 0 ? (0, _util.getVerbosityLevel)() : _ref14$verbosity; + + _classCallCheck(this, PDFWorker); + + if (port && pdfWorkerPorts.has(port)) { + throw new Error("Cannot use more than one PDFWorker per port"); + } + + this.name = name; + this.destroyed = false; + this.postMessageTransfers = true; + this.verbosity = verbosity; + this._readyCapability = (0, _util.createPromiseCapability)(); + this._port = null; + this._webWorker = null; + this._messageHandler = null; + + if (port) { + pdfWorkerPorts.set(port, this); + + this._initializeFromPort(port); + + return; + } + + this._initialize(); + } + + _createClass(PDFWorker, [{ + key: "promise", + get: function get() { + return this._readyCapability.promise; + } + }, { + key: "port", + get: function get() { + return this._port; + } + }, { + key: "messageHandler", + get: function get() { + return this._messageHandler; + } + }, { + key: "_initializeFromPort", + value: function _initializeFromPort(port) { + this._port = port; + this._messageHandler = new _message_handler.MessageHandler("main", "worker", port); + + this._messageHandler.on("ready", function () {}); + + this._readyCapability.resolve(); + } + }, { + key: "_initialize", + value: function _initialize() { + var _this9 = this; + + if (typeof Worker !== "undefined" && !isWorkerDisabled && !getMainThreadWorkerMessageHandler()) { + var workerSrc = _getWorkerSrc(); + + try { + if (!(0, _util.isSameOrigin)(window.location.href, workerSrc)) { + workerSrc = createCDNWrapper(new URL(workerSrc, window.location).href); + } + + var worker = new Worker(workerSrc); + var messageHandler = new _message_handler.MessageHandler("main", "worker", worker); + + var terminateEarly = function terminateEarly() { + worker.removeEventListener("error", onWorkerError); + messageHandler.destroy(); + worker.terminate(); + + if (_this9.destroyed) { + _this9._readyCapability.reject(new Error("Worker was destroyed")); + } else { + _this9._setupFakeWorker(); + } + }; + + var onWorkerError = function onWorkerError() { + if (!_this9._webWorker) { + terminateEarly(); + } + }; + + worker.addEventListener("error", onWorkerError); + messageHandler.on("test", function (data) { + worker.removeEventListener("error", onWorkerError); + + if (_this9.destroyed) { + terminateEarly(); + return; + } + + if (data) { + _this9._messageHandler = messageHandler; + _this9._port = worker; + _this9._webWorker = worker; + + if (!data.supportTransfers) { + _this9.postMessageTransfers = false; + } + + _this9._readyCapability.resolve(); + + messageHandler.send("configure", { + verbosity: _this9.verbosity + }); + } else { + _this9._setupFakeWorker(); + + messageHandler.destroy(); + worker.terminate(); + } + }); + messageHandler.on("ready", function (data) { + worker.removeEventListener("error", onWorkerError); + + if (_this9.destroyed) { + terminateEarly(); + return; + } + + try { + sendTest(); + } catch (e) { + _this9._setupFakeWorker(); + } + }); + + var sendTest = function sendTest() { + var testObj = new Uint8Array([_this9.postMessageTransfers ? 255 : 0]); + + try { + messageHandler.send("test", testObj, [testObj.buffer]); + } catch (ex) { + (0, _util.warn)("Cannot use postMessage transfers."); + testObj[0] = 0; + messageHandler.send("test", testObj); + } + }; + + sendTest(); + return; + } catch (e) { + (0, _util.info)("The worker has been disabled."); + } + } + + this._setupFakeWorker(); + } + }, { + key: "_setupFakeWorker", + value: function _setupFakeWorker() { + var _this10 = this; + + if (!isWorkerDisabled) { + (0, _util.warn)("Setting up fake worker."); + isWorkerDisabled = true; + } + + setupFakeWorkerGlobal().then(function (WorkerMessageHandler) { + if (_this10.destroyed) { + _this10._readyCapability.reject(new Error("Worker was destroyed")); + + return; + } + + var port = new LoopbackPort(); + _this10._port = port; + var id = "fake" + nextFakeWorkerId++; + var workerHandler = new _message_handler.MessageHandler(id + "_worker", id, port); + WorkerMessageHandler.setup(workerHandler, port); + var messageHandler = new _message_handler.MessageHandler(id, id + "_worker", port); + _this10._messageHandler = messageHandler; + + _this10._readyCapability.resolve(); + + messageHandler.send("configure", { + verbosity: _this10.verbosity + }); + })["catch"](function (reason) { + _this10._readyCapability.reject(new Error("Setting up fake worker failed: \"".concat(reason.message, "\"."))); + }); + } + }, { + key: "destroy", + value: function destroy() { + this.destroyed = true; + + if (this._webWorker) { + this._webWorker.terminate(); + + this._webWorker = null; + } + + pdfWorkerPorts["delete"](this._port); + this._port = null; + + if (this._messageHandler) { + this._messageHandler.destroy(); + + this._messageHandler = null; + } + } + }], [{ + key: "fromPort", + value: function fromPort(params) { + if (!params || !params.port) { + throw new Error("PDFWorker.fromPort - invalid method signature."); + } + + if (pdfWorkerPorts.has(params.port)) { + return pdfWorkerPorts.get(params.port); + } + + return new PDFWorker(params); + } + }, { + key: "getWorkerSrc", + value: function getWorkerSrc() { + return _getWorkerSrc(); + } + }]); + + return PDFWorker; + }(); + + return PDFWorker; +}(); + +exports.PDFWorker = PDFWorker; + +var WorkerTransport = /*#__PURE__*/function () { + function WorkerTransport(messageHandler, loadingTask, networkStream, params) { + _classCallCheck(this, WorkerTransport); + + this.messageHandler = messageHandler; + this.loadingTask = loadingTask; + this.commonObjs = new PDFObjects(); + this.fontLoader = new _font_loader.FontLoader({ + docId: loadingTask.docId, + onUnsupportedFeature: this._onUnsupportedFeature.bind(this), + ownerDocument: params.ownerDocument, + styleElement: params.styleElement + }); + this._params = params; + + if (!params.useWorkerFetch) { + this.CMapReaderFactory = new params.CMapReaderFactory({ + baseUrl: params.cMapUrl, + isCompressed: params.cMapPacked + }); + this.StandardFontDataFactory = new params.StandardFontDataFactory({ + baseUrl: params.standardFontDataUrl + }); + } + + this.destroyed = false; + this.destroyCapability = null; + this._passwordCapability = null; + this._networkStream = networkStream; + this._fullReader = null; + this._lastProgress = null; + this.pageCache = []; + this.pagePromises = []; + this.downloadInfoCapability = (0, _util.createPromiseCapability)(); + this.setupMessageHandler(); + } + + _createClass(WorkerTransport, [{ + key: "annotationStorage", + get: function get() { + return (0, _util.shadow)(this, "annotationStorage", new _annotation_storage.AnnotationStorage()); + } + }, { + key: "destroy", + value: function destroy() { + var _this11 = this; + + if (this.destroyCapability) { + return this.destroyCapability.promise; + } + + this.destroyed = true; + this.destroyCapability = (0, _util.createPromiseCapability)(); + + if (this._passwordCapability) { + this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback")); + } + + var waitOn = []; + + var _iterator14 = _createForOfIteratorHelper(this.pageCache), + _step14; + + try { + for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) { + var page = _step14.value; + + if (page) { + waitOn.push(page._destroy()); + } + } + } catch (err) { + _iterator14.e(err); + } finally { + _iterator14.f(); + } + + this.pageCache.length = 0; + this.pagePromises.length = 0; + + if (this.hasOwnProperty("annotationStorage")) { + this.annotationStorage.resetModified(); + } + + var terminated = this.messageHandler.sendWithPromise("Terminate", null); + waitOn.push(terminated); + Promise.all(waitOn).then(function () { + _this11.commonObjs.clear(); + + _this11.fontLoader.clear(); + + _this11._hasJSActionsPromise = null; + + if (_this11._networkStream) { + _this11._networkStream.cancelAllRequests(new _util.AbortException("Worker was terminated.")); + } + + if (_this11.messageHandler) { + _this11.messageHandler.destroy(); + + _this11.messageHandler = null; + } + + _this11.destroyCapability.resolve(); + }, this.destroyCapability.reject); + return this.destroyCapability.promise; + } + }, { + key: "setupMessageHandler", + value: function setupMessageHandler() { + var _this12 = this; + + var messageHandler = this.messageHandler, + loadingTask = this.loadingTask; + messageHandler.on("GetReader", function (data, sink) { + (0, _util.assert)(_this12._networkStream, "GetReader - no `IPDFStream` instance available."); + _this12._fullReader = _this12._networkStream.getFullReader(); + + _this12._fullReader.onProgress = function (evt) { + _this12._lastProgress = { + loaded: evt.loaded, + total: evt.total + }; + }; + + sink.onPull = function () { + _this12._fullReader.read().then(function (_ref15) { + var value = _ref15.value, + done = _ref15.done; + + if (done) { + sink.close(); + return; + } + + (0, _util.assert)((0, _util.isArrayBuffer)(value), "GetReader - expected an ArrayBuffer."); + sink.enqueue(new Uint8Array(value), 1, [value]); + })["catch"](function (reason) { + sink.error(reason); + }); + }; + + sink.onCancel = function (reason) { + _this12._fullReader.cancel(reason); + + sink.ready["catch"](function (readyReason) { + if (_this12.destroyed) { + return; + } + + throw readyReason; + }); + }; + }); + messageHandler.on("ReaderHeadersReady", function (data) { + var headersCapability = (0, _util.createPromiseCapability)(); + var fullReader = _this12._fullReader; + fullReader.headersReady.then(function () { + if (!fullReader.isStreamingSupported || !fullReader.isRangeSupported) { + if (_this12._lastProgress && loadingTask.onProgress) { + loadingTask.onProgress(_this12._lastProgress); + } + + fullReader.onProgress = function (evt) { + if (loadingTask.onProgress) { + loadingTask.onProgress({ + loaded: evt.loaded, + total: evt.total + }); + } + }; + } + + headersCapability.resolve({ + isStreamingSupported: fullReader.isStreamingSupported, + isRangeSupported: fullReader.isRangeSupported, + contentLength: fullReader.contentLength + }); + }, headersCapability.reject); + return headersCapability.promise; + }); + messageHandler.on("GetRangeReader", function (data, sink) { + (0, _util.assert)(_this12._networkStream, "GetRangeReader - no `IPDFStream` instance available."); + + var rangeReader = _this12._networkStream.getRangeReader(data.begin, data.end); + + if (!rangeReader) { + sink.close(); + return; + } + + sink.onPull = function () { + rangeReader.read().then(function (_ref16) { + var value = _ref16.value, + done = _ref16.done; + + if (done) { + sink.close(); + return; + } + + (0, _util.assert)((0, _util.isArrayBuffer)(value), "GetRangeReader - expected an ArrayBuffer."); + sink.enqueue(new Uint8Array(value), 1, [value]); + })["catch"](function (reason) { + sink.error(reason); + }); + }; + + sink.onCancel = function (reason) { + rangeReader.cancel(reason); + sink.ready["catch"](function (readyReason) { + if (_this12.destroyed) { + return; + } + + throw readyReason; + }); + }; + }); + messageHandler.on("GetDoc", function (_ref17) { + var pdfInfo = _ref17.pdfInfo; + _this12._numPages = pdfInfo.numPages; + _this12._htmlForXfa = pdfInfo.htmlForXfa; + delete pdfInfo.htmlForXfa; + + loadingTask._capability.resolve(new PDFDocumentProxy(pdfInfo, _this12)); + }); + messageHandler.on("DocException", function (ex) { + var reason; + + switch (ex.name) { + case "PasswordException": + reason = new _util.PasswordException(ex.message, ex.code); + break; + + case "InvalidPDFException": + reason = new _util.InvalidPDFException(ex.message); + break; + + case "MissingPDFException": + reason = new _util.MissingPDFException(ex.message); + break; + + case "UnexpectedResponseException": + reason = new _util.UnexpectedResponseException(ex.message, ex.status); + break; + + case "UnknownErrorException": + reason = new _util.UnknownErrorException(ex.message, ex.details); + break; + } + + if (!(reason instanceof Error)) { + var msg = "DocException - expected a valid Error."; + (0, _util.warn)(msg); + } + + loadingTask._capability.reject(reason); + }); + messageHandler.on("PasswordRequest", function (exception) { + _this12._passwordCapability = (0, _util.createPromiseCapability)(); + + if (loadingTask.onPassword) { + var updatePassword = function updatePassword(password) { + _this12._passwordCapability.resolve({ + password: password + }); + }; + + try { + loadingTask.onPassword(updatePassword, exception.code); + } catch (ex) { + _this12._passwordCapability.reject(ex); + } + } else { + _this12._passwordCapability.reject(new _util.PasswordException(exception.message, exception.code)); + } + + return _this12._passwordCapability.promise; + }); + messageHandler.on("DataLoaded", function (data) { + if (loadingTask.onProgress) { + loadingTask.onProgress({ + loaded: data.length, + total: data.length + }); + } + + _this12.downloadInfoCapability.resolve(data); + }); + messageHandler.on("StartRenderPage", function (data) { + if (_this12.destroyed) { + return; + } + + var page = _this12.pageCache[data.pageIndex]; + + page._startRenderPage(data.transparency, data.intent); + }); + messageHandler.on("commonobj", function (data) { + var _globalThis$FontInspe; + + if (_this12.destroyed) { + return; + } + + var _data = _slicedToArray(data, 3), + id = _data[0], + type = _data[1], + exportedData = _data[2]; + + if (_this12.commonObjs.has(id)) { + return; + } + + switch (type) { + case "Font": + var params = _this12._params; + + if ("error" in exportedData) { + var exportedError = exportedData.error; + (0, _util.warn)("Error during font loading: ".concat(exportedError)); + + _this12.commonObjs.resolve(id, exportedError); + + break; + } + + var fontRegistry = null; + + if (params.pdfBug && (_globalThis$FontInspe = globalThis.FontInspector) !== null && _globalThis$FontInspe !== void 0 && _globalThis$FontInspe.enabled) { + fontRegistry = { + registerFont: function registerFont(font, url) { + globalThis.FontInspector.fontAdded(font, url); + } + }; + } + + var font = new _font_loader.FontFaceObject(exportedData, { + isEvalSupported: params.isEvalSupported, + disableFontFace: params.disableFontFace, + ignoreErrors: params.ignoreErrors, + onUnsupportedFeature: _this12._onUnsupportedFeature.bind(_this12), + fontRegistry: fontRegistry + }); + + _this12.fontLoader.bind(font)["catch"](function (reason) { + return messageHandler.sendWithPromise("FontFallback", { + id: id + }); + })["finally"](function () { + if (!params.fontExtraProperties && font.data) { + font.data = null; + } + + _this12.commonObjs.resolve(id, font); + }); + + break; + + case "FontPath": + case "Image": + _this12.commonObjs.resolve(id, exportedData); + + break; + + default: + throw new Error("Got unknown common object type ".concat(type)); + } + }); + messageHandler.on("obj", function (data) { + var _imageData$data; + + if (_this12.destroyed) { + return undefined; + } + + var _data2 = _slicedToArray(data, 4), + id = _data2[0], + pageIndex = _data2[1], + type = _data2[2], + imageData = _data2[3]; + + var pageProxy = _this12.pageCache[pageIndex]; + + if (pageProxy.objs.has(id)) { + return undefined; + } + + switch (type) { + case "Image": + pageProxy.objs.resolve(id, imageData); + var MAX_IMAGE_SIZE_TO_STORE = 8000000; + + if ((imageData === null || imageData === void 0 ? void 0 : (_imageData$data = imageData.data) === null || _imageData$data === void 0 ? void 0 : _imageData$data.length) > MAX_IMAGE_SIZE_TO_STORE) { + pageProxy.cleanupAfterRender = true; + } + + break; + + case "Pattern": + pageProxy.objs.resolve(id, imageData); + break; + + default: + throw new Error("Got unknown object type ".concat(type)); + } + + return undefined; + }); + messageHandler.on("DocProgress", function (data) { + if (_this12.destroyed) { + return; + } + + if (loadingTask.onProgress) { + loadingTask.onProgress({ + loaded: data.loaded, + total: data.total + }); + } + }); + messageHandler.on("UnsupportedFeature", this._onUnsupportedFeature.bind(this)); + messageHandler.on("FetchBuiltInCMap", function (data) { + if (_this12.destroyed) { + return Promise.reject(new Error("Worker was destroyed.")); + } + + if (!_this12.CMapReaderFactory) { + return Promise.reject(new Error("CMapReaderFactory not initialized, see the `useWorkerFetch` parameter.")); + } + + return _this12.CMapReaderFactory.fetch(data); + }); + messageHandler.on("FetchStandardFontData", function (data) { + if (_this12.destroyed) { + return Promise.reject(new Error("Worker was destroyed.")); + } + + if (!_this12.StandardFontDataFactory) { + return Promise.reject(new Error("StandardFontDataFactory not initialized, see the `useWorkerFetch` parameter.")); + } + + return _this12.StandardFontDataFactory.fetch(data); + }); + } + }, { + key: "_onUnsupportedFeature", + value: function _onUnsupportedFeature(_ref18) { + var featureId = _ref18.featureId; + + if (this.destroyed) { + return; + } + + if (this.loadingTask.onUnsupportedFeature) { + this.loadingTask.onUnsupportedFeature(featureId); + } + } + }, { + key: "getData", + value: function getData() { + return this.messageHandler.sendWithPromise("GetData", null); + } + }, { + key: "getPage", + value: function getPage(pageNumber) { + var _this13 = this; + + if (!Number.isInteger(pageNumber) || pageNumber <= 0 || pageNumber > this._numPages) { + return Promise.reject(new Error("Invalid page request")); + } + + var pageIndex = pageNumber - 1; + + if (pageIndex in this.pagePromises) { + return this.pagePromises[pageIndex]; + } + + var promise = this.messageHandler.sendWithPromise("GetPage", { + pageIndex: pageIndex + }).then(function (pageInfo) { + if (_this13.destroyed) { + throw new Error("Transport destroyed"); + } + + var page = new PDFPageProxy(pageIndex, pageInfo, _this13, _this13._params.ownerDocument, _this13._params.pdfBug); + _this13.pageCache[pageIndex] = page; + return page; + }); + this.pagePromises[pageIndex] = promise; + return promise; + } + }, { + key: "getPageIndex", + value: function getPageIndex(ref) { + return this.messageHandler.sendWithPromise("GetPageIndex", { + ref: ref + })["catch"](function (reason) { + return Promise.reject(new Error(reason)); + }); + } + }, { + key: "getAnnotations", + value: function getAnnotations(pageIndex, intent) { + return this.messageHandler.sendWithPromise("GetAnnotations", { + pageIndex: pageIndex, + intent: intent + }); + } + }, { + key: "saveDocument", + value: function saveDocument() { + var _this$_fullReader$fil, + _this$_fullReader, + _this14 = this; + + return this.messageHandler.sendWithPromise("SaveDocument", { + isPureXfa: !!this._htmlForXfa, + numPages: this._numPages, + annotationStorage: this.annotationStorage.serializable, + filename: (_this$_fullReader$fil = (_this$_fullReader = this._fullReader) === null || _this$_fullReader === void 0 ? void 0 : _this$_fullReader.filename) !== null && _this$_fullReader$fil !== void 0 ? _this$_fullReader$fil : null + })["finally"](function () { + _this14.annotationStorage.resetModified(); + }); + } + }, { + key: "getFieldObjects", + value: function getFieldObjects() { + return this.messageHandler.sendWithPromise("GetFieldObjects", null); + } + }, { + key: "hasJSActions", + value: function hasJSActions() { + return this._hasJSActionsPromise || (this._hasJSActionsPromise = this.messageHandler.sendWithPromise("HasJSActions", null)); + } + }, { + key: "getCalculationOrderIds", + value: function getCalculationOrderIds() { + return this.messageHandler.sendWithPromise("GetCalculationOrderIds", null); + } + }, { + key: "getDestinations", + value: function getDestinations() { + return this.messageHandler.sendWithPromise("GetDestinations", null); + } + }, { + key: "getDestination", + value: function getDestination(id) { + if (typeof id !== "string") { + return Promise.reject(new Error("Invalid destination request.")); + } + + return this.messageHandler.sendWithPromise("GetDestination", { + id: id + }); + } + }, { + key: "getPageLabels", + value: function getPageLabels() { + return this.messageHandler.sendWithPromise("GetPageLabels", null); + } + }, { + key: "getPageLayout", + value: function getPageLayout() { + return this.messageHandler.sendWithPromise("GetPageLayout", null); + } + }, { + key: "getPageMode", + value: function getPageMode() { + return this.messageHandler.sendWithPromise("GetPageMode", null); + } + }, { + key: "getViewerPreferences", + value: function getViewerPreferences() { + return this.messageHandler.sendWithPromise("GetViewerPreferences", null); + } + }, { + key: "getOpenAction", + value: function getOpenAction() { + return this.messageHandler.sendWithPromise("GetOpenAction", null); + } + }, { + key: "getAttachments", + value: function getAttachments() { + return this.messageHandler.sendWithPromise("GetAttachments", null); + } + }, { + key: "getJavaScript", + value: function getJavaScript() { + return this.messageHandler.sendWithPromise("GetJavaScript", null); + } + }, { + key: "getDocJSActions", + value: function getDocJSActions() { + return this.messageHandler.sendWithPromise("GetDocJSActions", null); + } + }, { + key: "getPageJSActions", + value: function getPageJSActions(pageIndex) { + return this.messageHandler.sendWithPromise("GetPageJSActions", { + pageIndex: pageIndex + }); + } + }, { + key: "getStructTree", + value: function getStructTree(pageIndex) { + return this.messageHandler.sendWithPromise("GetStructTree", { + pageIndex: pageIndex + }); + } + }, { + key: "getOutline", + value: function getOutline() { + return this.messageHandler.sendWithPromise("GetOutline", null); + } + }, { + key: "getOptionalContentConfig", + value: function getOptionalContentConfig() { + return this.messageHandler.sendWithPromise("GetOptionalContentConfig", null).then(function (results) { + return new _optional_content_config.OptionalContentConfig(results); + }); + } + }, { + key: "getPermissions", + value: function getPermissions() { + return this.messageHandler.sendWithPromise("GetPermissions", null); + } + }, { + key: "getMetadata", + value: function getMetadata() { + var _this15 = this; + + return this.messageHandler.sendWithPromise("GetMetadata", null).then(function (results) { + var _this15$_fullReader$f, _this15$_fullReader, _this15$_fullReader$c, _this15$_fullReader2; + + return { + info: results[0], + metadata: results[1] ? new _metadata.Metadata(results[1]) : null, + contentDispositionFilename: (_this15$_fullReader$f = (_this15$_fullReader = _this15._fullReader) === null || _this15$_fullReader === void 0 ? void 0 : _this15$_fullReader.filename) !== null && _this15$_fullReader$f !== void 0 ? _this15$_fullReader$f : null, + contentLength: (_this15$_fullReader$c = (_this15$_fullReader2 = _this15._fullReader) === null || _this15$_fullReader2 === void 0 ? void 0 : _this15$_fullReader2.contentLength) !== null && _this15$_fullReader$c !== void 0 ? _this15$_fullReader$c : null + }; + }); + } + }, { + key: "getMarkInfo", + value: function getMarkInfo() { + return this.messageHandler.sendWithPromise("GetMarkInfo", null); + } + }, { + key: "getStats", + value: function getStats() { + return this.messageHandler.sendWithPromise("GetStats", null); + } + }, { + key: "startCleanup", + value: function () { + var _startCleanup = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee3() { + var keepLoadedFonts, + i, + ii, + page, + cleanupSuccessful, + _args3 = arguments; + return _regenerator["default"].wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + keepLoadedFonts = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : false; + _context3.next = 3; + return this.messageHandler.sendWithPromise("Cleanup", null); + + case 3: + if (!this.destroyed) { + _context3.next = 5; + break; + } + + return _context3.abrupt("return"); + + case 5: + i = 0, ii = this.pageCache.length; + + case 6: + if (!(i < ii)) { + _context3.next = 16; + break; + } + + page = this.pageCache[i]; + + if (page) { + _context3.next = 10; + break; + } + + return _context3.abrupt("continue", 13); + + case 10: + cleanupSuccessful = page.cleanup(); + + if (cleanupSuccessful) { + _context3.next = 13; + break; + } + + throw new Error("startCleanup: Page ".concat(i + 1, " is currently rendering.")); + + case 13: + i++; + _context3.next = 6; + break; + + case 16: + this.commonObjs.clear(); + + if (!keepLoadedFonts) { + this.fontLoader.clear(); + } + + this._hasJSActionsPromise = null; + + case 19: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function startCleanup() { + return _startCleanup.apply(this, arguments); + } + + return startCleanup; + }() + }, { + key: "loadingParams", + get: function get() { + var params = this._params; + return (0, _util.shadow)(this, "loadingParams", { + disableAutoFetch: params.disableAutoFetch + }); + } + }]); + + return WorkerTransport; +}(); + +var PDFObjects = /*#__PURE__*/function () { + function PDFObjects() { + _classCallCheck(this, PDFObjects); + + this._objs = Object.create(null); + } + + _createClass(PDFObjects, [{ + key: "_ensureObj", + value: function _ensureObj(objId) { + if (this._objs[objId]) { + return this._objs[objId]; + } + + return this._objs[objId] = { + capability: (0, _util.createPromiseCapability)(), + data: null, + resolved: false + }; + } + }, { + key: "get", + value: function get(objId) { + var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + + if (callback) { + this._ensureObj(objId).capability.promise.then(callback); + + return null; + } + + var obj = this._objs[objId]; + + if (!obj || !obj.resolved) { + throw new Error("Requesting object that isn't resolved yet ".concat(objId, ".")); + } + + return obj.data; + } + }, { + key: "has", + value: function has(objId) { + var obj = this._objs[objId]; + return (obj === null || obj === void 0 ? void 0 : obj.resolved) || false; + } + }, { + key: "resolve", + value: function resolve(objId, data) { + var obj = this._ensureObj(objId); + + obj.resolved = true; + obj.data = data; + obj.capability.resolve(data); + } + }, { + key: "clear", + value: function clear() { + this._objs = Object.create(null); + } + }]); + + return PDFObjects; +}(); + +var RenderTask = /*#__PURE__*/function () { + function RenderTask(internalRenderTask) { + _classCallCheck(this, RenderTask); + + this._internalRenderTask = internalRenderTask; + this.onContinue = null; + } + + _createClass(RenderTask, [{ + key: "promise", + get: function get() { + return this._internalRenderTask.capability.promise; + } + }, { + key: "cancel", + value: function cancel() { + this._internalRenderTask.cancel(); + } + }]); + + return RenderTask; +}(); + +var InternalRenderTask = function InternalRenderTaskClosure() { + var canvasInRendering = new WeakSet(); + + var InternalRenderTask = /*#__PURE__*/function () { + function InternalRenderTask(_ref19) { + var callback = _ref19.callback, + params = _ref19.params, + objs = _ref19.objs, + commonObjs = _ref19.commonObjs, + operatorList = _ref19.operatorList, + pageIndex = _ref19.pageIndex, + canvasFactory = _ref19.canvasFactory, + _ref19$useRequestAnim = _ref19.useRequestAnimationFrame, + useRequestAnimationFrame = _ref19$useRequestAnim === void 0 ? false : _ref19$useRequestAnim, + _ref19$pdfBug = _ref19.pdfBug, + pdfBug = _ref19$pdfBug === void 0 ? false : _ref19$pdfBug; + + _classCallCheck(this, InternalRenderTask); + + this.callback = callback; + this.params = params; + this.objs = objs; + this.commonObjs = commonObjs; + this.operatorListIdx = null; + this.operatorList = operatorList; + this._pageIndex = pageIndex; + this.canvasFactory = canvasFactory; + this._pdfBug = pdfBug; + this.running = false; + this.graphicsReadyCallback = null; + this.graphicsReady = false; + this._useRequestAnimationFrame = useRequestAnimationFrame === true && typeof window !== "undefined"; + this.cancelled = false; + this.capability = (0, _util.createPromiseCapability)(); + this.task = new RenderTask(this); + this._cancelBound = this.cancel.bind(this); + this._continueBound = this._continue.bind(this); + this._scheduleNextBound = this._scheduleNext.bind(this); + this._nextBound = this._next.bind(this); + this._canvas = params.canvasContext.canvas; + } + + _createClass(InternalRenderTask, [{ + key: "completed", + get: function get() { + return this.capability.promise["catch"](function () {}); + } + }, { + key: "initializeGraphics", + value: function initializeGraphics(_ref20) { + var _globalThis$StepperMa; + + var _ref20$transparency = _ref20.transparency, + transparency = _ref20$transparency === void 0 ? false : _ref20$transparency, + optionalContentConfig = _ref20.optionalContentConfig; + + if (this.cancelled) { + return; + } + + if (this._canvas) { + if (canvasInRendering.has(this._canvas)) { + throw new Error("Cannot use the same canvas during multiple render() operations. " + "Use different canvas or ensure previous operations were " + "cancelled or completed."); + } + + canvasInRendering.add(this._canvas); + } + + if (this._pdfBug && (_globalThis$StepperMa = globalThis.StepperManager) !== null && _globalThis$StepperMa !== void 0 && _globalThis$StepperMa.enabled) { + this.stepper = globalThis.StepperManager.create(this._pageIndex); + this.stepper.init(this.operatorList); + this.stepper.nextBreakPoint = this.stepper.getNextBreakPoint(); + } + + var _this$params = this.params, + canvasContext = _this$params.canvasContext, + viewport = _this$params.viewport, + transform = _this$params.transform, + imageLayer = _this$params.imageLayer, + background = _this$params.background; + this.gfx = new _canvas.CanvasGraphics(canvasContext, this.commonObjs, this.objs, this.canvasFactory, imageLayer, optionalContentConfig); + this.gfx.beginDrawing({ + transform: transform, + viewport: viewport, + transparency: transparency, + background: background + }); + this.operatorListIdx = 0; + this.graphicsReady = true; + + if (this.graphicsReadyCallback) { + this.graphicsReadyCallback(); + } + } + }, { + key: "cancel", + value: function cancel() { + var error = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + this.running = false; + this.cancelled = true; + + if (this.gfx) { + this.gfx.endDrawing(); + } + + if (this._canvas) { + canvasInRendering["delete"](this._canvas); + } + + this.callback(error || new _display_utils.RenderingCancelledException("Rendering cancelled, page ".concat(this._pageIndex + 1), "canvas")); + } + }, { + key: "operatorListChanged", + value: function operatorListChanged() { + if (!this.graphicsReady) { + if (!this.graphicsReadyCallback) { + this.graphicsReadyCallback = this._continueBound; + } + + return; + } + + if (this.stepper) { + this.stepper.updateOperatorList(this.operatorList); + } + + if (this.running) { + return; + } + + this._continue(); + } + }, { + key: "_continue", + value: function _continue() { + this.running = true; + + if (this.cancelled) { + return; + } + + if (this.task.onContinue) { + this.task.onContinue(this._scheduleNextBound); + } else { + this._scheduleNext(); + } + } + }, { + key: "_scheduleNext", + value: function _scheduleNext() { + var _this16 = this; + + if (this._useRequestAnimationFrame) { + window.requestAnimationFrame(function () { + _this16._nextBound()["catch"](_this16._cancelBound); + }); + } else { + Promise.resolve().then(this._nextBound)["catch"](this._cancelBound); + } + } + }, { + key: "_next", + value: function () { + var _next2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee4() { + return _regenerator["default"].wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + if (!this.cancelled) { + _context4.next = 2; + break; + } + + return _context4.abrupt("return"); + + case 2: + this.operatorListIdx = this.gfx.executeOperatorList(this.operatorList, this.operatorListIdx, this._continueBound, this.stepper); + + if (this.operatorListIdx === this.operatorList.argsArray.length) { + this.running = false; + + if (this.operatorList.lastChunk) { + this.gfx.endDrawing(); + + if (this._canvas) { + canvasInRendering["delete"](this._canvas); + } + + this.callback(); + } + } + + case 4: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function _next() { + return _next2.apply(this, arguments); + } + + return _next; + }() + }]); + + return InternalRenderTask; + }(); + + return InternalRenderTask; +}(); + +var version = '2.10.377'; +exports.version = version; +var build = '156762c48'; +exports.build = build; + +/***/ }), +/* 116 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.FontLoader = exports.FontFaceObject = void 0; + +var _regenerator = _interopRequireDefault(__w_pdfjs_require__(2)); + +var _util = __w_pdfjs_require__(4); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var BaseFontLoader = /*#__PURE__*/function () { + function BaseFontLoader(_ref) { + var docId = _ref.docId, + onUnsupportedFeature = _ref.onUnsupportedFeature, + _ref$ownerDocument = _ref.ownerDocument, + ownerDocument = _ref$ownerDocument === void 0 ? globalThis.document : _ref$ownerDocument, + _ref$styleElement = _ref.styleElement, + styleElement = _ref$styleElement === void 0 ? null : _ref$styleElement; + + _classCallCheck(this, BaseFontLoader); + + if (this.constructor === BaseFontLoader) { + (0, _util.unreachable)("Cannot initialize BaseFontLoader."); + } + + this.docId = docId; + this._onUnsupportedFeature = onUnsupportedFeature; + this._document = ownerDocument; + this.nativeFontFaces = []; + this.styleElement = null; + } + + _createClass(BaseFontLoader, [{ + key: "addNativeFontFace", + value: function addNativeFontFace(nativeFontFace) { + this.nativeFontFaces.push(nativeFontFace); + + this._document.fonts.add(nativeFontFace); + } + }, { + key: "insertRule", + value: function insertRule(rule) { + var styleElement = this.styleElement; + + if (!styleElement) { + styleElement = this.styleElement = this._document.createElement("style"); + styleElement.id = "PDFJS_FONT_STYLE_TAG_".concat(this.docId); + + this._document.documentElement.getElementsByTagName("head")[0].appendChild(styleElement); + } + + var styleSheet = styleElement.sheet; + styleSheet.insertRule(rule, styleSheet.cssRules.length); + } + }, { + key: "clear", + value: function clear() { + var _iterator = _createForOfIteratorHelper(this.nativeFontFaces), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var nativeFontFace = _step.value; + + this._document.fonts["delete"](nativeFontFace); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + this.nativeFontFaces.length = 0; + + if (this.styleElement) { + this.styleElement.remove(); + this.styleElement = null; + } + } + }, { + key: "bind", + value: function () { + var _bind = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee(font) { + var _this = this; + + var nativeFontFace, rule; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + if (!(font.attached || font.missingFile)) { + _context.next = 2; + break; + } + + return _context.abrupt("return"); + + case 2: + font.attached = true; + + if (!this.isFontLoadingAPISupported) { + _context.next = 19; + break; + } + + nativeFontFace = font.createNativeFontFace(); + + if (!nativeFontFace) { + _context.next = 18; + break; + } + + this.addNativeFontFace(nativeFontFace); + _context.prev = 7; + _context.next = 10; + return nativeFontFace.loaded; + + case 10: + _context.next = 18; + break; + + case 12: + _context.prev = 12; + _context.t0 = _context["catch"](7); + + this._onUnsupportedFeature({ + featureId: _util.UNSUPPORTED_FEATURES.errorFontLoadNative + }); + + (0, _util.warn)("Failed to load font '".concat(nativeFontFace.family, "': '").concat(_context.t0, "'.")); + font.disableFontFace = true; + throw _context.t0; + + case 18: + return _context.abrupt("return"); + + case 19: + rule = font.createFontFaceRule(); + + if (!rule) { + _context.next = 26; + break; + } + + this.insertRule(rule); + + if (!this.isSyncFontLoadingSupported) { + _context.next = 24; + break; + } + + return _context.abrupt("return"); + + case 24: + _context.next = 26; + return new Promise(function (resolve) { + var request = _this._queueLoadingCallback(resolve); + + _this._prepareFontLoadEvent([rule], [font], request); + }); + + case 26: + case "end": + return _context.stop(); + } + } + }, _callee, this, [[7, 12]]); + })); + + function bind(_x) { + return _bind.apply(this, arguments); + } + + return bind; + }() + }, { + key: "_queueLoadingCallback", + value: function _queueLoadingCallback(callback) { + (0, _util.unreachable)("Abstract method `_queueLoadingCallback`."); + } + }, { + key: "isFontLoadingAPISupported", + get: function get() { + var _this$_document; + + var hasFonts = !!((_this$_document = this._document) !== null && _this$_document !== void 0 && _this$_document.fonts); + return (0, _util.shadow)(this, "isFontLoadingAPISupported", hasFonts); + } + }, { + key: "isSyncFontLoadingSupported", + get: function get() { + (0, _util.unreachable)("Abstract method `isSyncFontLoadingSupported`."); + } + }, { + key: "_loadTestFont", + get: function get() { + (0, _util.unreachable)("Abstract method `_loadTestFont`."); + } + }, { + key: "_prepareFontLoadEvent", + value: function _prepareFontLoadEvent(rules, fontsToLoad, request) { + (0, _util.unreachable)("Abstract method `_prepareFontLoadEvent`."); + } + }]); + + return BaseFontLoader; +}(); + +var FontLoader; +exports.FontLoader = FontLoader; +{ + exports.FontLoader = FontLoader = /*#__PURE__*/function (_BaseFontLoader) { + _inherits(GenericFontLoader, _BaseFontLoader); + + var _super = _createSuper(GenericFontLoader); + + function GenericFontLoader(params) { + var _this2; + + _classCallCheck(this, GenericFontLoader); + + _this2 = _super.call(this, params); + _this2.loadingContext = { + requests: [], + nextRequestId: 0 + }; + _this2.loadTestFontId = 0; + return _this2; + } + + _createClass(GenericFontLoader, [{ + key: "isSyncFontLoadingSupported", + get: function get() { + var supported = false; + + if (typeof navigator === "undefined") { + supported = true; + } else { + var m = /Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent); + + if ((m === null || m === void 0 ? void 0 : m[1]) >= 14) { + supported = true; + } + } + + return (0, _util.shadow)(this, "isSyncFontLoadingSupported", supported); + } + }, { + key: "_queueLoadingCallback", + value: function _queueLoadingCallback(callback) { + function completeRequest() { + (0, _util.assert)(!request.done, "completeRequest() cannot be called twice."); + request.done = true; + + while (context.requests.length > 0 && context.requests[0].done) { + var otherRequest = context.requests.shift(); + setTimeout(otherRequest.callback, 0); + } + } + + var context = this.loadingContext; + var request = { + id: "pdfjs-font-loading-".concat(context.nextRequestId++), + done: false, + complete: completeRequest, + callback: callback + }; + context.requests.push(request); + return request; + } + }, { + key: "_loadTestFont", + get: function get() { + var getLoadTestFont = function getLoadTestFont() { + return atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQA" + "FQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAA" + "ALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgA" + "AAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1" + "AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD" + "6A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EEE/t3" + "Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTj" + "FQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA=="); + }; + + return (0, _util.shadow)(this, "_loadTestFont", getLoadTestFont()); + } + }, { + key: "_prepareFontLoadEvent", + value: function _prepareFontLoadEvent(rules, fonts, request) { + var _this3 = this; + + function int32(data, offset) { + return data.charCodeAt(offset) << 24 | data.charCodeAt(offset + 1) << 16 | data.charCodeAt(offset + 2) << 8 | data.charCodeAt(offset + 3) & 0xff; + } + + function spliceString(s, offset, remove, insert) { + var chunk1 = s.substring(0, offset); + var chunk2 = s.substring(offset + remove); + return chunk1 + insert + chunk2; + } + + var i, ii; + + var canvas = this._document.createElement("canvas"); + + canvas.width = 1; + canvas.height = 1; + var ctx = canvas.getContext("2d"); + var called = 0; + + function isFontReady(name, callback) { + called++; + + if (called > 30) { + (0, _util.warn)("Load test font never loaded."); + callback(); + return; + } + + ctx.font = "30px " + name; + ctx.fillText(".", 0, 20); + var imageData = ctx.getImageData(0, 0, 1, 1); + + if (imageData.data[3] > 0) { + callback(); + return; + } + + setTimeout(isFontReady.bind(null, name, callback)); + } + + var loadTestFontId = "lt".concat(Date.now()).concat(this.loadTestFontId++); + var data = this._loadTestFont; + var COMMENT_OFFSET = 976; + data = spliceString(data, COMMENT_OFFSET, loadTestFontId.length, loadTestFontId); + var CFF_CHECKSUM_OFFSET = 16; + var XXXX_VALUE = 0x58585858; + var checksum = int32(data, CFF_CHECKSUM_OFFSET); + + for (i = 0, ii = loadTestFontId.length - 3; i < ii; i += 4) { + checksum = checksum - XXXX_VALUE + int32(loadTestFontId, i) | 0; + } + + if (i < loadTestFontId.length) { + checksum = checksum - XXXX_VALUE + int32(loadTestFontId + "XXX", i) | 0; + } + + data = spliceString(data, CFF_CHECKSUM_OFFSET, 4, (0, _util.string32)(checksum)); + var url = "url(data:font/opentype;base64,".concat(btoa(data), ");"); + var rule = "@font-face {font-family:\"".concat(loadTestFontId, "\";src:").concat(url, "}"); + this.insertRule(rule); + var names = []; + + var _iterator2 = _createForOfIteratorHelper(fonts), + _step2; + + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + var font = _step2.value; + names.push(font.loadedName); + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + + names.push(loadTestFontId); + + var div = this._document.createElement("div"); + + div.style.visibility = "hidden"; + div.style.width = div.style.height = "10px"; + div.style.position = "absolute"; + div.style.top = div.style.left = "0px"; + + for (var _i = 0, _names = names; _i < _names.length; _i++) { + var name = _names[_i]; + + var span = this._document.createElement("span"); + + span.textContent = "Hi"; + span.style.fontFamily = name; + div.appendChild(span); + } + + this._document.body.appendChild(div); + + isFontReady(loadTestFontId, function () { + _this3._document.body.removeChild(div); + + request.complete(); + }); + } + }]); + + return GenericFontLoader; + }(BaseFontLoader); +} + +var FontFaceObject = /*#__PURE__*/function () { + function FontFaceObject(translatedData, _ref2) { + var _ref2$isEvalSupported = _ref2.isEvalSupported, + isEvalSupported = _ref2$isEvalSupported === void 0 ? true : _ref2$isEvalSupported, + _ref2$disableFontFace = _ref2.disableFontFace, + disableFontFace = _ref2$disableFontFace === void 0 ? false : _ref2$disableFontFace, + _ref2$ignoreErrors = _ref2.ignoreErrors, + ignoreErrors = _ref2$ignoreErrors === void 0 ? false : _ref2$ignoreErrors, + onUnsupportedFeature = _ref2.onUnsupportedFeature, + _ref2$fontRegistry = _ref2.fontRegistry, + fontRegistry = _ref2$fontRegistry === void 0 ? null : _ref2$fontRegistry; + + _classCallCheck(this, FontFaceObject); + + this.compiledGlyphs = Object.create(null); + + for (var i in translatedData) { + this[i] = translatedData[i]; + } + + this.isEvalSupported = isEvalSupported !== false; + this.disableFontFace = disableFontFace === true; + this.ignoreErrors = ignoreErrors === true; + this._onUnsupportedFeature = onUnsupportedFeature; + this.fontRegistry = fontRegistry; + } + + _createClass(FontFaceObject, [{ + key: "createNativeFontFace", + value: function createNativeFontFace() { + if (!this.data || this.disableFontFace) { + return null; + } + + var nativeFontFace; + + if (!this.cssFontInfo) { + nativeFontFace = new FontFace(this.loadedName, this.data, {}); + } else { + var css = { + weight: this.cssFontInfo.fontWeight + }; + + if (this.cssFontInfo.italicAngle) { + css.style = "oblique ".concat(this.cssFontInfo.italicAngle, "deg"); + } + + nativeFontFace = new FontFace(this.cssFontInfo.fontFamily, this.data, css); + } + + if (this.fontRegistry) { + this.fontRegistry.registerFont(this); + } + + return nativeFontFace; + } + }, { + key: "createFontFaceRule", + value: function createFontFaceRule() { + if (!this.data || this.disableFontFace) { + return null; + } + + var data = (0, _util.bytesToString)(this.data); + var url = "url(data:".concat(this.mimetype, ";base64,").concat(btoa(data), ");"); + var rule; + + if (!this.cssFontInfo) { + rule = "@font-face {font-family:\"".concat(this.loadedName, "\";src:").concat(url, "}"); + } else { + var css = "font-weight: ".concat(this.cssFontInfo.fontWeight, ";"); + + if (this.cssFontInfo.italicAngle) { + css += "font-style: oblique ".concat(this.cssFontInfo.italicAngle, "deg;"); + } + + rule = "@font-face {font-family:\"".concat(this.cssFontInfo.fontFamily, "\";").concat(css, "src:").concat(url, "}"); + } + + if (this.fontRegistry) { + this.fontRegistry.registerFont(this, url); + } + + return rule; + } + }, { + key: "getPathGenerator", + value: function getPathGenerator(objs, character) { + if (this.compiledGlyphs[character] !== undefined) { + return this.compiledGlyphs[character]; + } + + var cmds; + + try { + cmds = objs.get(this.loadedName + "_path_" + character); + } catch (ex) { + if (!this.ignoreErrors) { + throw ex; + } + + this._onUnsupportedFeature({ + featureId: _util.UNSUPPORTED_FEATURES.errorFontGetPath + }); + + (0, _util.warn)("getPathGenerator - ignoring character: \"".concat(ex, "\".")); + return this.compiledGlyphs[character] = function (c, size) {}; + } + + if (this.isEvalSupported && _util.IsEvalSupportedCached.value) { + var jsBuf = []; + + var _iterator3 = _createForOfIteratorHelper(cmds), + _step3; + + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { + var current = _step3.value; + var args = current.args !== undefined ? current.args.join(",") : ""; + jsBuf.push("c.", current.cmd, "(", args, ");\n"); + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); + } + + return this.compiledGlyphs[character] = new Function("c", "size", jsBuf.join("")); + } + + return this.compiledGlyphs[character] = function (c, size) { + var _iterator4 = _createForOfIteratorHelper(cmds), + _step4; + + try { + for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { + var _current = _step4.value; + + if (_current.cmd === "scale") { + _current.args = [size, -size]; + } + + c[_current.cmd].apply(c, _current.args); + } + } catch (err) { + _iterator4.e(err); + } finally { + _iterator4.f(); + } + }; + } + }]); + + return FontFaceObject; +}(); + +exports.FontFaceObject = FontFaceObject; + +/***/ }), +/* 117 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.NodeStandardFontDataFactory = exports.NodeCMapReaderFactory = exports.NodeCanvasFactory = void 0; + +var _base_factory = __w_pdfjs_require__(114); + +var _is_node = __w_pdfjs_require__(6); + +var _util = __w_pdfjs_require__(4); + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var NodeCanvasFactory = function NodeCanvasFactory() { + _classCallCheck(this, NodeCanvasFactory); + + (0, _util.unreachable)("Not implemented: NodeCanvasFactory"); +}; + +exports.NodeCanvasFactory = NodeCanvasFactory; + +var NodeCMapReaderFactory = function NodeCMapReaderFactory() { + _classCallCheck(this, NodeCMapReaderFactory); + + (0, _util.unreachable)("Not implemented: NodeCMapReaderFactory"); +}; + +exports.NodeCMapReaderFactory = NodeCMapReaderFactory; + +var NodeStandardFontDataFactory = function NodeStandardFontDataFactory() { + _classCallCheck(this, NodeStandardFontDataFactory); + + (0, _util.unreachable)("Not implemented: NodeStandardFontDataFactory"); +}; + +exports.NodeStandardFontDataFactory = NodeStandardFontDataFactory; + +if (_is_node.isNodeJS) { + var fetchData = function fetchData(url) { + return new Promise(function (resolve, reject) { + var fs = require("fs"); + + fs.readFile(url, function (error, data) { + if (error || !data) { + reject(new Error(error)); + return; + } + + resolve(new Uint8Array(data)); + }); + }); + }; + + exports.NodeCanvasFactory = NodeCanvasFactory = /*#__PURE__*/function (_BaseCanvasFactory) { + _inherits(NodeCanvasFactory, _BaseCanvasFactory); + + var _super = _createSuper(NodeCanvasFactory); + + function NodeCanvasFactory() { + _classCallCheck(this, NodeCanvasFactory); + + return _super.apply(this, arguments); + } + + _createClass(NodeCanvasFactory, [{ + key: "_createCanvas", + value: function _createCanvas(width, height) { + var Canvas = require("canvas"); + + return Canvas.createCanvas(width, height); + } + }]); + + return NodeCanvasFactory; + }(_base_factory.BaseCanvasFactory); + + exports.NodeCMapReaderFactory = NodeCMapReaderFactory = /*#__PURE__*/function (_BaseCMapReaderFactor) { + _inherits(NodeCMapReaderFactory, _BaseCMapReaderFactor); + + var _super2 = _createSuper(NodeCMapReaderFactory); + + function NodeCMapReaderFactory() { + _classCallCheck(this, NodeCMapReaderFactory); + + return _super2.apply(this, arguments); + } + + _createClass(NodeCMapReaderFactory, [{ + key: "_fetchData", + value: function _fetchData(url, compressionType) { + return fetchData(url).then(function (data) { + return { + cMapData: data, + compressionType: compressionType + }; + }); + } + }]); + + return NodeCMapReaderFactory; + }(_base_factory.BaseCMapReaderFactory); + + exports.NodeStandardFontDataFactory = NodeStandardFontDataFactory = /*#__PURE__*/function (_BaseStandardFontData) { + _inherits(NodeStandardFontDataFactory, _BaseStandardFontData); + + var _super3 = _createSuper(NodeStandardFontDataFactory); + + function NodeStandardFontDataFactory() { + _classCallCheck(this, NodeStandardFontDataFactory); + + return _super3.apply(this, arguments); + } + + _createClass(NodeStandardFontDataFactory, [{ + key: "_fetchData", + value: function _fetchData(url) { + return fetchData(url); + } + }]); + + return NodeStandardFontDataFactory; + }(_base_factory.BaseStandardFontDataFactory); +} + +/***/ }), +/* 118 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.AnnotationStorage = void 0; + +var _util = __w_pdfjs_require__(4); + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var AnnotationStorage = /*#__PURE__*/function () { + function AnnotationStorage() { + _classCallCheck(this, AnnotationStorage); + + this._storage = new Map(); + this._modified = false; + this.onSetModified = null; + this.onResetModified = null; + } + + _createClass(AnnotationStorage, [{ + key: "getValue", + value: function getValue(key, defaultValue) { + var obj = this._storage.get(key); + + return obj !== undefined ? obj : defaultValue; + } + }, { + key: "setValue", + value: function setValue(key, value) { + var obj = this._storage.get(key); + + var modified = false; + + if (obj !== undefined) { + for (var _i = 0, _Object$entries = Object.entries(value); _i < _Object$entries.length; _i++) { + var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2), + entry = _Object$entries$_i[0], + val = _Object$entries$_i[1]; + + if (obj[entry] !== val) { + modified = true; + obj[entry] = val; + } + } + } else { + this._storage.set(key, value); + + modified = true; + } + + if (modified) { + this._setModified(); + } + } + }, { + key: "getAll", + value: function getAll() { + return this._storage.size > 0 ? (0, _util.objectFromMap)(this._storage) : null; + } + }, { + key: "size", + get: function get() { + return this._storage.size; + } + }, { + key: "_setModified", + value: function _setModified() { + if (!this._modified) { + this._modified = true; + + if (typeof this.onSetModified === "function") { + this.onSetModified(); + } + } + } + }, { + key: "resetModified", + value: function resetModified() { + if (this._modified) { + this._modified = false; + + if (typeof this.onResetModified === "function") { + this.onResetModified(); + } + } + } + }, { + key: "serializable", + get: function get() { + return this._storage.size > 0 ? this._storage : null; + } + }]); + + return AnnotationStorage; +}(); + +exports.AnnotationStorage = AnnotationStorage; + +/***/ }), +/* 119 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.CanvasGraphics = void 0; + +var _util = __w_pdfjs_require__(4); + +var _pattern_helper = __w_pdfjs_require__(120); + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +var MIN_FONT_SIZE = 16; +var MAX_FONT_SIZE = 100; +var MAX_GROUP_SIZE = 4096; +var COMPILE_TYPE3_GLYPHS = true; +var MAX_SIZE_TO_COMPILE = 1000; +var FULL_CHUNK_HEIGHT = 16; +var LINEWIDTH_SCALE_FACTOR = 1.000001; + +function addContextCurrentTransform(ctx) { + if (ctx.mozCurrentTransform) { + return; + } + + ctx._originalSave = ctx.save; + ctx._originalRestore = ctx.restore; + ctx._originalRotate = ctx.rotate; + ctx._originalScale = ctx.scale; + ctx._originalTranslate = ctx.translate; + ctx._originalTransform = ctx.transform; + ctx._originalSetTransform = ctx.setTransform; + ctx._originalResetTransform = ctx.resetTransform; + ctx._transformMatrix = ctx._transformMatrix || [1, 0, 0, 1, 0, 0]; + ctx._transformStack = []; + + try { + var desc = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(ctx), "lineWidth"); + ctx._setLineWidth = desc.set; + ctx._getLineWidth = desc.get; + Object.defineProperty(ctx, "lineWidth", { + set: function setLineWidth(width) { + this._setLineWidth(width * LINEWIDTH_SCALE_FACTOR); + }, + get: function getLineWidth() { + return this._getLineWidth(); + } + }); + } catch (_) {} + + Object.defineProperty(ctx, "mozCurrentTransform", { + get: function getCurrentTransform() { + return this._transformMatrix; + } + }); + Object.defineProperty(ctx, "mozCurrentTransformInverse", { + get: function getCurrentTransformInverse() { + var _this$_transformMatri = _slicedToArray(this._transformMatrix, 6), + a = _this$_transformMatri[0], + b = _this$_transformMatri[1], + c = _this$_transformMatri[2], + d = _this$_transformMatri[3], + e = _this$_transformMatri[4], + f = _this$_transformMatri[5]; + + var ad_bc = a * d - b * c; + var bc_ad = b * c - a * d; + return [d / ad_bc, b / bc_ad, c / bc_ad, a / ad_bc, (d * e - c * f) / bc_ad, (b * e - a * f) / ad_bc]; + } + }); + + ctx.save = function ctxSave() { + var old = this._transformMatrix; + + this._transformStack.push(old); + + this._transformMatrix = old.slice(0, 6); + + this._originalSave(); + }; + + ctx.restore = function ctxRestore() { + var prev = this._transformStack.pop(); + + if (prev) { + this._transformMatrix = prev; + + this._originalRestore(); + } + }; + + ctx.translate = function ctxTranslate(x, y) { + var m = this._transformMatrix; + m[4] = m[0] * x + m[2] * y + m[4]; + m[5] = m[1] * x + m[3] * y + m[5]; + + this._originalTranslate(x, y); + }; + + ctx.scale = function ctxScale(x, y) { + var m = this._transformMatrix; + m[0] *= x; + m[1] *= x; + m[2] *= y; + m[3] *= y; + + this._originalScale(x, y); + }; + + ctx.transform = function ctxTransform(a, b, c, d, e, f) { + var m = this._transformMatrix; + this._transformMatrix = [m[0] * a + m[2] * b, m[1] * a + m[3] * b, m[0] * c + m[2] * d, m[1] * c + m[3] * d, m[0] * e + m[2] * f + m[4], m[1] * e + m[3] * f + m[5]]; + + ctx._originalTransform(a, b, c, d, e, f); + }; + + ctx.setTransform = function ctxSetTransform(a, b, c, d, e, f) { + this._transformMatrix = [a, b, c, d, e, f]; + + ctx._originalSetTransform(a, b, c, d, e, f); + }; + + ctx.resetTransform = function ctxResetTransform() { + this._transformMatrix = [1, 0, 0, 1, 0, 0]; + + ctx._originalResetTransform(); + }; + + ctx.rotate = function ctxRotate(angle) { + var cosValue = Math.cos(angle); + var sinValue = Math.sin(angle); + var m = this._transformMatrix; + this._transformMatrix = [m[0] * cosValue + m[2] * sinValue, m[1] * cosValue + m[3] * sinValue, m[0] * -sinValue + m[2] * cosValue, m[1] * -sinValue + m[3] * cosValue, m[4], m[5]]; + + this._originalRotate(angle); + }; +} + +var CachedCanvases = /*#__PURE__*/function () { + function CachedCanvases(canvasFactory) { + _classCallCheck(this, CachedCanvases); + + this.canvasFactory = canvasFactory; + this.cache = Object.create(null); + } + + _createClass(CachedCanvases, [{ + key: "getCanvas", + value: function getCanvas(id, width, height, trackTransform) { + var canvasEntry; + + if (this.cache[id] !== undefined) { + canvasEntry = this.cache[id]; + this.canvasFactory.reset(canvasEntry, width, height); + canvasEntry.context.setTransform(1, 0, 0, 1, 0, 0); + } else { + canvasEntry = this.canvasFactory.create(width, height); + this.cache[id] = canvasEntry; + } + + if (trackTransform) { + addContextCurrentTransform(canvasEntry.context); + } + + return canvasEntry; + } + }, { + key: "clear", + value: function clear() { + for (var id in this.cache) { + var canvasEntry = this.cache[id]; + this.canvasFactory.destroy(canvasEntry); + delete this.cache[id]; + } + } + }]); + + return CachedCanvases; +}(); + +function compileType3Glyph(imgData) { + var POINT_TO_PROCESS_LIMIT = 1000; + var POINT_TYPES = new Uint8Array([0, 2, 4, 0, 1, 0, 5, 4, 8, 10, 0, 8, 0, 2, 1, 0]); + var width = imgData.width, + height = imgData.height, + width1 = width + 1; + var i, ii, j, j0; + var points = new Uint8Array(width1 * (height + 1)); + var lineSize = width + 7 & ~7, + data0 = imgData.data; + var data = new Uint8Array(lineSize * height); + var pos = 0; + + for (i = 0, ii = data0.length; i < ii; i++) { + var elem = data0[i]; + var mask = 128; + + while (mask > 0) { + data[pos++] = elem & mask ? 0 : 255; + mask >>= 1; + } + } + + var count = 0; + pos = 0; + + if (data[pos] !== 0) { + points[0] = 1; + ++count; + } + + for (j = 1; j < width; j++) { + if (data[pos] !== data[pos + 1]) { + points[j] = data[pos] ? 2 : 1; + ++count; + } + + pos++; + } + + if (data[pos] !== 0) { + points[j] = 2; + ++count; + } + + for (i = 1; i < height; i++) { + pos = i * lineSize; + j0 = i * width1; + + if (data[pos - lineSize] !== data[pos]) { + points[j0] = data[pos] ? 1 : 8; + ++count; + } + + var sum = (data[pos] ? 4 : 0) + (data[pos - lineSize] ? 8 : 0); + + for (j = 1; j < width; j++) { + sum = (sum >> 2) + (data[pos + 1] ? 4 : 0) + (data[pos - lineSize + 1] ? 8 : 0); + + if (POINT_TYPES[sum]) { + points[j0 + j] = POINT_TYPES[sum]; + ++count; + } + + pos++; + } + + if (data[pos - lineSize] !== data[pos]) { + points[j0 + j] = data[pos] ? 2 : 4; + ++count; + } + + if (count > POINT_TO_PROCESS_LIMIT) { + return null; + } + } + + pos = lineSize * (height - 1); + j0 = i * width1; + + if (data[pos] !== 0) { + points[j0] = 8; + ++count; + } + + for (j = 1; j < width; j++) { + if (data[pos] !== data[pos + 1]) { + points[j0 + j] = data[pos] ? 4 : 8; + ++count; + } + + pos++; + } + + if (data[pos] !== 0) { + points[j0 + j] = 4; + ++count; + } + + if (count > POINT_TO_PROCESS_LIMIT) { + return null; + } + + var steps = new Int32Array([0, width1, -1, 0, -width1, 0, 0, 0, 1]); + var outlines = []; + + for (i = 0; count && i <= height; i++) { + var p = i * width1; + var end = p + width; + + while (p < end && !points[p]) { + p++; + } + + if (p === end) { + continue; + } + + var coords = [p % width1, i]; + var p0 = p; + var type = points[p]; + + do { + var step = steps[type]; + + do { + p += step; + } while (!points[p]); + + var pp = points[p]; + + if (pp !== 5 && pp !== 10) { + type = pp; + points[p] = 0; + } else { + type = pp & 0x33 * type >> 4; + points[p] &= type >> 2 | type << 2; + } + + coords.push(p % width1, p / width1 | 0); + + if (!points[p]) { + --count; + } + } while (p0 !== p); + + outlines.push(coords); + --i; + } + + var drawOutline = function drawOutline(c) { + c.save(); + c.scale(1 / width, -1 / height); + c.translate(0, -height); + c.beginPath(); + + for (var k = 0, kk = outlines.length; k < kk; k++) { + var o = outlines[k]; + c.moveTo(o[0], o[1]); + + for (var l = 2, ll = o.length; l < ll; l += 2) { + c.lineTo(o[l], o[l + 1]); + } + } + + c.fill(); + c.beginPath(); + c.restore(); + }; + + return drawOutline; +} + +var CanvasExtraState = /*#__PURE__*/function () { + function CanvasExtraState() { + _classCallCheck(this, CanvasExtraState); + + this.alphaIsShape = false; + this.fontSize = 0; + this.fontSizeScale = 1; + this.textMatrix = _util.IDENTITY_MATRIX; + this.textMatrixScale = 1; + this.fontMatrix = _util.FONT_IDENTITY_MATRIX; + this.leading = 0; + this.x = 0; + this.y = 0; + this.lineX = 0; + this.lineY = 0; + this.charSpacing = 0; + this.wordSpacing = 0; + this.textHScale = 1; + this.textRenderingMode = _util.TextRenderingMode.FILL; + this.textRise = 0; + this.fillColor = "#000000"; + this.strokeColor = "#000000"; + this.patternFill = false; + this.fillAlpha = 1; + this.strokeAlpha = 1; + this.lineWidth = 1; + this.activeSMask = null; + this.resumeSMaskCtx = null; + this.transferMaps = null; + } + + _createClass(CanvasExtraState, [{ + key: "clone", + value: function clone() { + return Object.create(this); + } + }, { + key: "setCurrentPoint", + value: function setCurrentPoint(x, y) { + this.x = x; + this.y = y; + } + }]); + + return CanvasExtraState; +}(); + +var CanvasGraphics = function CanvasGraphicsClosure() { + var EXECUTION_TIME = 15; + var EXECUTION_STEPS = 10; + + function putBinaryImageData(ctx, imgData) { + var transferMaps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + + if (typeof ImageData !== "undefined" && imgData instanceof ImageData) { + ctx.putImageData(imgData, 0, 0); + return; + } + + var height = imgData.height, + width = imgData.width; + var partialChunkHeight = height % FULL_CHUNK_HEIGHT; + var fullChunks = (height - partialChunkHeight) / FULL_CHUNK_HEIGHT; + var totalChunks = partialChunkHeight === 0 ? fullChunks : fullChunks + 1; + var chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT); + var srcPos = 0, + destPos; + var src = imgData.data; + var dest = chunkImgData.data; + var i, j, thisChunkHeight, elemsInThisChunk; + var transferMapRed, transferMapGreen, transferMapBlue, transferMapGray; + + if (transferMaps) { + switch (transferMaps.length) { + case 1: + transferMapRed = transferMaps[0]; + transferMapGreen = transferMaps[0]; + transferMapBlue = transferMaps[0]; + transferMapGray = transferMaps[0]; + break; + + case 4: + transferMapRed = transferMaps[0]; + transferMapGreen = transferMaps[1]; + transferMapBlue = transferMaps[2]; + transferMapGray = transferMaps[3]; + break; + } + } + + if (imgData.kind === _util.ImageKind.GRAYSCALE_1BPP) { + var srcLength = src.byteLength; + var dest32 = new Uint32Array(dest.buffer, 0, dest.byteLength >> 2); + var dest32DataLength = dest32.length; + var fullSrcDiff = width + 7 >> 3; + var white = 0xffffffff; + var black = _util.IsLittleEndianCached.value ? 0xff000000 : 0x000000ff; + + if (transferMapGray) { + if (transferMapGray[0] === 0xff && transferMapGray[0xff] === 0) { + var _ref = [black, white]; + white = _ref[0]; + black = _ref[1]; + } + } + + for (i = 0; i < totalChunks; i++) { + thisChunkHeight = i < fullChunks ? FULL_CHUNK_HEIGHT : partialChunkHeight; + destPos = 0; + + for (j = 0; j < thisChunkHeight; j++) { + var srcDiff = srcLength - srcPos; + var k = 0; + var kEnd = srcDiff > fullSrcDiff ? width : srcDiff * 8 - 7; + var kEndUnrolled = kEnd & ~7; + var mask = 0; + var srcByte = 0; + + for (; k < kEndUnrolled; k += 8) { + srcByte = src[srcPos++]; + dest32[destPos++] = srcByte & 128 ? white : black; + dest32[destPos++] = srcByte & 64 ? white : black; + dest32[destPos++] = srcByte & 32 ? white : black; + dest32[destPos++] = srcByte & 16 ? white : black; + dest32[destPos++] = srcByte & 8 ? white : black; + dest32[destPos++] = srcByte & 4 ? white : black; + dest32[destPos++] = srcByte & 2 ? white : black; + dest32[destPos++] = srcByte & 1 ? white : black; + } + + for (; k < kEnd; k++) { + if (mask === 0) { + srcByte = src[srcPos++]; + mask = 128; + } + + dest32[destPos++] = srcByte & mask ? white : black; + mask >>= 1; + } + } + + while (destPos < dest32DataLength) { + dest32[destPos++] = 0; + } + + ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT); + } + } else if (imgData.kind === _util.ImageKind.RGBA_32BPP) { + var hasTransferMaps = !!(transferMapRed || transferMapGreen || transferMapBlue); + j = 0; + elemsInThisChunk = width * FULL_CHUNK_HEIGHT * 4; + + for (i = 0; i < fullChunks; i++) { + dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk)); + srcPos += elemsInThisChunk; + + if (hasTransferMaps) { + for (var _k = 0; _k < elemsInThisChunk; _k += 4) { + if (transferMapRed) { + dest[_k + 0] = transferMapRed[dest[_k + 0]]; + } + + if (transferMapGreen) { + dest[_k + 1] = transferMapGreen[dest[_k + 1]]; + } + + if (transferMapBlue) { + dest[_k + 2] = transferMapBlue[dest[_k + 2]]; + } + } + } + + ctx.putImageData(chunkImgData, 0, j); + j += FULL_CHUNK_HEIGHT; + } + + if (i < totalChunks) { + elemsInThisChunk = width * partialChunkHeight * 4; + dest.set(src.subarray(srcPos, srcPos + elemsInThisChunk)); + + if (hasTransferMaps) { + for (var _k2 = 0; _k2 < elemsInThisChunk; _k2 += 4) { + if (transferMapRed) { + dest[_k2 + 0] = transferMapRed[dest[_k2 + 0]]; + } + + if (transferMapGreen) { + dest[_k2 + 1] = transferMapGreen[dest[_k2 + 1]]; + } + + if (transferMapBlue) { + dest[_k2 + 2] = transferMapBlue[dest[_k2 + 2]]; + } + } + } + + ctx.putImageData(chunkImgData, 0, j); + } + } else if (imgData.kind === _util.ImageKind.RGB_24BPP) { + var _hasTransferMaps = !!(transferMapRed || transferMapGreen || transferMapBlue); + + thisChunkHeight = FULL_CHUNK_HEIGHT; + elemsInThisChunk = width * thisChunkHeight; + + for (i = 0; i < totalChunks; i++) { + if (i >= fullChunks) { + thisChunkHeight = partialChunkHeight; + elemsInThisChunk = width * thisChunkHeight; + } + + destPos = 0; + + for (j = elemsInThisChunk; j--;) { + dest[destPos++] = src[srcPos++]; + dest[destPos++] = src[srcPos++]; + dest[destPos++] = src[srcPos++]; + dest[destPos++] = 255; + } + + if (_hasTransferMaps) { + for (var _k3 = 0; _k3 < destPos; _k3 += 4) { + if (transferMapRed) { + dest[_k3 + 0] = transferMapRed[dest[_k3 + 0]]; + } + + if (transferMapGreen) { + dest[_k3 + 1] = transferMapGreen[dest[_k3 + 1]]; + } + + if (transferMapBlue) { + dest[_k3 + 2] = transferMapBlue[dest[_k3 + 2]]; + } + } + } + + ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT); + } + } else { + throw new Error("bad image kind: ".concat(imgData.kind)); + } + } + + function putBinaryImageMask(ctx, imgData) { + var height = imgData.height, + width = imgData.width; + var partialChunkHeight = height % FULL_CHUNK_HEIGHT; + var fullChunks = (height - partialChunkHeight) / FULL_CHUNK_HEIGHT; + var totalChunks = partialChunkHeight === 0 ? fullChunks : fullChunks + 1; + var chunkImgData = ctx.createImageData(width, FULL_CHUNK_HEIGHT); + var srcPos = 0; + var src = imgData.data; + var dest = chunkImgData.data; + + for (var i = 0; i < totalChunks; i++) { + var thisChunkHeight = i < fullChunks ? FULL_CHUNK_HEIGHT : partialChunkHeight; + var destPos = 3; + + for (var j = 0; j < thisChunkHeight; j++) { + var elem = void 0, + mask = 0; + + for (var k = 0; k < width; k++) { + if (!mask) { + elem = src[srcPos++]; + mask = 128; + } + + dest[destPos] = elem & mask ? 0 : 255; + destPos += 4; + mask >>= 1; + } + } + + ctx.putImageData(chunkImgData, 0, i * FULL_CHUNK_HEIGHT); + } + } + + function copyCtxState(sourceCtx, destCtx) { + var properties = ["strokeStyle", "fillStyle", "fillRule", "globalAlpha", "lineWidth", "lineCap", "lineJoin", "miterLimit", "globalCompositeOperation", "font"]; + + for (var i = 0, ii = properties.length; i < ii; i++) { + var property = properties[i]; + + if (sourceCtx[property] !== undefined) { + destCtx[property] = sourceCtx[property]; + } + } + + if (sourceCtx.setLineDash !== undefined) { + destCtx.setLineDash(sourceCtx.getLineDash()); + destCtx.lineDashOffset = sourceCtx.lineDashOffset; + } + } + + function resetCtxToDefault(ctx) { + ctx.strokeStyle = "#000000"; + ctx.fillStyle = "#000000"; + ctx.fillRule = "nonzero"; + ctx.globalAlpha = 1; + ctx.lineWidth = 1; + ctx.lineCap = "butt"; + ctx.lineJoin = "miter"; + ctx.miterLimit = 10; + ctx.globalCompositeOperation = "source-over"; + ctx.font = "10px sans-serif"; + + if (ctx.setLineDash !== undefined) { + ctx.setLineDash([]); + ctx.lineDashOffset = 0; + } + } + + function composeSMaskBackdrop(bytes, r0, g0, b0) { + var length = bytes.length; + + for (var i = 3; i < length; i += 4) { + var alpha = bytes[i]; + + if (alpha === 0) { + bytes[i - 3] = r0; + bytes[i - 2] = g0; + bytes[i - 1] = b0; + } else if (alpha < 255) { + var alpha_ = 255 - alpha; + bytes[i - 3] = bytes[i - 3] * alpha + r0 * alpha_ >> 8; + bytes[i - 2] = bytes[i - 2] * alpha + g0 * alpha_ >> 8; + bytes[i - 1] = bytes[i - 1] * alpha + b0 * alpha_ >> 8; + } + } + } + + function composeSMaskAlpha(maskData, layerData, transferMap) { + var length = maskData.length; + var scale = 1 / 255; + + for (var i = 3; i < length; i += 4) { + var alpha = transferMap ? transferMap[maskData[i]] : maskData[i]; + layerData[i] = layerData[i] * alpha * scale | 0; + } + } + + function composeSMaskLuminosity(maskData, layerData, transferMap) { + var length = maskData.length; + + for (var i = 3; i < length; i += 4) { + var y = maskData[i - 3] * 77 + maskData[i - 2] * 152 + maskData[i - 1] * 28; + layerData[i] = transferMap ? layerData[i] * transferMap[y >> 8] >> 8 : layerData[i] * y >> 16; + } + } + + function genericComposeSMask(maskCtx, layerCtx, width, height, subtype, backdrop, transferMap) { + var hasBackdrop = !!backdrop; + var r0 = hasBackdrop ? backdrop[0] : 0; + var g0 = hasBackdrop ? backdrop[1] : 0; + var b0 = hasBackdrop ? backdrop[2] : 0; + var composeFn; + + if (subtype === "Luminosity") { + composeFn = composeSMaskLuminosity; + } else { + composeFn = composeSMaskAlpha; + } + + var PIXELS_TO_PROCESS = 1048576; + var chunkSize = Math.min(height, Math.ceil(PIXELS_TO_PROCESS / width)); + + for (var row = 0; row < height; row += chunkSize) { + var chunkHeight = Math.min(chunkSize, height - row); + var maskData = maskCtx.getImageData(0, row, width, chunkHeight); + var layerData = layerCtx.getImageData(0, row, width, chunkHeight); + + if (hasBackdrop) { + composeSMaskBackdrop(maskData.data, r0, g0, b0); + } + + composeFn(maskData.data, layerData.data, transferMap); + maskCtx.putImageData(layerData, 0, row); + } + } + + function composeSMask(ctx, smask, layerCtx) { + var mask = smask.canvas; + var maskCtx = smask.context; + ctx.setTransform(smask.scaleX, 0, 0, smask.scaleY, smask.offsetX, smask.offsetY); + genericComposeSMask(maskCtx, layerCtx, mask.width, mask.height, smask.subtype, smask.backdrop, smask.transferMap); + ctx.drawImage(mask, 0, 0); + } + + var LINE_CAP_STYLES = ["butt", "round", "square"]; + var LINE_JOIN_STYLES = ["miter", "round", "bevel"]; + var NORMAL_CLIP = {}; + var EO_CLIP = {}; + + var CanvasGraphics = /*#__PURE__*/function () { + function CanvasGraphics(canvasCtx, commonObjs, objs, canvasFactory, imageLayer, optionalContentConfig) { + _classCallCheck(this, CanvasGraphics); + + this.ctx = canvasCtx; + this.current = new CanvasExtraState(); + this.stateStack = []; + this.pendingClip = null; + this.pendingEOFill = false; + this.res = null; + this.xobjs = null; + this.commonObjs = commonObjs; + this.objs = objs; + this.canvasFactory = canvasFactory; + this.imageLayer = imageLayer; + this.groupStack = []; + this.processingType3 = null; + this.baseTransform = null; + this.baseTransformStack = []; + this.groupLevel = 0; + this.smaskStack = []; + this.smaskCounter = 0; + this.tempSMask = null; + this.contentVisible = true; + this.markedContentStack = []; + this.optionalContentConfig = optionalContentConfig; + this.cachedCanvases = new CachedCanvases(this.canvasFactory); + this.cachedPatterns = new Map(); + + if (canvasCtx) { + addContextCurrentTransform(canvasCtx); + } + + this._cachedGetSinglePixelWidth = null; + } + + _createClass(CanvasGraphics, [{ + key: "beginDrawing", + value: function beginDrawing(_ref2) { + var transform = _ref2.transform, + viewport = _ref2.viewport, + _ref2$transparency = _ref2.transparency, + transparency = _ref2$transparency === void 0 ? false : _ref2$transparency, + _ref2$background = _ref2.background, + background = _ref2$background === void 0 ? null : _ref2$background; + var width = this.ctx.canvas.width; + var height = this.ctx.canvas.height; + this.ctx.save(); + this.ctx.fillStyle = background || "rgb(255, 255, 255)"; + this.ctx.fillRect(0, 0, width, height); + this.ctx.restore(); + + if (transparency) { + var transparentCanvas = this.cachedCanvases.getCanvas("transparent", width, height, true); + this.compositeCtx = this.ctx; + this.transparentCanvas = transparentCanvas.canvas; + this.ctx = transparentCanvas.context; + this.ctx.save(); + this.ctx.transform.apply(this.ctx, this.compositeCtx.mozCurrentTransform); + } + + this.ctx.save(); + resetCtxToDefault(this.ctx); + + if (transform) { + this.ctx.transform.apply(this.ctx, transform); + } + + this.ctx.transform.apply(this.ctx, viewport.transform); + this.baseTransform = this.ctx.mozCurrentTransform.slice(); + this._combinedScaleFactor = Math.hypot(this.baseTransform[0], this.baseTransform[2]); + + if (this.imageLayer) { + this.imageLayer.beginLayout(); + } + } + }, { + key: "executeOperatorList", + value: function executeOperatorList(operatorList, executionStartIdx, continueCallback, stepper) { + var argsArray = operatorList.argsArray; + var fnArray = operatorList.fnArray; + var i = executionStartIdx || 0; + var argsArrayLen = argsArray.length; + + if (argsArrayLen === i) { + return i; + } + + var chunkOperations = argsArrayLen - i > EXECUTION_STEPS && typeof continueCallback === "function"; + var endTime = chunkOperations ? Date.now() + EXECUTION_TIME : 0; + var steps = 0; + var commonObjs = this.commonObjs; + var objs = this.objs; + var fnId; + + while (true) { + if (stepper !== undefined && i === stepper.nextBreakPoint) { + stepper.breakIt(i, continueCallback); + return i; + } + + fnId = fnArray[i]; + + if (fnId !== _util.OPS.dependency) { + this[fnId].apply(this, argsArray[i]); + } else { + var _iterator = _createForOfIteratorHelper(argsArray[i]), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var depObjId = _step.value; + var objsPool = depObjId.startsWith("g_") ? commonObjs : objs; + + if (!objsPool.has(depObjId)) { + objsPool.get(depObjId, continueCallback); + return i; + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } + + i++; + + if (i === argsArrayLen) { + return i; + } + + if (chunkOperations && ++steps > EXECUTION_STEPS) { + if (Date.now() > endTime) { + continueCallback(); + return i; + } + + steps = 0; + } + } + } + }, { + key: "endDrawing", + value: function endDrawing() { + while (this.stateStack.length || this.current.activeSMask !== null) { + this.restore(); + } + + this.ctx.restore(); + + if (this.transparentCanvas) { + this.ctx = this.compositeCtx; + this.ctx.save(); + this.ctx.setTransform(1, 0, 0, 1, 0, 0); + this.ctx.drawImage(this.transparentCanvas, 0, 0); + this.ctx.restore(); + this.transparentCanvas = null; + } + + this.cachedCanvases.clear(); + this.cachedPatterns.clear(); + + if (this.imageLayer) { + this.imageLayer.endLayout(); + } + } + }, { + key: "_scaleImage", + value: function _scaleImage(img, inverseTransform) { + var width = img.width; + var height = img.height; + var widthScale = Math.max(Math.hypot(inverseTransform[0], inverseTransform[1]), 1); + var heightScale = Math.max(Math.hypot(inverseTransform[2], inverseTransform[3]), 1); + var paintWidth = width, + paintHeight = height; + var tmpCanvasId = "prescale1"; + var tmpCanvas, tmpCtx; + + while (widthScale > 2 && paintWidth > 1 || heightScale > 2 && paintHeight > 1) { + var newWidth = paintWidth, + newHeight = paintHeight; + + if (widthScale > 2 && paintWidth > 1) { + newWidth = Math.ceil(paintWidth / 2); + widthScale /= paintWidth / newWidth; + } + + if (heightScale > 2 && paintHeight > 1) { + newHeight = Math.ceil(paintHeight / 2); + heightScale /= paintHeight / newHeight; + } + + tmpCanvas = this.cachedCanvases.getCanvas(tmpCanvasId, newWidth, newHeight); + tmpCtx = tmpCanvas.context; + tmpCtx.clearRect(0, 0, newWidth, newHeight); + tmpCtx.drawImage(img, 0, 0, paintWidth, paintHeight, 0, 0, newWidth, newHeight); + img = tmpCanvas.canvas; + paintWidth = newWidth; + paintHeight = newHeight; + tmpCanvasId = tmpCanvasId === "prescale1" ? "prescale2" : "prescale1"; + } + + return { + img: img, + paintWidth: paintWidth, + paintHeight: paintHeight + }; + } + }, { + key: "_createMaskCanvas", + value: function _createMaskCanvas(img) { + var ctx = this.ctx; + var width = img.width, + height = img.height; + var fillColor = this.current.fillColor; + var isPatternFill = this.current.patternFill; + var maskCanvas = this.cachedCanvases.getCanvas("maskCanvas", width, height); + var maskCtx = maskCanvas.context; + putBinaryImageMask(maskCtx, img); + var objToCanvas = ctx.mozCurrentTransform; + + var maskToCanvas = _util.Util.transform(objToCanvas, [1 / width, 0, 0, -1 / height, 0, 0]); + + maskToCanvas = _util.Util.transform(maskToCanvas, [1, 0, 0, 1, 0, -height]); + + var cord1 = _util.Util.applyTransform([0, 0], maskToCanvas); + + var cord2 = _util.Util.applyTransform([width, height], maskToCanvas); + + var rect = _util.Util.normalizeRect([cord1[0], cord1[1], cord2[0], cord2[1]]); + + var drawnWidth = Math.ceil(rect[2] - rect[0]); + var drawnHeight = Math.ceil(rect[3] - rect[1]); + var fillCanvas = this.cachedCanvases.getCanvas("fillCanvas", drawnWidth, drawnHeight, true); + var fillCtx = fillCanvas.context; + var offsetX = Math.min(cord1[0], cord2[0]); + var offsetY = Math.min(cord1[1], cord2[1]); + fillCtx.translate(-offsetX, -offsetY); + fillCtx.transform.apply(fillCtx, maskToCanvas); + + var scaled = this._scaleImage(maskCanvas.canvas, fillCtx.mozCurrentTransformInverse); + + fillCtx.drawImage(scaled.img, 0, 0, scaled.img.width, scaled.img.height, 0, 0, width, height); + fillCtx.globalCompositeOperation = "source-in"; + + var inverse = _util.Util.transform(fillCtx.mozCurrentTransformInverse, [1, 0, 0, 1, -offsetX, -offsetY]); + + fillCtx.fillStyle = isPatternFill ? fillColor.getPattern(ctx, this, inverse, false) : fillColor; + fillCtx.fillRect(0, 0, width, height); + return { + canvas: fillCanvas.canvas, + offsetX: Math.round(offsetX), + offsetY: Math.round(offsetY) + }; + } + }, { + key: "setLineWidth", + value: function setLineWidth(width) { + this.current.lineWidth = width; + this.ctx.lineWidth = width; + } + }, { + key: "setLineCap", + value: function setLineCap(style) { + this.ctx.lineCap = LINE_CAP_STYLES[style]; + } + }, { + key: "setLineJoin", + value: function setLineJoin(style) { + this.ctx.lineJoin = LINE_JOIN_STYLES[style]; + } + }, { + key: "setMiterLimit", + value: function setMiterLimit(limit) { + this.ctx.miterLimit = limit; + } + }, { + key: "setDash", + value: function setDash(dashArray, dashPhase) { + var ctx = this.ctx; + + if (ctx.setLineDash !== undefined) { + ctx.setLineDash(dashArray); + ctx.lineDashOffset = dashPhase; + } + } + }, { + key: "setRenderingIntent", + value: function setRenderingIntent(intent) {} + }, { + key: "setFlatness", + value: function setFlatness(flatness) {} + }, { + key: "setGState", + value: function setGState(states) { + for (var i = 0, ii = states.length; i < ii; i++) { + var state = states[i]; + var key = state[0]; + var value = state[1]; + + switch (key) { + case "LW": + this.setLineWidth(value); + break; + + case "LC": + this.setLineCap(value); + break; + + case "LJ": + this.setLineJoin(value); + break; + + case "ML": + this.setMiterLimit(value); + break; + + case "D": + this.setDash(value[0], value[1]); + break; + + case "RI": + this.setRenderingIntent(value); + break; + + case "FL": + this.setFlatness(value); + break; + + case "Font": + this.setFont(value[0], value[1]); + break; + + case "CA": + this.current.strokeAlpha = state[1]; + break; + + case "ca": + this.current.fillAlpha = state[1]; + this.ctx.globalAlpha = state[1]; + break; + + case "BM": + this.ctx.globalCompositeOperation = value; + break; + + case "SMask": + if (this.current.activeSMask) { + if (this.stateStack.length > 0 && this.stateStack[this.stateStack.length - 1].activeSMask === this.current.activeSMask) { + this.suspendSMaskGroup(); + } else { + this.endSMaskGroup(); + } + } + + this.current.activeSMask = value ? this.tempSMask : null; + + if (this.current.activeSMask) { + this.beginSMaskGroup(); + } + + this.tempSMask = null; + break; + + case "TR": + this.current.transferMaps = value; + } + } + } + }, { + key: "beginSMaskGroup", + value: function beginSMaskGroup() { + var activeSMask = this.current.activeSMask; + var drawnWidth = activeSMask.canvas.width; + var drawnHeight = activeSMask.canvas.height; + var cacheId = "smaskGroupAt" + this.groupLevel; + var scratchCanvas = this.cachedCanvases.getCanvas(cacheId, drawnWidth, drawnHeight, true); + var currentCtx = this.ctx; + var currentTransform = currentCtx.mozCurrentTransform; + this.ctx.save(); + var groupCtx = scratchCanvas.context; + groupCtx.scale(1 / activeSMask.scaleX, 1 / activeSMask.scaleY); + groupCtx.translate(-activeSMask.offsetX, -activeSMask.offsetY); + groupCtx.transform.apply(groupCtx, currentTransform); + activeSMask.startTransformInverse = groupCtx.mozCurrentTransformInverse; + copyCtxState(currentCtx, groupCtx); + this.ctx = groupCtx; + this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]); + this.groupStack.push(currentCtx); + this.groupLevel++; + } + }, { + key: "suspendSMaskGroup", + value: function suspendSMaskGroup() { + var groupCtx = this.ctx; + this.groupLevel--; + this.ctx = this.groupStack.pop(); + composeSMask(this.ctx, this.current.activeSMask, groupCtx); + this.ctx.restore(); + this.ctx.save(); + copyCtxState(groupCtx, this.ctx); + this.current.resumeSMaskCtx = groupCtx; + + var deltaTransform = _util.Util.transform(this.current.activeSMask.startTransformInverse, groupCtx.mozCurrentTransform); + + this.ctx.transform.apply(this.ctx, deltaTransform); + groupCtx.save(); + groupCtx.setTransform(1, 0, 0, 1, 0, 0); + groupCtx.clearRect(0, 0, groupCtx.canvas.width, groupCtx.canvas.height); + groupCtx.restore(); + } + }, { + key: "resumeSMaskGroup", + value: function resumeSMaskGroup() { + var groupCtx = this.current.resumeSMaskCtx; + var currentCtx = this.ctx; + this.ctx = groupCtx; + this.groupStack.push(currentCtx); + this.groupLevel++; + } + }, { + key: "endSMaskGroup", + value: function endSMaskGroup() { + var groupCtx = this.ctx; + this.groupLevel--; + this.ctx = this.groupStack.pop(); + composeSMask(this.ctx, this.current.activeSMask, groupCtx); + this.ctx.restore(); + copyCtxState(groupCtx, this.ctx); + + var deltaTransform = _util.Util.transform(this.current.activeSMask.startTransformInverse, groupCtx.mozCurrentTransform); + + this.ctx.transform.apply(this.ctx, deltaTransform); + } + }, { + key: "save", + value: function save() { + this.ctx.save(); + var old = this.current; + this.stateStack.push(old); + this.current = old.clone(); + this.current.resumeSMaskCtx = null; + } + }, { + key: "restore", + value: function restore() { + if (this.current.resumeSMaskCtx) { + this.resumeSMaskGroup(); + } + + if (this.current.activeSMask !== null && (this.stateStack.length === 0 || this.stateStack[this.stateStack.length - 1].activeSMask !== this.current.activeSMask)) { + this.endSMaskGroup(); + } + + if (this.stateStack.length !== 0) { + this.current = this.stateStack.pop(); + this.ctx.restore(); + this.pendingClip = null; + this._cachedGetSinglePixelWidth = null; + } else { + this.current.activeSMask = null; + } + } + }, { + key: "transform", + value: function transform(a, b, c, d, e, f) { + this.ctx.transform(a, b, c, d, e, f); + this._cachedGetSinglePixelWidth = null; + } + }, { + key: "constructPath", + value: function constructPath(ops, args) { + var ctx = this.ctx; + var current = this.current; + var x = current.x, + y = current.y; + + for (var i = 0, j = 0, ii = ops.length; i < ii; i++) { + switch (ops[i] | 0) { + case _util.OPS.rectangle: + x = args[j++]; + y = args[j++]; + var width = args[j++]; + var height = args[j++]; + var xw = x + width; + var yh = y + height; + ctx.moveTo(x, y); + + if (width === 0 || height === 0) { + ctx.lineTo(xw, yh); + } else { + ctx.lineTo(xw, y); + ctx.lineTo(xw, yh); + ctx.lineTo(x, yh); + } + + ctx.closePath(); + break; + + case _util.OPS.moveTo: + x = args[j++]; + y = args[j++]; + ctx.moveTo(x, y); + break; + + case _util.OPS.lineTo: + x = args[j++]; + y = args[j++]; + ctx.lineTo(x, y); + break; + + case _util.OPS.curveTo: + x = args[j + 4]; + y = args[j + 5]; + ctx.bezierCurveTo(args[j], args[j + 1], args[j + 2], args[j + 3], x, y); + j += 6; + break; + + case _util.OPS.curveTo2: + ctx.bezierCurveTo(x, y, args[j], args[j + 1], args[j + 2], args[j + 3]); + x = args[j + 2]; + y = args[j + 3]; + j += 4; + break; + + case _util.OPS.curveTo3: + x = args[j + 2]; + y = args[j + 3]; + ctx.bezierCurveTo(args[j], args[j + 1], x, y, x, y); + j += 4; + break; + + case _util.OPS.closePath: + ctx.closePath(); + break; + } + } + + current.setCurrentPoint(x, y); + } + }, { + key: "closePath", + value: function closePath() { + this.ctx.closePath(); + } + }, { + key: "stroke", + value: function stroke(consumePath) { + consumePath = typeof consumePath !== "undefined" ? consumePath : true; + var ctx = this.ctx; + var strokeColor = this.current.strokeColor; + ctx.globalAlpha = this.current.strokeAlpha; + + if (this.contentVisible) { + if (_typeof(strokeColor) === "object" && strokeColor !== null && strokeColor !== void 0 && strokeColor.getPattern) { + var lineWidth = this.getSinglePixelWidth(); + ctx.save(); + ctx.strokeStyle = strokeColor.getPattern(ctx, this, ctx.mozCurrentTransformInverse); + ctx.lineWidth = Math.max(lineWidth, this.current.lineWidth); + ctx.stroke(); + ctx.restore(); + } else { + var _lineWidth = this.getSinglePixelWidth(); + + if (_lineWidth < 0 && -_lineWidth >= this.current.lineWidth) { + ctx.save(); + ctx.resetTransform(); + ctx.lineWidth = Math.round(this._combinedScaleFactor); + ctx.stroke(); + ctx.restore(); + } else { + ctx.lineWidth = Math.max(_lineWidth, this.current.lineWidth); + ctx.stroke(); + } + } + } + + if (consumePath) { + this.consumePath(); + } + + ctx.globalAlpha = this.current.fillAlpha; + } + }, { + key: "closeStroke", + value: function closeStroke() { + this.closePath(); + this.stroke(); + } + }, { + key: "fill", + value: function fill(consumePath) { + consumePath = typeof consumePath !== "undefined" ? consumePath : true; + var ctx = this.ctx; + var fillColor = this.current.fillColor; + var isPatternFill = this.current.patternFill; + var needRestore = false; + + if (isPatternFill) { + ctx.save(); + ctx.fillStyle = fillColor.getPattern(ctx, this, ctx.mozCurrentTransformInverse); + needRestore = true; + } + + if (this.contentVisible) { + if (this.pendingEOFill) { + ctx.fill("evenodd"); + this.pendingEOFill = false; + } else { + ctx.fill(); + } + } + + if (needRestore) { + ctx.restore(); + } + + if (consumePath) { + this.consumePath(); + } + } + }, { + key: "eoFill", + value: function eoFill() { + this.pendingEOFill = true; + this.fill(); + } + }, { + key: "fillStroke", + value: function fillStroke() { + this.fill(false); + this.stroke(false); + this.consumePath(); + } + }, { + key: "eoFillStroke", + value: function eoFillStroke() { + this.pendingEOFill = true; + this.fillStroke(); + } + }, { + key: "closeFillStroke", + value: function closeFillStroke() { + this.closePath(); + this.fillStroke(); + } + }, { + key: "closeEOFillStroke", + value: function closeEOFillStroke() { + this.pendingEOFill = true; + this.closePath(); + this.fillStroke(); + } + }, { + key: "endPath", + value: function endPath() { + this.consumePath(); + } + }, { + key: "clip", + value: function clip() { + this.pendingClip = NORMAL_CLIP; + } + }, { + key: "eoClip", + value: function eoClip() { + this.pendingClip = EO_CLIP; + } + }, { + key: "beginText", + value: function beginText() { + this.current.textMatrix = _util.IDENTITY_MATRIX; + this.current.textMatrixScale = 1; + this.current.x = this.current.lineX = 0; + this.current.y = this.current.lineY = 0; + } + }, { + key: "endText", + value: function endText() { + var paths = this.pendingTextPaths; + var ctx = this.ctx; + + if (paths === undefined) { + ctx.beginPath(); + return; + } + + ctx.save(); + ctx.beginPath(); + + for (var i = 0; i < paths.length; i++) { + var path = paths[i]; + ctx.setTransform.apply(ctx, path.transform); + ctx.translate(path.x, path.y); + path.addToPath(ctx, path.fontSize); + } + + ctx.restore(); + ctx.clip(); + ctx.beginPath(); + delete this.pendingTextPaths; + } + }, { + key: "setCharSpacing", + value: function setCharSpacing(spacing) { + this.current.charSpacing = spacing; + } + }, { + key: "setWordSpacing", + value: function setWordSpacing(spacing) { + this.current.wordSpacing = spacing; + } + }, { + key: "setHScale", + value: function setHScale(scale) { + this.current.textHScale = scale / 100; + } + }, { + key: "setLeading", + value: function setLeading(leading) { + this.current.leading = -leading; + } + }, { + key: "setFont", + value: function setFont(fontRefName, size) { + var fontObj = this.commonObjs.get(fontRefName); + var current = this.current; + + if (!fontObj) { + throw new Error("Can't find font for ".concat(fontRefName)); + } + + current.fontMatrix = fontObj.fontMatrix || _util.FONT_IDENTITY_MATRIX; + + if (current.fontMatrix[0] === 0 || current.fontMatrix[3] === 0) { + (0, _util.warn)("Invalid font matrix for font " + fontRefName); + } + + if (size < 0) { + size = -size; + current.fontDirection = -1; + } else { + current.fontDirection = 1; + } + + this.current.font = fontObj; + this.current.fontSize = size; + + if (fontObj.isType3Font) { + return; + } + + var name = fontObj.loadedName || "sans-serif"; + var bold = "normal"; + + if (fontObj.black) { + bold = "900"; + } else if (fontObj.bold) { + bold = "bold"; + } + + var italic = fontObj.italic ? "italic" : "normal"; + var typeface = "\"".concat(name, "\", ").concat(fontObj.fallbackName); + var browserFontSize = size; + + if (size < MIN_FONT_SIZE) { + browserFontSize = MIN_FONT_SIZE; + } else if (size > MAX_FONT_SIZE) { + browserFontSize = MAX_FONT_SIZE; + } + + this.current.fontSizeScale = size / browserFontSize; + this.ctx.font = "".concat(italic, " ").concat(bold, " ").concat(browserFontSize, "px ").concat(typeface); + } + }, { + key: "setTextRenderingMode", + value: function setTextRenderingMode(mode) { + this.current.textRenderingMode = mode; + } + }, { + key: "setTextRise", + value: function setTextRise(rise) { + this.current.textRise = rise; + } + }, { + key: "moveText", + value: function moveText(x, y) { + this.current.x = this.current.lineX += x; + this.current.y = this.current.lineY += y; + } + }, { + key: "setLeadingMoveText", + value: function setLeadingMoveText(x, y) { + this.setLeading(-y); + this.moveText(x, y); + } + }, { + key: "setTextMatrix", + value: function setTextMatrix(a, b, c, d, e, f) { + this.current.textMatrix = [a, b, c, d, e, f]; + this.current.textMatrixScale = Math.hypot(a, b); + this.current.x = this.current.lineX = 0; + this.current.y = this.current.lineY = 0; + } + }, { + key: "nextLine", + value: function nextLine() { + this.moveText(0, this.current.leading); + } + }, { + key: "paintChar", + value: function paintChar(character, x, y, patternTransform, resetLineWidthToOne) { + var ctx = this.ctx; + var current = this.current; + var font = current.font; + var textRenderingMode = current.textRenderingMode; + var fontSize = current.fontSize / current.fontSizeScale; + var fillStrokeMode = textRenderingMode & _util.TextRenderingMode.FILL_STROKE_MASK; + var isAddToPathSet = !!(textRenderingMode & _util.TextRenderingMode.ADD_TO_PATH_FLAG); + var patternFill = current.patternFill && !font.missingFile; + var addToPath; + + if (font.disableFontFace || isAddToPathSet || patternFill) { + addToPath = font.getPathGenerator(this.commonObjs, character); + } + + if (font.disableFontFace || patternFill) { + ctx.save(); + ctx.translate(x, y); + ctx.beginPath(); + addToPath(ctx, fontSize); + + if (patternTransform) { + ctx.setTransform.apply(ctx, patternTransform); + } + + if (fillStrokeMode === _util.TextRenderingMode.FILL || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) { + ctx.fill(); + } + + if (fillStrokeMode === _util.TextRenderingMode.STROKE || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) { + if (resetLineWidthToOne) { + ctx.resetTransform(); + ctx.lineWidth = Math.round(this._combinedScaleFactor); + } + + ctx.stroke(); + } + + ctx.restore(); + } else { + if (fillStrokeMode === _util.TextRenderingMode.FILL || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) { + ctx.fillText(character, x, y); + } + + if (fillStrokeMode === _util.TextRenderingMode.STROKE || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) { + if (resetLineWidthToOne) { + ctx.save(); + ctx.moveTo(x, y); + ctx.resetTransform(); + ctx.lineWidth = Math.round(this._combinedScaleFactor); + ctx.strokeText(character, 0, 0); + ctx.restore(); + } else { + ctx.strokeText(character, x, y); + } + } + } + + if (isAddToPathSet) { + var paths = this.pendingTextPaths || (this.pendingTextPaths = []); + paths.push({ + transform: ctx.mozCurrentTransform, + x: x, + y: y, + fontSize: fontSize, + addToPath: addToPath + }); + } + } + }, { + key: "isFontSubpixelAAEnabled", + get: function get() { + var _this$cachedCanvases$ = this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled", 10, 10), + ctx = _this$cachedCanvases$.context; + + ctx.scale(1.5, 1); + ctx.fillText("I", 0, 10); + var data = ctx.getImageData(0, 0, 10, 10).data; + var enabled = false; + + for (var i = 3; i < data.length; i += 4) { + if (data[i] > 0 && data[i] < 255) { + enabled = true; + break; + } + } + + return (0, _util.shadow)(this, "isFontSubpixelAAEnabled", enabled); + } + }, { + key: "showText", + value: function showText(glyphs) { + var current = this.current; + var font = current.font; + + if (font.isType3Font) { + return this.showType3Text(glyphs); + } + + var fontSize = current.fontSize; + + if (fontSize === 0) { + return undefined; + } + + var ctx = this.ctx; + var fontSizeScale = current.fontSizeScale; + var charSpacing = current.charSpacing; + var wordSpacing = current.wordSpacing; + var fontDirection = current.fontDirection; + var textHScale = current.textHScale * fontDirection; + var glyphsLength = glyphs.length; + var vertical = font.vertical; + var spacingDir = vertical ? 1 : -1; + var defaultVMetrics = font.defaultVMetrics; + var widthAdvanceScale = fontSize * current.fontMatrix[0]; + var simpleFillText = current.textRenderingMode === _util.TextRenderingMode.FILL && !font.disableFontFace && !current.patternFill; + ctx.save(); + var patternTransform; + + if (current.patternFill) { + ctx.save(); + var pattern = current.fillColor.getPattern(ctx, this, ctx.mozCurrentTransformInverse); + patternTransform = ctx.mozCurrentTransform; + ctx.restore(); + ctx.fillStyle = pattern; + } + + ctx.transform.apply(ctx, current.textMatrix); + ctx.translate(current.x, current.y + current.textRise); + + if (fontDirection > 0) { + ctx.scale(textHScale, -1); + } else { + ctx.scale(textHScale, 1); + } + + var lineWidth = current.lineWidth; + var resetLineWidthToOne = false; + var scale = current.textMatrixScale; + + if (scale === 0 || lineWidth === 0) { + var fillStrokeMode = current.textRenderingMode & _util.TextRenderingMode.FILL_STROKE_MASK; + + if (fillStrokeMode === _util.TextRenderingMode.STROKE || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) { + this._cachedGetSinglePixelWidth = null; + lineWidth = this.getSinglePixelWidth(); + resetLineWidthToOne = lineWidth < 0; + } + } else { + lineWidth /= scale; + } + + if (fontSizeScale !== 1.0) { + ctx.scale(fontSizeScale, fontSizeScale); + lineWidth /= fontSizeScale; + } + + ctx.lineWidth = lineWidth; + var x = 0, + i; + + for (i = 0; i < glyphsLength; ++i) { + var glyph = glyphs[i]; + + if ((0, _util.isNum)(glyph)) { + x += spacingDir * glyph * fontSize / 1000; + continue; + } + + var restoreNeeded = false; + var spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing; + var character = glyph.fontChar; + var accent = glyph.accent; + var scaledX = void 0, + scaledY = void 0; + var width = glyph.width; + + if (vertical) { + var vmetric = glyph.vmetric || defaultVMetrics; + var vx = -(glyph.vmetric ? vmetric[1] : width * 0.5) * widthAdvanceScale; + var vy = vmetric[2] * widthAdvanceScale; + width = vmetric ? -vmetric[0] : width; + scaledX = vx / fontSizeScale; + scaledY = (x + vy) / fontSizeScale; + } else { + scaledX = x / fontSizeScale; + scaledY = 0; + } + + if (font.remeasure && width > 0) { + var measuredWidth = ctx.measureText(character).width * 1000 / fontSize * fontSizeScale; + + if (width < measuredWidth && this.isFontSubpixelAAEnabled) { + var characterScaleX = width / measuredWidth; + restoreNeeded = true; + ctx.save(); + ctx.scale(characterScaleX, 1); + scaledX /= characterScaleX; + } else if (width !== measuredWidth) { + scaledX += (width - measuredWidth) / 2000 * fontSize / fontSizeScale; + } + } + + if (this.contentVisible && (glyph.isInFont || font.missingFile)) { + if (simpleFillText && !accent) { + ctx.fillText(character, scaledX, scaledY); + } else { + this.paintChar(character, scaledX, scaledY, patternTransform, resetLineWidthToOne); + + if (accent) { + var scaledAccentX = scaledX + fontSize * accent.offset.x / fontSizeScale; + var scaledAccentY = scaledY - fontSize * accent.offset.y / fontSizeScale; + this.paintChar(accent.fontChar, scaledAccentX, scaledAccentY, patternTransform, resetLineWidthToOne); + } + } + } + + var charWidth = void 0; + + if (vertical) { + charWidth = width * widthAdvanceScale - spacing * fontDirection; + } else { + charWidth = width * widthAdvanceScale + spacing * fontDirection; + } + + x += charWidth; + + if (restoreNeeded) { + ctx.restore(); + } + } + + if (vertical) { + current.y -= x; + } else { + current.x += x * textHScale; + } + + ctx.restore(); + return undefined; + } + }, { + key: "showType3Text", + value: function showType3Text(glyphs) { + var ctx = this.ctx; + var current = this.current; + var font = current.font; + var fontSize = current.fontSize; + var fontDirection = current.fontDirection; + var spacingDir = font.vertical ? 1 : -1; + var charSpacing = current.charSpacing; + var wordSpacing = current.wordSpacing; + var textHScale = current.textHScale * fontDirection; + var fontMatrix = current.fontMatrix || _util.FONT_IDENTITY_MATRIX; + var glyphsLength = glyphs.length; + var isTextInvisible = current.textRenderingMode === _util.TextRenderingMode.INVISIBLE; + var i, glyph, width, spacingLength; + + if (isTextInvisible || fontSize === 0) { + return; + } + + this._cachedGetSinglePixelWidth = null; + ctx.save(); + ctx.transform.apply(ctx, current.textMatrix); + ctx.translate(current.x, current.y); + ctx.scale(textHScale, fontDirection); + + for (i = 0; i < glyphsLength; ++i) { + glyph = glyphs[i]; + + if ((0, _util.isNum)(glyph)) { + spacingLength = spacingDir * glyph * fontSize / 1000; + this.ctx.translate(spacingLength, 0); + current.x += spacingLength * textHScale; + continue; + } + + var spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing; + var operatorList = font.charProcOperatorList[glyph.operatorListId]; + + if (!operatorList) { + (0, _util.warn)("Type3 character \"".concat(glyph.operatorListId, "\" is not available.")); + continue; + } + + if (this.contentVisible) { + this.processingType3 = glyph; + this.save(); + ctx.scale(fontSize, fontSize); + ctx.transform.apply(ctx, fontMatrix); + this.executeOperatorList(operatorList); + this.restore(); + } + + var transformed = _util.Util.applyTransform([glyph.width, 0], fontMatrix); + + width = transformed[0] * fontSize + spacing; + ctx.translate(width, 0); + current.x += width * textHScale; + } + + ctx.restore(); + this.processingType3 = null; + } + }, { + key: "setCharWidth", + value: function setCharWidth(xWidth, yWidth) {} + }, { + key: "setCharWidthAndBounds", + value: function setCharWidthAndBounds(xWidth, yWidth, llx, lly, urx, ury) { + this.ctx.rect(llx, lly, urx - llx, ury - lly); + this.clip(); + this.endPath(); + } + }, { + key: "getColorN_Pattern", + value: function getColorN_Pattern(IR) { + var _this = this; + + var pattern; + + if (IR[0] === "TilingPattern") { + var color = IR[1]; + var baseTransform = this.baseTransform || this.ctx.mozCurrentTransform.slice(); + var canvasGraphicsFactory = { + createCanvasGraphics: function createCanvasGraphics(ctx) { + return new CanvasGraphics(ctx, _this.commonObjs, _this.objs, _this.canvasFactory); + } + }; + pattern = new _pattern_helper.TilingPattern(IR, color, this.ctx, canvasGraphicsFactory, baseTransform); + } else { + pattern = this._getPattern(IR[1]); + } + + return pattern; + } + }, { + key: "setStrokeColorN", + value: function setStrokeColorN() { + this.current.strokeColor = this.getColorN_Pattern(arguments); + } + }, { + key: "setFillColorN", + value: function setFillColorN() { + this.current.fillColor = this.getColorN_Pattern(arguments); + this.current.patternFill = true; + } + }, { + key: "setStrokeRGBColor", + value: function setStrokeRGBColor(r, g, b) { + var color = _util.Util.makeHexColor(r, g, b); + + this.ctx.strokeStyle = color; + this.current.strokeColor = color; + } + }, { + key: "setFillRGBColor", + value: function setFillRGBColor(r, g, b) { + var color = _util.Util.makeHexColor(r, g, b); + + this.ctx.fillStyle = color; + this.current.fillColor = color; + this.current.patternFill = false; + } + }, { + key: "_getPattern", + value: function _getPattern(objId) { + if (this.cachedPatterns.has(objId)) { + return this.cachedPatterns.get(objId); + } + + var pattern = (0, _pattern_helper.getShadingPattern)(this.objs.get(objId)); + this.cachedPatterns.set(objId, pattern); + return pattern; + } + }, { + key: "shadingFill", + value: function shadingFill(objId) { + if (!this.contentVisible) { + return; + } + + var ctx = this.ctx; + this.save(); + + var pattern = this._getPattern(objId); + + ctx.fillStyle = pattern.getPattern(ctx, this, ctx.mozCurrentTransformInverse, true); + var inv = ctx.mozCurrentTransformInverse; + + if (inv) { + var canvas = ctx.canvas; + var width = canvas.width; + var height = canvas.height; + + var bl = _util.Util.applyTransform([0, 0], inv); + + var br = _util.Util.applyTransform([0, height], inv); + + var ul = _util.Util.applyTransform([width, 0], inv); + + var ur = _util.Util.applyTransform([width, height], inv); + + var x0 = Math.min(bl[0], br[0], ul[0], ur[0]); + var y0 = Math.min(bl[1], br[1], ul[1], ur[1]); + var x1 = Math.max(bl[0], br[0], ul[0], ur[0]); + var y1 = Math.max(bl[1], br[1], ul[1], ur[1]); + this.ctx.fillRect(x0, y0, x1 - x0, y1 - y0); + } else { + this.ctx.fillRect(-1e10, -1e10, 2e10, 2e10); + } + + this.restore(); + } + }, { + key: "beginInlineImage", + value: function beginInlineImage() { + (0, _util.unreachable)("Should not call beginInlineImage"); + } + }, { + key: "beginImageData", + value: function beginImageData() { + (0, _util.unreachable)("Should not call beginImageData"); + } + }, { + key: "paintFormXObjectBegin", + value: function paintFormXObjectBegin(matrix, bbox) { + if (!this.contentVisible) { + return; + } + + this.save(); + this.baseTransformStack.push(this.baseTransform); + + if (Array.isArray(matrix) && matrix.length === 6) { + this.transform.apply(this, matrix); + } + + this.baseTransform = this.ctx.mozCurrentTransform; + + if (bbox) { + var width = bbox[2] - bbox[0]; + var height = bbox[3] - bbox[1]; + this.ctx.rect(bbox[0], bbox[1], width, height); + this.clip(); + this.endPath(); + } + } + }, { + key: "paintFormXObjectEnd", + value: function paintFormXObjectEnd() { + if (!this.contentVisible) { + return; + } + + this.restore(); + this.baseTransform = this.baseTransformStack.pop(); + } + }, { + key: "beginGroup", + value: function beginGroup(group) { + if (!this.contentVisible) { + return; + } + + this.save(); + var currentCtx = this.ctx; + + if (!group.isolated) { + (0, _util.info)("TODO: Support non-isolated groups."); + } + + if (group.knockout) { + (0, _util.warn)("Knockout groups not supported."); + } + + var currentTransform = currentCtx.mozCurrentTransform; + + if (group.matrix) { + currentCtx.transform.apply(currentCtx, group.matrix); + } + + if (!group.bbox) { + throw new Error("Bounding box is required."); + } + + var bounds = _util.Util.getAxialAlignedBoundingBox(group.bbox, currentCtx.mozCurrentTransform); + + var canvasBounds = [0, 0, currentCtx.canvas.width, currentCtx.canvas.height]; + bounds = _util.Util.intersect(bounds, canvasBounds) || [0, 0, 0, 0]; + var offsetX = Math.floor(bounds[0]); + var offsetY = Math.floor(bounds[1]); + var drawnWidth = Math.max(Math.ceil(bounds[2]) - offsetX, 1); + var drawnHeight = Math.max(Math.ceil(bounds[3]) - offsetY, 1); + var scaleX = 1, + scaleY = 1; + + if (drawnWidth > MAX_GROUP_SIZE) { + scaleX = drawnWidth / MAX_GROUP_SIZE; + drawnWidth = MAX_GROUP_SIZE; + } + + if (drawnHeight > MAX_GROUP_SIZE) { + scaleY = drawnHeight / MAX_GROUP_SIZE; + drawnHeight = MAX_GROUP_SIZE; + } + + var cacheId = "groupAt" + this.groupLevel; + + if (group.smask) { + cacheId += "_smask_" + this.smaskCounter++ % 2; + } + + var scratchCanvas = this.cachedCanvases.getCanvas(cacheId, drawnWidth, drawnHeight, true); + var groupCtx = scratchCanvas.context; + groupCtx.scale(1 / scaleX, 1 / scaleY); + groupCtx.translate(-offsetX, -offsetY); + groupCtx.transform.apply(groupCtx, currentTransform); + + if (group.smask) { + this.smaskStack.push({ + canvas: scratchCanvas.canvas, + context: groupCtx, + offsetX: offsetX, + offsetY: offsetY, + scaleX: scaleX, + scaleY: scaleY, + subtype: group.smask.subtype, + backdrop: group.smask.backdrop, + transferMap: group.smask.transferMap || null, + startTransformInverse: null + }); + } else { + currentCtx.setTransform(1, 0, 0, 1, 0, 0); + currentCtx.translate(offsetX, offsetY); + currentCtx.scale(scaleX, scaleY); + } + + copyCtxState(currentCtx, groupCtx); + this.ctx = groupCtx; + this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]); + this.groupStack.push(currentCtx); + this.groupLevel++; + this.current.activeSMask = null; + } + }, { + key: "endGroup", + value: function endGroup(group) { + if (!this.contentVisible) { + return; + } + + this.groupLevel--; + var groupCtx = this.ctx; + this.ctx = this.groupStack.pop(); + + if (this.ctx.imageSmoothingEnabled !== undefined) { + this.ctx.imageSmoothingEnabled = false; + } else { + this.ctx.mozImageSmoothingEnabled = false; + } + + if (group.smask) { + this.tempSMask = this.smaskStack.pop(); + } else { + this.ctx.drawImage(groupCtx.canvas, 0, 0); + } + + this.restore(); + } + }, { + key: "beginAnnotations", + value: function beginAnnotations() { + this.save(); + + if (this.baseTransform) { + this.ctx.setTransform.apply(this.ctx, this.baseTransform); + } + } + }, { + key: "endAnnotations", + value: function endAnnotations() { + this.restore(); + } + }, { + key: "beginAnnotation", + value: function beginAnnotation(id, rect, transform, matrix) { + this.save(); + resetCtxToDefault(this.ctx); + this.current = new CanvasExtraState(); + + if (Array.isArray(rect) && rect.length === 4) { + var width = rect[2] - rect[0]; + var height = rect[3] - rect[1]; + this.ctx.rect(rect[0], rect[1], width, height); + this.clip(); + this.endPath(); + } + + this.transform.apply(this, transform); + this.transform.apply(this, matrix); + } + }, { + key: "endAnnotation", + value: function endAnnotation() { + this.restore(); + } + }, { + key: "paintImageMaskXObject", + value: function paintImageMaskXObject(img) { + if (!this.contentVisible) { + return; + } + + var ctx = this.ctx; + var width = img.width, + height = img.height; + var glyph = this.processingType3; + + if (COMPILE_TYPE3_GLYPHS && glyph && glyph.compiled === undefined) { + if (width <= MAX_SIZE_TO_COMPILE && height <= MAX_SIZE_TO_COMPILE) { + glyph.compiled = compileType3Glyph({ + data: img.data, + width: width, + height: height + }); + } else { + glyph.compiled = null; + } + } + + if (glyph !== null && glyph !== void 0 && glyph.compiled) { + glyph.compiled(ctx); + return; + } + + var mask = this._createMaskCanvas(img); + + var maskCanvas = mask.canvas; + ctx.save(); + ctx.setTransform(1, 0, 0, 1, 0, 0); + ctx.drawImage(maskCanvas, mask.offsetX, mask.offsetY); + ctx.restore(); + } + }, { + key: "paintImageMaskXObjectRepeat", + value: function paintImageMaskXObjectRepeat(imgData, scaleX) { + var skewX = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + var skewY = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + var scaleY = arguments.length > 4 ? arguments[4] : undefined; + var positions = arguments.length > 5 ? arguments[5] : undefined; + + if (!this.contentVisible) { + return; + } + + var ctx = this.ctx; + ctx.save(); + var currentTransform = ctx.mozCurrentTransform; + ctx.transform(scaleX, skewX, skewY, scaleY, 0, 0); + + var mask = this._createMaskCanvas(imgData); + + ctx.setTransform(1, 0, 0, 1, 0, 0); + + for (var i = 0, ii = positions.length; i < ii; i += 2) { + var trans = _util.Util.transform(currentTransform, [scaleX, skewX, skewY, scaleY, positions[i], positions[i + 1]]); + + var _Util$applyTransform = _util.Util.applyTransform([0, 0], trans), + _Util$applyTransform2 = _slicedToArray(_Util$applyTransform, 2), + x = _Util$applyTransform2[0], + y = _Util$applyTransform2[1]; + + ctx.drawImage(mask.canvas, x, y); + } + + ctx.restore(); + } + }, { + key: "paintImageMaskXObjectGroup", + value: function paintImageMaskXObjectGroup(images) { + if (!this.contentVisible) { + return; + } + + var ctx = this.ctx; + var fillColor = this.current.fillColor; + var isPatternFill = this.current.patternFill; + + for (var i = 0, ii = images.length; i < ii; i++) { + var image = images[i]; + var width = image.width, + height = image.height; + var maskCanvas = this.cachedCanvases.getCanvas("maskCanvas", width, height); + var maskCtx = maskCanvas.context; + maskCtx.save(); + putBinaryImageMask(maskCtx, image); + maskCtx.globalCompositeOperation = "source-in"; + maskCtx.fillStyle = isPatternFill ? fillColor.getPattern(maskCtx, this, ctx.mozCurrentTransformInverse, false) : fillColor; + maskCtx.fillRect(0, 0, width, height); + maskCtx.restore(); + ctx.save(); + ctx.transform.apply(ctx, image.transform); + ctx.scale(1, -1); + ctx.drawImage(maskCanvas.canvas, 0, 0, width, height, 0, -1, 1, 1); + ctx.restore(); + } + } + }, { + key: "paintImageXObject", + value: function paintImageXObject(objId) { + if (!this.contentVisible) { + return; + } + + var imgData = objId.startsWith("g_") ? this.commonObjs.get(objId) : this.objs.get(objId); + + if (!imgData) { + (0, _util.warn)("Dependent image isn't ready yet"); + return; + } + + this.paintInlineImageXObject(imgData); + } + }, { + key: "paintImageXObjectRepeat", + value: function paintImageXObjectRepeat(objId, scaleX, scaleY, positions) { + if (!this.contentVisible) { + return; + } + + var imgData = objId.startsWith("g_") ? this.commonObjs.get(objId) : this.objs.get(objId); + + if (!imgData) { + (0, _util.warn)("Dependent image isn't ready yet"); + return; + } + + var width = imgData.width; + var height = imgData.height; + var map = []; + + for (var i = 0, ii = positions.length; i < ii; i += 2) { + map.push({ + transform: [scaleX, 0, 0, scaleY, positions[i], positions[i + 1]], + x: 0, + y: 0, + w: width, + h: height + }); + } + + this.paintInlineImageXObjectGroup(imgData, map); + } + }, { + key: "paintInlineImageXObject", + value: function paintInlineImageXObject(imgData) { + if (!this.contentVisible) { + return; + } + + var width = imgData.width; + var height = imgData.height; + var ctx = this.ctx; + this.save(); + ctx.scale(1 / width, -1 / height); + var imgToPaint; + + if (typeof HTMLElement === "function" && imgData instanceof HTMLElement || !imgData.data) { + imgToPaint = imgData; + } else { + var tmpCanvas = this.cachedCanvases.getCanvas("inlineImage", width, height); + var tmpCtx = tmpCanvas.context; + putBinaryImageData(tmpCtx, imgData, this.current.transferMaps); + imgToPaint = tmpCanvas.canvas; + } + + var scaled = this._scaleImage(imgToPaint, ctx.mozCurrentTransformInverse); + + ctx.drawImage(scaled.img, 0, 0, scaled.paintWidth, scaled.paintHeight, 0, -height, width, height); + + if (this.imageLayer) { + var position = this.getCanvasPosition(0, -height); + this.imageLayer.appendImage({ + imgData: imgData, + left: position[0], + top: position[1], + width: width / ctx.mozCurrentTransformInverse[0], + height: height / ctx.mozCurrentTransformInverse[3] + }); + } + + this.restore(); + } + }, { + key: "paintInlineImageXObjectGroup", + value: function paintInlineImageXObjectGroup(imgData, map) { + if (!this.contentVisible) { + return; + } + + var ctx = this.ctx; + var w = imgData.width; + var h = imgData.height; + var tmpCanvas = this.cachedCanvases.getCanvas("inlineImage", w, h); + var tmpCtx = tmpCanvas.context; + putBinaryImageData(tmpCtx, imgData, this.current.transferMaps); + + for (var i = 0, ii = map.length; i < ii; i++) { + var entry = map[i]; + ctx.save(); + ctx.transform.apply(ctx, entry.transform); + ctx.scale(1, -1); + ctx.drawImage(tmpCanvas.canvas, entry.x, entry.y, entry.w, entry.h, 0, -1, 1, 1); + + if (this.imageLayer) { + var position = this.getCanvasPosition(entry.x, entry.y); + this.imageLayer.appendImage({ + imgData: imgData, + left: position[0], + top: position[1], + width: w, + height: h + }); + } + + ctx.restore(); + } + } + }, { + key: "paintSolidColorImageMask", + value: function paintSolidColorImageMask() { + if (!this.contentVisible) { + return; + } + + this.ctx.fillRect(0, 0, 1, 1); + } + }, { + key: "markPoint", + value: function markPoint(tag) {} + }, { + key: "markPointProps", + value: function markPointProps(tag, properties) {} + }, { + key: "beginMarkedContent", + value: function beginMarkedContent(tag) { + this.markedContentStack.push({ + visible: true + }); + } + }, { + key: "beginMarkedContentProps", + value: function beginMarkedContentProps(tag, properties) { + if (tag === "OC") { + this.markedContentStack.push({ + visible: this.optionalContentConfig.isVisible(properties) + }); + } else { + this.markedContentStack.push({ + visible: true + }); + } + + this.contentVisible = this.isContentVisible(); + } + }, { + key: "endMarkedContent", + value: function endMarkedContent() { + this.markedContentStack.pop(); + this.contentVisible = this.isContentVisible(); + } + }, { + key: "beginCompat", + value: function beginCompat() {} + }, { + key: "endCompat", + value: function endCompat() {} + }, { + key: "consumePath", + value: function consumePath() { + var ctx = this.ctx; + + if (this.pendingClip) { + if (this.pendingClip === EO_CLIP) { + ctx.clip("evenodd"); + } else { + ctx.clip(); + } + + this.pendingClip = null; + } + + ctx.beginPath(); + } + }, { + key: "getSinglePixelWidth", + value: function getSinglePixelWidth() { + if (this._cachedGetSinglePixelWidth === null) { + var m = this.ctx.mozCurrentTransform; + var absDet = Math.abs(m[0] * m[3] - m[2] * m[1]); + var sqNorm1 = Math.pow(m[0], 2) + Math.pow(m[2], 2); + var sqNorm2 = Math.pow(m[1], 2) + Math.pow(m[3], 2); + var pixelHeight = Math.sqrt(Math.max(sqNorm1, sqNorm2)) / absDet; + + if (sqNorm1 !== sqNorm2 && this._combinedScaleFactor * pixelHeight > 1) { + this._cachedGetSinglePixelWidth = -(this._combinedScaleFactor * pixelHeight); + } else if (absDet > Number.EPSILON) { + this._cachedGetSinglePixelWidth = pixelHeight; + } else { + this._cachedGetSinglePixelWidth = 1; + } + } + + return this._cachedGetSinglePixelWidth; + } + }, { + key: "getCanvasPosition", + value: function getCanvasPosition(x, y) { + var transform = this.ctx.mozCurrentTransform; + return [transform[0] * x + transform[2] * y + transform[4], transform[1] * x + transform[3] * y + transform[5]]; + } + }, { + key: "isContentVisible", + value: function isContentVisible() { + for (var i = this.markedContentStack.length - 1; i >= 0; i--) { + if (!this.markedContentStack[i].visible) { + return false; + } + } + + return true; + } + }]); + + return CanvasGraphics; + }(); + + for (var op in _util.OPS) { + CanvasGraphics.prototype[_util.OPS[op]] = CanvasGraphics.prototype[op]; + } + + return CanvasGraphics; +}(); + +exports.CanvasGraphics = CanvasGraphics; + +/***/ }), +/* 120 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.getShadingPattern = getShadingPattern; +exports.TilingPattern = void 0; + +var _util = __w_pdfjs_require__(4); + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function applyBoundingBox(ctx, bbox) { + if (!bbox || typeof Path2D === "undefined") { + return; + } + + var width = bbox[2] - bbox[0]; + var height = bbox[3] - bbox[1]; + var region = new Path2D(); + region.rect(bbox[0], bbox[1], width, height); + ctx.clip(region); +} + +var BaseShadingPattern = /*#__PURE__*/function () { + function BaseShadingPattern() { + _classCallCheck(this, BaseShadingPattern); + + if (this.constructor === BaseShadingPattern) { + (0, _util.unreachable)("Cannot initialize BaseShadingPattern."); + } + } + + _createClass(BaseShadingPattern, [{ + key: "getPattern", + value: function getPattern() { + (0, _util.unreachable)("Abstract method `getPattern` called."); + } + }]); + + return BaseShadingPattern; +}(); + +var RadialAxialShadingPattern = /*#__PURE__*/function (_BaseShadingPattern) { + _inherits(RadialAxialShadingPattern, _BaseShadingPattern); + + var _super = _createSuper(RadialAxialShadingPattern); + + function RadialAxialShadingPattern(IR) { + var _this; + + _classCallCheck(this, RadialAxialShadingPattern); + + _this = _super.call(this); + _this._type = IR[1]; + _this._bbox = IR[2]; + _this._colorStops = IR[3]; + _this._p0 = IR[4]; + _this._p1 = IR[5]; + _this._r0 = IR[6]; + _this._r1 = IR[7]; + _this._matrix = IR[8]; + _this._patternCache = null; + return _this; + } + + _createClass(RadialAxialShadingPattern, [{ + key: "_createGradient", + value: function _createGradient(ctx) { + var grad; + + if (this._type === "axial") { + grad = ctx.createLinearGradient(this._p0[0], this._p0[1], this._p1[0], this._p1[1]); + } else if (this._type === "radial") { + grad = ctx.createRadialGradient(this._p0[0], this._p0[1], this._r0, this._p1[0], this._p1[1], this._r1); + } + + var _iterator = _createForOfIteratorHelper(this._colorStops), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var colorStop = _step.value; + grad.addColorStop(colorStop[0], colorStop[1]); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + return grad; + } + }, { + key: "getPattern", + value: function getPattern(ctx, owner, inverse) { + var shadingFill = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + var pattern; + + if (this._patternCache) { + pattern = this._patternCache; + } else { + if (!shadingFill) { + var tmpCanvas = owner.cachedCanvases.getCanvas("pattern", owner.ctx.canvas.width, owner.ctx.canvas.height, true); + var tmpCtx = tmpCanvas.context; + tmpCtx.clearRect(0, 0, tmpCtx.canvas.width, tmpCtx.canvas.height); + tmpCtx.beginPath(); + tmpCtx.rect(0, 0, tmpCtx.canvas.width, tmpCtx.canvas.height); + tmpCtx.setTransform.apply(tmpCtx, owner.baseTransform); + + if (this._matrix) { + tmpCtx.transform.apply(tmpCtx, this._matrix); + } + + applyBoundingBox(tmpCtx, this._bbox); + tmpCtx.fillStyle = this._createGradient(tmpCtx); + tmpCtx.fill(); + pattern = ctx.createPattern(tmpCanvas.canvas, "repeat"); + } else { + applyBoundingBox(ctx, this._bbox); + pattern = this._createGradient(ctx); + } + + this._patternCache = pattern; + } + + if (!shadingFill) { + var domMatrix = new DOMMatrix(inverse); + + try { + pattern.setTransform(domMatrix); + } catch (ex) { + (0, _util.warn)("RadialAxialShadingPattern.getPattern: \"".concat(ex === null || ex === void 0 ? void 0 : ex.message, "\".")); + } + } + + return pattern; + } + }]); + + return RadialAxialShadingPattern; +}(BaseShadingPattern); + +function drawTriangle(data, context, p1, p2, p3, c1, c2, c3) { + var coords = context.coords, + colors = context.colors; + var bytes = data.data, + rowSize = data.width * 4; + var tmp; + + if (coords[p1 + 1] > coords[p2 + 1]) { + tmp = p1; + p1 = p2; + p2 = tmp; + tmp = c1; + c1 = c2; + c2 = tmp; + } + + if (coords[p2 + 1] > coords[p3 + 1]) { + tmp = p2; + p2 = p3; + p3 = tmp; + tmp = c2; + c2 = c3; + c3 = tmp; + } + + if (coords[p1 + 1] > coords[p2 + 1]) { + tmp = p1; + p1 = p2; + p2 = tmp; + tmp = c1; + c1 = c2; + c2 = tmp; + } + + var x1 = (coords[p1] + context.offsetX) * context.scaleX; + var y1 = (coords[p1 + 1] + context.offsetY) * context.scaleY; + var x2 = (coords[p2] + context.offsetX) * context.scaleX; + var y2 = (coords[p2 + 1] + context.offsetY) * context.scaleY; + var x3 = (coords[p3] + context.offsetX) * context.scaleX; + var y3 = (coords[p3 + 1] + context.offsetY) * context.scaleY; + + if (y1 >= y3) { + return; + } + + var c1r = colors[c1], + c1g = colors[c1 + 1], + c1b = colors[c1 + 2]; + var c2r = colors[c2], + c2g = colors[c2 + 1], + c2b = colors[c2 + 2]; + var c3r = colors[c3], + c3g = colors[c3 + 1], + c3b = colors[c3 + 2]; + var minY = Math.round(y1), + maxY = Math.round(y3); + var xa, car, cag, cab; + var xb, cbr, cbg, cbb; + + for (var y = minY; y <= maxY; y++) { + if (y < y2) { + var _k = void 0; + + if (y < y1) { + _k = 0; + } else { + _k = (y1 - y) / (y1 - y2); + } + + xa = x1 - (x1 - x2) * _k; + car = c1r - (c1r - c2r) * _k; + cag = c1g - (c1g - c2g) * _k; + cab = c1b - (c1b - c2b) * _k; + } else { + var _k2 = void 0; + + if (y > y3) { + _k2 = 1; + } else if (y2 === y3) { + _k2 = 0; + } else { + _k2 = (y2 - y) / (y2 - y3); + } + + xa = x2 - (x2 - x3) * _k2; + car = c2r - (c2r - c3r) * _k2; + cag = c2g - (c2g - c3g) * _k2; + cab = c2b - (c2b - c3b) * _k2; + } + + var k = void 0; + + if (y < y1) { + k = 0; + } else if (y > y3) { + k = 1; + } else { + k = (y1 - y) / (y1 - y3); + } + + xb = x1 - (x1 - x3) * k; + cbr = c1r - (c1r - c3r) * k; + cbg = c1g - (c1g - c3g) * k; + cbb = c1b - (c1b - c3b) * k; + var x1_ = Math.round(Math.min(xa, xb)); + var x2_ = Math.round(Math.max(xa, xb)); + var j = rowSize * y + x1_ * 4; + + for (var x = x1_; x <= x2_; x++) { + k = (xa - x) / (xa - xb); + + if (k < 0) { + k = 0; + } else if (k > 1) { + k = 1; + } + + bytes[j++] = car - (car - cbr) * k | 0; + bytes[j++] = cag - (cag - cbg) * k | 0; + bytes[j++] = cab - (cab - cbb) * k | 0; + bytes[j++] = 255; + } + } +} + +function drawFigure(data, figure, context) { + var ps = figure.coords; + var cs = figure.colors; + var i, ii; + + switch (figure.type) { + case "lattice": + var verticesPerRow = figure.verticesPerRow; + var rows = Math.floor(ps.length / verticesPerRow) - 1; + var cols = verticesPerRow - 1; + + for (i = 0; i < rows; i++) { + var q = i * verticesPerRow; + + for (var j = 0; j < cols; j++, q++) { + drawTriangle(data, context, ps[q], ps[q + 1], ps[q + verticesPerRow], cs[q], cs[q + 1], cs[q + verticesPerRow]); + drawTriangle(data, context, ps[q + verticesPerRow + 1], ps[q + 1], ps[q + verticesPerRow], cs[q + verticesPerRow + 1], cs[q + 1], cs[q + verticesPerRow]); + } + } + + break; + + case "triangles": + for (i = 0, ii = ps.length; i < ii; i += 3) { + drawTriangle(data, context, ps[i], ps[i + 1], ps[i + 2], cs[i], cs[i + 1], cs[i + 2]); + } + + break; + + default: + throw new Error("illegal figure"); + } +} + +var MeshShadingPattern = /*#__PURE__*/function (_BaseShadingPattern2) { + _inherits(MeshShadingPattern, _BaseShadingPattern2); + + var _super2 = _createSuper(MeshShadingPattern); + + function MeshShadingPattern(IR) { + var _this2; + + _classCallCheck(this, MeshShadingPattern); + + _this2 = _super2.call(this); + _this2._coords = IR[2]; + _this2._colors = IR[3]; + _this2._figures = IR[4]; + _this2._bounds = IR[5]; + _this2._matrix = IR[6]; + _this2._bbox = IR[7]; + _this2._background = IR[8]; + return _this2; + } + + _createClass(MeshShadingPattern, [{ + key: "_createMeshCanvas", + value: function _createMeshCanvas(combinedScale, backgroundColor, cachedCanvases) { + var EXPECTED_SCALE = 1.1; + var MAX_PATTERN_SIZE = 3000; + var BORDER_SIZE = 2; + var offsetX = Math.floor(this._bounds[0]); + var offsetY = Math.floor(this._bounds[1]); + var boundsWidth = Math.ceil(this._bounds[2]) - offsetX; + var boundsHeight = Math.ceil(this._bounds[3]) - offsetY; + var width = Math.min(Math.ceil(Math.abs(boundsWidth * combinedScale[0] * EXPECTED_SCALE)), MAX_PATTERN_SIZE); + var height = Math.min(Math.ceil(Math.abs(boundsHeight * combinedScale[1] * EXPECTED_SCALE)), MAX_PATTERN_SIZE); + var scaleX = boundsWidth / width; + var scaleY = boundsHeight / height; + var context = { + coords: this._coords, + colors: this._colors, + offsetX: -offsetX, + offsetY: -offsetY, + scaleX: 1 / scaleX, + scaleY: 1 / scaleY + }; + var paddedWidth = width + BORDER_SIZE * 2; + var paddedHeight = height + BORDER_SIZE * 2; + var tmpCanvas = cachedCanvases.getCanvas("mesh", paddedWidth, paddedHeight, false); + var tmpCtx = tmpCanvas.context; + var data = tmpCtx.createImageData(width, height); + + if (backgroundColor) { + var bytes = data.data; + + for (var i = 0, ii = bytes.length; i < ii; i += 4) { + bytes[i] = backgroundColor[0]; + bytes[i + 1] = backgroundColor[1]; + bytes[i + 2] = backgroundColor[2]; + bytes[i + 3] = 255; + } + } + + var _iterator2 = _createForOfIteratorHelper(this._figures), + _step2; + + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + var figure = _step2.value; + drawFigure(data, figure, context); + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + + tmpCtx.putImageData(data, BORDER_SIZE, BORDER_SIZE); + var canvas = tmpCanvas.canvas; + return { + canvas: canvas, + offsetX: offsetX - BORDER_SIZE * scaleX, + offsetY: offsetY - BORDER_SIZE * scaleY, + scaleX: scaleX, + scaleY: scaleY + }; + } + }, { + key: "getPattern", + value: function getPattern(ctx, owner, inverse) { + var shadingFill = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + applyBoundingBox(ctx, this._bbox); + var scale; + + if (shadingFill) { + scale = _util.Util.singularValueDecompose2dScale(ctx.mozCurrentTransform); + } else { + scale = _util.Util.singularValueDecompose2dScale(owner.baseTransform); + + if (this._matrix) { + var matrixScale = _util.Util.singularValueDecompose2dScale(this._matrix); + + scale = [scale[0] * matrixScale[0], scale[1] * matrixScale[1]]; + } + } + + var temporaryPatternCanvas = this._createMeshCanvas(scale, shadingFill ? null : this._background, owner.cachedCanvases); + + if (!shadingFill) { + ctx.setTransform.apply(ctx, owner.baseTransform); + + if (this._matrix) { + ctx.transform.apply(ctx, this._matrix); + } + } + + ctx.translate(temporaryPatternCanvas.offsetX, temporaryPatternCanvas.offsetY); + ctx.scale(temporaryPatternCanvas.scaleX, temporaryPatternCanvas.scaleY); + return ctx.createPattern(temporaryPatternCanvas.canvas, "no-repeat"); + } + }]); + + return MeshShadingPattern; +}(BaseShadingPattern); + +var DummyShadingPattern = /*#__PURE__*/function (_BaseShadingPattern3) { + _inherits(DummyShadingPattern, _BaseShadingPattern3); + + var _super3 = _createSuper(DummyShadingPattern); + + function DummyShadingPattern() { + _classCallCheck(this, DummyShadingPattern); + + return _super3.apply(this, arguments); + } + + _createClass(DummyShadingPattern, [{ + key: "getPattern", + value: function getPattern() { + return "hotpink"; + } + }]); + + return DummyShadingPattern; +}(BaseShadingPattern); + +function getShadingPattern(IR) { + switch (IR[0]) { + case "RadialAxial": + return new RadialAxialShadingPattern(IR); + + case "Mesh": + return new MeshShadingPattern(IR); + + case "Dummy": + return new DummyShadingPattern(); + } + + throw new Error("Unknown IR type: ".concat(IR[0])); +} + +var PaintType = { + COLORED: 1, + UNCOLORED: 2 +}; + +var TilingPattern = /*#__PURE__*/function () { + function TilingPattern(IR, color, ctx, canvasGraphicsFactory, baseTransform) { + _classCallCheck(this, TilingPattern); + + this.operatorList = IR[2]; + this.matrix = IR[3] || [1, 0, 0, 1, 0, 0]; + this.bbox = IR[4]; + this.xstep = IR[5]; + this.ystep = IR[6]; + this.paintType = IR[7]; + this.tilingType = IR[8]; + this.color = color; + this.ctx = ctx; + this.canvasGraphicsFactory = canvasGraphicsFactory; + this.baseTransform = baseTransform; + } + + _createClass(TilingPattern, [{ + key: "createPatternCanvas", + value: function createPatternCanvas(owner) { + var operatorList = this.operatorList; + var bbox = this.bbox; + var xstep = this.xstep; + var ystep = this.ystep; + var paintType = this.paintType; + var tilingType = this.tilingType; + var color = this.color; + var canvasGraphicsFactory = this.canvasGraphicsFactory; + (0, _util.info)("TilingType: " + tilingType); + var x0 = bbox[0], + y0 = bbox[1], + x1 = bbox[2], + y1 = bbox[3]; + + var matrixScale = _util.Util.singularValueDecompose2dScale(this.matrix); + + var curMatrixScale = _util.Util.singularValueDecompose2dScale(this.baseTransform); + + var combinedScale = [matrixScale[0] * curMatrixScale[0], matrixScale[1] * curMatrixScale[1]]; + var dimx = this.getSizeAndScale(xstep, this.ctx.canvas.width, combinedScale[0]); + var dimy = this.getSizeAndScale(ystep, this.ctx.canvas.height, combinedScale[1]); + var tmpCanvas = owner.cachedCanvases.getCanvas("pattern", dimx.size, dimy.size, true); + var tmpCtx = tmpCanvas.context; + var graphics = canvasGraphicsFactory.createCanvasGraphics(tmpCtx); + graphics.groupLevel = owner.groupLevel; + this.setFillAndStrokeStyleToContext(graphics, paintType, color); + var adjustedX0 = x0; + var adjustedY0 = y0; + var adjustedX1 = x1; + var adjustedY1 = y1; + + if (x0 < 0) { + adjustedX0 = 0; + adjustedX1 += Math.abs(x0); + } + + if (y0 < 0) { + adjustedY0 = 0; + adjustedY1 += Math.abs(y0); + } + + tmpCtx.translate(-(dimx.scale * adjustedX0), -(dimy.scale * adjustedY0)); + graphics.transform(dimx.scale, 0, 0, dimy.scale, 0, 0); + this.clipBbox(graphics, adjustedX0, adjustedY0, adjustedX1, adjustedY1); + graphics.baseTransform = graphics.ctx.mozCurrentTransform.slice(); + graphics.executeOperatorList(operatorList); + graphics.endDrawing(); + return { + canvas: tmpCanvas.canvas, + scaleX: dimx.scale, + scaleY: dimy.scale, + offsetX: adjustedX0, + offsetY: adjustedY0 + }; + } + }, { + key: "getSizeAndScale", + value: function getSizeAndScale(step, realOutputSize, scale) { + step = Math.abs(step); + var maxSize = Math.max(TilingPattern.MAX_PATTERN_SIZE, realOutputSize); + var size = Math.ceil(step * scale); + + if (size >= maxSize) { + size = maxSize; + } else { + scale = size / step; + } + + return { + scale: scale, + size: size + }; + } + }, { + key: "clipBbox", + value: function clipBbox(graphics, x0, y0, x1, y1) { + var bboxWidth = x1 - x0; + var bboxHeight = y1 - y0; + graphics.ctx.rect(x0, y0, bboxWidth, bboxHeight); + graphics.clip(); + graphics.endPath(); + } + }, { + key: "setFillAndStrokeStyleToContext", + value: function setFillAndStrokeStyleToContext(graphics, paintType, color) { + var context = graphics.ctx, + current = graphics.current; + + switch (paintType) { + case PaintType.COLORED: + var ctx = this.ctx; + context.fillStyle = ctx.fillStyle; + context.strokeStyle = ctx.strokeStyle; + current.fillColor = ctx.fillStyle; + current.strokeColor = ctx.strokeStyle; + break; + + case PaintType.UNCOLORED: + var cssColor = _util.Util.makeHexColor(color[0], color[1], color[2]); + + context.fillStyle = cssColor; + context.strokeStyle = cssColor; + current.fillColor = cssColor; + current.strokeColor = cssColor; + break; + + default: + throw new _util.FormatError("Unsupported paint type: ".concat(paintType)); + } + } + }, { + key: "getPattern", + value: function getPattern(ctx, owner, inverse) { + var shadingFill = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + var matrix = inverse; + + if (!shadingFill) { + matrix = _util.Util.transform(matrix, owner.baseTransform); + + if (this.matrix) { + matrix = _util.Util.transform(matrix, this.matrix); + } + } + + var temporaryPatternCanvas = this.createPatternCanvas(owner); + var domMatrix = new DOMMatrix(matrix); + domMatrix = domMatrix.translate(temporaryPatternCanvas.offsetX, temporaryPatternCanvas.offsetY); + domMatrix = domMatrix.scale(1 / temporaryPatternCanvas.scaleX, 1 / temporaryPatternCanvas.scaleY); + var pattern = ctx.createPattern(temporaryPatternCanvas.canvas, "repeat"); + + try { + pattern.setTransform(domMatrix); + } catch (ex) { + (0, _util.warn)("TilingPattern.getPattern: \"".concat(ex === null || ex === void 0 ? void 0 : ex.message, "\".")); + } + + return pattern; + } + }], [{ + key: "MAX_PATTERN_SIZE", + get: function get() { + return (0, _util.shadow)(this, "MAX_PATTERN_SIZE", 3000); + } + }]); + + return TilingPattern; +}(); + +exports.TilingPattern = TilingPattern; + +/***/ }), +/* 121 */ +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.GlobalWorkerOptions = void 0; +var GlobalWorkerOptions = Object.create(null); +exports.GlobalWorkerOptions = GlobalWorkerOptions; +GlobalWorkerOptions.workerPort = GlobalWorkerOptions.workerPort === undefined ? null : GlobalWorkerOptions.workerPort; +GlobalWorkerOptions.workerSrc = GlobalWorkerOptions.workerSrc === undefined ? "" : GlobalWorkerOptions.workerSrc; + +/***/ }), +/* 122 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.MessageHandler = void 0; + +var _regenerator = _interopRequireDefault(__w_pdfjs_require__(2)); + +var _util = __w_pdfjs_require__(4); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +var CallbackKind = { + UNKNOWN: 0, + DATA: 1, + ERROR: 2 +}; +var StreamKind = { + UNKNOWN: 0, + CANCEL: 1, + CANCEL_COMPLETE: 2, + CLOSE: 3, + ENQUEUE: 4, + ERROR: 5, + PULL: 6, + PULL_COMPLETE: 7, + START_COMPLETE: 8 +}; + +function wrapReason(reason) { + if (_typeof(reason) !== "object" || reason === null) { + return reason; + } + + switch (reason.name) { + case "AbortException": + return new _util.AbortException(reason.message); + + case "MissingPDFException": + return new _util.MissingPDFException(reason.message); + + case "UnexpectedResponseException": + return new _util.UnexpectedResponseException(reason.message, reason.status); + + case "UnknownErrorException": + return new _util.UnknownErrorException(reason.message, reason.details); + + default: + return new _util.UnknownErrorException(reason.message, reason.toString()); + } +} + +var MessageHandler = /*#__PURE__*/function () { + function MessageHandler(sourceName, targetName, comObj) { + var _this = this; + + _classCallCheck(this, MessageHandler); + + this.sourceName = sourceName; + this.targetName = targetName; + this.comObj = comObj; + this.callbackId = 1; + this.streamId = 1; + this.postMessageTransfers = true; + this.streamSinks = Object.create(null); + this.streamControllers = Object.create(null); + this.callbackCapabilities = Object.create(null); + this.actionHandler = Object.create(null); + + this._onComObjOnMessage = function (event) { + var data = event.data; + + if (data.targetName !== _this.sourceName) { + return; + } + + if (data.stream) { + _this._processStreamMessage(data); + + return; + } + + if (data.callback) { + var callbackId = data.callbackId; + var capability = _this.callbackCapabilities[callbackId]; + + if (!capability) { + throw new Error("Cannot resolve callback ".concat(callbackId)); + } + + delete _this.callbackCapabilities[callbackId]; + + if (data.callback === CallbackKind.DATA) { + capability.resolve(data.data); + } else if (data.callback === CallbackKind.ERROR) { + capability.reject(wrapReason(data.reason)); + } else { + throw new Error("Unexpected callback case"); + } + + return; + } + + var action = _this.actionHandler[data.action]; + + if (!action) { + throw new Error("Unknown action from worker: ".concat(data.action)); + } + + if (data.callbackId) { + var cbSourceName = _this.sourceName; + var cbTargetName = data.sourceName; + new Promise(function (resolve) { + resolve(action(data.data)); + }).then(function (result) { + comObj.postMessage({ + sourceName: cbSourceName, + targetName: cbTargetName, + callback: CallbackKind.DATA, + callbackId: data.callbackId, + data: result + }); + }, function (reason) { + comObj.postMessage({ + sourceName: cbSourceName, + targetName: cbTargetName, + callback: CallbackKind.ERROR, + callbackId: data.callbackId, + reason: wrapReason(reason) + }); + }); + return; + } + + if (data.streamId) { + _this._createStreamSink(data); + + return; + } + + action(data.data); + }; + + comObj.addEventListener("message", this._onComObjOnMessage); + } + + _createClass(MessageHandler, [{ + key: "on", + value: function on(actionName, handler) { + var ah = this.actionHandler; + + if (ah[actionName]) { + throw new Error("There is already an actionName called \"".concat(actionName, "\"")); + } + + ah[actionName] = handler; + } + }, { + key: "send", + value: function send(actionName, data, transfers) { + this._postMessage({ + sourceName: this.sourceName, + targetName: this.targetName, + action: actionName, + data: data + }, transfers); + } + }, { + key: "sendWithPromise", + value: function sendWithPromise(actionName, data, transfers) { + var callbackId = this.callbackId++; + var capability = (0, _util.createPromiseCapability)(); + this.callbackCapabilities[callbackId] = capability; + + try { + this._postMessage({ + sourceName: this.sourceName, + targetName: this.targetName, + action: actionName, + callbackId: callbackId, + data: data + }, transfers); + } catch (ex) { + capability.reject(ex); + } + + return capability.promise; + } + }, { + key: "sendWithStream", + value: function sendWithStream(actionName, data, queueingStrategy, transfers) { + var _this2 = this; + + var streamId = this.streamId++; + var sourceName = this.sourceName; + var targetName = this.targetName; + var comObj = this.comObj; + return new ReadableStream({ + start: function start(controller) { + var startCapability = (0, _util.createPromiseCapability)(); + _this2.streamControllers[streamId] = { + controller: controller, + startCall: startCapability, + pullCall: null, + cancelCall: null, + isClosed: false + }; + + _this2._postMessage({ + sourceName: sourceName, + targetName: targetName, + action: actionName, + streamId: streamId, + data: data, + desiredSize: controller.desiredSize + }, transfers); + + return startCapability.promise; + }, + pull: function pull(controller) { + var pullCapability = (0, _util.createPromiseCapability)(); + _this2.streamControllers[streamId].pullCall = pullCapability; + comObj.postMessage({ + sourceName: sourceName, + targetName: targetName, + stream: StreamKind.PULL, + streamId: streamId, + desiredSize: controller.desiredSize + }); + return pullCapability.promise; + }, + cancel: function cancel(reason) { + (0, _util.assert)(reason instanceof Error, "cancel must have a valid reason"); + var cancelCapability = (0, _util.createPromiseCapability)(); + _this2.streamControllers[streamId].cancelCall = cancelCapability; + _this2.streamControllers[streamId].isClosed = true; + comObj.postMessage({ + sourceName: sourceName, + targetName: targetName, + stream: StreamKind.CANCEL, + streamId: streamId, + reason: wrapReason(reason) + }); + return cancelCapability.promise; + } + }, queueingStrategy); + } + }, { + key: "_createStreamSink", + value: function _createStreamSink(data) { + var self = this; + var action = this.actionHandler[data.action]; + var streamId = data.streamId; + var sourceName = this.sourceName; + var targetName = data.sourceName; + var comObj = this.comObj; + var streamSink = { + enqueue: function enqueue(chunk) { + var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; + var transfers = arguments.length > 2 ? arguments[2] : undefined; + + if (this.isCancelled) { + return; + } + + var lastDesiredSize = this.desiredSize; + this.desiredSize -= size; + + if (lastDesiredSize > 0 && this.desiredSize <= 0) { + this.sinkCapability = (0, _util.createPromiseCapability)(); + this.ready = this.sinkCapability.promise; + } + + self._postMessage({ + sourceName: sourceName, + targetName: targetName, + stream: StreamKind.ENQUEUE, + streamId: streamId, + chunk: chunk + }, transfers); + }, + close: function close() { + if (this.isCancelled) { + return; + } + + this.isCancelled = true; + comObj.postMessage({ + sourceName: sourceName, + targetName: targetName, + stream: StreamKind.CLOSE, + streamId: streamId + }); + delete self.streamSinks[streamId]; + }, + error: function error(reason) { + (0, _util.assert)(reason instanceof Error, "error must have a valid reason"); + + if (this.isCancelled) { + return; + } + + this.isCancelled = true; + comObj.postMessage({ + sourceName: sourceName, + targetName: targetName, + stream: StreamKind.ERROR, + streamId: streamId, + reason: wrapReason(reason) + }); + }, + sinkCapability: (0, _util.createPromiseCapability)(), + onPull: null, + onCancel: null, + isCancelled: false, + desiredSize: data.desiredSize, + ready: null + }; + streamSink.sinkCapability.resolve(); + streamSink.ready = streamSink.sinkCapability.promise; + this.streamSinks[streamId] = streamSink; + new Promise(function (resolve) { + resolve(action(data.data, streamSink)); + }).then(function () { + comObj.postMessage({ + sourceName: sourceName, + targetName: targetName, + stream: StreamKind.START_COMPLETE, + streamId: streamId, + success: true + }); + }, function (reason) { + comObj.postMessage({ + sourceName: sourceName, + targetName: targetName, + stream: StreamKind.START_COMPLETE, + streamId: streamId, + reason: wrapReason(reason) + }); + }); + } + }, { + key: "_processStreamMessage", + value: function _processStreamMessage(data) { + var streamId = data.streamId; + var sourceName = this.sourceName; + var targetName = data.sourceName; + var comObj = this.comObj; + + switch (data.stream) { + case StreamKind.START_COMPLETE: + if (data.success) { + this.streamControllers[streamId].startCall.resolve(); + } else { + this.streamControllers[streamId].startCall.reject(wrapReason(data.reason)); + } + + break; + + case StreamKind.PULL_COMPLETE: + if (data.success) { + this.streamControllers[streamId].pullCall.resolve(); + } else { + this.streamControllers[streamId].pullCall.reject(wrapReason(data.reason)); + } + + break; + + case StreamKind.PULL: + if (!this.streamSinks[streamId]) { + comObj.postMessage({ + sourceName: sourceName, + targetName: targetName, + stream: StreamKind.PULL_COMPLETE, + streamId: streamId, + success: true + }); + break; + } + + if (this.streamSinks[streamId].desiredSize <= 0 && data.desiredSize > 0) { + this.streamSinks[streamId].sinkCapability.resolve(); + } + + this.streamSinks[streamId].desiredSize = data.desiredSize; + var onPull = this.streamSinks[data.streamId].onPull; + new Promise(function (resolve) { + resolve(onPull && onPull()); + }).then(function () { + comObj.postMessage({ + sourceName: sourceName, + targetName: targetName, + stream: StreamKind.PULL_COMPLETE, + streamId: streamId, + success: true + }); + }, function (reason) { + comObj.postMessage({ + sourceName: sourceName, + targetName: targetName, + stream: StreamKind.PULL_COMPLETE, + streamId: streamId, + reason: wrapReason(reason) + }); + }); + break; + + case StreamKind.ENQUEUE: + (0, _util.assert)(this.streamControllers[streamId], "enqueue should have stream controller"); + + if (this.streamControllers[streamId].isClosed) { + break; + } + + this.streamControllers[streamId].controller.enqueue(data.chunk); + break; + + case StreamKind.CLOSE: + (0, _util.assert)(this.streamControllers[streamId], "close should have stream controller"); + + if (this.streamControllers[streamId].isClosed) { + break; + } + + this.streamControllers[streamId].isClosed = true; + this.streamControllers[streamId].controller.close(); + + this._deleteStreamController(streamId); + + break; + + case StreamKind.ERROR: + (0, _util.assert)(this.streamControllers[streamId], "error should have stream controller"); + this.streamControllers[streamId].controller.error(wrapReason(data.reason)); + + this._deleteStreamController(streamId); + + break; + + case StreamKind.CANCEL_COMPLETE: + if (data.success) { + this.streamControllers[streamId].cancelCall.resolve(); + } else { + this.streamControllers[streamId].cancelCall.reject(wrapReason(data.reason)); + } + + this._deleteStreamController(streamId); + + break; + + case StreamKind.CANCEL: + if (!this.streamSinks[streamId]) { + break; + } + + var onCancel = this.streamSinks[data.streamId].onCancel; + new Promise(function (resolve) { + resolve(onCancel && onCancel(wrapReason(data.reason))); + }).then(function () { + comObj.postMessage({ + sourceName: sourceName, + targetName: targetName, + stream: StreamKind.CANCEL_COMPLETE, + streamId: streamId, + success: true + }); + }, function (reason) { + comObj.postMessage({ + sourceName: sourceName, + targetName: targetName, + stream: StreamKind.CANCEL_COMPLETE, + streamId: streamId, + reason: wrapReason(reason) + }); + }); + this.streamSinks[streamId].sinkCapability.reject(wrapReason(data.reason)); + this.streamSinks[streamId].isCancelled = true; + delete this.streamSinks[streamId]; + break; + + default: + throw new Error("Unexpected stream case"); + } + } + }, { + key: "_deleteStreamController", + value: function () { + var _deleteStreamController2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee(streamId) { + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return Promise.allSettled([this.streamControllers[streamId].startCall, this.streamControllers[streamId].pullCall, this.streamControllers[streamId].cancelCall].map(function (capability) { + return capability && capability.promise; + })); + + case 2: + delete this.streamControllers[streamId]; + + case 3: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function _deleteStreamController(_x) { + return _deleteStreamController2.apply(this, arguments); + } + + return _deleteStreamController; + }() + }, { + key: "_postMessage", + value: function _postMessage(message, transfers) { + if (transfers && this.postMessageTransfers) { + this.comObj.postMessage(message, transfers); + } else { + this.comObj.postMessage(message); + } + } + }, { + key: "destroy", + value: function destroy() { + this.comObj.removeEventListener("message", this._onComObjOnMessage); + } + }]); + + return MessageHandler; +}(); + +exports.MessageHandler = MessageHandler; + +/***/ }), +/* 123 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.Metadata = void 0; + +var _util = __w_pdfjs_require__(4); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var Metadata = /*#__PURE__*/function () { + function Metadata(_ref) { + var parsedData = _ref.parsedData, + rawData = _ref.rawData; + + _classCallCheck(this, Metadata); + + this._metadataMap = parsedData; + this._data = rawData; + } + + _createClass(Metadata, [{ + key: "getRaw", + value: function getRaw() { + return this._data; + } + }, { + key: "get", + value: function get(name) { + var _this$_metadataMap$ge; + + return (_this$_metadataMap$ge = this._metadataMap.get(name)) !== null && _this$_metadataMap$ge !== void 0 ? _this$_metadataMap$ge : null; + } + }, { + key: "getAll", + value: function getAll() { + return (0, _util.objectFromMap)(this._metadataMap); + } + }, { + key: "has", + value: function has(name) { + return this._metadataMap.has(name); + } + }]); + + return Metadata; +}(); + +exports.Metadata = Metadata; + +/***/ }), +/* 124 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.OptionalContentConfig = void 0; + +var _util = __w_pdfjs_require__(4); + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var OptionalContentGroup = function OptionalContentGroup(name, intent) { + _classCallCheck(this, OptionalContentGroup); + + this.visible = true; + this.name = name; + this.intent = intent; +}; + +var OptionalContentConfig = /*#__PURE__*/function () { + function OptionalContentConfig(data) { + _classCallCheck(this, OptionalContentConfig); + + this.name = null; + this.creator = null; + this._order = null; + this._groups = new Map(); + + if (data === null) { + return; + } + + this.name = data.name; + this.creator = data.creator; + this._order = data.order; + + var _iterator = _createForOfIteratorHelper(data.groups), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var _group = _step.value; + + this._groups.set(_group.id, new OptionalContentGroup(_group.name, _group.intent)); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + if (data.baseState === "OFF") { + var _iterator2 = _createForOfIteratorHelper(this._groups), + _step2; + + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + var group = _step2.value; + group.visible = false; + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + } + + var _iterator3 = _createForOfIteratorHelper(data.on), + _step3; + + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { + var on = _step3.value; + this._groups.get(on).visible = true; + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); + } + + var _iterator4 = _createForOfIteratorHelper(data.off), + _step4; + + try { + for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { + var off = _step4.value; + this._groups.get(off).visible = false; + } + } catch (err) { + _iterator4.e(err); + } finally { + _iterator4.f(); + } + } + + _createClass(OptionalContentConfig, [{ + key: "_evaluateVisibilityExpression", + value: function _evaluateVisibilityExpression(array) { + var length = array.length; + + if (length < 2) { + return true; + } + + var operator = array[0]; + + for (var i = 1; i < length; i++) { + var element = array[i]; + var state = void 0; + + if (Array.isArray(element)) { + state = this._evaluateVisibilityExpression(element); + } else if (this._groups.has(element)) { + state = this._groups.get(element).visible; + } else { + (0, _util.warn)("Optional content group not found: ".concat(element)); + return true; + } + + switch (operator) { + case "And": + if (!state) { + return false; + } + + break; + + case "Or": + if (state) { + return true; + } + + break; + + case "Not": + return !state; + + default: + return true; + } + } + + return operator === "And"; + } + }, { + key: "isVisible", + value: function isVisible(group) { + if (group.type === "OCG") { + if (!this._groups.has(group.id)) { + (0, _util.warn)("Optional content group not found: ".concat(group.id)); + return true; + } + + return this._groups.get(group.id).visible; + } else if (group.type === "OCMD") { + if (group.expression) { + return this._evaluateVisibilityExpression(group.expression); + } + + if (!group.policy || group.policy === "AnyOn") { + var _iterator5 = _createForOfIteratorHelper(group.ids), + _step5; + + try { + for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { + var id = _step5.value; + + if (!this._groups.has(id)) { + (0, _util.warn)("Optional content group not found: ".concat(id)); + return true; + } + + if (this._groups.get(id).visible) { + return true; + } + } + } catch (err) { + _iterator5.e(err); + } finally { + _iterator5.f(); + } + + return false; + } else if (group.policy === "AllOn") { + var _iterator6 = _createForOfIteratorHelper(group.ids), + _step6; + + try { + for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) { + var _id = _step6.value; + + if (!this._groups.has(_id)) { + (0, _util.warn)("Optional content group not found: ".concat(_id)); + return true; + } + + if (!this._groups.get(_id).visible) { + return false; + } + } + } catch (err) { + _iterator6.e(err); + } finally { + _iterator6.f(); + } + + return true; + } else if (group.policy === "AnyOff") { + var _iterator7 = _createForOfIteratorHelper(group.ids), + _step7; + + try { + for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) { + var _id2 = _step7.value; + + if (!this._groups.has(_id2)) { + (0, _util.warn)("Optional content group not found: ".concat(_id2)); + return true; + } + + if (!this._groups.get(_id2).visible) { + return true; + } + } + } catch (err) { + _iterator7.e(err); + } finally { + _iterator7.f(); + } + + return false; + } else if (group.policy === "AllOff") { + var _iterator8 = _createForOfIteratorHelper(group.ids), + _step8; + + try { + for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) { + var _id3 = _step8.value; + + if (!this._groups.has(_id3)) { + (0, _util.warn)("Optional content group not found: ".concat(_id3)); + return true; + } + + if (this._groups.get(_id3).visible) { + return false; + } + } + } catch (err) { + _iterator8.e(err); + } finally { + _iterator8.f(); + } + + return true; + } + + (0, _util.warn)("Unknown optional content policy ".concat(group.policy, ".")); + return true; + } + + (0, _util.warn)("Unknown group type ".concat(group.type, ".")); + return true; + } + }, { + key: "setVisibility", + value: function setVisibility(id) { + var visible = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (!this._groups.has(id)) { + (0, _util.warn)("Optional content group not found: ".concat(id)); + return; + } + + this._groups.get(id).visible = !!visible; + } + }, { + key: "getOrder", + value: function getOrder() { + if (!this._groups.size) { + return null; + } + + if (this._order) { + return this._order.slice(); + } + + return Array.from(this._groups.keys()); + } + }, { + key: "getGroups", + value: function getGroups() { + return this._groups.size > 0 ? (0, _util.objectFromMap)(this._groups) : null; + } + }, { + key: "getGroup", + value: function getGroup(id) { + return this._groups.get(id) || null; + } + }]); + + return OptionalContentConfig; +}(); + +exports.OptionalContentConfig = OptionalContentConfig; + +/***/ }), +/* 125 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PDFDataTransportStream = void 0; + +var _regenerator = _interopRequireDefault(__w_pdfjs_require__(2)); + +var _util = __w_pdfjs_require__(4); + +var _display_utils = __w_pdfjs_require__(1); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var PDFDataTransportStream = /*#__PURE__*/function () { + function PDFDataTransportStream(params, pdfDataRangeTransport) { + var _this = this; + + _classCallCheck(this, PDFDataTransportStream); + + (0, _util.assert)(pdfDataRangeTransport, 'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.'); + this._queuedChunks = []; + this._progressiveDone = params.progressiveDone || false; + this._contentDispositionFilename = params.contentDispositionFilename || null; + var initialData = params.initialData; + + if ((initialData === null || initialData === void 0 ? void 0 : initialData.length) > 0) { + var buffer = new Uint8Array(initialData).buffer; + + this._queuedChunks.push(buffer); + } + + this._pdfDataRangeTransport = pdfDataRangeTransport; + this._isStreamingSupported = !params.disableStream; + this._isRangeSupported = !params.disableRange; + this._contentLength = params.length; + this._fullRequestReader = null; + this._rangeReaders = []; + + this._pdfDataRangeTransport.addRangeListener(function (begin, chunk) { + _this._onReceiveData({ + begin: begin, + chunk: chunk + }); + }); + + this._pdfDataRangeTransport.addProgressListener(function (loaded, total) { + _this._onProgress({ + loaded: loaded, + total: total + }); + }); + + this._pdfDataRangeTransport.addProgressiveReadListener(function (chunk) { + _this._onReceiveData({ + chunk: chunk + }); + }); + + this._pdfDataRangeTransport.addProgressiveDoneListener(function () { + _this._onProgressiveDone(); + }); + + this._pdfDataRangeTransport.transportReady(); + } + + _createClass(PDFDataTransportStream, [{ + key: "_onReceiveData", + value: function _onReceiveData(args) { + var buffer = new Uint8Array(args.chunk).buffer; + + if (args.begin === undefined) { + if (this._fullRequestReader) { + this._fullRequestReader._enqueue(buffer); + } else { + this._queuedChunks.push(buffer); + } + } else { + var found = this._rangeReaders.some(function (rangeReader) { + if (rangeReader._begin !== args.begin) { + return false; + } + + rangeReader._enqueue(buffer); + + return true; + }); + + (0, _util.assert)(found, "_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found."); + } + } + }, { + key: "_progressiveDataLength", + get: function get() { + var _this$_fullRequestRea, _this$_fullRequestRea2; + + return (_this$_fullRequestRea = (_this$_fullRequestRea2 = this._fullRequestReader) === null || _this$_fullRequestRea2 === void 0 ? void 0 : _this$_fullRequestRea2._loaded) !== null && _this$_fullRequestRea !== void 0 ? _this$_fullRequestRea : 0; + } + }, { + key: "_onProgress", + value: function _onProgress(evt) { + if (evt.total === undefined) { + var firstReader = this._rangeReaders[0]; + + if (firstReader !== null && firstReader !== void 0 && firstReader.onProgress) { + firstReader.onProgress({ + loaded: evt.loaded + }); + } + } else { + var fullReader = this._fullRequestReader; + + if (fullReader !== null && fullReader !== void 0 && fullReader.onProgress) { + fullReader.onProgress({ + loaded: evt.loaded, + total: evt.total + }); + } + } + } + }, { + key: "_onProgressiveDone", + value: function _onProgressiveDone() { + if (this._fullRequestReader) { + this._fullRequestReader.progressiveDone(); + } + + this._progressiveDone = true; + } + }, { + key: "_removeRangeReader", + value: function _removeRangeReader(reader) { + var i = this._rangeReaders.indexOf(reader); + + if (i >= 0) { + this._rangeReaders.splice(i, 1); + } + } + }, { + key: "getFullReader", + value: function getFullReader() { + (0, _util.assert)(!this._fullRequestReader, "PDFDataTransportStream.getFullReader can only be called once."); + var queuedChunks = this._queuedChunks; + this._queuedChunks = null; + return new PDFDataTransportStreamReader(this, queuedChunks, this._progressiveDone, this._contentDispositionFilename); + } + }, { + key: "getRangeReader", + value: function getRangeReader(begin, end) { + if (end <= this._progressiveDataLength) { + return null; + } + + var reader = new PDFDataTransportStreamRangeReader(this, begin, end); + + this._pdfDataRangeTransport.requestDataRange(begin, end); + + this._rangeReaders.push(reader); + + return reader; + } + }, { + key: "cancelAllRequests", + value: function cancelAllRequests(reason) { + if (this._fullRequestReader) { + this._fullRequestReader.cancel(reason); + } + + var _iterator = _createForOfIteratorHelper(this._rangeReaders.slice(0)), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var reader = _step.value; + reader.cancel(reason); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + this._pdfDataRangeTransport.abort(); + } + }]); + + return PDFDataTransportStream; +}(); + +exports.PDFDataTransportStream = PDFDataTransportStream; + +var PDFDataTransportStreamReader = /*#__PURE__*/function () { + function PDFDataTransportStreamReader(stream, queuedChunks) { + var progressiveDone = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var contentDispositionFilename = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; + + _classCallCheck(this, PDFDataTransportStreamReader); + + this._stream = stream; + this._done = progressiveDone || false; + this._filename = (0, _display_utils.isPdfFile)(contentDispositionFilename) ? contentDispositionFilename : null; + this._queuedChunks = queuedChunks || []; + this._loaded = 0; + + var _iterator2 = _createForOfIteratorHelper(this._queuedChunks), + _step2; + + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + var chunk = _step2.value; + this._loaded += chunk.byteLength; + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + + this._requests = []; + this._headersReady = Promise.resolve(); + stream._fullRequestReader = this; + this.onProgress = null; + } + + _createClass(PDFDataTransportStreamReader, [{ + key: "_enqueue", + value: function _enqueue(chunk) { + if (this._done) { + return; + } + + if (this._requests.length > 0) { + var requestCapability = this._requests.shift(); + + requestCapability.resolve({ + value: chunk, + done: false + }); + } else { + this._queuedChunks.push(chunk); + } + + this._loaded += chunk.byteLength; + } + }, { + key: "headersReady", + get: function get() { + return this._headersReady; + } + }, { + key: "filename", + get: function get() { + return this._filename; + } + }, { + key: "isRangeSupported", + get: function get() { + return this._stream._isRangeSupported; + } + }, { + key: "isStreamingSupported", + get: function get() { + return this._stream._isStreamingSupported; + } + }, { + key: "contentLength", + get: function get() { + return this._stream._contentLength; + } + }, { + key: "read", + value: function () { + var _read = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee() { + var chunk, requestCapability; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + if (!(this._queuedChunks.length > 0)) { + _context.next = 3; + break; + } + + chunk = this._queuedChunks.shift(); + return _context.abrupt("return", { + value: chunk, + done: false + }); + + case 3: + if (!this._done) { + _context.next = 5; + break; + } + + return _context.abrupt("return", { + value: undefined, + done: true + }); + + case 5: + requestCapability = (0, _util.createPromiseCapability)(); + + this._requests.push(requestCapability); + + return _context.abrupt("return", requestCapability.promise); + + case 8: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function read() { + return _read.apply(this, arguments); + } + + return read; + }() + }, { + key: "cancel", + value: function cancel(reason) { + this._done = true; + + var _iterator3 = _createForOfIteratorHelper(this._requests), + _step3; + + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { + var requestCapability = _step3.value; + requestCapability.resolve({ + value: undefined, + done: true + }); + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); + } + + this._requests.length = 0; + } + }, { + key: "progressiveDone", + value: function progressiveDone() { + if (this._done) { + return; + } + + this._done = true; + } + }]); + + return PDFDataTransportStreamReader; +}(); + +var PDFDataTransportStreamRangeReader = /*#__PURE__*/function () { + function PDFDataTransportStreamRangeReader(stream, begin, end) { + _classCallCheck(this, PDFDataTransportStreamRangeReader); + + this._stream = stream; + this._begin = begin; + this._end = end; + this._queuedChunk = null; + this._requests = []; + this._done = false; + this.onProgress = null; + } + + _createClass(PDFDataTransportStreamRangeReader, [{ + key: "_enqueue", + value: function _enqueue(chunk) { + if (this._done) { + return; + } + + if (this._requests.length === 0) { + this._queuedChunk = chunk; + } else { + var requestsCapability = this._requests.shift(); + + requestsCapability.resolve({ + value: chunk, + done: false + }); + + var _iterator4 = _createForOfIteratorHelper(this._requests), + _step4; + + try { + for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { + var requestCapability = _step4.value; + requestCapability.resolve({ + value: undefined, + done: true + }); + } + } catch (err) { + _iterator4.e(err); + } finally { + _iterator4.f(); + } + + this._requests.length = 0; + } + + this._done = true; + + this._stream._removeRangeReader(this); + } + }, { + key: "isStreamingSupported", + get: function get() { + return false; + } + }, { + key: "read", + value: function () { + var _read2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee2() { + var chunk, requestCapability; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + if (!this._queuedChunk) { + _context2.next = 4; + break; + } + + chunk = this._queuedChunk; + this._queuedChunk = null; + return _context2.abrupt("return", { + value: chunk, + done: false + }); + + case 4: + if (!this._done) { + _context2.next = 6; + break; + } + + return _context2.abrupt("return", { + value: undefined, + done: true + }); + + case 6: + requestCapability = (0, _util.createPromiseCapability)(); + + this._requests.push(requestCapability); + + return _context2.abrupt("return", requestCapability.promise); + + case 9: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function read() { + return _read2.apply(this, arguments); + } + + return read; + }() + }, { + key: "cancel", + value: function cancel(reason) { + this._done = true; + + var _iterator5 = _createForOfIteratorHelper(this._requests), + _step5; + + try { + for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { + var requestCapability = _step5.value; + requestCapability.resolve({ + value: undefined, + done: true + }); + } + } catch (err) { + _iterator5.e(err); + } finally { + _iterator5.f(); + } + + this._requests.length = 0; + + this._stream._removeRangeReader(this); + } + }]); + + return PDFDataTransportStreamRangeReader; +}(); + +/***/ }), +/* 126 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.AnnotationLayer = void 0; + +var _display_utils = __w_pdfjs_require__(1); + +var _util = __w_pdfjs_require__(4); + +var _annotation_storage = __w_pdfjs_require__(118); + +var _scripting_utils = __w_pdfjs_require__(127); + +function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); } + +function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; } + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var AnnotationElementFactory = /*#__PURE__*/function () { + function AnnotationElementFactory() { + _classCallCheck(this, AnnotationElementFactory); + } + + _createClass(AnnotationElementFactory, null, [{ + key: "create", + value: function create(parameters) { + var subtype = parameters.data.annotationType; + + switch (subtype) { + case _util.AnnotationType.LINK: + return new LinkAnnotationElement(parameters); + + case _util.AnnotationType.TEXT: + return new TextAnnotationElement(parameters); + + case _util.AnnotationType.WIDGET: + var fieldType = parameters.data.fieldType; + + switch (fieldType) { + case "Tx": + return new TextWidgetAnnotationElement(parameters); + + case "Btn": + if (parameters.data.radioButton) { + return new RadioButtonWidgetAnnotationElement(parameters); + } else if (parameters.data.checkBox) { + return new CheckboxWidgetAnnotationElement(parameters); + } + + return new PushButtonWidgetAnnotationElement(parameters); + + case "Ch": + return new ChoiceWidgetAnnotationElement(parameters); + } + + return new WidgetAnnotationElement(parameters); + + case _util.AnnotationType.POPUP: + return new PopupAnnotationElement(parameters); + + case _util.AnnotationType.FREETEXT: + return new FreeTextAnnotationElement(parameters); + + case _util.AnnotationType.LINE: + return new LineAnnotationElement(parameters); + + case _util.AnnotationType.SQUARE: + return new SquareAnnotationElement(parameters); + + case _util.AnnotationType.CIRCLE: + return new CircleAnnotationElement(parameters); + + case _util.AnnotationType.POLYLINE: + return new PolylineAnnotationElement(parameters); + + case _util.AnnotationType.CARET: + return new CaretAnnotationElement(parameters); + + case _util.AnnotationType.INK: + return new InkAnnotationElement(parameters); + + case _util.AnnotationType.POLYGON: + return new PolygonAnnotationElement(parameters); + + case _util.AnnotationType.HIGHLIGHT: + return new HighlightAnnotationElement(parameters); + + case _util.AnnotationType.UNDERLINE: + return new UnderlineAnnotationElement(parameters); + + case _util.AnnotationType.SQUIGGLY: + return new SquigglyAnnotationElement(parameters); + + case _util.AnnotationType.STRIKEOUT: + return new StrikeOutAnnotationElement(parameters); + + case _util.AnnotationType.STAMP: + return new StampAnnotationElement(parameters); + + case _util.AnnotationType.FILEATTACHMENT: + return new FileAttachmentAnnotationElement(parameters); + + default: + return new AnnotationElement(parameters); + } + } + }]); + + return AnnotationElementFactory; +}(); + +var AnnotationElement = /*#__PURE__*/function () { + function AnnotationElement(parameters) { + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$isRenderable = _ref.isRenderable, + isRenderable = _ref$isRenderable === void 0 ? false : _ref$isRenderable, + _ref$ignoreBorder = _ref.ignoreBorder, + ignoreBorder = _ref$ignoreBorder === void 0 ? false : _ref$ignoreBorder, + _ref$createQuadrilate = _ref.createQuadrilaterals, + createQuadrilaterals = _ref$createQuadrilate === void 0 ? false : _ref$createQuadrilate; + + _classCallCheck(this, AnnotationElement); + + this.isRenderable = isRenderable; + this.data = parameters.data; + this.layer = parameters.layer; + this.page = parameters.page; + this.viewport = parameters.viewport; + this.linkService = parameters.linkService; + this.downloadManager = parameters.downloadManager; + this.imageResourcesPath = parameters.imageResourcesPath; + this.renderInteractiveForms = parameters.renderInteractiveForms; + this.svgFactory = parameters.svgFactory; + this.annotationStorage = parameters.annotationStorage; + this.enableScripting = parameters.enableScripting; + this.hasJSActions = parameters.hasJSActions; + this._mouseState = parameters.mouseState; + + if (isRenderable) { + this.container = this._createContainer(ignoreBorder); + } + + if (createQuadrilaterals) { + this.quadrilaterals = this._createQuadrilaterals(ignoreBorder); + } + } + + _createClass(AnnotationElement, [{ + key: "_createContainer", + value: function _createContainer() { + var ignoreBorder = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var data = this.data, + page = this.page, + viewport = this.viewport; + var container = document.createElement("section"); + var width = data.rect[2] - data.rect[0]; + var height = data.rect[3] - data.rect[1]; + container.setAttribute("data-annotation-id", data.id); + + var 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]]); + + container.style.transform = "matrix(".concat(viewport.transform.join(","), ")"); + container.style.transformOrigin = "".concat(-rect[0], "px ").concat(-rect[1], "px"); + + if (!ignoreBorder && data.borderStyle.width > 0) { + container.style.borderWidth = "".concat(data.borderStyle.width, "px"); + + if (data.borderStyle.style !== _util.AnnotationBorderStyleType.UNDERLINE) { + width -= 2 * data.borderStyle.width; + height -= 2 * data.borderStyle.width; + } + + var horizontalRadius = data.borderStyle.horizontalCornerRadius; + var verticalRadius = data.borderStyle.verticalCornerRadius; + + if (horizontalRadius > 0 || verticalRadius > 0) { + var radius = "".concat(horizontalRadius, "px / ").concat(verticalRadius, "px"); + container.style.borderRadius = radius; + } + + switch (data.borderStyle.style) { + case _util.AnnotationBorderStyleType.SOLID: + container.style.borderStyle = "solid"; + break; + + case _util.AnnotationBorderStyleType.DASHED: + container.style.borderStyle = "dashed"; + break; + + case _util.AnnotationBorderStyleType.BEVELED: + (0, _util.warn)("Unimplemented border style: beveled"); + break; + + case _util.AnnotationBorderStyleType.INSET: + (0, _util.warn)("Unimplemented border style: inset"); + break; + + case _util.AnnotationBorderStyleType.UNDERLINE: + container.style.borderBottomStyle = "solid"; + break; + + default: + break; + } + + if (data.color) { + container.style.borderColor = _util.Util.makeHexColor(data.color[0] | 0, data.color[1] | 0, data.color[2] | 0); + } else { + container.style.borderWidth = 0; + } + } + + container.style.left = "".concat(rect[0], "px"); + container.style.top = "".concat(rect[1], "px"); + container.style.width = "".concat(width, "px"); + container.style.height = "".concat(height, "px"); + return container; + } + }, { + key: "_createQuadrilaterals", + value: function _createQuadrilaterals() { + var ignoreBorder = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + if (!this.data.quadPoints) { + return null; + } + + var quadrilaterals = []; + var savedRect = this.data.rect; + + var _iterator = _createForOfIteratorHelper(this.data.quadPoints), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var quadPoint = _step.value; + this.data.rect = [quadPoint[2].x, quadPoint[2].y, quadPoint[1].x, quadPoint[1].y]; + quadrilaterals.push(this._createContainer(ignoreBorder)); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + this.data.rect = savedRect; + return quadrilaterals; + } + }, { + key: "_createPopup", + value: function _createPopup(trigger, data) { + var container = this.container; + + if (this.quadrilaterals) { + trigger = trigger || this.quadrilaterals; + container = this.quadrilaterals[0]; + } + + if (!trigger) { + trigger = document.createElement("div"); + trigger.style.height = container.style.height; + trigger.style.width = container.style.width; + container.appendChild(trigger); + } + + var popupElement = new PopupElement({ + container: container, + trigger: trigger, + color: data.color, + title: data.title, + modificationDate: data.modificationDate, + contents: data.contents, + hideWrapper: true + }); + var popup = popupElement.render(); + popup.style.left = container.style.width; + container.appendChild(popup); + } + }, { + key: "_renderQuadrilaterals", + value: function _renderQuadrilaterals(className) { + var _iterator2 = _createForOfIteratorHelper(this.quadrilaterals), + _step2; + + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + var quadrilateral = _step2.value; + quadrilateral.className = className; + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + + return this.quadrilaterals; + } + }, { + key: "render", + value: function render() { + (0, _util.unreachable)("Abstract method `AnnotationElement.render` called"); + } + }]); + + return AnnotationElement; +}(); + +var LinkAnnotationElement = /*#__PURE__*/function (_AnnotationElement) { + _inherits(LinkAnnotationElement, _AnnotationElement); + + var _super = _createSuper(LinkAnnotationElement); + + function LinkAnnotationElement(parameters) { + _classCallCheck(this, LinkAnnotationElement); + + var isRenderable = !!(parameters.data.url || parameters.data.dest || parameters.data.action || parameters.data.isTooltipOnly || parameters.data.actions && (parameters.data.actions.Action || parameters.data.actions["Mouse Up"] || parameters.data.actions["Mouse Down"])); + return _super.call(this, parameters, { + isRenderable: isRenderable, + createQuadrilaterals: true + }); + } + + _createClass(LinkAnnotationElement, [{ + key: "render", + value: function render() { + var data = this.data, + linkService = this.linkService; + var link = document.createElement("a"); + + if (data.url) { + (0, _display_utils.addLinkAttributes)(link, { + url: data.url, + target: data.newWindow ? _display_utils.LinkTarget.BLANK : linkService.externalLinkTarget, + rel: linkService.externalLinkRel, + enabled: linkService.externalLinkEnabled + }); + } else if (data.action) { + this._bindNamedAction(link, data.action); + } else if (data.dest) { + this._bindLink(link, data.dest); + } else if (data.actions && (data.actions.Action || data.actions["Mouse Up"] || data.actions["Mouse Down"]) && this.enableScripting && this.hasJSActions) { + this._bindJSAction(link, data); + } else { + this._bindLink(link, ""); + } + + if (this.quadrilaterals) { + return this._renderQuadrilaterals("linkAnnotation").map(function (quadrilateral, index) { + var linkElement = index === 0 ? link : link.cloneNode(); + quadrilateral.appendChild(linkElement); + return quadrilateral; + }); + } + + this.container.className = "linkAnnotation"; + this.container.appendChild(link); + return this.container; + } + }, { + key: "_bindLink", + value: function _bindLink(link, destination) { + var _this = this; + + link.href = this.linkService.getDestinationHash(destination); + + link.onclick = function () { + if (destination) { + _this.linkService.goToDestination(destination); + } + + return false; + }; + + if (destination || destination === "") { + link.className = "internalLink"; + } + } + }, { + key: "_bindNamedAction", + value: function _bindNamedAction(link, action) { + var _this2 = this; + + link.href = this.linkService.getAnchorUrl(""); + + link.onclick = function () { + _this2.linkService.executeNamedAction(action); + + return false; + }; + + link.className = "internalLink"; + } + }, { + key: "_bindJSAction", + value: function _bindJSAction(link, data) { + var _this3 = this; + + link.href = this.linkService.getAnchorUrl(""); + var map = new Map([["Action", "onclick"], ["Mouse Up", "onmouseup"], ["Mouse Down", "onmousedown"]]); + + var _loop = function _loop() { + var name = _Object$keys[_i]; + var jsName = map.get(name); + + if (!jsName) { + return "continue"; + } + + link[jsName] = function () { + var _this3$linkService$ev; + + (_this3$linkService$ev = _this3.linkService.eventBus) === null || _this3$linkService$ev === void 0 ? void 0 : _this3$linkService$ev.dispatch("dispatcheventinsandbox", { + source: _this3, + detail: { + id: data.id, + name: name + } + }); + return false; + }; + }; + + for (var _i = 0, _Object$keys = Object.keys(data.actions); _i < _Object$keys.length; _i++) { + var _ret = _loop(); + + if (_ret === "continue") continue; + } + + link.className = "internalLink"; + } + }]); + + return LinkAnnotationElement; +}(AnnotationElement); + +var TextAnnotationElement = /*#__PURE__*/function (_AnnotationElement2) { + _inherits(TextAnnotationElement, _AnnotationElement2); + + var _super2 = _createSuper(TextAnnotationElement); + + function TextAnnotationElement(parameters) { + _classCallCheck(this, TextAnnotationElement); + + var isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + return _super2.call(this, parameters, { + isRenderable: isRenderable + }); + } + + _createClass(TextAnnotationElement, [{ + key: "render", + value: function render() { + this.container.className = "textAnnotation"; + var image = document.createElement("img"); + image.style.height = this.container.style.height; + image.style.width = this.container.style.width; + image.src = this.imageResourcesPath + "annotation-" + this.data.name.toLowerCase() + ".svg"; + image.alt = "[{{type}} Annotation]"; + image.dataset.l10nId = "text_annotation_type"; + image.dataset.l10nArgs = JSON.stringify({ + type: this.data.name + }); + + if (!this.data.hasPopup) { + this._createPopup(image, this.data); + } + + this.container.appendChild(image); + return this.container; + } + }]); + + return TextAnnotationElement; +}(AnnotationElement); + +var WidgetAnnotationElement = /*#__PURE__*/function (_AnnotationElement3) { + _inherits(WidgetAnnotationElement, _AnnotationElement3); + + var _super3 = _createSuper(WidgetAnnotationElement); + + function WidgetAnnotationElement() { + _classCallCheck(this, WidgetAnnotationElement); + + return _super3.apply(this, arguments); + } + + _createClass(WidgetAnnotationElement, [{ + key: "render", + value: function render() { + if (this.data.alternativeText) { + this.container.title = this.data.alternativeText; + } + + return this.container; + } + }, { + key: "_getKeyModifier", + value: function _getKeyModifier(event) { + return navigator.platform.includes("Win") && event.ctrlKey || navigator.platform.includes("Mac") && event.metaKey; + } + }, { + key: "_setEventListener", + value: function _setEventListener(element, baseName, eventName, valueGetter) { + var _this4 = this; + + if (baseName.includes("mouse")) { + element.addEventListener(baseName, function (event) { + var _this4$linkService$ev; + + (_this4$linkService$ev = _this4.linkService.eventBus) === null || _this4$linkService$ev === void 0 ? void 0 : _this4$linkService$ev.dispatch("dispatcheventinsandbox", { + source: _this4, + detail: { + id: _this4.data.id, + name: eventName, + value: valueGetter(event), + shift: event.shiftKey, + modifier: _this4._getKeyModifier(event) + } + }); + }); + } else { + element.addEventListener(baseName, function (event) { + var _this4$linkService$ev2; + + (_this4$linkService$ev2 = _this4.linkService.eventBus) === null || _this4$linkService$ev2 === void 0 ? void 0 : _this4$linkService$ev2.dispatch("dispatcheventinsandbox", { + source: _this4, + detail: { + id: _this4.data.id, + name: eventName, + value: event.target.checked + } + }); + }); + } + } + }, { + key: "_setEventListeners", + value: function _setEventListeners(element, names, getter) { + var _iterator3 = _createForOfIteratorHelper(names), + _step3; + + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { + var _this$data$actions; + + var _step3$value = _slicedToArray(_step3.value, 2), + baseName = _step3$value[0], + eventName = _step3$value[1]; + + if (eventName === "Action" || (_this$data$actions = this.data.actions) !== null && _this$data$actions !== void 0 && _this$data$actions[eventName]) { + this._setEventListener(element, baseName, eventName, getter); + } + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); + } + } + }, { + key: "_dispatchEventFromSandbox", + value: function _dispatchEventFromSandbox(actions, jsEvent) { + var _this5 = this; + + var setColor = function setColor(jsName, styleName, event) { + var color = event.detail[jsName]; + event.target.style[styleName] = _scripting_utils.ColorConverters["".concat(color[0], "_HTML")](color.slice(1)); + }; + + var commonActions = { + display: function display(event) { + var hidden = event.detail.display % 2 === 1; + event.target.style.visibility = hidden ? "hidden" : "visible"; + + _this5.annotationStorage.setValue(_this5.data.id, { + hidden: hidden, + print: event.detail.display === 0 || event.detail.display === 3 + }); + }, + print: function print(event) { + _this5.annotationStorage.setValue(_this5.data.id, { + print: event.detail.print + }); + }, + hidden: function hidden(event) { + event.target.style.visibility = event.detail.hidden ? "hidden" : "visible"; + + _this5.annotationStorage.setValue(_this5.data.id, { + hidden: event.detail.hidden + }); + }, + focus: function focus(event) { + setTimeout(function () { + return event.target.focus({ + preventScroll: false + }); + }, 0); + }, + userName: function userName(event) { + event.target.title = event.detail.userName; + }, + readonly: function readonly(event) { + if (event.detail.readonly) { + event.target.setAttribute("readonly", ""); + } else { + event.target.removeAttribute("readonly"); + } + }, + required: function required(event) { + if (event.detail.required) { + event.target.setAttribute("required", ""); + } else { + event.target.removeAttribute("required"); + } + }, + bgColor: function bgColor(event) { + setColor("bgColor", "backgroundColor", event); + }, + fillColor: function fillColor(event) { + setColor("fillColor", "backgroundColor", event); + }, + fgColor: function fgColor(event) { + setColor("fgColor", "color", event); + }, + textColor: function textColor(event) { + setColor("textColor", "color", event); + }, + borderColor: function borderColor(event) { + setColor("borderColor", "borderColor", event); + }, + strokeColor: function strokeColor(event) { + setColor("strokeColor", "borderColor", event); + } + }; + + for (var _i2 = 0, _Object$keys2 = Object.keys(jsEvent.detail); _i2 < _Object$keys2.length; _i2++) { + var name = _Object$keys2[_i2]; + var action = actions[name] || commonActions[name]; + + if (action) { + action(jsEvent); + } + } + } + }]); + + return WidgetAnnotationElement; +}(AnnotationElement); + +var TextWidgetAnnotationElement = /*#__PURE__*/function (_WidgetAnnotationElem) { + _inherits(TextWidgetAnnotationElement, _WidgetAnnotationElem); + + var _super4 = _createSuper(TextWidgetAnnotationElement); + + function TextWidgetAnnotationElement(parameters) { + _classCallCheck(this, TextWidgetAnnotationElement); + + var isRenderable = parameters.renderInteractiveForms || !parameters.data.hasAppearance && !!parameters.data.fieldValue; + return _super4.call(this, parameters, { + isRenderable: isRenderable + }); + } + + _createClass(TextWidgetAnnotationElement, [{ + key: "setPropertyOnSiblings", + value: function setPropertyOnSiblings(base, key, value, keyInStorage) { + var storage = this.annotationStorage; + + var _iterator4 = _createForOfIteratorHelper(document.getElementsByName(base.name)), + _step4; + + try { + for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { + var element = _step4.value; + + if (element !== base) { + element[key] = value; + var data = Object.create(null); + data[keyInStorage] = value; + storage.setValue(element.getAttribute("id"), data); + } + } + } catch (err) { + _iterator4.e(err); + } finally { + _iterator4.f(); + } + } + }, { + key: "render", + value: function render() { + var _this6 = this; + + var storage = this.annotationStorage; + var id = this.data.id; + this.container.className = "textWidgetAnnotation"; + var element = null; + + if (this.renderInteractiveForms) { + var storedData = storage.getValue(id, { + value: this.data.fieldValue, + valueAsString: this.data.fieldValue + }); + var textContent = storedData.valueAsString || storedData.value || ""; + var elementData = { + userValue: null, + formattedValue: null, + beforeInputSelectionRange: null, + beforeInputValue: null + }; + + if (this.data.multiLine) { + element = document.createElement("textarea"); + element.textContent = textContent; + } else { + element = document.createElement("input"); + element.type = "text"; + element.setAttribute("value", textContent); + } + + elementData.userValue = textContent; + element.setAttribute("id", id); + element.addEventListener("input", function (event) { + storage.setValue(id, { + value: event.target.value + }); + + _this6.setPropertyOnSiblings(element, "value", event.target.value, "value"); + }); + + var blurListener = function blurListener(event) { + if (elementData.formattedValue) { + event.target.value = elementData.formattedValue; + } + + event.target.scrollLeft = 0; + elementData.beforeInputSelectionRange = null; + }; + + if (this.enableScripting && this.hasJSActions) { + var _this$data$actions2; + + element.addEventListener("focus", function (event) { + if (elementData.userValue) { + event.target.value = elementData.userValue; + } + }); + element.addEventListener("updatefromsandbox", function (jsEvent) { + var actions = { + value: function value(event) { + elementData.userValue = event.detail.value || ""; + storage.setValue(id, { + value: elementData.userValue.toString() + }); + + if (!elementData.formattedValue) { + event.target.value = elementData.userValue; + } + }, + valueAsString: function valueAsString(event) { + elementData.formattedValue = event.detail.valueAsString || ""; + + if (event.target !== document.activeElement) { + event.target.value = elementData.formattedValue; + } + + storage.setValue(id, { + formattedValue: elementData.formattedValue + }); + }, + selRange: function selRange(event) { + var _event$detail$selRang = _slicedToArray(event.detail.selRange, 2), + selStart = _event$detail$selRang[0], + selEnd = _event$detail$selRang[1]; + + if (selStart >= 0 && selEnd < event.target.value.length) { + event.target.setSelectionRange(selStart, selEnd); + } + } + }; + + _this6._dispatchEventFromSandbox(actions, jsEvent); + }); + element.addEventListener("keydown", function (event) { + var _this6$linkService$ev; + + elementData.beforeInputValue = event.target.value; + var commitKey = -1; + + if (event.key === "Escape") { + commitKey = 0; + } else if (event.key === "Enter") { + commitKey = 2; + } else if (event.key === "Tab") { + commitKey = 3; + } + + if (commitKey === -1) { + return; + } + + elementData.userValue = event.target.value; + (_this6$linkService$ev = _this6.linkService.eventBus) === null || _this6$linkService$ev === void 0 ? void 0 : _this6$linkService$ev.dispatch("dispatcheventinsandbox", { + source: _this6, + detail: { + id: id, + name: "Keystroke", + value: event.target.value, + willCommit: true, + commitKey: commitKey, + selStart: event.target.selectionStart, + selEnd: event.target.selectionEnd + } + }); + }); + var _blurListener = blurListener; + blurListener = null; + element.addEventListener("blur", function (event) { + if (_this6._mouseState.isDown) { + var _this6$linkService$ev2; + + elementData.userValue = event.target.value; + (_this6$linkService$ev2 = _this6.linkService.eventBus) === null || _this6$linkService$ev2 === void 0 ? void 0 : _this6$linkService$ev2.dispatch("dispatcheventinsandbox", { + source: _this6, + detail: { + id: id, + name: "Keystroke", + value: event.target.value, + willCommit: true, + commitKey: 1, + selStart: event.target.selectionStart, + selEnd: event.target.selectionEnd + } + }); + } + + _blurListener(event); + }); + element.addEventListener("mousedown", function (event) { + elementData.beforeInputValue = event.target.value; + elementData.beforeInputSelectionRange = null; + }); + element.addEventListener("keyup", function (event) { + if (event.target.selectionStart === event.target.selectionEnd) { + elementData.beforeInputSelectionRange = null; + } + }); + element.addEventListener("select", function (event) { + elementData.beforeInputSelectionRange = [event.target.selectionStart, event.target.selectionEnd]; + }); + + if ((_this$data$actions2 = this.data.actions) !== null && _this$data$actions2 !== void 0 && _this$data$actions2.Keystroke) { + element.addEventListener("input", function (event) { + var _this6$linkService$ev3; + + var selStart = -1; + var selEnd = -1; + + if (elementData.beforeInputSelectionRange) { + var _elementData$beforeIn = _slicedToArray(elementData.beforeInputSelectionRange, 2); + + selStart = _elementData$beforeIn[0]; + selEnd = _elementData$beforeIn[1]; + } + + (_this6$linkService$ev3 = _this6.linkService.eventBus) === null || _this6$linkService$ev3 === void 0 ? void 0 : _this6$linkService$ev3.dispatch("dispatcheventinsandbox", { + source: _this6, + detail: { + id: id, + name: "Keystroke", + value: elementData.beforeInputValue, + change: event.data, + willCommit: false, + selStart: selStart, + selEnd: selEnd + } + }); + }); + } + + this._setEventListeners(element, [["focus", "Focus"], ["blur", "Blur"], ["mousedown", "Mouse Down"], ["mouseenter", "Mouse Enter"], ["mouseleave", "Mouse Exit"], ["mouseup", "Mouse Up"]], function (event) { + return event.target.value; + }); + } + + if (blurListener) { + element.addEventListener("blur", blurListener); + } + + element.disabled = this.data.readOnly; + element.name = this.data.fieldName; + + if (this.data.maxLen !== null) { + element.maxLength = this.data.maxLen; + } + + if (this.data.comb) { + var fieldWidth = this.data.rect[2] - this.data.rect[0]; + var combWidth = fieldWidth / this.data.maxLen; + element.classList.add("comb"); + element.style.letterSpacing = "calc(".concat(combWidth, "px - 1ch)"); + } + } else { + element = document.createElement("div"); + element.textContent = this.data.fieldValue; + element.style.verticalAlign = "middle"; + element.style.display = "table-cell"; + } + + this._setTextStyle(element); + + this.container.appendChild(element); + return this.container; + } + }, { + key: "_setTextStyle", + value: function _setTextStyle(element) { + var TEXT_ALIGNMENT = ["left", "center", "right"]; + var _this$data$defaultApp = this.data.defaultAppearanceData, + fontSize = _this$data$defaultApp.fontSize, + fontColor = _this$data$defaultApp.fontColor; + var style = element.style; + + if (fontSize) { + style.fontSize = "".concat(fontSize, "px"); + } + + style.color = _util.Util.makeHexColor(fontColor[0], fontColor[1], fontColor[2]); + + if (this.data.textAlignment !== null) { + style.textAlign = TEXT_ALIGNMENT[this.data.textAlignment]; + } + } + }]); + + return TextWidgetAnnotationElement; +}(WidgetAnnotationElement); + +var CheckboxWidgetAnnotationElement = /*#__PURE__*/function (_WidgetAnnotationElem2) { + _inherits(CheckboxWidgetAnnotationElement, _WidgetAnnotationElem2); + + var _super5 = _createSuper(CheckboxWidgetAnnotationElement); + + function CheckboxWidgetAnnotationElement(parameters) { + _classCallCheck(this, CheckboxWidgetAnnotationElement); + + return _super5.call(this, parameters, { + isRenderable: parameters.renderInteractiveForms + }); + } + + _createClass(CheckboxWidgetAnnotationElement, [{ + key: "render", + value: function render() { + var _this7 = this; + + var storage = this.annotationStorage; + var data = this.data; + var id = data.id; + var value = storage.getValue(id, { + value: data.fieldValue && (data.exportValue && data.exportValue === data.fieldValue || !data.exportValue && data.fieldValue !== "Off") + }).value; + + if (typeof value === "string") { + value = value !== "Off"; + storage.setValue(id, { + value: value + }); + } + + this.container.className = "buttonWidgetAnnotation checkBox"; + var element = document.createElement("input"); + element.disabled = data.readOnly; + element.type = "checkbox"; + element.name = this.data.fieldName; + + if (value) { + element.setAttribute("checked", true); + } + + element.setAttribute("id", id); + element.addEventListener("change", function (event) { + var name = event.target.name; + + var _iterator5 = _createForOfIteratorHelper(document.getElementsByName(name)), + _step5; + + try { + for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { + var checkbox = _step5.value; + + if (checkbox !== event.target) { + checkbox.checked = false; + storage.setValue(checkbox.parentNode.getAttribute("data-annotation-id"), { + value: false + }); + } + } + } catch (err) { + _iterator5.e(err); + } finally { + _iterator5.f(); + } + + storage.setValue(id, { + value: event.target.checked + }); + }); + + if (this.enableScripting && this.hasJSActions) { + element.addEventListener("updatefromsandbox", function (jsEvent) { + var actions = { + value: function value(event) { + event.target.checked = event.detail.value !== "Off"; + storage.setValue(id, { + value: event.target.checked + }); + } + }; + + _this7._dispatchEventFromSandbox(actions, jsEvent); + }); + + this._setEventListeners(element, [["change", "Validate"], ["change", "Action"], ["focus", "Focus"], ["blur", "Blur"], ["mousedown", "Mouse Down"], ["mouseenter", "Mouse Enter"], ["mouseleave", "Mouse Exit"], ["mouseup", "Mouse Up"]], function (event) { + return event.target.checked; + }); + } + + this.container.appendChild(element); + return this.container; + } + }]); + + return CheckboxWidgetAnnotationElement; +}(WidgetAnnotationElement); + +var RadioButtonWidgetAnnotationElement = /*#__PURE__*/function (_WidgetAnnotationElem3) { + _inherits(RadioButtonWidgetAnnotationElement, _WidgetAnnotationElem3); + + var _super6 = _createSuper(RadioButtonWidgetAnnotationElement); + + function RadioButtonWidgetAnnotationElement(parameters) { + _classCallCheck(this, RadioButtonWidgetAnnotationElement); + + return _super6.call(this, parameters, { + isRenderable: parameters.renderInteractiveForms + }); + } + + _createClass(RadioButtonWidgetAnnotationElement, [{ + key: "render", + value: function render() { + var _this8 = this; + + this.container.className = "buttonWidgetAnnotation radioButton"; + var storage = this.annotationStorage; + var data = this.data; + var id = data.id; + var value = storage.getValue(id, { + value: data.fieldValue === data.buttonValue + }).value; + + if (typeof value === "string") { + value = value !== data.buttonValue; + storage.setValue(id, { + value: value + }); + } + + var element = document.createElement("input"); + element.disabled = data.readOnly; + element.type = "radio"; + element.name = data.fieldName; + + if (value) { + element.setAttribute("checked", true); + } + + element.setAttribute("id", id); + element.addEventListener("change", function (event) { + var target = event.target; + + var _iterator6 = _createForOfIteratorHelper(document.getElementsByName(target.name)), + _step6; + + try { + for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) { + var radio = _step6.value; + + if (radio !== target) { + storage.setValue(radio.getAttribute("id"), { + value: false + }); + } + } + } catch (err) { + _iterator6.e(err); + } finally { + _iterator6.f(); + } + + storage.setValue(id, { + value: target.checked + }); + }); + + if (this.enableScripting && this.hasJSActions) { + var pdfButtonValue = data.buttonValue; + element.addEventListener("updatefromsandbox", function (jsEvent) { + var actions = { + value: function value(event) { + var checked = pdfButtonValue === event.detail.value; + + var _iterator7 = _createForOfIteratorHelper(document.getElementsByName(event.target.name)), + _step7; + + try { + for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) { + var radio = _step7.value; + var radioId = radio.getAttribute("id"); + radio.checked = radioId === id && checked; + storage.setValue(radioId, { + value: radio.checked + }); + } + } catch (err) { + _iterator7.e(err); + } finally { + _iterator7.f(); + } + } + }; + + _this8._dispatchEventFromSandbox(actions, jsEvent); + }); + + this._setEventListeners(element, [["change", "Validate"], ["change", "Action"], ["focus", "Focus"], ["blur", "Blur"], ["mousedown", "Mouse Down"], ["mouseenter", "Mouse Enter"], ["mouseleave", "Mouse Exit"], ["mouseup", "Mouse Up"]], function (event) { + return event.target.checked; + }); + } + + this.container.appendChild(element); + return this.container; + } + }]); + + return RadioButtonWidgetAnnotationElement; +}(WidgetAnnotationElement); + +var PushButtonWidgetAnnotationElement = /*#__PURE__*/function (_LinkAnnotationElemen) { + _inherits(PushButtonWidgetAnnotationElement, _LinkAnnotationElemen); + + var _super7 = _createSuper(PushButtonWidgetAnnotationElement); + + function PushButtonWidgetAnnotationElement() { + _classCallCheck(this, PushButtonWidgetAnnotationElement); + + return _super7.apply(this, arguments); + } + + _createClass(PushButtonWidgetAnnotationElement, [{ + key: "render", + value: function render() { + var container = _get(_getPrototypeOf(PushButtonWidgetAnnotationElement.prototype), "render", this).call(this); + + container.className = "buttonWidgetAnnotation pushButton"; + + if (this.data.alternativeText) { + container.title = this.data.alternativeText; + } + + return container; + } + }]); + + return PushButtonWidgetAnnotationElement; +}(LinkAnnotationElement); + +var ChoiceWidgetAnnotationElement = /*#__PURE__*/function (_WidgetAnnotationElem4) { + _inherits(ChoiceWidgetAnnotationElement, _WidgetAnnotationElem4); + + var _super8 = _createSuper(ChoiceWidgetAnnotationElement); + + function ChoiceWidgetAnnotationElement(parameters) { + _classCallCheck(this, ChoiceWidgetAnnotationElement); + + return _super8.call(this, parameters, { + isRenderable: parameters.renderInteractiveForms + }); + } + + _createClass(ChoiceWidgetAnnotationElement, [{ + key: "render", + value: function render() { + var _this9 = this; + + this.container.className = "choiceWidgetAnnotation"; + var storage = this.annotationStorage; + var id = this.data.id; + storage.getValue(id, { + value: this.data.fieldValue.length > 0 ? this.data.fieldValue[0] : undefined + }); + var selectElement = document.createElement("select"); + selectElement.disabled = this.data.readOnly; + selectElement.name = this.data.fieldName; + selectElement.setAttribute("id", id); + + if (!this.data.combo) { + selectElement.size = this.data.options.length; + + if (this.data.multiSelect) { + selectElement.multiple = true; + } + } + + var _iterator8 = _createForOfIteratorHelper(this.data.options), + _step8; + + try { + for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) { + var option = _step8.value; + var optionElement = document.createElement("option"); + optionElement.textContent = option.displayValue; + optionElement.value = option.exportValue; + + if (this.data.fieldValue.includes(option.exportValue)) { + optionElement.setAttribute("selected", true); + } + + selectElement.appendChild(optionElement); + } + } catch (err) { + _iterator8.e(err); + } finally { + _iterator8.f(); + } + + var getValue = function getValue(event, isExport) { + var name = isExport ? "value" : "textContent"; + var options = event.target.options; + + if (!event.target.multiple) { + return options.selectedIndex === -1 ? null : options[options.selectedIndex][name]; + } + + return Array.prototype.filter.call(options, function (option) { + return option.selected; + }).map(function (option) { + return option[name]; + }); + }; + + var getItems = function getItems(event) { + var options = event.target.options; + return Array.prototype.map.call(options, function (option) { + return { + displayValue: option.textContent, + exportValue: option.value + }; + }); + }; + + if (this.enableScripting && this.hasJSActions) { + selectElement.addEventListener("updatefromsandbox", function (jsEvent) { + var actions = { + value: function value(event) { + var options = selectElement.options; + var value = event.detail.value; + var values = new Set(Array.isArray(value) ? value : [value]); + Array.prototype.forEach.call(options, function (option) { + option.selected = values.has(option.value); + }); + storage.setValue(id, { + value: getValue(event, true) + }); + }, + multipleSelection: function multipleSelection(event) { + selectElement.multiple = true; + }, + remove: function remove(event) { + var options = selectElement.options; + var index = event.detail.remove; + options[index].selected = false; + selectElement.remove(index); + + if (options.length > 0) { + var i = Array.prototype.findIndex.call(options, function (option) { + return option.selected; + }); + + if (i === -1) { + options[0].selected = true; + } + } + + storage.setValue(id, { + value: getValue(event, true), + items: getItems(event) + }); + }, + clear: function clear(event) { + while (selectElement.length !== 0) { + selectElement.remove(0); + } + + storage.setValue(id, { + value: null, + items: [] + }); + }, + insert: function insert(event) { + var _event$detail$insert = event.detail.insert, + index = _event$detail$insert.index, + displayValue = _event$detail$insert.displayValue, + exportValue = _event$detail$insert.exportValue; + var optionElement = document.createElement("option"); + optionElement.textContent = displayValue; + optionElement.value = exportValue; + selectElement.insertBefore(optionElement, selectElement.children[index]); + storage.setValue(id, { + value: getValue(event, true), + items: getItems(event) + }); + }, + items: function items(event) { + var items = event.detail.items; + + while (selectElement.length !== 0) { + selectElement.remove(0); + } + + var _iterator9 = _createForOfIteratorHelper(items), + _step9; + + try { + for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) { + var item = _step9.value; + var displayValue = item.displayValue, + exportValue = item.exportValue; + var optionElement = document.createElement("option"); + optionElement.textContent = displayValue; + optionElement.value = exportValue; + selectElement.appendChild(optionElement); + } + } catch (err) { + _iterator9.e(err); + } finally { + _iterator9.f(); + } + + if (selectElement.options.length > 0) { + selectElement.options[0].selected = true; + } + + storage.setValue(id, { + value: getValue(event, true), + items: getItems(event) + }); + }, + indices: function indices(event) { + var indices = new Set(event.detail.indices); + var options = event.target.options; + Array.prototype.forEach.call(options, function (option, i) { + option.selected = indices.has(i); + }); + storage.setValue(id, { + value: getValue(event, true) + }); + }, + editable: function editable(event) { + event.target.disabled = !event.detail.editable; + } + }; + + _this9._dispatchEventFromSandbox(actions, jsEvent); + }); + selectElement.addEventListener("input", function (event) { + var _this9$linkService$ev; + + var exportValue = getValue(event, true); + var value = getValue(event, false); + storage.setValue(id, { + value: exportValue + }); + (_this9$linkService$ev = _this9.linkService.eventBus) === null || _this9$linkService$ev === void 0 ? void 0 : _this9$linkService$ev.dispatch("dispatcheventinsandbox", { + source: _this9, + detail: { + id: id, + name: "Keystroke", + value: value, + changeEx: exportValue, + willCommit: true, + commitKey: 1, + keyDown: false + } + }); + }); + + this._setEventListeners(selectElement, [["focus", "Focus"], ["blur", "Blur"], ["mousedown", "Mouse Down"], ["mouseenter", "Mouse Enter"], ["mouseleave", "Mouse Exit"], ["mouseup", "Mouse Up"], ["input", "Action"]], function (event) { + return event.target.checked; + }); + } else { + selectElement.addEventListener("input", function (event) { + storage.setValue(id, { + value: getValue(event) + }); + }); + } + + this.container.appendChild(selectElement); + return this.container; + } + }]); + + return ChoiceWidgetAnnotationElement; +}(WidgetAnnotationElement); + +var PopupAnnotationElement = /*#__PURE__*/function (_AnnotationElement4) { + _inherits(PopupAnnotationElement, _AnnotationElement4); + + var _super9 = _createSuper(PopupAnnotationElement); + + function PopupAnnotationElement(parameters) { + _classCallCheck(this, PopupAnnotationElement); + + var isRenderable = !!(parameters.data.title || parameters.data.contents); + return _super9.call(this, parameters, { + isRenderable: isRenderable + }); + } + + _createClass(PopupAnnotationElement, [{ + key: "render", + value: function render() { + var IGNORE_TYPES = ["Line", "Square", "Circle", "PolyLine", "Polygon", "Ink"]; + this.container.className = "popupAnnotation"; + + if (IGNORE_TYPES.includes(this.data.parentType)) { + return this.container; + } + + var selector = "[data-annotation-id=\"".concat(this.data.parentId, "\"]"); + var parentElements = this.layer.querySelectorAll(selector); + + if (parentElements.length === 0) { + return this.container; + } + + var popup = new PopupElement({ + container: this.container, + trigger: Array.from(parentElements), + color: this.data.color, + title: this.data.title, + modificationDate: this.data.modificationDate, + contents: this.data.contents + }); + var page = this.page; + + var rect = _util.Util.normalizeRect([this.data.parentRect[0], page.view[3] - this.data.parentRect[1] + page.view[1], this.data.parentRect[2], page.view[3] - this.data.parentRect[3] + page.view[1]]); + + var popupLeft = rect[0] + this.data.parentRect[2] - this.data.parentRect[0]; + var popupTop = rect[1]; + this.container.style.transformOrigin = "".concat(-popupLeft, "px ").concat(-popupTop, "px"); + this.container.style.left = "".concat(popupLeft, "px"); + this.container.style.top = "".concat(popupTop, "px"); + this.container.appendChild(popup.render()); + return this.container; + } + }]); + + return PopupAnnotationElement; +}(AnnotationElement); + +var PopupElement = /*#__PURE__*/function () { + function PopupElement(parameters) { + _classCallCheck(this, PopupElement); + + this.container = parameters.container; + this.trigger = parameters.trigger; + this.color = parameters.color; + this.title = parameters.title; + this.modificationDate = parameters.modificationDate; + this.contents = parameters.contents; + this.hideWrapper = parameters.hideWrapper || false; + this.pinned = false; + } + + _createClass(PopupElement, [{ + key: "render", + value: function render() { + var BACKGROUND_ENLIGHT = 0.7; + var wrapper = document.createElement("div"); + wrapper.className = "popupWrapper"; + this.hideElement = this.hideWrapper ? wrapper : this.container; + this.hideElement.hidden = true; + var popup = document.createElement("div"); + popup.className = "popup"; + var color = this.color; + + if (color) { + var r = BACKGROUND_ENLIGHT * (255 - color[0]) + color[0]; + var g = BACKGROUND_ENLIGHT * (255 - color[1]) + color[1]; + var b = BACKGROUND_ENLIGHT * (255 - color[2]) + color[2]; + popup.style.backgroundColor = _util.Util.makeHexColor(r | 0, g | 0, b | 0); + } + + var title = document.createElement("h1"); + title.textContent = this.title; + popup.appendChild(title); + + var dateObject = _display_utils.PDFDateString.toDateObject(this.modificationDate); + + if (dateObject) { + var modificationDate = document.createElement("span"); + modificationDate.textContent = "{{date}}, {{time}}"; + modificationDate.dataset.l10nId = "annotation_date_string"; + modificationDate.dataset.l10nArgs = JSON.stringify({ + date: dateObject.toLocaleDateString(), + time: dateObject.toLocaleTimeString() + }); + popup.appendChild(modificationDate); + } + + var contents = this._formatContents(this.contents); + + popup.appendChild(contents); + + if (!Array.isArray(this.trigger)) { + this.trigger = [this.trigger]; + } + + var _iterator10 = _createForOfIteratorHelper(this.trigger), + _step10; + + try { + for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) { + var element = _step10.value; + element.addEventListener("click", this._toggle.bind(this)); + element.addEventListener("mouseover", this._show.bind(this, false)); + element.addEventListener("mouseout", this._hide.bind(this, false)); + } + } catch (err) { + _iterator10.e(err); + } finally { + _iterator10.f(); + } + + popup.addEventListener("click", this._hide.bind(this, true)); + wrapper.appendChild(popup); + return wrapper; + } + }, { + key: "_formatContents", + value: function _formatContents(contents) { + var p = document.createElement("p"); + var lines = contents.split(/(?:\r\n?|\n)/); + + for (var i = 0, ii = lines.length; i < ii; ++i) { + var line = lines[i]; + p.appendChild(document.createTextNode(line)); + + if (i < ii - 1) { + p.appendChild(document.createElement("br")); + } + } + + return p; + } + }, { + key: "_toggle", + value: function _toggle() { + if (this.pinned) { + this._hide(true); + } else { + this._show(true); + } + } + }, { + key: "_show", + value: function _show() { + var pin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + if (pin) { + this.pinned = true; + } + + if (this.hideElement.hidden) { + this.hideElement.hidden = false; + this.container.style.zIndex += 1; + } + } + }, { + key: "_hide", + value: function _hide() { + var unpin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; + + if (unpin) { + this.pinned = false; + } + + if (!this.hideElement.hidden && !this.pinned) { + this.hideElement.hidden = true; + this.container.style.zIndex -= 1; + } + } + }]); + + return PopupElement; +}(); + +var FreeTextAnnotationElement = /*#__PURE__*/function (_AnnotationElement5) { + _inherits(FreeTextAnnotationElement, _AnnotationElement5); + + var _super10 = _createSuper(FreeTextAnnotationElement); + + function FreeTextAnnotationElement(parameters) { + _classCallCheck(this, FreeTextAnnotationElement); + + var isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + return _super10.call(this, parameters, { + isRenderable: isRenderable, + ignoreBorder: true + }); + } + + _createClass(FreeTextAnnotationElement, [{ + key: "render", + value: function render() { + this.container.className = "freeTextAnnotation"; + + if (!this.data.hasPopup) { + this._createPopup(null, this.data); + } + + return this.container; + } + }]); + + return FreeTextAnnotationElement; +}(AnnotationElement); + +var LineAnnotationElement = /*#__PURE__*/function (_AnnotationElement6) { + _inherits(LineAnnotationElement, _AnnotationElement6); + + var _super11 = _createSuper(LineAnnotationElement); + + function LineAnnotationElement(parameters) { + _classCallCheck(this, LineAnnotationElement); + + var isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + return _super11.call(this, parameters, { + isRenderable: isRenderable, + ignoreBorder: true + }); + } + + _createClass(LineAnnotationElement, [{ + key: "render", + value: function render() { + this.container.className = "lineAnnotation"; + var data = this.data; + var width = data.rect[2] - data.rect[0]; + var height = data.rect[3] - data.rect[1]; + var svg = this.svgFactory.create(width, height); + var line = this.svgFactory.createElement("svg:line"); + line.setAttribute("x1", data.rect[2] - data.lineCoordinates[0]); + line.setAttribute("y1", data.rect[3] - data.lineCoordinates[1]); + line.setAttribute("x2", data.rect[2] - data.lineCoordinates[2]); + line.setAttribute("y2", data.rect[3] - data.lineCoordinates[3]); + line.setAttribute("stroke-width", data.borderStyle.width || 1); + line.setAttribute("stroke", "transparent"); + svg.appendChild(line); + this.container.append(svg); + + this._createPopup(line, data); + + return this.container; + } + }]); + + return LineAnnotationElement; +}(AnnotationElement); + +var SquareAnnotationElement = /*#__PURE__*/function (_AnnotationElement7) { + _inherits(SquareAnnotationElement, _AnnotationElement7); + + var _super12 = _createSuper(SquareAnnotationElement); + + function SquareAnnotationElement(parameters) { + _classCallCheck(this, SquareAnnotationElement); + + var isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + return _super12.call(this, parameters, { + isRenderable: isRenderable, + ignoreBorder: true + }); + } + + _createClass(SquareAnnotationElement, [{ + key: "render", + value: function render() { + this.container.className = "squareAnnotation"; + var data = this.data; + var width = data.rect[2] - data.rect[0]; + var height = data.rect[3] - data.rect[1]; + var svg = this.svgFactory.create(width, height); + var borderWidth = data.borderStyle.width; + var square = this.svgFactory.createElement("svg:rect"); + square.setAttribute("x", borderWidth / 2); + square.setAttribute("y", borderWidth / 2); + square.setAttribute("width", width - borderWidth); + square.setAttribute("height", height - borderWidth); + square.setAttribute("stroke-width", borderWidth || 1); + square.setAttribute("stroke", "transparent"); + square.setAttribute("fill", "none"); + svg.appendChild(square); + this.container.append(svg); + + this._createPopup(square, data); + + return this.container; + } + }]); + + return SquareAnnotationElement; +}(AnnotationElement); + +var CircleAnnotationElement = /*#__PURE__*/function (_AnnotationElement8) { + _inherits(CircleAnnotationElement, _AnnotationElement8); + + var _super13 = _createSuper(CircleAnnotationElement); + + function CircleAnnotationElement(parameters) { + _classCallCheck(this, CircleAnnotationElement); + + var isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + return _super13.call(this, parameters, { + isRenderable: isRenderable, + ignoreBorder: true + }); + } + + _createClass(CircleAnnotationElement, [{ + key: "render", + value: function render() { + this.container.className = "circleAnnotation"; + var data = this.data; + var width = data.rect[2] - data.rect[0]; + var height = data.rect[3] - data.rect[1]; + var svg = this.svgFactory.create(width, height); + var borderWidth = data.borderStyle.width; + var circle = this.svgFactory.createElement("svg:ellipse"); + circle.setAttribute("cx", width / 2); + circle.setAttribute("cy", height / 2); + circle.setAttribute("rx", width / 2 - borderWidth / 2); + circle.setAttribute("ry", height / 2 - borderWidth / 2); + circle.setAttribute("stroke-width", borderWidth || 1); + circle.setAttribute("stroke", "transparent"); + circle.setAttribute("fill", "none"); + svg.appendChild(circle); + this.container.append(svg); + + this._createPopup(circle, data); + + return this.container; + } + }]); + + return CircleAnnotationElement; +}(AnnotationElement); + +var PolylineAnnotationElement = /*#__PURE__*/function (_AnnotationElement9) { + _inherits(PolylineAnnotationElement, _AnnotationElement9); + + var _super14 = _createSuper(PolylineAnnotationElement); + + function PolylineAnnotationElement(parameters) { + var _this10; + + _classCallCheck(this, PolylineAnnotationElement); + + var isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + _this10 = _super14.call(this, parameters, { + isRenderable: isRenderable, + ignoreBorder: true + }); + _this10.containerClassName = "polylineAnnotation"; + _this10.svgElementName = "svg:polyline"; + return _this10; + } + + _createClass(PolylineAnnotationElement, [{ + key: "render", + value: function render() { + this.container.className = this.containerClassName; + var data = this.data; + var width = data.rect[2] - data.rect[0]; + var height = data.rect[3] - data.rect[1]; + var svg = this.svgFactory.create(width, height); + var points = []; + + var _iterator11 = _createForOfIteratorHelper(data.vertices), + _step11; + + try { + for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) { + var coordinate = _step11.value; + var x = coordinate.x - data.rect[0]; + var y = data.rect[3] - coordinate.y; + points.push(x + "," + y); + } + } catch (err) { + _iterator11.e(err); + } finally { + _iterator11.f(); + } + + points = points.join(" "); + var polyline = this.svgFactory.createElement(this.svgElementName); + polyline.setAttribute("points", points); + polyline.setAttribute("stroke-width", data.borderStyle.width || 1); + polyline.setAttribute("stroke", "transparent"); + polyline.setAttribute("fill", "none"); + svg.appendChild(polyline); + this.container.append(svg); + + this._createPopup(polyline, data); + + return this.container; + } + }]); + + return PolylineAnnotationElement; +}(AnnotationElement); + +var PolygonAnnotationElement = /*#__PURE__*/function (_PolylineAnnotationEl) { + _inherits(PolygonAnnotationElement, _PolylineAnnotationEl); + + var _super15 = _createSuper(PolygonAnnotationElement); + + function PolygonAnnotationElement(parameters) { + var _this11; + + _classCallCheck(this, PolygonAnnotationElement); + + _this11 = _super15.call(this, parameters); + _this11.containerClassName = "polygonAnnotation"; + _this11.svgElementName = "svg:polygon"; + return _this11; + } + + return PolygonAnnotationElement; +}(PolylineAnnotationElement); + +var CaretAnnotationElement = /*#__PURE__*/function (_AnnotationElement10) { + _inherits(CaretAnnotationElement, _AnnotationElement10); + + var _super16 = _createSuper(CaretAnnotationElement); + + function CaretAnnotationElement(parameters) { + _classCallCheck(this, CaretAnnotationElement); + + var isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + return _super16.call(this, parameters, { + isRenderable: isRenderable, + ignoreBorder: true + }); + } + + _createClass(CaretAnnotationElement, [{ + key: "render", + value: function render() { + this.container.className = "caretAnnotation"; + + if (!this.data.hasPopup) { + this._createPopup(null, this.data); + } + + return this.container; + } + }]); + + return CaretAnnotationElement; +}(AnnotationElement); + +var InkAnnotationElement = /*#__PURE__*/function (_AnnotationElement11) { + _inherits(InkAnnotationElement, _AnnotationElement11); + + var _super17 = _createSuper(InkAnnotationElement); + + function InkAnnotationElement(parameters) { + var _this12; + + _classCallCheck(this, InkAnnotationElement); + + var isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + _this12 = _super17.call(this, parameters, { + isRenderable: isRenderable, + ignoreBorder: true + }); + _this12.containerClassName = "inkAnnotation"; + _this12.svgElementName = "svg:polyline"; + return _this12; + } + + _createClass(InkAnnotationElement, [{ + key: "render", + value: function render() { + this.container.className = this.containerClassName; + var data = this.data; + var width = data.rect[2] - data.rect[0]; + var height = data.rect[3] - data.rect[1]; + var svg = this.svgFactory.create(width, height); + + var _iterator12 = _createForOfIteratorHelper(data.inkLists), + _step12; + + try { + for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) { + var inkList = _step12.value; + var points = []; + + var _iterator13 = _createForOfIteratorHelper(inkList), + _step13; + + try { + for (_iterator13.s(); !(_step13 = _iterator13.n()).done;) { + var coordinate = _step13.value; + var x = coordinate.x - data.rect[0]; + var y = data.rect[3] - coordinate.y; + points.push("".concat(x, ",").concat(y)); + } + } catch (err) { + _iterator13.e(err); + } finally { + _iterator13.f(); + } + + points = points.join(" "); + var polyline = this.svgFactory.createElement(this.svgElementName); + polyline.setAttribute("points", points); + polyline.setAttribute("stroke-width", data.borderStyle.width || 1); + polyline.setAttribute("stroke", "transparent"); + polyline.setAttribute("fill", "none"); + + this._createPopup(polyline, data); + + svg.appendChild(polyline); + } + } catch (err) { + _iterator12.e(err); + } finally { + _iterator12.f(); + } + + this.container.append(svg); + return this.container; + } + }]); + + return InkAnnotationElement; +}(AnnotationElement); + +var HighlightAnnotationElement = /*#__PURE__*/function (_AnnotationElement12) { + _inherits(HighlightAnnotationElement, _AnnotationElement12); + + var _super18 = _createSuper(HighlightAnnotationElement); + + function HighlightAnnotationElement(parameters) { + _classCallCheck(this, HighlightAnnotationElement); + + var isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + return _super18.call(this, parameters, { + isRenderable: isRenderable, + ignoreBorder: true, + createQuadrilaterals: true + }); + } + + _createClass(HighlightAnnotationElement, [{ + key: "render", + value: function render() { + if (!this.data.hasPopup) { + this._createPopup(null, this.data); + } + + if (this.quadrilaterals) { + return this._renderQuadrilaterals("highlightAnnotation"); + } + + this.container.className = "highlightAnnotation"; + return this.container; + } + }]); + + return HighlightAnnotationElement; +}(AnnotationElement); + +var UnderlineAnnotationElement = /*#__PURE__*/function (_AnnotationElement13) { + _inherits(UnderlineAnnotationElement, _AnnotationElement13); + + var _super19 = _createSuper(UnderlineAnnotationElement); + + function UnderlineAnnotationElement(parameters) { + _classCallCheck(this, UnderlineAnnotationElement); + + var isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + return _super19.call(this, parameters, { + isRenderable: isRenderable, + ignoreBorder: true, + createQuadrilaterals: true + }); + } + + _createClass(UnderlineAnnotationElement, [{ + key: "render", + value: function render() { + if (!this.data.hasPopup) { + this._createPopup(null, this.data); + } + + if (this.quadrilaterals) { + return this._renderQuadrilaterals("underlineAnnotation"); + } + + this.container.className = "underlineAnnotation"; + return this.container; + } + }]); + + return UnderlineAnnotationElement; +}(AnnotationElement); + +var SquigglyAnnotationElement = /*#__PURE__*/function (_AnnotationElement14) { + _inherits(SquigglyAnnotationElement, _AnnotationElement14); + + var _super20 = _createSuper(SquigglyAnnotationElement); + + function SquigglyAnnotationElement(parameters) { + _classCallCheck(this, SquigglyAnnotationElement); + + var isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + return _super20.call(this, parameters, { + isRenderable: isRenderable, + ignoreBorder: true, + createQuadrilaterals: true + }); + } + + _createClass(SquigglyAnnotationElement, [{ + key: "render", + value: function render() { + if (!this.data.hasPopup) { + this._createPopup(null, this.data); + } + + if (this.quadrilaterals) { + return this._renderQuadrilaterals("squigglyAnnotation"); + } + + this.container.className = "squigglyAnnotation"; + return this.container; + } + }]); + + return SquigglyAnnotationElement; +}(AnnotationElement); + +var StrikeOutAnnotationElement = /*#__PURE__*/function (_AnnotationElement15) { + _inherits(StrikeOutAnnotationElement, _AnnotationElement15); + + var _super21 = _createSuper(StrikeOutAnnotationElement); + + function StrikeOutAnnotationElement(parameters) { + _classCallCheck(this, StrikeOutAnnotationElement); + + var isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + return _super21.call(this, parameters, { + isRenderable: isRenderable, + ignoreBorder: true, + createQuadrilaterals: true + }); + } + + _createClass(StrikeOutAnnotationElement, [{ + key: "render", + value: function render() { + if (!this.data.hasPopup) { + this._createPopup(null, this.data); + } + + if (this.quadrilaterals) { + return this._renderQuadrilaterals("strikeoutAnnotation"); + } + + this.container.className = "strikeoutAnnotation"; + return this.container; + } + }]); + + return StrikeOutAnnotationElement; +}(AnnotationElement); + +var StampAnnotationElement = /*#__PURE__*/function (_AnnotationElement16) { + _inherits(StampAnnotationElement, _AnnotationElement16); + + var _super22 = _createSuper(StampAnnotationElement); + + function StampAnnotationElement(parameters) { + _classCallCheck(this, StampAnnotationElement); + + var isRenderable = !!(parameters.data.hasPopup || parameters.data.title || parameters.data.contents); + return _super22.call(this, parameters, { + isRenderable: isRenderable, + ignoreBorder: true + }); + } + + _createClass(StampAnnotationElement, [{ + key: "render", + value: function render() { + this.container.className = "stampAnnotation"; + + if (!this.data.hasPopup) { + this._createPopup(null, this.data); + } + + return this.container; + } + }]); + + return StampAnnotationElement; +}(AnnotationElement); + +var FileAttachmentAnnotationElement = /*#__PURE__*/function (_AnnotationElement17) { + _inherits(FileAttachmentAnnotationElement, _AnnotationElement17); + + var _super23 = _createSuper(FileAttachmentAnnotationElement); + + function FileAttachmentAnnotationElement(parameters) { + var _this13$linkService$e; + + var _this13; + + _classCallCheck(this, FileAttachmentAnnotationElement); + + _this13 = _super23.call(this, parameters, { + isRenderable: true + }); + var _this13$data$file = _this13.data.file, + filename = _this13$data$file.filename, + content = _this13$data$file.content; + _this13.filename = (0, _display_utils.getFilenameFromUrl)(filename); + _this13.content = content; + (_this13$linkService$e = _this13.linkService.eventBus) === null || _this13$linkService$e === void 0 ? void 0 : _this13$linkService$e.dispatch("fileattachmentannotation", { + source: _assertThisInitialized(_this13), + id: (0, _util.stringToPDFString)(filename), + filename: filename, + content: content + }); + return _this13; + } + + _createClass(FileAttachmentAnnotationElement, [{ + key: "render", + value: function render() { + this.container.className = "fileAttachmentAnnotation"; + var trigger = document.createElement("div"); + trigger.style.height = this.container.style.height; + trigger.style.width = this.container.style.width; + trigger.addEventListener("dblclick", this._download.bind(this)); + + if (!this.data.hasPopup && (this.data.title || this.data.contents)) { + this._createPopup(trigger, this.data); + } + + this.container.appendChild(trigger); + return this.container; + } + }, { + key: "_download", + value: function _download() { + var _this$downloadManager; + + (_this$downloadManager = this.downloadManager) === null || _this$downloadManager === void 0 ? void 0 : _this$downloadManager.openOrDownloadData(this.container, this.content, this.filename); + } + }]); + + return FileAttachmentAnnotationElement; +}(AnnotationElement); + +var AnnotationLayer = /*#__PURE__*/function () { + function AnnotationLayer() { + _classCallCheck(this, AnnotationLayer); + } + + _createClass(AnnotationLayer, null, [{ + key: "render", + value: function render(parameters) { + var sortedAnnotations = [], + popupAnnotations = []; + + var _iterator14 = _createForOfIteratorHelper(parameters.annotations), + _step14; + + try { + for (_iterator14.s(); !(_step14 = _iterator14.n()).done;) { + var _data = _step14.value; + + if (!_data) { + continue; + } + + if (_data.annotationType === _util.AnnotationType.POPUP) { + popupAnnotations.push(_data); + continue; + } + + sortedAnnotations.push(_data); + } + } catch (err) { + _iterator14.e(err); + } finally { + _iterator14.f(); + } + + if (popupAnnotations.length) { + sortedAnnotations.push.apply(sortedAnnotations, popupAnnotations); + } + + for (var _i3 = 0, _sortedAnnotations = sortedAnnotations; _i3 < _sortedAnnotations.length; _i3++) { + var data = _sortedAnnotations[_i3]; + var element = AnnotationElementFactory.create({ + data: data, + layer: parameters.div, + page: parameters.page, + viewport: parameters.viewport, + linkService: parameters.linkService, + downloadManager: parameters.downloadManager, + imageResourcesPath: parameters.imageResourcesPath || "", + renderInteractiveForms: parameters.renderInteractiveForms !== false, + svgFactory: new _display_utils.DOMSVGFactory(), + annotationStorage: parameters.annotationStorage || new _annotation_storage.AnnotationStorage(), + enableScripting: parameters.enableScripting, + hasJSActions: parameters.hasJSActions, + mouseState: parameters.mouseState || { + isDown: false + } + }); + + if (element.isRenderable) { + var rendered = element.render(); + + if (data.hidden) { + rendered.style.visibility = "hidden"; + } + + if (Array.isArray(rendered)) { + var _iterator15 = _createForOfIteratorHelper(rendered), + _step15; + + try { + for (_iterator15.s(); !(_step15 = _iterator15.n()).done;) { + var renderedElement = _step15.value; + parameters.div.appendChild(renderedElement); + } + } catch (err) { + _iterator15.e(err); + } finally { + _iterator15.f(); + } + } else { + if (element instanceof PopupAnnotationElement) { + parameters.div.prepend(rendered); + } else { + parameters.div.appendChild(rendered); + } + } + } + } + } + }, { + key: "update", + value: function update(parameters) { + var transform = "matrix(".concat(parameters.viewport.transform.join(","), ")"); + + var _iterator16 = _createForOfIteratorHelper(parameters.annotations), + _step16; + + try { + for (_iterator16.s(); !(_step16 = _iterator16.n()).done;) { + var data = _step16.value; + var elements = parameters.div.querySelectorAll("[data-annotation-id=\"".concat(data.id, "\"]")); + + if (elements) { + var _iterator17 = _createForOfIteratorHelper(elements), + _step17; + + try { + for (_iterator17.s(); !(_step17 = _iterator17.n()).done;) { + var element = _step17.value; + element.style.transform = transform; + } + } catch (err) { + _iterator17.e(err); + } finally { + _iterator17.f(); + } + } + } + } catch (err) { + _iterator16.e(err); + } finally { + _iterator16.f(); + } + + parameters.div.hidden = false; + } + }]); + + return AnnotationLayer; +}(); + +exports.AnnotationLayer = AnnotationLayer; + +/***/ }), +/* 127 */ +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.ColorConverters = void 0; + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function makeColorComp(n) { + return Math.floor(Math.max(0, Math.min(1, n)) * 255).toString(16).padStart(2, "0"); +} + +var ColorConverters = /*#__PURE__*/function () { + function ColorConverters() { + _classCallCheck(this, ColorConverters); + } + + _createClass(ColorConverters, null, [{ + key: "CMYK_G", + value: function CMYK_G(_ref) { + var _ref2 = _slicedToArray(_ref, 4), + c = _ref2[0], + y = _ref2[1], + m = _ref2[2], + k = _ref2[3]; + + return ["G", 1 - Math.min(1, 0.3 * c + 0.59 * m + 0.11 * y + k)]; + } + }, { + key: "G_CMYK", + value: function G_CMYK(_ref3) { + var _ref4 = _slicedToArray(_ref3, 1), + g = _ref4[0]; + + return ["CMYK", 0, 0, 0, 1 - g]; + } + }, { + key: "G_RGB", + value: function G_RGB(_ref5) { + var _ref6 = _slicedToArray(_ref5, 1), + g = _ref6[0]; + + return ["RGB", g, g, g]; + } + }, { + key: "G_HTML", + value: function G_HTML(_ref7) { + var _ref8 = _slicedToArray(_ref7, 1), + g = _ref8[0]; + + var G = makeColorComp(g); + return "#".concat(G).concat(G).concat(G); + } + }, { + key: "RGB_G", + value: function RGB_G(_ref9) { + var _ref10 = _slicedToArray(_ref9, 3), + r = _ref10[0], + g = _ref10[1], + b = _ref10[2]; + + return ["G", 0.3 * r + 0.59 * g + 0.11 * b]; + } + }, { + key: "RGB_HTML", + value: function RGB_HTML(_ref11) { + var _ref12 = _slicedToArray(_ref11, 3), + r = _ref12[0], + g = _ref12[1], + b = _ref12[2]; + + var R = makeColorComp(r); + var G = makeColorComp(g); + var B = makeColorComp(b); + return "#".concat(R).concat(G).concat(B); + } + }, { + key: "T_HTML", + value: function T_HTML() { + return "#00000000"; + } + }, { + key: "CMYK_RGB", + value: function CMYK_RGB(_ref13) { + var _ref14 = _slicedToArray(_ref13, 4), + c = _ref14[0], + y = _ref14[1], + m = _ref14[2], + k = _ref14[3]; + + return ["RGB", 1 - Math.min(1, c + k), 1 - Math.min(1, m + k), 1 - Math.min(1, y + k)]; + } + }, { + key: "CMYK_HTML", + value: function CMYK_HTML(components) { + return this.RGB_HTML(this.CMYK_RGB(components)); + } + }, { + key: "RGB_CMYK", + value: function RGB_CMYK(_ref15) { + var _ref16 = _slicedToArray(_ref15, 3), + r = _ref16[0], + g = _ref16[1], + b = _ref16[2]; + + var c = 1 - r; + var m = 1 - g; + var y = 1 - b; + var k = Math.min(c, m, y); + return ["CMYK", c, m, y, k]; + } + }]); + + return ColorConverters; +}(); + +exports.ColorConverters = ColorConverters; + +/***/ }), +/* 128 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.renderTextLayer = renderTextLayer; + +var _util = __w_pdfjs_require__(4); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +var MAX_TEXT_DIVS_TO_RENDER = 100000; +var DEFAULT_FONT_SIZE = 30; +var DEFAULT_FONT_ASCENT = 0.8; +var ascentCache = new Map(); +var AllWhitespaceRegexp = /^\s+$/g; + +function getAscent(fontFamily, ctx) { + var cachedAscent = ascentCache.get(fontFamily); + + if (cachedAscent) { + return cachedAscent; + } + + ctx.save(); + ctx.font = "".concat(DEFAULT_FONT_SIZE, "px ").concat(fontFamily); + var metrics = ctx.measureText(""); + var ascent = metrics.fontBoundingBoxAscent; + var descent = Math.abs(metrics.fontBoundingBoxDescent); + + if (ascent) { + ctx.restore(); + var ratio = ascent / (ascent + descent); + ascentCache.set(fontFamily, ratio); + return ratio; + } + + ctx.strokeStyle = "red"; + ctx.clearRect(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE); + ctx.strokeText("g", 0, 0); + var pixels = ctx.getImageData(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE).data; + descent = 0; + + for (var i = pixels.length - 1 - 3; i >= 0; i -= 4) { + if (pixels[i] > 0) { + descent = Math.ceil(i / 4 / DEFAULT_FONT_SIZE); + break; + } + } + + ctx.clearRect(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE); + ctx.strokeText("A", 0, DEFAULT_FONT_SIZE); + pixels = ctx.getImageData(0, 0, DEFAULT_FONT_SIZE, DEFAULT_FONT_SIZE).data; + ascent = 0; + + for (var _i = 0, ii = pixels.length; _i < ii; _i += 4) { + if (pixels[_i] > 0) { + ascent = DEFAULT_FONT_SIZE - Math.floor(_i / 4 / DEFAULT_FONT_SIZE); + break; + } + } + + ctx.restore(); + + if (ascent) { + var _ratio = ascent / (ascent + descent); + + ascentCache.set(fontFamily, _ratio); + return _ratio; + } + + ascentCache.set(fontFamily, DEFAULT_FONT_ASCENT); + return DEFAULT_FONT_ASCENT; +} + +function appendText(task, geom, styles, ctx) { + var textDiv = document.createElement("span"); + var textDivProperties = { + angle: 0, + canvasWidth: 0, + hasText: geom.str !== "", + hasEOL: geom.hasEOL, + originalTransform: null, + paddingBottom: 0, + paddingLeft: 0, + paddingRight: 0, + paddingTop: 0, + scale: 1 + }; + + task._textDivs.push(textDiv); + + var tx = _util.Util.transform(task._viewport.transform, geom.transform); + + var angle = Math.atan2(tx[1], tx[0]); + var style = styles[geom.fontName]; + + if (style.vertical) { + angle += Math.PI / 2; + } + + var fontHeight = Math.hypot(tx[2], tx[3]); + var fontAscent = fontHeight * getAscent(style.fontFamily, ctx); + var left, top; + + if (angle === 0) { + left = tx[4]; + top = tx[5] - fontAscent; + } else { + left = tx[4] + fontAscent * Math.sin(angle); + top = tx[5] - fontAscent * Math.cos(angle); + } + + textDiv.style.left = "".concat(left, "px"); + textDiv.style.top = "".concat(top, "px"); + textDiv.style.fontSize = "".concat(fontHeight, "px"); + textDiv.style.fontFamily = style.fontFamily; + textDiv.setAttribute("role", "presentation"); + textDiv.textContent = geom.str; + textDiv.dir = geom.dir; + + if (task._fontInspectorEnabled) { + textDiv.dataset.fontName = geom.fontName; + } + + if (angle !== 0) { + textDivProperties.angle = angle * (180 / Math.PI); + } + + var shouldScaleText = false; + + if (geom.str.length > 1 || task._enhanceTextSelection && AllWhitespaceRegexp.test(geom.str)) { + shouldScaleText = true; + } else if (geom.transform[0] !== geom.transform[3]) { + var absScaleX = Math.abs(geom.transform[0]), + absScaleY = Math.abs(geom.transform[3]); + + if (absScaleX !== absScaleY && Math.max(absScaleX, absScaleY) / Math.min(absScaleX, absScaleY) > 1.5) { + shouldScaleText = true; + } + } + + if (shouldScaleText) { + if (style.vertical) { + textDivProperties.canvasWidth = geom.height * task._viewport.scale; + } else { + textDivProperties.canvasWidth = geom.width * task._viewport.scale; + } + } + + task._textDivProperties.set(textDiv, textDivProperties); + + if (task._textContentStream) { + task._layoutText(textDiv); + } + + if (task._enhanceTextSelection && textDivProperties.hasText) { + var angleCos = 1, + angleSin = 0; + + if (angle !== 0) { + angleCos = Math.cos(angle); + angleSin = Math.sin(angle); + } + + var divWidth = (style.vertical ? geom.height : geom.width) * task._viewport.scale; + var divHeight = fontHeight; + var m, b; + + if (angle !== 0) { + m = [angleCos, angleSin, -angleSin, angleCos, left, top]; + b = _util.Util.getAxialAlignedBoundingBox([0, 0, divWidth, divHeight], m); + } else { + b = [left, top, left + divWidth, top + divHeight]; + } + + task._bounds.push({ + left: b[0], + top: b[1], + right: b[2], + bottom: b[3], + div: textDiv, + size: [divWidth, divHeight], + m: m + }); + } +} + +function render(task) { + if (task._canceled) { + return; + } + + var textDivs = task._textDivs; + var capability = task._capability; + var textDivsLength = textDivs.length; + + if (textDivsLength > MAX_TEXT_DIVS_TO_RENDER) { + task._renderingDone = true; + capability.resolve(); + return; + } + + if (!task._textContentStream) { + for (var i = 0; i < textDivsLength; i++) { + task._layoutText(textDivs[i]); + } + } + + task._renderingDone = true; + capability.resolve(); +} + +function findPositiveMin(ts, offset, count) { + var result = 0; + + for (var i = 0; i < count; i++) { + var t = ts[offset++]; + + if (t > 0) { + result = result ? Math.min(t, result) : t; + } + } + + return result; +} + +function expand(task) { + var bounds = task._bounds; + var viewport = task._viewport; + var expanded = expandBounds(viewport.width, viewport.height, bounds); + + for (var i = 0; i < expanded.length; i++) { + var div = bounds[i].div; + + var divProperties = task._textDivProperties.get(div); + + if (divProperties.angle === 0) { + divProperties.paddingLeft = bounds[i].left - expanded[i].left; + divProperties.paddingTop = bounds[i].top - expanded[i].top; + divProperties.paddingRight = expanded[i].right - bounds[i].right; + divProperties.paddingBottom = expanded[i].bottom - bounds[i].bottom; + + task._textDivProperties.set(div, divProperties); + + continue; + } + + var e = expanded[i], + b = bounds[i]; + var m = b.m, + c = m[0], + s = m[1]; + var points = [[0, 0], [0, b.size[1]], [b.size[0], 0], b.size]; + var ts = new Float64Array(64); + + for (var j = 0, jj = points.length; j < jj; j++) { + var t = _util.Util.applyTransform(points[j], m); + + ts[j + 0] = c && (e.left - t[0]) / c; + ts[j + 4] = s && (e.top - t[1]) / s; + ts[j + 8] = c && (e.right - t[0]) / c; + ts[j + 12] = s && (e.bottom - t[1]) / s; + ts[j + 16] = s && (e.left - t[0]) / -s; + ts[j + 20] = c && (e.top - t[1]) / c; + ts[j + 24] = s && (e.right - t[0]) / -s; + ts[j + 28] = c && (e.bottom - t[1]) / c; + ts[j + 32] = c && (e.left - t[0]) / -c; + ts[j + 36] = s && (e.top - t[1]) / -s; + ts[j + 40] = c && (e.right - t[0]) / -c; + ts[j + 44] = s && (e.bottom - t[1]) / -s; + ts[j + 48] = s && (e.left - t[0]) / s; + ts[j + 52] = c && (e.top - t[1]) / -c; + ts[j + 56] = s && (e.right - t[0]) / s; + ts[j + 60] = c && (e.bottom - t[1]) / -c; + } + + var boxScale = 1 + Math.min(Math.abs(c), Math.abs(s)); + divProperties.paddingLeft = findPositiveMin(ts, 32, 16) / boxScale; + divProperties.paddingTop = findPositiveMin(ts, 48, 16) / boxScale; + divProperties.paddingRight = findPositiveMin(ts, 0, 16) / boxScale; + divProperties.paddingBottom = findPositiveMin(ts, 16, 16) / boxScale; + + task._textDivProperties.set(div, divProperties); + } +} + +function expandBounds(width, height, boxes) { + var bounds = boxes.map(function (box, i) { + return { + x1: box.left, + y1: box.top, + x2: box.right, + y2: box.bottom, + index: i, + x1New: undefined, + x2New: undefined + }; + }); + expandBoundsLTR(width, bounds); + var expanded = new Array(boxes.length); + + var _iterator = _createForOfIteratorHelper(bounds), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var b = _step.value; + var i = b.index; + expanded[i] = { + left: b.x1New, + top: 0, + right: b.x2New, + bottom: 0 + }; + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + boxes.map(function (box, i) { + var e = expanded[i], + b = bounds[i]; + b.x1 = box.top; + b.y1 = width - e.right; + b.x2 = box.bottom; + b.y2 = width - e.left; + b.index = i; + b.x1New = undefined; + b.x2New = undefined; + }); + expandBoundsLTR(height, bounds); + + var _iterator2 = _createForOfIteratorHelper(bounds), + _step2; + + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + var _b = _step2.value; + var _i2 = _b.index; + expanded[_i2].top = _b.x1New; + expanded[_i2].bottom = _b.x2New; + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + + return expanded; +} + +function expandBoundsLTR(width, bounds) { + bounds.sort(function (a, b) { + return a.x1 - b.x1 || a.index - b.index; + }); + var fakeBoundary = { + x1: -Infinity, + y1: -Infinity, + x2: 0, + y2: Infinity, + index: -1, + x1New: 0, + x2New: 0 + }; + var horizon = [{ + start: -Infinity, + end: Infinity, + boundary: fakeBoundary + }]; + + var _iterator3 = _createForOfIteratorHelper(bounds), + _step3; + + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { + var boundary = _step3.value; + var i = 0; + + while (i < horizon.length && horizon[i].end <= boundary.y1) { + i++; + } + + var j = horizon.length - 1; + + while (j >= 0 && horizon[j].start >= boundary.y2) { + j--; + } + + var _horizonPart = void 0, + _affectedBoundary = void 0; + + var q = void 0, + k = void 0, + maxXNew = -Infinity; + + for (q = i; q <= j; q++) { + _horizonPart = horizon[q]; + _affectedBoundary = _horizonPart.boundary; + var xNew = void 0; + + if (_affectedBoundary.x2 > boundary.x1) { + xNew = _affectedBoundary.index > boundary.index ? _affectedBoundary.x1New : boundary.x1; + } else if (_affectedBoundary.x2New === undefined) { + xNew = (_affectedBoundary.x2 + boundary.x1) / 2; + } else { + xNew = _affectedBoundary.x2New; + } + + if (xNew > maxXNew) { + maxXNew = xNew; + } + } + + boundary.x1New = maxXNew; + + for (q = i; q <= j; q++) { + _horizonPart = horizon[q]; + _affectedBoundary = _horizonPart.boundary; + + if (_affectedBoundary.x2New === undefined) { + if (_affectedBoundary.x2 > boundary.x1) { + if (_affectedBoundary.index > boundary.index) { + _affectedBoundary.x2New = _affectedBoundary.x2; + } + } else { + _affectedBoundary.x2New = maxXNew; + } + } else if (_affectedBoundary.x2New > maxXNew) { + _affectedBoundary.x2New = Math.max(maxXNew, _affectedBoundary.x2); + } + } + + var changedHorizon = []; + var lastBoundary = null; + + for (q = i; q <= j; q++) { + _horizonPart = horizon[q]; + _affectedBoundary = _horizonPart.boundary; + var useBoundary = _affectedBoundary.x2 > boundary.x2 ? _affectedBoundary : boundary; + + if (lastBoundary === useBoundary) { + changedHorizon[changedHorizon.length - 1].end = _horizonPart.end; + } else { + changedHorizon.push({ + start: _horizonPart.start, + end: _horizonPart.end, + boundary: useBoundary + }); + lastBoundary = useBoundary; + } + } + + if (horizon[i].start < boundary.y1) { + changedHorizon[0].start = boundary.y1; + changedHorizon.unshift({ + start: horizon[i].start, + end: boundary.y1, + boundary: horizon[i].boundary + }); + } + + if (boundary.y2 < horizon[j].end) { + changedHorizon[changedHorizon.length - 1].end = boundary.y2; + changedHorizon.push({ + start: boundary.y2, + end: horizon[j].end, + boundary: horizon[j].boundary + }); + } + + for (q = i; q <= j; q++) { + _horizonPart = horizon[q]; + _affectedBoundary = _horizonPart.boundary; + + if (_affectedBoundary.x2New !== undefined) { + continue; + } + + var used = false; + + for (k = i - 1; !used && k >= 0 && horizon[k].start >= _affectedBoundary.y1; k--) { + used = horizon[k].boundary === _affectedBoundary; + } + + for (k = j + 1; !used && k < horizon.length && horizon[k].end <= _affectedBoundary.y2; k++) { + used = horizon[k].boundary === _affectedBoundary; + } + + for (k = 0; !used && k < changedHorizon.length; k++) { + used = changedHorizon[k].boundary === _affectedBoundary; + } + + if (!used) { + _affectedBoundary.x2New = maxXNew; + } + } + + Array.prototype.splice.apply(horizon, [i, j - i + 1].concat(changedHorizon)); + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); + } + + for (var _i3 = 0, _horizon = horizon; _i3 < _horizon.length; _i3++) { + var horizonPart = _horizon[_i3]; + var affectedBoundary = horizonPart.boundary; + + if (affectedBoundary.x2New === undefined) { + affectedBoundary.x2New = Math.max(width, affectedBoundary.x2); + } + } +} + +var TextLayerRenderTask = /*#__PURE__*/function () { + function TextLayerRenderTask(_ref) { + var _globalThis$FontInspe, + _this = this; + + var textContent = _ref.textContent, + textContentStream = _ref.textContentStream, + container = _ref.container, + viewport = _ref.viewport, + textDivs = _ref.textDivs, + textContentItemsStr = _ref.textContentItemsStr, + enhanceTextSelection = _ref.enhanceTextSelection; + + _classCallCheck(this, TextLayerRenderTask); + + this._textContent = textContent; + this._textContentStream = textContentStream; + this._container = container; + this._document = container.ownerDocument; + this._viewport = viewport; + this._textDivs = textDivs || []; + this._textContentItemsStr = textContentItemsStr || []; + this._enhanceTextSelection = !!enhanceTextSelection; + this._fontInspectorEnabled = !!((_globalThis$FontInspe = globalThis.FontInspector) !== null && _globalThis$FontInspe !== void 0 && _globalThis$FontInspe.enabled); + this._reader = null; + this._layoutTextLastFontSize = null; + this._layoutTextLastFontFamily = null; + this._layoutTextCtx = null; + this._textDivProperties = new WeakMap(); + this._renderingDone = false; + this._canceled = false; + this._capability = (0, _util.createPromiseCapability)(); + this._renderTimer = null; + this._bounds = []; + + this._capability.promise["finally"](function () { + if (_this._layoutTextCtx) { + _this._layoutTextCtx.canvas.width = 0; + _this._layoutTextCtx.canvas.height = 0; + _this._layoutTextCtx = null; + } + })["catch"](function () {}); + } + + _createClass(TextLayerRenderTask, [{ + key: "promise", + get: function get() { + return this._capability.promise; + } + }, { + key: "cancel", + value: function cancel() { + this._canceled = true; + + if (this._reader) { + this._reader.cancel(new _util.AbortException("TextLayer task cancelled.")); + + this._reader = null; + } + + if (this._renderTimer !== null) { + clearTimeout(this._renderTimer); + this._renderTimer = null; + } + + this._capability.reject(new Error("TextLayer task cancelled.")); + } + }, { + key: "_processItems", + value: function _processItems(items, styleCache) { + for (var i = 0, len = items.length; i < len; i++) { + if (items[i].str === undefined) { + if (items[i].type === "beginMarkedContentProps" || items[i].type === "beginMarkedContent") { + var parent = this._container; + this._container = document.createElement("span"); + + this._container.classList.add("markedContent"); + + if (items[i].id !== null) { + this._container.setAttribute("id", "".concat(items[i].id)); + } + + parent.appendChild(this._container); + } else if (items[i].type === "endMarkedContent") { + this._container = this._container.parentNode; + } + + continue; + } + + this._textContentItemsStr.push(items[i].str); + + appendText(this, items[i], styleCache, this._layoutTextCtx); + } + } + }, { + key: "_layoutText", + value: function _layoutText(textDiv) { + var textDivProperties = this._textDivProperties.get(textDiv); + + var transform = ""; + + if (textDivProperties.canvasWidth !== 0 && textDivProperties.hasText) { + var _textDiv$style = textDiv.style, + fontSize = _textDiv$style.fontSize, + fontFamily = _textDiv$style.fontFamily; + + if (fontSize !== this._layoutTextLastFontSize || fontFamily !== this._layoutTextLastFontFamily) { + this._layoutTextCtx.font = "".concat(fontSize, " ").concat(fontFamily); + this._layoutTextLastFontSize = fontSize; + this._layoutTextLastFontFamily = fontFamily; + } + + var _this$_layoutTextCtx$ = this._layoutTextCtx.measureText(textDiv.textContent), + width = _this$_layoutTextCtx$.width; + + if (width > 0) { + textDivProperties.scale = textDivProperties.canvasWidth / width; + transform = "scaleX(".concat(textDivProperties.scale, ")"); + } + } + + if (textDivProperties.angle !== 0) { + transform = "rotate(".concat(textDivProperties.angle, "deg) ").concat(transform); + } + + if (transform.length > 0) { + if (this._enhanceTextSelection) { + textDivProperties.originalTransform = transform; + } + + textDiv.style.transform = transform; + } + + if (textDivProperties.hasText) { + this._container.appendChild(textDiv); + } + + if (textDivProperties.hasEOL) { + var br = document.createElement("br"); + br.setAttribute("role", "presentation"); + + this._container.appendChild(br); + } + } + }, { + key: "_render", + value: function _render() { + var _this2 = this; + + var timeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + var capability = (0, _util.createPromiseCapability)(); + var styleCache = Object.create(null); + + var canvas = this._document.createElement("canvas"); + + canvas.height = canvas.width = DEFAULT_FONT_SIZE; + canvas.mozOpaque = true; + this._layoutTextCtx = canvas.getContext("2d", { + alpha: false + }); + + if (this._textContent) { + var textItems = this._textContent.items; + var textStyles = this._textContent.styles; + + this._processItems(textItems, textStyles); + + capability.resolve(); + } else if (this._textContentStream) { + var pump = function pump() { + _this2._reader.read().then(function (_ref2) { + var value = _ref2.value, + done = _ref2.done; + + if (done) { + capability.resolve(); + return; + } + + Object.assign(styleCache, value.styles); + + _this2._processItems(value.items, styleCache); + + pump(); + }, capability.reject); + }; + + this._reader = this._textContentStream.getReader(); + pump(); + } else { + throw new Error('Neither "textContent" nor "textContentStream"' + " parameters specified."); + } + + capability.promise.then(function () { + styleCache = null; + + if (!timeout) { + render(_this2); + } else { + _this2._renderTimer = setTimeout(function () { + render(_this2); + _this2._renderTimer = null; + }, timeout); + } + }, this._capability.reject); + } + }, { + key: "expandTextDivs", + value: function expandTextDivs() { + var expandDivs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + if (!this._enhanceTextSelection || !this._renderingDone) { + return; + } + + if (this._bounds !== null) { + expand(this); + this._bounds = null; + } + + var transformBuf = [], + paddingBuf = []; + + for (var i = 0, ii = this._textDivs.length; i < ii; i++) { + var div = this._textDivs[i]; + + var divProps = this._textDivProperties.get(div); + + if (!divProps.hasText) { + continue; + } + + if (expandDivs) { + transformBuf.length = 0; + paddingBuf.length = 0; + + if (divProps.originalTransform) { + transformBuf.push(divProps.originalTransform); + } + + if (divProps.paddingTop > 0) { + paddingBuf.push("".concat(divProps.paddingTop, "px")); + transformBuf.push("translateY(".concat(-divProps.paddingTop, "px)")); + } else { + paddingBuf.push(0); + } + + if (divProps.paddingRight > 0) { + paddingBuf.push("".concat(divProps.paddingRight / divProps.scale, "px")); + } else { + paddingBuf.push(0); + } + + if (divProps.paddingBottom > 0) { + paddingBuf.push("".concat(divProps.paddingBottom, "px")); + } else { + paddingBuf.push(0); + } + + if (divProps.paddingLeft > 0) { + paddingBuf.push("".concat(divProps.paddingLeft / divProps.scale, "px")); + transformBuf.push("translateX(".concat(-divProps.paddingLeft / divProps.scale, "px)")); + } else { + paddingBuf.push(0); + } + + div.style.padding = paddingBuf.join(" "); + + if (transformBuf.length) { + div.style.transform = transformBuf.join(" "); + } + } else { + div.style.padding = null; + div.style.transform = divProps.originalTransform; + } + } + } + }]); + + return TextLayerRenderTask; +}(); + +function renderTextLayer(renderParameters) { + var task = new TextLayerRenderTask({ + textContent: renderParameters.textContent, + textContentStream: renderParameters.textContentStream, + container: renderParameters.container, + viewport: renderParameters.viewport, + textDivs: renderParameters.textDivs, + textContentItemsStr: renderParameters.textContentItemsStr, + enhanceTextSelection: renderParameters.enhanceTextSelection + }); + + task._render(renderParameters.timeout); + + return task; +} + +/***/ }), +/* 129 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.SVGGraphics = void 0; + +var _util = __w_pdfjs_require__(4); + +var _display_utils = __w_pdfjs_require__(1); + +var _is_node = __w_pdfjs_require__(6); + +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } + +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } + +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var SVGGraphics = function SVGGraphics() { + _classCallCheck(this, SVGGraphics); + + (0, _util.unreachable)("Not implemented: SVGGraphics"); +}; + +exports.SVGGraphics = SVGGraphics; +{ + var opListToTree = function opListToTree(opList) { + var opTree = []; + var tmp = []; + + var _iterator = _createForOfIteratorHelper(opList), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var opListElement = _step.value; + + if (opListElement.fn === "save") { + opTree.push({ + fnId: 92, + fn: "group", + items: [] + }); + tmp.push(opTree); + opTree = opTree[opTree.length - 1].items; + continue; + } + + if (opListElement.fn === "restore") { + opTree = tmp.pop(); + } else { + opTree.push(opListElement); + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + return opTree; + }; + + var pf = function pf(value) { + if (Number.isInteger(value)) { + return value.toString(); + } + + var s = value.toFixed(10); + var i = s.length - 1; + + if (s[i] !== "0") { + return s; + } + + do { + i--; + } while (s[i] === "0"); + + return s.substring(0, s[i] === "." ? i : i + 1); + }; + + var pm = function pm(m) { + if (m[4] === 0 && m[5] === 0) { + if (m[1] === 0 && m[2] === 0) { + if (m[0] === 1 && m[3] === 1) { + return ""; + } + + return "scale(".concat(pf(m[0]), " ").concat(pf(m[3]), ")"); + } + + if (m[0] === m[3] && m[1] === -m[2]) { + var a = Math.acos(m[0]) * 180 / Math.PI; + return "rotate(".concat(pf(a), ")"); + } + } else { + if (m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 1) { + return "translate(".concat(pf(m[4]), " ").concat(pf(m[5]), ")"); + } + } + + return "matrix(".concat(pf(m[0]), " ").concat(pf(m[1]), " ").concat(pf(m[2]), " ").concat(pf(m[3]), " ").concat(pf(m[4]), " ") + "".concat(pf(m[5]), ")"); + }; + + var SVG_DEFAULTS = { + fontStyle: "normal", + fontWeight: "normal", + fillColor: "#000000" + }; + var XML_NS = "http://www.w3.org/XML/1998/namespace"; + var XLINK_NS = "http://www.w3.org/1999/xlink"; + var LINE_CAP_STYLES = ["butt", "round", "square"]; + var LINE_JOIN_STYLES = ["miter", "round", "bevel"]; + + var convertImgDataToPng = function () { + var PNG_HEADER = new Uint8Array([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]); + var CHUNK_WRAPPER_SIZE = 12; + var crcTable = new Int32Array(256); + + for (var i = 0; i < 256; i++) { + var c = i; + + for (var h = 0; h < 8; h++) { + if (c & 1) { + c = 0xedb88320 ^ c >> 1 & 0x7fffffff; + } else { + c = c >> 1 & 0x7fffffff; + } + } + + crcTable[i] = c; + } + + function crc32(data, start, end) { + var crc = -1; + + for (var _i = start; _i < end; _i++) { + var a = (crc ^ data[_i]) & 0xff; + var b = crcTable[a]; + crc = crc >>> 8 ^ b; + } + + return crc ^ -1; + } + + function writePngChunk(type, body, data, offset) { + var p = offset; + var len = body.length; + data[p] = len >> 24 & 0xff; + data[p + 1] = len >> 16 & 0xff; + data[p + 2] = len >> 8 & 0xff; + data[p + 3] = len & 0xff; + p += 4; + data[p] = type.charCodeAt(0) & 0xff; + data[p + 1] = type.charCodeAt(1) & 0xff; + data[p + 2] = type.charCodeAt(2) & 0xff; + data[p + 3] = type.charCodeAt(3) & 0xff; + p += 4; + data.set(body, p); + p += body.length; + var crc = crc32(data, offset + 4, p); + data[p] = crc >> 24 & 0xff; + data[p + 1] = crc >> 16 & 0xff; + data[p + 2] = crc >> 8 & 0xff; + data[p + 3] = crc & 0xff; + } + + function adler32(data, start, end) { + var a = 1; + var b = 0; + + for (var _i2 = start; _i2 < end; ++_i2) { + a = (a + (data[_i2] & 0xff)) % 65521; + b = (b + a) % 65521; + } + + return b << 16 | a; + } + + function deflateSync(literals) { + if (!_is_node.isNodeJS) { + return deflateSyncUncompressed(literals); + } + + try { + var input; + + if (parseInt(process.versions.node) >= 8) { + input = literals; + } else { + input = Buffer.from(literals); + } + + var output = require("zlib").deflateSync(input, { + level: 9 + }); + + return output instanceof Uint8Array ? output : new Uint8Array(output); + } catch (e) { + (0, _util.warn)("Not compressing PNG because zlib.deflateSync is unavailable: " + e); + } + + return deflateSyncUncompressed(literals); + } + + function deflateSyncUncompressed(literals) { + var len = literals.length; + var maxBlockLength = 0xffff; + var deflateBlocks = Math.ceil(len / maxBlockLength); + var idat = new Uint8Array(2 + len + deflateBlocks * 5 + 4); + var pi = 0; + idat[pi++] = 0x78; + idat[pi++] = 0x9c; + var pos = 0; + + while (len > maxBlockLength) { + idat[pi++] = 0x00; + idat[pi++] = 0xff; + idat[pi++] = 0xff; + idat[pi++] = 0x00; + idat[pi++] = 0x00; + idat.set(literals.subarray(pos, pos + maxBlockLength), pi); + pi += maxBlockLength; + pos += maxBlockLength; + len -= maxBlockLength; + } + + idat[pi++] = 0x01; + idat[pi++] = len & 0xff; + idat[pi++] = len >> 8 & 0xff; + idat[pi++] = ~len & 0xffff & 0xff; + idat[pi++] = (~len & 0xffff) >> 8 & 0xff; + idat.set(literals.subarray(pos), pi); + pi += literals.length - pos; + var adler = adler32(literals, 0, literals.length); + idat[pi++] = adler >> 24 & 0xff; + idat[pi++] = adler >> 16 & 0xff; + idat[pi++] = adler >> 8 & 0xff; + idat[pi++] = adler & 0xff; + return idat; + } + + function encode(imgData, kind, forceDataSchema, isMask) { + var width = imgData.width; + var height = imgData.height; + var bitDepth, colorType, lineSize; + var bytes = imgData.data; + + switch (kind) { + case _util.ImageKind.GRAYSCALE_1BPP: + colorType = 0; + bitDepth = 1; + lineSize = width + 7 >> 3; + break; + + case _util.ImageKind.RGB_24BPP: + colorType = 2; + bitDepth = 8; + lineSize = width * 3; + break; + + case _util.ImageKind.RGBA_32BPP: + colorType = 6; + bitDepth = 8; + lineSize = width * 4; + break; + + default: + throw new Error("invalid format"); + } + + var literals = new Uint8Array((1 + lineSize) * height); + var offsetLiterals = 0, + offsetBytes = 0; + + for (var y = 0; y < height; ++y) { + literals[offsetLiterals++] = 0; + literals.set(bytes.subarray(offsetBytes, offsetBytes + lineSize), offsetLiterals); + offsetBytes += lineSize; + offsetLiterals += lineSize; + } + + if (kind === _util.ImageKind.GRAYSCALE_1BPP && isMask) { + offsetLiterals = 0; + + for (var _y = 0; _y < height; _y++) { + offsetLiterals++; + + for (var _i3 = 0; _i3 < lineSize; _i3++) { + literals[offsetLiterals++] ^= 0xff; + } + } + } + + var 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]); + var idat = deflateSync(literals); + var pngLength = PNG_HEADER.length + CHUNK_WRAPPER_SIZE * 3 + ihdr.length + idat.length; + var data = new Uint8Array(pngLength); + var offset = 0; + data.set(PNG_HEADER, offset); + offset += PNG_HEADER.length; + writePngChunk("IHDR", ihdr, data, offset); + offset += CHUNK_WRAPPER_SIZE + ihdr.length; + writePngChunk("IDATA", idat, data, offset); + offset += CHUNK_WRAPPER_SIZE + idat.length; + writePngChunk("IEND", new Uint8Array(0), data, offset); + return (0, _util.createObjectURL)(data, "image/png", forceDataSchema); + } + + return function convertImgDataToPng(imgData, forceDataSchema, isMask) { + var kind = imgData.kind === undefined ? _util.ImageKind.GRAYSCALE_1BPP : imgData.kind; + return encode(imgData, kind, forceDataSchema, isMask); + }; + }(); + + var SVGExtraState = /*#__PURE__*/function () { + function SVGExtraState() { + _classCallCheck(this, SVGExtraState); + + this.fontSizeScale = 1; + this.fontWeight = SVG_DEFAULTS.fontWeight; + this.fontSize = 0; + this.textMatrix = _util.IDENTITY_MATRIX; + this.fontMatrix = _util.FONT_IDENTITY_MATRIX; + this.leading = 0; + this.textRenderingMode = _util.TextRenderingMode.FILL; + this.textMatrixScale = 1; + this.x = 0; + this.y = 0; + this.lineX = 0; + this.lineY = 0; + this.charSpacing = 0; + this.wordSpacing = 0; + this.textHScale = 1; + this.textRise = 0; + this.fillColor = SVG_DEFAULTS.fillColor; + this.strokeColor = "#000000"; + this.fillAlpha = 1; + this.strokeAlpha = 1; + this.lineWidth = 1; + this.lineJoin = ""; + this.lineCap = ""; + this.miterLimit = 0; + this.dashArray = []; + this.dashPhase = 0; + this.dependencies = []; + this.activeClipUrl = null; + this.clipGroup = null; + this.maskId = ""; + } + + _createClass(SVGExtraState, [{ + key: "clone", + value: function clone() { + return Object.create(this); + } + }, { + key: "setCurrentPoint", + value: function setCurrentPoint(x, y) { + this.x = x; + this.y = y; + } + }]); + + return SVGExtraState; + }(); + + var clipCount = 0; + var maskCount = 0; + var shadingCount = 0; + + exports.SVGGraphics = SVGGraphics = /*#__PURE__*/function () { + function SVGGraphics(commonObjs, objs) { + var forceDataSchema = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + _classCallCheck(this, SVGGraphics); + + this.svgFactory = new _display_utils.DOMSVGFactory(); + this.current = new SVGExtraState(); + this.transformMatrix = _util.IDENTITY_MATRIX; + this.transformStack = []; + this.extraStack = []; + this.commonObjs = commonObjs; + this.objs = objs; + this.pendingClip = null; + this.pendingEOFill = false; + this.embedFonts = false; + this.embeddedFonts = Object.create(null); + this.cssStyle = null; + this.forceDataSchema = !!forceDataSchema; + this._operatorIdMapping = []; + + for (var op in _util.OPS) { + this._operatorIdMapping[_util.OPS[op]] = op; + } + } + + _createClass(SVGGraphics, [{ + key: "save", + value: function save() { + this.transformStack.push(this.transformMatrix); + var old = this.current; + this.extraStack.push(old); + this.current = old.clone(); + } + }, { + key: "restore", + value: function restore() { + this.transformMatrix = this.transformStack.pop(); + this.current = this.extraStack.pop(); + this.pendingClip = null; + this.tgrp = null; + } + }, { + key: "group", + value: function group(items) { + this.save(); + this.executeOpTree(items); + this.restore(); + } + }, { + key: "loadDependencies", + value: function loadDependencies(operatorList) { + var _this = this; + + var fnArray = operatorList.fnArray; + var argsArray = operatorList.argsArray; + + for (var i = 0, ii = fnArray.length; i < ii; i++) { + if (fnArray[i] !== _util.OPS.dependency) { + continue; + } + + var _iterator2 = _createForOfIteratorHelper(argsArray[i]), + _step2; + + try { + var _loop = function _loop() { + var obj = _step2.value; + var objsPool = obj.startsWith("g_") ? _this.commonObjs : _this.objs; + var promise = new Promise(function (resolve) { + objsPool.get(obj, resolve); + }); + + _this.current.dependencies.push(promise); + }; + + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + _loop(); + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + } + + return Promise.all(this.current.dependencies); + } + }, { + key: "transform", + value: function transform(a, b, c, d, e, f) { + var transformMatrix = [a, b, c, d, e, f]; + this.transformMatrix = _util.Util.transform(this.transformMatrix, transformMatrix); + this.tgrp = null; + } + }, { + key: "getSVG", + value: function getSVG(operatorList, viewport) { + var _this2 = this; + + this.viewport = viewport; + + var svgElement = this._initialize(viewport); + + return this.loadDependencies(operatorList).then(function () { + _this2.transformMatrix = _util.IDENTITY_MATRIX; + + _this2.executeOpTree(_this2.convertOpList(operatorList)); + + return svgElement; + }); + } + }, { + key: "convertOpList", + value: function convertOpList(operatorList) { + var operatorIdMapping = this._operatorIdMapping; + var argsArray = operatorList.argsArray; + var fnArray = operatorList.fnArray; + var opList = []; + + for (var i = 0, ii = fnArray.length; i < ii; i++) { + var fnId = fnArray[i]; + opList.push({ + fnId: fnId, + fn: operatorIdMapping[fnId], + args: argsArray[i] + }); + } + + return opListToTree(opList); + } + }, { + key: "executeOpTree", + value: function executeOpTree(opTree) { + var _iterator3 = _createForOfIteratorHelper(opTree), + _step3; + + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { + var opTreeElement = _step3.value; + var fn = opTreeElement.fn; + var fnId = opTreeElement.fnId; + var args = opTreeElement.args; + + switch (fnId | 0) { + case _util.OPS.beginText: + this.beginText(); + break; + + case _util.OPS.dependency: + break; + + case _util.OPS.setLeading: + this.setLeading(args); + break; + + case _util.OPS.setLeadingMoveText: + this.setLeadingMoveText(args[0], args[1]); + break; + + case _util.OPS.setFont: + this.setFont(args); + break; + + case _util.OPS.showText: + this.showText(args[0]); + break; + + case _util.OPS.showSpacedText: + this.showText(args[0]); + break; + + case _util.OPS.endText: + this.endText(); + break; + + case _util.OPS.moveText: + this.moveText(args[0], args[1]); + break; + + case _util.OPS.setCharSpacing: + this.setCharSpacing(args[0]); + break; + + case _util.OPS.setWordSpacing: + this.setWordSpacing(args[0]); + break; + + case _util.OPS.setHScale: + this.setHScale(args[0]); + break; + + case _util.OPS.setTextMatrix: + this.setTextMatrix(args[0], args[1], args[2], args[3], args[4], args[5]); + break; + + case _util.OPS.setTextRise: + this.setTextRise(args[0]); + break; + + case _util.OPS.setTextRenderingMode: + this.setTextRenderingMode(args[0]); + break; + + case _util.OPS.setLineWidth: + this.setLineWidth(args[0]); + break; + + case _util.OPS.setLineJoin: + this.setLineJoin(args[0]); + break; + + case _util.OPS.setLineCap: + this.setLineCap(args[0]); + break; + + case _util.OPS.setMiterLimit: + this.setMiterLimit(args[0]); + break; + + case _util.OPS.setFillRGBColor: + this.setFillRGBColor(args[0], args[1], args[2]); + break; + + case _util.OPS.setStrokeRGBColor: + this.setStrokeRGBColor(args[0], args[1], args[2]); + break; + + case _util.OPS.setStrokeColorN: + this.setStrokeColorN(args); + break; + + case _util.OPS.setFillColorN: + this.setFillColorN(args); + break; + + case _util.OPS.shadingFill: + this.shadingFill(args[0]); + break; + + case _util.OPS.setDash: + this.setDash(args[0], args[1]); + break; + + case _util.OPS.setRenderingIntent: + this.setRenderingIntent(args[0]); + break; + + case _util.OPS.setFlatness: + this.setFlatness(args[0]); + break; + + case _util.OPS.setGState: + this.setGState(args[0]); + break; + + case _util.OPS.fill: + this.fill(); + break; + + case _util.OPS.eoFill: + this.eoFill(); + break; + + case _util.OPS.stroke: + this.stroke(); + break; + + case _util.OPS.fillStroke: + this.fillStroke(); + break; + + case _util.OPS.eoFillStroke: + this.eoFillStroke(); + break; + + case _util.OPS.clip: + this.clip("nonzero"); + break; + + case _util.OPS.eoClip: + this.clip("evenodd"); + break; + + case _util.OPS.paintSolidColorImageMask: + this.paintSolidColorImageMask(); + break; + + case _util.OPS.paintImageXObject: + this.paintImageXObject(args[0]); + break; + + case _util.OPS.paintInlineImageXObject: + this.paintInlineImageXObject(args[0]); + break; + + case _util.OPS.paintImageMaskXObject: + this.paintImageMaskXObject(args[0]); + break; + + case _util.OPS.paintFormXObjectBegin: + this.paintFormXObjectBegin(args[0], args[1]); + break; + + case _util.OPS.paintFormXObjectEnd: + this.paintFormXObjectEnd(); + break; + + case _util.OPS.closePath: + this.closePath(); + break; + + case _util.OPS.closeStroke: + this.closeStroke(); + break; + + case _util.OPS.closeFillStroke: + this.closeFillStroke(); + break; + + case _util.OPS.closeEOFillStroke: + this.closeEOFillStroke(); + break; + + case _util.OPS.nextLine: + this.nextLine(); + break; + + case _util.OPS.transform: + this.transform(args[0], args[1], args[2], args[3], args[4], args[5]); + break; + + case _util.OPS.constructPath: + this.constructPath(args[0], args[1]); + break; + + case _util.OPS.endPath: + this.endPath(); + break; + + case 92: + this.group(opTreeElement.items); + break; + + default: + (0, _util.warn)("Unimplemented operator ".concat(fn)); + break; + } + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); + } + } + }, { + key: "setWordSpacing", + value: function setWordSpacing(wordSpacing) { + this.current.wordSpacing = wordSpacing; + } + }, { + key: "setCharSpacing", + value: function setCharSpacing(charSpacing) { + this.current.charSpacing = charSpacing; + } + }, { + key: "nextLine", + value: function nextLine() { + this.moveText(0, this.current.leading); + } + }, { + key: "setTextMatrix", + value: function setTextMatrix(a, b, c, d, e, f) { + var current = this.current; + current.textMatrix = current.lineMatrix = [a, b, c, d, e, f]; + current.textMatrixScale = Math.hypot(a, b); + current.x = current.lineX = 0; + current.y = current.lineY = 0; + current.xcoords = []; + current.ycoords = []; + current.tspan = this.svgFactory.createElement("svg:tspan"); + current.tspan.setAttributeNS(null, "font-family", current.fontFamily); + current.tspan.setAttributeNS(null, "font-size", "".concat(pf(current.fontSize), "px")); + current.tspan.setAttributeNS(null, "y", pf(-current.y)); + current.txtElement = this.svgFactory.createElement("svg:text"); + current.txtElement.appendChild(current.tspan); + } + }, { + key: "beginText", + value: function beginText() { + var current = this.current; + current.x = current.lineX = 0; + current.y = current.lineY = 0; + current.textMatrix = _util.IDENTITY_MATRIX; + current.lineMatrix = _util.IDENTITY_MATRIX; + current.textMatrixScale = 1; + current.tspan = this.svgFactory.createElement("svg:tspan"); + current.txtElement = this.svgFactory.createElement("svg:text"); + current.txtgrp = this.svgFactory.createElement("svg:g"); + current.xcoords = []; + current.ycoords = []; + } + }, { + key: "moveText", + value: function moveText(x, y) { + var current = this.current; + current.x = current.lineX += x; + current.y = current.lineY += y; + current.xcoords = []; + current.ycoords = []; + current.tspan = this.svgFactory.createElement("svg:tspan"); + current.tspan.setAttributeNS(null, "font-family", current.fontFamily); + current.tspan.setAttributeNS(null, "font-size", "".concat(pf(current.fontSize), "px")); + current.tspan.setAttributeNS(null, "y", pf(-current.y)); + } + }, { + key: "showText", + value: function showText(glyphs) { + var current = this.current; + var font = current.font; + var fontSize = current.fontSize; + + if (fontSize === 0) { + return; + } + + var fontSizeScale = current.fontSizeScale; + var charSpacing = current.charSpacing; + var wordSpacing = current.wordSpacing; + var fontDirection = current.fontDirection; + var textHScale = current.textHScale * fontDirection; + var vertical = font.vertical; + var spacingDir = vertical ? 1 : -1; + var defaultVMetrics = font.defaultVMetrics; + var widthAdvanceScale = fontSize * current.fontMatrix[0]; + var x = 0; + + var _iterator4 = _createForOfIteratorHelper(glyphs), + _step4; + + try { + for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { + var glyph = _step4.value; + + if (glyph === null) { + x += fontDirection * wordSpacing; + continue; + } else if ((0, _util.isNum)(glyph)) { + x += spacingDir * glyph * fontSize / 1000; + continue; + } + + var spacing = (glyph.isSpace ? wordSpacing : 0) + charSpacing; + var character = glyph.fontChar; + var scaledX = void 0, + scaledY = void 0; + var width = glyph.width; + + if (vertical) { + var vx = void 0; + var vmetric = glyph.vmetric || defaultVMetrics; + vx = glyph.vmetric ? vmetric[1] : width * 0.5; + vx = -vx * widthAdvanceScale; + var vy = vmetric[2] * widthAdvanceScale; + width = vmetric ? -vmetric[0] : width; + scaledX = vx / fontSizeScale; + scaledY = (x + vy) / fontSizeScale; + } else { + scaledX = x / fontSizeScale; + scaledY = 0; + } + + if (glyph.isInFont || font.missingFile) { + current.xcoords.push(current.x + scaledX); + + if (vertical) { + current.ycoords.push(-current.y + scaledY); + } + + current.tspan.textContent += character; + } else {} + + var charWidth = void 0; + + if (vertical) { + charWidth = width * widthAdvanceScale - spacing * fontDirection; + } else { + charWidth = width * widthAdvanceScale + spacing * fontDirection; + } + + x += charWidth; + } + } catch (err) { + _iterator4.e(err); + } finally { + _iterator4.f(); + } + + current.tspan.setAttributeNS(null, "x", current.xcoords.map(pf).join(" ")); + + if (vertical) { + current.tspan.setAttributeNS(null, "y", current.ycoords.map(pf).join(" ")); + } else { + current.tspan.setAttributeNS(null, "y", pf(-current.y)); + } + + if (vertical) { + current.y -= x; + } else { + current.x += x * textHScale; + } + + current.tspan.setAttributeNS(null, "font-family", current.fontFamily); + current.tspan.setAttributeNS(null, "font-size", "".concat(pf(current.fontSize), "px")); + + if (current.fontStyle !== SVG_DEFAULTS.fontStyle) { + current.tspan.setAttributeNS(null, "font-style", current.fontStyle); + } + + if (current.fontWeight !== SVG_DEFAULTS.fontWeight) { + current.tspan.setAttributeNS(null, "font-weight", current.fontWeight); + } + + var fillStrokeMode = current.textRenderingMode & _util.TextRenderingMode.FILL_STROKE_MASK; + + if (fillStrokeMode === _util.TextRenderingMode.FILL || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) { + if (current.fillColor !== SVG_DEFAULTS.fillColor) { + current.tspan.setAttributeNS(null, "fill", current.fillColor); + } + + if (current.fillAlpha < 1) { + current.tspan.setAttributeNS(null, "fill-opacity", current.fillAlpha); + } + } else if (current.textRenderingMode === _util.TextRenderingMode.ADD_TO_PATH) { + current.tspan.setAttributeNS(null, "fill", "transparent"); + } else { + current.tspan.setAttributeNS(null, "fill", "none"); + } + + if (fillStrokeMode === _util.TextRenderingMode.STROKE || fillStrokeMode === _util.TextRenderingMode.FILL_STROKE) { + var lineWidthScale = 1 / (current.textMatrixScale || 1); + + this._setStrokeAttributes(current.tspan, lineWidthScale); + } + + var textMatrix = current.textMatrix; + + if (current.textRise !== 0) { + textMatrix = textMatrix.slice(); + textMatrix[5] += current.textRise; + } + + current.txtElement.setAttributeNS(null, "transform", "".concat(pm(textMatrix), " scale(").concat(pf(textHScale), ", -1)")); + current.txtElement.setAttributeNS(XML_NS, "xml:space", "preserve"); + current.txtElement.appendChild(current.tspan); + current.txtgrp.appendChild(current.txtElement); + + this._ensureTransformGroup().appendChild(current.txtElement); + } + }, { + key: "setLeadingMoveText", + value: function setLeadingMoveText(x, y) { + this.setLeading(-y); + this.moveText(x, y); + } + }, { + key: "addFontStyle", + value: function addFontStyle(fontObj) { + if (!fontObj.data) { + throw new Error("addFontStyle: No font data available, " + 'ensure that the "fontExtraProperties" API parameter is set.'); + } + + if (!this.cssStyle) { + this.cssStyle = this.svgFactory.createElement("svg:style"); + this.cssStyle.setAttributeNS(null, "type", "text/css"); + this.defs.appendChild(this.cssStyle); + } + + var url = (0, _util.createObjectURL)(fontObj.data, fontObj.mimetype, this.forceDataSchema); + this.cssStyle.textContent += "@font-face { font-family: \"".concat(fontObj.loadedName, "\";") + " src: url(".concat(url, "); }\n"); + } + }, { + key: "setFont", + value: function setFont(details) { + var current = this.current; + var fontObj = this.commonObjs.get(details[0]); + var size = details[1]; + current.font = fontObj; + + if (this.embedFonts && !fontObj.missingFile && !this.embeddedFonts[fontObj.loadedName]) { + this.addFontStyle(fontObj); + this.embeddedFonts[fontObj.loadedName] = fontObj; + } + + current.fontMatrix = fontObj.fontMatrix || _util.FONT_IDENTITY_MATRIX; + var bold = "normal"; + + if (fontObj.black) { + bold = "900"; + } else if (fontObj.bold) { + bold = "bold"; + } + + var italic = fontObj.italic ? "italic" : "normal"; + + if (size < 0) { + size = -size; + current.fontDirection = -1; + } else { + current.fontDirection = 1; + } + + current.fontSize = size; + current.fontFamily = fontObj.loadedName; + current.fontWeight = bold; + current.fontStyle = italic; + current.tspan = this.svgFactory.createElement("svg:tspan"); + current.tspan.setAttributeNS(null, "y", pf(-current.y)); + current.xcoords = []; + current.ycoords = []; + } + }, { + key: "endText", + value: function endText() { + var _current$txtElement; + + var current = this.current; + + if (current.textRenderingMode & _util.TextRenderingMode.ADD_TO_PATH_FLAG && (_current$txtElement = current.txtElement) !== null && _current$txtElement !== void 0 && _current$txtElement.hasChildNodes()) { + current.element = current.txtElement; + this.clip("nonzero"); + this.endPath(); + } + } + }, { + key: "setLineWidth", + value: function setLineWidth(width) { + if (width > 0) { + this.current.lineWidth = width; + } + } + }, { + key: "setLineCap", + value: function setLineCap(style) { + this.current.lineCap = LINE_CAP_STYLES[style]; + } + }, { + key: "setLineJoin", + value: function setLineJoin(style) { + this.current.lineJoin = LINE_JOIN_STYLES[style]; + } + }, { + key: "setMiterLimit", + value: function setMiterLimit(limit) { + this.current.miterLimit = limit; + } + }, { + key: "setStrokeAlpha", + value: function setStrokeAlpha(strokeAlpha) { + this.current.strokeAlpha = strokeAlpha; + } + }, { + key: "setStrokeRGBColor", + value: function setStrokeRGBColor(r, g, b) { + this.current.strokeColor = _util.Util.makeHexColor(r, g, b); + } + }, { + key: "setFillAlpha", + value: function setFillAlpha(fillAlpha) { + this.current.fillAlpha = fillAlpha; + } + }, { + key: "setFillRGBColor", + value: function setFillRGBColor(r, g, b) { + this.current.fillColor = _util.Util.makeHexColor(r, g, b); + this.current.tspan = this.svgFactory.createElement("svg:tspan"); + this.current.xcoords = []; + this.current.ycoords = []; + } + }, { + key: "setStrokeColorN", + value: function setStrokeColorN(args) { + this.current.strokeColor = this._makeColorN_Pattern(args); + } + }, { + key: "setFillColorN", + value: function setFillColorN(args) { + this.current.fillColor = this._makeColorN_Pattern(args); + } + }, { + key: "shadingFill", + value: function shadingFill(args) { + var width = this.viewport.width; + var height = this.viewport.height; + + var inv = _util.Util.inverseTransform(this.transformMatrix); + + var bl = _util.Util.applyTransform([0, 0], inv); + + var br = _util.Util.applyTransform([0, height], inv); + + var ul = _util.Util.applyTransform([width, 0], inv); + + var ur = _util.Util.applyTransform([width, height], inv); + + var x0 = Math.min(bl[0], br[0], ul[0], ur[0]); + var y0 = Math.min(bl[1], br[1], ul[1], ur[1]); + var x1 = Math.max(bl[0], br[0], ul[0], ur[0]); + var y1 = Math.max(bl[1], br[1], ul[1], ur[1]); + var rect = this.svgFactory.createElement("svg:rect"); + rect.setAttributeNS(null, "x", x0); + rect.setAttributeNS(null, "y", y0); + rect.setAttributeNS(null, "width", x1 - x0); + rect.setAttributeNS(null, "height", y1 - y0); + rect.setAttributeNS(null, "fill", this._makeShadingPattern(args)); + + if (this.current.fillAlpha < 1) { + rect.setAttributeNS(null, "fill-opacity", this.current.fillAlpha); + } + + this._ensureTransformGroup().appendChild(rect); + } + }, { + key: "_makeColorN_Pattern", + value: function _makeColorN_Pattern(args) { + if (args[0] === "TilingPattern") { + return this._makeTilingPattern(args); + } + + return this._makeShadingPattern(args); + } + }, { + key: "_makeTilingPattern", + value: function _makeTilingPattern(args) { + var color = args[1]; + var operatorList = args[2]; + var matrix = args[3] || _util.IDENTITY_MATRIX; + + var _args$ = _slicedToArray(args[4], 4), + x0 = _args$[0], + y0 = _args$[1], + x1 = _args$[2], + y1 = _args$[3]; + + var xstep = args[5]; + var ystep = args[6]; + var paintType = args[7]; + var tilingId = "shading".concat(shadingCount++); + + var _Util$normalizeRect = _util.Util.normalizeRect([].concat(_toConsumableArray(_util.Util.applyTransform([x0, y0], matrix)), _toConsumableArray(_util.Util.applyTransform([x1, y1], matrix)))), + _Util$normalizeRect2 = _slicedToArray(_Util$normalizeRect, 4), + tx0 = _Util$normalizeRect2[0], + ty0 = _Util$normalizeRect2[1], + tx1 = _Util$normalizeRect2[2], + ty1 = _Util$normalizeRect2[3]; + + var _Util$singularValueDe = _util.Util.singularValueDecompose2dScale(matrix), + _Util$singularValueDe2 = _slicedToArray(_Util$singularValueDe, 2), + xscale = _Util$singularValueDe2[0], + yscale = _Util$singularValueDe2[1]; + + var txstep = xstep * xscale; + var tystep = ystep * yscale; + var tiling = this.svgFactory.createElement("svg:pattern"); + tiling.setAttributeNS(null, "id", tilingId); + tiling.setAttributeNS(null, "patternUnits", "userSpaceOnUse"); + tiling.setAttributeNS(null, "width", txstep); + tiling.setAttributeNS(null, "height", tystep); + tiling.setAttributeNS(null, "x", "".concat(tx0)); + tiling.setAttributeNS(null, "y", "".concat(ty0)); + var svg = this.svg; + var transformMatrix = this.transformMatrix; + var fillColor = this.current.fillColor; + var strokeColor = this.current.strokeColor; + var bbox = this.svgFactory.create(tx1 - tx0, ty1 - ty0); + this.svg = bbox; + this.transformMatrix = matrix; + + if (paintType === 2) { + var cssColor = _util.Util.makeHexColor.apply(_util.Util, _toConsumableArray(color)); + + this.current.fillColor = cssColor; + this.current.strokeColor = cssColor; + } + + this.executeOpTree(this.convertOpList(operatorList)); + this.svg = svg; + this.transformMatrix = transformMatrix; + this.current.fillColor = fillColor; + this.current.strokeColor = strokeColor; + tiling.appendChild(bbox.childNodes[0]); + this.defs.appendChild(tiling); + return "url(#".concat(tilingId, ")"); + } + }, { + key: "_makeShadingPattern", + value: function _makeShadingPattern(args) { + switch (args[0]) { + case "RadialAxial": + var shadingId = "shading".concat(shadingCount++); + var colorStops = args[3]; + var gradient; + + switch (args[1]) { + case "axial": + var point0 = args[4]; + var point1 = args[5]; + gradient = this.svgFactory.createElement("svg:linearGradient"); + gradient.setAttributeNS(null, "id", shadingId); + gradient.setAttributeNS(null, "gradientUnits", "userSpaceOnUse"); + gradient.setAttributeNS(null, "x1", point0[0]); + gradient.setAttributeNS(null, "y1", point0[1]); + gradient.setAttributeNS(null, "x2", point1[0]); + gradient.setAttributeNS(null, "y2", point1[1]); + break; + + case "radial": + var focalPoint = args[4]; + var circlePoint = args[5]; + var focalRadius = args[6]; + var circleRadius = args[7]; + gradient = this.svgFactory.createElement("svg:radialGradient"); + gradient.setAttributeNS(null, "id", shadingId); + gradient.setAttributeNS(null, "gradientUnits", "userSpaceOnUse"); + gradient.setAttributeNS(null, "cx", circlePoint[0]); + gradient.setAttributeNS(null, "cy", circlePoint[1]); + gradient.setAttributeNS(null, "r", circleRadius); + gradient.setAttributeNS(null, "fx", focalPoint[0]); + gradient.setAttributeNS(null, "fy", focalPoint[1]); + gradient.setAttributeNS(null, "fr", focalRadius); + break; + + default: + throw new Error("Unknown RadialAxial type: ".concat(args[1])); + } + + var _iterator5 = _createForOfIteratorHelper(colorStops), + _step5; + + try { + for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { + var colorStop = _step5.value; + var stop = this.svgFactory.createElement("svg:stop"); + stop.setAttributeNS(null, "offset", colorStop[0]); + stop.setAttributeNS(null, "stop-color", colorStop[1]); + gradient.appendChild(stop); + } + } catch (err) { + _iterator5.e(err); + } finally { + _iterator5.f(); + } + + this.defs.appendChild(gradient); + return "url(#".concat(shadingId, ")"); + + case "Mesh": + (0, _util.warn)("Unimplemented pattern Mesh"); + return null; + + case "Dummy": + return "hotpink"; + + default: + throw new Error("Unknown IR type: ".concat(args[0])); + } + } + }, { + key: "setDash", + value: function setDash(dashArray, dashPhase) { + this.current.dashArray = dashArray; + this.current.dashPhase = dashPhase; + } + }, { + key: "constructPath", + value: function constructPath(ops, args) { + var current = this.current; + var x = current.x, + y = current.y; + var d = []; + var j = 0; + + var _iterator6 = _createForOfIteratorHelper(ops), + _step6; + + try { + for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) { + var op = _step6.value; + + switch (op | 0) { + case _util.OPS.rectangle: + x = args[j++]; + y = args[j++]; + var width = args[j++]; + var height = args[j++]; + var xw = x + width; + var yh = y + height; + d.push("M", pf(x), pf(y), "L", pf(xw), pf(y), "L", pf(xw), pf(yh), "L", pf(x), pf(yh), "Z"); + break; + + case _util.OPS.moveTo: + x = args[j++]; + y = args[j++]; + d.push("M", pf(x), pf(y)); + break; + + case _util.OPS.lineTo: + x = args[j++]; + y = args[j++]; + d.push("L", pf(x), pf(y)); + break; + + case _util.OPS.curveTo: + x = args[j + 4]; + y = args[j + 5]; + d.push("C", pf(args[j]), pf(args[j + 1]), pf(args[j + 2]), pf(args[j + 3]), pf(x), pf(y)); + j += 6; + break; + + case _util.OPS.curveTo2: + d.push("C", pf(x), pf(y), pf(args[j]), pf(args[j + 1]), pf(args[j + 2]), pf(args[j + 3])); + x = args[j + 2]; + y = args[j + 3]; + j += 4; + break; + + case _util.OPS.curveTo3: + x = args[j + 2]; + y = args[j + 3]; + d.push("C", pf(args[j]), pf(args[j + 1]), pf(x), pf(y), pf(x), pf(y)); + j += 4; + break; + + case _util.OPS.closePath: + d.push("Z"); + break; + } + } + } catch (err) { + _iterator6.e(err); + } finally { + _iterator6.f(); + } + + d = d.join(" "); + + if (current.path && ops.length > 0 && ops[0] !== _util.OPS.rectangle && ops[0] !== _util.OPS.moveTo) { + d = current.path.getAttributeNS(null, "d") + d; + } else { + current.path = this.svgFactory.createElement("svg:path"); + + this._ensureTransformGroup().appendChild(current.path); + } + + current.path.setAttributeNS(null, "d", d); + current.path.setAttributeNS(null, "fill", "none"); + current.element = current.path; + current.setCurrentPoint(x, y); + } + }, { + key: "endPath", + value: function endPath() { + var current = this.current; + current.path = null; + + if (!this.pendingClip) { + return; + } + + if (!current.element) { + this.pendingClip = null; + return; + } + + var clipId = "clippath".concat(clipCount++); + var clipPath = this.svgFactory.createElement("svg:clipPath"); + clipPath.setAttributeNS(null, "id", clipId); + clipPath.setAttributeNS(null, "transform", pm(this.transformMatrix)); + var clipElement = current.element.cloneNode(true); + + if (this.pendingClip === "evenodd") { + clipElement.setAttributeNS(null, "clip-rule", "evenodd"); + } else { + clipElement.setAttributeNS(null, "clip-rule", "nonzero"); + } + + this.pendingClip = null; + clipPath.appendChild(clipElement); + this.defs.appendChild(clipPath); + + if (current.activeClipUrl) { + current.clipGroup = null; + + var _iterator7 = _createForOfIteratorHelper(this.extraStack), + _step7; + + try { + for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) { + var prev = _step7.value; + prev.clipGroup = null; + } + } catch (err) { + _iterator7.e(err); + } finally { + _iterator7.f(); + } + + clipPath.setAttributeNS(null, "clip-path", current.activeClipUrl); + } + + current.activeClipUrl = "url(#".concat(clipId, ")"); + this.tgrp = null; + } + }, { + key: "clip", + value: function clip(type) { + this.pendingClip = type; + } + }, { + key: "closePath", + value: function closePath() { + var current = this.current; + + if (current.path) { + var d = "".concat(current.path.getAttributeNS(null, "d"), "Z"); + current.path.setAttributeNS(null, "d", d); + } + } + }, { + key: "setLeading", + value: function setLeading(leading) { + this.current.leading = -leading; + } + }, { + key: "setTextRise", + value: function setTextRise(textRise) { + this.current.textRise = textRise; + } + }, { + key: "setTextRenderingMode", + value: function setTextRenderingMode(textRenderingMode) { + this.current.textRenderingMode = textRenderingMode; + } + }, { + key: "setHScale", + value: function setHScale(scale) { + this.current.textHScale = scale / 100; + } + }, { + key: "setRenderingIntent", + value: function setRenderingIntent(intent) {} + }, { + key: "setFlatness", + value: function setFlatness(flatness) {} + }, { + key: "setGState", + value: function setGState(states) { + var _iterator8 = _createForOfIteratorHelper(states), + _step8; + + try { + for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) { + var _step8$value = _slicedToArray(_step8.value, 2), + key = _step8$value[0], + value = _step8$value[1]; + + switch (key) { + case "LW": + this.setLineWidth(value); + break; + + case "LC": + this.setLineCap(value); + break; + + case "LJ": + this.setLineJoin(value); + break; + + case "ML": + this.setMiterLimit(value); + break; + + case "D": + this.setDash(value[0], value[1]); + break; + + case "RI": + this.setRenderingIntent(value); + break; + + case "FL": + this.setFlatness(value); + break; + + case "Font": + this.setFont(value); + break; + + case "CA": + this.setStrokeAlpha(value); + break; + + case "ca": + this.setFillAlpha(value); + break; + + default: + (0, _util.warn)("Unimplemented graphic state operator ".concat(key)); + break; + } + } + } catch (err) { + _iterator8.e(err); + } finally { + _iterator8.f(); + } + } + }, { + key: "fill", + value: function fill() { + var current = this.current; + + if (current.element) { + current.element.setAttributeNS(null, "fill", current.fillColor); + current.element.setAttributeNS(null, "fill-opacity", current.fillAlpha); + this.endPath(); + } + } + }, { + key: "stroke", + value: function stroke() { + var current = this.current; + + if (current.element) { + this._setStrokeAttributes(current.element); + + current.element.setAttributeNS(null, "fill", "none"); + this.endPath(); + } + } + }, { + key: "_setStrokeAttributes", + value: function _setStrokeAttributes(element) { + var lineWidthScale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; + var current = this.current; + var dashArray = current.dashArray; + + if (lineWidthScale !== 1 && dashArray.length > 0) { + dashArray = dashArray.map(function (value) { + return lineWidthScale * value; + }); + } + + element.setAttributeNS(null, "stroke", current.strokeColor); + element.setAttributeNS(null, "stroke-opacity", current.strokeAlpha); + element.setAttributeNS(null, "stroke-miterlimit", pf(current.miterLimit)); + element.setAttributeNS(null, "stroke-linecap", current.lineCap); + element.setAttributeNS(null, "stroke-linejoin", current.lineJoin); + element.setAttributeNS(null, "stroke-width", pf(lineWidthScale * current.lineWidth) + "px"); + element.setAttributeNS(null, "stroke-dasharray", dashArray.map(pf).join(" ")); + element.setAttributeNS(null, "stroke-dashoffset", pf(lineWidthScale * current.dashPhase) + "px"); + } + }, { + key: "eoFill", + value: function eoFill() { + if (this.current.element) { + this.current.element.setAttributeNS(null, "fill-rule", "evenodd"); + } + + this.fill(); + } + }, { + key: "fillStroke", + value: function fillStroke() { + this.stroke(); + this.fill(); + } + }, { + key: "eoFillStroke", + value: function eoFillStroke() { + if (this.current.element) { + this.current.element.setAttributeNS(null, "fill-rule", "evenodd"); + } + + this.fillStroke(); + } + }, { + key: "closeStroke", + value: function closeStroke() { + this.closePath(); + this.stroke(); + } + }, { + key: "closeFillStroke", + value: function closeFillStroke() { + this.closePath(); + this.fillStroke(); + } + }, { + key: "closeEOFillStroke", + value: function closeEOFillStroke() { + this.closePath(); + this.eoFillStroke(); + } + }, { + key: "paintSolidColorImageMask", + value: function paintSolidColorImageMask() { + var rect = this.svgFactory.createElement("svg:rect"); + rect.setAttributeNS(null, "x", "0"); + rect.setAttributeNS(null, "y", "0"); + rect.setAttributeNS(null, "width", "1px"); + rect.setAttributeNS(null, "height", "1px"); + rect.setAttributeNS(null, "fill", this.current.fillColor); + + this._ensureTransformGroup().appendChild(rect); + } + }, { + key: "paintImageXObject", + value: function paintImageXObject(objId) { + var imgData = objId.startsWith("g_") ? this.commonObjs.get(objId) : this.objs.get(objId); + + if (!imgData) { + (0, _util.warn)("Dependent image with object ID ".concat(objId, " is not ready yet")); + return; + } + + this.paintInlineImageXObject(imgData); + } + }, { + key: "paintInlineImageXObject", + value: function paintInlineImageXObject(imgData, mask) { + var width = imgData.width; + var height = imgData.height; + var imgSrc = convertImgDataToPng(imgData, this.forceDataSchema, !!mask); + var cliprect = this.svgFactory.createElement("svg:rect"); + cliprect.setAttributeNS(null, "x", "0"); + cliprect.setAttributeNS(null, "y", "0"); + cliprect.setAttributeNS(null, "width", pf(width)); + cliprect.setAttributeNS(null, "height", pf(height)); + this.current.element = cliprect; + this.clip("nonzero"); + var imgEl = this.svgFactory.createElement("svg:image"); + imgEl.setAttributeNS(XLINK_NS, "xlink:href", imgSrc); + imgEl.setAttributeNS(null, "x", "0"); + imgEl.setAttributeNS(null, "y", pf(-height)); + imgEl.setAttributeNS(null, "width", pf(width) + "px"); + imgEl.setAttributeNS(null, "height", pf(height) + "px"); + imgEl.setAttributeNS(null, "transform", "scale(".concat(pf(1 / width), " ").concat(pf(-1 / height), ")")); + + if (mask) { + mask.appendChild(imgEl); + } else { + this._ensureTransformGroup().appendChild(imgEl); + } + } + }, { + key: "paintImageMaskXObject", + value: function paintImageMaskXObject(imgData) { + var current = this.current; + var width = imgData.width; + var height = imgData.height; + var fillColor = current.fillColor; + current.maskId = "mask".concat(maskCount++); + var mask = this.svgFactory.createElement("svg:mask"); + mask.setAttributeNS(null, "id", current.maskId); + var rect = this.svgFactory.createElement("svg:rect"); + rect.setAttributeNS(null, "x", "0"); + rect.setAttributeNS(null, "y", "0"); + rect.setAttributeNS(null, "width", pf(width)); + rect.setAttributeNS(null, "height", pf(height)); + rect.setAttributeNS(null, "fill", fillColor); + rect.setAttributeNS(null, "mask", "url(#".concat(current.maskId, ")")); + this.defs.appendChild(mask); + + this._ensureTransformGroup().appendChild(rect); + + this.paintInlineImageXObject(imgData, mask); + } + }, { + key: "paintFormXObjectBegin", + value: function paintFormXObjectBegin(matrix, bbox) { + if (Array.isArray(matrix) && matrix.length === 6) { + this.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); + } + + if (bbox) { + var width = bbox[2] - bbox[0]; + var height = bbox[3] - bbox[1]; + var cliprect = this.svgFactory.createElement("svg:rect"); + cliprect.setAttributeNS(null, "x", bbox[0]); + cliprect.setAttributeNS(null, "y", bbox[1]); + cliprect.setAttributeNS(null, "width", pf(width)); + cliprect.setAttributeNS(null, "height", pf(height)); + this.current.element = cliprect; + this.clip("nonzero"); + this.endPath(); + } + } + }, { + key: "paintFormXObjectEnd", + value: function paintFormXObjectEnd() {} + }, { + key: "_initialize", + value: function _initialize(viewport) { + var svg = this.svgFactory.create(viewport.width, viewport.height); + var definitions = this.svgFactory.createElement("svg:defs"); + svg.appendChild(definitions); + this.defs = definitions; + var rootGroup = this.svgFactory.createElement("svg:g"); + rootGroup.setAttributeNS(null, "transform", pm(viewport.transform)); + svg.appendChild(rootGroup); + this.svg = rootGroup; + return svg; + } + }, { + key: "_ensureClipGroup", + value: function _ensureClipGroup() { + if (!this.current.clipGroup) { + var clipGroup = this.svgFactory.createElement("svg:g"); + clipGroup.setAttributeNS(null, "clip-path", this.current.activeClipUrl); + this.svg.appendChild(clipGroup); + this.current.clipGroup = clipGroup; + } + + return this.current.clipGroup; + } + }, { + key: "_ensureTransformGroup", + value: function _ensureTransformGroup() { + if (!this.tgrp) { + this.tgrp = this.svgFactory.createElement("svg:g"); + this.tgrp.setAttributeNS(null, "transform", pm(this.transformMatrix)); + + if (this.current.activeClipUrl) { + this._ensureClipGroup().appendChild(this.tgrp); + } else { + this.svg.appendChild(this.tgrp); + } + } + + return this.tgrp; + } + }]); + + return SVGGraphics; + }(); +} + +/***/ }), +/* 130 */ +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.XfaLayer = void 0; + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var XfaLayer = /*#__PURE__*/function () { + function XfaLayer() { + _classCallCheck(this, XfaLayer); + } + + _createClass(XfaLayer, null, [{ + key: "setupStorage", + value: function setupStorage(html, id, element, storage, intent) { + var storedData = storage.getValue(id, { + value: null + }); + + switch (element.name) { + case "textarea": + if (storedData.value !== null) { + html.textContent = storedData.value; + } + + if (intent === "print") { + break; + } + + html.addEventListener("input", function (event) { + storage.setValue(id, { + value: event.target.value + }); + }); + break; + + case "input": + if (element.attributes.type === "radio" || element.attributes.type === "checkbox") { + if (storedData.value === element.attributes.xfaOn) { + html.setAttribute("checked", true); + } + + if (intent === "print") { + break; + } + + html.addEventListener("change", function (event) { + storage.setValue(id, { + value: event.target.getAttribute("xfaOn") + }); + }); + } else { + if (storedData.value !== null) { + html.setAttribute("value", storedData.value); + } + + if (intent === "print") { + break; + } + + html.addEventListener("input", function (event) { + storage.setValue(id, { + value: event.target.value + }); + }); + } + + break; + + case "select": + if (storedData.value !== null) { + var _iterator = _createForOfIteratorHelper(element.children), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var option = _step.value; + + if (option.attributes.value === storedData.value) { + option.attributes.selected = true; + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } + + html.addEventListener("input", function (event) { + var options = event.target.options; + var value = options.selectedIndex === -1 ? "" : options[options.selectedIndex].value; + storage.setValue(id, { + value: value + }); + }); + break; + } + } + }, { + key: "setAttributes", + value: function setAttributes(html, element, storage, intent) { + var attributes = element.attributes; + + if (attributes.type === "radio") { + attributes.name = "".concat(attributes.name, "-").concat(intent); + } + + for (var _i = 0, _Object$entries = Object.entries(attributes); _i < _Object$entries.length; _i++) { + var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2), + key = _Object$entries$_i[0], + value = _Object$entries$_i[1]; + + if (value === null || value === undefined || key === "dataId") { + continue; + } + + if (key !== "style") { + if (key === "textContent") { + html.textContent = value; + } else if (key === "class") { + html.setAttribute(key, value.join(" ")); + } else { + html.setAttribute(key, value); + } + } else { + Object.assign(html.style, value); + } + } + + if (storage && attributes.dataId) { + this.setupStorage(html, attributes.dataId, element, storage); + } + } + }, { + key: "render", + value: function render(parameters) { + var storage = parameters.annotationStorage; + var root = parameters.xfa; + var intent = parameters.intent || "display"; + var rootHtml = document.createElement(root.name); + + if (root.attributes) { + this.setAttributes(rootHtml, root); + } + + var stack = [[root, -1, rootHtml]]; + var rootDiv = parameters.div; + rootDiv.appendChild(rootHtml); + var transform = "matrix(".concat(parameters.viewport.transform.join(","), ")"); + rootDiv.style.transform = transform; + rootDiv.setAttribute("class", "xfaLayer xfaFont"); + + while (stack.length > 0) { + var _child$attributes; + + var _stack = _slicedToArray(stack[stack.length - 1], 3), + parent = _stack[0], + i = _stack[1], + html = _stack[2]; + + if (i + 1 === parent.children.length) { + stack.pop(); + continue; + } + + var child = parent.children[++stack[stack.length - 1][1]]; + + if (child === null) { + continue; + } + + var name = child.name; + + if (name === "#text") { + html.appendChild(document.createTextNode(child.value)); + continue; + } + + var childHtml = void 0; + + if (child !== null && child !== void 0 && (_child$attributes = child.attributes) !== null && _child$attributes !== void 0 && _child$attributes.xmlns) { + childHtml = document.createElementNS(child.attributes.xmlns, name); + } else { + childHtml = document.createElement(name); + } + + html.appendChild(childHtml); + + if (child.attributes) { + this.setAttributes(childHtml, child, storage, intent); + } + + if (child.children && child.children.length > 0) { + stack.push([child, -1, childHtml]); + } else if (child.value) { + childHtml.appendChild(document.createTextNode(child.value)); + } + } + + var _iterator2 = _createForOfIteratorHelper(rootDiv.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea")), + _step2; + + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + var el = _step2.value; + el.setAttribute("readOnly", true); + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + } + }, { + key: "update", + value: function update(parameters) { + var transform = "matrix(".concat(parameters.viewport.transform.join(","), ")"); + parameters.div.style.transform = transform; + parameters.div.hidden = false; + } + }]); + + return XfaLayer; +}(); + +exports.XfaLayer = XfaLayer; + +/***/ }), +/* 131 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +"use strict"; + + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PDFNodeStream = void 0; + +var _regenerator = _interopRequireDefault(__w_pdfjs_require__(2)); + +var _util = __w_pdfjs_require__(4); + +var _network_utils = __w_pdfjs_require__(132); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +; + +var fs = require("fs"); + +var http = require("http"); + +var https = require("https"); + +var url = require("url"); + +var fileUriRegex = /^file:\/\/\/[a-zA-Z]:\//; + +function parseUrl(sourceUrl) { + var parsedUrl = url.parse(sourceUrl); + + if (parsedUrl.protocol === "file:" || parsedUrl.host) { + return parsedUrl; + } + + if (/^[a-z]:[/\\]/i.test(sourceUrl)) { + return url.parse("file:///".concat(sourceUrl)); + } + + if (!parsedUrl.host) { + parsedUrl.protocol = "file:"; + } + + return parsedUrl; +} + +var PDFNodeStream = /*#__PURE__*/function () { + function PDFNodeStream(source) { + _classCallCheck(this, PDFNodeStream); + + this.source = source; + this.url = parseUrl(source.url); + this.isHttp = this.url.protocol === "http:" || this.url.protocol === "https:"; + this.isFsUrl = this.url.protocol === "file:"; + this.httpHeaders = this.isHttp && source.httpHeaders || {}; + this._fullRequestReader = null; + this._rangeRequestReaders = []; + } + + _createClass(PDFNodeStream, [{ + key: "_progressiveDataLength", + get: function get() { + var _this$_fullRequestRea, _this$_fullRequestRea2; + + return (_this$_fullRequestRea = (_this$_fullRequestRea2 = this._fullRequestReader) === null || _this$_fullRequestRea2 === void 0 ? void 0 : _this$_fullRequestRea2._loaded) !== null && _this$_fullRequestRea !== void 0 ? _this$_fullRequestRea : 0; + } + }, { + key: "getFullReader", + value: function getFullReader() { + (0, _util.assert)(!this._fullRequestReader, "PDFNodeStream.getFullReader can only be called once."); + this._fullRequestReader = this.isFsUrl ? new PDFNodeStreamFsFullReader(this) : new PDFNodeStreamFullReader(this); + return this._fullRequestReader; + } + }, { + key: "getRangeReader", + value: function getRangeReader(start, end) { + if (end <= this._progressiveDataLength) { + return null; + } + + var rangeReader = this.isFsUrl ? new PDFNodeStreamFsRangeReader(this, start, end) : new PDFNodeStreamRangeReader(this, start, end); + + this._rangeRequestReaders.push(rangeReader); + + return rangeReader; + } + }, { + key: "cancelAllRequests", + value: function cancelAllRequests(reason) { + if (this._fullRequestReader) { + this._fullRequestReader.cancel(reason); + } + + var _iterator = _createForOfIteratorHelper(this._rangeRequestReaders.slice(0)), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var reader = _step.value; + reader.cancel(reason); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } + }]); + + return PDFNodeStream; +}(); + +exports.PDFNodeStream = PDFNodeStream; + +var BaseFullReader = /*#__PURE__*/function () { + function BaseFullReader(stream) { + _classCallCheck(this, BaseFullReader); + + this._url = stream.url; + this._done = false; + this._storedError = null; + this.onProgress = null; + var source = stream.source; + this._contentLength = source.length; + this._loaded = 0; + this._filename = null; + this._disableRange = source.disableRange || false; + this._rangeChunkSize = source.rangeChunkSize; + + if (!this._rangeChunkSize && !this._disableRange) { + this._disableRange = true; + } + + this._isStreamingSupported = !source.disableStream; + this._isRangeSupported = !source.disableRange; + this._readableStream = null; + this._readCapability = (0, _util.createPromiseCapability)(); + this._headersCapability = (0, _util.createPromiseCapability)(); + } + + _createClass(BaseFullReader, [{ + key: "headersReady", + get: function get() { + return this._headersCapability.promise; + } + }, { + key: "filename", + get: function get() { + return this._filename; + } + }, { + key: "contentLength", + get: function get() { + return this._contentLength; + } + }, { + key: "isRangeSupported", + get: function get() { + return this._isRangeSupported; + } + }, { + key: "isStreamingSupported", + get: function get() { + return this._isStreamingSupported; + } + }, { + key: "read", + value: function () { + var _read = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee() { + var chunk, buffer; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return this._readCapability.promise; + + case 2: + if (!this._done) { + _context.next = 4; + break; + } + + return _context.abrupt("return", { + value: undefined, + done: true + }); + + case 4: + if (!this._storedError) { + _context.next = 6; + break; + } + + throw this._storedError; + + case 6: + chunk = this._readableStream.read(); + + if (!(chunk === null)) { + _context.next = 10; + break; + } + + this._readCapability = (0, _util.createPromiseCapability)(); + return _context.abrupt("return", this.read()); + + case 10: + this._loaded += chunk.length; + + if (this.onProgress) { + this.onProgress({ + loaded: this._loaded, + total: this._contentLength + }); + } + + buffer = new Uint8Array(chunk).buffer; + return _context.abrupt("return", { + value: buffer, + done: false + }); + + case 14: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function read() { + return _read.apply(this, arguments); + } + + return read; + }() + }, { + key: "cancel", + value: function cancel(reason) { + if (!this._readableStream) { + this._error(reason); + + return; + } + + this._readableStream.destroy(reason); + } + }, { + key: "_error", + value: function _error(reason) { + this._storedError = reason; + + this._readCapability.resolve(); + } + }, { + key: "_setReadableStream", + value: function _setReadableStream(readableStream) { + var _this = this; + + this._readableStream = readableStream; + readableStream.on("readable", function () { + _this._readCapability.resolve(); + }); + readableStream.on("end", function () { + readableStream.destroy(); + _this._done = true; + + _this._readCapability.resolve(); + }); + readableStream.on("error", function (reason) { + _this._error(reason); + }); + + if (!this._isStreamingSupported && this._isRangeSupported) { + this._error(new _util.AbortException("streaming is disabled")); + } + + if (this._storedError) { + this._readableStream.destroy(this._storedError); + } + } + }]); + + return BaseFullReader; +}(); + +var BaseRangeReader = /*#__PURE__*/function () { + function BaseRangeReader(stream) { + _classCallCheck(this, BaseRangeReader); + + this._url = stream.url; + this._done = false; + this._storedError = null; + this.onProgress = null; + this._loaded = 0; + this._readableStream = null; + this._readCapability = (0, _util.createPromiseCapability)(); + var source = stream.source; + this._isStreamingSupported = !source.disableStream; + } + + _createClass(BaseRangeReader, [{ + key: "isStreamingSupported", + get: function get() { + return this._isStreamingSupported; + } + }, { + key: "read", + value: function () { + var _read2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee2() { + var chunk, buffer; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return this._readCapability.promise; + + case 2: + if (!this._done) { + _context2.next = 4; + break; + } + + return _context2.abrupt("return", { + value: undefined, + done: true + }); + + case 4: + if (!this._storedError) { + _context2.next = 6; + break; + } + + throw this._storedError; + + case 6: + chunk = this._readableStream.read(); + + if (!(chunk === null)) { + _context2.next = 10; + break; + } + + this._readCapability = (0, _util.createPromiseCapability)(); + return _context2.abrupt("return", this.read()); + + case 10: + this._loaded += chunk.length; + + if (this.onProgress) { + this.onProgress({ + loaded: this._loaded + }); + } + + buffer = new Uint8Array(chunk).buffer; + return _context2.abrupt("return", { + value: buffer, + done: false + }); + + case 14: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function read() { + return _read2.apply(this, arguments); + } + + return read; + }() + }, { + key: "cancel", + value: function cancel(reason) { + if (!this._readableStream) { + this._error(reason); + + return; + } + + this._readableStream.destroy(reason); + } + }, { + key: "_error", + value: function _error(reason) { + this._storedError = reason; + + this._readCapability.resolve(); + } + }, { + key: "_setReadableStream", + value: function _setReadableStream(readableStream) { + var _this2 = this; + + this._readableStream = readableStream; + readableStream.on("readable", function () { + _this2._readCapability.resolve(); + }); + readableStream.on("end", function () { + readableStream.destroy(); + _this2._done = true; + + _this2._readCapability.resolve(); + }); + readableStream.on("error", function (reason) { + _this2._error(reason); + }); + + if (this._storedError) { + this._readableStream.destroy(this._storedError); + } + } + }]); + + return BaseRangeReader; +}(); + +function createRequestOptions(parsedUrl, headers) { + return { + protocol: parsedUrl.protocol, + auth: parsedUrl.auth, + host: parsedUrl.hostname, + port: parsedUrl.port, + path: parsedUrl.path, + method: "GET", + headers: headers + }; +} + +var PDFNodeStreamFullReader = /*#__PURE__*/function (_BaseFullReader) { + _inherits(PDFNodeStreamFullReader, _BaseFullReader); + + var _super = _createSuper(PDFNodeStreamFullReader); + + function PDFNodeStreamFullReader(stream) { + var _this3; + + _classCallCheck(this, PDFNodeStreamFullReader); + + _this3 = _super.call(this, stream); + + var handleResponse = function handleResponse(response) { + if (response.statusCode === 404) { + var error = new _util.MissingPDFException("Missing PDF \"".concat(_this3._url, "\".")); + _this3._storedError = error; + + _this3._headersCapability.reject(error); + + return; + } + + _this3._headersCapability.resolve(); + + _this3._setReadableStream(response); + + var getResponseHeader = function getResponseHeader(name) { + return _this3._readableStream.headers[name.toLowerCase()]; + }; + + var _validateRangeRequest = (0, _network_utils.validateRangeRequestCapabilities)({ + getResponseHeader: getResponseHeader, + isHttp: stream.isHttp, + rangeChunkSize: _this3._rangeChunkSize, + disableRange: _this3._disableRange + }), + allowRangeRequests = _validateRangeRequest.allowRangeRequests, + suggestedLength = _validateRangeRequest.suggestedLength; + + _this3._isRangeSupported = allowRangeRequests; + _this3._contentLength = suggestedLength || _this3._contentLength; + _this3._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader); + }; + + _this3._request = null; + + if (_this3._url.protocol === "http:") { + _this3._request = http.request(createRequestOptions(_this3._url, stream.httpHeaders), handleResponse); + } else { + _this3._request = https.request(createRequestOptions(_this3._url, stream.httpHeaders), handleResponse); + } + + _this3._request.on("error", function (reason) { + _this3._storedError = reason; + + _this3._headersCapability.reject(reason); + }); + + _this3._request.end(); + + return _this3; + } + + return PDFNodeStreamFullReader; +}(BaseFullReader); + +var PDFNodeStreamRangeReader = /*#__PURE__*/function (_BaseRangeReader) { + _inherits(PDFNodeStreamRangeReader, _BaseRangeReader); + + var _super2 = _createSuper(PDFNodeStreamRangeReader); + + function PDFNodeStreamRangeReader(stream, start, end) { + var _this4; + + _classCallCheck(this, PDFNodeStreamRangeReader); + + _this4 = _super2.call(this, stream); + _this4._httpHeaders = {}; + + for (var property in stream.httpHeaders) { + var value = stream.httpHeaders[property]; + + if (typeof value === "undefined") { + continue; + } + + _this4._httpHeaders[property] = value; + } + + _this4._httpHeaders.Range = "bytes=".concat(start, "-").concat(end - 1); + + var handleResponse = function handleResponse(response) { + if (response.statusCode === 404) { + var error = new _util.MissingPDFException("Missing PDF \"".concat(_this4._url, "\".")); + _this4._storedError = error; + return; + } + + _this4._setReadableStream(response); + }; + + _this4._request = null; + + if (_this4._url.protocol === "http:") { + _this4._request = http.request(createRequestOptions(_this4._url, _this4._httpHeaders), handleResponse); + } else { + _this4._request = https.request(createRequestOptions(_this4._url, _this4._httpHeaders), handleResponse); + } + + _this4._request.on("error", function (reason) { + _this4._storedError = reason; + }); + + _this4._request.end(); + + return _this4; + } + + return PDFNodeStreamRangeReader; +}(BaseRangeReader); + +var PDFNodeStreamFsFullReader = /*#__PURE__*/function (_BaseFullReader2) { + _inherits(PDFNodeStreamFsFullReader, _BaseFullReader2); + + var _super3 = _createSuper(PDFNodeStreamFsFullReader); + + function PDFNodeStreamFsFullReader(stream) { + var _this5; + + _classCallCheck(this, PDFNodeStreamFsFullReader); + + _this5 = _super3.call(this, stream); + var path = decodeURIComponent(_this5._url.path); + + if (fileUriRegex.test(_this5._url.href)) { + path = path.replace(/^\//, ""); + } + + fs.lstat(path, function (error, stat) { + if (error) { + if (error.code === "ENOENT") { + error = new _util.MissingPDFException("Missing PDF \"".concat(path, "\".")); + } + + _this5._storedError = error; + + _this5._headersCapability.reject(error); + + return; + } + + _this5._contentLength = stat.size; + + _this5._setReadableStream(fs.createReadStream(path)); + + _this5._headersCapability.resolve(); + }); + return _this5; + } + + return PDFNodeStreamFsFullReader; +}(BaseFullReader); + +var PDFNodeStreamFsRangeReader = /*#__PURE__*/function (_BaseRangeReader2) { + _inherits(PDFNodeStreamFsRangeReader, _BaseRangeReader2); + + var _super4 = _createSuper(PDFNodeStreamFsRangeReader); + + function PDFNodeStreamFsRangeReader(stream, start, end) { + var _this6; + + _classCallCheck(this, PDFNodeStreamFsRangeReader); + + _this6 = _super4.call(this, stream); + var path = decodeURIComponent(_this6._url.path); + + if (fileUriRegex.test(_this6._url.href)) { + path = path.replace(/^\//, ""); + } + + _this6._setReadableStream(fs.createReadStream(path, { + start: start, + end: end - 1 + })); + + return _this6; + } + + return PDFNodeStreamFsRangeReader; +}(BaseRangeReader); + +/***/ }), +/* 132 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.createResponseStatusError = createResponseStatusError; +exports.extractFilenameFromHeader = extractFilenameFromHeader; +exports.validateRangeRequestCapabilities = validateRangeRequestCapabilities; +exports.validateResponseStatus = validateResponseStatus; + +var _util = __w_pdfjs_require__(4); + +var _content_disposition = __w_pdfjs_require__(133); + +var _display_utils = __w_pdfjs_require__(1); + +function validateRangeRequestCapabilities(_ref) { + var getResponseHeader = _ref.getResponseHeader, + isHttp = _ref.isHttp, + rangeChunkSize = _ref.rangeChunkSize, + disableRange = _ref.disableRange; + (0, _util.assert)(rangeChunkSize > 0, "Range chunk size must be larger than zero"); + var returnValues = { + allowRangeRequests: false, + suggestedLength: undefined + }; + var length = parseInt(getResponseHeader("Content-Length"), 10); + + if (!Number.isInteger(length)) { + return returnValues; + } + + returnValues.suggestedLength = length; + + if (length <= 2 * rangeChunkSize) { + return returnValues; + } + + if (disableRange || !isHttp) { + return returnValues; + } + + if (getResponseHeader("Accept-Ranges") !== "bytes") { + return returnValues; + } + + var contentEncoding = getResponseHeader("Content-Encoding") || "identity"; + + if (contentEncoding !== "identity") { + return returnValues; + } + + returnValues.allowRangeRequests = true; + return returnValues; +} + +function extractFilenameFromHeader(getResponseHeader) { + var contentDisposition = getResponseHeader("Content-Disposition"); + + if (contentDisposition) { + var filename = (0, _content_disposition.getFilenameFromContentDispositionHeader)(contentDisposition); + + if (filename.includes("%")) { + try { + filename = decodeURIComponent(filename); + } catch (ex) {} + } + + if ((0, _display_utils.isPdfFile)(filename)) { + return filename; + } + } + + return null; +} + +function createResponseStatusError(status, url) { + if (status === 404 || status === 0 && url.startsWith("file:")) { + return new _util.MissingPDFException('Missing PDF "' + url + '".'); + } + + return new _util.UnexpectedResponseException("Unexpected server response (".concat(status, ") while retrieving PDF \"").concat(url, "\"."), status); +} + +function validateResponseStatus(status) { + return status === 200 || status === 206; +} + +/***/ }), +/* 133 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.getFilenameFromContentDispositionHeader = getFilenameFromContentDispositionHeader; + +var _util = __w_pdfjs_require__(4); + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function getFilenameFromContentDispositionHeader(contentDisposition) { + var needsEncodingFixup = true; + var tmp = toParamRegExp("filename\\*", "i").exec(contentDisposition); + + if (tmp) { + tmp = tmp[1]; + var filename = rfc2616unquote(tmp); + filename = unescape(filename); + filename = rfc5987decode(filename); + filename = rfc2047decode(filename); + return fixupEncoding(filename); + } + + tmp = rfc2231getparam(contentDisposition); + + if (tmp) { + var _filename = rfc2047decode(tmp); + + return fixupEncoding(_filename); + } + + tmp = toParamRegExp("filename", "i").exec(contentDisposition); + + if (tmp) { + tmp = tmp[1]; + + var _filename2 = rfc2616unquote(tmp); + + _filename2 = rfc2047decode(_filename2); + return fixupEncoding(_filename2); + } + + function toParamRegExp(attributePattern, flags) { + return new RegExp("(?:^|;)\\s*" + attributePattern + "\\s*=\\s*" + "(" + '[^";\\s][^;\\s]*' + "|" + '"(?:[^"\\\\]|\\\\"?)+"?' + ")", flags); + } + + function textdecode(encoding, value) { + if (encoding) { + if (!/^[\x00-\xFF]+$/.test(value)) { + return value; + } + + try { + var decoder = new TextDecoder(encoding, { + fatal: true + }); + var buffer = (0, _util.stringToBytes)(value); + value = decoder.decode(buffer); + needsEncodingFixup = false; + } catch (e) { + if (/^utf-?8$/i.test(encoding)) { + try { + value = decodeURIComponent(escape(value)); + needsEncodingFixup = false; + } catch (err) {} + } + } + } + + return value; + } + + function fixupEncoding(value) { + if (needsEncodingFixup && /[\x80-\xff]/.test(value)) { + value = textdecode("utf-8", value); + + if (needsEncodingFixup) { + value = textdecode("iso-8859-1", value); + } + } + + return value; + } + + function rfc2231getparam(contentDispositionStr) { + var matches = []; + var match; + var iter = toParamRegExp("filename\\*((?!0\\d)\\d+)(\\*?)", "ig"); + + while ((match = iter.exec(contentDispositionStr)) !== null) { + var _match = match, + _match2 = _slicedToArray(_match, 4), + n = _match2[1], + quot = _match2[2], + part = _match2[3]; + + n = parseInt(n, 10); + + if (n in matches) { + if (n === 0) { + break; + } + + continue; + } + + matches[n] = [quot, part]; + } + + var parts = []; + + for (var _n2 = 0; _n2 < matches.length; ++_n2) { + if (!(_n2 in matches)) { + break; + } + + var _matches$_n = _slicedToArray(matches[_n2], 2), + _quot = _matches$_n[0], + _part = _matches$_n[1]; + + _part = rfc2616unquote(_part); + + if (_quot) { + _part = unescape(_part); + + if (_n2 === 0) { + _part = rfc5987decode(_part); + } + } + + parts.push(_part); + } + + return parts.join(""); + } + + function rfc2616unquote(value) { + if (value.startsWith('"')) { + var parts = value.slice(1).split('\\"'); + + for (var i = 0; i < parts.length; ++i) { + var quotindex = parts[i].indexOf('"'); + + if (quotindex !== -1) { + parts[i] = parts[i].slice(0, quotindex); + parts.length = i + 1; + } + + parts[i] = parts[i].replace(/\\(.)/g, "$1"); + } + + value = parts.join('"'); + } + + return value; + } + + function rfc5987decode(extvalue) { + var encodingend = extvalue.indexOf("'"); + + if (encodingend === -1) { + return extvalue; + } + + var encoding = extvalue.slice(0, encodingend); + var langvalue = extvalue.slice(encodingend + 1); + var value = langvalue.replace(/^[^']*'/, ""); + return textdecode(encoding, value); + } + + function rfc2047decode(value) { + if (!value.startsWith("=?") || /[\x00-\x19\x80-\xff]/.test(value)) { + return value; + } + + return value.replace(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g, function (matches, charset, encoding, text) { + if (encoding === "q" || encoding === "Q") { + text = text.replace(/_/g, " "); + text = text.replace(/=([0-9a-fA-F]{2})/g, function (match, hex) { + return String.fromCharCode(parseInt(hex, 16)); + }); + return textdecode(charset, text); + } + + try { + text = atob(text); + } catch (e) {} + + return textdecode(charset, text); + }); + } + + return ""; +} + +/***/ }), +/* 134 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PDFNetworkStream = void 0; + +var _regenerator = _interopRequireDefault(__w_pdfjs_require__(2)); + +var _util = __w_pdfjs_require__(4); + +var _network_utils = __w_pdfjs_require__(132); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +; +var OK_RESPONSE = 200; +var PARTIAL_CONTENT_RESPONSE = 206; + +function getArrayBuffer(xhr) { + var data = xhr.response; + + if (typeof data !== "string") { + return data; + } + + var array = (0, _util.stringToBytes)(data); + return array.buffer; +} + +var NetworkManager = /*#__PURE__*/function () { + function NetworkManager(url, args) { + _classCallCheck(this, NetworkManager); + + this.url = url; + args = args || {}; + this.isHttp = /^https?:/i.test(url); + this.httpHeaders = this.isHttp && args.httpHeaders || {}; + this.withCredentials = args.withCredentials || false; + + this.getXhr = args.getXhr || function NetworkManager_getXhr() { + return new XMLHttpRequest(); + }; + + this.currXhrId = 0; + this.pendingRequests = Object.create(null); + } + + _createClass(NetworkManager, [{ + key: "requestRange", + value: function requestRange(begin, end, listeners) { + var args = { + begin: begin, + end: end + }; + + for (var prop in listeners) { + args[prop] = listeners[prop]; + } + + return this.request(args); + } + }, { + key: "requestFull", + value: function requestFull(listeners) { + return this.request(listeners); + } + }, { + key: "request", + value: function request(args) { + var xhr = this.getXhr(); + var xhrId = this.currXhrId++; + var pendingRequest = this.pendingRequests[xhrId] = { + xhr: xhr + }; + xhr.open("GET", this.url); + xhr.withCredentials = this.withCredentials; + + for (var property in this.httpHeaders) { + var value = this.httpHeaders[property]; + + if (typeof value === "undefined") { + continue; + } + + xhr.setRequestHeader(property, value); + } + + if (this.isHttp && "begin" in args && "end" in args) { + xhr.setRequestHeader("Range", "bytes=".concat(args.begin, "-").concat(args.end - 1)); + pendingRequest.expectedStatus = PARTIAL_CONTENT_RESPONSE; + } else { + pendingRequest.expectedStatus = OK_RESPONSE; + } + + xhr.responseType = "arraybuffer"; + + if (args.onError) { + xhr.onerror = function (evt) { + args.onError(xhr.status); + }; + } + + xhr.onreadystatechange = this.onStateChange.bind(this, xhrId); + xhr.onprogress = this.onProgress.bind(this, xhrId); + pendingRequest.onHeadersReceived = args.onHeadersReceived; + pendingRequest.onDone = args.onDone; + pendingRequest.onError = args.onError; + pendingRequest.onProgress = args.onProgress; + xhr.send(null); + return xhrId; + } + }, { + key: "onProgress", + value: function onProgress(xhrId, evt) { + var pendingRequest = this.pendingRequests[xhrId]; + + if (!pendingRequest) { + return; + } + + if (pendingRequest.onProgress) { + pendingRequest.onProgress(evt); + } + } + }, { + key: "onStateChange", + value: function onStateChange(xhrId, evt) { + var pendingRequest = this.pendingRequests[xhrId]; + + if (!pendingRequest) { + return; + } + + var xhr = pendingRequest.xhr; + + if (xhr.readyState >= 2 && pendingRequest.onHeadersReceived) { + pendingRequest.onHeadersReceived(); + delete pendingRequest.onHeadersReceived; + } + + if (xhr.readyState !== 4) { + return; + } + + if (!(xhrId in this.pendingRequests)) { + return; + } + + delete this.pendingRequests[xhrId]; + + if (xhr.status === 0 && this.isHttp) { + if (pendingRequest.onError) { + pendingRequest.onError(xhr.status); + } + + return; + } + + var xhrStatus = xhr.status || OK_RESPONSE; + var ok_response_on_range_request = xhrStatus === OK_RESPONSE && pendingRequest.expectedStatus === PARTIAL_CONTENT_RESPONSE; + + if (!ok_response_on_range_request && xhrStatus !== pendingRequest.expectedStatus) { + if (pendingRequest.onError) { + pendingRequest.onError(xhr.status); + } + + return; + } + + var chunk = getArrayBuffer(xhr); + + if (xhrStatus === PARTIAL_CONTENT_RESPONSE) { + var rangeHeader = xhr.getResponseHeader("Content-Range"); + var matches = /bytes (\d+)-(\d+)\/(\d+)/.exec(rangeHeader); + pendingRequest.onDone({ + begin: parseInt(matches[1], 10), + chunk: chunk + }); + } else if (chunk) { + pendingRequest.onDone({ + begin: 0, + chunk: chunk + }); + } else if (pendingRequest.onError) { + pendingRequest.onError(xhr.status); + } + } + }, { + key: "getRequestXhr", + value: function getRequestXhr(xhrId) { + return this.pendingRequests[xhrId].xhr; + } + }, { + key: "isPendingRequest", + value: function isPendingRequest(xhrId) { + return xhrId in this.pendingRequests; + } + }, { + key: "abortRequest", + value: function abortRequest(xhrId) { + var xhr = this.pendingRequests[xhrId].xhr; + delete this.pendingRequests[xhrId]; + xhr.abort(); + } + }]); + + return NetworkManager; +}(); + +var PDFNetworkStream = /*#__PURE__*/function () { + function PDFNetworkStream(source) { + _classCallCheck(this, PDFNetworkStream); + + this._source = source; + this._manager = new NetworkManager(source.url, { + httpHeaders: source.httpHeaders, + withCredentials: source.withCredentials + }); + this._rangeChunkSize = source.rangeChunkSize; + this._fullRequestReader = null; + this._rangeRequestReaders = []; + } + + _createClass(PDFNetworkStream, [{ + key: "_onRangeRequestReaderClosed", + value: function _onRangeRequestReaderClosed(reader) { + var i = this._rangeRequestReaders.indexOf(reader); + + if (i >= 0) { + this._rangeRequestReaders.splice(i, 1); + } + } + }, { + key: "getFullReader", + value: function getFullReader() { + (0, _util.assert)(!this._fullRequestReader, "PDFNetworkStream.getFullReader can only be called once."); + this._fullRequestReader = new PDFNetworkStreamFullRequestReader(this._manager, this._source); + return this._fullRequestReader; + } + }, { + key: "getRangeReader", + value: function getRangeReader(begin, end) { + var reader = new PDFNetworkStreamRangeRequestReader(this._manager, begin, end); + reader.onClosed = this._onRangeRequestReaderClosed.bind(this); + + this._rangeRequestReaders.push(reader); + + return reader; + } + }, { + key: "cancelAllRequests", + value: function cancelAllRequests(reason) { + if (this._fullRequestReader) { + this._fullRequestReader.cancel(reason); + } + + var _iterator = _createForOfIteratorHelper(this._rangeRequestReaders.slice(0)), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var reader = _step.value; + reader.cancel(reason); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } + }]); + + return PDFNetworkStream; +}(); + +exports.PDFNetworkStream = PDFNetworkStream; + +var PDFNetworkStreamFullRequestReader = /*#__PURE__*/function () { + function PDFNetworkStreamFullRequestReader(manager, source) { + _classCallCheck(this, PDFNetworkStreamFullRequestReader); + + this._manager = manager; + var args = { + onHeadersReceived: this._onHeadersReceived.bind(this), + onDone: this._onDone.bind(this), + onError: this._onError.bind(this), + onProgress: this._onProgress.bind(this) + }; + this._url = source.url; + this._fullRequestId = manager.requestFull(args); + this._headersReceivedCapability = (0, _util.createPromiseCapability)(); + this._disableRange = source.disableRange || false; + this._contentLength = source.length; + this._rangeChunkSize = source.rangeChunkSize; + + if (!this._rangeChunkSize && !this._disableRange) { + this._disableRange = true; + } + + this._isStreamingSupported = false; + this._isRangeSupported = false; + this._cachedChunks = []; + this._requests = []; + this._done = false; + this._storedError = undefined; + this._filename = null; + this.onProgress = null; + } + + _createClass(PDFNetworkStreamFullRequestReader, [{ + key: "_onHeadersReceived", + value: function _onHeadersReceived() { + var fullRequestXhrId = this._fullRequestId; + + var fullRequestXhr = this._manager.getRequestXhr(fullRequestXhrId); + + var getResponseHeader = function getResponseHeader(name) { + return fullRequestXhr.getResponseHeader(name); + }; + + var _validateRangeRequest = (0, _network_utils.validateRangeRequestCapabilities)({ + getResponseHeader: getResponseHeader, + isHttp: this._manager.isHttp, + rangeChunkSize: this._rangeChunkSize, + disableRange: this._disableRange + }), + allowRangeRequests = _validateRangeRequest.allowRangeRequests, + suggestedLength = _validateRangeRequest.suggestedLength; + + if (allowRangeRequests) { + this._isRangeSupported = true; + } + + this._contentLength = suggestedLength || this._contentLength; + this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader); + + if (this._isRangeSupported) { + this._manager.abortRequest(fullRequestXhrId); + } + + this._headersReceivedCapability.resolve(); + } + }, { + key: "_onDone", + value: function _onDone(args) { + if (args) { + if (this._requests.length > 0) { + var requestCapability = this._requests.shift(); + + requestCapability.resolve({ + value: args.chunk, + done: false + }); + } else { + this._cachedChunks.push(args.chunk); + } + } + + this._done = true; + + if (this._cachedChunks.length > 0) { + return; + } + + var _iterator2 = _createForOfIteratorHelper(this._requests), + _step2; + + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + var _requestCapability = _step2.value; + + _requestCapability.resolve({ + value: undefined, + done: true + }); + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + + this._requests.length = 0; + } + }, { + key: "_onError", + value: function _onError(status) { + var url = this._url; + var exception = (0, _network_utils.createResponseStatusError)(status, url); + this._storedError = exception; + + this._headersReceivedCapability.reject(exception); + + var _iterator3 = _createForOfIteratorHelper(this._requests), + _step3; + + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { + var requestCapability = _step3.value; + requestCapability.reject(exception); + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); + } + + this._requests.length = 0; + this._cachedChunks.length = 0; + } + }, { + key: "_onProgress", + value: function _onProgress(data) { + if (this.onProgress) { + this.onProgress({ + loaded: data.loaded, + total: data.lengthComputable ? data.total : this._contentLength + }); + } + } + }, { + key: "filename", + get: function get() { + return this._filename; + } + }, { + key: "isRangeSupported", + get: function get() { + return this._isRangeSupported; + } + }, { + key: "isStreamingSupported", + get: function get() { + return this._isStreamingSupported; + } + }, { + key: "contentLength", + get: function get() { + return this._contentLength; + } + }, { + key: "headersReady", + get: function get() { + return this._headersReceivedCapability.promise; + } + }, { + key: "read", + value: function () { + var _read = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee() { + var chunk, requestCapability; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + if (!this._storedError) { + _context.next = 2; + break; + } + + throw this._storedError; + + case 2: + if (!(this._cachedChunks.length > 0)) { + _context.next = 5; + break; + } + + chunk = this._cachedChunks.shift(); + return _context.abrupt("return", { + value: chunk, + done: false + }); + + case 5: + if (!this._done) { + _context.next = 7; + break; + } + + return _context.abrupt("return", { + value: undefined, + done: true + }); + + case 7: + requestCapability = (0, _util.createPromiseCapability)(); + + this._requests.push(requestCapability); + + return _context.abrupt("return", requestCapability.promise); + + case 10: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function read() { + return _read.apply(this, arguments); + } + + return read; + }() + }, { + key: "cancel", + value: function cancel(reason) { + this._done = true; + + this._headersReceivedCapability.reject(reason); + + var _iterator4 = _createForOfIteratorHelper(this._requests), + _step4; + + try { + for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { + var requestCapability = _step4.value; + requestCapability.resolve({ + value: undefined, + done: true + }); + } + } catch (err) { + _iterator4.e(err); + } finally { + _iterator4.f(); + } + + this._requests.length = 0; + + if (this._manager.isPendingRequest(this._fullRequestId)) { + this._manager.abortRequest(this._fullRequestId); + } + + this._fullRequestReader = null; + } + }]); + + return PDFNetworkStreamFullRequestReader; +}(); + +var PDFNetworkStreamRangeRequestReader = /*#__PURE__*/function () { + function PDFNetworkStreamRangeRequestReader(manager, begin, end) { + _classCallCheck(this, PDFNetworkStreamRangeRequestReader); + + this._manager = manager; + var args = { + onDone: this._onDone.bind(this), + onProgress: this._onProgress.bind(this) + }; + this._requestId = manager.requestRange(begin, end, args); + this._requests = []; + this._queuedChunk = null; + this._done = false; + this.onProgress = null; + this.onClosed = null; + } + + _createClass(PDFNetworkStreamRangeRequestReader, [{ + key: "_close", + value: function _close() { + if (this.onClosed) { + this.onClosed(this); + } + } + }, { + key: "_onDone", + value: function _onDone(data) { + var chunk = data.chunk; + + if (this._requests.length > 0) { + var requestCapability = this._requests.shift(); + + requestCapability.resolve({ + value: chunk, + done: false + }); + } else { + this._queuedChunk = chunk; + } + + this._done = true; + + var _iterator5 = _createForOfIteratorHelper(this._requests), + _step5; + + try { + for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { + var _requestCapability2 = _step5.value; + + _requestCapability2.resolve({ + value: undefined, + done: true + }); + } + } catch (err) { + _iterator5.e(err); + } finally { + _iterator5.f(); + } + + this._requests.length = 0; + + this._close(); + } + }, { + key: "_onProgress", + value: function _onProgress(evt) { + if (!this.isStreamingSupported && this.onProgress) { + this.onProgress({ + loaded: evt.loaded + }); + } + } + }, { + key: "isStreamingSupported", + get: function get() { + return false; + } + }, { + key: "read", + value: function () { + var _read2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee2() { + var chunk, requestCapability; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + if (!(this._queuedChunk !== null)) { + _context2.next = 4; + break; + } + + chunk = this._queuedChunk; + this._queuedChunk = null; + return _context2.abrupt("return", { + value: chunk, + done: false + }); + + case 4: + if (!this._done) { + _context2.next = 6; + break; + } + + return _context2.abrupt("return", { + value: undefined, + done: true + }); + + case 6: + requestCapability = (0, _util.createPromiseCapability)(); + + this._requests.push(requestCapability); + + return _context2.abrupt("return", requestCapability.promise); + + case 9: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function read() { + return _read2.apply(this, arguments); + } + + return read; + }() + }, { + key: "cancel", + value: function cancel(reason) { + this._done = true; + + var _iterator6 = _createForOfIteratorHelper(this._requests), + _step6; + + try { + for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) { + var requestCapability = _step6.value; + requestCapability.resolve({ + value: undefined, + done: true + }); + } + } catch (err) { + _iterator6.e(err); + } finally { + _iterator6.f(); + } + + this._requests.length = 0; + + if (this._manager.isPendingRequest(this._requestId)) { + this._manager.abortRequest(this._requestId); + } + + this._close(); + } + }]); + + return PDFNetworkStreamRangeRequestReader; +}(); + +/***/ }), +/* 135 */ +/***/ ((__unused_webpack_module, exports, __w_pdfjs_require__) => { + +"use strict"; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PDFFetchStream = void 0; + +var _regenerator = _interopRequireDefault(__w_pdfjs_require__(2)); + +var _util = __w_pdfjs_require__(4); + +var _network_utils = __w_pdfjs_require__(132); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +; + +function createFetchOptions(headers, withCredentials, abortController) { + return { + method: "GET", + headers: headers, + signal: abortController === null || abortController === void 0 ? void 0 : abortController.signal, + mode: "cors", + credentials: withCredentials ? "include" : "same-origin", + redirect: "follow" + }; +} + +function createHeaders(httpHeaders) { + var headers = new Headers(); + + for (var property in httpHeaders) { + var value = httpHeaders[property]; + + if (typeof value === "undefined") { + continue; + } + + headers.append(property, value); + } + + return headers; +} + +var PDFFetchStream = /*#__PURE__*/function () { + function PDFFetchStream(source) { + _classCallCheck(this, PDFFetchStream); + + this.source = source; + this.isHttp = /^https?:/i.test(source.url); + this.httpHeaders = this.isHttp && source.httpHeaders || {}; + this._fullRequestReader = null; + this._rangeRequestReaders = []; + } + + _createClass(PDFFetchStream, [{ + key: "_progressiveDataLength", + get: function get() { + var _this$_fullRequestRea, _this$_fullRequestRea2; + + return (_this$_fullRequestRea = (_this$_fullRequestRea2 = this._fullRequestReader) === null || _this$_fullRequestRea2 === void 0 ? void 0 : _this$_fullRequestRea2._loaded) !== null && _this$_fullRequestRea !== void 0 ? _this$_fullRequestRea : 0; + } + }, { + key: "getFullReader", + value: function getFullReader() { + (0, _util.assert)(!this._fullRequestReader, "PDFFetchStream.getFullReader can only be called once."); + this._fullRequestReader = new PDFFetchStreamReader(this); + return this._fullRequestReader; + } + }, { + key: "getRangeReader", + value: function getRangeReader(begin, end) { + if (end <= this._progressiveDataLength) { + return null; + } + + var reader = new PDFFetchStreamRangeReader(this, begin, end); + + this._rangeRequestReaders.push(reader); + + return reader; + } + }, { + key: "cancelAllRequests", + value: function cancelAllRequests(reason) { + if (this._fullRequestReader) { + this._fullRequestReader.cancel(reason); + } + + var _iterator = _createForOfIteratorHelper(this._rangeRequestReaders.slice(0)), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var reader = _step.value; + reader.cancel(reason); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } + }]); + + return PDFFetchStream; +}(); + +exports.PDFFetchStream = PDFFetchStream; + +var PDFFetchStreamReader = /*#__PURE__*/function () { + function PDFFetchStreamReader(stream) { + var _this = this; + + _classCallCheck(this, PDFFetchStreamReader); + + this._stream = stream; + this._reader = null; + this._loaded = 0; + this._filename = null; + var source = stream.source; + this._withCredentials = source.withCredentials || false; + this._contentLength = source.length; + this._headersCapability = (0, _util.createPromiseCapability)(); + this._disableRange = source.disableRange || false; + this._rangeChunkSize = source.rangeChunkSize; + + if (!this._rangeChunkSize && !this._disableRange) { + this._disableRange = true; + } + + if (typeof AbortController !== "undefined") { + this._abortController = new AbortController(); + } + + this._isStreamingSupported = !source.disableStream; + this._isRangeSupported = !source.disableRange; + this._headers = createHeaders(this._stream.httpHeaders); + var url = source.url; + fetch(url, createFetchOptions(this._headers, this._withCredentials, this._abortController)).then(function (response) { + if (!(0, _network_utils.validateResponseStatus)(response.status)) { + throw (0, _network_utils.createResponseStatusError)(response.status, url); + } + + _this._reader = response.body.getReader(); + + _this._headersCapability.resolve(); + + var getResponseHeader = function getResponseHeader(name) { + return response.headers.get(name); + }; + + var _validateRangeRequest = (0, _network_utils.validateRangeRequestCapabilities)({ + getResponseHeader: getResponseHeader, + isHttp: _this._stream.isHttp, + rangeChunkSize: _this._rangeChunkSize, + disableRange: _this._disableRange + }), + allowRangeRequests = _validateRangeRequest.allowRangeRequests, + suggestedLength = _validateRangeRequest.suggestedLength; + + _this._isRangeSupported = allowRangeRequests; + _this._contentLength = suggestedLength || _this._contentLength; + _this._filename = (0, _network_utils.extractFilenameFromHeader)(getResponseHeader); + + if (!_this._isStreamingSupported && _this._isRangeSupported) { + _this.cancel(new _util.AbortException("Streaming is disabled.")); + } + })["catch"](this._headersCapability.reject); + this.onProgress = null; + } + + _createClass(PDFFetchStreamReader, [{ + key: "headersReady", + get: function get() { + return this._headersCapability.promise; + } + }, { + key: "filename", + get: function get() { + return this._filename; + } + }, { + key: "contentLength", + get: function get() { + return this._contentLength; + } + }, { + key: "isRangeSupported", + get: function get() { + return this._isRangeSupported; + } + }, { + key: "isStreamingSupported", + get: function get() { + return this._isStreamingSupported; + } + }, { + key: "read", + value: function () { + var _read = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee() { + var _yield$this$_reader$r, value, done, buffer; + + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return this._headersCapability.promise; + + case 2: + _context.next = 4; + return this._reader.read(); + + case 4: + _yield$this$_reader$r = _context.sent; + value = _yield$this$_reader$r.value; + done = _yield$this$_reader$r.done; + + if (!done) { + _context.next = 9; + break; + } + + return _context.abrupt("return", { + value: value, + done: done + }); + + case 9: + this._loaded += value.byteLength; + + if (this.onProgress) { + this.onProgress({ + loaded: this._loaded, + total: this._contentLength + }); + } + + buffer = new Uint8Array(value).buffer; + return _context.abrupt("return", { + value: buffer, + done: false + }); + + case 13: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function read() { + return _read.apply(this, arguments); + } + + return read; + }() + }, { + key: "cancel", + value: function cancel(reason) { + if (this._reader) { + this._reader.cancel(reason); + } + + if (this._abortController) { + this._abortController.abort(); + } + } + }]); + + return PDFFetchStreamReader; +}(); + +var PDFFetchStreamRangeReader = /*#__PURE__*/function () { + function PDFFetchStreamRangeReader(stream, begin, end) { + var _this2 = this; + + _classCallCheck(this, PDFFetchStreamRangeReader); + + this._stream = stream; + this._reader = null; + this._loaded = 0; + var source = stream.source; + this._withCredentials = source.withCredentials || false; + this._readCapability = (0, _util.createPromiseCapability)(); + this._isStreamingSupported = !source.disableStream; + + if (typeof AbortController !== "undefined") { + this._abortController = new AbortController(); + } + + this._headers = createHeaders(this._stream.httpHeaders); + + this._headers.append("Range", "bytes=".concat(begin, "-").concat(end - 1)); + + var url = source.url; + fetch(url, createFetchOptions(this._headers, this._withCredentials, this._abortController)).then(function (response) { + if (!(0, _network_utils.validateResponseStatus)(response.status)) { + throw (0, _network_utils.createResponseStatusError)(response.status, url); + } + + _this2._readCapability.resolve(); + + _this2._reader = response.body.getReader(); + })["catch"](function (reason) { + if ((reason === null || reason === void 0 ? void 0 : reason.name) === "AbortError") { + return; + } + + throw reason; + }); + this.onProgress = null; + } + + _createClass(PDFFetchStreamRangeReader, [{ + key: "isStreamingSupported", + get: function get() { + return this._isStreamingSupported; + } + }, { + key: "read", + value: function () { + var _read2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee2() { + var _yield$this$_reader$r2, value, done, buffer; + + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return this._readCapability.promise; + + case 2: + _context2.next = 4; + return this._reader.read(); + + case 4: + _yield$this$_reader$r2 = _context2.sent; + value = _yield$this$_reader$r2.value; + done = _yield$this$_reader$r2.done; + + if (!done) { + _context2.next = 9; + break; + } + + return _context2.abrupt("return", { + value: value, + done: done + }); + + case 9: + this._loaded += value.byteLength; + + if (this.onProgress) { + this.onProgress({ + loaded: this._loaded + }); + } + + buffer = new Uint8Array(value).buffer; + return _context2.abrupt("return", { + value: buffer, + done: false + }); + + case 13: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function read() { + return _read2.apply(this, arguments); + } + + return read; + }() + }, { + key: "cancel", + value: function cancel(reason) { + if (this._reader) { + this._reader.cancel(reason); + } + + if (this._abortController) { + this._abortController.abort(); + } + } + }]); + + return PDFFetchStreamRangeReader; +}(); + +/***/ }) +/******/ ]); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __w_pdfjs_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ id: moduleId, +/******/ loaded: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __w_pdfjs_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.loaded = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/node module decorator */ +/******/ (() => { +/******/ __w_pdfjs_require__.nmd = (module) => { +/******/ module.paths = []; +/******/ if (!module.children) module.children = []; +/******/ return module; +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be in strict mode. +(() => { +"use strict"; +var exports = __webpack_exports__; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "addLinkAttributes", ({ + enumerable: true, + get: function get() { + return _display_utils.addLinkAttributes; + } +})); +Object.defineProperty(exports, "getFilenameFromUrl", ({ + enumerable: true, + get: function get() { + return _display_utils.getFilenameFromUrl; + } +})); +Object.defineProperty(exports, "getPdfFilenameFromUrl", ({ + enumerable: true, + get: function get() { + return _display_utils.getPdfFilenameFromUrl; + } +})); +Object.defineProperty(exports, "getXfaPageViewport", ({ + enumerable: true, + get: function get() { + return _display_utils.getXfaPageViewport; + } +})); +Object.defineProperty(exports, "isPdfFile", ({ + enumerable: true, + get: function get() { + return _display_utils.isPdfFile; + } +})); +Object.defineProperty(exports, "LinkTarget", ({ + enumerable: true, + get: function get() { + return _display_utils.LinkTarget; + } +})); +Object.defineProperty(exports, "loadScript", ({ + enumerable: true, + get: function get() { + return _display_utils.loadScript; + } +})); +Object.defineProperty(exports, "PDFDateString", ({ + enumerable: true, + get: function get() { + return _display_utils.PDFDateString; + } +})); +Object.defineProperty(exports, "RenderingCancelledException", ({ + enumerable: true, + get: function get() { + return _display_utils.RenderingCancelledException; + } +})); +Object.defineProperty(exports, "build", ({ + enumerable: true, + get: function get() { + return _api.build; + } +})); +Object.defineProperty(exports, "getDocument", ({ + enumerable: true, + get: function get() { + return _api.getDocument; + } +})); +Object.defineProperty(exports, "LoopbackPort", ({ + enumerable: true, + get: function get() { + return _api.LoopbackPort; + } +})); +Object.defineProperty(exports, "PDFDataRangeTransport", ({ + enumerable: true, + get: function get() { + return _api.PDFDataRangeTransport; + } +})); +Object.defineProperty(exports, "PDFWorker", ({ + enumerable: true, + get: function get() { + return _api.PDFWorker; + } +})); +Object.defineProperty(exports, "version", ({ + enumerable: true, + get: function get() { + return _api.version; + } +})); +Object.defineProperty(exports, "CMapCompressionType", ({ + enumerable: true, + get: function get() { + return _util.CMapCompressionType; + } +})); +Object.defineProperty(exports, "createObjectURL", ({ + enumerable: true, + get: function get() { + return _util.createObjectURL; + } +})); +Object.defineProperty(exports, "createPromiseCapability", ({ + enumerable: true, + get: function get() { + return _util.createPromiseCapability; + } +})); +Object.defineProperty(exports, "createValidAbsoluteUrl", ({ + enumerable: true, + get: function get() { + return _util.createValidAbsoluteUrl; + } +})); +Object.defineProperty(exports, "InvalidPDFException", ({ + enumerable: true, + get: function get() { + return _util.InvalidPDFException; + } +})); +Object.defineProperty(exports, "MissingPDFException", ({ + enumerable: true, + get: function get() { + return _util.MissingPDFException; + } +})); +Object.defineProperty(exports, "OPS", ({ + enumerable: true, + get: function get() { + return _util.OPS; + } +})); +Object.defineProperty(exports, "PasswordResponses", ({ + enumerable: true, + get: function get() { + return _util.PasswordResponses; + } +})); +Object.defineProperty(exports, "PermissionFlag", ({ + enumerable: true, + get: function get() { + return _util.PermissionFlag; + } +})); +Object.defineProperty(exports, "removeNullCharacters", ({ + enumerable: true, + get: function get() { + return _util.removeNullCharacters; + } +})); +Object.defineProperty(exports, "shadow", ({ + enumerable: true, + get: function get() { + return _util.shadow; + } +})); +Object.defineProperty(exports, "UnexpectedResponseException", ({ + enumerable: true, + get: function get() { + return _util.UnexpectedResponseException; + } +})); +Object.defineProperty(exports, "UNSUPPORTED_FEATURES", ({ + enumerable: true, + get: function get() { + return _util.UNSUPPORTED_FEATURES; + } +})); +Object.defineProperty(exports, "Util", ({ + enumerable: true, + get: function get() { + return _util.Util; + } +})); +Object.defineProperty(exports, "VerbosityLevel", ({ + enumerable: true, + get: function get() { + return _util.VerbosityLevel; + } +})); +Object.defineProperty(exports, "AnnotationLayer", ({ + enumerable: true, + get: function get() { + return _annotation_layer.AnnotationLayer; + } +})); +Object.defineProperty(exports, "GlobalWorkerOptions", ({ + enumerable: true, + get: function get() { + return _worker_options.GlobalWorkerOptions; + } +})); +Object.defineProperty(exports, "renderTextLayer", ({ + enumerable: true, + get: function get() { + return _text_layer.renderTextLayer; + } +})); +Object.defineProperty(exports, "SVGGraphics", ({ + enumerable: true, + get: function get() { + return _svg.SVGGraphics; + } +})); +Object.defineProperty(exports, "XfaLayer", ({ + enumerable: true, + get: function get() { + return _xfa_layer.XfaLayer; + } +})); + +var _display_utils = __w_pdfjs_require__(1); + +var _api = __w_pdfjs_require__(115); + +var _util = __w_pdfjs_require__(4); + +var _annotation_layer = __w_pdfjs_require__(126); + +var _worker_options = __w_pdfjs_require__(121); + +var _is_node = __w_pdfjs_require__(6); + +var _text_layer = __w_pdfjs_require__(128); + +var _svg = __w_pdfjs_require__(129); + +var _xfa_layer = __w_pdfjs_require__(130); + +var pdfjsVersion = '2.10.377'; +var pdfjsBuild = '156762c48'; +{ + if (_is_node.isNodeJS) { + var _require = __w_pdfjs_require__(131), + PDFNodeStream = _require.PDFNodeStream; + + (0, _api.setPDFNetworkStreamFactory)(function (params) { + return new PDFNodeStream(params); + }); + } else { + var _require2 = __w_pdfjs_require__(134), + PDFNetworkStream = _require2.PDFNetworkStream; + + var _require3 = __w_pdfjs_require__(135), + PDFFetchStream = _require3.PDFFetchStream; + + (0, _api.setPDFNetworkStreamFactory)(function (params) { + if ((0, _display_utils.isValidFetchUrl)(params.url)) { + return new PDFFetchStream(params); + } + + return new PDFNetworkStream(params); + }); + } +} +})(); + +/******/ return __webpack_exports__; +/******/ })() +; +}); +//# sourceMappingURL=pdf.js.map \ No newline at end of file diff --git a/public/pdfjs/build/pdf.js.map b/public/pdfjs/build/pdf.js.map new file mode 100644 index 0000000..93c1006 --- /dev/null +++ b/public/pdfjs/build/pdf.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://pdfjs-dist/build/pdf/webpack/universalModuleDefinition","webpack://pdfjs-dist/build/pdf/src/display/display_utils.js","webpack://pdfjs-dist/build/pdf/node_modules/@babel/runtime/regenerator/index.js","webpack://pdfjs-dist/build/pdf/node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime.js","webpack://pdfjs-dist/build/pdf/src/shared/util.js","webpack://pdfjs-dist/build/pdf/src/shared/compatibility.js","webpack://pdfjs-dist/build/pdf/src/shared/is_node.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/es/global-this.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/modules/es.global-this.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/export.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/global.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/object-get-own-property-descriptor.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/descriptors.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/fails.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/object-property-is-enumerable.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/create-property-descriptor.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/to-indexed-object.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/indexed-object.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/classof-raw.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/require-object-coercible.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/to-primitive.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/is-object.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/has.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/to-object.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/ie8-dom-define.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/document-create-element.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/create-non-enumerable-property.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/object-define-property.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/an-object.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/redefine.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/set-global.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/inspect-source.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/shared-store.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/internal-state.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/native-weak-map.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/shared-key.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/shared.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/is-pure.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/uid.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/hidden-keys.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/copy-constructor-properties.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/own-keys.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/get-built-in.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/path.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/object-get-own-property-names.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/object-keys-internal.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/array-includes.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/to-length.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/to-integer.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/to-absolute-index.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/enum-bug-keys.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/object-get-own-property-symbols.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/is-forced.js","webpack://pdfjs-dist/build/pdf/node_modules/dommatrix/dist/dommatrix.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/es/object/from-entries.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/modules/es.array.iterator.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/add-to-unscopables.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/well-known-symbol.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/native-symbol.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/engine-v8-version.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/engine-user-agent.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/use-symbol-as-uid.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/object-create.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/object-define-properties.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/object-keys.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/html.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/iterators.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/define-iterator.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/create-iterator-constructor.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/iterators-core.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/object-get-prototype-of.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/correct-prototype-getter.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/set-to-string-tag.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/object-set-prototype-of.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/a-possible-prototype.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/modules/es.object.from-entries.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/iterate.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/is-array-iterator-method.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/function-bind-context.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/a-function.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/get-iterator-method.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/classof.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/to-string-tag-support.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/iterator-close.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/create-property.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/es/promise/index.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/modules/es.aggregate-error.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/modules/es.object.to-string.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/object-to-string.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/modules/es.promise.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/native-promise-constructor.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/redefine-all.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/set-species.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/an-instance.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/check-correctness-of-iteration.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/species-constructor.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/task.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/engine-is-ios.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/engine-is-node.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/microtask.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/engine-is-webos-webkit.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/promise-resolve.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/new-promise-capability.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/host-report-errors.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/perform.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/engine-is-browser.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/modules/es.promise.all-settled.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/modules/es.promise.any.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/modules/es.promise.finally.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/modules/es.string.iterator.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/string-multibyte.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/modules/web.dom-collections.iterator.js","webpack://pdfjs-dist/build/pdf/node_modules/core-js/internals/dom-iterables.js","webpack://pdfjs-dist/build/pdf/node_modules/web-streams-polyfill/dist/ponyfill.js","webpack://pdfjs-dist/build/pdf/src/display/base_factory.js","webpack://pdfjs-dist/build/pdf/src/display/api.js","webpack://pdfjs-dist/build/pdf/src/display/font_loader.js","webpack://pdfjs-dist/build/pdf/src/display/node_utils.js","webpack://pdfjs-dist/build/pdf/src/display/annotation_storage.js","webpack://pdfjs-dist/build/pdf/src/display/canvas.js","webpack://pdfjs-dist/build/pdf/src/display/pattern_helper.js","webpack://pdfjs-dist/build/pdf/src/display/worker_options.js","webpack://pdfjs-dist/build/pdf/src/shared/message_handler.js","webpack://pdfjs-dist/build/pdf/src/display/metadata.js","webpack://pdfjs-dist/build/pdf/src/display/optional_content_config.js","webpack://pdfjs-dist/build/pdf/src/display/transport_stream.js","webpack://pdfjs-dist/build/pdf/src/display/annotation_layer.js","webpack://pdfjs-dist/build/pdf/src/shared/scripting_utils.js","webpack://pdfjs-dist/build/pdf/src/display/text_layer.js","webpack://pdfjs-dist/build/pdf/src/display/svg.js","webpack://pdfjs-dist/build/pdf/src/display/xfa_layer.js","webpack://pdfjs-dist/build/pdf/src/display/node_stream.js","webpack://pdfjs-dist/build/pdf/src/display/network_utils.js","webpack://pdfjs-dist/build/pdf/src/display/content_disposition.js","webpack://pdfjs-dist/build/pdf/src/display/network.js","webpack://pdfjs-dist/build/pdf/src/display/fetch_stream.js","webpack://pdfjs-dist/build/pdf/webpack/bootstrap","webpack://pdfjs-dist/build/pdf/webpack/runtime/node module decorator","webpack://pdfjs-dist/build/pdf/src/pdf.js"],"names":["DEFAULT_LINK_REL","SVG_NS","constructor","ownerDocument","globalThis","_createCanvas","canvas","asTypedArray","isValidFetchUrl","document","fetch","response","stringToBytes","request","XMLHttpRequest","data","resolve","reject","_fetchData","cMapData","compressionType","fetchData","_createSVG","offsetX","offsetY","dontFlip","centerX","viewBox","centerY","rotation","rotateA","rotateB","rotateC","rotateD","offsetCanvasX","Math","offsetCanvasY","width","height","clone","scale","convertToViewportPoint","convertToViewportRectangle","topLeft","rect","bottomRight","convertToPdfPoint","LinkTarget","NONE","SELF","BLANK","PARENT","TOP","enabled","assert","url","urlNullRemoved","removeNullCharacters","link","targetStr","ii","i","anchor","query","end","defaultFilename","isDataScheme","warn","reURI","reFilename","splitURI","suggestedFilename","decodeURIComponent","Object","time","name","Date","timeEnd","start","toString","outBuf","longest","duration","baseUrl","protocol","removeScriptElement","script","console","isString","pdfDateStringRegex","matches","year","parseInt","month","day","hour","minute","second","universalTimeRelation","offsetHour","offsetMinute","xfaPage","module","runtime","Op","hasOwn","$Symbol","iteratorSymbol","asyncIteratorSymbol","toStringTagSymbol","value","enumerable","configurable","writable","obj","define","protoGenerator","outerFn","generator","context","tryLocsList","makeInvokeMethod","exports","type","arg","fn","GenStateSuspendedStart","GenStateSuspendedYield","GenStateExecuting","GenStateCompleted","ContinueSentinel","IteratorPrototype","getProto","NativeIteratorPrototype","values","Gp","GeneratorFunctionPrototype","Generator","GeneratorFunction","ctor","genFun","__await","record","tryCatch","result","invoke","previousPromise","callInvokeWithMethodAndArg","defineIteratorMethods","AsyncIterator","PromiseImpl","iter","wrap","state","method","doneResult","delegate","delegateResult","maybeInvokeDelegate","done","info","entry","tryLoc","locs","keys","key","next","iteratorMethod","iterable","isNaN","Context","reset","stop","rootEntry","rootRecord","dispatchException","handle","hasCatch","hasFinally","abrupt","finallyEntry","complete","finish","resetTryEntry","thrown","delegateYield","iterator","resultName","nextLoc","regeneratorRuntime","Function","IDENTITY_MATRIX","FONT_IDENTITY_MATRIX","PermissionFlag","PRINT","MODIFY_CONTENTS","COPY","MODIFY_ANNOTATIONS","FILL_INTERACTIVE_FORMS","COPY_FOR_ACCESSIBILITY","ASSEMBLE","PRINT_HIGH_QUALITY","TextRenderingMode","FILL","STROKE","FILL_STROKE","INVISIBLE","FILL_ADD_TO_PATH","STROKE_ADD_TO_PATH","FILL_STROKE_ADD_TO_PATH","ADD_TO_PATH","FILL_STROKE_MASK","ADD_TO_PATH_FLAG","ImageKind","GRAYSCALE_1BPP","RGB_24BPP","RGBA_32BPP","AnnotationType","TEXT","LINK","FREETEXT","LINE","SQUARE","CIRCLE","POLYGON","POLYLINE","HIGHLIGHT","UNDERLINE","SQUIGGLY","STRIKEOUT","STAMP","CARET","INK","POPUP","FILEATTACHMENT","SOUND","MOVIE","WIDGET","SCREEN","PRINTERMARK","TRAPNET","WATERMARK","THREED","REDACT","AnnotationStateModelType","MARKED","REVIEW","AnnotationMarkedState","UNMARKED","AnnotationReviewState","ACCEPTED","REJECTED","CANCELLED","COMPLETED","AnnotationReplyType","GROUP","REPLY","AnnotationFlag","HIDDEN","NOZOOM","NOROTATE","NOVIEW","READONLY","LOCKED","TOGGLENOVIEW","LOCKEDCONTENTS","AnnotationFieldFlag","REQUIRED","NOEXPORT","MULTILINE","PASSWORD","NOTOGGLETOOFF","RADIO","PUSHBUTTON","COMBO","EDIT","SORT","FILESELECT","MULTISELECT","DONOTSPELLCHECK","DONOTSCROLL","COMB","RICHTEXT","RADIOSINUNISON","COMMITONSELCHANGE","AnnotationBorderStyleType","SOLID","DASHED","BEVELED","INSET","AnnotationActionEventType","E","X","D","U","Fo","Bl","PO","PC","PV","PI","K","F","V","C","DocumentActionEventType","WC","WS","DS","WP","DP","PageActionEventType","O","StreamType","UNKNOWN","FLATE","LZW","DCT","JPX","JBIG","A85","AHX","CCF","RLX","FontType","TYPE1","TYPE1STANDARD","TYPE1C","CIDFONTTYPE0","CIDFONTTYPE0C","TRUETYPE","CIDFONTTYPE2","TYPE3","OPENTYPE","TYPE0","MMTYPE1","VerbosityLevel","ERRORS","WARNINGS","INFOS","CMapCompressionType","BINARY","STREAM","OPS","dependency","setLineWidth","setLineCap","setLineJoin","setMiterLimit","setDash","setRenderingIntent","setFlatness","setGState","save","restore","transform","moveTo","lineTo","curveTo","curveTo2","curveTo3","closePath","rectangle","stroke","closeStroke","fill","eoFill","fillStroke","eoFillStroke","closeFillStroke","closeEOFillStroke","endPath","clip","eoClip","beginText","endText","setCharSpacing","setWordSpacing","setHScale","setLeading","setFont","setTextRenderingMode","setTextRise","moveText","setLeadingMoveText","setTextMatrix","nextLine","showText","showSpacedText","nextLineShowText","nextLineSetSpacingShowText","setCharWidth","setCharWidthAndBounds","setStrokeColorSpace","setFillColorSpace","setStrokeColor","setStrokeColorN","setFillColor","setFillColorN","setStrokeGray","setFillGray","setStrokeRGBColor","setFillRGBColor","setStrokeCMYKColor","setFillCMYKColor","shadingFill","beginInlineImage","beginImageData","endInlineImage","paintXObject","markPoint","markPointProps","beginMarkedContent","beginMarkedContentProps","endMarkedContent","beginCompat","endCompat","paintFormXObjectBegin","paintFormXObjectEnd","beginGroup","endGroup","beginAnnotations","endAnnotations","beginAnnotation","endAnnotation","paintJpegXObject","paintImageMaskXObject","paintImageMaskXObjectGroup","paintImageXObject","paintInlineImageXObject","paintInlineImageXObjectGroup","paintImageXObjectRepeat","paintImageMaskXObjectRepeat","paintSolidColorImageMask","constructPath","UNSUPPORTED_FEATURES","unknown","forms","javaScript","signatures","smask","shadingPattern","font","errorTilingPattern","errorExtGState","errorXObject","errorFontLoadType3","errorFontState","errorFontMissing","errorFontTranslate","errorColorSpace","errorOperatorList","errorFontToUnicode","errorFontLoadNative","errorFontBuildPath","errorFontGetPath","errorMarkedContent","PasswordResponses","NEED_PASSWORD","INCORRECT_PASSWORD","verbosity","Number","unreachable","base","other","absoluteUrl","_isValidProtocol","BaseException","NullCharactersRegExp","str","bytes","length","MAX_ARGUMENT_COUNT","String","strBuf","chunkEnd","chunk","arr","resultLength","arrayByteLength","pos","item","itemLength","buffer8","view32","IsLittleEndianCached","shadow","isLittleEndian","IsEvalSupportedCached","isEvalSupported","hexNumbers","Array","n","m1","m2","xt","p","m","yt","d","p1","Util","p2","r","p3","p4","v","transpose","a","b","c","first","sx","sy","orderedX","rect1","rect2","orderedY","PDFStringTranslateTable","code","match","buf","char","escape","unescape","encodeURIComponent","arr1","arr2","date","buffer","capability","isSettled","get","contentType","forceDataSchema","URL","digits","b1","b2","b3","d1","d2","d3","d4","require","Buffer","isReadableStreamSupported","controller","isNodeJS","process","$","global","getOwnPropertyDescriptor","createNonEnumerableProperty","redefine","setGlobal","copyConstructorProperties","isForced","options","source","TARGET","target","GLOBAL","STATIC","stat","FORCED","targetProperty","sourceProperty","descriptor","prototype","noTargetGet","forced","undefined","sham","check","it","window","self","DESCRIPTORS","propertyIsEnumerableModule","createPropertyDescriptor","toIndexedObject","toPrimitive","has","IE8_DOM_DEFINE","$getOwnPropertyDescriptor","P","error","f","call","fails","defineProperty","exec","$propertyIsEnumerable","propertyIsEnumerable","NASHORN_BUG","bitmap","IndexedObject","requireObjectCoercible","classof","split","slice","TypeError","isObject","input","PREFERRED_STRING","val","valueOf","toObject","hasOwnProperty","argument","createElement","EXISTS","definePropertyModule","object","anObject","$defineProperty","Attributes","inspectSource","InternalStateModule","getInternalState","enforceInternalState","enforce","TEMPLATE","unsafe","simple","join","store","functionToString","SHARED","NATIVE_WEAK_MAP","objectHas","shared","sharedKey","hiddenKeys","OBJECT_ALREADY_INITIALIZED","WeakMap","set","getterFor","TYPE","wmget","wmhas","wmset","metadata","facade","STATE","test","uid","IS_PURE","push","version","mode","copyright","id","postfix","random","ownKeys","getOwnPropertyDescriptorModule","getBuiltIn","getOwnPropertyNamesModule","getOwnPropertySymbolsModule","getOwnPropertySymbols","concat","path","aFunction","variable","namespace","arguments","internalObjectKeys","enumBugKeys","getOwnPropertyNames","indexOf","names","toLength","toAbsoluteIndex","createMethod","IS_INCLUDES","$this","el","fromIndex","index","includes","toInteger","min","ceil","floor","max","integer","replacement","feature","detection","normalize","POLYFILL","NATIVE","string","replace","toLowerCase","factory","CSSMatrix","args","len","prototypeAccessors","isIdentity","is2D","CSSMatrixProto","radX","rx","radY","ry","radZ","rz","cosx","sinx","cosy","siny","cosz","sinz","cycz","cysz","sxsy","cxcz","radA","angle","sinA","cosA","sinA2","x","y","z","Y","Z","x2","y2","z2","m11","m12","m21","m22","t","m13","m14","m23","m24","m31","m32","m33","m34","m41","m42","m43","m44","m11$1","m12$1","m21$1","m22$1","m14$1","m24$1","feedFromArray","Multiply","Translate","Scale","RX","RY","RZ","Rotate","RotateAxisAngle","SkewX","SkewY","identity","M","w","fromEntries","addToUnscopables","Iterators","defineIterator","ARRAY_ITERATOR","setInternalState","iterated","kind","Arguments","wellKnownSymbol","create","UNSCOPABLES","ArrayPrototype","NATIVE_SYMBOL","USE_SYMBOL_AS_UID","WellKnownSymbolsStore","Symbol","createWellKnownSymbol","withoutSetter","V8_VERSION","symbol","userAgent","versions","v8","defineProperties","html","documentCreateElement","GT","LT","PROTOTYPE","SCRIPT","IE_PROTO","EmptyConstructor","scriptTag","content","NullProtoObjectViaActiveX","activeXDocument","write","close","temp","parentWindow","NullProtoObjectViaIFrame","iframe","JS","iframeDocument","style","display","appendChild","src","contentWindow","open","NullProtoObject","domain","ActiveXObject","Properties","objectKeys","createIteratorConstructor","getPrototypeOf","setPrototypeOf","setToStringTag","IteratorsCore","BUGGY_SAFARI_ITERATORS","ITERATOR","KEYS","VALUES","ENTRIES","returnThis","Iterable","NAME","IteratorConstructor","DEFAULT","IS_SET","getIterationMethod","KIND","defaultIterator","IterablePrototype","entries","TO_STRING_TAG","INCORRECT_VALUES_NAME","nativeIterator","anyNativeIterator","CurrentIteratorPrototype","methods","KEY","proto","PrototypeOfArrayIteratorPrototype","arrayIterator","NEW_ITERATOR_PROTOTYPE","CORRECT_PROTOTYPE_GETTER","ObjectPrototype","TAG","aPossiblePrototype","CORRECT_SETTER","setter","__proto__","iterate","createProperty","k","AS_ENTRIES","isArrayIteratorMethod","bind","getIteratorMethod","iteratorClose","Result","stopped","unboundFunction","that","IS_ITERATOR","INTERRUPTED","iterFn","step","condition","callFn","apply","TO_STRING_TAG_SUPPORT","classofRaw","CORRECT_ARGUMENTS","tryGet","tag","callee","returnMethod","propertyKey","Promise","$AggregateError","AggregateError","errors","message","Error","errorsArray","NativePromise","redefineAll","setSpecies","anInstance","checkCorrectnessOfIteration","speciesConstructor","task","microtask","promiseResolve","hostReportErrors","newPromiseCapabilityModule","perform","IS_BROWSER","IS_NODE","SPECIES","PROMISE","getInternalPromiseState","NativePromisePrototype","PromiseConstructor","PromiseConstructorPrototype","newPromiseCapability","newGenericPromiseCapability","DISPATCH_EVENT","createEvent","dispatchEvent","NATIVE_REJECTION_EVENT","PromiseRejectionEvent","UNHANDLED_REJECTION","REJECTION_HANDLED","PENDING","FULFILLED","HANDLED","UNHANDLED","SUBCLASSING","Internal","OwnPromiseCapability","PromiseWrapper","nativeThen","PROMISE_CONSTRUCTOR_SOURCE","GLOBAL_CORE_JS_PROMISE","promise","FakePromise","then","INCORRECT_ITERATION","all","isThenable","notify","isReject","notified","chain","reactions","ok","reaction","handler","fail","exited","rejection","onHandleUnhandled","enter","exit","onUnhandled","reason","event","initEvent","IS_UNHANDLED","isUnhandled","emit","parent","unwrap","internalReject","internalResolve","wrapper","executor","onFulfilled","onRejected","$promiseResolve","counter","remaining","alreadyCalled","race","CONSTRUCTOR_NAME","Constructor","SAFE_CLOSING","called","iteratorWithReturn","from","SKIP_CLOSING","ITERATION_SUPPORT","defaultConstructor","S","IS_IOS","location","setImmediate","clear","clearImmediate","MessageChannel","Dispatch","queue","ONREADYSTATECHANGE","defer","channel","port","run","runner","listener","post","postMessage","host","nextTick","now","port2","port1","onmessage","addEventListener","importScripts","removeChild","setTimeout","macrotask","IS_WEBOS_WEBKIT","MutationObserver","WebKitMutationObserver","queueMicrotaskDescriptor","queueMicrotask","flush","head","last","toggle","node","createTextNode","observe","characterData","promiseCapability","PromiseCapability","$$resolve","$$reject","allSettled","status","PROMISE_ANY_ERROR","any","alreadyResolved","alreadyRejected","NON_GENERIC","real","onFinally","isFunction","e","charAt","STRING_ITERATOR","point","CONVERT_TO_STRING","position","size","charCodeAt","codeAt","DOMIterables","ArrayIteratorMethods","ArrayValues","COLLECTION_NAME","Collection","CollectionPrototype","METHOD_NAME","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","SymbolPolyfill","description","noop","getGlobals","globals","typeIsObject","rethrowAssertionErrorRejection","originalPromise","originalPromiseThen","originalPromiseResolve","originalPromiseReject","newPromise","promiseResolvedWith","promiseRejectedWith","PerformPromiseThen","uponPromise","uponFulfillment","uponRejection","transformPromiseWith","fulfillmentHandler","rejectionHandler","setPromiseIsHandledToTrue","globalQueueMicrotask","resolvedPromise","reflectCall","promiseCall","QUEUE_MAX_ARRAY_SIZE","SimpleQueue","_cursor","_size","_front","_elements","_next","_back","element","oldBack","newBack","shift","oldFront","newFront","oldCursor","newCursor","elements","forEach","callback","peek","front","cursor","ReadableStreamReaderGenericInitialize","reader","stream","_ownerReadableStream","_reader","_state","defaultReaderClosedPromiseInitialize","defaultReaderClosedPromiseInitializeAsResolved","defaultReaderClosedPromiseInitializeAsRejected","_storedError","ReadableStreamReaderGenericCancel","ReadableStreamCancel","ReadableStreamReaderGenericRelease","defaultReaderClosedPromiseReject","defaultReaderClosedPromiseResetToRejected","readerLockException","_closedPromise","_closedPromise_resolve","_closedPromise_reject","defaultReaderClosedPromiseResolve","AbortSteps","ErrorSteps","CancelSteps","PullSteps","NumberIsFinite","isFinite","MathTrunc","trunc","isDictionary","assertDictionary","assertFunction","assertObject","assertRequiredArgument","assertRequiredField","field","convertUnrestrictedDouble","censorNegativeZero","integerPart","convertUnsignedLongLongWithEnforceRange","lowerBound","upperBound","MAX_SAFE_INTEGER","assertReadableStream","IsReadableStream","AcquireReadableStreamDefaultReader","ReadableStreamDefaultReader","ReadableStreamAddReadRequest","readRequest","_readRequests","ReadableStreamFulfillReadRequest","_closeSteps","_chunkSteps","ReadableStreamGetNumReadRequests","ReadableStreamHasDefaultReader","IsReadableStreamDefaultReader","IsReadableStreamLocked","defaultReaderBrandCheckException","cancel","read","resolvePromise","rejectPromise","_errorSteps","ReadableStreamDefaultReaderRead","releaseLock","closed","toStringTag","_disturbed","_readableStreamController","_a","AsyncIteratorPrototype","asyncIterator","ReadableStreamAsyncIteratorImpl","preventCancel","_ongoingPromise","_isFinished","_preventCancel","_this","nextSteps","_nextSteps","return","returnSteps","_returnSteps","ReadableStreamAsyncIteratorPrototype","IsReadableStreamAsyncIterator","streamAsyncIteratorBrandCheckException","_asyncIteratorImpl","AcquireReadableStreamAsyncIterator","impl","NumberIsNaN","CreateArrayFromList","CopyDataBlockBytes","dest","destOffset","srcOffset","Uint8Array","TransferArrayBuffer","IsDetachedBuffer","ArrayBufferSlice","begin","ArrayBuffer","IsNonNegativeNumber","CloneAsUint8Array","byteOffset","byteLength","DequeueValue","container","pair","_queue","_queueTotalSize","EnqueueValueWithSize","Infinity","RangeError","PeekQueueValue","ResetQueue","ReadableStreamBYOBRequest","IsReadableStreamBYOBRequest","byobRequestBrandCheckException","_view","respond","bytesWritten","_associatedReadableByteStreamController","ReadableByteStreamControllerRespond","respondWithNewView","view","isView","ReadableByteStreamControllerRespondWithNewView","ReadableByteStreamController","IsReadableByteStreamController","byteStreamControllerBrandCheckException","ReadableByteStreamControllerGetBYOBRequest","ReadableByteStreamControllerGetDesiredSize","_closeRequested","_controlledReadableByteStream","ReadableByteStreamControllerClose","enqueue","ReadableByteStreamControllerEnqueue","ReadableByteStreamControllerError","ReadableByteStreamControllerClearPendingPullIntos","_cancelAlgorithm","ReadableByteStreamControllerClearAlgorithms","ReadableByteStreamControllerHandleQueueDrain","autoAllocateChunkSize","_autoAllocateChunkSize","bufferE","pullIntoDescriptor","bufferByteLength","bytesFilled","elementSize","viewConstructor","readerType","_pendingPullIntos","ReadableByteStreamControllerCallPullIfNeeded","byobRequest","desiredSize","shouldPull","ReadableByteStreamControllerShouldCallPull","_pulling","_pullAgain","pullPromise","_pullAlgorithm","ReadableByteStreamControllerInvalidateBYOBRequest","ReadableByteStreamControllerCommitPullIntoDescriptor","filledView","ReadableByteStreamControllerConvertPullIntoDescriptor","ReadableStreamFulfillReadIntoRequest","ReadableByteStreamControllerEnqueueChunkToQueue","ReadableByteStreamControllerFillPullIntoDescriptorFromQueue","currentAlignedBytes","maxBytesToCopy","maxBytesFilled","maxAlignedBytes","totalBytesToCopyRemaining","ready","headOfQueue","bytesToCopy","destStart","ReadableByteStreamControllerFillHeadPullIntoDescriptor","ReadableStreamClose","_byobRequest","ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue","ReadableByteStreamControllerShiftPendingPullInto","ReadableByteStreamControllerPullInto","readIntoRequest","DataView","BYTES_PER_ELEMENT","ReadableStreamAddReadIntoRequest","emptyView","ReadableByteStreamControllerRespondInClosedState","firstDescriptor","ReadableStreamHasBYOBReader","ReadableStreamGetNumReadIntoRequests","ReadableByteStreamControllerRespondInReadableState","remainderSize","remainder","ReadableByteStreamControllerRespondInternal","_started","firstPendingPullInto","transferredBuffer","transferredView","ReadableStreamError","SetUpReadableStreamBYOBRequest","_strategyHWM","SetUpReadableByteStreamController","startAlgorithm","pullAlgorithm","cancelAlgorithm","highWaterMark","startResult","SetUpReadableByteStreamControllerFromUnderlyingSource","underlyingByteSource","pull","AcquireReadableStreamBYOBReader","ReadableStreamBYOBReader","_readIntoRequests","IsReadableStreamBYOBReader","byobReaderBrandCheckException","ReadableStreamBYOBReaderRead","ExtractHighWaterMark","strategy","defaultHWM","ExtractSizeAlgorithm","convertQueuingStrategy","init","convertQueuingStrategySize","convertUnderlyingSink","original","abort","convertUnderlyingSinkAbortCallback","convertUnderlyingSinkCloseCallback","convertUnderlyingSinkStartCallback","convertUnderlyingSinkWriteCallback","assertWritableStream","IsWritableStream","isAbortSignal","aborted","supportsAbortController","AbortController","createAbortController","WritableStream","rawUnderlyingSink","rawStrategy","underlyingSink","InitializeWritableStream","sizeAlgorithm","SetUpWritableStreamDefaultControllerFromUnderlyingSink","streamBrandCheckException$2","IsWritableStreamLocked","WritableStreamAbort","WritableStreamCloseQueuedOrInFlight","WritableStreamClose","getWriter","AcquireWritableStreamDefaultWriter","locked","WritableStreamDefaultWriter","CreateWritableStream","writeAlgorithm","closeAlgorithm","abortAlgorithm","WritableStreamDefaultController","SetUpWritableStreamDefaultController","_writer","_writableStreamController","_writeRequests","_inFlightWriteRequest","_closeRequest","_inFlightCloseRequest","_pendingAbortRequest","_backpressure","_abortReason","_abortController","_promise","wasAlreadyErroring","_resolve","_reject","_reason","_wasAlreadyErroring","WritableStreamStartErroring","closeRequest","writer","defaultWriterReadyPromiseResolve","WritableStreamDefaultControllerClose","WritableStreamAddWriteRequest","writeRequest","WritableStreamDealWithRejection","WritableStreamFinishErroring","WritableStreamDefaultWriterEnsureReadyPromiseRejected","WritableStreamHasOperationMarkedInFlight","storedError","WritableStreamRejectCloseAndClosedPromiseIfNeeded","abortRequest","WritableStreamFinishInFlightWrite","WritableStreamFinishInFlightWriteWithError","WritableStreamFinishInFlightClose","defaultWriterClosedPromiseResolve","WritableStreamFinishInFlightCloseWithError","WritableStreamMarkCloseRequestInFlight","WritableStreamMarkFirstWriteRequestInFlight","defaultWriterClosedPromiseReject","WritableStreamUpdateBackpressure","backpressure","defaultWriterReadyPromiseReset","_ownerWritableStream","defaultWriterReadyPromiseInitialize","defaultWriterReadyPromiseInitializeAsResolved","defaultWriterClosedPromiseInitialize","defaultWriterReadyPromiseInitializeAsRejected","defaultWriterClosedPromiseInitializeAsResolved","defaultWriterClosedPromiseInitializeAsRejected","IsWritableStreamDefaultWriter","defaultWriterBrandCheckException","defaultWriterLockException","WritableStreamDefaultWriterGetDesiredSize","_readyPromise","WritableStreamDefaultWriterAbort","WritableStreamDefaultWriterClose","WritableStreamDefaultWriterRelease","WritableStreamDefaultWriterWrite","WritableStreamDefaultWriterCloseWithErrorPropagation","WritableStreamDefaultWriterEnsureClosedPromiseRejected","_closedPromiseState","defaultWriterClosedPromiseResetToRejected","_readyPromiseState","defaultWriterReadyPromiseReject","defaultWriterReadyPromiseResetToRejected","WritableStreamDefaultControllerGetDesiredSize","releasedError","chunkSize","WritableStreamDefaultControllerGetChunkSize","WritableStreamDefaultControllerWrite","closeSentinel","IsWritableStreamDefaultController","defaultControllerBrandCheckException$2","signal","_controlledWritableStream","WritableStreamDefaultControllerError","_abortAlgorithm","WritableStreamDefaultControllerClearAlgorithms","_strategySizeAlgorithm","_writeAlgorithm","_closeAlgorithm","WritableStreamDefaultControllerGetBackpressure","startPromise","WritableStreamDefaultControllerAdvanceQueueIfNeeded","chunkSizeE","WritableStreamDefaultControllerErrorIfNeeded","enqueueE","WritableStreamDefaultControllerProcessClose","WritableStreamDefaultControllerProcessWrite","sinkClosePromise","sinkWritePromise","_readyPromise_resolve","_readyPromise_reject","NativeDOMException","DOMException","isDOMExceptionConstructor","createDOMExceptionPolyfill","captureStackTrace","DOMException$1","ReadableStreamPipeTo","preventClose","preventAbort","shuttingDown","currentWrite","actions","shutdownWithAction","map","action","pipeLoop","resolveLoop","rejectLoop","pipeStep","resolveRead","rejectRead","isOrBecomesErrored","shutdown","isOrBecomesClosed","destClosed_1","waitForWritesToFinish","oldCurrentWrite","originalIsError","originalError","doTheRest","finalize","newError","isError","removeEventListener","ReadableStreamDefaultController","IsReadableStreamDefaultController","defaultControllerBrandCheckException$1","ReadableStreamDefaultControllerGetDesiredSize","ReadableStreamDefaultControllerCanCloseOrEnqueue","ReadableStreamDefaultControllerClose","ReadableStreamDefaultControllerEnqueue","ReadableStreamDefaultControllerError","ReadableStreamDefaultControllerClearAlgorithms","_controlledReadableStream","ReadableStreamDefaultControllerCallPullIfNeeded","ReadableStreamDefaultControllerShouldCallPull","ReadableStreamDefaultControllerHasBackpressure","SetUpReadableStreamDefaultController","SetUpReadableStreamDefaultControllerFromUnderlyingSource","underlyingSource","ReadableStreamTee","cloneForBranch2","ReadableByteStreamTee","ReadableStreamDefaultTee","reading","canceled1","canceled2","reason1","reason2","branch1","branch2","resolveCancelPromise","cancelPromise","chunk1","chunk2","cancel1Algorithm","compositeReason","cancelResult","cancel2Algorithm","CreateReadableStream","forwardReaderError","thisReader","pullWithDefaultReader","cloneE","pullWithBYOBReader","forBranch2","byobBranch","otherBranch","byobCanceled","otherCanceled","clonedChunk","pull1Algorithm","pull2Algorithm","CreateReadableByteStream","convertUnderlyingDefaultOrByteSource","convertUnderlyingSourceCancelCallback","convertUnderlyingSourcePullCallback","convertUnderlyingSourceStartCallback","convertReadableStreamType","convertReaderOptions","convertReadableStreamReaderMode","convertIteratorOptions","Boolean","convertPipeOptions","assertAbortSignal","convertReadableWritablePair","readable","ReadableStream","rawUnderlyingSource","InitializeReadableStream","streamBrandCheckException$1","getReader","rawOptions","pipeThrough","rawTransform","pipeTo","destination","tee","branches","sourceCancelPromise","convertQueuingStrategyInit","byteLengthSizeFunction","ByteLengthQueuingStrategy","_byteLengthQueuingStrategyHighWaterMark","IsByteLengthQueuingStrategy","byteLengthBrandCheckException","countSizeFunction","CountQueuingStrategy","_countQueuingStrategyHighWaterMark","IsCountQueuingStrategy","countBrandCheckException","convertTransformer","readableType","writableType","convertTransformerFlushCallback","convertTransformerStartCallback","convertTransformerTransformCallback","TransformStream","rawTransformer","rawWritableStrategy","rawReadableStrategy","writableStrategy","readableStrategy","transformer","readableHighWaterMark","readableSizeAlgorithm","writableHighWaterMark","writableSizeAlgorithm","startPromise_resolve","InitializeTransformStream","SetUpTransformStreamDefaultControllerFromTransformer","_transformStreamController","IsTransformStream","streamBrandCheckException","_readable","_writable","TransformStreamDefaultSinkWriteAlgorithm","TransformStreamDefaultSinkAbortAlgorithm","TransformStreamDefaultSinkCloseAlgorithm","TransformStreamDefaultSourcePullAlgorithm","TransformStreamErrorWritableAndUnblockWrite","_backpressureChangePromise","_backpressureChangePromise_resolve","TransformStreamSetBackpressure","TransformStreamError","TransformStreamDefaultControllerClearAlgorithms","TransformStreamDefaultController","IsTransformStreamDefaultController","defaultControllerBrandCheckException","readableController","_controlledTransformStream","TransformStreamDefaultControllerEnqueue","TransformStreamDefaultControllerError","terminate","TransformStreamDefaultControllerTerminate","SetUpTransformStreamDefaultController","transformAlgorithm","flushAlgorithm","_transformAlgorithm","_flushAlgorithm","transformResultE","TransformStreamDefaultControllerPerformTransform","transformPromise","backpressureChangePromise","flushPromise","canvasAndContext","destroy","isCompressed","svg","DEFAULT_RANGE_CHUNK_SIZE","RENDERING_CANCELLED_TIMEOUT","DefaultCanvasFactory","DefaultCMapReaderFactory","DefaultStandardFontDataFactory","createPDFNetworkStream","isArrayBuffer","range","params","rangeTransport","worker","setVerbosityLevel","workerParams","GlobalWorkerOptions","PDFWorker","docId","workerIdPromise","_fetchDocument","networkStreamPromise","networkStream","initialData","progressiveDone","contentDispositionFilename","disableRange","disableStream","httpHeaders","withCredentials","rangeChunkSize","messageHandler","transport","pdfDataRangeTransport","apiVersion","password","disableAutoFetch","maxImageSize","disableFontFace","postMessageTransfers","docBaseUrl","ignoreErrors","fontExtraProperties","enableXfa","useSystemFonts","cMapUrl","standardFontDataUrl","PDFDocumentLoadingTask","nextDocumentId","transportDestroyed","addRangeListener","addProgressListener","addProgressiveReadListener","addProgressiveDoneListener","onDataRange","onDataProgress","onDataProgressiveRead","onDataProgressiveDone","transportReady","requestDataRange","deprecated","getPage","getPageIndex","getDestinations","getDestination","getPageLabels","getPageLayout","getPageMode","getViewerPreferences","getOpenAction","getAttachments","getJavaScript","getJSActions","getOutline","getOptionalContentConfig","getPermissions","getMetadata","getMarkInfo","getData","getDownloadInfo","getStats","cleanup","keepLoadedFonts","saveDocument","getFieldObjects","hasJSActions","getCalculationOrderIds","pdfBug","getViewport","getAnnotations","intent","renderingIntent","render","renderInteractiveForms","imageLayer","canvasFactory","background","includeAnnotationStorage","optionalContentConfigPromise","intentState","clearTimeout","canvasFactoryInstance","annotationStorage","fnArray","argsArray","lastChunk","pageIndex","internalRenderTask","canvasContext","viewport","objs","commonObjs","operatorList","useRequestAnimationFrame","renderTask","transparency","optionalContentConfig","getOperatorList","opListTask","streamTextContent","normalizeWhitespace","disableCombineTextItems","includeMarkedContent","TEXT_CONTENT_CHUNK_SIZE","combineTextItems","textContent","getTextContent","readableStream","pump","items","styles","getStructTree","_destroy","waitOn","force","resetStats","_tryCleanup","renderTasks","_startRenderPage","_renderPageChunk","operatorListChunk","_pumpOperatorList","_abortOperatorList","curIntentState","cloned","transfers","cloneValue","desc","pdfWorkerPorts","isWorkerDisabled","nextFakeWorkerId","fallbackWorkerSrc","pdfjsFilePath","mainWorkerMessageHandler","fakeWorkerCapability","loader","getMainThreadWorkerMessageHandler","eval","getWorkerSrc","loadScript","_initializeFromPort","_initialize","workerSrc","isSameOrigin","createCDNWrapper","terminateEarly","onWorkerError","sendTest","testObj","_setupFakeWorker","setupFakeWorkerGlobal","WorkerMessageHandler","workerHandler","loadingTask","onUnsupportedFeature","styleElement","page","terminated","setupMessageHandler","evt","loaded","total","sink","readyReason","headersCapability","fullReader","isStreamingSupported","isRangeSupported","contentLength","rangeReader","pdfInfo","ex","msg","exception","updatePassword","exportedError","exportedData","fontRegistry","registerFont","pageProxy","MAX_IMAGE_SIZE_TO_STORE","imageData","_onUnsupportedFeature","pageNumber","pageInfo","ref","isPureXfa","numPages","filename","getDocJSActions","getPageJSActions","results","cleanupSuccessful","_ensureObj","resolved","InternalRenderTask","canvasInRendering","initializeGraphics","operatorListChanged","_continue","_scheduleNext","build","addNativeFontFace","insertRule","styleSheet","nativeFontFace","featureId","rule","_queueLoadingCallback","hasFonts","_prepareFontLoadEvent","FontLoader","requests","nextRequestId","supported","navigator","otherRequest","getLoadTestFont","atob","offset","s","ctx","isFontReady","loadTestFontId","COMMENT_OFFSET","spliceString","CFF_CHECKSUM_OFFSET","XXXX_VALUE","checksum","int32","string32","btoa","div","span","translatedData","createNativeFontFace","css","weight","createFontFaceRule","bytesToString","getPathGenerator","cmds","jsBuf","current","NodeCanvasFactory","NodeCMapReaderFactory","NodeStandardFontDataFactory","fs","__non_webpack_require__","Canvas","getValue","setValue","modified","getAll","objectFromMap","_setModified","resetModified","MIN_FONT_SIZE","MAX_FONT_SIZE","MAX_GROUP_SIZE","COMPILE_TYPE3_GLYPHS","MAX_SIZE_TO_COMPILE","FULL_CHUNK_HEIGHT","LINEWIDTH_SCALE_FACTOR","ad_bc","bc_ad","old","prev","cosValue","sinValue","getCanvas","canvasEntry","addContextCurrentTransform","POINT_TO_PROCESS_LIMIT","POINT_TYPES","imgData","width1","points","lineSize","data0","elem","mask","count","j","j0","sum","steps","outlines","coords","p0","pp","drawOutline","kk","o","l","ll","setCurrentPoint","CanvasGraphics","EXECUTION_TIME","EXECUTION_STEPS","transferMaps","partialChunkHeight","fullChunks","totalChunks","chunkImgData","srcPos","transferMapRed","transferMapGreen","transferMapBlue","transferMapGray","srcLength","dest32","dest32DataLength","fullSrcDiff","white","black","thisChunkHeight","destPos","srcDiff","kEnd","kEndUnrolled","srcByte","hasTransferMaps","elemsInThisChunk","properties","property","sourceCtx","destCtx","alpha","alpha_","r0","g0","b0","maskData","transferMap","layerData","hasBackdrop","backdrop","subtype","composeFn","PIXELS_TO_PROCESS","row","chunkHeight","maskCtx","layerCtx","composeSMaskBackdrop","genericComposeSMask","LINE_CAP_STYLES","LINE_JOIN_STYLES","NORMAL_CLIP","EO_CLIP","beginDrawing","transparentCanvas","resetCtxToDefault","executeOperatorList","executionStartIdx","argsArrayLen","chunkOperations","endTime","stepper","fnId","objsPool","depObjId","continueCallback","endDrawing","_scaleImage","img","widthScale","inverseTransform","heightScale","paintWidth","paintHeight","tmpCanvasId","newWidth","newHeight","tmpCanvas","tmpCtx","_createMaskCanvas","fillColor","isPatternFill","maskCanvas","putBinaryImageMask","objToCanvas","maskToCanvas","cord1","cord2","drawnWidth","drawnHeight","fillCanvas","fillCtx","scaled","inverse","states","beginSMaskGroup","activeSMask","cacheId","scratchCanvas","currentCtx","currentTransform","groupCtx","copyCtxState","suspendSMaskGroup","composeSMask","deltaTransform","resumeSMaskGroup","endSMaskGroup","ops","xw","yh","consumePath","strokeColor","lineWidth","needRestore","paths","fontObj","bold","italic","typeface","browserFontSize","paintChar","textRenderingMode","fontSize","fillStrokeMode","isAddToPathSet","patternFill","addToPath","fontSizeScale","charSpacing","wordSpacing","fontDirection","textHScale","glyphsLength","glyphs","vertical","spacingDir","defaultVMetrics","widthAdvanceScale","simpleFillText","pattern","patternTransform","resetLineWidthToOne","glyph","isNum","restoreNeeded","spacing","character","accent","scaledX","scaledY","vmetric","vx","vy","measuredWidth","characterScaleX","scaledAccentX","scaledAccentY","charWidth","showType3Text","fontMatrix","isTextInvisible","spacingLength","transformed","urx","ury","getColorN_Pattern","IR","color","baseTransform","canvasGraphicsFactory","createCanvasGraphics","_getPattern","getShadingPattern","inv","bl","br","ul","ur","x0","y0","x1","y1","matrix","bbox","group","bounds","canvasBounds","scaleX","scaleY","startTransformInverse","skewX","skewY","positions","trans","images","image","objId","h","imgToPaint","putBinaryImageData","left","top","visible","getSinglePixelWidth","absDet","sqNorm1","sqNorm2","pixelHeight","getCanvasPosition","isContentVisible","region","getPattern","_createGradient","grad","colorStop","owner","applyBoundingBox","domMatrix","colors","rowSize","tmp","c1","c2","c3","x3","y3","c1r","c1g","c1b","c2r","c2g","c2b","c3r","c3g","c3b","minY","maxY","xa","car","cag","cab","xb","cbr","cbg","cbb","x1_","x2_","ps","figure","cs","verticesPerRow","rows","cols","q","drawTriangle","_createMeshCanvas","EXPECTED_SCALE","MAX_PATTERN_SIZE","BORDER_SIZE","boundsWidth","boundsHeight","combinedScale","paddedWidth","paddedHeight","cachedCanvases","backgroundColor","drawFigure","matrixScale","temporaryPatternCanvas","PaintType","COLORED","UNCOLORED","createPatternCanvas","xstep","ystep","paintType","tilingType","curMatrixScale","dimx","dimy","graphics","adjustedX0","adjustedY0","adjustedX1","adjustedY1","getSizeAndScale","maxSize","TilingPattern","clipBbox","bboxWidth","bboxHeight","setFillAndStrokeStyleToContext","cssColor","CallbackKind","DATA","ERROR","StreamKind","CANCEL","CANCEL_COMPLETE","CLOSE","ENQUEUE","PULL","PULL_COMPLETE","START_COMPLETE","callbackId","wrapReason","cbSourceName","cbTargetName","comObj","sourceName","targetName","on","ah","send","sendWithPromise","sendWithStream","streamId","startCapability","startCall","pullCall","cancelCall","isClosed","pullCapability","cancelCapability","_createStreamSink","streamSink","lastDesiredSize","sinkCapability","onPull","onCancel","isCancelled","success","_processStreamMessage","_postMessage","getRaw","_evaluateVisibilityExpression","array","operator","isVisible","setVisibility","getOrder","getGroups","getGroup","_onReceiveData","found","_onProgress","firstReader","_onProgressiveDone","_removeRangeReader","getFullReader","queuedChunks","getRangeReader","cancelAllRequests","isPdfFile","_enqueue","requestCapability","requestsCapability","parameters","fieldType","isRenderable","ignoreBorder","createQuadrilaterals","_createContainer","horizontalRadius","verticalRadius","radius","_createQuadrilaterals","quadrilaterals","savedRect","quadPoint","_createPopup","trigger","popupElement","title","modificationDate","contents","hideWrapper","popup","_renderQuadrilaterals","quadrilateral","addLinkAttributes","linkService","rel","linkElement","_bindLink","_bindNamedAction","_bindJSAction","jsName","detail","JSON","_getKeyModifier","_setEventListener","baseName","valueGetter","modifier","_setEventListeners","eventName","_dispatchEventFromSandbox","setColor","ColorConverters","commonActions","hidden","print","focus","preventScroll","userName","readonly","required","bgColor","fgColor","textColor","borderColor","jsEvent","setPropertyOnSiblings","storage","storedData","valueAsString","elementData","userValue","formattedValue","beforeInputSelectionRange","beforeInputValue","blurListener","selRange","selStart","selEnd","commitKey","willCommit","_blurListener","change","fieldWidth","combWidth","_setTextStyle","TEXT_ALIGNMENT","fontColor","checkbox","radio","pdfButtonValue","checked","radioId","selectElement","optionElement","option","isExport","getItems","displayValue","exportValue","multipleSelection","remove","insert","indices","editable","changeEx","keyDown","IGNORE_TYPES","selector","parentElements","popupLeft","popupTop","BACKGROUND_ENLIGHT","g","dateObject","PDFDateString","_formatContents","lines","line","_toggle","_show","pin","_hide","unpin","borderWidth","square","circle","coordinate","polyline","getFilenameFromUrl","stringToPDFString","_download","sortedAnnotations","popupAnnotations","layer","downloadManager","imageResourcesPath","svgFactory","enableScripting","mouseState","isDown","rendered","G","makeColorComp","R","B","MAX_TEXT_DIVS_TO_RENDER","DEFAULT_FONT_SIZE","DEFAULT_FONT_ASCENT","ascentCache","AllWhitespaceRegexp","cachedAscent","metrics","ascent","descent","ratio","pixels","textDiv","textDivProperties","canvasWidth","hasText","geom","hasEOL","originalTransform","paddingBottom","paddingLeft","paddingRight","paddingTop","tx","fontHeight","fontAscent","getAscent","shouldScaleText","absScaleX","absScaleY","angleCos","angleSin","divWidth","divHeight","right","bottom","textDivs","textDivsLength","ts","expanded","expandBounds","divProperties","jj","boxScale","findPositiveMin","box","x1New","x2New","expandBoundsLTR","boxes","fakeBoundary","horizon","boundary","horizonPart","affectedBoundary","maxXNew","xNew","changedHorizon","lastBoundary","useBoundary","used","textContentItemsStr","_processItems","appendText","_layoutText","fontFamily","_render","timeout","styleCache","textItems","textStyles","expandTextDivs","expandDivs","expand","transformBuf","paddingBuf","divProps","renderParameters","textContentStream","enhanceTextSelection","SVGGraphics","opTree","opListElement","pf","SVG_DEFAULTS","fontStyle","fontWeight","XML_NS","XLINK_NS","convertImgDataToPng","PNG_HEADER","CHUNK_WRAPPER_SIZE","crcTable","crc","body","crc32","deflateSyncUncompressed","output","level","literals","maxBlockLength","deflateBlocks","idat","pi","adler","adler32","colorType","bitDepth","offsetLiterals","offsetBytes","ihdr","deflateSync","pngLength","writePngChunk","createObjectURL","encode","clipCount","maskCount","shadingCount","loadDependencies","transformMatrix","getSVG","svgElement","convertOpList","operatorIdMapping","opList","opListToTree","executeOpTree","opTreeElement","lineWidthScale","textMatrix","pm","addFontStyle","details","setStrokeAlpha","setFillAlpha","_makeColorN_Pattern","_makeTilingPattern","tilingId","txstep","tystep","tiling","tx1","ty1","_makeShadingPattern","shadingId","colorStops","point0","point1","gradient","focalPoint","circlePoint","focalRadius","circleRadius","op","clipId","clipPath","clipElement","_setStrokeAttributes","dashArray","imgSrc","cliprect","imgEl","definitions","rootGroup","_ensureClipGroup","clipGroup","_ensureTransformGroup","attributes","root","rootHtml","stack","rootDiv","child","childHtml","http","https","fileUriRegex","parsedUrl","parseUrl","_error","_setReadableStream","auth","headers","handleResponse","getResponseHeader","isHttp","suggestedLength","extractFilenameFromHeader","createRequestOptions","returnValues","allowRangeRequests","contentEncoding","contentDisposition","getFilenameFromContentDispositionHeader","needsEncodingFixup","toParamRegExp","rfc2616unquote","rfc5987decode","rfc2047decode","fixupEncoding","rfc2231getparam","decoder","fatal","textdecode","parts","part","quotindex","encodingend","extvalue","encoding","langvalue","text","OK_RESPONSE","PARTIAL_CONTENT_RESPONSE","xhr","requestRange","listeners","requestFull","xhrId","pendingRequest","onProgress","onStateChange","xhrStatus","ok_response_on_range_request","getArrayBuffer","rangeHeader","getRequestXhr","isPendingRequest","_onRangeRequestReaderClosed","onHeadersReceived","onDone","onError","manager","_onHeadersReceived","fullRequestXhrId","fullRequestXhr","_onDone","_onError","createResponseStatusError","_close","abortController","credentials","redirect","createHeaders","createFetchOptions","validateResponseStatus","pdfjsVersion","pdfjsBuild","setPDFNetworkStreamFactory"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;;;;;;;;;;;;;;;;;;;;;;;;;;ACKA;;AASA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,mBA/BN,8BA+BA;;AACA,IAAMC,SAhCN,4BAgCA;;IAEA,gB;;;;;AACEC,8BAA0D;AAAA;;AAAA,mFAA1DA,EAA0D;AAAA,kCAA5CC,aAA4C;AAAA,QAA5CA,aAA4C,mCAA5BC,WAAlB,QAA8C;;AAAA;;AAAA;AAExD,sBAFwD,aAExD;AAFwD;AADX;;;;WAM/CC,sCAA6B;AAC3B,UAAMC,SAAS,6BADY,QACZ,CAAf;;AACAA,qBAF2B,KAE3BA;AACAA,sBAH2B,MAG3BA;AACA,aAJ2B,MAI3B;AAV6C;;;;EAAjD,+B;;;;SAcA,S;;;;;4EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA8BC,wBAA9B;;AAAA,iBAGIC,qBAAqBC,SAFvB,OAEED,CAHJ;AAAA;AAAA;AAAA;;AAAA;AAAA,mBAK2BE,MADvB,GACuBA,CAL3B;;AAAA;AAKUC,oBALV;;AAAA,gBAMSA,SAAL,EANJ;AAAA;AAAA;AAAA;;AAAA,kBAOY,UAAUA,SADA,UACV,CAPZ;;AAAA;AAAA,iBASWJ,YATX;AAAA;AAAA;AAAA;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACYA;;AAYA;;AASA;;AArCA;;AAAA;;AAAA;;AAAA;;AAAA;;AAAA;;AA8DA,IAAMy/C,eA9DN,UA8DA;AAGA,IAAMC,aAjEN,WAiEA;AAgB+C;AAC7C,yBAA0C;AACxC,mBAA0BvoE,oBADc,GACdA,CAA1B;AAAA,QAAM,aAAN,YAAM,aAAN;;AAEAwoE,yCAA2BzhC,kBAAU;AACnC,aAAO,kBAD4B,MAC5B,CAAP;AAJsC,KAGxCyhC;AAHF,SAMO;AACL,oBAA6BxoE,oBADxB,GACwBA,CAA7B;AAAA,QAAM,gBAAN,aAAM,gBAAN;;AACA,oBAA2BA,oBAFtB,GAEsBA,CAA3B;AAAA,QAAM,cAAN,aAAM,cAAN;;AAEAwoE,yCAA2BzhC,kBAAU;AACnC,UAAIvoD,oCAAgBuoD,OAApB,GAAIvoD,CAAJ,EAAiC;AAC/B,eAAO,mBADwB,MACxB,CAAP;AAFiC;;AAInC,aAAO,qBAJ4B,MAI5B,CAAP;AARG,KAILgqF;AAX2C;AAjF/C,C","file":"pdf.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"pdfjs-dist/build/pdf\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"pdfjs-dist/build/pdf\"] = factory();\n\telse\n\t\troot[\"pdfjs-dist/build/pdf\"] = factory();\n})(this, function() {\nreturn ","/* Copyright 2015 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\nimport {\n assert,\n BaseException,\n isString,\n removeNullCharacters,\n stringToBytes,\n Util,\n warn,\n} from \"../shared/util.js\";\nimport {\n BaseCanvasFactory,\n BaseCMapReaderFactory,\n BaseStandardFontDataFactory,\n BaseSVGFactory,\n} from \"./base_factory.js\";\n\nconst DEFAULT_LINK_REL = \"noopener noreferrer nofollow\";\nconst SVG_NS = \"http://www.w3.org/2000/svg\";\n\nclass DOMCanvasFactory extends BaseCanvasFactory {\n constructor({ ownerDocument = globalThis.document } = {}) {\n super();\n this._document = ownerDocument;\n }\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}\n\nasync function fetchData(url, asTypedArray = false) {\n if (\n (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"MOZCENTRAL\")) ||\n isValidFetchUrl(url, document.baseURI)\n ) {\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(response.statusText);\n }\n return asTypedArray\n ? new Uint8Array(await response.arrayBuffer())\n : stringToBytes(await response.text());\n }\n\n // The Fetch API is not supported.\n return new Promise((resolve, reject) => {\n const request = new XMLHttpRequest();\n request.open(\"GET\", url, /* asTypedArray = */ true);\n\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 = stringToBytes(request.responseText);\n }\n if (data) {\n resolve(data);\n return;\n }\n }\n reject(new Error(request.statusText));\n };\n\n request.send(null);\n });\n}\n\nclass DOMCMapReaderFactory extends BaseCMapReaderFactory {\n _fetchData(url, compressionType) {\n return fetchData(url, /* asTypedArray = */ this.isCompressed).then(data => {\n return { cMapData: data, compressionType };\n });\n }\n}\n\nclass DOMStandardFontDataFactory extends BaseStandardFontDataFactory {\n _fetchData(url) {\n return fetchData(url, /* asTypedArray = */ true);\n }\n}\n\nclass DOMSVGFactory extends BaseSVGFactory {\n _createSVG(type) {\n return document.createElementNS(SVG_NS, type);\n }\n}\n\n/**\n * @typedef {Object} PageViewportParameters\n * @property {Array} viewBox - The xMin, yMin, xMax and\n * yMax coordinates.\n * @property {number} scale - The scale of the viewport.\n * @property {number} rotation - The rotation, in degrees, of the viewport.\n * @property {number} [offsetX] - The horizontal, i.e. x-axis, offset. The\n * default value is `0`.\n * @property {number} [offsetY] - The vertical, i.e. y-axis, offset. The\n * default value is `0`.\n * @property {boolean} [dontFlip] - If true, the y-axis will not be flipped.\n * The default value is `false`.\n */\n\n/**\n * @typedef {Object} PageViewportCloneParameters\n * @property {number} [scale] - The scale, overriding the one in the cloned\n * viewport. The default value is `this.scale`.\n * @property {number} [rotation] - The rotation, in degrees, overriding the one\n * in the cloned viewport. The default value is `this.rotation`.\n * @property {number} [offsetX] - The horizontal, i.e. x-axis, offset.\n * The default value is `this.offsetX`.\n * @property {number} [offsetY] - The vertical, i.e. y-axis, offset.\n * The default value is `this.offsetY`.\n * @property {boolean} [dontFlip] - If true, the x-axis will not be flipped.\n * The default value is `false`.\n */\n\n/**\n * PDF page viewport created based on scale, rotation and offset.\n */\nclass PageViewport {\n /**\n * @param {PageViewportParameters}\n */\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\n // creating transform to convert pdf coordinate system to the normal\n // canvas like coordinates taking in account scale and rotation\n const centerX = (viewBox[2] + viewBox[0]) / 2;\n const centerY = (viewBox[3] + viewBox[1]) / 2;\n let rotateA, rotateB, rotateC, rotateD;\n // Normalize the rotation, by clamping it to the [0, 360) range.\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(\n \"PageViewport: Invalid rotation, must be a multiple of 90 degrees.\"\n );\n }\n\n if (dontFlip) {\n rotateC = -rotateC;\n rotateD = -rotateD;\n }\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 = Math.abs(viewBox[3] - viewBox[1]) * scale;\n height = Math.abs(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 = Math.abs(viewBox[2] - viewBox[0]) * scale;\n height = Math.abs(viewBox[3] - viewBox[1]) * scale;\n }\n // creating transform for the following operations:\n // translate(-centerX, -centerY), rotate and flip vertically,\n // scale, and translate(offsetCanvasX, offsetCanvasY)\n this.transform = [\n rotateA * scale,\n rotateB * scale,\n rotateC * scale,\n rotateD * scale,\n offsetCanvasX - rotateA * scale * centerX - rotateC * scale * centerY,\n offsetCanvasY - rotateB * scale * centerX - rotateD * scale * centerY,\n ];\n\n this.width = width;\n this.height = height;\n }\n\n /**\n * Clones viewport, with optional additional properties.\n * @param {PageViewportCloneParameters} [params]\n * @returns {PageViewport} Cloned viewport.\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\n /**\n * Converts PDF point to the viewport coordinates. For examples, useful for\n * converting PDF location into canvas pixel coordinates.\n * @param {number} x - The x-coordinate.\n * @param {number} y - The y-coordinate.\n * @returns {Object} Object containing `x` and `y` properties of the\n * point in the viewport coordinate space.\n * @see {@link convertToPdfPoint}\n * @see {@link convertToViewportRectangle}\n */\n convertToViewportPoint(x, y) {\n return Util.applyTransform([x, y], this.transform);\n }\n\n /**\n * Converts PDF rectangle to the viewport coordinates.\n * @param {Array} rect - The xMin, yMin, xMax and yMax coordinates.\n * @returns {Array} Array containing corresponding coordinates of the\n * rectangle in the viewport coordinate space.\n * @see {@link convertToViewportPoint}\n */\n convertToViewportRectangle(rect) {\n const topLeft = Util.applyTransform([rect[0], rect[1]], this.transform);\n const bottomRight = Util.applyTransform([rect[2], rect[3]], this.transform);\n return [topLeft[0], topLeft[1], bottomRight[0], bottomRight[1]];\n }\n\n /**\n * Converts viewport coordinates to the PDF location. For examples, useful\n * for converting canvas pixel location into PDF one.\n * @param {number} x - The x-coordinate.\n * @param {number} y - The y-coordinate.\n * @returns {Object} Object containing `x` and `y` properties of the\n * point in the PDF coordinate space.\n * @see {@link convertToViewportPoint}\n */\n convertToPdfPoint(x, y) {\n return Util.applyInverseTransform([x, y], this.transform);\n }\n}\n\nclass RenderingCancelledException extends BaseException {\n constructor(msg, type) {\n super(msg);\n this.type = type;\n }\n}\n\nconst LinkTarget = {\n NONE: 0, // Default value.\n SELF: 1,\n BLANK: 2,\n PARENT: 3,\n TOP: 4,\n};\n\n/**\n * @typedef ExternalLinkParameters\n * @typedef {Object} ExternalLinkParameters\n * @property {string} url - An absolute URL.\n * @property {LinkTarget} [target] - The link target. The default value is\n * `LinkTarget.NONE`.\n * @property {string} [rel] - The link relationship. The default value is\n * `DEFAULT_LINK_REL`.\n * @property {boolean} [enabled] - Whether the link should be enabled. The\n * default value is true.\n */\n\n/**\n * Adds various attributes (href, title, target, rel) to hyperlinks.\n * @param {HTMLLinkElement} link - The link element.\n * @param {ExternalLinkParameters} params\n */\nfunction addLinkAttributes(link, { url, target, rel, enabled = true } = {}) {\n assert(\n url && typeof url === \"string\",\n 'addLinkAttributes: A valid \"url\" parameter must provided.'\n );\n\n const urlNullRemoved = removeNullCharacters(url);\n if (enabled) {\n link.href = link.title = urlNullRemoved;\n } else {\n link.href = \"\";\n link.title = `Disabled: ${urlNullRemoved}`;\n link.onclick = () => {\n return false;\n };\n }\n\n let targetStr = \"\"; // LinkTarget.NONE\n switch (target) {\n case LinkTarget.NONE:\n break;\n case LinkTarget.SELF:\n targetStr = \"_self\";\n break;\n case LinkTarget.BLANK:\n targetStr = \"_blank\";\n break;\n case LinkTarget.PARENT:\n targetStr = \"_parent\";\n break;\n case LinkTarget.TOP:\n targetStr = \"_top\";\n break;\n }\n link.target = targetStr;\n\n link.rel = typeof rel === \"string\" ? rel : DEFAULT_LINK_REL;\n}\n\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}\n\nfunction isPdfFile(filename) {\n return typeof filename === \"string\" && /\\.pdf$/i.test(filename);\n}\n\n/**\n * Gets the filename from a given URL.\n * @param {string} url\n * @returns {string}\n */\nfunction getFilenameFromUrl(url) {\n const anchor = url.indexOf(\"#\");\n const query = url.indexOf(\"?\");\n const end = Math.min(\n anchor > 0 ? anchor : url.length,\n query > 0 ? query : url.length\n );\n return url.substring(url.lastIndexOf(\"/\", end) + 1, end);\n}\n\n/**\n * Returns the filename or guessed filename from the url (see issue 3455).\n * @param {string} url - The original PDF location.\n * @param {string} defaultFilename - The value returned if the filename is\n * unknown, or the protocol is unsupported.\n * @returns {string} Guessed PDF filename.\n */\nfunction getPdfFilenameFromUrl(url, defaultFilename = \"document.pdf\") {\n if (typeof url !== \"string\") {\n return defaultFilename;\n }\n if (isDataScheme(url)) {\n warn('getPdfFilenameFromUrl: ignore \"data:\"-URL for performance reasons.');\n return defaultFilename;\n }\n const reURI = /^(?:(?:[^:]+:)?\\/\\/[^/]+)?([^?#]*)(\\?[^#]*)?(#.*)?$/;\n // SCHEME HOST 1.PATH 2.QUERY 3.REF\n // Pattern to get last matching NAME.pdf\n const reFilename = /[^/?#=]+\\.pdf\\b(?!.*\\.pdf\\b)/i;\n const splitURI = reURI.exec(url);\n let suggestedFilename =\n reFilename.exec(splitURI[1]) ||\n reFilename.exec(splitURI[2]) ||\n reFilename.exec(splitURI[3]);\n if (suggestedFilename) {\n suggestedFilename = suggestedFilename[0];\n if (suggestedFilename.includes(\"%\")) {\n // URL-encoded %2Fpath%2Fto%2Ffile.pdf should be file.pdf\n try {\n suggestedFilename = reFilename.exec(\n decodeURIComponent(suggestedFilename)\n )[0];\n } catch (ex) {\n // Possible (extremely rare) errors:\n // URIError \"Malformed URI\", e.g. for \"%AA.pdf\"\n // TypeError \"null has no properties\", e.g. for \"%2F.pdf\"\n }\n }\n }\n return suggestedFilename || defaultFilename;\n}\n\nclass StatTimer {\n constructor() {\n this.started = Object.create(null);\n this.times = [];\n }\n\n time(name) {\n if (name in this.started) {\n warn(`Timer is already running for ${name}`);\n }\n this.started[name] = Date.now();\n }\n\n timeEnd(name) {\n if (!(name in this.started)) {\n 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 // Remove timer from started so it can be called again.\n delete this.started[name];\n }\n\n toString() {\n // Find the longest name for padding purposes.\n const outBuf = [];\n let longest = 0;\n for (const time of this.times) {\n const name = time.name;\n if (name.length > longest) {\n longest = name.length;\n }\n }\n for (const time of this.times) {\n const duration = time.end - time.start;\n outBuf.push(`${time.name.padEnd(longest)} ${duration}ms\\n`);\n }\n return outBuf.join(\"\");\n }\n}\n\nfunction isValidFetchUrl(url, baseUrl) {\n try {\n const { protocol } = baseUrl ? new URL(url, baseUrl) : new URL(url);\n // The Fetch API only supports the http/https protocols, and not file/ftp.\n return protocol === \"http:\" || protocol === \"https:\";\n } catch (ex) {\n return false; // `new URL()` will throw on incorrect data.\n }\n}\n\n/**\n * @param {string} src\n * @param {boolean} [removeScriptElement]\n * @returns {Promise}\n */\nfunction loadScript(src, removeScriptElement = false) {\n return new Promise((resolve, reject) => {\n const script = document.createElement(\"script\");\n script.src = src;\n\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).appendChild(script);\n });\n}\n\n// Deprecated API function -- display regardless of the `verbosity` setting.\nfunction deprecated(details) {\n console.log(\"Deprecated API usage: \" + details);\n}\n\nlet pdfDateStringRegex;\n\nclass PDFDateString {\n /**\n * Convert a PDF date string to a JavaScript `Date` object.\n *\n * The PDF date string format is described in section 7.9.4 of the official\n * PDF 32000-1:2008 specification. However, in the PDF 1.7 reference (sixth\n * edition) Adobe describes the same format including a trailing apostrophe.\n * This syntax in incorrect, but Adobe Acrobat creates PDF files that contain\n * them. We ignore all apostrophes as they are not necessary for date parsing.\n *\n * Moreover, Adobe Acrobat doesn't handle changing the date to universal time\n * and doesn't use the user's time zone (effectively ignoring the HH' and mm'\n * parts of the date string).\n *\n * @param {string} input\n * @returns {Date|null}\n */\n static toDateObject(input) {\n if (!input || !isString(input)) {\n return null;\n }\n\n // Lazily initialize the regular expression.\n if (!pdfDateStringRegex) {\n pdfDateStringRegex = new RegExp(\n \"^D:\" + // Prefix (required)\n \"(\\\\d{4})\" + // Year (required)\n \"(\\\\d{2})?\" + // Month (optional)\n \"(\\\\d{2})?\" + // Day (optional)\n \"(\\\\d{2})?\" + // Hour (optional)\n \"(\\\\d{2})?\" + // Minute (optional)\n \"(\\\\d{2})?\" + // Second (optional)\n \"([Z|+|-])?\" + // Universal time relation (optional)\n \"(\\\\d{2})?\" + // Offset hour (optional)\n \"'?\" + // Splitting apostrophe (optional)\n \"(\\\\d{2})?\" + // Offset minute (optional)\n \"'?\" // Trailing apostrophe (optional)\n );\n }\n\n // Optional fields that don't satisfy the requirements from the regular\n // expression (such as incorrect digit counts or numbers that are out of\n // range) will fall back the defaults from the specification.\n const matches = pdfDateStringRegex.exec(input);\n if (!matches) {\n return null;\n }\n\n // JavaScript's `Date` object expects the month to be between 0 and 11\n // instead of 1 and 12, so we have to correct for that.\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\n // Universal time relation 'Z' means that the local time is equal to the\n // universal time, whereas the relations '+'/'-' indicate that the local\n // time is later respectively earlier than the universal time. Every date\n // is normalized to universal time.\n if (universalTimeRelation === \"-\") {\n hour += offsetHour;\n minute += offsetMinute;\n } else if (universalTimeRelation === \"+\") {\n hour -= offsetHour;\n minute -= offsetMinute;\n }\n\n return new Date(Date.UTC(year, month, day, hour, minute, second));\n }\n}\n\n/**\n * NOTE: This is (mostly) intended to support printing of XFA forms.\n */\nfunction getXfaPageViewport(xfaPage, { scale = 1, rotation = 0 }) {\n const { width, height } = xfaPage.attributes.style;\n const viewBox = [0, 0, parseInt(width), parseInt(height)];\n\n return new PageViewport({\n viewBox,\n scale,\n rotation,\n });\n}\n\nexport {\n addLinkAttributes,\n DEFAULT_LINK_REL,\n deprecated,\n DOMCanvasFactory,\n DOMCMapReaderFactory,\n DOMStandardFontDataFactory,\n DOMSVGFactory,\n getFilenameFromUrl,\n getPdfFilenameFromUrl,\n getXfaPageViewport,\n isDataScheme,\n isPdfFile,\n isValidFetchUrl,\n LinkTarget,\n loadScript,\n PageViewport,\n PDFDateString,\n RenderingCancelledException,\n StatTimer,\n};\n","module.exports = require(\"regenerator-runtime\");\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","/* Copyright 2012 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\nimport \"./compatibility.js\";\n\nconst IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0];\nconst FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0];\n\n// Permission flags from Table 22, Section 7.6.3.2 of the PDF specification.\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};\n\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};\n\nconst ImageKind = {\n GRAYSCALE_1BPP: 1,\n RGB_24BPP: 2,\n RGBA_32BPP: 3,\n};\n\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};\n\nconst AnnotationStateModelType = {\n MARKED: \"Marked\",\n REVIEW: \"Review\",\n};\n\nconst AnnotationMarkedState = {\n MARKED: \"Marked\",\n UNMARKED: \"Unmarked\",\n};\n\nconst AnnotationReviewState = {\n ACCEPTED: \"Accepted\",\n REJECTED: \"Rejected\",\n CANCELLED: \"Cancelled\",\n COMPLETED: \"Completed\",\n NONE: \"None\",\n};\n\nconst AnnotationReplyType = {\n GROUP: \"Group\",\n REPLY: \"R\",\n};\n\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};\n\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};\n\nconst AnnotationBorderStyleType = {\n SOLID: 1,\n DASHED: 2,\n BEVELED: 3,\n INSET: 4,\n UNDERLINE: 5,\n};\n\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};\n\nconst DocumentActionEventType = {\n WC: \"WillClose\",\n WS: \"WillSave\",\n DS: \"DidSave\",\n WP: \"WillPrint\",\n DP: \"DidPrint\",\n};\n\nconst PageActionEventType = {\n O: \"PageOpen\",\n C: \"PageClose\",\n};\n\nconst StreamType = {\n UNKNOWN: \"UNKNOWN\",\n FLATE: \"FLATE\",\n LZW: \"LZW\",\n DCT: \"DCT\",\n JPX: \"JPX\",\n JBIG: \"JBIG\",\n A85: \"A85\",\n AHX: \"AHX\",\n CCF: \"CCF\",\n RLX: \"RLX\", // PDF short name is 'RL', but telemetry requires three chars.\n};\n\nconst FontType = {\n UNKNOWN: \"UNKNOWN\",\n TYPE1: \"TYPE1\",\n TYPE1STANDARD: \"TYPE1STANDARD\",\n TYPE1C: \"TYPE1C\",\n CIDFONTTYPE0: \"CIDFONTTYPE0\",\n CIDFONTTYPE0C: \"CIDFONTTYPE0C\",\n TRUETYPE: \"TRUETYPE\",\n CIDFONTTYPE2: \"CIDFONTTYPE2\",\n TYPE3: \"TYPE3\",\n OPENTYPE: \"OPENTYPE\",\n TYPE0: \"TYPE0\",\n MMTYPE1: \"MMTYPE1\",\n};\n\nconst VerbosityLevel = {\n ERRORS: 0,\n WARNINGS: 1,\n INFOS: 5,\n};\n\nconst CMapCompressionType = {\n NONE: 0,\n BINARY: 1,\n STREAM: 2,\n};\n\n// All the possible operations for an operator list.\nconst OPS = {\n // Intentionally start from 1 so it is easy to spot bad operators that will be\n // 0's.\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 beginAnnotations: 78,\n endAnnotations: 79,\n beginAnnotation: 80,\n endAnnotation: 81,\n paintJpegXObject: 82,\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};\n\nconst UNSUPPORTED_FEATURES = {\n /** @deprecated unused */\n unknown: \"unknown\",\n forms: \"forms\",\n javaScript: \"javaScript\",\n signatures: \"signatures\",\n smask: \"smask\",\n shadingPattern: \"shadingPattern\",\n /** @deprecated unused */\n font: \"font\",\n errorTilingPattern: \"errorTilingPattern\",\n errorExtGState: \"errorExtGState\",\n errorXObject: \"errorXObject\",\n errorFontLoadType3: \"errorFontLoadType3\",\n errorFontState: \"errorFontState\",\n errorFontMissing: \"errorFontMissing\",\n errorFontTranslate: \"errorFontTranslate\",\n errorColorSpace: \"errorColorSpace\",\n errorOperatorList: \"errorOperatorList\",\n errorFontToUnicode: \"errorFontToUnicode\",\n errorFontLoadNative: \"errorFontLoadNative\",\n errorFontBuildPath: \"errorFontBuildPath\",\n errorFontGetPath: \"errorFontGetPath\",\n errorMarkedContent: \"errorMarkedContent\",\n};\n\nconst PasswordResponses = {\n NEED_PASSWORD: 1,\n INCORRECT_PASSWORD: 2,\n};\n\nlet verbosity = VerbosityLevel.WARNINGS;\n\nfunction setVerbosityLevel(level) {\n if (Number.isInteger(level)) {\n verbosity = level;\n }\n}\n\nfunction getVerbosityLevel() {\n return verbosity;\n}\n\n// A notice for devs. These are good for things that are helpful to devs, such\n// as warning that Workers were disabled, which is important to devs but not\n// end users.\nfunction info(msg) {\n if (verbosity >= VerbosityLevel.INFOS) {\n console.log(`Info: ${msg}`);\n }\n}\n\n// Non-fatal warnings.\nfunction warn(msg) {\n if (verbosity >= VerbosityLevel.WARNINGS) {\n console.log(`Warning: ${msg}`);\n }\n}\n\nfunction unreachable(msg) {\n throw new Error(msg);\n}\n\nfunction assert(cond, msg) {\n if (!cond) {\n unreachable(msg);\n }\n}\n\n// Checks if URLs have the same origin. For non-HTTP based URLs, returns false.\nfunction isSameOrigin(baseUrl, otherUrl) {\n let base;\n try {\n base = new URL(baseUrl);\n if (!base.origin || base.origin === \"null\") {\n return false; // non-HTTP url\n }\n } catch (e) {\n return false;\n }\n\n const other = new URL(otherUrl, base);\n return base.origin === other.origin;\n}\n\n// Checks if URLs use one of the allowed protocols, e.g. to avoid XSS.\nfunction _isValidProtocol(url) {\n if (!url) {\n return false;\n }\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}\n\n/**\n * Attempts to create a valid absolute URL.\n *\n * @param {URL|string} url - An absolute, or relative, URL.\n * @param {URL|string} baseUrl - An absolute URL.\n * @returns Either a valid {URL}, or `null` otherwise.\n */\nfunction createValidAbsoluteUrl(url, baseUrl) {\n if (!url) {\n return null;\n }\n try {\n const absoluteUrl = baseUrl ? new URL(url, baseUrl) : new URL(url);\n if (_isValidProtocol(absoluteUrl)) {\n return absoluteUrl;\n }\n } catch (ex) {\n /* `new URL()` will throw on incorrect data. */\n }\n return null;\n}\n\nfunction shadow(obj, prop, value) {\n Object.defineProperty(obj, prop, {\n value,\n enumerable: true,\n configurable: true,\n writable: false,\n });\n return value;\n}\n\n/**\n * @type {any}\n */\nconst BaseException = (function BaseExceptionClosure() {\n // eslint-disable-next-line no-shadow\n function BaseException(message) {\n if (this.constructor === BaseException) {\n unreachable(\"Cannot initialize BaseException.\");\n }\n this.message = message;\n this.name = this.constructor.name;\n }\n BaseException.prototype = new Error();\n BaseException.constructor = BaseException;\n\n return BaseException;\n})();\n\nclass PasswordException extends BaseException {\n constructor(msg, code) {\n super(msg);\n this.code = code;\n }\n}\n\nclass UnknownErrorException extends BaseException {\n constructor(msg, details) {\n super(msg);\n this.details = details;\n }\n}\n\nclass InvalidPDFException extends BaseException {}\n\nclass MissingPDFException extends BaseException {}\n\nclass UnexpectedResponseException extends BaseException {\n constructor(msg, status) {\n super(msg);\n this.status = status;\n }\n}\n\n/**\n * Error caused during parsing PDF data.\n */\nclass FormatError extends BaseException {}\n\n/**\n * Error used to indicate task cancellation.\n */\nclass AbortException extends BaseException {}\n\nconst NullCharactersRegExp = /\\x00/g;\n\n/**\n * @param {string} str\n */\nfunction removeNullCharacters(str) {\n if (typeof str !== \"string\") {\n warn(\"The argument for removeNullCharacters must be a string.\");\n return str;\n }\n return str.replace(NullCharactersRegExp, \"\");\n}\n\nfunction bytesToString(bytes) {\n assert(\n bytes !== null && typeof bytes === \"object\" && bytes.length !== undefined,\n \"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}\n\nfunction stringToBytes(str) {\n assert(typeof str === \"string\", \"Invalid argument for stringToBytes\");\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}\n\n/**\n * Gets length of the array (Array, Uint8Array, or string) in bytes.\n * @param {Array|Uint8Array|string} arr\n * @returns {number}\n */\nfunction arrayByteLength(arr) {\n if (arr.length !== undefined) {\n return arr.length;\n }\n assert(arr.byteLength !== undefined, \"arrayByteLength - invalid argument.\");\n return arr.byteLength;\n}\n\n/**\n * Combines array items (arrays) into single Uint8Array object.\n * @param {Array|Uint8Array|string>} arr - the array of the arrays\n * (Array, Uint8Array, or string).\n * @returns {Uint8Array}\n */\nfunction arraysToBytes(arr) {\n const length = arr.length;\n // Shortcut: if first and only item is Uint8Array, return it.\n if (length === 1 && arr[0] instanceof Uint8Array) {\n return arr[0];\n }\n let resultLength = 0;\n for (let i = 0; i < length; i++) {\n resultLength += arrayByteLength(arr[i]);\n }\n let pos = 0;\n const data = new Uint8Array(resultLength);\n for (let i = 0; i < length; i++) {\n let item = arr[i];\n if (!(item instanceof Uint8Array)) {\n if (typeof item === \"string\") {\n item = stringToBytes(item);\n } else {\n item = new Uint8Array(item);\n }\n }\n const itemLength = item.byteLength;\n data.set(item, pos);\n pos += itemLength;\n }\n return data;\n}\n\nfunction string32(value) {\n if (\n typeof PDFJSDev === \"undefined\" ||\n PDFJSDev.test(\"!PRODUCTION || TESTING\")\n ) {\n assert(\n typeof value === \"number\" && Math.abs(value) < 2 ** 32,\n `string32: Unexpected input \"${value}\".`\n );\n }\n return String.fromCharCode(\n (value >> 24) & 0xff,\n (value >> 16) & 0xff,\n (value >> 8) & 0xff,\n value & 0xff\n );\n}\n\nfunction objectSize(obj) {\n return Object.keys(obj).length;\n}\n\n// Ensure that the returned Object has a `null` prototype; hence why\n// `Object.fromEntries(...)` is not used.\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}\n\n// Checks the endianness of the platform.\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}\nconst IsLittleEndianCached = {\n get value() {\n return shadow(this, \"value\", isLittleEndian());\n },\n};\n\n// Checks if it's possible to eval JS expressions.\nfunction isEvalSupported() {\n try {\n new Function(\"\"); // eslint-disable-line no-new, no-new-func\n return true;\n } catch (e) {\n return false;\n }\n}\nconst IsEvalSupportedCached = {\n get value() {\n return shadow(this, \"value\", isEvalSupported());\n },\n};\n\nconst hexNumbers = [...Array(256).keys()].map(n =>\n n.toString(16).padStart(2, \"0\")\n);\n\nclass Util {\n static makeHexColor(r, g, b) {\n return `#${hexNumbers[r]}${hexNumbers[g]}${hexNumbers[b]}`;\n }\n\n // Concatenates two transformation matrices together and returns the result.\n static transform(m1, m2) {\n return [\n m1[0] * m2[0] + m1[2] * m2[1],\n m1[1] * m2[0] + m1[3] * m2[1],\n m1[0] * m2[2] + m1[2] * m2[3],\n m1[1] * m2[2] + m1[3] * m2[3],\n m1[0] * m2[4] + m1[2] * m2[5] + m1[4],\n m1[1] * m2[4] + m1[3] * m2[5] + m1[5],\n ];\n }\n\n // For 2d affine transforms\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\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\n // Applies the transform to the rectangle and finds the minimum axially\n // aligned bounding box.\n static getAxialAlignedBoundingBox(r, m) {\n const p1 = Util.applyTransform(r, m);\n const p2 = Util.applyTransform(r.slice(2, 4), m);\n const p3 = Util.applyTransform([r[0], r[3]], m);\n const p4 = Util.applyTransform([r[2], r[1]], m);\n return [\n Math.min(p1[0], p2[0], p3[0], p4[0]),\n Math.min(p1[1], p2[1], p3[1], p4[1]),\n Math.max(p1[0], p2[0], p3[0], p4[0]),\n Math.max(p1[1], p2[1], p3[1], p4[1]),\n ];\n }\n\n static inverseTransform(m) {\n const d = m[0] * m[3] - m[1] * m[2];\n return [\n m[3] / d,\n -m[1] / d,\n -m[2] / d,\n m[0] / d,\n (m[2] * m[5] - m[4] * m[3]) / d,\n (m[4] * m[1] - m[5] * m[0]) / d,\n ];\n }\n\n // Apply a generic 3d matrix M on a 3-vector v:\n // | a b c | | X |\n // | d e f | x | Y |\n // | g h i | | Z |\n // M is assumed to be serialized as [a,b,c,d,e,f,g,h,i],\n // with v as [X,Y,Z]\n static apply3dTransform(m, v) {\n return [\n m[0] * v[0] + m[1] * v[1] + m[2] * v[2],\n m[3] * v[0] + m[4] * v[1] + m[5] * v[2],\n m[6] * v[0] + m[7] * v[1] + m[8] * v[2],\n ];\n }\n\n // This calculation uses Singular Value Decomposition.\n // The SVD can be represented with formula A = USV. We are interested in the\n // matrix S here because it represents the scale values.\n static singularValueDecompose2dScale(m) {\n const transpose = [m[0], m[2], m[1], m[3]];\n\n // Multiply matrix m with its transpose.\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\n // Solve the second degree polynomial to get roots.\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\n // Scale values are the square roots of the eigenvalues.\n return [Math.sqrt(sx), Math.sqrt(sy)];\n }\n\n // Normalize rectangle rect=[x1, y1, x2, y2] so that (x1,y1) < (x2,y2)\n // For coordinate systems whose origin lies in the bottom-left, this\n // means normalization to (BL,TR) ordering. For systems with origin in the\n // top-left, this means (TL,BR) ordering.\n static normalizeRect(rect) {\n const r = rect.slice(0); // clone rect\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\n // Returns a rectangle [x1, y1, x2, y2] corresponding to the\n // intersection of rect1 and rect2. If no intersection, returns 'false'\n // The rectangle coordinates of rect1, rect2 should be [x1, y1, x2, y2]\n static intersect(rect1, rect2) {\n function compare(a, b) {\n return a - b;\n }\n\n // Order points along the axes\n const orderedX = [rect1[0], rect1[2], rect2[0], rect2[2]].sort(compare);\n const orderedY = [rect1[1], rect1[3], rect2[1], rect2[3]].sort(compare);\n const result = [];\n\n rect1 = Util.normalizeRect(rect1);\n rect2 = Util.normalizeRect(rect2);\n\n // X: first and second points belong to different rectangles?\n if (\n (orderedX[0] === rect1[0] && orderedX[1] === rect2[0]) ||\n (orderedX[0] === rect2[0] && orderedX[1] === rect1[0])\n ) {\n // Intersection must be between second and third points\n result[0] = orderedX[1];\n result[2] = orderedX[2];\n } else {\n return null;\n }\n\n // Y: first and second points belong to different rectangles?\n if (\n (orderedY[0] === rect1[1] && orderedY[1] === rect2[1]) ||\n (orderedY[0] === rect2[1] && orderedY[1] === rect1[1])\n ) {\n // Intersection must be between second and third points\n result[1] = orderedY[1];\n result[3] = orderedY[2];\n } else {\n return null;\n }\n\n return result;\n }\n}\n\nconst PDFStringTranslateTable = [\n 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,\n 0x2c7, 0x2c6, 0x2d9, 0x2dd, 0x2db, 0x2da, 0x2dc, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n 0, 0, 0, 0, 0, 0, 0, 0, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014, 0x2013, 0x192,\n 0x2044, 0x2039, 0x203a, 0x2212, 0x2030, 0x201e, 0x201c, 0x201d, 0x2018,\n 0x2019, 0x201a, 0x2122, 0xfb01, 0xfb02, 0x141, 0x152, 0x160, 0x178, 0x17d,\n 0x131, 0x142, 0x153, 0x161, 0x17e, 0, 0x20ac,\n];\n\nfunction stringToPDFString(str) {\n const length = str.length,\n strBuf = [];\n if (str[0] === \"\\xFE\" && str[1] === \"\\xFF\") {\n // UTF16BE BOM\n for (let i = 2; i < length; i += 2) {\n strBuf.push(\n String.fromCharCode((str.charCodeAt(i) << 8) | str.charCodeAt(i + 1))\n );\n }\n } else if (str[0] === \"\\xFF\" && str[1] === \"\\xFE\") {\n // UTF16LE BOM\n for (let i = 2; i < length; i += 2) {\n strBuf.push(\n String.fromCharCode((str.charCodeAt(i + 1) << 8) | str.charCodeAt(i))\n );\n }\n } else {\n for (let i = 0; i < length; ++i) {\n const code = PDFStringTranslateTable[str.charCodeAt(i)];\n strBuf.push(code ? String.fromCharCode(code) : str.charAt(i));\n }\n }\n return strBuf.join(\"\");\n}\n\nfunction escapeString(str) {\n // replace \"(\", \")\", \"\\n\", \"\\r\" and \"\\\"\n // by \"\\(\", \"\\)\", \"\\\\n\", \"\\\\r\" and \"\\\\\"\n // in order to write it in a PDF file.\n return str.replace(/([()\\\\\\n\\r])/g, match => {\n if (match === \"\\n\") {\n return \"\\\\n\";\n } else if (match === \"\\r\") {\n return \"\\\\r\";\n }\n return `\\\\${match}`;\n });\n}\n\nfunction isAscii(str) {\n return /^[\\x00-\\x7F]*$/.test(str);\n}\n\nfunction stringToUTF16BEString(str) {\n const buf = [\"\\xFE\\xFF\"];\n for (let i = 0, ii = str.length; i < ii; i++) {\n const char = str.charCodeAt(i);\n buf.push(\n String.fromCharCode((char >> 8) & 0xff),\n String.fromCharCode(char & 0xff)\n );\n }\n return buf.join(\"\");\n}\n\nfunction stringToUTF8String(str) {\n return decodeURIComponent(escape(str));\n}\n\nfunction utf8StringToString(str) {\n return unescape(encodeURIComponent(str));\n}\n\nfunction isBool(v) {\n return typeof v === \"boolean\";\n}\n\nfunction isNum(v) {\n return typeof v === \"number\";\n}\n\nfunction isString(v) {\n return typeof v === \"string\";\n}\n\nfunction isArrayBuffer(v) {\n return typeof v === \"object\" && v !== null && v.byteLength !== undefined;\n}\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}\n\nfunction getModificationDate(date = new Date()) {\n const buffer = [\n date.getUTCFullYear().toString(),\n (date.getUTCMonth() + 1).toString().padStart(2, \"0\"),\n date.getUTCDate().toString().padStart(2, \"0\"),\n date.getUTCHours().toString().padStart(2, \"0\"),\n date.getUTCMinutes().toString().padStart(2, \"0\"),\n date.getUTCSeconds().toString().padStart(2, \"0\"),\n ];\n\n return buffer.join(\"\");\n}\n\n/**\n * Promise Capability object.\n *\n * @typedef {Object} PromiseCapability\n * @property {Promise} promise - A Promise object.\n * @property {boolean} settled - If the Promise has been fulfilled/rejected.\n * @property {function} resolve - Fulfills the Promise.\n * @property {function} reject - Rejects the Promise.\n */\n\n/**\n * Creates a promise capability object.\n * @alias createPromiseCapability\n *\n * @returns {PromiseCapability}\n */\nfunction createPromiseCapability() {\n const capability = Object.create(null);\n let isSettled = false;\n\n Object.defineProperty(capability, \"settled\", {\n get() {\n return isSettled;\n },\n });\n capability.promise = new Promise(function (resolve, reject) {\n capability.resolve = function (data) {\n isSettled = true;\n resolve(data);\n };\n capability.reject = function (reason) {\n isSettled = true;\n reject(reason);\n };\n });\n return capability;\n}\n\nfunction createObjectURL(data, contentType = \"\", forceDataSchema = false) {\n if (URL.createObjectURL && !forceDataSchema) {\n return URL.createObjectURL(new Blob([data], { type: contentType }));\n }\n // Blob/createObjectURL is not available, falling back to data schema.\n const digits =\n \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\n\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}\n\nexport {\n AbortException,\n AnnotationActionEventType,\n AnnotationBorderStyleType,\n AnnotationFieldFlag,\n AnnotationFlag,\n AnnotationMarkedState,\n AnnotationReplyType,\n AnnotationReviewState,\n AnnotationStateModelType,\n AnnotationType,\n arrayByteLength,\n arraysToBytes,\n assert,\n BaseException,\n bytesToString,\n CMapCompressionType,\n createObjectURL,\n createPromiseCapability,\n createValidAbsoluteUrl,\n DocumentActionEventType,\n escapeString,\n FONT_IDENTITY_MATRIX,\n FontType,\n FormatError,\n getModificationDate,\n getVerbosityLevel,\n IDENTITY_MATRIX,\n ImageKind,\n info,\n InvalidPDFException,\n isArrayBuffer,\n isArrayEqual,\n isAscii,\n isBool,\n IsEvalSupportedCached,\n IsLittleEndianCached,\n isNum,\n isSameOrigin,\n isString,\n MissingPDFException,\n objectFromMap,\n objectSize,\n OPS,\n PageActionEventType,\n PasswordException,\n PasswordResponses,\n PermissionFlag,\n removeNullCharacters,\n setVerbosityLevel,\n shadow,\n StreamType,\n string32,\n stringToBytes,\n stringToPDFString,\n stringToUTF16BEString,\n stringToUTF8String,\n TextRenderingMode,\n UnexpectedResponseException,\n UnknownErrorException,\n unreachable,\n UNSUPPORTED_FEATURES,\n utf8StringToString,\n Util,\n VerbosityLevel,\n warn,\n};\n","/* Copyright 2017 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\nimport { isNodeJS } from \"./is_node.js\";\n\n// Skip compatibility checks for modern builds and if we already ran the module.\nif (\n (typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"SKIP_BABEL\")) &&\n (typeof globalThis === \"undefined\" || !globalThis._pdfjsCompatibilityChecked)\n) {\n // Provides support for globalThis in legacy browsers.\n // Support: Firefox<65, Chrome<71, Safari<12.1\n if (typeof globalThis === \"undefined\" || globalThis.Math !== Math) {\n // eslint-disable-next-line no-global-assign\n globalThis = require(\"core-js/es/global-this\");\n }\n globalThis._pdfjsCompatibilityChecked = true;\n\n // Support: Node.js\n (function checkNodeBtoa() {\n if (globalThis.btoa || !isNodeJS) {\n return;\n }\n globalThis.btoa = function (chars) {\n // eslint-disable-next-line no-undef\n return Buffer.from(chars, \"binary\").toString(\"base64\");\n };\n })();\n\n // Support: Node.js\n (function checkNodeAtob() {\n if (globalThis.atob || !isNodeJS) {\n return;\n }\n globalThis.atob = function (input) {\n // eslint-disable-next-line no-undef\n return Buffer.from(input, \"base64\").toString(\"binary\");\n };\n })();\n\n // Support: Node.js\n (function checkDOMMatrix() {\n if (globalThis.DOMMatrix || !isNodeJS) {\n return;\n }\n globalThis.DOMMatrix = require(\"dommatrix/dist/dommatrix.js\");\n })();\n\n // Provides support for Object.fromEntries in legacy browsers.\n // Support: Firefox<63, Chrome<73, Safari<12.1, Node.js<12.0.0\n (function checkObjectFromEntries() {\n if (Object.fromEntries) {\n return;\n }\n require(\"core-js/es/object/from-entries.js\");\n })();\n\n // Provides support for *recent* additions to the Promise specification,\n // however basic Promise support is assumed to be available natively.\n // Support: Firefox<71, Chrome<76, Safari<13, Node.js<12.9.0\n (function checkPromise() {\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"IMAGE_DECODERS\")) {\n // The current image decoders are synchronous, hence `Promise` shouldn't\n // need to be polyfilled for the IMAGE_DECODERS build target.\n return;\n }\n if (globalThis.Promise.allSettled) {\n return;\n }\n globalThis.Promise = require(\"core-js/es/promise/index.js\");\n })();\n\n // Support: Node.js\n (function checkReadableStream() {\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"IMAGE_DECODERS\")) {\n // The current image decoders are synchronous, hence `ReadableStream`\n // shouldn't need to be polyfilled for the IMAGE_DECODERS build target.\n return;\n }\n let isReadableStreamSupported = false;\n\n if (typeof ReadableStream !== \"undefined\") {\n // MS Edge may say it has ReadableStream but they are not up to spec yet.\n try {\n // eslint-disable-next-line no-new\n new ReadableStream({\n start(controller) {\n controller.close();\n },\n });\n isReadableStreamSupported = true;\n } catch (e) {\n // The ReadableStream constructor cannot be used.\n }\n }\n if (isReadableStreamSupported) {\n return;\n }\n globalThis.ReadableStream =\n require(\"web-streams-polyfill/dist/ponyfill.js\").ReadableStream;\n })();\n}\n","/* Copyright 2018 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/* globals process */\n\n// NW.js / Electron is a browser context, but copies some Node.js objects; see\n// http://docs.nwjs.io/en/latest/For%20Users/Advanced/JavaScript%20Contexts%20in%20NW.js/#access-nodejs-and-nwjs-api-in-browser-context\n// https://www.electronjs.org/docs/api/process#processversionselectron-readonly\n// https://www.electronjs.org/docs/api/process#processtype-readonly\nconst isNodeJS =\n typeof process === \"object\" &&\n process + \"\" === \"[object process]\" &&\n !process.versions.nw &&\n !(process.versions.electron && process.type && process.type !== \"browser\");\n\nexport { isNodeJS };\n","require('../modules/es.global-this');\n\nmodule.exports = require('../internals/global');\n","var $ = require('../internals/export');\nvar global = require('../internals/global');\n\n// `globalThis` object\n// https://tc39.es/ecma262/#sec-globalthis\n$({ global: true }, {\n globalThis: global\n});\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line es/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || Function('return this')();\n","var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar has = require('../internals/has');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n","var fails = require('../internals/fails');\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","var isObject = require('../internals/is-object');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var toObject = require('../internals/to-object');\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty.call(toObject(it), key);\n};\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- requied for testing\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar anObject = require('../internals/an-object');\nvar toPrimitive = require('../internals/to-primitive');\n\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return $defineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n } return it;\n};\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n var state;\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) {\n createNonEnumerableProperty(value, 'name', key);\n }\n state = enforceInternalState(value);\n if (!state.source) {\n state.source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || inspectSource(this);\n});\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nmodule.exports = function (key, value) {\n try {\n createNonEnumerableProperty(global, key, value);\n } catch (error) {\n global[key] = value;\n } return value;\n};\n","var store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\nif (typeof store.inspectSource != 'function') {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar objectHas = require('../internals/has');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (objectHas(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","var global = require('../internals/global');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.15.2',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2021 Denis Pushkarev (zloirock.ru)'\n});\n","module.exports = false;\n","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","module.exports = {};\n","var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","var getBuiltIn = require('../internals/get-built-in');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n","var path = require('../internals/path');\nvar global = require('../internals/global');\n\nvar aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])\n : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};\n","var global = require('../internals/global');\n\nmodule.exports = global;\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var toInteger = require('../internals/to-integer');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.es/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n","var fails = require('../internals/fails');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : typeof detection == 'function' ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","/*!\n* DOMMatrix v0.0.6 (https://github.com/thednp/dommatrix)\n* Copyright 2021 © thednp\n* Licensed under MIT (https://github.com/thednp/DOMMatrix/blob/master/LICENSE)\n*/\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.CSSMatrix = factory());\n}(this, (function () { 'use strict';\n\n /**\n * DOMMatrix shim - CSSMatrix\n *\n * Creates and returns a new `DOMMatrix` compatible *Object*\n * with equivalent instance methods.\n *\n * https://developer.mozilla.org/en-US/docs/Web/API/DOMMatrix\n * https://github.com/thednp/DOMMatrix/\n *\n * @param {String} String valid CSS transform in `matrix()`/`matrix3d()` format\n * @param {Array} Array expected to be *Float64Array* or *Float32Array* in the column major order.\n * @param {[a,b,c,d,e,f]} Arguments representing the 6 elements of a 2d matrix\n * @param {[m11,m21,m31,m41..]} Arguments representing the 16 elements of a 3d matrix\n */\n\n var CSSMatrix = function CSSMatrix() {\n var args = [], len = arguments.length;\n while ( len-- ) args[ len ] = arguments[ len ];\n\n this.setIdentity();\n return args && args.length && this.setMatrixValue(args);\n };\n\n var prototypeAccessors = { isIdentity: { configurable: true },is2D: { configurable: true } };\n\n /**\n * A `Boolean` whose value is `true` if the matrix is the identity matrix. The identity\n * matrix is one in which every value is 0 except those on the main diagonal from top-left\n * to bottom-right corner (in other words, where the offsets in each direction are equal).\n *\n * @return {Boolean} `Boolean` the current property value\n */\n prototypeAccessors.isIdentity.get = function () {\n var m = this;\n return (m.m11 === 1 && m.m12 === 0 && m.m13 === 0 && m.m14 === 0\n && m.m21 === 0 && m.m22 === 1 && m.m23 === 0 && m.m24 === 0\n && m.m31 === 0 && m.m32 === 0 && m.m33 === 1 && m.m34 === 0\n && m.m41 === 0 && m.m42 === 0 && m.m43 === 0 && m.m44 === 1);\n };\n\n /**\n * Sets a new `Boolean` flag value for `this.isIdentity` matrix property.\n *\n * @param {Boolean} value sets a new `Boolean` flag for this property\n */\n prototypeAccessors.isIdentity.set = function (value) {\n this.isIdentity = value;\n };\n\n /**\n * A `Boolean` flag whose value is `true` if the matrix was initialized as a 2D matrix\n * and `false` if the matrix is 3D.\n *\n * @return {Boolean} `Boolean` the current property value\n */\n prototypeAccessors.is2D.get = function () {\n var m = this;\n return (m.m31 === 0 && m.m32 === 0 && m.m33 === 1 && m.m34 === 0 && m.m43 === 0 && m.m44 === 1);\n };\n\n /**\n * Sets a new `Boolean` flag value for `this.is2D` matrix property.\n *\n * @param {Boolean} value sets a new `Boolean` flag for this property\n */\n prototypeAccessors.is2D.set = function (value) {\n this.is2D = value;\n };\n\n Object.defineProperties( CSSMatrix.prototype, prototypeAccessors );\n\n // export proto for custom compile via Buble\n var CSSMatrixProto = CSSMatrix.prototype;\n\n // Transform Functions\n // https://www.w3.org/TR/css-transforms-1/#transform-functions\n\n /**\n * Creates a new `CSSMatrix` for the translation matrix and returns it.\n * This method is equivalent to the CSS `translate3d()` function.\n *\n * https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/translate3d\n *\n * @param {Number} x the `x-axis` position.\n * @param {Number} y the `y-axis` position.\n * @param {Number} z the `z-axis` position.\n */\n function Translate(x, y, z) {\n var m = new CSSMatrix();\n m.m41 = x;\n m.e = x;\n m.m42 = y;\n m.f = y;\n m.m43 = z;\n return m;\n }\n\n /**\n * Creates a new `CSSMatrix` for the rotation matrix and returns it.\n *\n * http://en.wikipedia.org/wiki/Rotation_matrix\n *\n * @param {Number} rx the `x-axis` rotation.\n * @param {Number} ry the `y-axis` rotation.\n * @param {Number} rz the `z-axis` rotation.\n */\n\n function Rotate(rx, ry, rz) {\n var m = new CSSMatrix();\n\n var radX = (rx * Math.PI) / 180;\n var radY = (ry * Math.PI) / 180;\n var radZ = (rz * Math.PI) / 180;\n\n // minus sin() because of right-handed system\n var cosx = Math.cos(radX);\n var sinx = -Math.sin(radX);\n var cosy = Math.cos(radY);\n var siny = -Math.sin(radY);\n var cosz = Math.cos(radZ);\n var sinz = -Math.sin(radZ);\n\n var cycz = cosy * cosz;\n var cysz = -cosy * sinz;\n\n m.m11 = cycz;\n m.a = cycz;\n\n m.m12 = cysz;\n m.b = cysz;\n\n m.m13 = siny;\n\n var sxsy = sinx * siny * cosz + cosx * sinz;\n m.m21 = sxsy;\n m.c = sxsy;\n\n var cxcz = cosx * cosz - sinx * siny * sinz;\n m.m22 = cxcz;\n m.d = cxcz;\n\n m.m23 = -sinx * cosy;\n\n m.m31 = sinx * sinz - cosx * siny * cosz;\n m.m32 = sinx * cosz + cosx * siny * sinz;\n m.m33 = cosx * cosy;\n\n return m;\n }\n\n /**\n * Creates a new `CSSMatrix` for the rotation matrix and returns it.\n * This method is equivalent to the CSS `rotate3d()` function.\n *\n * https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/rotate3d\n *\n * @param {Number} x the `x-axis` vector length.\n * @param {Number} y the `y-axis` vector length.\n * @param {Number} z the `z-axis` vector length.\n * @param {Number} angle the value in degrees of the rotation.\n */\n function RotateAxisAngle(x, y, z, angle) {\n var m = new CSSMatrix();\n var radA = (angle * Math.PI) / 360;\n var sinA = Math.sin(radA);\n var cosA = Math.cos(radA);\n var sinA2 = sinA * sinA;\n var length = Math.sqrt(x * x + y * y + z * z);\n var X = 0;\n var Y = 0;\n var Z = 1;\n\n // bad vector length, use something reasonable\n if (length !== 0) {\n X = x / length;\n Y = y / length;\n Z = z / length;\n }\n\n var x2 = X * X;\n var y2 = Y * Y;\n var z2 = Z * Z;\n\n var m11 = 1 - 2 * (y2 + z2) * sinA2;\n m.m11 = m11;\n m.a = m11;\n\n var m12 = 2 * (x * y * sinA2 + z * sinA * cosA);\n m.m12 = m12;\n m.b = m12;\n\n m.m13 = 2 * (x * z * sinA2 - y * sinA * cosA);\n\n var m21 = 2 * (y * x * sinA2 - z * sinA * cosA);\n m.m21 = m21;\n m.c = m21;\n\n var m22 = 1 - 2 * (z2 + x2) * sinA2;\n m.m22 = m22;\n m.d = m22;\n\n m.m23 = 2 * (y * z * sinA2 + x * sinA * cosA);\n m.m31 = 2 * (z * x * sinA2 + y * sinA * cosA);\n m.m32 = 2 * (z * y * sinA2 - x * sinA * cosA);\n m.m33 = 1 - 2 * (x2 + y2) * sinA2;\n\n m.m14 = 0;\n m.m24 = 0;\n m.m34 = 0;\n\n m.m41 = 0;\n m.e = 0;\n m.m42 = 0;\n m.f = 0;\n m.m43 = 0;\n\n m.m44 = 1;\n\n return m;\n }\n\n /**\n * Creates a new `CSSMatrix` for the scale matrix and returns it.\n * This method is equivalent to the CSS `scale3d()` function.\n *\n * https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/scale3d\n *\n * @param {Number} x the `x-axis` scale.\n * @param {Number} y the `y-axis` scale.\n * @param {Number} z the `z-axis` scale.\n */\n function Scale(x, y, z) {\n var m = new CSSMatrix();\n m.m11 = x;\n m.a = x;\n\n m.m22 = y;\n m.d = y;\n\n m.m33 = z;\n return m;\n }\n\n /**\n * Creates a new `CSSMatrix` for the shear of the `x-axis` rotation matrix and\n * returns it. This method is equivalent to the CSS `skewX()` function.\n *\n * https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/skewX\n *\n * @param {Number} angle the angle in degrees.\n */\n function SkewX(angle) {\n var radA = (angle * Math.PI) / 180;\n var m = new CSSMatrix();\n var t = Math.tan(radA);\n m.m21 = t;\n m.c = t;\n return m;\n }\n\n /**\n * Creates a new `CSSMatrix` for the shear of the `y-axis` rotation matrix and\n * returns it. This method is equivalent to the CSS `skewY()` function.\n *\n * https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/skewY\n *\n * @param {Number} angle the angle in degrees.\n */\n function SkewY(angle) {\n var radA = (angle * Math.PI) / 180;\n var m = new CSSMatrix();\n var t = Math.tan(radA);\n m.m12 = t;\n m.b = t;\n return m;\n }\n\n /**\n * Creates a new `CSSMatrix` resulted from the multiplication of two matrixes\n * and returns it. Both matrixes are not changed.\n *\n * @param {CSSMatrix} m1 the first matrix.\n * @param {CSSMatrix} m2 the second matrix.\n */\n function Multiply(m1, m2) {\n var m11 = m2.m11 * m1.m11 + m2.m12 * m1.m21 + m2.m13 * m1.m31 + m2.m14 * m1.m41;\n var m12 = m2.m11 * m1.m12 + m2.m12 * m1.m22 + m2.m13 * m1.m32 + m2.m14 * m1.m42;\n var m13 = m2.m11 * m1.m13 + m2.m12 * m1.m23 + m2.m13 * m1.m33 + m2.m14 * m1.m43;\n var m14 = m2.m11 * m1.m14 + m2.m12 * m1.m24 + m2.m13 * m1.m34 + m2.m14 * m1.m44;\n\n var m21 = m2.m21 * m1.m11 + m2.m22 * m1.m21 + m2.m23 * m1.m31 + m2.m24 * m1.m41;\n var m22 = m2.m21 * m1.m12 + m2.m22 * m1.m22 + m2.m23 * m1.m32 + m2.m24 * m1.m42;\n var m23 = m2.m21 * m1.m13 + m2.m22 * m1.m23 + m2.m23 * m1.m33 + m2.m24 * m1.m43;\n var m24 = m2.m21 * m1.m14 + m2.m22 * m1.m24 + m2.m23 * m1.m34 + m2.m24 * m1.m44;\n\n var m31 = m2.m31 * m1.m11 + m2.m32 * m1.m21 + m2.m33 * m1.m31 + m2.m34 * m1.m41;\n var m32 = m2.m31 * m1.m12 + m2.m32 * m1.m22 + m2.m33 * m1.m32 + m2.m34 * m1.m42;\n var m33 = m2.m31 * m1.m13 + m2.m32 * m1.m23 + m2.m33 * m1.m33 + m2.m34 * m1.m43;\n var m34 = m2.m31 * m1.m14 + m2.m32 * m1.m24 + m2.m33 * m1.m34 + m2.m34 * m1.m44;\n\n var m41 = m2.m41 * m1.m11 + m2.m42 * m1.m21 + m2.m43 * m1.m31 + m2.m44 * m1.m41;\n var m42 = m2.m41 * m1.m12 + m2.m42 * m1.m22 + m2.m43 * m1.m32 + m2.m44 * m1.m42;\n var m43 = m2.m41 * m1.m13 + m2.m42 * m1.m23 + m2.m43 * m1.m33 + m2.m44 * m1.m43;\n var m44 = m2.m41 * m1.m14 + m2.m42 * m1.m24 + m2.m43 * m1.m34 + m2.m44 * m1.m44;\n\n return new CSSMatrix(\n [m11, m21, m31, m41,\n m12, m22, m32, m42,\n m13, m23, m33, m43,\n m14, m24, m34, m44]\n );\n }\n\n /**\n * Returns a new *Float32Array* containing all 16 elements which comprise the matrix.\n * The elements are stored into the array as single-precision floating-point numbers\n * in column-major (colexographical access access or \"colex\") order.\n *\n * @return {Float32Array} matrix elements (m11, m21, m31, m41, ..)\n */\n // toFloat32Array(){\n // return Float32Array.from(this.toArray());\n // }\n\n /**\n * Returns a new Float64Array containing all 16 elements which comprise the matrix.\n * The elements are stored into the array as double-precision floating-point numbers\n * in column-major (colexographical access access or \"colex\") order.\n *\n * @return {Float64Array} matrix elements (m11, m21, m31, m41, ..)\n */\n // toFloat64Array(){\n // return Float64Array.from(this.toArray());\n // }\n\n /**\n * Creates a new mutable `CSSMatrix` object given an existing matrix or a\n * `DOMMatrix` *Object* which provides the values for its properties.\n *\n * @param {CSSMatrix} CSSMatrix the source `CSSMatrix` initialization to feed values from\n */\n function fromMatrix(m) {\n return new CSSMatrix(\n // DOMMatrix elements order\n [m.m11, m.m21, m.m31, m.m41,\n m.m12, m.m22, m.m32, m.m42,\n m.m13, m.m23, m.m33, m.m43,\n m.m14, m.m24, m.m34, m.m44]\n );\n }\n\n /**\n * Feed a CSSMatrix object with the values of a 6/16 values array and returns it.\n *\n * @param {Array} array The source `Array` to feed values from.\n * @return {CSSMatrix} a The source array to feed values from.\n */\n function feedFromArray(m, array) {\n var a = Array.from(array);\n if (a.length === 16) {\n var m11 = a[0];\n var m21 = a[1];\n var m31 = a[2];\n var m41 = a[3];\n var m12 = a[4];\n var m22 = a[5];\n var m32 = a[6];\n var m42 = a[7];\n var m13 = a[8];\n var m23 = a[9];\n var m33 = a[10];\n var m43 = a[11];\n var m14 = a[12];\n var m24 = a[13];\n var m34 = a[14];\n var m44 = a[15];\n\n m.m11 = m11;\n m.a = m11;\n\n m.m21 = m21;\n m.c = m21;\n\n m.m31 = m31;\n\n m.m41 = m41;\n m.e = m41;\n\n m.m12 = m12;\n m.b = m12;\n\n m.m22 = m22;\n m.d = m22;\n\n m.m32 = m32;\n\n m.m42 = m42;\n m.f = m42;\n\n m.m13 = m13;\n m.m23 = m23;\n m.m33 = m33;\n m.m43 = m43;\n m.m14 = m14;\n m.m24 = m24;\n m.m34 = m34;\n m.m44 = m44;\n } else if (a.length === 6) {\n var m11$1 = a[0];\n var m12$1 = a[1];\n var m21$1 = a[2];\n var m22$1 = a[3];\n var m14$1 = a[4];\n var m24$1 = a[5];\n\n m.m11 = m11$1;\n m.a = m11$1;\n\n m.m12 = m12$1;\n m.b = m12$1;\n\n m.m21 = m21$1;\n m.c = m21$1;\n\n m.m22 = m22$1;\n m.d = m22$1;\n\n m.m14 = m14$1;\n m.e = m14$1;\n\n m.m24 = m24$1;\n m.f = m24$1;\n } else {\n throw new TypeError('CSSMatrix: expecting a 6/16 values Array');\n }\n return m;\n }\n\n /**\n * Creates a new mutable `CSSMatrix` object given an array float values.\n *\n * If the array has six values, the result is a 2D matrix; if the array has 16 values,\n * the result is a 3D matrix. Otherwise, a TypeError exception is thrown.\n *\n * @param {Array} array The source `Array` to feed values from.\n * @return {CSSMatrix} a The source array to feed values from.\n */\n function fromArray(a) {\n return feedFromArray(new CSSMatrix(), a);\n }\n\n /**\n * Each create a new mutable `CSSMatrix` object given an array of single/double-precision\n * (32/64 bit) floating-point values.\n *\n * If the array has six values, the result is a 2D matrix; if the array has 16 values,\n * the result is a 3D matrix. Otherwise, a TypeError exception is thrown.\n *\n * @param {Float32Array|Float64Array} array The source float array to feed values from.\n * @return {CSSMatrix} a The source array to feed values from.\n */\n // more of an alias for now, will update later if it's the case\n // function fromFloat32Array(a){\n // return feedFromArray(new CSSMatrix(), a);\n // }\n // function fromFloat64Array(a){ // more of an alias\n // return feedFromArray(new CSSMatrix(), a);\n // }\n\n /**\n * The `setMatrixValue` method replaces the existing matrix with one computed\n * in the browser. EG: `matrix(1,0.25,-0.25,1,0,0)`\n *\n * The method accepts *Float64Array* / *Float32Array* / any *Array* values, the result of\n * `DOMMatrix` / `CSSMatrix` instance method calls `toFloat64Array()` / `toFloat32Array()`.\n *\n * This method expects valid *matrix()* / *matrix3d()* string values, other\n * transform functions like *translate()* are not supported.\n *\n * @param {String} source the *String* resulted from `getComputedStyle()`.\n * @param {Array} source the *Array* resulted from `toFloat64Array()`.\n */\n CSSMatrixProto.setMatrixValue = function setMatrixValue(source) {\n var m = this;\n\n if (!source || !source.length) { // no parameters or source\n return m;\n } if (source.length && typeof source[0] === 'string' && source[0].length) { // CSS transform String source\n var string = String(source[0]).trim();\n var type = '';\n var values = [];\n\n if (string === 'none') { return m; }\n\n type = string.slice(0, string.indexOf('('));\n values = string.slice((type === 'matrix' ? 7 : 9), -1).split(',')\n .map(function (n) { return (Math.abs(n) < 1e-6 ? 0 : +n); });\n\n if ([6, 16].indexOf(values.length) > -1) {\n feedFromArray(m, values);\n } else {\n throw new TypeError('CSSMatrix: expecting valid CSS matrix() / matrix3d() syntax');\n }\n } else if (source[0] instanceof CSSMatrix) { // CSSMatrix instance\n feedFromArray(m, source[0].toArray());\n } else if (Array.isArray(source[0])) { // Float32Array,Float64Array source\n feedFromArray(m, source[0]);\n } else if (Array.isArray(source)) { // Arguments list come here\n feedFromArray(m, source);\n }\n return m;\n };\n\n /**\n * Creates and returns a string representation of the matrix in `CSS` matrix syntax,\n * using the appropriate `CSS` matrix notation.\n *\n * The 16 items in the array 3D matrix array are *transposed* in row-major order.\n *\n * @matrix3d *matrix3d(m11, m12, m13, m14, m21, ...)*\n * @matrix *matrix(a, b, c, d, e, f)*\n *\n * @return {String} `String` representation of the matrix\n */\n CSSMatrixProto.toString = function toString() {\n var m = this;\n var type = m.is2D ? 'matrix' : 'matrix3d';\n\n return (type + \"(\" + (m.toArray(1).join(',')) + \")\");\n };\n\n /**\n * Returns an *Array* containing all 16 elements which comprise the matrix.\n * The method can return either the elements in default column major order or\n * row major order (what we call the *transposed* matrix, used by `toString`).\n *\n * Other methods make use of this method to feed their output values from this matrix.\n *\n * @param {Boolean} transposed changes the order of elements in the output\n * @return {Array} an *Array* representation of the matrix\n */\n CSSMatrixProto.toArray = function toArray(transposed) {\n var m = this;\n var result;\n\n if (m.is2D) {\n result = [m.a, m.b, m.c, m.d, m.e, m.f];\n } else if (transposed) {\n result = [m.m11, m.m12, m.m13, m.m14, // transposed is used by toString\n m.m21, m.m22, m.m23, m.m24,\n m.m31, m.m32, m.m33, m.m34,\n m.m41, m.m42, m.m43, m.m44];\n } else {\n result = [m.m11, m.m21, m.m31, m.m41, // used by constructor\n m.m12, m.m22, m.m32, m.m42,\n m.m13, m.m23, m.m33, m.m43,\n m.m14, m.m24, m.m34, m.m44];\n }\n return result;\n };\n\n /**\n * The Multiply method returns a new CSSMatrix which is the result of this\n * matrix multiplied by the passed matrix, with the passed matrix to the right.\n * This matrix is not modified.\n *\n * @param {CSSMatrix} m2 CSSMatrix\n * @return {CSSMatrix} The result matrix.\n */\n CSSMatrixProto.multiply = function multiply(m2) {\n return Multiply(this, m2);\n };\n\n /**\n *\n * These methods will be implemented later into an extended version to provide\n * additional functionality.\n */\n // inverse = function(){}\n // determinant = function(){}\n // transpose = function(){}\n\n /**\n * The translate method returns a new matrix which is this matrix post\n * multiplied by a translation matrix containing the passed values. If the z\n * component is undefined, a 0 value is used in its place. This matrix is not\n * modified.\n *\n * @param {number} x X component of the translation value.\n * @param {number} y Y component of the translation value.\n * @param {number=} z Z component of the translation value.\n * @return {CSSMatrix} The result matrix\n */\n\n CSSMatrixProto.translate = function translate(x, y, z) {\n var X = x;\n var Y = y;\n var Z = z;\n if (Z == null) { Z = 0; }\n if (Y == null) { Y = 0; }\n return Multiply(this, Translate(X, Y, Z));\n };\n\n /**\n * The scale method returns a new matrix which is this matrix post multiplied by\n * a scale matrix containing the passed values. If the z component is undefined,\n * a 1 value is used in its place. If the y component is undefined, the x\n * component value is used in its place. This matrix is not modified.\n *\n * @param {number} x The X component of the scale value.\n * @param {number=} y The Y component of the scale value.\n * @param {number=} z The Z component of the scale value.\n * @return {CSSMatrix} The result matrix\n */\n CSSMatrixProto.scale = function scale(x, y, z) {\n var X = x;\n var Y = y;\n var Z = z;\n if (Y == null) { Y = x; }\n if (Z == null) { Z = x; }\n\n return Multiply(this, Scale(X, Y, Z));\n };\n\n /**\n * The rotate method returns a new matrix which is this matrix post multiplied\n * by each of 3 rotation matrices about the major axes, first X, then Y, then Z.\n * If the y and z components are undefined, the x value is used to rotate the\n * object about the z axis, as though the vector (0,0,x) were passed. All\n * rotation values are in degrees. This matrix is not modified.\n *\n * @param {number} rx The X component of the rotation, or Z if Y and Z are null.\n * @param {number=} ry The (optional) Y component of the rotation value.\n * @param {number=} rz The (optional) Z component of the rotation value.\n * @return {CSSMatrix} The result matrix\n */\n CSSMatrixProto.rotate = function rotate(rx, ry, rz) {\n var RX = rx;\n var RY = ry;\n var RZ = rz;\n if (RY == null) { RY = 0; }\n if (RZ == null) { RZ = RX; RX = 0; }\n return Multiply(this, Rotate(RX, RY, RZ));\n };\n\n /**\n * The rotateAxisAngle method returns a new matrix which is this matrix post\n * multiplied by a rotation matrix with the given axis and `angle`. The right-hand\n * rule is used to determine the direction of rotation. All rotation values are\n * in degrees. This matrix is not modified.\n *\n * @param {number} x The X component of the axis vector.\n * @param {number} y The Y component of the axis vector.\n * @param {number} z The Z component of the axis vector.\n * @param {number} angle The angle of rotation about the axis vector, in degrees.\n * @return {CSSMatrix} The `CSSMatrix` result\n */\n\n CSSMatrixProto.rotateAxisAngle = function rotateAxisAngle(x, y, z, angle) {\n if (arguments.length !== 4) {\n throw new TypeError('CSSMatrix: expecting 4 values');\n }\n return Multiply(this, RotateAxisAngle(x, y, z, angle));\n };\n\n /**\n * Specifies a skew transformation along the `x-axis` by the given angle.\n * This matrix is not modified.\n *\n * @param {number} angle The angle amount in degrees to skew.\n * @return {CSSMatrix} The `CSSMatrix` result\n */\n\n CSSMatrixProto.skewX = function skewX(angle) {\n return Multiply(this, SkewX(angle));\n };\n\n /**\n * Specifies a skew transformation along the `y-axis` by the given angle.\n * This matrix is not modified.\n *\n * @param {number} angle The angle amount in degrees to skew.\n * @return {CSSMatrix} The `CSSMatrix` result\n */\n\n CSSMatrixProto.skewY = function skewY(angle) {\n return Multiply(this, SkewY(angle));\n };\n\n /**\n * Set the current `CSSMatrix` instance to the identity form and returns it.\n *\n * @return {CSSMatrix} this `CSSMatrix` instance\n */\n CSSMatrixProto.setIdentity = function setIdentity() {\n var identity = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n return feedFromArray(this, identity);\n };\n\n /**\n * Transforms the specified point using the matrix, returning a new\n * *Object* containing the transformed point.\n * Neither the matrix nor the original point are altered.\n *\n * The method is equivalent with `transformPoint()` method\n * of the `DOMMatrix` constructor.\n *\n * JavaScript implementation by thednp\n *\n * @param {Point} point the *Object* with `x`, `y`, `z` and `w` components\n * @return {Point} a new `{x,y,z,w}` *Object*\n */\n CSSMatrixProto.transformPoint = function transformPoint(v) {\n var M = this;\n var m = Translate(v.x, v.y, v.z);\n\n m.m44 = v.w || 1;\n m = M.multiply(m);\n\n return {\n x: m.m41,\n y: m.m42,\n z: m.m43,\n w: m.m44,\n };\n };\n\n /**\n * Transforms the specified vector using the matrix, returning a new\n * {x,y,z,w} *Object* comprising the transformed vector.\n * Neither the matrix nor the original vector are altered.\n *\n * @param {Tuple} tupple an object with x, y, z and w components\n * @return {Tuple} the passed tuple\n */\n CSSMatrixProto.transform = function transform(t) {\n var m = this;\n var x = m.m11 * t.x + m.m12 * t.y + m.m13 * t.z + m.m14 * t.w;\n var y = m.m21 * t.x + m.m22 * t.y + m.m23 * t.z + m.m24 * t.w;\n var z = m.m31 * t.x + m.m32 * t.y + m.m33 * t.z + m.m34 * t.w;\n var w = m.m41 * t.x + m.m42 * t.y + m.m43 * t.z + m.m44 * t.w;\n\n return {\n x: x / w,\n y: y / w,\n z: z / w,\n w: w,\n };\n };\n\n // Add Transform Functions to CSSMatrix object\n CSSMatrix.Translate = Translate;\n CSSMatrix.Rotate = Rotate;\n CSSMatrix.RotateAxisAngle = RotateAxisAngle;\n CSSMatrix.Scale = Scale;\n CSSMatrix.SkewX = SkewX;\n CSSMatrix.SkewY = SkewY;\n CSSMatrix.Multiply = Multiply;\n CSSMatrix.fromMatrix = fromMatrix;\n CSSMatrix.fromArray = fromArray;\n CSSMatrix.feedFromArray = feedFromArray;\n\n return CSSMatrix;\n\n})));\n","require('../../modules/es.array.iterator');\nrequire('../../modules/es.object.from-entries');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Object.fromEntries;\n","'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar Iterators = require('../internals/iterators');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.es/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.es/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.es/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.es/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated), // target\n index: 0, // next index\n kind: kind // kind\n });\n// `%ArrayIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n var state = getInternalState(this);\n var target = state.target;\n var kind = state.kind;\n var index = state.index++;\n if (!target || index >= target.length) {\n state.target = undefined;\n return { value: undefined, done: true };\n }\n if (kind == 'keys') return { value: index, done: false };\n if (kind == 'values') return { value: target[index], done: false };\n return { value: [index, target[index]], done: false };\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.es/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.es/ecma262/#sec-createmappedargumentsobject\nIterators.Arguments = Iterators.Array;\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar has = require('../internals/has');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!has(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {\n if (NATIVE_SYMBOL && has(Symbol, name)) {\n WellKnownSymbolsStore[name] = Symbol[name];\n } else {\n WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n }\n } return WellKnownSymbolsStore[name];\n};\n","/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = require('../internals/engine-v8-version');\nvar fails = require('../internals/fails');\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n var symbol = Symbol();\n // Chrome 38 Symbol has incorrect toString conversion\n // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n return !String(symbol) || !(Object(symbol) instanceof Symbol) ||\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n","var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] < 4 ? 1 : match[0] + match[1];\n} else if (userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nmodule.exports = version && +version;\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n","/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n","var anObject = require('../internals/an-object');\nvar defineProperties = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n /* global ActiveXObject -- old IE */\n activeXDocument = document.domain && new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es/no-object-defineproperties -- safe\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);\n return O;\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n// eslint-disable-next-line es/no-object-keys -- safe\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n","module.exports = {};\n","'use strict';\nvar $ = require('../internals/export');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n } return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {\n createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array.prototype.{ values, @@iterator }.name in V8 / FF\n if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return nativeIterator.call(this); };\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);\n }\n Iterators[NAME] = defaultIterator;\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n return methods;\n};\n","'use strict';\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar Iterators = require('../internals/iterators');\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};\n","'use strict';\nvar fails = require('../internals/fails');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\nvar returnThis = function () { return this; };\n\n// `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n/* eslint-disable es/no-array-prototype-keys -- safe */\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nvar NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {\n var test = {};\n // FF44- legacy iterators case\n return IteratorPrototype[ITERATOR].call(test) !== test;\n});\n\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\n\n// `%IteratorPrototype%[@@iterator]()` method\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator\nif ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) {\n createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n","var has = require('../internals/has');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n// eslint-disable-next-line es/no-object-getprototypeof -- safe\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectPrototype : null;\n};\n","var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n // eslint-disable-next-line es/no-object-getprototypeof -- required for testing\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n","var defineProperty = require('../internals/object-define-property').f;\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC) {\n if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {\n defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n};\n","/* eslint-disable no-proto -- safe */\nvar anObject = require('../internals/an-object');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n// eslint-disable-next-line es/no-object-setprototypeof -- safe\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter.call(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it) && it !== null) {\n throw TypeError(\"Can't set \" + String(it) + ' as a prototype');\n } return it;\n};\n","var $ = require('../internals/export');\nvar iterate = require('../internals/iterate');\nvar createProperty = require('../internals/create-property');\n\n// `Object.fromEntries` method\n// https://github.com/tc39/proposal-object-from-entries\n$({ target: 'Object', stat: true }, {\n fromEntries: function fromEntries(iterable) {\n var obj = {};\n iterate(iterable, function (k, v) {\n createProperty(obj, k, v);\n }, { AS_ENTRIES: true });\n return obj;\n }\n});\n","var anObject = require('../internals/an-object');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar bind = require('../internals/function-bind-context');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar iteratorClose = require('../internals/iterator-close');\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nmodule.exports = function (iterable, unboundFunction, options) {\n var that = options && options.that;\n var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n var INTERRUPTED = !!(options && options.INTERRUPTED);\n var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);\n var iterator, iterFn, index, length, result, next, step;\n\n var stop = function (condition) {\n if (iterator) iteratorClose(iterator);\n return new Result(true, condition);\n };\n\n var callFn = function (value) {\n if (AS_ENTRIES) {\n anObject(value);\n return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n } return INTERRUPTED ? fn(value, stop) : fn(value);\n };\n\n if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (typeof iterFn != 'function') throw TypeError('Target is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = toLength(iterable.length); length > index; index++) {\n result = callFn(iterable[index]);\n if (result && result instanceof Result) return result;\n } return new Result(false);\n }\n iterator = iterFn.call(iterable);\n }\n\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n try {\n result = callFn(step.value);\n } catch (error) {\n iteratorClose(iterator);\n throw error;\n }\n if (typeof result == 'object' && result && result instanceof Result) return result;\n } return new Result(false);\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n","var aFunction = require('../internals/a-function');\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","module.exports = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n};\n","var classof = require('../internals/classof');\nvar Iterators = require('../internals/iterators');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n","var anObject = require('../internals/an-object');\n\nmodule.exports = function (iterator) {\n var returnMethod = iterator['return'];\n if (returnMethod !== undefined) {\n return anObject(returnMethod.call(iterator)).value;\n }\n};\n","'use strict';\nvar toPrimitive = require('../internals/to-primitive');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = function (object, key, value) {\n var propertyKey = toPrimitive(key);\n if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));\n else object[propertyKey] = value;\n};\n","require('../../modules/es.aggregate-error');\nrequire('../../modules/es.object.to-string');\nrequire('../../modules/es.promise');\nrequire('../../modules/es.promise.all-settled');\nrequire('../../modules/es.promise.any');\nrequire('../../modules/es.promise.finally');\nrequire('../../modules/es.string.iterator');\nrequire('../../modules/web.dom-collections.iterator');\nvar path = require('../../internals/path');\n\nmodule.exports = path.Promise;\n","'use strict';\nvar $ = require('../internals/export');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar create = require('../internals/object-create');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar iterate = require('../internals/iterate');\n\nvar $AggregateError = function AggregateError(errors, message) {\n var that = this;\n if (!(that instanceof $AggregateError)) return new $AggregateError(errors, message);\n if (setPrototypeOf) {\n // eslint-disable-next-line unicorn/error-message -- expected\n that = setPrototypeOf(new Error(undefined), getPrototypeOf(that));\n }\n if (message !== undefined) createNonEnumerableProperty(that, 'message', String(message));\n var errorsArray = [];\n iterate(errors, errorsArray.push, { that: errorsArray });\n createNonEnumerableProperty(that, 'errors', errorsArray);\n return that;\n};\n\n$AggregateError.prototype = create(Error.prototype, {\n constructor: createPropertyDescriptor(5, $AggregateError),\n message: createPropertyDescriptor(5, ''),\n name: createPropertyDescriptor(5, 'AggregateError')\n});\n\n// `AggregateError` constructor\n// https://tc39.es/ecma262/#sec-aggregate-error-constructor\n$({ global: true }, {\n AggregateError: $AggregateError\n});\n","var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar redefine = require('../internals/redefine');\nvar toString = require('../internals/object-to-string');\n\n// `Object.prototype.toString` method\n// https://tc39.es/ecma262/#sec-object.prototype.tostring\nif (!TO_STRING_TAG_SUPPORT) {\n redefine(Object.prototype, 'toString', toString, { unsafe: true });\n}\n","'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classof = require('../internals/classof');\n\n// `Object.prototype.toString` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.tostring\nmodule.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {\n return '[object ' + classof(this) + ']';\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar global = require('../internals/global');\nvar getBuiltIn = require('../internals/get-built-in');\nvar NativePromise = require('../internals/native-promise-constructor');\nvar redefine = require('../internals/redefine');\nvar redefineAll = require('../internals/redefine-all');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar setSpecies = require('../internals/set-species');\nvar isObject = require('../internals/is-object');\nvar aFunction = require('../internals/a-function');\nvar anInstance = require('../internals/an-instance');\nvar inspectSource = require('../internals/inspect-source');\nvar iterate = require('../internals/iterate');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar speciesConstructor = require('../internals/species-constructor');\nvar task = require('../internals/task').set;\nvar microtask = require('../internals/microtask');\nvar promiseResolve = require('../internals/promise-resolve');\nvar hostReportErrors = require('../internals/host-report-errors');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar InternalStateModule = require('../internals/internal-state');\nvar isForced = require('../internals/is-forced');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_BROWSER = require('../internals/engine-is-browser');\nvar IS_NODE = require('../internals/engine-is-node');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\nvar PROMISE = 'Promise';\nvar getInternalState = InternalStateModule.get;\nvar setInternalState = InternalStateModule.set;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar NativePromisePrototype = NativePromise && NativePromise.prototype;\nvar PromiseConstructor = NativePromise;\nvar PromiseConstructorPrototype = NativePromisePrototype;\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function';\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\nvar SUBCLASSING = false;\nvar Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;\n\nvar FORCED = isForced(PROMISE, function () {\n var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor);\n var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor);\n // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // We can't detect it synchronously, so just check versions\n if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;\n // We need Promise#finally in the pure version for preventing prototype pollution\n if (IS_PURE && !PromiseConstructorPrototype['finally']) return true;\n // We can't use @@species feature detection in V8 since it causes\n // deoptimization and performance degradation\n // https://github.com/zloirock/core-js/issues/679\n if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;\n // Detect correctness of subclassing with @@species support\n var promise = new PromiseConstructor(function (resolve) { resolve(1); });\n var FakePromise = function (exec) {\n exec(function () { /* empty */ }, function () { /* empty */ });\n };\n var constructor = promise.constructor = {};\n constructor[SPECIES] = FakePromise;\n SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;\n if (!SUBCLASSING) return true;\n // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;\n});\n\nvar INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {\n PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });\n});\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && typeof (then = it.then) == 'function' ? then : false;\n};\n\nvar notify = function (state, isReject) {\n if (state.notified) return;\n state.notified = true;\n var chain = state.reactions;\n microtask(function () {\n var value = state.value;\n var ok = state.state == FULFILLED;\n var index = 0;\n // variable length - can't use forEach\n while (chain.length > index) {\n var reaction = chain[index++];\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (state.rejection === UNHANDLED) onHandleUnhandled(state);\n state.rejection = HANDLED;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // can throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n then.call(result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (error) {\n if (domain && !exited) domain.exit();\n reject(error);\n }\n }\n state.reactions = [];\n state.notified = false;\n if (isReject && !state.rejection) onUnhandled(state);\n });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n var event, handler;\n if (DISPATCH_EVENT) {\n event = document.createEvent('Event');\n event.promise = promise;\n event.reason = reason;\n event.initEvent(name, false, true);\n global.dispatchEvent(event);\n } else event = { promise: promise, reason: reason };\n if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);\n else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (state) {\n task.call(global, function () {\n var promise = state.facade;\n var value = state.value;\n var IS_UNHANDLED = isUnhandled(state);\n var result;\n if (IS_UNHANDLED) {\n result = perform(function () {\n if (IS_NODE) {\n process.emit('unhandledRejection', value, promise);\n } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n if (result.error) throw result.value;\n }\n });\n};\n\nvar isUnhandled = function (state) {\n return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (state) {\n task.call(global, function () {\n var promise = state.facade;\n if (IS_NODE) {\n process.emit('rejectionHandled', promise);\n } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n });\n};\n\nvar bind = function (fn, state, unwrap) {\n return function (value) {\n fn(state, value, unwrap);\n };\n};\n\nvar internalReject = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n state.value = value;\n state.state = REJECTED;\n notify(state, true);\n};\n\nvar internalResolve = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n try {\n if (state.facade === value) throw TypeError(\"Promise can't be resolved itself\");\n var then = isThenable(value);\n if (then) {\n microtask(function () {\n var wrapper = { done: false };\n try {\n then.call(value,\n bind(internalResolve, wrapper, state),\n bind(internalReject, wrapper, state)\n );\n } catch (error) {\n internalReject(wrapper, error, state);\n }\n });\n } else {\n state.value = value;\n state.state = FULFILLED;\n notify(state, false);\n }\n } catch (error) {\n internalReject({ done: false }, error, state);\n }\n};\n\n// constructor polyfill\nif (FORCED) {\n // 25.4.3.1 Promise(executor)\n PromiseConstructor = function Promise(executor) {\n anInstance(this, PromiseConstructor, PROMISE);\n aFunction(executor);\n Internal.call(this);\n var state = getInternalState(this);\n try {\n executor(bind(internalResolve, state), bind(internalReject, state));\n } catch (error) {\n internalReject(state, error);\n }\n };\n PromiseConstructorPrototype = PromiseConstructor.prototype;\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n Internal = function Promise(executor) {\n setInternalState(this, {\n type: PROMISE,\n done: false,\n notified: false,\n parent: false,\n reactions: [],\n rejection: false,\n state: PENDING,\n value: undefined\n });\n };\n Internal.prototype = redefineAll(PromiseConstructorPrototype, {\n // `Promise.prototype.then` method\n // https://tc39.es/ecma262/#sec-promise.prototype.then\n then: function then(onFulfilled, onRejected) {\n var state = getInternalPromiseState(this);\n var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;\n reaction.fail = typeof onRejected == 'function' && onRejected;\n reaction.domain = IS_NODE ? process.domain : undefined;\n state.parent = true;\n state.reactions.push(reaction);\n if (state.state != PENDING) notify(state, false);\n return reaction.promise;\n },\n // `Promise.prototype.catch` method\n // https://tc39.es/ecma262/#sec-promise.prototype.catch\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n var state = getInternalState(promise);\n this.promise = promise;\n this.resolve = bind(internalResolve, state);\n this.reject = bind(internalReject, state);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === PromiseConstructor || C === PromiseWrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n\n if (!IS_PURE && typeof NativePromise == 'function' && NativePromisePrototype !== Object.prototype) {\n nativeThen = NativePromisePrototype.then;\n\n if (!SUBCLASSING) {\n // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs\n redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {\n var that = this;\n return new PromiseConstructor(function (resolve, reject) {\n nativeThen.call(that, resolve, reject);\n }).then(onFulfilled, onRejected);\n // https://github.com/zloirock/core-js/issues/640\n }, { unsafe: true });\n\n // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`\n redefine(NativePromisePrototype, 'catch', PromiseConstructorPrototype['catch'], { unsafe: true });\n }\n\n // make `.constructor === Promise` work for native promise-based APIs\n try {\n delete NativePromisePrototype.constructor;\n } catch (error) { /* empty */ }\n\n // make `instanceof Promise` work for native promise-based APIs\n if (setPrototypeOf) {\n setPrototypeOf(NativePromisePrototype, PromiseConstructorPrototype);\n }\n }\n}\n\n$({ global: true, wrap: true, forced: FORCED }, {\n Promise: PromiseConstructor\n});\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n\nPromiseWrapper = getBuiltIn(PROMISE);\n\n// statics\n$({ target: PROMISE, stat: true, forced: FORCED }, {\n // `Promise.reject` method\n // https://tc39.es/ecma262/#sec-promise.reject\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n capability.reject.call(undefined, r);\n return capability.promise;\n }\n});\n\n$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {\n // `Promise.resolve` method\n // https://tc39.es/ecma262/#sec-promise.resolve\n resolve: function resolve(x) {\n return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);\n }\n});\n\n$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {\n // `Promise.all` method\n // https://tc39.es/ecma262/#sec-promise.all\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aFunction(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n $promiseResolve.call(C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n },\n // `Promise.race` method\n // https://tc39.es/ecma262/#sec-promise.race\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aFunction(C.resolve);\n iterate(iterable, function (promise) {\n $promiseResolve.call(C, promise).then(capability.resolve, reject);\n });\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","var global = require('../internals/global');\n\nmodule.exports = global.Promise;\n","var redefine = require('../internals/redefine');\n\nmodule.exports = function (target, src, options) {\n for (var key in src) redefine(target, key, src[key], options);\n return target;\n};\n","'use strict';\nvar getBuiltIn = require('../internals/get-built-in');\nvar definePropertyModule = require('../internals/object-define-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (CONSTRUCTOR_NAME) {\n var Constructor = getBuiltIn(CONSTRUCTOR_NAME);\n var defineProperty = definePropertyModule.f;\n\n if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {\n defineProperty(Constructor, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n }\n};\n","module.exports = function (it, Constructor, name) {\n if (!(it instanceof Constructor)) {\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n } return it;\n};\n","var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n","var anObject = require('../internals/an-object');\nvar aFunction = require('../internals/a-function');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `SpeciesConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-speciesconstructor\nmodule.exports = function (O, defaultConstructor) {\n var C = anObject(O).constructor;\n var S;\n return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);\n};\n","var global = require('../internals/global');\nvar fails = require('../internals/fails');\nvar bind = require('../internals/function-bind-context');\nvar html = require('../internals/html');\nvar createElement = require('../internals/document-create-element');\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar location = global.location;\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar MessageChannel = global.MessageChannel;\nvar Dispatch = global.Dispatch;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar defer, channel, port;\n\nvar run = function (id) {\n // eslint-disable-next-line no-prototype-builtins -- safe\n if (queue.hasOwnProperty(id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\n\nvar runner = function (id) {\n return function () {\n run(id);\n };\n};\n\nvar listener = function (event) {\n run(event.data);\n};\n\nvar post = function (id) {\n // old engines have not location.origin\n global.postMessage(id + '', location.protocol + '//' + location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n set = function setImmediate(fn) {\n var args = [];\n var i = 1;\n while (arguments.length > i) args.push(arguments[i++]);\n queue[++counter] = function () {\n // eslint-disable-next-line no-new-func -- spec requirement\n (typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);\n };\n defer(counter);\n return counter;\n };\n clear = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (IS_NODE) {\n defer = function (id) {\n process.nextTick(runner(id));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(runner(id));\n };\n // Browsers with MessageChannel, includes WebWorkers\n // except iOS - https://github.com/zloirock/core-js/issues/624\n } else if (MessageChannel && !IS_IOS) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = bind(port.postMessage, port, 1);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (\n global.addEventListener &&\n typeof postMessage == 'function' &&\n !global.importScripts &&\n location && location.protocol !== 'file:' &&\n !fails(post)\n ) {\n defer = post;\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in createElement('script')) {\n defer = function (id) {\n html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(runner(id), 0);\n };\n }\n}\n\nmodule.exports = {\n set: set,\n clear: clear\n};\n","var userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /(?:iphone|ipod|ipad).*applewebkit/i.test(userAgent);\n","var classof = require('../internals/classof-raw');\nvar global = require('../internals/global');\n\nmodule.exports = classof(global.process) == 'process';\n","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar macrotask = require('../internals/task').set;\nvar IS_IOS = require('../internals/engine-is-ios');\nvar IS_WEBOS_WEBKIT = require('../internals/engine-is-webos-webkit');\nvar IS_NODE = require('../internals/engine-is-node');\n\nvar MutationObserver = global.MutationObserver || global.WebKitMutationObserver;\nvar document = global.document;\nvar process = global.process;\nvar Promise = global.Promise;\n// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`\nvar queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');\nvar queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;\n\nvar flush, head, last, notify, toggle, node, promise, then;\n\n// modern engines have queueMicrotask method\nif (!queueMicrotask) {\n flush = function () {\n var parent, fn;\n if (IS_NODE && (parent = process.domain)) parent.exit();\n while (head) {\n fn = head.fn;\n head = head.next;\n try {\n fn();\n } catch (error) {\n if (head) notify();\n else last = undefined;\n throw error;\n }\n } last = undefined;\n if (parent) parent.enter();\n };\n\n // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339\n // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898\n if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {\n toggle = true;\n node = document.createTextNode('');\n new MutationObserver(flush).observe(node, { characterData: true });\n notify = function () {\n node.data = toggle = !toggle;\n };\n // environments with maybe non-completely correct, but existent Promise\n } else if (Promise && Promise.resolve) {\n // Promise.resolve without an argument throws an error in LG WebOS 2\n promise = Promise.resolve(undefined);\n // workaround of WebKit ~ iOS Safari 10.1 bug\n promise.constructor = Promise;\n then = promise.then;\n notify = function () {\n then.call(promise, flush);\n };\n // Node.js without promises\n } else if (IS_NODE) {\n notify = function () {\n process.nextTick(flush);\n };\n // for other environments - macrotask based on:\n // - setImmediate\n // - MessageChannel\n // - window.postMessag\n // - onreadystatechange\n // - setTimeout\n } else {\n notify = function () {\n // strange IE + webpack dev server bug - use .call(global)\n macrotask.call(global, flush);\n };\n }\n}\n\nmodule.exports = queueMicrotask || function (fn) {\n var task = { fn: fn, next: undefined };\n if (last) last.next = task;\n if (!head) {\n head = task;\n notify();\n } last = task;\n};\n","var userAgent = require('../internals/engine-user-agent');\n\nmodule.exports = /web0s(?!.*chrome)/i.test(userAgent);\n","var anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar newPromiseCapability = require('../internals/new-promise-capability');\n\nmodule.exports = function (C, x) {\n anObject(C);\n if (isObject(x) && x.constructor === C) return x;\n var promiseCapability = newPromiseCapability.f(C);\n var resolve = promiseCapability.resolve;\n resolve(x);\n return promiseCapability.promise;\n};\n","'use strict';\nvar aFunction = require('../internals/a-function');\n\nvar PromiseCapability = function (C) {\n var resolve, reject;\n this.promise = new C(function ($$resolve, $$reject) {\n if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');\n resolve = $$resolve;\n reject = $$reject;\n });\n this.resolve = aFunction(resolve);\n this.reject = aFunction(reject);\n};\n\n// `NewPromiseCapability` abstract operation\n// https://tc39.es/ecma262/#sec-newpromisecapability\nmodule.exports.f = function (C) {\n return new PromiseCapability(C);\n};\n","var global = require('../internals/global');\n\nmodule.exports = function (a, b) {\n var console = global.console;\n if (console && console.error) {\n arguments.length === 1 ? console.error(a) : console.error(a, b);\n }\n};\n","module.exports = function (exec) {\n try {\n return { error: false, value: exec() };\n } catch (error) {\n return { error: true, value: error };\n }\n};\n","module.exports = typeof window == 'object';\n","'use strict';\nvar $ = require('../internals/export');\nvar aFunction = require('../internals/a-function');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar iterate = require('../internals/iterate');\n\n// `Promise.allSettled` method\n// https://tc39.es/ecma262/#sec-promise.allsettled\n$({ target: 'Promise', stat: true }, {\n allSettled: function allSettled(iterable) {\n var C = this;\n var capability = newPromiseCapabilityModule.f(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var promiseResolve = aFunction(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n values.push(undefined);\n remaining++;\n promiseResolve.call(C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = { status: 'fulfilled', value: value };\n --remaining || resolve(values);\n }, function (error) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = { status: 'rejected', reason: error };\n --remaining || resolve(values);\n });\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar aFunction = require('../internals/a-function');\nvar getBuiltIn = require('../internals/get-built-in');\nvar newPromiseCapabilityModule = require('../internals/new-promise-capability');\nvar perform = require('../internals/perform');\nvar iterate = require('../internals/iterate');\n\nvar PROMISE_ANY_ERROR = 'No one promise resolved';\n\n// `Promise.any` method\n// https://tc39.es/ecma262/#sec-promise.any\n$({ target: 'Promise', stat: true }, {\n any: function any(iterable) {\n var C = this;\n var capability = newPromiseCapabilityModule.f(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var promiseResolve = aFunction(C.resolve);\n var errors = [];\n var counter = 0;\n var remaining = 1;\n var alreadyResolved = false;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyRejected = false;\n errors.push(undefined);\n remaining++;\n promiseResolve.call(C, promise).then(function (value) {\n if (alreadyRejected || alreadyResolved) return;\n alreadyResolved = true;\n resolve(value);\n }, function (error) {\n if (alreadyRejected || alreadyResolved) return;\n alreadyRejected = true;\n errors[index] = error;\n --remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR));\n });\n });\n --remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR));\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar IS_PURE = require('../internals/is-pure');\nvar NativePromise = require('../internals/native-promise-constructor');\nvar fails = require('../internals/fails');\nvar getBuiltIn = require('../internals/get-built-in');\nvar speciesConstructor = require('../internals/species-constructor');\nvar promiseResolve = require('../internals/promise-resolve');\nvar redefine = require('../internals/redefine');\n\n// Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829\nvar NON_GENERIC = !!NativePromise && fails(function () {\n NativePromise.prototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });\n});\n\n// `Promise.prototype.finally` method\n// https://tc39.es/ecma262/#sec-promise.prototype.finally\n$({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {\n 'finally': function (onFinally) {\n var C = speciesConstructor(this, getBuiltIn('Promise'));\n var isFunction = typeof onFinally == 'function';\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n }\n});\n\n// makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then`\nif (!IS_PURE && typeof NativePromise == 'function') {\n var method = getBuiltIn('Promise').prototype['finally'];\n if (NativePromise.prototype['finally'] !== method) {\n redefine(NativePromise.prototype, 'finally', method, { unsafe: true });\n }\n}\n","'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar STRING_ITERATOR = 'String Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);\n\n// `String.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-string.prototype-@@iterator\ndefineIterator(String, 'String', function (iterated) {\n setInternalState(this, {\n type: STRING_ITERATOR,\n string: String(iterated),\n index: 0\n });\n// `%StringIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next\n}, function next() {\n var state = getInternalState(this);\n var string = state.string;\n var index = state.index;\n var point;\n if (index >= string.length) return { value: undefined, done: true };\n point = charAt(string, index);\n state.index += point.length;\n return { value: point, done: false };\n});\n","var toInteger = require('../internals/to-integer');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `String.prototype.{ codePointAt, at }` methods implementation\nvar createMethod = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = String(requireObjectCoercible($this));\n var position = toInteger(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = S.charCodeAt(position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size\n || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF\n ? CONVERT_TO_STRING ? S.charAt(position) : first\n : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\n\nmodule.exports = {\n // `String.prototype.codePointAt` method\n // https://tc39.es/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod(true)\n};\n","var global = require('../internals/global');\nvar DOMIterables = require('../internals/dom-iterables');\nvar ArrayIteratorMethods = require('../modules/es.array.iterator');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar ArrayValues = ArrayIteratorMethods.values;\n\nfor (var COLLECTION_NAME in DOMIterables) {\n var Collection = global[COLLECTION_NAME];\n var CollectionPrototype = Collection && Collection.prototype;\n if (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[ITERATOR] !== ArrayValues) try {\n createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);\n } catch (error) {\n CollectionPrototype[ITERATOR] = ArrayValues;\n }\n if (!CollectionPrototype[TO_STRING_TAG]) {\n createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n }\n if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {\n createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);\n } catch (error) {\n CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];\n }\n }\n }\n}\n","// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};\n","/**\n * web-streams-polyfill v3.1.0\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n typeof define === 'function' && define.amd ? define(['exports'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.WebStreamsPolyfill = {}));\n}(this, (function (exports) { 'use strict';\n\n /// \n var SymbolPolyfill = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ?\n Symbol :\n function (description) { return \"Symbol(\" + description + \")\"; };\n\n /// \n function noop() {\n return undefined;\n }\n function getGlobals() {\n if (typeof self !== 'undefined') {\n return self;\n }\n else if (typeof window !== 'undefined') {\n return window;\n }\n else if (typeof global !== 'undefined') {\n return global;\n }\n return undefined;\n }\n var globals = getGlobals();\n\n function typeIsObject(x) {\n return (typeof x === 'object' && x !== null) || typeof x === 'function';\n }\n var rethrowAssertionErrorRejection = noop;\n\n var originalPromise = Promise;\n var originalPromiseThen = Promise.prototype.then;\n var originalPromiseResolve = Promise.resolve.bind(originalPromise);\n var originalPromiseReject = Promise.reject.bind(originalPromise);\n function newPromise(executor) {\n return new originalPromise(executor);\n }\n function promiseResolvedWith(value) {\n return originalPromiseResolve(value);\n }\n function promiseRejectedWith(reason) {\n return originalPromiseReject(reason);\n }\n function PerformPromiseThen(promise, onFulfilled, onRejected) {\n // There doesn't appear to be any way to correctly emulate the behaviour from JavaScript, so this is just an\n // approximation.\n return originalPromiseThen.call(promise, onFulfilled, onRejected);\n }\n function uponPromise(promise, onFulfilled, onRejected) {\n PerformPromiseThen(PerformPromiseThen(promise, onFulfilled, onRejected), undefined, rethrowAssertionErrorRejection);\n }\n function uponFulfillment(promise, onFulfilled) {\n uponPromise(promise, onFulfilled);\n }\n function uponRejection(promise, onRejected) {\n uponPromise(promise, undefined, onRejected);\n }\n function transformPromiseWith(promise, fulfillmentHandler, rejectionHandler) {\n return PerformPromiseThen(promise, fulfillmentHandler, rejectionHandler);\n }\n function setPromiseIsHandledToTrue(promise) {\n PerformPromiseThen(promise, undefined, rethrowAssertionErrorRejection);\n }\n var queueMicrotask = (function () {\n var globalQueueMicrotask = globals && globals.queueMicrotask;\n if (typeof globalQueueMicrotask === 'function') {\n return globalQueueMicrotask;\n }\n var resolvedPromise = promiseResolvedWith(undefined);\n return function (fn) { return PerformPromiseThen(resolvedPromise, fn); };\n })();\n function reflectCall(F, V, args) {\n if (typeof F !== 'function') {\n throw new TypeError('Argument is not a function');\n }\n return Function.prototype.apply.call(F, V, args);\n }\n function promiseCall(F, V, args) {\n try {\n return promiseResolvedWith(reflectCall(F, V, args));\n }\n catch (value) {\n return promiseRejectedWith(value);\n }\n }\n\n // Original from Chromium\n // https://chromium.googlesource.com/chromium/src/+/0aee4434a4dba42a42abaea9bfbc0cd196a63bc1/third_party/blink/renderer/core/streams/SimpleQueue.js\n var QUEUE_MAX_ARRAY_SIZE = 16384;\n /**\n * Simple queue structure.\n *\n * Avoids scalability issues with using a packed array directly by using\n * multiple arrays in a linked list and keeping the array size bounded.\n */\n var SimpleQueue = /** @class */ (function () {\n function SimpleQueue() {\n this._cursor = 0;\n this._size = 0;\n // _front and _back are always defined.\n this._front = {\n _elements: [],\n _next: undefined\n };\n this._back = this._front;\n // The cursor is used to avoid calling Array.shift().\n // It contains the index of the front element of the array inside the\n // front-most node. It is always in the range [0, QUEUE_MAX_ARRAY_SIZE).\n this._cursor = 0;\n // When there is only one node, size === elements.length - cursor.\n this._size = 0;\n }\n Object.defineProperty(SimpleQueue.prototype, \"length\", {\n get: function () {\n return this._size;\n },\n enumerable: false,\n configurable: true\n });\n // For exception safety, this method is structured in order:\n // 1. Read state\n // 2. Calculate required state mutations\n // 3. Perform state mutations\n SimpleQueue.prototype.push = function (element) {\n var oldBack = this._back;\n var newBack = oldBack;\n if (oldBack._elements.length === QUEUE_MAX_ARRAY_SIZE - 1) {\n newBack = {\n _elements: [],\n _next: undefined\n };\n }\n // push() is the mutation most likely to throw an exception, so it\n // goes first.\n oldBack._elements.push(element);\n if (newBack !== oldBack) {\n this._back = newBack;\n oldBack._next = newBack;\n }\n ++this._size;\n };\n // Like push(), shift() follows the read -> calculate -> mutate pattern for\n // exception safety.\n SimpleQueue.prototype.shift = function () { // must not be called on an empty queue\n var oldFront = this._front;\n var newFront = oldFront;\n var oldCursor = this._cursor;\n var newCursor = oldCursor + 1;\n var elements = oldFront._elements;\n var element = elements[oldCursor];\n if (newCursor === QUEUE_MAX_ARRAY_SIZE) {\n newFront = oldFront._next;\n newCursor = 0;\n }\n // No mutations before this point.\n --this._size;\n this._cursor = newCursor;\n if (oldFront !== newFront) {\n this._front = newFront;\n }\n // Permit shifted element to be garbage collected.\n elements[oldCursor] = undefined;\n return element;\n };\n // The tricky thing about forEach() is that it can be called\n // re-entrantly. The queue may be mutated inside the callback. It is easy to\n // see that push() within the callback has no negative effects since the end\n // of the queue is checked for on every iteration. If shift() is called\n // repeatedly within the callback then the next iteration may return an\n // element that has been removed. In this case the callback will be called\n // with undefined values until we either \"catch up\" with elements that still\n // exist or reach the back of the queue.\n SimpleQueue.prototype.forEach = function (callback) {\n var i = this._cursor;\n var node = this._front;\n var elements = node._elements;\n while (i !== elements.length || node._next !== undefined) {\n if (i === elements.length) {\n node = node._next;\n elements = node._elements;\n i = 0;\n if (elements.length === 0) {\n break;\n }\n }\n callback(elements[i]);\n ++i;\n }\n };\n // Return the element that would be returned if shift() was called now,\n // without modifying the queue.\n SimpleQueue.prototype.peek = function () { // must not be called on an empty queue\n var front = this._front;\n var cursor = this._cursor;\n return front._elements[cursor];\n };\n return SimpleQueue;\n }());\n\n function ReadableStreamReaderGenericInitialize(reader, stream) {\n reader._ownerReadableStream = stream;\n stream._reader = reader;\n if (stream._state === 'readable') {\n defaultReaderClosedPromiseInitialize(reader);\n }\n else if (stream._state === 'closed') {\n defaultReaderClosedPromiseInitializeAsResolved(reader);\n }\n else {\n defaultReaderClosedPromiseInitializeAsRejected(reader, stream._storedError);\n }\n }\n // A client of ReadableStreamDefaultReader and ReadableStreamBYOBReader may use these functions directly to bypass state\n // check.\n function ReadableStreamReaderGenericCancel(reader, reason) {\n var stream = reader._ownerReadableStream;\n return ReadableStreamCancel(stream, reason);\n }\n function ReadableStreamReaderGenericRelease(reader) {\n if (reader._ownerReadableStream._state === 'readable') {\n defaultReaderClosedPromiseReject(reader, new TypeError(\"Reader was released and can no longer be used to monitor the stream's closedness\"));\n }\n else {\n defaultReaderClosedPromiseResetToRejected(reader, new TypeError(\"Reader was released and can no longer be used to monitor the stream's closedness\"));\n }\n reader._ownerReadableStream._reader = undefined;\n reader._ownerReadableStream = undefined;\n }\n // Helper functions for the readers.\n function readerLockException(name) {\n return new TypeError('Cannot ' + name + ' a stream using a released reader');\n }\n // Helper functions for the ReadableStreamDefaultReader.\n function defaultReaderClosedPromiseInitialize(reader) {\n reader._closedPromise = newPromise(function (resolve, reject) {\n reader._closedPromise_resolve = resolve;\n reader._closedPromise_reject = reject;\n });\n }\n function defaultReaderClosedPromiseInitializeAsRejected(reader, reason) {\n defaultReaderClosedPromiseInitialize(reader);\n defaultReaderClosedPromiseReject(reader, reason);\n }\n function defaultReaderClosedPromiseInitializeAsResolved(reader) {\n defaultReaderClosedPromiseInitialize(reader);\n defaultReaderClosedPromiseResolve(reader);\n }\n function defaultReaderClosedPromiseReject(reader, reason) {\n if (reader._closedPromise_reject === undefined) {\n return;\n }\n setPromiseIsHandledToTrue(reader._closedPromise);\n reader._closedPromise_reject(reason);\n reader._closedPromise_resolve = undefined;\n reader._closedPromise_reject = undefined;\n }\n function defaultReaderClosedPromiseResetToRejected(reader, reason) {\n defaultReaderClosedPromiseInitializeAsRejected(reader, reason);\n }\n function defaultReaderClosedPromiseResolve(reader) {\n if (reader._closedPromise_resolve === undefined) {\n return;\n }\n reader._closedPromise_resolve(undefined);\n reader._closedPromise_resolve = undefined;\n reader._closedPromise_reject = undefined;\n }\n\n var AbortSteps = SymbolPolyfill('[[AbortSteps]]');\n var ErrorSteps = SymbolPolyfill('[[ErrorSteps]]');\n var CancelSteps = SymbolPolyfill('[[CancelSteps]]');\n var PullSteps = SymbolPolyfill('[[PullSteps]]');\n\n /// \n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite#Polyfill\n var NumberIsFinite = Number.isFinite || function (x) {\n return typeof x === 'number' && isFinite(x);\n };\n\n /// \n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc#Polyfill\n var MathTrunc = Math.trunc || function (v) {\n return v < 0 ? Math.ceil(v) : Math.floor(v);\n };\n\n // https://heycam.github.io/webidl/#idl-dictionaries\n function isDictionary(x) {\n return typeof x === 'object' || typeof x === 'function';\n }\n function assertDictionary(obj, context) {\n if (obj !== undefined && !isDictionary(obj)) {\n throw new TypeError(context + \" is not an object.\");\n }\n }\n // https://heycam.github.io/webidl/#idl-callback-functions\n function assertFunction(x, context) {\n if (typeof x !== 'function') {\n throw new TypeError(context + \" is not a function.\");\n }\n }\n // https://heycam.github.io/webidl/#idl-object\n function isObject(x) {\n return (typeof x === 'object' && x !== null) || typeof x === 'function';\n }\n function assertObject(x, context) {\n if (!isObject(x)) {\n throw new TypeError(context + \" is not an object.\");\n }\n }\n function assertRequiredArgument(x, position, context) {\n if (x === undefined) {\n throw new TypeError(\"Parameter \" + position + \" is required in '\" + context + \"'.\");\n }\n }\n function assertRequiredField(x, field, context) {\n if (x === undefined) {\n throw new TypeError(field + \" is required in '\" + context + \"'.\");\n }\n }\n // https://heycam.github.io/webidl/#idl-unrestricted-double\n function convertUnrestrictedDouble(value) {\n return Number(value);\n }\n function censorNegativeZero(x) {\n return x === 0 ? 0 : x;\n }\n function integerPart(x) {\n return censorNegativeZero(MathTrunc(x));\n }\n // https://heycam.github.io/webidl/#idl-unsigned-long-long\n function convertUnsignedLongLongWithEnforceRange(value, context) {\n var lowerBound = 0;\n var upperBound = Number.MAX_SAFE_INTEGER;\n var x = Number(value);\n x = censorNegativeZero(x);\n if (!NumberIsFinite(x)) {\n throw new TypeError(context + \" is not a finite number\");\n }\n x = integerPart(x);\n if (x < lowerBound || x > upperBound) {\n throw new TypeError(context + \" is outside the accepted range of \" + lowerBound + \" to \" + upperBound + \", inclusive\");\n }\n if (!NumberIsFinite(x) || x === 0) {\n return 0;\n }\n // TODO Use BigInt if supported?\n // let xBigInt = BigInt(integerPart(x));\n // xBigInt = BigInt.asUintN(64, xBigInt);\n // return Number(xBigInt);\n return x;\n }\n\n function assertReadableStream(x, context) {\n if (!IsReadableStream(x)) {\n throw new TypeError(context + \" is not a ReadableStream.\");\n }\n }\n\n // Abstract operations for the ReadableStream.\n function AcquireReadableStreamDefaultReader(stream) {\n return new ReadableStreamDefaultReader(stream);\n }\n // ReadableStream API exposed for controllers.\n function ReadableStreamAddReadRequest(stream, readRequest) {\n stream._reader._readRequests.push(readRequest);\n }\n function ReadableStreamFulfillReadRequest(stream, chunk, done) {\n var reader = stream._reader;\n var readRequest = reader._readRequests.shift();\n if (done) {\n readRequest._closeSteps();\n }\n else {\n readRequest._chunkSteps(chunk);\n }\n }\n function ReadableStreamGetNumReadRequests(stream) {\n return stream._reader._readRequests.length;\n }\n function ReadableStreamHasDefaultReader(stream) {\n var reader = stream._reader;\n if (reader === undefined) {\n return false;\n }\n if (!IsReadableStreamDefaultReader(reader)) {\n return false;\n }\n return true;\n }\n /**\n * A default reader vended by a {@link ReadableStream}.\n *\n * @public\n */\n var ReadableStreamDefaultReader = /** @class */ (function () {\n function ReadableStreamDefaultReader(stream) {\n assertRequiredArgument(stream, 1, 'ReadableStreamDefaultReader');\n assertReadableStream(stream, 'First parameter');\n if (IsReadableStreamLocked(stream)) {\n throw new TypeError('This stream has already been locked for exclusive reading by another reader');\n }\n ReadableStreamReaderGenericInitialize(this, stream);\n this._readRequests = new SimpleQueue();\n }\n Object.defineProperty(ReadableStreamDefaultReader.prototype, \"closed\", {\n /**\n * Returns a promise that will be fulfilled when the stream becomes closed,\n * or rejected if the stream ever errors or the reader's lock is released before the stream finishes closing.\n */\n get: function () {\n if (!IsReadableStreamDefaultReader(this)) {\n return promiseRejectedWith(defaultReaderBrandCheckException('closed'));\n }\n return this._closedPromise;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * If the reader is active, behaves the same as {@link ReadableStream.cancel | stream.cancel(reason)}.\n */\n ReadableStreamDefaultReader.prototype.cancel = function (reason) {\n if (reason === void 0) { reason = undefined; }\n if (!IsReadableStreamDefaultReader(this)) {\n return promiseRejectedWith(defaultReaderBrandCheckException('cancel'));\n }\n if (this._ownerReadableStream === undefined) {\n return promiseRejectedWith(readerLockException('cancel'));\n }\n return ReadableStreamReaderGenericCancel(this, reason);\n };\n /**\n * Returns a promise that allows access to the next chunk from the stream's internal queue, if available.\n *\n * If reading a chunk causes the queue to become empty, more data will be pulled from the underlying source.\n */\n ReadableStreamDefaultReader.prototype.read = function () {\n if (!IsReadableStreamDefaultReader(this)) {\n return promiseRejectedWith(defaultReaderBrandCheckException('read'));\n }\n if (this._ownerReadableStream === undefined) {\n return promiseRejectedWith(readerLockException('read from'));\n }\n var resolvePromise;\n var rejectPromise;\n var promise = newPromise(function (resolve, reject) {\n resolvePromise = resolve;\n rejectPromise = reject;\n });\n var readRequest = {\n _chunkSteps: function (chunk) { return resolvePromise({ value: chunk, done: false }); },\n _closeSteps: function () { return resolvePromise({ value: undefined, done: true }); },\n _errorSteps: function (e) { return rejectPromise(e); }\n };\n ReadableStreamDefaultReaderRead(this, readRequest);\n return promise;\n };\n /**\n * Releases the reader's lock on the corresponding stream. After the lock is released, the reader is no longer active.\n * If the associated stream is errored when the lock is released, the reader will appear errored in the same way\n * from now on; otherwise, the reader will appear closed.\n *\n * A reader's lock cannot be released while it still has a pending read request, i.e., if a promise returned by\n * the reader's {@link ReadableStreamDefaultReader.read | read()} method has not yet been settled. Attempting to\n * do so will throw a `TypeError` and leave the reader locked to the stream.\n */\n ReadableStreamDefaultReader.prototype.releaseLock = function () {\n if (!IsReadableStreamDefaultReader(this)) {\n throw defaultReaderBrandCheckException('releaseLock');\n }\n if (this._ownerReadableStream === undefined) {\n return;\n }\n if (this._readRequests.length > 0) {\n throw new TypeError('Tried to release a reader lock when that reader has pending read() calls un-settled');\n }\n ReadableStreamReaderGenericRelease(this);\n };\n return ReadableStreamDefaultReader;\n }());\n Object.defineProperties(ReadableStreamDefaultReader.prototype, {\n cancel: { enumerable: true },\n read: { enumerable: true },\n releaseLock: { enumerable: true },\n closed: { enumerable: true }\n });\n if (typeof SymbolPolyfill.toStringTag === 'symbol') {\n Object.defineProperty(ReadableStreamDefaultReader.prototype, SymbolPolyfill.toStringTag, {\n value: 'ReadableStreamDefaultReader',\n configurable: true\n });\n }\n // Abstract operations for the readers.\n function IsReadableStreamDefaultReader(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n if (!Object.prototype.hasOwnProperty.call(x, '_readRequests')) {\n return false;\n }\n return x instanceof ReadableStreamDefaultReader;\n }\n function ReadableStreamDefaultReaderRead(reader, readRequest) {\n var stream = reader._ownerReadableStream;\n stream._disturbed = true;\n if (stream._state === 'closed') {\n readRequest._closeSteps();\n }\n else if (stream._state === 'errored') {\n readRequest._errorSteps(stream._storedError);\n }\n else {\n stream._readableStreamController[PullSteps](readRequest);\n }\n }\n // Helper functions for the ReadableStreamDefaultReader.\n function defaultReaderBrandCheckException(name) {\n return new TypeError(\"ReadableStreamDefaultReader.prototype.\" + name + \" can only be used on a ReadableStreamDefaultReader\");\n }\n\n /// \n var _a;\n var AsyncIteratorPrototype;\n if (typeof SymbolPolyfill.asyncIterator === 'symbol') {\n // We're running inside a ES2018+ environment, but we're compiling to an older syntax.\n // We cannot access %AsyncIteratorPrototype% without non-ES2018 syntax, but we can re-create it.\n AsyncIteratorPrototype = (_a = {},\n // 25.1.3.1 %AsyncIteratorPrototype% [ @@asyncIterator ] ( )\n // https://tc39.github.io/ecma262/#sec-asynciteratorprototype-asynciterator\n _a[SymbolPolyfill.asyncIterator] = function () {\n return this;\n },\n _a);\n Object.defineProperty(AsyncIteratorPrototype, SymbolPolyfill.asyncIterator, { enumerable: false });\n }\n\n /// \n var ReadableStreamAsyncIteratorImpl = /** @class */ (function () {\n function ReadableStreamAsyncIteratorImpl(reader, preventCancel) {\n this._ongoingPromise = undefined;\n this._isFinished = false;\n this._reader = reader;\n this._preventCancel = preventCancel;\n }\n ReadableStreamAsyncIteratorImpl.prototype.next = function () {\n var _this = this;\n var nextSteps = function () { return _this._nextSteps(); };\n this._ongoingPromise = this._ongoingPromise ?\n transformPromiseWith(this._ongoingPromise, nextSteps, nextSteps) :\n nextSteps();\n return this._ongoingPromise;\n };\n ReadableStreamAsyncIteratorImpl.prototype.return = function (value) {\n var _this = this;\n var returnSteps = function () { return _this._returnSteps(value); };\n return this._ongoingPromise ?\n transformPromiseWith(this._ongoingPromise, returnSteps, returnSteps) :\n returnSteps();\n };\n ReadableStreamAsyncIteratorImpl.prototype._nextSteps = function () {\n var _this = this;\n if (this._isFinished) {\n return Promise.resolve({ value: undefined, done: true });\n }\n var reader = this._reader;\n if (reader._ownerReadableStream === undefined) {\n return promiseRejectedWith(readerLockException('iterate'));\n }\n var resolvePromise;\n var rejectPromise;\n var promise = newPromise(function (resolve, reject) {\n resolvePromise = resolve;\n rejectPromise = reject;\n });\n var readRequest = {\n _chunkSteps: function (chunk) {\n _this._ongoingPromise = undefined;\n // This needs to be delayed by one microtask, otherwise we stop pulling too early which breaks a test.\n // FIXME Is this a bug in the specification, or in the test?\n queueMicrotask(function () { return resolvePromise({ value: chunk, done: false }); });\n },\n _closeSteps: function () {\n _this._ongoingPromise = undefined;\n _this._isFinished = true;\n ReadableStreamReaderGenericRelease(reader);\n resolvePromise({ value: undefined, done: true });\n },\n _errorSteps: function (reason) {\n _this._ongoingPromise = undefined;\n _this._isFinished = true;\n ReadableStreamReaderGenericRelease(reader);\n rejectPromise(reason);\n }\n };\n ReadableStreamDefaultReaderRead(reader, readRequest);\n return promise;\n };\n ReadableStreamAsyncIteratorImpl.prototype._returnSteps = function (value) {\n if (this._isFinished) {\n return Promise.resolve({ value: value, done: true });\n }\n this._isFinished = true;\n var reader = this._reader;\n if (reader._ownerReadableStream === undefined) {\n return promiseRejectedWith(readerLockException('finish iterating'));\n }\n if (!this._preventCancel) {\n var result = ReadableStreamReaderGenericCancel(reader, value);\n ReadableStreamReaderGenericRelease(reader);\n return transformPromiseWith(result, function () { return ({ value: value, done: true }); });\n }\n ReadableStreamReaderGenericRelease(reader);\n return promiseResolvedWith({ value: value, done: true });\n };\n return ReadableStreamAsyncIteratorImpl;\n }());\n var ReadableStreamAsyncIteratorPrototype = {\n next: function () {\n if (!IsReadableStreamAsyncIterator(this)) {\n return promiseRejectedWith(streamAsyncIteratorBrandCheckException('next'));\n }\n return this._asyncIteratorImpl.next();\n },\n return: function (value) {\n if (!IsReadableStreamAsyncIterator(this)) {\n return promiseRejectedWith(streamAsyncIteratorBrandCheckException('return'));\n }\n return this._asyncIteratorImpl.return(value);\n }\n };\n if (AsyncIteratorPrototype !== undefined) {\n Object.setPrototypeOf(ReadableStreamAsyncIteratorPrototype, AsyncIteratorPrototype);\n }\n // Abstract operations for the ReadableStream.\n function AcquireReadableStreamAsyncIterator(stream, preventCancel) {\n var reader = AcquireReadableStreamDefaultReader(stream);\n var impl = new ReadableStreamAsyncIteratorImpl(reader, preventCancel);\n var iterator = Object.create(ReadableStreamAsyncIteratorPrototype);\n iterator._asyncIteratorImpl = impl;\n return iterator;\n }\n function IsReadableStreamAsyncIterator(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n if (!Object.prototype.hasOwnProperty.call(x, '_asyncIteratorImpl')) {\n return false;\n }\n try {\n // noinspection SuspiciousTypeOfGuard\n return x._asyncIteratorImpl instanceof\n ReadableStreamAsyncIteratorImpl;\n }\n catch (_a) {\n return false;\n }\n }\n // Helper functions for the ReadableStream.\n function streamAsyncIteratorBrandCheckException(name) {\n return new TypeError(\"ReadableStreamAsyncIterator.\" + name + \" can only be used on a ReadableSteamAsyncIterator\");\n }\n\n /// \n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN#Polyfill\n var NumberIsNaN = Number.isNaN || function (x) {\n // eslint-disable-next-line no-self-compare\n return x !== x;\n };\n\n function CreateArrayFromList(elements) {\n // We use arrays to represent lists, so this is basically a no-op.\n // Do a slice though just in case we happen to depend on the unique-ness.\n return elements.slice();\n }\n function CopyDataBlockBytes(dest, destOffset, src, srcOffset, n) {\n new Uint8Array(dest).set(new Uint8Array(src, srcOffset, n), destOffset);\n }\n // Not implemented correctly\n function TransferArrayBuffer(O) {\n return O;\n }\n // Not implemented correctly\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n function IsDetachedBuffer(O) {\n return false;\n }\n function ArrayBufferSlice(buffer, begin, end) {\n // ArrayBuffer.prototype.slice is not available on IE10\n // https://www.caniuse.com/mdn-javascript_builtins_arraybuffer_slice\n if (buffer.slice) {\n return buffer.slice(begin, end);\n }\n var length = end - begin;\n var slice = new ArrayBuffer(length);\n CopyDataBlockBytes(slice, 0, buffer, begin, length);\n return slice;\n }\n\n function IsNonNegativeNumber(v) {\n if (typeof v !== 'number') {\n return false;\n }\n if (NumberIsNaN(v)) {\n return false;\n }\n if (v < 0) {\n return false;\n }\n return true;\n }\n function CloneAsUint8Array(O) {\n var buffer = ArrayBufferSlice(O.buffer, O.byteOffset, O.byteOffset + O.byteLength);\n return new Uint8Array(buffer);\n }\n\n function DequeueValue(container) {\n var pair = container._queue.shift();\n container._queueTotalSize -= pair.size;\n if (container._queueTotalSize < 0) {\n container._queueTotalSize = 0;\n }\n return pair.value;\n }\n function EnqueueValueWithSize(container, value, size) {\n if (!IsNonNegativeNumber(size) || size === Infinity) {\n throw new RangeError('Size must be a finite, non-NaN, non-negative number.');\n }\n container._queue.push({ value: value, size: size });\n container._queueTotalSize += size;\n }\n function PeekQueueValue(container) {\n var pair = container._queue.peek();\n return pair.value;\n }\n function ResetQueue(container) {\n container._queue = new SimpleQueue();\n container._queueTotalSize = 0;\n }\n\n /**\n * A pull-into request in a {@link ReadableByteStreamController}.\n *\n * @public\n */\n var ReadableStreamBYOBRequest = /** @class */ (function () {\n function ReadableStreamBYOBRequest() {\n throw new TypeError('Illegal constructor');\n }\n Object.defineProperty(ReadableStreamBYOBRequest.prototype, \"view\", {\n /**\n * Returns the view for writing in to, or `null` if the BYOB request has already been responded to.\n */\n get: function () {\n if (!IsReadableStreamBYOBRequest(this)) {\n throw byobRequestBrandCheckException('view');\n }\n return this._view;\n },\n enumerable: false,\n configurable: true\n });\n ReadableStreamBYOBRequest.prototype.respond = function (bytesWritten) {\n if (!IsReadableStreamBYOBRequest(this)) {\n throw byobRequestBrandCheckException('respond');\n }\n assertRequiredArgument(bytesWritten, 1, 'respond');\n bytesWritten = convertUnsignedLongLongWithEnforceRange(bytesWritten, 'First parameter');\n if (this._associatedReadableByteStreamController === undefined) {\n throw new TypeError('This BYOB request has been invalidated');\n }\n if (IsDetachedBuffer(this._view.buffer)) ;\n ReadableByteStreamControllerRespond(this._associatedReadableByteStreamController, bytesWritten);\n };\n ReadableStreamBYOBRequest.prototype.respondWithNewView = function (view) {\n if (!IsReadableStreamBYOBRequest(this)) {\n throw byobRequestBrandCheckException('respondWithNewView');\n }\n assertRequiredArgument(view, 1, 'respondWithNewView');\n if (!ArrayBuffer.isView(view)) {\n throw new TypeError('You can only respond with array buffer views');\n }\n if (this._associatedReadableByteStreamController === undefined) {\n throw new TypeError('This BYOB request has been invalidated');\n }\n if (IsDetachedBuffer(view.buffer)) ;\n ReadableByteStreamControllerRespondWithNewView(this._associatedReadableByteStreamController, view);\n };\n return ReadableStreamBYOBRequest;\n }());\n Object.defineProperties(ReadableStreamBYOBRequest.prototype, {\n respond: { enumerable: true },\n respondWithNewView: { enumerable: true },\n view: { enumerable: true }\n });\n if (typeof SymbolPolyfill.toStringTag === 'symbol') {\n Object.defineProperty(ReadableStreamBYOBRequest.prototype, SymbolPolyfill.toStringTag, {\n value: 'ReadableStreamBYOBRequest',\n configurable: true\n });\n }\n /**\n * Allows control of a {@link ReadableStream | readable byte stream}'s state and internal queue.\n *\n * @public\n */\n var ReadableByteStreamController = /** @class */ (function () {\n function ReadableByteStreamController() {\n throw new TypeError('Illegal constructor');\n }\n Object.defineProperty(ReadableByteStreamController.prototype, \"byobRequest\", {\n /**\n * Returns the current BYOB pull request, or `null` if there isn't one.\n */\n get: function () {\n if (!IsReadableByteStreamController(this)) {\n throw byteStreamControllerBrandCheckException('byobRequest');\n }\n return ReadableByteStreamControllerGetBYOBRequest(this);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ReadableByteStreamController.prototype, \"desiredSize\", {\n /**\n * Returns the desired size to fill the controlled stream's internal queue. It can be negative, if the queue is\n * over-full. An underlying byte source ought to use this information to determine when and how to apply backpressure.\n */\n get: function () {\n if (!IsReadableByteStreamController(this)) {\n throw byteStreamControllerBrandCheckException('desiredSize');\n }\n return ReadableByteStreamControllerGetDesiredSize(this);\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Closes the controlled readable stream. Consumers will still be able to read any previously-enqueued chunks from\n * the stream, but once those are read, the stream will become closed.\n */\n ReadableByteStreamController.prototype.close = function () {\n if (!IsReadableByteStreamController(this)) {\n throw byteStreamControllerBrandCheckException('close');\n }\n if (this._closeRequested) {\n throw new TypeError('The stream has already been closed; do not close it again!');\n }\n var state = this._controlledReadableByteStream._state;\n if (state !== 'readable') {\n throw new TypeError(\"The stream (in \" + state + \" state) is not in the readable state and cannot be closed\");\n }\n ReadableByteStreamControllerClose(this);\n };\n ReadableByteStreamController.prototype.enqueue = function (chunk) {\n if (!IsReadableByteStreamController(this)) {\n throw byteStreamControllerBrandCheckException('enqueue');\n }\n assertRequiredArgument(chunk, 1, 'enqueue');\n if (!ArrayBuffer.isView(chunk)) {\n throw new TypeError('chunk must be an array buffer view');\n }\n if (chunk.byteLength === 0) {\n throw new TypeError('chunk must have non-zero byteLength');\n }\n if (chunk.buffer.byteLength === 0) {\n throw new TypeError(\"chunk's buffer must have non-zero byteLength\");\n }\n if (this._closeRequested) {\n throw new TypeError('stream is closed or draining');\n }\n var state = this._controlledReadableByteStream._state;\n if (state !== 'readable') {\n throw new TypeError(\"The stream (in \" + state + \" state) is not in the readable state and cannot be enqueued to\");\n }\n ReadableByteStreamControllerEnqueue(this, chunk);\n };\n /**\n * Errors the controlled readable stream, making all future interactions with it fail with the given error `e`.\n */\n ReadableByteStreamController.prototype.error = function (e) {\n if (e === void 0) { e = undefined; }\n if (!IsReadableByteStreamController(this)) {\n throw byteStreamControllerBrandCheckException('error');\n }\n ReadableByteStreamControllerError(this, e);\n };\n /** @internal */\n ReadableByteStreamController.prototype[CancelSteps] = function (reason) {\n ReadableByteStreamControllerClearPendingPullIntos(this);\n ResetQueue(this);\n var result = this._cancelAlgorithm(reason);\n ReadableByteStreamControllerClearAlgorithms(this);\n return result;\n };\n /** @internal */\n ReadableByteStreamController.prototype[PullSteps] = function (readRequest) {\n var stream = this._controlledReadableByteStream;\n if (this._queueTotalSize > 0) {\n var entry = this._queue.shift();\n this._queueTotalSize -= entry.byteLength;\n ReadableByteStreamControllerHandleQueueDrain(this);\n var view = new Uint8Array(entry.buffer, entry.byteOffset, entry.byteLength);\n readRequest._chunkSteps(view);\n return;\n }\n var autoAllocateChunkSize = this._autoAllocateChunkSize;\n if (autoAllocateChunkSize !== undefined) {\n var buffer = void 0;\n try {\n buffer = new ArrayBuffer(autoAllocateChunkSize);\n }\n catch (bufferE) {\n readRequest._errorSteps(bufferE);\n return;\n }\n var pullIntoDescriptor = {\n buffer: buffer,\n bufferByteLength: autoAllocateChunkSize,\n byteOffset: 0,\n byteLength: autoAllocateChunkSize,\n bytesFilled: 0,\n elementSize: 1,\n viewConstructor: Uint8Array,\n readerType: 'default'\n };\n this._pendingPullIntos.push(pullIntoDescriptor);\n }\n ReadableStreamAddReadRequest(stream, readRequest);\n ReadableByteStreamControllerCallPullIfNeeded(this);\n };\n return ReadableByteStreamController;\n }());\n Object.defineProperties(ReadableByteStreamController.prototype, {\n close: { enumerable: true },\n enqueue: { enumerable: true },\n error: { enumerable: true },\n byobRequest: { enumerable: true },\n desiredSize: { enumerable: true }\n });\n if (typeof SymbolPolyfill.toStringTag === 'symbol') {\n Object.defineProperty(ReadableByteStreamController.prototype, SymbolPolyfill.toStringTag, {\n value: 'ReadableByteStreamController',\n configurable: true\n });\n }\n // Abstract operations for the ReadableByteStreamController.\n function IsReadableByteStreamController(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n if (!Object.prototype.hasOwnProperty.call(x, '_controlledReadableByteStream')) {\n return false;\n }\n return x instanceof ReadableByteStreamController;\n }\n function IsReadableStreamBYOBRequest(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n if (!Object.prototype.hasOwnProperty.call(x, '_associatedReadableByteStreamController')) {\n return false;\n }\n return x instanceof ReadableStreamBYOBRequest;\n }\n function ReadableByteStreamControllerCallPullIfNeeded(controller) {\n var shouldPull = ReadableByteStreamControllerShouldCallPull(controller);\n if (!shouldPull) {\n return;\n }\n if (controller._pulling) {\n controller._pullAgain = true;\n return;\n }\n controller._pulling = true;\n // TODO: Test controller argument\n var pullPromise = controller._pullAlgorithm();\n uponPromise(pullPromise, function () {\n controller._pulling = false;\n if (controller._pullAgain) {\n controller._pullAgain = false;\n ReadableByteStreamControllerCallPullIfNeeded(controller);\n }\n }, function (e) {\n ReadableByteStreamControllerError(controller, e);\n });\n }\n function ReadableByteStreamControllerClearPendingPullIntos(controller) {\n ReadableByteStreamControllerInvalidateBYOBRequest(controller);\n controller._pendingPullIntos = new SimpleQueue();\n }\n function ReadableByteStreamControllerCommitPullIntoDescriptor(stream, pullIntoDescriptor) {\n var done = false;\n if (stream._state === 'closed') {\n done = true;\n }\n var filledView = ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor);\n if (pullIntoDescriptor.readerType === 'default') {\n ReadableStreamFulfillReadRequest(stream, filledView, done);\n }\n else {\n ReadableStreamFulfillReadIntoRequest(stream, filledView, done);\n }\n }\n function ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor) {\n var bytesFilled = pullIntoDescriptor.bytesFilled;\n var elementSize = pullIntoDescriptor.elementSize;\n return new pullIntoDescriptor.viewConstructor(pullIntoDescriptor.buffer, pullIntoDescriptor.byteOffset, bytesFilled / elementSize);\n }\n function ReadableByteStreamControllerEnqueueChunkToQueue(controller, buffer, byteOffset, byteLength) {\n controller._queue.push({ buffer: buffer, byteOffset: byteOffset, byteLength: byteLength });\n controller._queueTotalSize += byteLength;\n }\n function ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor) {\n var elementSize = pullIntoDescriptor.elementSize;\n var currentAlignedBytes = pullIntoDescriptor.bytesFilled - pullIntoDescriptor.bytesFilled % elementSize;\n var maxBytesToCopy = Math.min(controller._queueTotalSize, pullIntoDescriptor.byteLength - pullIntoDescriptor.bytesFilled);\n var maxBytesFilled = pullIntoDescriptor.bytesFilled + maxBytesToCopy;\n var maxAlignedBytes = maxBytesFilled - maxBytesFilled % elementSize;\n var totalBytesToCopyRemaining = maxBytesToCopy;\n var ready = false;\n if (maxAlignedBytes > currentAlignedBytes) {\n totalBytesToCopyRemaining = maxAlignedBytes - pullIntoDescriptor.bytesFilled;\n ready = true;\n }\n var queue = controller._queue;\n while (totalBytesToCopyRemaining > 0) {\n var headOfQueue = queue.peek();\n var bytesToCopy = Math.min(totalBytesToCopyRemaining, headOfQueue.byteLength);\n var destStart = pullIntoDescriptor.byteOffset + pullIntoDescriptor.bytesFilled;\n CopyDataBlockBytes(pullIntoDescriptor.buffer, destStart, headOfQueue.buffer, headOfQueue.byteOffset, bytesToCopy);\n if (headOfQueue.byteLength === bytesToCopy) {\n queue.shift();\n }\n else {\n headOfQueue.byteOffset += bytesToCopy;\n headOfQueue.byteLength -= bytesToCopy;\n }\n controller._queueTotalSize -= bytesToCopy;\n ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, bytesToCopy, pullIntoDescriptor);\n totalBytesToCopyRemaining -= bytesToCopy;\n }\n return ready;\n }\n function ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, size, pullIntoDescriptor) {\n pullIntoDescriptor.bytesFilled += size;\n }\n function ReadableByteStreamControllerHandleQueueDrain(controller) {\n if (controller._queueTotalSize === 0 && controller._closeRequested) {\n ReadableByteStreamControllerClearAlgorithms(controller);\n ReadableStreamClose(controller._controlledReadableByteStream);\n }\n else {\n ReadableByteStreamControllerCallPullIfNeeded(controller);\n }\n }\n function ReadableByteStreamControllerInvalidateBYOBRequest(controller) {\n if (controller._byobRequest === null) {\n return;\n }\n controller._byobRequest._associatedReadableByteStreamController = undefined;\n controller._byobRequest._view = null;\n controller._byobRequest = null;\n }\n function ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller) {\n while (controller._pendingPullIntos.length > 0) {\n if (controller._queueTotalSize === 0) {\n return;\n }\n var pullIntoDescriptor = controller._pendingPullIntos.peek();\n if (ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor)) {\n ReadableByteStreamControllerShiftPendingPullInto(controller);\n ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableByteStream, pullIntoDescriptor);\n }\n }\n }\n function ReadableByteStreamControllerPullInto(controller, view, readIntoRequest) {\n var stream = controller._controlledReadableByteStream;\n var elementSize = 1;\n if (view.constructor !== DataView) {\n elementSize = view.constructor.BYTES_PER_ELEMENT;\n }\n var ctor = view.constructor;\n // try {\n var buffer = TransferArrayBuffer(view.buffer);\n // } catch (e) {\n // readIntoRequest._errorSteps(e);\n // return;\n // }\n var pullIntoDescriptor = {\n buffer: buffer,\n bufferByteLength: buffer.byteLength,\n byteOffset: view.byteOffset,\n byteLength: view.byteLength,\n bytesFilled: 0,\n elementSize: elementSize,\n viewConstructor: ctor,\n readerType: 'byob'\n };\n if (controller._pendingPullIntos.length > 0) {\n controller._pendingPullIntos.push(pullIntoDescriptor);\n // No ReadableByteStreamControllerCallPullIfNeeded() call since:\n // - No change happens on desiredSize\n // - The source has already been notified of that there's at least 1 pending read(view)\n ReadableStreamAddReadIntoRequest(stream, readIntoRequest);\n return;\n }\n if (stream._state === 'closed') {\n var emptyView = new ctor(pullIntoDescriptor.buffer, pullIntoDescriptor.byteOffset, 0);\n readIntoRequest._closeSteps(emptyView);\n return;\n }\n if (controller._queueTotalSize > 0) {\n if (ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor)) {\n var filledView = ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor);\n ReadableByteStreamControllerHandleQueueDrain(controller);\n readIntoRequest._chunkSteps(filledView);\n return;\n }\n if (controller._closeRequested) {\n var e = new TypeError('Insufficient bytes to fill elements in the given buffer');\n ReadableByteStreamControllerError(controller, e);\n readIntoRequest._errorSteps(e);\n return;\n }\n }\n controller._pendingPullIntos.push(pullIntoDescriptor);\n ReadableStreamAddReadIntoRequest(stream, readIntoRequest);\n ReadableByteStreamControllerCallPullIfNeeded(controller);\n }\n function ReadableByteStreamControllerRespondInClosedState(controller, firstDescriptor) {\n var stream = controller._controlledReadableByteStream;\n if (ReadableStreamHasBYOBReader(stream)) {\n while (ReadableStreamGetNumReadIntoRequests(stream) > 0) {\n var pullIntoDescriptor = ReadableByteStreamControllerShiftPendingPullInto(controller);\n ReadableByteStreamControllerCommitPullIntoDescriptor(stream, pullIntoDescriptor);\n }\n }\n }\n function ReadableByteStreamControllerRespondInReadableState(controller, bytesWritten, pullIntoDescriptor) {\n ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, bytesWritten, pullIntoDescriptor);\n if (pullIntoDescriptor.bytesFilled < pullIntoDescriptor.elementSize) {\n return;\n }\n ReadableByteStreamControllerShiftPendingPullInto(controller);\n var remainderSize = pullIntoDescriptor.bytesFilled % pullIntoDescriptor.elementSize;\n if (remainderSize > 0) {\n var end = pullIntoDescriptor.byteOffset + pullIntoDescriptor.bytesFilled;\n var remainder = ArrayBufferSlice(pullIntoDescriptor.buffer, end - remainderSize, end);\n ReadableByteStreamControllerEnqueueChunkToQueue(controller, remainder, 0, remainder.byteLength);\n }\n pullIntoDescriptor.bytesFilled -= remainderSize;\n ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableByteStream, pullIntoDescriptor);\n ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller);\n }\n function ReadableByteStreamControllerRespondInternal(controller, bytesWritten) {\n var firstDescriptor = controller._pendingPullIntos.peek();\n ReadableByteStreamControllerInvalidateBYOBRequest(controller);\n var state = controller._controlledReadableByteStream._state;\n if (state === 'closed') {\n ReadableByteStreamControllerRespondInClosedState(controller);\n }\n else {\n ReadableByteStreamControllerRespondInReadableState(controller, bytesWritten, firstDescriptor);\n }\n ReadableByteStreamControllerCallPullIfNeeded(controller);\n }\n function ReadableByteStreamControllerShiftPendingPullInto(controller) {\n var descriptor = controller._pendingPullIntos.shift();\n return descriptor;\n }\n function ReadableByteStreamControllerShouldCallPull(controller) {\n var stream = controller._controlledReadableByteStream;\n if (stream._state !== 'readable') {\n return false;\n }\n if (controller._closeRequested) {\n return false;\n }\n if (!controller._started) {\n return false;\n }\n if (ReadableStreamHasDefaultReader(stream) && ReadableStreamGetNumReadRequests(stream) > 0) {\n return true;\n }\n if (ReadableStreamHasBYOBReader(stream) && ReadableStreamGetNumReadIntoRequests(stream) > 0) {\n return true;\n }\n var desiredSize = ReadableByteStreamControllerGetDesiredSize(controller);\n if (desiredSize > 0) {\n return true;\n }\n return false;\n }\n function ReadableByteStreamControllerClearAlgorithms(controller) {\n controller._pullAlgorithm = undefined;\n controller._cancelAlgorithm = undefined;\n }\n // A client of ReadableByteStreamController may use these functions directly to bypass state check.\n function ReadableByteStreamControllerClose(controller) {\n var stream = controller._controlledReadableByteStream;\n if (controller._closeRequested || stream._state !== 'readable') {\n return;\n }\n if (controller._queueTotalSize > 0) {\n controller._closeRequested = true;\n return;\n }\n if (controller._pendingPullIntos.length > 0) {\n var firstPendingPullInto = controller._pendingPullIntos.peek();\n if (firstPendingPullInto.bytesFilled > 0) {\n var e = new TypeError('Insufficient bytes to fill elements in the given buffer');\n ReadableByteStreamControllerError(controller, e);\n throw e;\n }\n }\n ReadableByteStreamControllerClearAlgorithms(controller);\n ReadableStreamClose(stream);\n }\n function ReadableByteStreamControllerEnqueue(controller, chunk) {\n var stream = controller._controlledReadableByteStream;\n if (controller._closeRequested || stream._state !== 'readable') {\n return;\n }\n var buffer = chunk.buffer;\n var byteOffset = chunk.byteOffset;\n var byteLength = chunk.byteLength;\n var transferredBuffer = TransferArrayBuffer(buffer);\n if (controller._pendingPullIntos.length > 0) {\n var firstPendingPullInto = controller._pendingPullIntos.peek();\n if (IsDetachedBuffer(firstPendingPullInto.buffer)) ;\n firstPendingPullInto.buffer = TransferArrayBuffer(firstPendingPullInto.buffer);\n }\n ReadableByteStreamControllerInvalidateBYOBRequest(controller);\n if (ReadableStreamHasDefaultReader(stream)) {\n if (ReadableStreamGetNumReadRequests(stream) === 0) {\n ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength);\n }\n else {\n var transferredView = new Uint8Array(transferredBuffer, byteOffset, byteLength);\n ReadableStreamFulfillReadRequest(stream, transferredView, false);\n }\n }\n else if (ReadableStreamHasBYOBReader(stream)) {\n // TODO: Ideally in this branch detaching should happen only if the buffer is not consumed fully.\n ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength);\n ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller);\n }\n else {\n ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength);\n }\n ReadableByteStreamControllerCallPullIfNeeded(controller);\n }\n function ReadableByteStreamControllerError(controller, e) {\n var stream = controller._controlledReadableByteStream;\n if (stream._state !== 'readable') {\n return;\n }\n ReadableByteStreamControllerClearPendingPullIntos(controller);\n ResetQueue(controller);\n ReadableByteStreamControllerClearAlgorithms(controller);\n ReadableStreamError(stream, e);\n }\n function ReadableByteStreamControllerGetBYOBRequest(controller) {\n if (controller._byobRequest === null && controller._pendingPullIntos.length > 0) {\n var firstDescriptor = controller._pendingPullIntos.peek();\n var view = new Uint8Array(firstDescriptor.buffer, firstDescriptor.byteOffset + firstDescriptor.bytesFilled, firstDescriptor.byteLength - firstDescriptor.bytesFilled);\n var byobRequest = Object.create(ReadableStreamBYOBRequest.prototype);\n SetUpReadableStreamBYOBRequest(byobRequest, controller, view);\n controller._byobRequest = byobRequest;\n }\n return controller._byobRequest;\n }\n function ReadableByteStreamControllerGetDesiredSize(controller) {\n var state = controller._controlledReadableByteStream._state;\n if (state === 'errored') {\n return null;\n }\n if (state === 'closed') {\n return 0;\n }\n return controller._strategyHWM - controller._queueTotalSize;\n }\n function ReadableByteStreamControllerRespond(controller, bytesWritten) {\n var firstDescriptor = controller._pendingPullIntos.peek();\n var state = controller._controlledReadableByteStream._state;\n if (state === 'closed') {\n if (bytesWritten !== 0) {\n throw new TypeError('bytesWritten must be 0 when calling respond() on a closed stream');\n }\n }\n else {\n if (bytesWritten === 0) {\n throw new TypeError('bytesWritten must be greater than 0 when calling respond() on a readable stream');\n }\n if (firstDescriptor.bytesFilled + bytesWritten > firstDescriptor.byteLength) {\n throw new RangeError('bytesWritten out of range');\n }\n }\n firstDescriptor.buffer = TransferArrayBuffer(firstDescriptor.buffer);\n ReadableByteStreamControllerRespondInternal(controller, bytesWritten);\n }\n function ReadableByteStreamControllerRespondWithNewView(controller, view) {\n var firstDescriptor = controller._pendingPullIntos.peek();\n var state = controller._controlledReadableByteStream._state;\n if (state === 'closed') {\n if (view.byteLength !== 0) {\n throw new TypeError('The view\\'s length must be 0 when calling respondWithNewView() on a closed stream');\n }\n }\n else {\n if (view.byteLength === 0) {\n throw new TypeError('The view\\'s length must be greater than 0 when calling respondWithNewView() on a readable stream');\n }\n }\n if (firstDescriptor.byteOffset + firstDescriptor.bytesFilled !== view.byteOffset) {\n throw new RangeError('The region specified by view does not match byobRequest');\n }\n if (firstDescriptor.bufferByteLength !== view.buffer.byteLength) {\n throw new RangeError('The buffer of view has different capacity than byobRequest');\n }\n if (firstDescriptor.bytesFilled + view.byteLength > firstDescriptor.byteLength) {\n throw new RangeError('The region specified by view is larger than byobRequest');\n }\n firstDescriptor.buffer = TransferArrayBuffer(view.buffer);\n ReadableByteStreamControllerRespondInternal(controller, view.byteLength);\n }\n function SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, autoAllocateChunkSize) {\n controller._controlledReadableByteStream = stream;\n controller._pullAgain = false;\n controller._pulling = false;\n controller._byobRequest = null;\n // Need to set the slots so that the assert doesn't fire. In the spec the slots already exist implicitly.\n controller._queue = controller._queueTotalSize = undefined;\n ResetQueue(controller);\n controller._closeRequested = false;\n controller._started = false;\n controller._strategyHWM = highWaterMark;\n controller._pullAlgorithm = pullAlgorithm;\n controller._cancelAlgorithm = cancelAlgorithm;\n controller._autoAllocateChunkSize = autoAllocateChunkSize;\n controller._pendingPullIntos = new SimpleQueue();\n stream._readableStreamController = controller;\n var startResult = startAlgorithm();\n uponPromise(promiseResolvedWith(startResult), function () {\n controller._started = true;\n ReadableByteStreamControllerCallPullIfNeeded(controller);\n }, function (r) {\n ReadableByteStreamControllerError(controller, r);\n });\n }\n function SetUpReadableByteStreamControllerFromUnderlyingSource(stream, underlyingByteSource, highWaterMark) {\n var controller = Object.create(ReadableByteStreamController.prototype);\n var startAlgorithm = function () { return undefined; };\n var pullAlgorithm = function () { return promiseResolvedWith(undefined); };\n var cancelAlgorithm = function () { return promiseResolvedWith(undefined); };\n if (underlyingByteSource.start !== undefined) {\n startAlgorithm = function () { return underlyingByteSource.start(controller); };\n }\n if (underlyingByteSource.pull !== undefined) {\n pullAlgorithm = function () { return underlyingByteSource.pull(controller); };\n }\n if (underlyingByteSource.cancel !== undefined) {\n cancelAlgorithm = function (reason) { return underlyingByteSource.cancel(reason); };\n }\n var autoAllocateChunkSize = underlyingByteSource.autoAllocateChunkSize;\n if (autoAllocateChunkSize === 0) {\n throw new TypeError('autoAllocateChunkSize must be greater than 0');\n }\n SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, autoAllocateChunkSize);\n }\n function SetUpReadableStreamBYOBRequest(request, controller, view) {\n request._associatedReadableByteStreamController = controller;\n request._view = view;\n }\n // Helper functions for the ReadableStreamBYOBRequest.\n function byobRequestBrandCheckException(name) {\n return new TypeError(\"ReadableStreamBYOBRequest.prototype.\" + name + \" can only be used on a ReadableStreamBYOBRequest\");\n }\n // Helper functions for the ReadableByteStreamController.\n function byteStreamControllerBrandCheckException(name) {\n return new TypeError(\"ReadableByteStreamController.prototype.\" + name + \" can only be used on a ReadableByteStreamController\");\n }\n\n // Abstract operations for the ReadableStream.\n function AcquireReadableStreamBYOBReader(stream) {\n return new ReadableStreamBYOBReader(stream);\n }\n // ReadableStream API exposed for controllers.\n function ReadableStreamAddReadIntoRequest(stream, readIntoRequest) {\n stream._reader._readIntoRequests.push(readIntoRequest);\n }\n function ReadableStreamFulfillReadIntoRequest(stream, chunk, done) {\n var reader = stream._reader;\n var readIntoRequest = reader._readIntoRequests.shift();\n if (done) {\n readIntoRequest._closeSteps(chunk);\n }\n else {\n readIntoRequest._chunkSteps(chunk);\n }\n }\n function ReadableStreamGetNumReadIntoRequests(stream) {\n return stream._reader._readIntoRequests.length;\n }\n function ReadableStreamHasBYOBReader(stream) {\n var reader = stream._reader;\n if (reader === undefined) {\n return false;\n }\n if (!IsReadableStreamBYOBReader(reader)) {\n return false;\n }\n return true;\n }\n /**\n * A BYOB reader vended by a {@link ReadableStream}.\n *\n * @public\n */\n var ReadableStreamBYOBReader = /** @class */ (function () {\n function ReadableStreamBYOBReader(stream) {\n assertRequiredArgument(stream, 1, 'ReadableStreamBYOBReader');\n assertReadableStream(stream, 'First parameter');\n if (IsReadableStreamLocked(stream)) {\n throw new TypeError('This stream has already been locked for exclusive reading by another reader');\n }\n if (!IsReadableByteStreamController(stream._readableStreamController)) {\n throw new TypeError('Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte ' +\n 'source');\n }\n ReadableStreamReaderGenericInitialize(this, stream);\n this._readIntoRequests = new SimpleQueue();\n }\n Object.defineProperty(ReadableStreamBYOBReader.prototype, \"closed\", {\n /**\n * Returns a promise that will be fulfilled when the stream becomes closed, or rejected if the stream ever errors or\n * the reader's lock is released before the stream finishes closing.\n */\n get: function () {\n if (!IsReadableStreamBYOBReader(this)) {\n return promiseRejectedWith(byobReaderBrandCheckException('closed'));\n }\n return this._closedPromise;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * If the reader is active, behaves the same as {@link ReadableStream.cancel | stream.cancel(reason)}.\n */\n ReadableStreamBYOBReader.prototype.cancel = function (reason) {\n if (reason === void 0) { reason = undefined; }\n if (!IsReadableStreamBYOBReader(this)) {\n return promiseRejectedWith(byobReaderBrandCheckException('cancel'));\n }\n if (this._ownerReadableStream === undefined) {\n return promiseRejectedWith(readerLockException('cancel'));\n }\n return ReadableStreamReaderGenericCancel(this, reason);\n };\n /**\n * Attempts to reads bytes into view, and returns a promise resolved with the result.\n *\n * If reading a chunk causes the queue to become empty, more data will be pulled from the underlying source.\n */\n ReadableStreamBYOBReader.prototype.read = function (view) {\n if (!IsReadableStreamBYOBReader(this)) {\n return promiseRejectedWith(byobReaderBrandCheckException('read'));\n }\n if (!ArrayBuffer.isView(view)) {\n return promiseRejectedWith(new TypeError('view must be an array buffer view'));\n }\n if (view.byteLength === 0) {\n return promiseRejectedWith(new TypeError('view must have non-zero byteLength'));\n }\n if (view.buffer.byteLength === 0) {\n return promiseRejectedWith(new TypeError(\"view's buffer must have non-zero byteLength\"));\n }\n if (IsDetachedBuffer(view.buffer)) ;\n if (this._ownerReadableStream === undefined) {\n return promiseRejectedWith(readerLockException('read from'));\n }\n var resolvePromise;\n var rejectPromise;\n var promise = newPromise(function (resolve, reject) {\n resolvePromise = resolve;\n rejectPromise = reject;\n });\n var readIntoRequest = {\n _chunkSteps: function (chunk) { return resolvePromise({ value: chunk, done: false }); },\n _closeSteps: function (chunk) { return resolvePromise({ value: chunk, done: true }); },\n _errorSteps: function (e) { return rejectPromise(e); }\n };\n ReadableStreamBYOBReaderRead(this, view, readIntoRequest);\n return promise;\n };\n /**\n * Releases the reader's lock on the corresponding stream. After the lock is released, the reader is no longer active.\n * If the associated stream is errored when the lock is released, the reader will appear errored in the same way\n * from now on; otherwise, the reader will appear closed.\n *\n * A reader's lock cannot be released while it still has a pending read request, i.e., if a promise returned by\n * the reader's {@link ReadableStreamBYOBReader.read | read()} method has not yet been settled. Attempting to\n * do so will throw a `TypeError` and leave the reader locked to the stream.\n */\n ReadableStreamBYOBReader.prototype.releaseLock = function () {\n if (!IsReadableStreamBYOBReader(this)) {\n throw byobReaderBrandCheckException('releaseLock');\n }\n if (this._ownerReadableStream === undefined) {\n return;\n }\n if (this._readIntoRequests.length > 0) {\n throw new TypeError('Tried to release a reader lock when that reader has pending read() calls un-settled');\n }\n ReadableStreamReaderGenericRelease(this);\n };\n return ReadableStreamBYOBReader;\n }());\n Object.defineProperties(ReadableStreamBYOBReader.prototype, {\n cancel: { enumerable: true },\n read: { enumerable: true },\n releaseLock: { enumerable: true },\n closed: { enumerable: true }\n });\n if (typeof SymbolPolyfill.toStringTag === 'symbol') {\n Object.defineProperty(ReadableStreamBYOBReader.prototype, SymbolPolyfill.toStringTag, {\n value: 'ReadableStreamBYOBReader',\n configurable: true\n });\n }\n // Abstract operations for the readers.\n function IsReadableStreamBYOBReader(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n if (!Object.prototype.hasOwnProperty.call(x, '_readIntoRequests')) {\n return false;\n }\n return x instanceof ReadableStreamBYOBReader;\n }\n function ReadableStreamBYOBReaderRead(reader, view, readIntoRequest) {\n var stream = reader._ownerReadableStream;\n stream._disturbed = true;\n if (stream._state === 'errored') {\n readIntoRequest._errorSteps(stream._storedError);\n }\n else {\n ReadableByteStreamControllerPullInto(stream._readableStreamController, view, readIntoRequest);\n }\n }\n // Helper functions for the ReadableStreamBYOBReader.\n function byobReaderBrandCheckException(name) {\n return new TypeError(\"ReadableStreamBYOBReader.prototype.\" + name + \" can only be used on a ReadableStreamBYOBReader\");\n }\n\n function ExtractHighWaterMark(strategy, defaultHWM) {\n var highWaterMark = strategy.highWaterMark;\n if (highWaterMark === undefined) {\n return defaultHWM;\n }\n if (NumberIsNaN(highWaterMark) || highWaterMark < 0) {\n throw new RangeError('Invalid highWaterMark');\n }\n return highWaterMark;\n }\n function ExtractSizeAlgorithm(strategy) {\n var size = strategy.size;\n if (!size) {\n return function () { return 1; };\n }\n return size;\n }\n\n function convertQueuingStrategy(init, context) {\n assertDictionary(init, context);\n var highWaterMark = init === null || init === void 0 ? void 0 : init.highWaterMark;\n var size = init === null || init === void 0 ? void 0 : init.size;\n return {\n highWaterMark: highWaterMark === undefined ? undefined : convertUnrestrictedDouble(highWaterMark),\n size: size === undefined ? undefined : convertQueuingStrategySize(size, context + \" has member 'size' that\")\n };\n }\n function convertQueuingStrategySize(fn, context) {\n assertFunction(fn, context);\n return function (chunk) { return convertUnrestrictedDouble(fn(chunk)); };\n }\n\n function convertUnderlyingSink(original, context) {\n assertDictionary(original, context);\n var abort = original === null || original === void 0 ? void 0 : original.abort;\n var close = original === null || original === void 0 ? void 0 : original.close;\n var start = original === null || original === void 0 ? void 0 : original.start;\n var type = original === null || original === void 0 ? void 0 : original.type;\n var write = original === null || original === void 0 ? void 0 : original.write;\n return {\n abort: abort === undefined ?\n undefined :\n convertUnderlyingSinkAbortCallback(abort, original, context + \" has member 'abort' that\"),\n close: close === undefined ?\n undefined :\n convertUnderlyingSinkCloseCallback(close, original, context + \" has member 'close' that\"),\n start: start === undefined ?\n undefined :\n convertUnderlyingSinkStartCallback(start, original, context + \" has member 'start' that\"),\n write: write === undefined ?\n undefined :\n convertUnderlyingSinkWriteCallback(write, original, context + \" has member 'write' that\"),\n type: type\n };\n }\n function convertUnderlyingSinkAbortCallback(fn, original, context) {\n assertFunction(fn, context);\n return function (reason) { return promiseCall(fn, original, [reason]); };\n }\n function convertUnderlyingSinkCloseCallback(fn, original, context) {\n assertFunction(fn, context);\n return function () { return promiseCall(fn, original, []); };\n }\n function convertUnderlyingSinkStartCallback(fn, original, context) {\n assertFunction(fn, context);\n return function (controller) { return reflectCall(fn, original, [controller]); };\n }\n function convertUnderlyingSinkWriteCallback(fn, original, context) {\n assertFunction(fn, context);\n return function (chunk, controller) { return promiseCall(fn, original, [chunk, controller]); };\n }\n\n function assertWritableStream(x, context) {\n if (!IsWritableStream(x)) {\n throw new TypeError(context + \" is not a WritableStream.\");\n }\n }\n\n function isAbortSignal(value) {\n if (typeof value !== 'object' || value === null) {\n return false;\n }\n try {\n return typeof value.aborted === 'boolean';\n }\n catch (_a) {\n // AbortSignal.prototype.aborted throws if its brand check fails\n return false;\n }\n }\n var supportsAbortController = typeof AbortController === 'function';\n /**\n * Construct a new AbortController, if supported by the platform.\n *\n * @internal\n */\n function createAbortController() {\n if (supportsAbortController) {\n return new AbortController();\n }\n return undefined;\n }\n\n /**\n * A writable stream represents a destination for data, into which you can write.\n *\n * @public\n */\n var WritableStream = /** @class */ (function () {\n function WritableStream(rawUnderlyingSink, rawStrategy) {\n if (rawUnderlyingSink === void 0) { rawUnderlyingSink = {}; }\n if (rawStrategy === void 0) { rawStrategy = {}; }\n if (rawUnderlyingSink === undefined) {\n rawUnderlyingSink = null;\n }\n else {\n assertObject(rawUnderlyingSink, 'First parameter');\n }\n var strategy = convertQueuingStrategy(rawStrategy, 'Second parameter');\n var underlyingSink = convertUnderlyingSink(rawUnderlyingSink, 'First parameter');\n InitializeWritableStream(this);\n var type = underlyingSink.type;\n if (type !== undefined) {\n throw new RangeError('Invalid type is specified');\n }\n var sizeAlgorithm = ExtractSizeAlgorithm(strategy);\n var highWaterMark = ExtractHighWaterMark(strategy, 1);\n SetUpWritableStreamDefaultControllerFromUnderlyingSink(this, underlyingSink, highWaterMark, sizeAlgorithm);\n }\n Object.defineProperty(WritableStream.prototype, \"locked\", {\n /**\n * Returns whether or not the writable stream is locked to a writer.\n */\n get: function () {\n if (!IsWritableStream(this)) {\n throw streamBrandCheckException$2('locked');\n }\n return IsWritableStreamLocked(this);\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be\n * immediately moved to an errored state, with any queued-up writes discarded. This will also execute any abort\n * mechanism of the underlying sink.\n *\n * The returned promise will fulfill if the stream shuts down successfully, or reject if the underlying sink signaled\n * that there was an error doing so. Additionally, it will reject with a `TypeError` (without attempting to cancel\n * the stream) if the stream is currently locked.\n */\n WritableStream.prototype.abort = function (reason) {\n if (reason === void 0) { reason = undefined; }\n if (!IsWritableStream(this)) {\n return promiseRejectedWith(streamBrandCheckException$2('abort'));\n }\n if (IsWritableStreamLocked(this)) {\n return promiseRejectedWith(new TypeError('Cannot abort a stream that already has a writer'));\n }\n return WritableStreamAbort(this, reason);\n };\n /**\n * Closes the stream. The underlying sink will finish processing any previously-written chunks, before invoking its\n * close behavior. During this time any further attempts to write will fail (without erroring the stream).\n *\n * The method returns a promise that will fulfill if all remaining chunks are successfully written and the stream\n * successfully closes, or rejects if an error is encountered during this process. Additionally, it will reject with\n * a `TypeError` (without attempting to cancel the stream) if the stream is currently locked.\n */\n WritableStream.prototype.close = function () {\n if (!IsWritableStream(this)) {\n return promiseRejectedWith(streamBrandCheckException$2('close'));\n }\n if (IsWritableStreamLocked(this)) {\n return promiseRejectedWith(new TypeError('Cannot close a stream that already has a writer'));\n }\n if (WritableStreamCloseQueuedOrInFlight(this)) {\n return promiseRejectedWith(new TypeError('Cannot close an already-closing stream'));\n }\n return WritableStreamClose(this);\n };\n /**\n * Creates a {@link WritableStreamDefaultWriter | writer} and locks the stream to the new writer. While the stream\n * is locked, no other writer can be acquired until this one is released.\n *\n * This functionality is especially useful for creating abstractions that desire the ability to write to a stream\n * without interruption or interleaving. By getting a writer for the stream, you can ensure nobody else can write at\n * the same time, which would cause the resulting written data to be unpredictable and probably useless.\n */\n WritableStream.prototype.getWriter = function () {\n if (!IsWritableStream(this)) {\n throw streamBrandCheckException$2('getWriter');\n }\n return AcquireWritableStreamDefaultWriter(this);\n };\n return WritableStream;\n }());\n Object.defineProperties(WritableStream.prototype, {\n abort: { enumerable: true },\n close: { enumerable: true },\n getWriter: { enumerable: true },\n locked: { enumerable: true }\n });\n if (typeof SymbolPolyfill.toStringTag === 'symbol') {\n Object.defineProperty(WritableStream.prototype, SymbolPolyfill.toStringTag, {\n value: 'WritableStream',\n configurable: true\n });\n }\n // Abstract operations for the WritableStream.\n function AcquireWritableStreamDefaultWriter(stream) {\n return new WritableStreamDefaultWriter(stream);\n }\n // Throws if and only if startAlgorithm throws.\n function CreateWritableStream(startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm) {\n if (highWaterMark === void 0) { highWaterMark = 1; }\n if (sizeAlgorithm === void 0) { sizeAlgorithm = function () { return 1; }; }\n var stream = Object.create(WritableStream.prototype);\n InitializeWritableStream(stream);\n var controller = Object.create(WritableStreamDefaultController.prototype);\n SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm);\n return stream;\n }\n function InitializeWritableStream(stream) {\n stream._state = 'writable';\n // The error that will be reported by new method calls once the state becomes errored. Only set when [[state]] is\n // 'erroring' or 'errored'. May be set to an undefined value.\n stream._storedError = undefined;\n stream._writer = undefined;\n // Initialize to undefined first because the constructor of the controller checks this\n // variable to validate the caller.\n stream._writableStreamController = undefined;\n // This queue is placed here instead of the writer class in order to allow for passing a writer to the next data\n // producer without waiting for the queued writes to finish.\n stream._writeRequests = new SimpleQueue();\n // Write requests are removed from _writeRequests when write() is called on the underlying sink. This prevents\n // them from being erroneously rejected on error. If a write() call is in-flight, the request is stored here.\n stream._inFlightWriteRequest = undefined;\n // The promise that was returned from writer.close(). Stored here because it may be fulfilled after the writer\n // has been detached.\n stream._closeRequest = undefined;\n // Close request is removed from _closeRequest when close() is called on the underlying sink. This prevents it\n // from being erroneously rejected on error. If a close() call is in-flight, the request is stored here.\n stream._inFlightCloseRequest = undefined;\n // The promise that was returned from writer.abort(). This may also be fulfilled after the writer has detached.\n stream._pendingAbortRequest = undefined;\n // The backpressure signal set by the controller.\n stream._backpressure = false;\n }\n function IsWritableStream(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n if (!Object.prototype.hasOwnProperty.call(x, '_writableStreamController')) {\n return false;\n }\n return x instanceof WritableStream;\n }\n function IsWritableStreamLocked(stream) {\n if (stream._writer === undefined) {\n return false;\n }\n return true;\n }\n function WritableStreamAbort(stream, reason) {\n var _a;\n if (stream._state === 'closed' || stream._state === 'errored') {\n return promiseResolvedWith(undefined);\n }\n stream._writableStreamController._abortReason = reason;\n (_a = stream._writableStreamController._abortController) === null || _a === void 0 ? void 0 : _a.abort();\n // TypeScript narrows the type of `stream._state` down to 'writable' | 'erroring',\n // but it doesn't know that signaling abort runs author code that might have changed the state.\n // Widen the type again by casting to WritableStreamState.\n var state = stream._state;\n if (state === 'closed' || state === 'errored') {\n return promiseResolvedWith(undefined);\n }\n if (stream._pendingAbortRequest !== undefined) {\n return stream._pendingAbortRequest._promise;\n }\n var wasAlreadyErroring = false;\n if (state === 'erroring') {\n wasAlreadyErroring = true;\n // reason will not be used, so don't keep a reference to it.\n reason = undefined;\n }\n var promise = newPromise(function (resolve, reject) {\n stream._pendingAbortRequest = {\n _promise: undefined,\n _resolve: resolve,\n _reject: reject,\n _reason: reason,\n _wasAlreadyErroring: wasAlreadyErroring\n };\n });\n stream._pendingAbortRequest._promise = promise;\n if (!wasAlreadyErroring) {\n WritableStreamStartErroring(stream, reason);\n }\n return promise;\n }\n function WritableStreamClose(stream) {\n var state = stream._state;\n if (state === 'closed' || state === 'errored') {\n return promiseRejectedWith(new TypeError(\"The stream (in \" + state + \" state) is not in the writable state and cannot be closed\"));\n }\n var promise = newPromise(function (resolve, reject) {\n var closeRequest = {\n _resolve: resolve,\n _reject: reject\n };\n stream._closeRequest = closeRequest;\n });\n var writer = stream._writer;\n if (writer !== undefined && stream._backpressure && state === 'writable') {\n defaultWriterReadyPromiseResolve(writer);\n }\n WritableStreamDefaultControllerClose(stream._writableStreamController);\n return promise;\n }\n // WritableStream API exposed for controllers.\n function WritableStreamAddWriteRequest(stream) {\n var promise = newPromise(function (resolve, reject) {\n var writeRequest = {\n _resolve: resolve,\n _reject: reject\n };\n stream._writeRequests.push(writeRequest);\n });\n return promise;\n }\n function WritableStreamDealWithRejection(stream, error) {\n var state = stream._state;\n if (state === 'writable') {\n WritableStreamStartErroring(stream, error);\n return;\n }\n WritableStreamFinishErroring(stream);\n }\n function WritableStreamStartErroring(stream, reason) {\n var controller = stream._writableStreamController;\n stream._state = 'erroring';\n stream._storedError = reason;\n var writer = stream._writer;\n if (writer !== undefined) {\n WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, reason);\n }\n if (!WritableStreamHasOperationMarkedInFlight(stream) && controller._started) {\n WritableStreamFinishErroring(stream);\n }\n }\n function WritableStreamFinishErroring(stream) {\n stream._state = 'errored';\n stream._writableStreamController[ErrorSteps]();\n var storedError = stream._storedError;\n stream._writeRequests.forEach(function (writeRequest) {\n writeRequest._reject(storedError);\n });\n stream._writeRequests = new SimpleQueue();\n if (stream._pendingAbortRequest === undefined) {\n WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream);\n return;\n }\n var abortRequest = stream._pendingAbortRequest;\n stream._pendingAbortRequest = undefined;\n if (abortRequest._wasAlreadyErroring) {\n abortRequest._reject(storedError);\n WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream);\n return;\n }\n var promise = stream._writableStreamController[AbortSteps](abortRequest._reason);\n uponPromise(promise, function () {\n abortRequest._resolve();\n WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream);\n }, function (reason) {\n abortRequest._reject(reason);\n WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream);\n });\n }\n function WritableStreamFinishInFlightWrite(stream) {\n stream._inFlightWriteRequest._resolve(undefined);\n stream._inFlightWriteRequest = undefined;\n }\n function WritableStreamFinishInFlightWriteWithError(stream, error) {\n stream._inFlightWriteRequest._reject(error);\n stream._inFlightWriteRequest = undefined;\n WritableStreamDealWithRejection(stream, error);\n }\n function WritableStreamFinishInFlightClose(stream) {\n stream._inFlightCloseRequest._resolve(undefined);\n stream._inFlightCloseRequest = undefined;\n var state = stream._state;\n if (state === 'erroring') {\n // The error was too late to do anything, so it is ignored.\n stream._storedError = undefined;\n if (stream._pendingAbortRequest !== undefined) {\n stream._pendingAbortRequest._resolve();\n stream._pendingAbortRequest = undefined;\n }\n }\n stream._state = 'closed';\n var writer = stream._writer;\n if (writer !== undefined) {\n defaultWriterClosedPromiseResolve(writer);\n }\n }\n function WritableStreamFinishInFlightCloseWithError(stream, error) {\n stream._inFlightCloseRequest._reject(error);\n stream._inFlightCloseRequest = undefined;\n // Never execute sink abort() after sink close().\n if (stream._pendingAbortRequest !== undefined) {\n stream._pendingAbortRequest._reject(error);\n stream._pendingAbortRequest = undefined;\n }\n WritableStreamDealWithRejection(stream, error);\n }\n // TODO(ricea): Fix alphabetical order.\n function WritableStreamCloseQueuedOrInFlight(stream) {\n if (stream._closeRequest === undefined && stream._inFlightCloseRequest === undefined) {\n return false;\n }\n return true;\n }\n function WritableStreamHasOperationMarkedInFlight(stream) {\n if (stream._inFlightWriteRequest === undefined && stream._inFlightCloseRequest === undefined) {\n return false;\n }\n return true;\n }\n function WritableStreamMarkCloseRequestInFlight(stream) {\n stream._inFlightCloseRequest = stream._closeRequest;\n stream._closeRequest = undefined;\n }\n function WritableStreamMarkFirstWriteRequestInFlight(stream) {\n stream._inFlightWriteRequest = stream._writeRequests.shift();\n }\n function WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream) {\n if (stream._closeRequest !== undefined) {\n stream._closeRequest._reject(stream._storedError);\n stream._closeRequest = undefined;\n }\n var writer = stream._writer;\n if (writer !== undefined) {\n defaultWriterClosedPromiseReject(writer, stream._storedError);\n }\n }\n function WritableStreamUpdateBackpressure(stream, backpressure) {\n var writer = stream._writer;\n if (writer !== undefined && backpressure !== stream._backpressure) {\n if (backpressure) {\n defaultWriterReadyPromiseReset(writer);\n }\n else {\n defaultWriterReadyPromiseResolve(writer);\n }\n }\n stream._backpressure = backpressure;\n }\n /**\n * A default writer vended by a {@link WritableStream}.\n *\n * @public\n */\n var WritableStreamDefaultWriter = /** @class */ (function () {\n function WritableStreamDefaultWriter(stream) {\n assertRequiredArgument(stream, 1, 'WritableStreamDefaultWriter');\n assertWritableStream(stream, 'First parameter');\n if (IsWritableStreamLocked(stream)) {\n throw new TypeError('This stream has already been locked for exclusive writing by another writer');\n }\n this._ownerWritableStream = stream;\n stream._writer = this;\n var state = stream._state;\n if (state === 'writable') {\n if (!WritableStreamCloseQueuedOrInFlight(stream) && stream._backpressure) {\n defaultWriterReadyPromiseInitialize(this);\n }\n else {\n defaultWriterReadyPromiseInitializeAsResolved(this);\n }\n defaultWriterClosedPromiseInitialize(this);\n }\n else if (state === 'erroring') {\n defaultWriterReadyPromiseInitializeAsRejected(this, stream._storedError);\n defaultWriterClosedPromiseInitialize(this);\n }\n else if (state === 'closed') {\n defaultWriterReadyPromiseInitializeAsResolved(this);\n defaultWriterClosedPromiseInitializeAsResolved(this);\n }\n else {\n var storedError = stream._storedError;\n defaultWriterReadyPromiseInitializeAsRejected(this, storedError);\n defaultWriterClosedPromiseInitializeAsRejected(this, storedError);\n }\n }\n Object.defineProperty(WritableStreamDefaultWriter.prototype, \"closed\", {\n /**\n * Returns a promise that will be fulfilled when the stream becomes closed, or rejected if the stream ever errors or\n * the writer’s lock is released before the stream finishes closing.\n */\n get: function () {\n if (!IsWritableStreamDefaultWriter(this)) {\n return promiseRejectedWith(defaultWriterBrandCheckException('closed'));\n }\n return this._closedPromise;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(WritableStreamDefaultWriter.prototype, \"desiredSize\", {\n /**\n * Returns the desired size to fill the stream’s internal queue. It can be negative, if the queue is over-full.\n * A producer can use this information to determine the right amount of data to write.\n *\n * It will be `null` if the stream cannot be successfully written to (due to either being errored, or having an abort\n * queued up). It will return zero if the stream is closed. And the getter will throw an exception if invoked when\n * the writer’s lock is released.\n */\n get: function () {\n if (!IsWritableStreamDefaultWriter(this)) {\n throw defaultWriterBrandCheckException('desiredSize');\n }\n if (this._ownerWritableStream === undefined) {\n throw defaultWriterLockException('desiredSize');\n }\n return WritableStreamDefaultWriterGetDesiredSize(this);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(WritableStreamDefaultWriter.prototype, \"ready\", {\n /**\n * Returns a promise that will be fulfilled when the desired size to fill the stream’s internal queue transitions\n * from non-positive to positive, signaling that it is no longer applying backpressure. Once the desired size dips\n * back to zero or below, the getter will return a new promise that stays pending until the next transition.\n *\n * If the stream becomes errored or aborted, or the writer’s lock is released, the returned promise will become\n * rejected.\n */\n get: function () {\n if (!IsWritableStreamDefaultWriter(this)) {\n return promiseRejectedWith(defaultWriterBrandCheckException('ready'));\n }\n return this._readyPromise;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * If the reader is active, behaves the same as {@link WritableStream.abort | stream.abort(reason)}.\n */\n WritableStreamDefaultWriter.prototype.abort = function (reason) {\n if (reason === void 0) { reason = undefined; }\n if (!IsWritableStreamDefaultWriter(this)) {\n return promiseRejectedWith(defaultWriterBrandCheckException('abort'));\n }\n if (this._ownerWritableStream === undefined) {\n return promiseRejectedWith(defaultWriterLockException('abort'));\n }\n return WritableStreamDefaultWriterAbort(this, reason);\n };\n /**\n * If the reader is active, behaves the same as {@link WritableStream.close | stream.close()}.\n */\n WritableStreamDefaultWriter.prototype.close = function () {\n if (!IsWritableStreamDefaultWriter(this)) {\n return promiseRejectedWith(defaultWriterBrandCheckException('close'));\n }\n var stream = this._ownerWritableStream;\n if (stream === undefined) {\n return promiseRejectedWith(defaultWriterLockException('close'));\n }\n if (WritableStreamCloseQueuedOrInFlight(stream)) {\n return promiseRejectedWith(new TypeError('Cannot close an already-closing stream'));\n }\n return WritableStreamDefaultWriterClose(this);\n };\n /**\n * Releases the writer’s lock on the corresponding stream. After the lock is released, the writer is no longer active.\n * If the associated stream is errored when the lock is released, the writer will appear errored in the same way from\n * now on; otherwise, the writer will appear closed.\n *\n * Note that the lock can still be released even if some ongoing writes have not yet finished (i.e. even if the\n * promises returned from previous calls to {@link WritableStreamDefaultWriter.write | write()} have not yet settled).\n * It’s not necessary to hold the lock on the writer for the duration of the write; the lock instead simply prevents\n * other producers from writing in an interleaved manner.\n */\n WritableStreamDefaultWriter.prototype.releaseLock = function () {\n if (!IsWritableStreamDefaultWriter(this)) {\n throw defaultWriterBrandCheckException('releaseLock');\n }\n var stream = this._ownerWritableStream;\n if (stream === undefined) {\n return;\n }\n WritableStreamDefaultWriterRelease(this);\n };\n WritableStreamDefaultWriter.prototype.write = function (chunk) {\n if (chunk === void 0) { chunk = undefined; }\n if (!IsWritableStreamDefaultWriter(this)) {\n return promiseRejectedWith(defaultWriterBrandCheckException('write'));\n }\n if (this._ownerWritableStream === undefined) {\n return promiseRejectedWith(defaultWriterLockException('write to'));\n }\n return WritableStreamDefaultWriterWrite(this, chunk);\n };\n return WritableStreamDefaultWriter;\n }());\n Object.defineProperties(WritableStreamDefaultWriter.prototype, {\n abort: { enumerable: true },\n close: { enumerable: true },\n releaseLock: { enumerable: true },\n write: { enumerable: true },\n closed: { enumerable: true },\n desiredSize: { enumerable: true },\n ready: { enumerable: true }\n });\n if (typeof SymbolPolyfill.toStringTag === 'symbol') {\n Object.defineProperty(WritableStreamDefaultWriter.prototype, SymbolPolyfill.toStringTag, {\n value: 'WritableStreamDefaultWriter',\n configurable: true\n });\n }\n // Abstract operations for the WritableStreamDefaultWriter.\n function IsWritableStreamDefaultWriter(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n if (!Object.prototype.hasOwnProperty.call(x, '_ownerWritableStream')) {\n return false;\n }\n return x instanceof WritableStreamDefaultWriter;\n }\n // A client of WritableStreamDefaultWriter may use these functions directly to bypass state check.\n function WritableStreamDefaultWriterAbort(writer, reason) {\n var stream = writer._ownerWritableStream;\n return WritableStreamAbort(stream, reason);\n }\n function WritableStreamDefaultWriterClose(writer) {\n var stream = writer._ownerWritableStream;\n return WritableStreamClose(stream);\n }\n function WritableStreamDefaultWriterCloseWithErrorPropagation(writer) {\n var stream = writer._ownerWritableStream;\n var state = stream._state;\n if (WritableStreamCloseQueuedOrInFlight(stream) || state === 'closed') {\n return promiseResolvedWith(undefined);\n }\n if (state === 'errored') {\n return promiseRejectedWith(stream._storedError);\n }\n return WritableStreamDefaultWriterClose(writer);\n }\n function WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer, error) {\n if (writer._closedPromiseState === 'pending') {\n defaultWriterClosedPromiseReject(writer, error);\n }\n else {\n defaultWriterClosedPromiseResetToRejected(writer, error);\n }\n }\n function WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, error) {\n if (writer._readyPromiseState === 'pending') {\n defaultWriterReadyPromiseReject(writer, error);\n }\n else {\n defaultWriterReadyPromiseResetToRejected(writer, error);\n }\n }\n function WritableStreamDefaultWriterGetDesiredSize(writer) {\n var stream = writer._ownerWritableStream;\n var state = stream._state;\n if (state === 'errored' || state === 'erroring') {\n return null;\n }\n if (state === 'closed') {\n return 0;\n }\n return WritableStreamDefaultControllerGetDesiredSize(stream._writableStreamController);\n }\n function WritableStreamDefaultWriterRelease(writer) {\n var stream = writer._ownerWritableStream;\n var releasedError = new TypeError(\"Writer was released and can no longer be used to monitor the stream's closedness\");\n WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, releasedError);\n // The state transitions to \"errored\" before the sink abort() method runs, but the writer.closed promise is not\n // rejected until afterwards. This means that simply testing state will not work.\n WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer, releasedError);\n stream._writer = undefined;\n writer._ownerWritableStream = undefined;\n }\n function WritableStreamDefaultWriterWrite(writer, chunk) {\n var stream = writer._ownerWritableStream;\n var controller = stream._writableStreamController;\n var chunkSize = WritableStreamDefaultControllerGetChunkSize(controller, chunk);\n if (stream !== writer._ownerWritableStream) {\n return promiseRejectedWith(defaultWriterLockException('write to'));\n }\n var state = stream._state;\n if (state === 'errored') {\n return promiseRejectedWith(stream._storedError);\n }\n if (WritableStreamCloseQueuedOrInFlight(stream) || state === 'closed') {\n return promiseRejectedWith(new TypeError('The stream is closing or closed and cannot be written to'));\n }\n if (state === 'erroring') {\n return promiseRejectedWith(stream._storedError);\n }\n var promise = WritableStreamAddWriteRequest(stream);\n WritableStreamDefaultControllerWrite(controller, chunk, chunkSize);\n return promise;\n }\n var closeSentinel = {};\n /**\n * Allows control of a {@link WritableStream | writable stream}'s state and internal queue.\n *\n * @public\n */\n var WritableStreamDefaultController = /** @class */ (function () {\n function WritableStreamDefaultController() {\n throw new TypeError('Illegal constructor');\n }\n Object.defineProperty(WritableStreamDefaultController.prototype, \"abortReason\", {\n /**\n * The reason which was passed to `WritableStream.abort(reason)` when the stream was aborted.\n */\n get: function () {\n if (!IsWritableStreamDefaultController(this)) {\n throw defaultControllerBrandCheckException$2('abortReason');\n }\n return this._abortReason;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(WritableStreamDefaultController.prototype, \"signal\", {\n /**\n * An `AbortSignal` that can be used to abort the pending write or close operation when the stream is aborted.\n */\n get: function () {\n if (!IsWritableStreamDefaultController(this)) {\n throw defaultControllerBrandCheckException$2('signal');\n }\n if (this._abortController === undefined) {\n // Older browsers or older Node versions may not support `AbortController` or `AbortSignal`.\n // We don't want to bundle and ship an `AbortController` polyfill together with our polyfill,\n // so instead we only implement support for `signal` if we find a global `AbortController` constructor.\n throw new TypeError('WritableStreamDefaultController.prototype.signal is not supported');\n }\n return this._abortController.signal;\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Closes the controlled writable stream, making all future interactions with it fail with the given error `e`.\n *\n * This method is rarely used, since usually it suffices to return a rejected promise from one of the underlying\n * sink's methods. However, it can be useful for suddenly shutting down a stream in response to an event outside the\n * normal lifecycle of interactions with the underlying sink.\n */\n WritableStreamDefaultController.prototype.error = function (e) {\n if (e === void 0) { e = undefined; }\n if (!IsWritableStreamDefaultController(this)) {\n throw defaultControllerBrandCheckException$2('error');\n }\n var state = this._controlledWritableStream._state;\n if (state !== 'writable') {\n // The stream is closed, errored or will be soon. The sink can't do anything useful if it gets an error here, so\n // just treat it as a no-op.\n return;\n }\n WritableStreamDefaultControllerError(this, e);\n };\n /** @internal */\n WritableStreamDefaultController.prototype[AbortSteps] = function (reason) {\n var result = this._abortAlgorithm(reason);\n WritableStreamDefaultControllerClearAlgorithms(this);\n return result;\n };\n /** @internal */\n WritableStreamDefaultController.prototype[ErrorSteps] = function () {\n ResetQueue(this);\n };\n return WritableStreamDefaultController;\n }());\n Object.defineProperties(WritableStreamDefaultController.prototype, {\n error: { enumerable: true }\n });\n if (typeof SymbolPolyfill.toStringTag === 'symbol') {\n Object.defineProperty(WritableStreamDefaultController.prototype, SymbolPolyfill.toStringTag, {\n value: 'WritableStreamDefaultController',\n configurable: true\n });\n }\n // Abstract operations implementing interface required by the WritableStream.\n function IsWritableStreamDefaultController(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n if (!Object.prototype.hasOwnProperty.call(x, '_controlledWritableStream')) {\n return false;\n }\n return x instanceof WritableStreamDefaultController;\n }\n function SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm) {\n controller._controlledWritableStream = stream;\n stream._writableStreamController = controller;\n // Need to set the slots so that the assert doesn't fire. In the spec the slots already exist implicitly.\n controller._queue = undefined;\n controller._queueTotalSize = undefined;\n ResetQueue(controller);\n controller._abortReason = undefined;\n controller._abortController = createAbortController();\n controller._started = false;\n controller._strategySizeAlgorithm = sizeAlgorithm;\n controller._strategyHWM = highWaterMark;\n controller._writeAlgorithm = writeAlgorithm;\n controller._closeAlgorithm = closeAlgorithm;\n controller._abortAlgorithm = abortAlgorithm;\n var backpressure = WritableStreamDefaultControllerGetBackpressure(controller);\n WritableStreamUpdateBackpressure(stream, backpressure);\n var startResult = startAlgorithm();\n var startPromise = promiseResolvedWith(startResult);\n uponPromise(startPromise, function () {\n controller._started = true;\n WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller);\n }, function (r) {\n controller._started = true;\n WritableStreamDealWithRejection(stream, r);\n });\n }\n function SetUpWritableStreamDefaultControllerFromUnderlyingSink(stream, underlyingSink, highWaterMark, sizeAlgorithm) {\n var controller = Object.create(WritableStreamDefaultController.prototype);\n var startAlgorithm = function () { return undefined; };\n var writeAlgorithm = function () { return promiseResolvedWith(undefined); };\n var closeAlgorithm = function () { return promiseResolvedWith(undefined); };\n var abortAlgorithm = function () { return promiseResolvedWith(undefined); };\n if (underlyingSink.start !== undefined) {\n startAlgorithm = function () { return underlyingSink.start(controller); };\n }\n if (underlyingSink.write !== undefined) {\n writeAlgorithm = function (chunk) { return underlyingSink.write(chunk, controller); };\n }\n if (underlyingSink.close !== undefined) {\n closeAlgorithm = function () { return underlyingSink.close(); };\n }\n if (underlyingSink.abort !== undefined) {\n abortAlgorithm = function (reason) { return underlyingSink.abort(reason); };\n }\n SetUpWritableStreamDefaultController(stream, controller, startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, highWaterMark, sizeAlgorithm);\n }\n // ClearAlgorithms may be called twice. Erroring the same stream in multiple ways will often result in redundant calls.\n function WritableStreamDefaultControllerClearAlgorithms(controller) {\n controller._writeAlgorithm = undefined;\n controller._closeAlgorithm = undefined;\n controller._abortAlgorithm = undefined;\n controller._strategySizeAlgorithm = undefined;\n }\n function WritableStreamDefaultControllerClose(controller) {\n EnqueueValueWithSize(controller, closeSentinel, 0);\n WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller);\n }\n function WritableStreamDefaultControllerGetChunkSize(controller, chunk) {\n try {\n return controller._strategySizeAlgorithm(chunk);\n }\n catch (chunkSizeE) {\n WritableStreamDefaultControllerErrorIfNeeded(controller, chunkSizeE);\n return 1;\n }\n }\n function WritableStreamDefaultControllerGetDesiredSize(controller) {\n return controller._strategyHWM - controller._queueTotalSize;\n }\n function WritableStreamDefaultControllerWrite(controller, chunk, chunkSize) {\n try {\n EnqueueValueWithSize(controller, chunk, chunkSize);\n }\n catch (enqueueE) {\n WritableStreamDefaultControllerErrorIfNeeded(controller, enqueueE);\n return;\n }\n var stream = controller._controlledWritableStream;\n if (!WritableStreamCloseQueuedOrInFlight(stream) && stream._state === 'writable') {\n var backpressure = WritableStreamDefaultControllerGetBackpressure(controller);\n WritableStreamUpdateBackpressure(stream, backpressure);\n }\n WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller);\n }\n // Abstract operations for the WritableStreamDefaultController.\n function WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller) {\n var stream = controller._controlledWritableStream;\n if (!controller._started) {\n return;\n }\n if (stream._inFlightWriteRequest !== undefined) {\n return;\n }\n var state = stream._state;\n if (state === 'erroring') {\n WritableStreamFinishErroring(stream);\n return;\n }\n if (controller._queue.length === 0) {\n return;\n }\n var value = PeekQueueValue(controller);\n if (value === closeSentinel) {\n WritableStreamDefaultControllerProcessClose(controller);\n }\n else {\n WritableStreamDefaultControllerProcessWrite(controller, value);\n }\n }\n function WritableStreamDefaultControllerErrorIfNeeded(controller, error) {\n if (controller._controlledWritableStream._state === 'writable') {\n WritableStreamDefaultControllerError(controller, error);\n }\n }\n function WritableStreamDefaultControllerProcessClose(controller) {\n var stream = controller._controlledWritableStream;\n WritableStreamMarkCloseRequestInFlight(stream);\n DequeueValue(controller);\n var sinkClosePromise = controller._closeAlgorithm();\n WritableStreamDefaultControllerClearAlgorithms(controller);\n uponPromise(sinkClosePromise, function () {\n WritableStreamFinishInFlightClose(stream);\n }, function (reason) {\n WritableStreamFinishInFlightCloseWithError(stream, reason);\n });\n }\n function WritableStreamDefaultControllerProcessWrite(controller, chunk) {\n var stream = controller._controlledWritableStream;\n WritableStreamMarkFirstWriteRequestInFlight(stream);\n var sinkWritePromise = controller._writeAlgorithm(chunk);\n uponPromise(sinkWritePromise, function () {\n WritableStreamFinishInFlightWrite(stream);\n var state = stream._state;\n DequeueValue(controller);\n if (!WritableStreamCloseQueuedOrInFlight(stream) && state === 'writable') {\n var backpressure = WritableStreamDefaultControllerGetBackpressure(controller);\n WritableStreamUpdateBackpressure(stream, backpressure);\n }\n WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller);\n }, function (reason) {\n if (stream._state === 'writable') {\n WritableStreamDefaultControllerClearAlgorithms(controller);\n }\n WritableStreamFinishInFlightWriteWithError(stream, reason);\n });\n }\n function WritableStreamDefaultControllerGetBackpressure(controller) {\n var desiredSize = WritableStreamDefaultControllerGetDesiredSize(controller);\n return desiredSize <= 0;\n }\n // A client of WritableStreamDefaultController may use these functions directly to bypass state check.\n function WritableStreamDefaultControllerError(controller, error) {\n var stream = controller._controlledWritableStream;\n WritableStreamDefaultControllerClearAlgorithms(controller);\n WritableStreamStartErroring(stream, error);\n }\n // Helper functions for the WritableStream.\n function streamBrandCheckException$2(name) {\n return new TypeError(\"WritableStream.prototype.\" + name + \" can only be used on a WritableStream\");\n }\n // Helper functions for the WritableStreamDefaultController.\n function defaultControllerBrandCheckException$2(name) {\n return new TypeError(\"WritableStreamDefaultController.prototype.\" + name + \" can only be used on a WritableStreamDefaultController\");\n }\n // Helper functions for the WritableStreamDefaultWriter.\n function defaultWriterBrandCheckException(name) {\n return new TypeError(\"WritableStreamDefaultWriter.prototype.\" + name + \" can only be used on a WritableStreamDefaultWriter\");\n }\n function defaultWriterLockException(name) {\n return new TypeError('Cannot ' + name + ' a stream using a released writer');\n }\n function defaultWriterClosedPromiseInitialize(writer) {\n writer._closedPromise = newPromise(function (resolve, reject) {\n writer._closedPromise_resolve = resolve;\n writer._closedPromise_reject = reject;\n writer._closedPromiseState = 'pending';\n });\n }\n function defaultWriterClosedPromiseInitializeAsRejected(writer, reason) {\n defaultWriterClosedPromiseInitialize(writer);\n defaultWriterClosedPromiseReject(writer, reason);\n }\n function defaultWriterClosedPromiseInitializeAsResolved(writer) {\n defaultWriterClosedPromiseInitialize(writer);\n defaultWriterClosedPromiseResolve(writer);\n }\n function defaultWriterClosedPromiseReject(writer, reason) {\n if (writer._closedPromise_reject === undefined) {\n return;\n }\n setPromiseIsHandledToTrue(writer._closedPromise);\n writer._closedPromise_reject(reason);\n writer._closedPromise_resolve = undefined;\n writer._closedPromise_reject = undefined;\n writer._closedPromiseState = 'rejected';\n }\n function defaultWriterClosedPromiseResetToRejected(writer, reason) {\n defaultWriterClosedPromiseInitializeAsRejected(writer, reason);\n }\n function defaultWriterClosedPromiseResolve(writer) {\n if (writer._closedPromise_resolve === undefined) {\n return;\n }\n writer._closedPromise_resolve(undefined);\n writer._closedPromise_resolve = undefined;\n writer._closedPromise_reject = undefined;\n writer._closedPromiseState = 'resolved';\n }\n function defaultWriterReadyPromiseInitialize(writer) {\n writer._readyPromise = newPromise(function (resolve, reject) {\n writer._readyPromise_resolve = resolve;\n writer._readyPromise_reject = reject;\n });\n writer._readyPromiseState = 'pending';\n }\n function defaultWriterReadyPromiseInitializeAsRejected(writer, reason) {\n defaultWriterReadyPromiseInitialize(writer);\n defaultWriterReadyPromiseReject(writer, reason);\n }\n function defaultWriterReadyPromiseInitializeAsResolved(writer) {\n defaultWriterReadyPromiseInitialize(writer);\n defaultWriterReadyPromiseResolve(writer);\n }\n function defaultWriterReadyPromiseReject(writer, reason) {\n if (writer._readyPromise_reject === undefined) {\n return;\n }\n setPromiseIsHandledToTrue(writer._readyPromise);\n writer._readyPromise_reject(reason);\n writer._readyPromise_resolve = undefined;\n writer._readyPromise_reject = undefined;\n writer._readyPromiseState = 'rejected';\n }\n function defaultWriterReadyPromiseReset(writer) {\n defaultWriterReadyPromiseInitialize(writer);\n }\n function defaultWriterReadyPromiseResetToRejected(writer, reason) {\n defaultWriterReadyPromiseInitializeAsRejected(writer, reason);\n }\n function defaultWriterReadyPromiseResolve(writer) {\n if (writer._readyPromise_resolve === undefined) {\n return;\n }\n writer._readyPromise_resolve(undefined);\n writer._readyPromise_resolve = undefined;\n writer._readyPromise_reject = undefined;\n writer._readyPromiseState = 'fulfilled';\n }\n\n /// \n var NativeDOMException = typeof DOMException !== 'undefined' ? DOMException : undefined;\n\n /// \n function isDOMExceptionConstructor(ctor) {\n if (!(typeof ctor === 'function' || typeof ctor === 'object')) {\n return false;\n }\n try {\n new ctor();\n return true;\n }\n catch (_a) {\n return false;\n }\n }\n function createDOMExceptionPolyfill() {\n // eslint-disable-next-line no-shadow\n var ctor = function DOMException(message, name) {\n this.message = message || '';\n this.name = name || 'Error';\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n };\n ctor.prototype = Object.create(Error.prototype);\n Object.defineProperty(ctor.prototype, 'constructor', { value: ctor, writable: true, configurable: true });\n return ctor;\n }\n // eslint-disable-next-line no-redeclare\n var DOMException$1 = isDOMExceptionConstructor(NativeDOMException) ? NativeDOMException : createDOMExceptionPolyfill();\n\n function ReadableStreamPipeTo(source, dest, preventClose, preventAbort, preventCancel, signal) {\n var reader = AcquireReadableStreamDefaultReader(source);\n var writer = AcquireWritableStreamDefaultWriter(dest);\n source._disturbed = true;\n var shuttingDown = false;\n // This is used to keep track of the spec's requirement that we wait for ongoing writes during shutdown.\n var currentWrite = promiseResolvedWith(undefined);\n return newPromise(function (resolve, reject) {\n var abortAlgorithm;\n if (signal !== undefined) {\n abortAlgorithm = function () {\n var error = new DOMException$1('Aborted', 'AbortError');\n var actions = [];\n if (!preventAbort) {\n actions.push(function () {\n if (dest._state === 'writable') {\n return WritableStreamAbort(dest, error);\n }\n return promiseResolvedWith(undefined);\n });\n }\n if (!preventCancel) {\n actions.push(function () {\n if (source._state === 'readable') {\n return ReadableStreamCancel(source, error);\n }\n return promiseResolvedWith(undefined);\n });\n }\n shutdownWithAction(function () { return Promise.all(actions.map(function (action) { return action(); })); }, true, error);\n };\n if (signal.aborted) {\n abortAlgorithm();\n return;\n }\n signal.addEventListener('abort', abortAlgorithm);\n }\n // Using reader and writer, read all chunks from this and write them to dest\n // - Backpressure must be enforced\n // - Shutdown must stop all activity\n function pipeLoop() {\n return newPromise(function (resolveLoop, rejectLoop) {\n function next(done) {\n if (done) {\n resolveLoop();\n }\n else {\n // Use `PerformPromiseThen` instead of `uponPromise` to avoid\n // adding unnecessary `.catch(rethrowAssertionErrorRejection)` handlers\n PerformPromiseThen(pipeStep(), next, rejectLoop);\n }\n }\n next(false);\n });\n }\n function pipeStep() {\n if (shuttingDown) {\n return promiseResolvedWith(true);\n }\n return PerformPromiseThen(writer._readyPromise, function () {\n return newPromise(function (resolveRead, rejectRead) {\n ReadableStreamDefaultReaderRead(reader, {\n _chunkSteps: function (chunk) {\n currentWrite = PerformPromiseThen(WritableStreamDefaultWriterWrite(writer, chunk), undefined, noop);\n resolveRead(false);\n },\n _closeSteps: function () { return resolveRead(true); },\n _errorSteps: rejectRead\n });\n });\n });\n }\n // Errors must be propagated forward\n isOrBecomesErrored(source, reader._closedPromise, function (storedError) {\n if (!preventAbort) {\n shutdownWithAction(function () { return WritableStreamAbort(dest, storedError); }, true, storedError);\n }\n else {\n shutdown(true, storedError);\n }\n });\n // Errors must be propagated backward\n isOrBecomesErrored(dest, writer._closedPromise, function (storedError) {\n if (!preventCancel) {\n shutdownWithAction(function () { return ReadableStreamCancel(source, storedError); }, true, storedError);\n }\n else {\n shutdown(true, storedError);\n }\n });\n // Closing must be propagated forward\n isOrBecomesClosed(source, reader._closedPromise, function () {\n if (!preventClose) {\n shutdownWithAction(function () { return WritableStreamDefaultWriterCloseWithErrorPropagation(writer); });\n }\n else {\n shutdown();\n }\n });\n // Closing must be propagated backward\n if (WritableStreamCloseQueuedOrInFlight(dest) || dest._state === 'closed') {\n var destClosed_1 = new TypeError('the destination writable stream closed before all data could be piped to it');\n if (!preventCancel) {\n shutdownWithAction(function () { return ReadableStreamCancel(source, destClosed_1); }, true, destClosed_1);\n }\n else {\n shutdown(true, destClosed_1);\n }\n }\n setPromiseIsHandledToTrue(pipeLoop());\n function waitForWritesToFinish() {\n // Another write may have started while we were waiting on this currentWrite, so we have to be sure to wait\n // for that too.\n var oldCurrentWrite = currentWrite;\n return PerformPromiseThen(currentWrite, function () { return oldCurrentWrite !== currentWrite ? waitForWritesToFinish() : undefined; });\n }\n function isOrBecomesErrored(stream, promise, action) {\n if (stream._state === 'errored') {\n action(stream._storedError);\n }\n else {\n uponRejection(promise, action);\n }\n }\n function isOrBecomesClosed(stream, promise, action) {\n if (stream._state === 'closed') {\n action();\n }\n else {\n uponFulfillment(promise, action);\n }\n }\n function shutdownWithAction(action, originalIsError, originalError) {\n if (shuttingDown) {\n return;\n }\n shuttingDown = true;\n if (dest._state === 'writable' && !WritableStreamCloseQueuedOrInFlight(dest)) {\n uponFulfillment(waitForWritesToFinish(), doTheRest);\n }\n else {\n doTheRest();\n }\n function doTheRest() {\n uponPromise(action(), function () { return finalize(originalIsError, originalError); }, function (newError) { return finalize(true, newError); });\n }\n }\n function shutdown(isError, error) {\n if (shuttingDown) {\n return;\n }\n shuttingDown = true;\n if (dest._state === 'writable' && !WritableStreamCloseQueuedOrInFlight(dest)) {\n uponFulfillment(waitForWritesToFinish(), function () { return finalize(isError, error); });\n }\n else {\n finalize(isError, error);\n }\n }\n function finalize(isError, error) {\n WritableStreamDefaultWriterRelease(writer);\n ReadableStreamReaderGenericRelease(reader);\n if (signal !== undefined) {\n signal.removeEventListener('abort', abortAlgorithm);\n }\n if (isError) {\n reject(error);\n }\n else {\n resolve(undefined);\n }\n }\n });\n }\n\n /**\n * Allows control of a {@link ReadableStream | readable stream}'s state and internal queue.\n *\n * @public\n */\n var ReadableStreamDefaultController = /** @class */ (function () {\n function ReadableStreamDefaultController() {\n throw new TypeError('Illegal constructor');\n }\n Object.defineProperty(ReadableStreamDefaultController.prototype, \"desiredSize\", {\n /**\n * Returns the desired size to fill the controlled stream's internal queue. It can be negative, if the queue is\n * over-full. An underlying source ought to use this information to determine when and how to apply backpressure.\n */\n get: function () {\n if (!IsReadableStreamDefaultController(this)) {\n throw defaultControllerBrandCheckException$1('desiredSize');\n }\n return ReadableStreamDefaultControllerGetDesiredSize(this);\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Closes the controlled readable stream. Consumers will still be able to read any previously-enqueued chunks from\n * the stream, but once those are read, the stream will become closed.\n */\n ReadableStreamDefaultController.prototype.close = function () {\n if (!IsReadableStreamDefaultController(this)) {\n throw defaultControllerBrandCheckException$1('close');\n }\n if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(this)) {\n throw new TypeError('The stream is not in a state that permits close');\n }\n ReadableStreamDefaultControllerClose(this);\n };\n ReadableStreamDefaultController.prototype.enqueue = function (chunk) {\n if (chunk === void 0) { chunk = undefined; }\n if (!IsReadableStreamDefaultController(this)) {\n throw defaultControllerBrandCheckException$1('enqueue');\n }\n if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(this)) {\n throw new TypeError('The stream is not in a state that permits enqueue');\n }\n return ReadableStreamDefaultControllerEnqueue(this, chunk);\n };\n /**\n * Errors the controlled readable stream, making all future interactions with it fail with the given error `e`.\n */\n ReadableStreamDefaultController.prototype.error = function (e) {\n if (e === void 0) { e = undefined; }\n if (!IsReadableStreamDefaultController(this)) {\n throw defaultControllerBrandCheckException$1('error');\n }\n ReadableStreamDefaultControllerError(this, e);\n };\n /** @internal */\n ReadableStreamDefaultController.prototype[CancelSteps] = function (reason) {\n ResetQueue(this);\n var result = this._cancelAlgorithm(reason);\n ReadableStreamDefaultControllerClearAlgorithms(this);\n return result;\n };\n /** @internal */\n ReadableStreamDefaultController.prototype[PullSteps] = function (readRequest) {\n var stream = this._controlledReadableStream;\n if (this._queue.length > 0) {\n var chunk = DequeueValue(this);\n if (this._closeRequested && this._queue.length === 0) {\n ReadableStreamDefaultControllerClearAlgorithms(this);\n ReadableStreamClose(stream);\n }\n else {\n ReadableStreamDefaultControllerCallPullIfNeeded(this);\n }\n readRequest._chunkSteps(chunk);\n }\n else {\n ReadableStreamAddReadRequest(stream, readRequest);\n ReadableStreamDefaultControllerCallPullIfNeeded(this);\n }\n };\n return ReadableStreamDefaultController;\n }());\n Object.defineProperties(ReadableStreamDefaultController.prototype, {\n close: { enumerable: true },\n enqueue: { enumerable: true },\n error: { enumerable: true },\n desiredSize: { enumerable: true }\n });\n if (typeof SymbolPolyfill.toStringTag === 'symbol') {\n Object.defineProperty(ReadableStreamDefaultController.prototype, SymbolPolyfill.toStringTag, {\n value: 'ReadableStreamDefaultController',\n configurable: true\n });\n }\n // Abstract operations for the ReadableStreamDefaultController.\n function IsReadableStreamDefaultController(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n if (!Object.prototype.hasOwnProperty.call(x, '_controlledReadableStream')) {\n return false;\n }\n return x instanceof ReadableStreamDefaultController;\n }\n function ReadableStreamDefaultControllerCallPullIfNeeded(controller) {\n var shouldPull = ReadableStreamDefaultControllerShouldCallPull(controller);\n if (!shouldPull) {\n return;\n }\n if (controller._pulling) {\n controller._pullAgain = true;\n return;\n }\n controller._pulling = true;\n var pullPromise = controller._pullAlgorithm();\n uponPromise(pullPromise, function () {\n controller._pulling = false;\n if (controller._pullAgain) {\n controller._pullAgain = false;\n ReadableStreamDefaultControllerCallPullIfNeeded(controller);\n }\n }, function (e) {\n ReadableStreamDefaultControllerError(controller, e);\n });\n }\n function ReadableStreamDefaultControllerShouldCallPull(controller) {\n var stream = controller._controlledReadableStream;\n if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)) {\n return false;\n }\n if (!controller._started) {\n return false;\n }\n if (IsReadableStreamLocked(stream) && ReadableStreamGetNumReadRequests(stream) > 0) {\n return true;\n }\n var desiredSize = ReadableStreamDefaultControllerGetDesiredSize(controller);\n if (desiredSize > 0) {\n return true;\n }\n return false;\n }\n function ReadableStreamDefaultControllerClearAlgorithms(controller) {\n controller._pullAlgorithm = undefined;\n controller._cancelAlgorithm = undefined;\n controller._strategySizeAlgorithm = undefined;\n }\n // A client of ReadableStreamDefaultController may use these functions directly to bypass state check.\n function ReadableStreamDefaultControllerClose(controller) {\n if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)) {\n return;\n }\n var stream = controller._controlledReadableStream;\n controller._closeRequested = true;\n if (controller._queue.length === 0) {\n ReadableStreamDefaultControllerClearAlgorithms(controller);\n ReadableStreamClose(stream);\n }\n }\n function ReadableStreamDefaultControllerEnqueue(controller, chunk) {\n if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(controller)) {\n return;\n }\n var stream = controller._controlledReadableStream;\n if (IsReadableStreamLocked(stream) && ReadableStreamGetNumReadRequests(stream) > 0) {\n ReadableStreamFulfillReadRequest(stream, chunk, false);\n }\n else {\n var chunkSize = void 0;\n try {\n chunkSize = controller._strategySizeAlgorithm(chunk);\n }\n catch (chunkSizeE) {\n ReadableStreamDefaultControllerError(controller, chunkSizeE);\n throw chunkSizeE;\n }\n try {\n EnqueueValueWithSize(controller, chunk, chunkSize);\n }\n catch (enqueueE) {\n ReadableStreamDefaultControllerError(controller, enqueueE);\n throw enqueueE;\n }\n }\n ReadableStreamDefaultControllerCallPullIfNeeded(controller);\n }\n function ReadableStreamDefaultControllerError(controller, e) {\n var stream = controller._controlledReadableStream;\n if (stream._state !== 'readable') {\n return;\n }\n ResetQueue(controller);\n ReadableStreamDefaultControllerClearAlgorithms(controller);\n ReadableStreamError(stream, e);\n }\n function ReadableStreamDefaultControllerGetDesiredSize(controller) {\n var state = controller._controlledReadableStream._state;\n if (state === 'errored') {\n return null;\n }\n if (state === 'closed') {\n return 0;\n }\n return controller._strategyHWM - controller._queueTotalSize;\n }\n // This is used in the implementation of TransformStream.\n function ReadableStreamDefaultControllerHasBackpressure(controller) {\n if (ReadableStreamDefaultControllerShouldCallPull(controller)) {\n return false;\n }\n return true;\n }\n function ReadableStreamDefaultControllerCanCloseOrEnqueue(controller) {\n var state = controller._controlledReadableStream._state;\n if (!controller._closeRequested && state === 'readable') {\n return true;\n }\n return false;\n }\n function SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm) {\n controller._controlledReadableStream = stream;\n controller._queue = undefined;\n controller._queueTotalSize = undefined;\n ResetQueue(controller);\n controller._started = false;\n controller._closeRequested = false;\n controller._pullAgain = false;\n controller._pulling = false;\n controller._strategySizeAlgorithm = sizeAlgorithm;\n controller._strategyHWM = highWaterMark;\n controller._pullAlgorithm = pullAlgorithm;\n controller._cancelAlgorithm = cancelAlgorithm;\n stream._readableStreamController = controller;\n var startResult = startAlgorithm();\n uponPromise(promiseResolvedWith(startResult), function () {\n controller._started = true;\n ReadableStreamDefaultControllerCallPullIfNeeded(controller);\n }, function (r) {\n ReadableStreamDefaultControllerError(controller, r);\n });\n }\n function SetUpReadableStreamDefaultControllerFromUnderlyingSource(stream, underlyingSource, highWaterMark, sizeAlgorithm) {\n var controller = Object.create(ReadableStreamDefaultController.prototype);\n var startAlgorithm = function () { return undefined; };\n var pullAlgorithm = function () { return promiseResolvedWith(undefined); };\n var cancelAlgorithm = function () { return promiseResolvedWith(undefined); };\n if (underlyingSource.start !== undefined) {\n startAlgorithm = function () { return underlyingSource.start(controller); };\n }\n if (underlyingSource.pull !== undefined) {\n pullAlgorithm = function () { return underlyingSource.pull(controller); };\n }\n if (underlyingSource.cancel !== undefined) {\n cancelAlgorithm = function (reason) { return underlyingSource.cancel(reason); };\n }\n SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm);\n }\n // Helper functions for the ReadableStreamDefaultController.\n function defaultControllerBrandCheckException$1(name) {\n return new TypeError(\"ReadableStreamDefaultController.prototype.\" + name + \" can only be used on a ReadableStreamDefaultController\");\n }\n\n function ReadableStreamTee(stream, cloneForBranch2) {\n if (IsReadableByteStreamController(stream._readableStreamController)) {\n return ReadableByteStreamTee(stream);\n }\n return ReadableStreamDefaultTee(stream);\n }\n function ReadableStreamDefaultTee(stream, cloneForBranch2) {\n var reader = AcquireReadableStreamDefaultReader(stream);\n var reading = false;\n var canceled1 = false;\n var canceled2 = false;\n var reason1;\n var reason2;\n var branch1;\n var branch2;\n var resolveCancelPromise;\n var cancelPromise = newPromise(function (resolve) {\n resolveCancelPromise = resolve;\n });\n function pullAlgorithm() {\n if (reading) {\n return promiseResolvedWith(undefined);\n }\n reading = true;\n var readRequest = {\n _chunkSteps: function (chunk) {\n // This needs to be delayed a microtask because it takes at least a microtask to detect errors (using\n // reader._closedPromise below), and we want errors in stream to error both branches immediately. We cannot let\n // successful synchronously-available reads get ahead of asynchronously-available errors.\n queueMicrotask(function () {\n reading = false;\n var chunk1 = chunk;\n var chunk2 = chunk;\n // There is no way to access the cloning code right now in the reference implementation.\n // If we add one then we'll need an implementation for serializable objects.\n // if (!canceled2 && cloneForBranch2) {\n // chunk2 = StructuredDeserialize(StructuredSerialize(chunk2));\n // }\n if (!canceled1) {\n ReadableStreamDefaultControllerEnqueue(branch1._readableStreamController, chunk1);\n }\n if (!canceled2) {\n ReadableStreamDefaultControllerEnqueue(branch2._readableStreamController, chunk2);\n }\n });\n },\n _closeSteps: function () {\n reading = false;\n if (!canceled1) {\n ReadableStreamDefaultControllerClose(branch1._readableStreamController);\n }\n if (!canceled2) {\n ReadableStreamDefaultControllerClose(branch2._readableStreamController);\n }\n if (!canceled1 || !canceled2) {\n resolveCancelPromise(undefined);\n }\n },\n _errorSteps: function () {\n reading = false;\n }\n };\n ReadableStreamDefaultReaderRead(reader, readRequest);\n return promiseResolvedWith(undefined);\n }\n function cancel1Algorithm(reason) {\n canceled1 = true;\n reason1 = reason;\n if (canceled2) {\n var compositeReason = CreateArrayFromList([reason1, reason2]);\n var cancelResult = ReadableStreamCancel(stream, compositeReason);\n resolveCancelPromise(cancelResult);\n }\n return cancelPromise;\n }\n function cancel2Algorithm(reason) {\n canceled2 = true;\n reason2 = reason;\n if (canceled1) {\n var compositeReason = CreateArrayFromList([reason1, reason2]);\n var cancelResult = ReadableStreamCancel(stream, compositeReason);\n resolveCancelPromise(cancelResult);\n }\n return cancelPromise;\n }\n function startAlgorithm() {\n // do nothing\n }\n branch1 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancel1Algorithm);\n branch2 = CreateReadableStream(startAlgorithm, pullAlgorithm, cancel2Algorithm);\n uponRejection(reader._closedPromise, function (r) {\n ReadableStreamDefaultControllerError(branch1._readableStreamController, r);\n ReadableStreamDefaultControllerError(branch2._readableStreamController, r);\n if (!canceled1 || !canceled2) {\n resolveCancelPromise(undefined);\n }\n });\n return [branch1, branch2];\n }\n function ReadableByteStreamTee(stream) {\n var reader = AcquireReadableStreamDefaultReader(stream);\n var reading = false;\n var canceled1 = false;\n var canceled2 = false;\n var reason1;\n var reason2;\n var branch1;\n var branch2;\n var resolveCancelPromise;\n var cancelPromise = newPromise(function (resolve) {\n resolveCancelPromise = resolve;\n });\n function forwardReaderError(thisReader) {\n uponRejection(thisReader._closedPromise, function (r) {\n if (thisReader !== reader) {\n return;\n }\n ReadableByteStreamControllerError(branch1._readableStreamController, r);\n ReadableByteStreamControllerError(branch2._readableStreamController, r);\n if (!canceled1 || !canceled2) {\n resolveCancelPromise(undefined);\n }\n });\n }\n function pullWithDefaultReader() {\n if (IsReadableStreamBYOBReader(reader)) {\n ReadableStreamReaderGenericRelease(reader);\n reader = AcquireReadableStreamDefaultReader(stream);\n forwardReaderError(reader);\n }\n var readRequest = {\n _chunkSteps: function (chunk) {\n // This needs to be delayed a microtask because it takes at least a microtask to detect errors (using\n // reader._closedPromise below), and we want errors in stream to error both branches immediately. We cannot let\n // successful synchronously-available reads get ahead of asynchronously-available errors.\n queueMicrotask(function () {\n reading = false;\n var chunk1 = chunk;\n var chunk2 = chunk;\n if (!canceled1 && !canceled2) {\n try {\n chunk2 = CloneAsUint8Array(chunk);\n }\n catch (cloneE) {\n ReadableByteStreamControllerError(branch1._readableStreamController, cloneE);\n ReadableByteStreamControllerError(branch2._readableStreamController, cloneE);\n resolveCancelPromise(ReadableStreamCancel(stream, cloneE));\n return;\n }\n }\n if (!canceled1) {\n ReadableByteStreamControllerEnqueue(branch1._readableStreamController, chunk1);\n }\n if (!canceled2) {\n ReadableByteStreamControllerEnqueue(branch2._readableStreamController, chunk2);\n }\n });\n },\n _closeSteps: function () {\n reading = false;\n if (!canceled1) {\n ReadableByteStreamControllerClose(branch1._readableStreamController);\n }\n if (!canceled2) {\n ReadableByteStreamControllerClose(branch2._readableStreamController);\n }\n if (branch1._readableStreamController._pendingPullIntos.length > 0) {\n ReadableByteStreamControllerRespond(branch1._readableStreamController, 0);\n }\n if (branch2._readableStreamController._pendingPullIntos.length > 0) {\n ReadableByteStreamControllerRespond(branch2._readableStreamController, 0);\n }\n if (!canceled1 || !canceled2) {\n resolveCancelPromise(undefined);\n }\n },\n _errorSteps: function () {\n reading = false;\n }\n };\n ReadableStreamDefaultReaderRead(reader, readRequest);\n }\n function pullWithBYOBReader(view, forBranch2) {\n if (IsReadableStreamDefaultReader(reader)) {\n ReadableStreamReaderGenericRelease(reader);\n reader = AcquireReadableStreamBYOBReader(stream);\n forwardReaderError(reader);\n }\n var byobBranch = forBranch2 ? branch2 : branch1;\n var otherBranch = forBranch2 ? branch1 : branch2;\n var readIntoRequest = {\n _chunkSteps: function (chunk) {\n // This needs to be delayed a microtask because it takes at least a microtask to detect errors (using\n // reader._closedPromise below), and we want errors in stream to error both branches immediately. We cannot let\n // successful synchronously-available reads get ahead of asynchronously-available errors.\n queueMicrotask(function () {\n reading = false;\n var byobCanceled = forBranch2 ? canceled2 : canceled1;\n var otherCanceled = forBranch2 ? canceled1 : canceled2;\n if (!otherCanceled) {\n var clonedChunk = void 0;\n try {\n clonedChunk = CloneAsUint8Array(chunk);\n }\n catch (cloneE) {\n ReadableByteStreamControllerError(byobBranch._readableStreamController, cloneE);\n ReadableByteStreamControllerError(otherBranch._readableStreamController, cloneE);\n resolveCancelPromise(ReadableStreamCancel(stream, cloneE));\n return;\n }\n if (!byobCanceled) {\n ReadableByteStreamControllerRespondWithNewView(byobBranch._readableStreamController, chunk);\n }\n ReadableByteStreamControllerEnqueue(otherBranch._readableStreamController, clonedChunk);\n }\n else if (!byobCanceled) {\n ReadableByteStreamControllerRespondWithNewView(byobBranch._readableStreamController, chunk);\n }\n });\n },\n _closeSteps: function (chunk) {\n reading = false;\n var byobCanceled = forBranch2 ? canceled2 : canceled1;\n var otherCanceled = forBranch2 ? canceled1 : canceled2;\n if (!byobCanceled) {\n ReadableByteStreamControllerClose(byobBranch._readableStreamController);\n }\n if (!otherCanceled) {\n ReadableByteStreamControllerClose(otherBranch._readableStreamController);\n }\n if (chunk !== undefined) {\n if (!byobCanceled) {\n ReadableByteStreamControllerRespondWithNewView(byobBranch._readableStreamController, chunk);\n }\n if (!otherCanceled && otherBranch._readableStreamController._pendingPullIntos.length > 0) {\n ReadableByteStreamControllerRespond(otherBranch._readableStreamController, 0);\n }\n }\n if (!byobCanceled || !otherCanceled) {\n resolveCancelPromise(undefined);\n }\n },\n _errorSteps: function () {\n reading = false;\n }\n };\n ReadableStreamBYOBReaderRead(reader, view, readIntoRequest);\n }\n function pull1Algorithm() {\n if (reading) {\n return promiseResolvedWith(undefined);\n }\n reading = true;\n var byobRequest = ReadableByteStreamControllerGetBYOBRequest(branch1._readableStreamController);\n if (byobRequest === null) {\n pullWithDefaultReader();\n }\n else {\n pullWithBYOBReader(byobRequest._view, false);\n }\n return promiseResolvedWith(undefined);\n }\n function pull2Algorithm() {\n if (reading) {\n return promiseResolvedWith(undefined);\n }\n reading = true;\n var byobRequest = ReadableByteStreamControllerGetBYOBRequest(branch2._readableStreamController);\n if (byobRequest === null) {\n pullWithDefaultReader();\n }\n else {\n pullWithBYOBReader(byobRequest._view, true);\n }\n return promiseResolvedWith(undefined);\n }\n function cancel1Algorithm(reason) {\n canceled1 = true;\n reason1 = reason;\n if (canceled2) {\n var compositeReason = CreateArrayFromList([reason1, reason2]);\n var cancelResult = ReadableStreamCancel(stream, compositeReason);\n resolveCancelPromise(cancelResult);\n }\n return cancelPromise;\n }\n function cancel2Algorithm(reason) {\n canceled2 = true;\n reason2 = reason;\n if (canceled1) {\n var compositeReason = CreateArrayFromList([reason1, reason2]);\n var cancelResult = ReadableStreamCancel(stream, compositeReason);\n resolveCancelPromise(cancelResult);\n }\n return cancelPromise;\n }\n function startAlgorithm() {\n return;\n }\n branch1 = CreateReadableByteStream(startAlgorithm, pull1Algorithm, cancel1Algorithm);\n branch2 = CreateReadableByteStream(startAlgorithm, pull2Algorithm, cancel2Algorithm);\n forwardReaderError(reader);\n return [branch1, branch2];\n }\n\n function convertUnderlyingDefaultOrByteSource(source, context) {\n assertDictionary(source, context);\n var original = source;\n var autoAllocateChunkSize = original === null || original === void 0 ? void 0 : original.autoAllocateChunkSize;\n var cancel = original === null || original === void 0 ? void 0 : original.cancel;\n var pull = original === null || original === void 0 ? void 0 : original.pull;\n var start = original === null || original === void 0 ? void 0 : original.start;\n var type = original === null || original === void 0 ? void 0 : original.type;\n return {\n autoAllocateChunkSize: autoAllocateChunkSize === undefined ?\n undefined :\n convertUnsignedLongLongWithEnforceRange(autoAllocateChunkSize, context + \" has member 'autoAllocateChunkSize' that\"),\n cancel: cancel === undefined ?\n undefined :\n convertUnderlyingSourceCancelCallback(cancel, original, context + \" has member 'cancel' that\"),\n pull: pull === undefined ?\n undefined :\n convertUnderlyingSourcePullCallback(pull, original, context + \" has member 'pull' that\"),\n start: start === undefined ?\n undefined :\n convertUnderlyingSourceStartCallback(start, original, context + \" has member 'start' that\"),\n type: type === undefined ? undefined : convertReadableStreamType(type, context + \" has member 'type' that\")\n };\n }\n function convertUnderlyingSourceCancelCallback(fn, original, context) {\n assertFunction(fn, context);\n return function (reason) { return promiseCall(fn, original, [reason]); };\n }\n function convertUnderlyingSourcePullCallback(fn, original, context) {\n assertFunction(fn, context);\n return function (controller) { return promiseCall(fn, original, [controller]); };\n }\n function convertUnderlyingSourceStartCallback(fn, original, context) {\n assertFunction(fn, context);\n return function (controller) { return reflectCall(fn, original, [controller]); };\n }\n function convertReadableStreamType(type, context) {\n type = \"\" + type;\n if (type !== 'bytes') {\n throw new TypeError(context + \" '\" + type + \"' is not a valid enumeration value for ReadableStreamType\");\n }\n return type;\n }\n\n function convertReaderOptions(options, context) {\n assertDictionary(options, context);\n var mode = options === null || options === void 0 ? void 0 : options.mode;\n return {\n mode: mode === undefined ? undefined : convertReadableStreamReaderMode(mode, context + \" has member 'mode' that\")\n };\n }\n function convertReadableStreamReaderMode(mode, context) {\n mode = \"\" + mode;\n if (mode !== 'byob') {\n throw new TypeError(context + \" '\" + mode + \"' is not a valid enumeration value for ReadableStreamReaderMode\");\n }\n return mode;\n }\n\n function convertIteratorOptions(options, context) {\n assertDictionary(options, context);\n var preventCancel = options === null || options === void 0 ? void 0 : options.preventCancel;\n return { preventCancel: Boolean(preventCancel) };\n }\n\n function convertPipeOptions(options, context) {\n assertDictionary(options, context);\n var preventAbort = options === null || options === void 0 ? void 0 : options.preventAbort;\n var preventCancel = options === null || options === void 0 ? void 0 : options.preventCancel;\n var preventClose = options === null || options === void 0 ? void 0 : options.preventClose;\n var signal = options === null || options === void 0 ? void 0 : options.signal;\n if (signal !== undefined) {\n assertAbortSignal(signal, context + \" has member 'signal' that\");\n }\n return {\n preventAbort: Boolean(preventAbort),\n preventCancel: Boolean(preventCancel),\n preventClose: Boolean(preventClose),\n signal: signal\n };\n }\n function assertAbortSignal(signal, context) {\n if (!isAbortSignal(signal)) {\n throw new TypeError(context + \" is not an AbortSignal.\");\n }\n }\n\n function convertReadableWritablePair(pair, context) {\n assertDictionary(pair, context);\n var readable = pair === null || pair === void 0 ? void 0 : pair.readable;\n assertRequiredField(readable, 'readable', 'ReadableWritablePair');\n assertReadableStream(readable, context + \" has member 'readable' that\");\n var writable = pair === null || pair === void 0 ? void 0 : pair.writable;\n assertRequiredField(writable, 'writable', 'ReadableWritablePair');\n assertWritableStream(writable, context + \" has member 'writable' that\");\n return { readable: readable, writable: writable };\n }\n\n /**\n * A readable stream represents a source of data, from which you can read.\n *\n * @public\n */\n var ReadableStream = /** @class */ (function () {\n function ReadableStream(rawUnderlyingSource, rawStrategy) {\n if (rawUnderlyingSource === void 0) { rawUnderlyingSource = {}; }\n if (rawStrategy === void 0) { rawStrategy = {}; }\n if (rawUnderlyingSource === undefined) {\n rawUnderlyingSource = null;\n }\n else {\n assertObject(rawUnderlyingSource, 'First parameter');\n }\n var strategy = convertQueuingStrategy(rawStrategy, 'Second parameter');\n var underlyingSource = convertUnderlyingDefaultOrByteSource(rawUnderlyingSource, 'First parameter');\n InitializeReadableStream(this);\n if (underlyingSource.type === 'bytes') {\n if (strategy.size !== undefined) {\n throw new RangeError('The strategy for a byte stream cannot have a size function');\n }\n var highWaterMark = ExtractHighWaterMark(strategy, 0);\n SetUpReadableByteStreamControllerFromUnderlyingSource(this, underlyingSource, highWaterMark);\n }\n else {\n var sizeAlgorithm = ExtractSizeAlgorithm(strategy);\n var highWaterMark = ExtractHighWaterMark(strategy, 1);\n SetUpReadableStreamDefaultControllerFromUnderlyingSource(this, underlyingSource, highWaterMark, sizeAlgorithm);\n }\n }\n Object.defineProperty(ReadableStream.prototype, \"locked\", {\n /**\n * Whether or not the readable stream is locked to a {@link ReadableStreamDefaultReader | reader}.\n */\n get: function () {\n if (!IsReadableStream(this)) {\n throw streamBrandCheckException$1('locked');\n }\n return IsReadableStreamLocked(this);\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Cancels the stream, signaling a loss of interest in the stream by a consumer.\n *\n * The supplied `reason` argument will be given to the underlying source's {@link UnderlyingSource.cancel | cancel()}\n * method, which might or might not use it.\n */\n ReadableStream.prototype.cancel = function (reason) {\n if (reason === void 0) { reason = undefined; }\n if (!IsReadableStream(this)) {\n return promiseRejectedWith(streamBrandCheckException$1('cancel'));\n }\n if (IsReadableStreamLocked(this)) {\n return promiseRejectedWith(new TypeError('Cannot cancel a stream that already has a reader'));\n }\n return ReadableStreamCancel(this, reason);\n };\n ReadableStream.prototype.getReader = function (rawOptions) {\n if (rawOptions === void 0) { rawOptions = undefined; }\n if (!IsReadableStream(this)) {\n throw streamBrandCheckException$1('getReader');\n }\n var options = convertReaderOptions(rawOptions, 'First parameter');\n if (options.mode === undefined) {\n return AcquireReadableStreamDefaultReader(this);\n }\n return AcquireReadableStreamBYOBReader(this);\n };\n ReadableStream.prototype.pipeThrough = function (rawTransform, rawOptions) {\n if (rawOptions === void 0) { rawOptions = {}; }\n if (!IsReadableStream(this)) {\n throw streamBrandCheckException$1('pipeThrough');\n }\n assertRequiredArgument(rawTransform, 1, 'pipeThrough');\n var transform = convertReadableWritablePair(rawTransform, 'First parameter');\n var options = convertPipeOptions(rawOptions, 'Second parameter');\n if (IsReadableStreamLocked(this)) {\n throw new TypeError('ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream');\n }\n if (IsWritableStreamLocked(transform.writable)) {\n throw new TypeError('ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream');\n }\n var promise = ReadableStreamPipeTo(this, transform.writable, options.preventClose, options.preventAbort, options.preventCancel, options.signal);\n setPromiseIsHandledToTrue(promise);\n return transform.readable;\n };\n ReadableStream.prototype.pipeTo = function (destination, rawOptions) {\n if (rawOptions === void 0) { rawOptions = {}; }\n if (!IsReadableStream(this)) {\n return promiseRejectedWith(streamBrandCheckException$1('pipeTo'));\n }\n if (destination === undefined) {\n return promiseRejectedWith(\"Parameter 1 is required in 'pipeTo'.\");\n }\n if (!IsWritableStream(destination)) {\n return promiseRejectedWith(new TypeError(\"ReadableStream.prototype.pipeTo's first argument must be a WritableStream\"));\n }\n var options;\n try {\n options = convertPipeOptions(rawOptions, 'Second parameter');\n }\n catch (e) {\n return promiseRejectedWith(e);\n }\n if (IsReadableStreamLocked(this)) {\n return promiseRejectedWith(new TypeError('ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream'));\n }\n if (IsWritableStreamLocked(destination)) {\n return promiseRejectedWith(new TypeError('ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream'));\n }\n return ReadableStreamPipeTo(this, destination, options.preventClose, options.preventAbort, options.preventCancel, options.signal);\n };\n /**\n * Tees this readable stream, returning a two-element array containing the two resulting branches as\n * new {@link ReadableStream} instances.\n *\n * Teeing a stream will lock it, preventing any other consumer from acquiring a reader.\n * To cancel the stream, cancel both of the resulting branches; a composite cancellation reason will then be\n * propagated to the stream's underlying source.\n *\n * Note that the chunks seen in each branch will be the same object. If the chunks are not immutable,\n * this could allow interference between the two branches.\n */\n ReadableStream.prototype.tee = function () {\n if (!IsReadableStream(this)) {\n throw streamBrandCheckException$1('tee');\n }\n var branches = ReadableStreamTee(this);\n return CreateArrayFromList(branches);\n };\n ReadableStream.prototype.values = function (rawOptions) {\n if (rawOptions === void 0) { rawOptions = undefined; }\n if (!IsReadableStream(this)) {\n throw streamBrandCheckException$1('values');\n }\n var options = convertIteratorOptions(rawOptions, 'First parameter');\n return AcquireReadableStreamAsyncIterator(this, options.preventCancel);\n };\n return ReadableStream;\n }());\n Object.defineProperties(ReadableStream.prototype, {\n cancel: { enumerable: true },\n getReader: { enumerable: true },\n pipeThrough: { enumerable: true },\n pipeTo: { enumerable: true },\n tee: { enumerable: true },\n values: { enumerable: true },\n locked: { enumerable: true }\n });\n if (typeof SymbolPolyfill.toStringTag === 'symbol') {\n Object.defineProperty(ReadableStream.prototype, SymbolPolyfill.toStringTag, {\n value: 'ReadableStream',\n configurable: true\n });\n }\n if (typeof SymbolPolyfill.asyncIterator === 'symbol') {\n Object.defineProperty(ReadableStream.prototype, SymbolPolyfill.asyncIterator, {\n value: ReadableStream.prototype.values,\n writable: true,\n configurable: true\n });\n }\n // Abstract operations for the ReadableStream.\n // Throws if and only if startAlgorithm throws.\n function CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm) {\n if (highWaterMark === void 0) { highWaterMark = 1; }\n if (sizeAlgorithm === void 0) { sizeAlgorithm = function () { return 1; }; }\n var stream = Object.create(ReadableStream.prototype);\n InitializeReadableStream(stream);\n var controller = Object.create(ReadableStreamDefaultController.prototype);\n SetUpReadableStreamDefaultController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, highWaterMark, sizeAlgorithm);\n return stream;\n }\n // Throws if and only if startAlgorithm throws.\n function CreateReadableByteStream(startAlgorithm, pullAlgorithm, cancelAlgorithm) {\n var stream = Object.create(ReadableStream.prototype);\n InitializeReadableStream(stream);\n var controller = Object.create(ReadableByteStreamController.prototype);\n SetUpReadableByteStreamController(stream, controller, startAlgorithm, pullAlgorithm, cancelAlgorithm, 0, undefined);\n return stream;\n }\n function InitializeReadableStream(stream) {\n stream._state = 'readable';\n stream._reader = undefined;\n stream._storedError = undefined;\n stream._disturbed = false;\n }\n function IsReadableStream(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n if (!Object.prototype.hasOwnProperty.call(x, '_readableStreamController')) {\n return false;\n }\n return x instanceof ReadableStream;\n }\n function IsReadableStreamLocked(stream) {\n if (stream._reader === undefined) {\n return false;\n }\n return true;\n }\n // ReadableStream API exposed for controllers.\n function ReadableStreamCancel(stream, reason) {\n stream._disturbed = true;\n if (stream._state === 'closed') {\n return promiseResolvedWith(undefined);\n }\n if (stream._state === 'errored') {\n return promiseRejectedWith(stream._storedError);\n }\n ReadableStreamClose(stream);\n var reader = stream._reader;\n if (reader !== undefined && IsReadableStreamBYOBReader(reader)) {\n reader._readIntoRequests.forEach(function (readIntoRequest) {\n readIntoRequest._closeSteps(undefined);\n });\n reader._readIntoRequests = new SimpleQueue();\n }\n var sourceCancelPromise = stream._readableStreamController[CancelSteps](reason);\n return transformPromiseWith(sourceCancelPromise, noop);\n }\n function ReadableStreamClose(stream) {\n stream._state = 'closed';\n var reader = stream._reader;\n if (reader === undefined) {\n return;\n }\n defaultReaderClosedPromiseResolve(reader);\n if (IsReadableStreamDefaultReader(reader)) {\n reader._readRequests.forEach(function (readRequest) {\n readRequest._closeSteps();\n });\n reader._readRequests = new SimpleQueue();\n }\n }\n function ReadableStreamError(stream, e) {\n stream._state = 'errored';\n stream._storedError = e;\n var reader = stream._reader;\n if (reader === undefined) {\n return;\n }\n defaultReaderClosedPromiseReject(reader, e);\n if (IsReadableStreamDefaultReader(reader)) {\n reader._readRequests.forEach(function (readRequest) {\n readRequest._errorSteps(e);\n });\n reader._readRequests = new SimpleQueue();\n }\n else {\n reader._readIntoRequests.forEach(function (readIntoRequest) {\n readIntoRequest._errorSteps(e);\n });\n reader._readIntoRequests = new SimpleQueue();\n }\n }\n // Helper functions for the ReadableStream.\n function streamBrandCheckException$1(name) {\n return new TypeError(\"ReadableStream.prototype.\" + name + \" can only be used on a ReadableStream\");\n }\n\n function convertQueuingStrategyInit(init, context) {\n assertDictionary(init, context);\n var highWaterMark = init === null || init === void 0 ? void 0 : init.highWaterMark;\n assertRequiredField(highWaterMark, 'highWaterMark', 'QueuingStrategyInit');\n return {\n highWaterMark: convertUnrestrictedDouble(highWaterMark)\n };\n }\n\n // The size function must not have a prototype property nor be a constructor\n var byteLengthSizeFunction = function (chunk) {\n return chunk.byteLength;\n };\n Object.defineProperty(byteLengthSizeFunction, 'name', {\n value: 'size',\n configurable: true\n });\n /**\n * A queuing strategy that counts the number of bytes in each chunk.\n *\n * @public\n */\n var ByteLengthQueuingStrategy = /** @class */ (function () {\n function ByteLengthQueuingStrategy(options) {\n assertRequiredArgument(options, 1, 'ByteLengthQueuingStrategy');\n options = convertQueuingStrategyInit(options, 'First parameter');\n this._byteLengthQueuingStrategyHighWaterMark = options.highWaterMark;\n }\n Object.defineProperty(ByteLengthQueuingStrategy.prototype, \"highWaterMark\", {\n /**\n * Returns the high water mark provided to the constructor.\n */\n get: function () {\n if (!IsByteLengthQueuingStrategy(this)) {\n throw byteLengthBrandCheckException('highWaterMark');\n }\n return this._byteLengthQueuingStrategyHighWaterMark;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(ByteLengthQueuingStrategy.prototype, \"size\", {\n /**\n * Measures the size of `chunk` by returning the value of its `byteLength` property.\n */\n get: function () {\n if (!IsByteLengthQueuingStrategy(this)) {\n throw byteLengthBrandCheckException('size');\n }\n return byteLengthSizeFunction;\n },\n enumerable: false,\n configurable: true\n });\n return ByteLengthQueuingStrategy;\n }());\n Object.defineProperties(ByteLengthQueuingStrategy.prototype, {\n highWaterMark: { enumerable: true },\n size: { enumerable: true }\n });\n if (typeof SymbolPolyfill.toStringTag === 'symbol') {\n Object.defineProperty(ByteLengthQueuingStrategy.prototype, SymbolPolyfill.toStringTag, {\n value: 'ByteLengthQueuingStrategy',\n configurable: true\n });\n }\n // Helper functions for the ByteLengthQueuingStrategy.\n function byteLengthBrandCheckException(name) {\n return new TypeError(\"ByteLengthQueuingStrategy.prototype.\" + name + \" can only be used on a ByteLengthQueuingStrategy\");\n }\n function IsByteLengthQueuingStrategy(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n if (!Object.prototype.hasOwnProperty.call(x, '_byteLengthQueuingStrategyHighWaterMark')) {\n return false;\n }\n return x instanceof ByteLengthQueuingStrategy;\n }\n\n // The size function must not have a prototype property nor be a constructor\n var countSizeFunction = function () {\n return 1;\n };\n Object.defineProperty(countSizeFunction, 'name', {\n value: 'size',\n configurable: true\n });\n /**\n * A queuing strategy that counts the number of chunks.\n *\n * @public\n */\n var CountQueuingStrategy = /** @class */ (function () {\n function CountQueuingStrategy(options) {\n assertRequiredArgument(options, 1, 'CountQueuingStrategy');\n options = convertQueuingStrategyInit(options, 'First parameter');\n this._countQueuingStrategyHighWaterMark = options.highWaterMark;\n }\n Object.defineProperty(CountQueuingStrategy.prototype, \"highWaterMark\", {\n /**\n * Returns the high water mark provided to the constructor.\n */\n get: function () {\n if (!IsCountQueuingStrategy(this)) {\n throw countBrandCheckException('highWaterMark');\n }\n return this._countQueuingStrategyHighWaterMark;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(CountQueuingStrategy.prototype, \"size\", {\n /**\n * Measures the size of `chunk` by always returning 1.\n * This ensures that the total queue size is a count of the number of chunks in the queue.\n */\n get: function () {\n if (!IsCountQueuingStrategy(this)) {\n throw countBrandCheckException('size');\n }\n return countSizeFunction;\n },\n enumerable: false,\n configurable: true\n });\n return CountQueuingStrategy;\n }());\n Object.defineProperties(CountQueuingStrategy.prototype, {\n highWaterMark: { enumerable: true },\n size: { enumerable: true }\n });\n if (typeof SymbolPolyfill.toStringTag === 'symbol') {\n Object.defineProperty(CountQueuingStrategy.prototype, SymbolPolyfill.toStringTag, {\n value: 'CountQueuingStrategy',\n configurable: true\n });\n }\n // Helper functions for the CountQueuingStrategy.\n function countBrandCheckException(name) {\n return new TypeError(\"CountQueuingStrategy.prototype.\" + name + \" can only be used on a CountQueuingStrategy\");\n }\n function IsCountQueuingStrategy(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n if (!Object.prototype.hasOwnProperty.call(x, '_countQueuingStrategyHighWaterMark')) {\n return false;\n }\n return x instanceof CountQueuingStrategy;\n }\n\n function convertTransformer(original, context) {\n assertDictionary(original, context);\n var flush = original === null || original === void 0 ? void 0 : original.flush;\n var readableType = original === null || original === void 0 ? void 0 : original.readableType;\n var start = original === null || original === void 0 ? void 0 : original.start;\n var transform = original === null || original === void 0 ? void 0 : original.transform;\n var writableType = original === null || original === void 0 ? void 0 : original.writableType;\n return {\n flush: flush === undefined ?\n undefined :\n convertTransformerFlushCallback(flush, original, context + \" has member 'flush' that\"),\n readableType: readableType,\n start: start === undefined ?\n undefined :\n convertTransformerStartCallback(start, original, context + \" has member 'start' that\"),\n transform: transform === undefined ?\n undefined :\n convertTransformerTransformCallback(transform, original, context + \" has member 'transform' that\"),\n writableType: writableType\n };\n }\n function convertTransformerFlushCallback(fn, original, context) {\n assertFunction(fn, context);\n return function (controller) { return promiseCall(fn, original, [controller]); };\n }\n function convertTransformerStartCallback(fn, original, context) {\n assertFunction(fn, context);\n return function (controller) { return reflectCall(fn, original, [controller]); };\n }\n function convertTransformerTransformCallback(fn, original, context) {\n assertFunction(fn, context);\n return function (chunk, controller) { return promiseCall(fn, original, [chunk, controller]); };\n }\n\n // Class TransformStream\n /**\n * A transform stream consists of a pair of streams: a {@link WritableStream | writable stream},\n * known as its writable side, and a {@link ReadableStream | readable stream}, known as its readable side.\n * In a manner specific to the transform stream in question, writes to the writable side result in new data being\n * made available for reading from the readable side.\n *\n * @public\n */\n var TransformStream = /** @class */ (function () {\n function TransformStream(rawTransformer, rawWritableStrategy, rawReadableStrategy) {\n if (rawTransformer === void 0) { rawTransformer = {}; }\n if (rawWritableStrategy === void 0) { rawWritableStrategy = {}; }\n if (rawReadableStrategy === void 0) { rawReadableStrategy = {}; }\n if (rawTransformer === undefined) {\n rawTransformer = null;\n }\n var writableStrategy = convertQueuingStrategy(rawWritableStrategy, 'Second parameter');\n var readableStrategy = convertQueuingStrategy(rawReadableStrategy, 'Third parameter');\n var transformer = convertTransformer(rawTransformer, 'First parameter');\n if (transformer.readableType !== undefined) {\n throw new RangeError('Invalid readableType specified');\n }\n if (transformer.writableType !== undefined) {\n throw new RangeError('Invalid writableType specified');\n }\n var readableHighWaterMark = ExtractHighWaterMark(readableStrategy, 0);\n var readableSizeAlgorithm = ExtractSizeAlgorithm(readableStrategy);\n var writableHighWaterMark = ExtractHighWaterMark(writableStrategy, 1);\n var writableSizeAlgorithm = ExtractSizeAlgorithm(writableStrategy);\n var startPromise_resolve;\n var startPromise = newPromise(function (resolve) {\n startPromise_resolve = resolve;\n });\n InitializeTransformStream(this, startPromise, writableHighWaterMark, writableSizeAlgorithm, readableHighWaterMark, readableSizeAlgorithm);\n SetUpTransformStreamDefaultControllerFromTransformer(this, transformer);\n if (transformer.start !== undefined) {\n startPromise_resolve(transformer.start(this._transformStreamController));\n }\n else {\n startPromise_resolve(undefined);\n }\n }\n Object.defineProperty(TransformStream.prototype, \"readable\", {\n /**\n * The readable side of the transform stream.\n */\n get: function () {\n if (!IsTransformStream(this)) {\n throw streamBrandCheckException('readable');\n }\n return this._readable;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(TransformStream.prototype, \"writable\", {\n /**\n * The writable side of the transform stream.\n */\n get: function () {\n if (!IsTransformStream(this)) {\n throw streamBrandCheckException('writable');\n }\n return this._writable;\n },\n enumerable: false,\n configurable: true\n });\n return TransformStream;\n }());\n Object.defineProperties(TransformStream.prototype, {\n readable: { enumerable: true },\n writable: { enumerable: true }\n });\n if (typeof SymbolPolyfill.toStringTag === 'symbol') {\n Object.defineProperty(TransformStream.prototype, SymbolPolyfill.toStringTag, {\n value: 'TransformStream',\n configurable: true\n });\n }\n function InitializeTransformStream(stream, startPromise, writableHighWaterMark, writableSizeAlgorithm, readableHighWaterMark, readableSizeAlgorithm) {\n function startAlgorithm() {\n return startPromise;\n }\n function writeAlgorithm(chunk) {\n return TransformStreamDefaultSinkWriteAlgorithm(stream, chunk);\n }\n function abortAlgorithm(reason) {\n return TransformStreamDefaultSinkAbortAlgorithm(stream, reason);\n }\n function closeAlgorithm() {\n return TransformStreamDefaultSinkCloseAlgorithm(stream);\n }\n stream._writable = CreateWritableStream(startAlgorithm, writeAlgorithm, closeAlgorithm, abortAlgorithm, writableHighWaterMark, writableSizeAlgorithm);\n function pullAlgorithm() {\n return TransformStreamDefaultSourcePullAlgorithm(stream);\n }\n function cancelAlgorithm(reason) {\n TransformStreamErrorWritableAndUnblockWrite(stream, reason);\n return promiseResolvedWith(undefined);\n }\n stream._readable = CreateReadableStream(startAlgorithm, pullAlgorithm, cancelAlgorithm, readableHighWaterMark, readableSizeAlgorithm);\n // The [[backpressure]] slot is set to undefined so that it can be initialised by TransformStreamSetBackpressure.\n stream._backpressure = undefined;\n stream._backpressureChangePromise = undefined;\n stream._backpressureChangePromise_resolve = undefined;\n TransformStreamSetBackpressure(stream, true);\n stream._transformStreamController = undefined;\n }\n function IsTransformStream(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n if (!Object.prototype.hasOwnProperty.call(x, '_transformStreamController')) {\n return false;\n }\n return x instanceof TransformStream;\n }\n // This is a no-op if both sides are already errored.\n function TransformStreamError(stream, e) {\n ReadableStreamDefaultControllerError(stream._readable._readableStreamController, e);\n TransformStreamErrorWritableAndUnblockWrite(stream, e);\n }\n function TransformStreamErrorWritableAndUnblockWrite(stream, e) {\n TransformStreamDefaultControllerClearAlgorithms(stream._transformStreamController);\n WritableStreamDefaultControllerErrorIfNeeded(stream._writable._writableStreamController, e);\n if (stream._backpressure) {\n // Pretend that pull() was called to permit any pending write() calls to complete. TransformStreamSetBackpressure()\n // cannot be called from enqueue() or pull() once the ReadableStream is errored, so this will will be the final time\n // _backpressure is set.\n TransformStreamSetBackpressure(stream, false);\n }\n }\n function TransformStreamSetBackpressure(stream, backpressure) {\n // Passes also when called during construction.\n if (stream._backpressureChangePromise !== undefined) {\n stream._backpressureChangePromise_resolve();\n }\n stream._backpressureChangePromise = newPromise(function (resolve) {\n stream._backpressureChangePromise_resolve = resolve;\n });\n stream._backpressure = backpressure;\n }\n // Class TransformStreamDefaultController\n /**\n * Allows control of the {@link ReadableStream} and {@link WritableStream} of the associated {@link TransformStream}.\n *\n * @public\n */\n var TransformStreamDefaultController = /** @class */ (function () {\n function TransformStreamDefaultController() {\n throw new TypeError('Illegal constructor');\n }\n Object.defineProperty(TransformStreamDefaultController.prototype, \"desiredSize\", {\n /**\n * Returns the desired size to fill the readable side’s internal queue. It can be negative, if the queue is over-full.\n */\n get: function () {\n if (!IsTransformStreamDefaultController(this)) {\n throw defaultControllerBrandCheckException('desiredSize');\n }\n var readableController = this._controlledTransformStream._readable._readableStreamController;\n return ReadableStreamDefaultControllerGetDesiredSize(readableController);\n },\n enumerable: false,\n configurable: true\n });\n TransformStreamDefaultController.prototype.enqueue = function (chunk) {\n if (chunk === void 0) { chunk = undefined; }\n if (!IsTransformStreamDefaultController(this)) {\n throw defaultControllerBrandCheckException('enqueue');\n }\n TransformStreamDefaultControllerEnqueue(this, chunk);\n };\n /**\n * Errors both the readable side and the writable side of the controlled transform stream, making all future\n * interactions with it fail with the given error `e`. Any chunks queued for transformation will be discarded.\n */\n TransformStreamDefaultController.prototype.error = function (reason) {\n if (reason === void 0) { reason = undefined; }\n if (!IsTransformStreamDefaultController(this)) {\n throw defaultControllerBrandCheckException('error');\n }\n TransformStreamDefaultControllerError(this, reason);\n };\n /**\n * Closes the readable side and errors the writable side of the controlled transform stream. This is useful when the\n * transformer only needs to consume a portion of the chunks written to the writable side.\n */\n TransformStreamDefaultController.prototype.terminate = function () {\n if (!IsTransformStreamDefaultController(this)) {\n throw defaultControllerBrandCheckException('terminate');\n }\n TransformStreamDefaultControllerTerminate(this);\n };\n return TransformStreamDefaultController;\n }());\n Object.defineProperties(TransformStreamDefaultController.prototype, {\n enqueue: { enumerable: true },\n error: { enumerable: true },\n terminate: { enumerable: true },\n desiredSize: { enumerable: true }\n });\n if (typeof SymbolPolyfill.toStringTag === 'symbol') {\n Object.defineProperty(TransformStreamDefaultController.prototype, SymbolPolyfill.toStringTag, {\n value: 'TransformStreamDefaultController',\n configurable: true\n });\n }\n // Transform Stream Default Controller Abstract Operations\n function IsTransformStreamDefaultController(x) {\n if (!typeIsObject(x)) {\n return false;\n }\n if (!Object.prototype.hasOwnProperty.call(x, '_controlledTransformStream')) {\n return false;\n }\n return x instanceof TransformStreamDefaultController;\n }\n function SetUpTransformStreamDefaultController(stream, controller, transformAlgorithm, flushAlgorithm) {\n controller._controlledTransformStream = stream;\n stream._transformStreamController = controller;\n controller._transformAlgorithm = transformAlgorithm;\n controller._flushAlgorithm = flushAlgorithm;\n }\n function SetUpTransformStreamDefaultControllerFromTransformer(stream, transformer) {\n var controller = Object.create(TransformStreamDefaultController.prototype);\n var transformAlgorithm = function (chunk) {\n try {\n TransformStreamDefaultControllerEnqueue(controller, chunk);\n return promiseResolvedWith(undefined);\n }\n catch (transformResultE) {\n return promiseRejectedWith(transformResultE);\n }\n };\n var flushAlgorithm = function () { return promiseResolvedWith(undefined); };\n if (transformer.transform !== undefined) {\n transformAlgorithm = function (chunk) { return transformer.transform(chunk, controller); };\n }\n if (transformer.flush !== undefined) {\n flushAlgorithm = function () { return transformer.flush(controller); };\n }\n SetUpTransformStreamDefaultController(stream, controller, transformAlgorithm, flushAlgorithm);\n }\n function TransformStreamDefaultControllerClearAlgorithms(controller) {\n controller._transformAlgorithm = undefined;\n controller._flushAlgorithm = undefined;\n }\n function TransformStreamDefaultControllerEnqueue(controller, chunk) {\n var stream = controller._controlledTransformStream;\n var readableController = stream._readable._readableStreamController;\n if (!ReadableStreamDefaultControllerCanCloseOrEnqueue(readableController)) {\n throw new TypeError('Readable side is not in a state that permits enqueue');\n }\n // We throttle transform invocations based on the backpressure of the ReadableStream, but we still\n // accept TransformStreamDefaultControllerEnqueue() calls.\n try {\n ReadableStreamDefaultControllerEnqueue(readableController, chunk);\n }\n catch (e) {\n // This happens when readableStrategy.size() throws.\n TransformStreamErrorWritableAndUnblockWrite(stream, e);\n throw stream._readable._storedError;\n }\n var backpressure = ReadableStreamDefaultControllerHasBackpressure(readableController);\n if (backpressure !== stream._backpressure) {\n TransformStreamSetBackpressure(stream, true);\n }\n }\n function TransformStreamDefaultControllerError(controller, e) {\n TransformStreamError(controller._controlledTransformStream, e);\n }\n function TransformStreamDefaultControllerPerformTransform(controller, chunk) {\n var transformPromise = controller._transformAlgorithm(chunk);\n return transformPromiseWith(transformPromise, undefined, function (r) {\n TransformStreamError(controller._controlledTransformStream, r);\n throw r;\n });\n }\n function TransformStreamDefaultControllerTerminate(controller) {\n var stream = controller._controlledTransformStream;\n var readableController = stream._readable._readableStreamController;\n ReadableStreamDefaultControllerClose(readableController);\n var error = new TypeError('TransformStream terminated');\n TransformStreamErrorWritableAndUnblockWrite(stream, error);\n }\n // TransformStreamDefaultSink Algorithms\n function TransformStreamDefaultSinkWriteAlgorithm(stream, chunk) {\n var controller = stream._transformStreamController;\n if (stream._backpressure) {\n var backpressureChangePromise = stream._backpressureChangePromise;\n return transformPromiseWith(backpressureChangePromise, function () {\n var writable = stream._writable;\n var state = writable._state;\n if (state === 'erroring') {\n throw writable._storedError;\n }\n return TransformStreamDefaultControllerPerformTransform(controller, chunk);\n });\n }\n return TransformStreamDefaultControllerPerformTransform(controller, chunk);\n }\n function TransformStreamDefaultSinkAbortAlgorithm(stream, reason) {\n // abort() is not called synchronously, so it is possible for abort() to be called when the stream is already\n // errored.\n TransformStreamError(stream, reason);\n return promiseResolvedWith(undefined);\n }\n function TransformStreamDefaultSinkCloseAlgorithm(stream) {\n // stream._readable cannot change after construction, so caching it across a call to user code is safe.\n var readable = stream._readable;\n var controller = stream._transformStreamController;\n var flushPromise = controller._flushAlgorithm();\n TransformStreamDefaultControllerClearAlgorithms(controller);\n // Return a promise that is fulfilled with undefined on success.\n return transformPromiseWith(flushPromise, function () {\n if (readable._state === 'errored') {\n throw readable._storedError;\n }\n ReadableStreamDefaultControllerClose(readable._readableStreamController);\n }, function (r) {\n TransformStreamError(stream, r);\n throw readable._storedError;\n });\n }\n // TransformStreamDefaultSource Algorithms\n function TransformStreamDefaultSourcePullAlgorithm(stream) {\n // Invariant. Enforced by the promises returned by start() and pull().\n TransformStreamSetBackpressure(stream, false);\n // Prevent the next pull() call until there is backpressure.\n return stream._backpressureChangePromise;\n }\n // Helper functions for the TransformStreamDefaultController.\n function defaultControllerBrandCheckException(name) {\n return new TypeError(\"TransformStreamDefaultController.prototype.\" + name + \" can only be used on a TransformStreamDefaultController\");\n }\n // Helper functions for the TransformStream.\n function streamBrandCheckException(name) {\n return new TypeError(\"TransformStream.prototype.\" + name + \" can only be used on a TransformStream\");\n }\n\n exports.ByteLengthQueuingStrategy = ByteLengthQueuingStrategy;\n exports.CountQueuingStrategy = CountQueuingStrategy;\n exports.ReadableByteStreamController = ReadableByteStreamController;\n exports.ReadableStream = ReadableStream;\n exports.ReadableStreamBYOBReader = ReadableStreamBYOBReader;\n exports.ReadableStreamBYOBRequest = ReadableStreamBYOBRequest;\n exports.ReadableStreamDefaultController = ReadableStreamDefaultController;\n exports.ReadableStreamDefaultReader = ReadableStreamDefaultReader;\n exports.TransformStream = TransformStream;\n exports.TransformStreamDefaultController = TransformStreamDefaultController;\n exports.WritableStream = WritableStream;\n exports.WritableStreamDefaultController = WritableStreamDefaultController;\n exports.WritableStreamDefaultWriter = WritableStreamDefaultWriter;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n//# sourceMappingURL=ponyfill.js.map\n","/* Copyright 2015 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\nimport { CMapCompressionType, unreachable } from \"../shared/util.js\";\n\nclass BaseCanvasFactory {\n constructor() {\n if (this.constructor === BaseCanvasFactory) {\n unreachable(\"Cannot initialize BaseCanvasFactory.\");\n }\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\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\n destroy(canvasAndContext) {\n if (!canvasAndContext.canvas) {\n throw new Error(\"Canvas is not specified\");\n }\n // Zeroing the width and height cause Firefox to release graphics\n // resources immediately, which can greatly reduce memory consumption.\n canvasAndContext.canvas.width = 0;\n canvasAndContext.canvas.height = 0;\n canvasAndContext.canvas = null;\n canvasAndContext.context = null;\n }\n\n /**\n * @private\n */\n _createCanvas(width, height) {\n unreachable(\"Abstract method `_createCanvas` called.\");\n }\n}\n\nclass BaseCMapReaderFactory {\n constructor({ baseUrl = null, isCompressed = false }) {\n if (this.constructor === BaseCMapReaderFactory) {\n unreachable(\"Cannot initialize BaseCMapReaderFactory.\");\n }\n this.baseUrl = baseUrl;\n this.isCompressed = isCompressed;\n }\n\n async fetch({ name }) {\n if (!this.baseUrl) {\n throw new Error(\n 'The CMap \"baseUrl\" parameter must be specified, ensure that ' +\n 'the \"cMapUrl\" and \"cMapPacked\" API parameters are provided.'\n );\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\n ? CMapCompressionType.BINARY\n : CMapCompressionType.NONE;\n\n return this._fetchData(url, compressionType).catch(reason => {\n throw new Error(\n `Unable to load ${this.isCompressed ? \"binary \" : \"\"}CMap at: ${url}`\n );\n });\n }\n\n /**\n * @private\n */\n _fetchData(url, compressionType) {\n unreachable(\"Abstract method `_fetchData` called.\");\n }\n}\n\nclass BaseStandardFontDataFactory {\n constructor({ baseUrl = null }) {\n if (this.constructor === BaseStandardFontDataFactory) {\n unreachable(\"Cannot initialize BaseStandardFontDataFactory.\");\n }\n this.baseUrl = baseUrl;\n }\n\n async fetch({ filename }) {\n if (!this.baseUrl) {\n throw new Error(\n 'The standard font \"baseUrl\" parameter must be specified, ensure that ' +\n 'the \"standardFontDataUrl\" API parameter is provided.'\n );\n }\n if (!filename) {\n throw new Error(\"Font filename must be specified.\");\n }\n const url = `${this.baseUrl}${filename}`;\n\n return this._fetchData(url).catch(reason => {\n throw new Error(`Unable to load font data at: ${url}`);\n });\n }\n\n /**\n * @private\n */\n _fetchData(url) {\n unreachable(\"Abstract method `_fetchData` called.\");\n }\n}\n\nclass BaseSVGFactory {\n constructor() {\n if (this.constructor === BaseSVGFactory) {\n unreachable(\"Cannot initialize BaseSVGFactory.\");\n }\n }\n\n create(width, height) {\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 svg.setAttribute(\"width\", `${width}px`);\n svg.setAttribute(\"height\", `${height}px`);\n svg.setAttribute(\"preserveAspectRatio\", \"none\");\n svg.setAttribute(\"viewBox\", `0 0 ${width} ${height}`);\n\n return svg;\n }\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\n /**\n * @private\n */\n _createSVG(type) {\n unreachable(\"Abstract method `_createSVG` called.\");\n }\n}\n\nexport {\n BaseCanvasFactory,\n BaseCMapReaderFactory,\n BaseStandardFontDataFactory,\n BaseSVGFactory,\n};\n","/* Copyright 2012 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\n/**\n * @module pdfjsLib\n */\n\nimport {\n AbortException,\n assert,\n createPromiseCapability,\n getVerbosityLevel,\n info,\n InvalidPDFException,\n isArrayBuffer,\n isSameOrigin,\n MissingPDFException,\n PasswordException,\n setVerbosityLevel,\n shadow,\n stringToBytes,\n UnexpectedResponseException,\n UnknownErrorException,\n unreachable,\n warn,\n} from \"../shared/util.js\";\nimport {\n deprecated,\n DOMCanvasFactory,\n DOMCMapReaderFactory,\n DOMStandardFontDataFactory,\n isDataScheme,\n loadScript,\n PageViewport,\n RenderingCancelledException,\n StatTimer,\n} from \"./display_utils.js\";\nimport { FontFaceObject, FontLoader } from \"./font_loader.js\";\nimport {\n NodeCanvasFactory,\n NodeCMapReaderFactory,\n NodeStandardFontDataFactory,\n} from \"./node_utils.js\";\nimport { AnnotationStorage } from \"./annotation_storage.js\";\nimport { CanvasGraphics } from \"./canvas.js\";\nimport { GlobalWorkerOptions } from \"./worker_options.js\";\nimport { isNodeJS } from \"../shared/is_node.js\";\nimport { MessageHandler } from \"../shared/message_handler.js\";\nimport { Metadata } from \"./metadata.js\";\nimport { OptionalContentConfig } from \"./optional_content_config.js\";\nimport { PDFDataTransportStream } from \"./transport_stream.js\";\n\nconst DEFAULT_RANGE_CHUNK_SIZE = 65536; // 2^16 = 65536\nconst RENDERING_CANCELLED_TIMEOUT = 100; // ms\n\nconst DefaultCanvasFactory =\n (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) && isNodeJS\n ? NodeCanvasFactory\n : DOMCanvasFactory;\nconst DefaultCMapReaderFactory =\n (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) && isNodeJS\n ? NodeCMapReaderFactory\n : DOMCMapReaderFactory;\nconst DefaultStandardFontDataFactory =\n (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) && isNodeJS\n ? NodeStandardFontDataFactory\n : DOMStandardFontDataFactory;\n\n/**\n * @typedef {function} IPDFStreamFactory\n * @param {DocumentInitParameters} params - The document initialization\n * parameters. The \"url\" key is always present.\n * @returns {Promise} A promise, which is resolved with an instance of\n * {IPDFStream}.\n * @ignore\n */\n\n/**\n * @type IPDFStreamFactory\n * @private\n */\nlet createPDFNetworkStream;\n\n/**\n * Sets the function that instantiates an {IPDFStream} as an alternative PDF\n * data transport.\n *\n * @param {IPDFStreamFactory} pdfNetworkStreamFactory - The factory function\n * that takes document initialization parameters (including a \"url\") and\n * returns a promise which is resolved with an instance of {IPDFStream}.\n * @ignore\n */\nfunction setPDFNetworkStreamFactory(pdfNetworkStreamFactory) {\n createPDFNetworkStream = pdfNetworkStreamFactory;\n}\n\n/**\n * @typedef { Int8Array | Uint8Array | Uint8ClampedArray |\n * Int16Array | Uint16Array |\n * Int32Array | Uint32Array | Float32Array |\n * Float64Array\n * } TypedArray\n */\n\n/**\n * @typedef {Object} RefProxy\n * @property {number} num\n * @property {number} gen\n */\n\n/**\n * Document initialization / loading parameters object.\n *\n * @typedef {Object} DocumentInitParameters\n * @property {string|URL} [url] - The URL of the PDF.\n * @property {TypedArray|Array|string} [data] - Binary PDF data. Use\n * typed arrays (Uint8Array) to improve the memory usage. If PDF data is\n * BASE64-encoded, use `atob()` to convert it to a binary string first.\n * @property {Object} [httpHeaders] - Basic authentication headers.\n * @property {boolean} [withCredentials] - Indicates whether or not\n * cross-site Access-Control requests should be made using credentials such\n * as cookies or authorization headers. The default is `false`.\n * @property {string} [password] - For decrypting password-protected PDFs.\n * @property {TypedArray} [initialData] - A typed array with the first portion\n * or all of the pdf data. Used by the extension since some data is already\n * loaded before the switch to range requests.\n * @property {number} [length] - The PDF file length. It's used for progress\n * reports and range requests operations.\n * @property {PDFDataRangeTransport} [range] - Allows for using a custom range\n * transport implementation.\n * @property {number} [rangeChunkSize] - Specify maximum number of bytes fetched\n * per range request. The default value is {@link DEFAULT_RANGE_CHUNK_SIZE}.\n * @property {PDFWorker} [worker] - The worker that will be used for loading and\n * parsing the PDF data.\n * @property {number} [verbosity] - Controls the logging level; the constants\n * from {@link VerbosityLevel} should be used.\n * @property {string} [docBaseUrl] - The base URL of the document, used when\n * attempting to recover valid absolute URLs for annotations, and outline\n * items, that (incorrectly) only specify relative URLs.\n * @property {string} [cMapUrl] - The URL where the predefined Adobe CMaps are\n * located. Include the trailing slash.\n * @property {boolean} [cMapPacked] - Specifies if the Adobe CMaps are binary\n * packed or not.\n * @property {Object} [CMapReaderFactory] - The factory that will be used when\n * reading built-in CMap files. Providing a custom factory is useful for\n * environments without Fetch API or `XMLHttpRequest` support, such as\n * Node.js. The default value is {DOMCMapReaderFactory}.\n * @property {boolean} [useSystemFonts] - When `true`, fonts that aren't\n * embedded in the PDF document will fallback to a system font.\n * The default value is `true` in web environments and `false` in Node.js;\n * unless `disableFontFace === true` in which case this defaults to `false`\n * regardless of the environment (to prevent completely broken fonts).\n * @property {string} [standardFontDataUrl] - The URL where the standard font\n * files are located. Include the trailing slash.\n * @property {Object} [StandardFontDataFactory] - The factory that will be used\n * when reading the standard font files. Providing a custom factory is useful\n * for environments without Fetch API or `XMLHttpRequest` support, such as\n * Node.js. The default value is {DOMStandardFontDataFactory}.\n * @property {boolean} [useWorkerFetch] - Enable using the Fetch API in the\n * worker-thread when reading CMap and standard font files. When `true`,\n * the `CMapReaderFactory` and `StandardFontDataFactory` options are ignored.\n * The default value is `true` in web environments and `false` in Node.js.\n * @property {boolean} [stopAtErrors] - Reject certain promises, e.g.\n * `getOperatorList`, `getTextContent`, and `RenderTask`, when the associated\n * PDF data cannot be successfully parsed, instead of attempting to recover\n * whatever possible of the data. The default value is `false`.\n * @property {number} [maxImageSize] - The maximum allowed image size in total\n * pixels, i.e. width * height. Images above this value will not be rendered.\n * Use -1 for no limit, which is also the default value.\n * @property {boolean} [isEvalSupported] - Determines if we can evaluate strings\n * as JavaScript. Primarily used to improve performance of font rendering, and\n * when parsing PDF functions. The default value is `true`.\n * @property {boolean} [disableFontFace] - By default fonts are converted to\n * OpenType fonts and loaded via the Font Loading API or `@font-face` rules.\n * If disabled, fonts will be rendered using a built-in font renderer that\n * constructs the glyphs with primitive path commands.\n * The default value is `false` in web environments and `true` in Node.js.\n * @property {boolean} [fontExtraProperties] - Include additional properties,\n * which are unused during rendering of PDF documents, when exporting the\n * parsed font data from the worker-thread. This may be useful for debugging\n * purposes (and backwards compatibility), but note that it will lead to\n * increased memory usage. The default value is `false`.\n * @property {boolean} [enableXfa] - Render Xfa forms if any.\n * The default value is `false`.\n * @property {HTMLDocument} [ownerDocument] - Specify an explicit document\n * context to create elements with and to load resources, such as fonts,\n * into. Defaults to the current document.\n * @property {boolean} [disableRange] - Disable range request loading of PDF\n * files. When enabled, and if the server supports partial content requests,\n * then the PDF will be fetched in chunks. The default value is `false`.\n * @property {boolean} [disableStream] - Disable streaming of PDF file data.\n * By default PDF.js attempts to load PDF files in chunks. The default value\n * is `false`.\n * @property {boolean} [disableAutoFetch] - Disable pre-fetching of PDF file\n * data. When range requests are enabled PDF.js will automatically keep\n * fetching more data even if it isn't needed to display the current page.\n * The default value is `false`.\n *\n * NOTE: It is also necessary to disable streaming, see above, in order for\n * disabling of pre-fetching to work correctly.\n * @property {boolean} [pdfBug] - Enables special hooks for debugging PDF.js\n * (see `web/debugger.js`). The default value is `false`.\n */\n\n/**\n * This is the main entry point for loading a PDF and interacting with it.\n *\n * NOTE: If a URL is used to fetch the PDF data a standard Fetch API call (or\n * XHR as fallback) is used, which means it must follow same origin rules,\n * e.g. no cross-domain requests without CORS.\n *\n * @param {string|URL|TypedArray|PDFDataRangeTransport|DocumentInitParameters}\n * src - Can be a URL where a PDF file is located, a typed array (Uint8Array)\n * already populated with data, or a parameter object.\n * @returns {PDFDocumentLoadingTask}\n */\nfunction getDocument(src) {\n const task = new PDFDocumentLoadingTask();\n\n let source;\n if (typeof src === \"string\" || src instanceof URL) {\n source = { url: src };\n } else if (isArrayBuffer(src)) {\n source = { data: src };\n } else if (src instanceof PDFDataRangeTransport) {\n source = { range: src };\n } else {\n if (typeof src !== \"object\") {\n throw new Error(\n \"Invalid parameter in getDocument, \" +\n \"need either string, URL, Uint8Array, or parameter object.\"\n );\n }\n if (!src.url && !src.data && !src.range) {\n throw new Error(\n \"Invalid parameter object: need either .data, .range or .url\"\n );\n }\n source = src;\n }\n const params = Object.create(null);\n let rangeTransport = null,\n worker = null;\n\n for (const key in source) {\n const value = source[key];\n\n switch (key) {\n case \"url\":\n if (typeof window !== \"undefined\") {\n try {\n // The full path is required in the 'url' field.\n params[key] = new URL(value, window.location).href;\n continue;\n } catch (ex) {\n warn(`Cannot create valid URL: \"${ex}\".`);\n }\n } else if (typeof value === \"string\" || value instanceof URL) {\n params[key] = value.toString(); // Support Node.js environments.\n continue;\n }\n throw new Error(\n \"Invalid PDF url data: \" +\n \"either string or URL-object is expected in the url property.\"\n );\n case \"range\":\n rangeTransport = value;\n continue;\n case \"worker\":\n worker = value;\n continue;\n case \"data\":\n // Converting string or array-like data to Uint8Array.\n if (\n typeof PDFJSDev !== \"undefined\" &&\n PDFJSDev.test(\"GENERIC\") &&\n isNodeJS &&\n typeof Buffer !== \"undefined\" && // eslint-disable-line no-undef\n value instanceof Buffer // eslint-disable-line no-undef\n ) {\n params[key] = new Uint8Array(value);\n } else if (value instanceof Uint8Array) {\n break; // Use the data as-is when it's already a Uint8Array.\n } else if (typeof value === \"string\") {\n params[key] = stringToBytes(value);\n } else if (\n typeof value === \"object\" &&\n value !== null &&\n !isNaN(value.length)\n ) {\n params[key] = new Uint8Array(value);\n } else if (isArrayBuffer(value)) {\n params[key] = new Uint8Array(value);\n } else {\n throw new Error(\n \"Invalid PDF binary data: either typed array, \" +\n \"string, or array-like object is expected in the data property.\"\n );\n }\n continue;\n }\n params[key] = value;\n }\n\n params.rangeChunkSize = params.rangeChunkSize || DEFAULT_RANGE_CHUNK_SIZE;\n params.CMapReaderFactory =\n params.CMapReaderFactory || DefaultCMapReaderFactory;\n params.StandardFontDataFactory =\n params.StandardFontDataFactory || DefaultStandardFontDataFactory;\n params.ignoreErrors = params.stopAtErrors !== true;\n params.fontExtraProperties = params.fontExtraProperties === true;\n params.pdfBug = params.pdfBug === true;\n params.enableXfa = params.enableXfa === true;\n\n if (\n typeof params.docBaseUrl !== \"string\" ||\n isDataScheme(params.docBaseUrl)\n ) {\n // Ignore \"data:\"-URLs, since they can't be used to recover valid absolute\n // URLs anyway. We want to avoid sending them to the worker-thread, since\n // they contain the *entire* PDF document and can thus be arbitrarily long.\n params.docBaseUrl = null;\n }\n if (!Number.isInteger(params.maxImageSize)) {\n params.maxImageSize = -1;\n }\n if (typeof params.useWorkerFetch !== \"boolean\") {\n params.useWorkerFetch =\n params.CMapReaderFactory === DOMCMapReaderFactory &&\n params.StandardFontDataFactory === DOMStandardFontDataFactory;\n }\n if (typeof params.isEvalSupported !== \"boolean\") {\n params.isEvalSupported = true;\n }\n if (typeof params.disableFontFace !== \"boolean\") {\n params.disableFontFace =\n (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) && isNodeJS;\n }\n if (typeof params.useSystemFonts !== \"boolean\") {\n params.useSystemFonts =\n !(\n (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) &&\n isNodeJS\n ) && !params.disableFontFace;\n }\n if (typeof params.ownerDocument === \"undefined\") {\n params.ownerDocument = globalThis.document;\n }\n\n if (typeof params.disableRange !== \"boolean\") {\n params.disableRange = false;\n }\n if (typeof params.disableStream !== \"boolean\") {\n params.disableStream = false;\n }\n if (typeof params.disableAutoFetch !== \"boolean\") {\n params.disableAutoFetch = false;\n }\n\n // Set the main-thread verbosity level.\n setVerbosityLevel(params.verbosity);\n\n if (!worker) {\n const workerParams = {\n verbosity: params.verbosity,\n port: GlobalWorkerOptions.workerPort,\n };\n // Worker was not provided -- creating and owning our own. If message port\n // is specified in global worker options, using it.\n worker = workerParams.port\n ? PDFWorker.fromPort(workerParams)\n : new PDFWorker(workerParams);\n task._worker = worker;\n }\n const docId = task.docId;\n worker.promise\n .then(function () {\n if (task.destroyed) {\n throw new Error(\"Loading aborted\");\n }\n\n const workerIdPromise = _fetchDocument(\n worker,\n params,\n rangeTransport,\n docId\n );\n const networkStreamPromise = new Promise(function (resolve) {\n let networkStream;\n if (rangeTransport) {\n networkStream = new PDFDataTransportStream(\n {\n length: params.length,\n initialData: params.initialData,\n progressiveDone: params.progressiveDone,\n contentDispositionFilename: params.contentDispositionFilename,\n disableRange: params.disableRange,\n disableStream: params.disableStream,\n },\n rangeTransport\n );\n } else if (!params.data) {\n networkStream = createPDFNetworkStream({\n url: params.url,\n length: params.length,\n httpHeaders: params.httpHeaders,\n withCredentials: params.withCredentials,\n rangeChunkSize: params.rangeChunkSize,\n disableRange: params.disableRange,\n disableStream: params.disableStream,\n });\n }\n resolve(networkStream);\n });\n\n return Promise.all([workerIdPromise, networkStreamPromise]).then(\n function ([workerId, networkStream]) {\n if (task.destroyed) {\n throw new Error(\"Loading aborted\");\n }\n\n const messageHandler = new MessageHandler(\n docId,\n workerId,\n worker.port\n );\n messageHandler.postMessageTransfers = worker.postMessageTransfers;\n const transport = new WorkerTransport(\n messageHandler,\n task,\n networkStream,\n params\n );\n task._transport = transport;\n messageHandler.send(\"Ready\", null);\n }\n );\n })\n .catch(task._capability.reject);\n\n return task;\n}\n\n/**\n * Starts fetching of specified PDF document/data.\n *\n * @param {PDFWorker} worker\n * @param {Object} source\n * @param {PDFDataRangeTransport} pdfDataRangeTransport\n * @param {string} docId - Unique document ID, used in `MessageHandler`.\n * @returns {Promise} A promise that is resolved when the worker ID of the\n * `MessageHandler` is known.\n * @private\n */\nfunction _fetchDocument(worker, source, pdfDataRangeTransport, docId) {\n if (worker.destroyed) {\n return Promise.reject(new Error(\"Worker was destroyed\"));\n }\n\n if (pdfDataRangeTransport) {\n source.length = pdfDataRangeTransport.length;\n source.initialData = pdfDataRangeTransport.initialData;\n source.progressiveDone = pdfDataRangeTransport.progressiveDone;\n source.contentDispositionFilename =\n pdfDataRangeTransport.contentDispositionFilename;\n }\n return worker.messageHandler\n .sendWithPromise(\"GetDocRequest\", {\n docId,\n apiVersion:\n typeof PDFJSDev !== \"undefined\" && !PDFJSDev.test(\"TESTING\")\n ? PDFJSDev.eval(\"BUNDLE_VERSION\")\n : null,\n // Only send the required properties, and *not* the entire object.\n source: {\n data: source.data,\n url: source.url,\n password: source.password,\n disableAutoFetch: source.disableAutoFetch,\n rangeChunkSize: source.rangeChunkSize,\n length: source.length,\n },\n maxImageSize: source.maxImageSize,\n disableFontFace: source.disableFontFace,\n postMessageTransfers: worker.postMessageTransfers,\n docBaseUrl: source.docBaseUrl,\n ignoreErrors: source.ignoreErrors,\n isEvalSupported: source.isEvalSupported,\n fontExtraProperties: source.fontExtraProperties,\n enableXfa: source.enableXfa,\n useSystemFonts: source.useSystemFonts,\n cMapUrl: source.useWorkerFetch ? source.cMapUrl : null,\n standardFontDataUrl: source.useWorkerFetch\n ? source.standardFontDataUrl\n : null,\n })\n .then(function (workerId) {\n if (worker.destroyed) {\n throw new Error(\"Worker was destroyed\");\n }\n return workerId;\n });\n}\n\n/**\n * @typedef {Object} OnProgressParameters\n * @property {number} loaded - Currently loaded number of bytes.\n * @property {number} total - Total number of bytes in the PDF file.\n */\n\n/**\n * The loading task controls the operations required to load a PDF document\n * (such as network requests) and provides a way to listen for completion,\n * after which individual pages can be rendered.\n *\n * @typedef {Object} PDFDocumentLoadingTask\n * @property {string} docId - Unique identifier for the document loading task.\n * @property {boolean} destroyed - Whether the loading task is destroyed or not.\n * @property {function} [onPassword] - Callback to request a password if a wrong\n * or no password was provided. The callback receives two parameters: a\n * function that should be called with the new password, and a reason (see\n * {@link PasswordResponses}).\n * @property {function} [onProgress] - Callback to be able to monitor the\n * loading progress of the PDF file (necessary to implement e.g. a loading\n * bar). The callback receives an {@link OnProgressParameters} argument.\n * @property {function} [onUnsupportedFeature] - Callback for when an\n * unsupported feature is used in the PDF document. The callback receives an\n * {@link UNSUPPORTED_FEATURES} argument.\n * @property {Promise} promise - Promise for document loading\n * task completion.\n * @property {function} destroy - Abort all network requests and destroy\n * the worker. Returns a promise that is resolved when destruction is\n * completed.\n */\n\n/**\n * @type {any}\n * @ignore\n */\nconst PDFDocumentLoadingTask = (function PDFDocumentLoadingTaskClosure() {\n let nextDocumentId = 0;\n\n /**\n * The loading task controls the operations required to load a PDF document\n * (such as network requests) and provides a way to listen for completion,\n * after which individual pages can be rendered.\n */\n // eslint-disable-next-line no-shadow\n class PDFDocumentLoadingTask {\n constructor() {\n this._capability = createPromiseCapability();\n this._transport = null;\n this._worker = null;\n\n /**\n * Unique identifier for the document loading task.\n * @type {string}\n */\n this.docId = \"d\" + nextDocumentId++;\n\n /**\n * Whether the loading task is destroyed or not.\n * @type {boolean}\n */\n this.destroyed = false;\n\n /**\n * Callback to request a password if a wrong or no password was provided.\n * The callback receives two parameters: a function that should be called\n * with the new password, and a reason (see {@link PasswordResponses}).\n * @type {function}\n */\n this.onPassword = null;\n\n /**\n * Callback to be able to monitor the loading progress of the PDF file\n * (necessary to implement e.g. a loading bar).\n * The callback receives an {@link OnProgressParameters} argument.\n * @type {function}\n */\n this.onProgress = null;\n\n /**\n * Callback for when an unsupported feature is used in the PDF document.\n * The callback receives an {@link UNSUPPORTED_FEATURES} argument.\n * @type {function}\n */\n this.onUnsupportedFeature = null;\n }\n\n /**\n * Promise for document loading task completion.\n * @type {Promise}\n */\n get promise() {\n return this._capability.promise;\n }\n\n /**\n * @returns {Promise} A promise that is resolved when destruction is\n * completed.\n */\n destroy() {\n this.destroyed = true;\n\n const transportDestroyed = !this._transport\n ? Promise.resolve()\n : this._transport.destroy();\n return transportDestroyed.then(() => {\n this._transport = null;\n if (this._worker) {\n this._worker.destroy();\n this._worker = null;\n }\n });\n }\n }\n return PDFDocumentLoadingTask;\n})();\n\n/**\n * Abstract class to support range requests file loading.\n */\nclass PDFDataRangeTransport {\n /**\n * @param {number} length\n * @param {Uint8Array} initialData\n * @param {boolean} [progressiveDone]\n * @param {string} [contentDispositionFilename]\n */\n constructor(\n length,\n initialData,\n progressiveDone = false,\n contentDispositionFilename = null\n ) {\n this.length = length;\n this.initialData = initialData;\n this.progressiveDone = progressiveDone;\n this.contentDispositionFilename = contentDispositionFilename;\n\n this._rangeListeners = [];\n this._progressListeners = [];\n this._progressiveReadListeners = [];\n this._progressiveDoneListeners = [];\n this._readyCapability = createPromiseCapability();\n }\n\n addRangeListener(listener) {\n this._rangeListeners.push(listener);\n }\n\n addProgressListener(listener) {\n this._progressListeners.push(listener);\n }\n\n addProgressiveReadListener(listener) {\n this._progressiveReadListeners.push(listener);\n }\n\n addProgressiveDoneListener(listener) {\n this._progressiveDoneListeners.push(listener);\n }\n\n onDataRange(begin, chunk) {\n for (const listener of this._rangeListeners) {\n listener(begin, chunk);\n }\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\n onDataProgressiveRead(chunk) {\n this._readyCapability.promise.then(() => {\n for (const listener of this._progressiveReadListeners) {\n listener(chunk);\n }\n });\n }\n\n onDataProgressiveDone() {\n this._readyCapability.promise.then(() => {\n for (const listener of this._progressiveDoneListeners) {\n listener();\n }\n });\n }\n\n transportReady() {\n this._readyCapability.resolve();\n }\n\n requestDataRange(begin, end) {\n unreachable(\"Abstract method PDFDataRangeTransport.requestDataRange\");\n }\n\n abort() {}\n}\n\n/**\n * Proxy to a `PDFDocument` in the worker thread.\n */\nclass PDFDocumentProxy {\n constructor(pdfInfo, transport) {\n this._pdfInfo = pdfInfo;\n this._transport = transport;\n\n if (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) {\n Object.defineProperty(this, \"fingerprint\", {\n get() {\n deprecated(\n \"`PDFDocumentProxy.fingerprint`, \" +\n \"please use `PDFDocumentProxy.fingerprints` instead.\"\n );\n return this.fingerprints[0];\n },\n });\n }\n }\n\n /**\n * @type {AnnotationStorage} Storage for annotation data in forms.\n */\n get annotationStorage() {\n return this._transport.annotationStorage;\n }\n\n /**\n * @type {number} Total number of pages in the PDF file.\n */\n get numPages() {\n return this._pdfInfo.numPages;\n }\n\n /**\n * @type {Array} A (not guaranteed to be) unique ID to\n * identify the PDF document.\n * NOTE: The first element will always be defined for all PDF documents,\n * whereas the second element is only defined for *modified* PDF documents.\n */\n get fingerprints() {\n return this._pdfInfo.fingerprints;\n }\n\n /**\n * @type {boolean} True if only XFA form.\n */\n get isPureXfa() {\n return !!this._transport._htmlForXfa;\n }\n\n /**\n * NOTE: This is (mostly) intended to support printing of XFA forms.\n *\n * @type {Object | null} An object representing a HTML tree structure\n * to render the XFA, or `null` when no XFA form exists.\n */\n get allXfaHtml() {\n return this._transport._htmlForXfa;\n }\n\n /**\n * @param {number} pageNumber - The page number to get. The first page is 1.\n * @returns {Promise} A promise that is resolved with\n * a {@link PDFPageProxy} object.\n */\n getPage(pageNumber) {\n return this._transport.getPage(pageNumber);\n }\n\n /**\n * @param {RefProxy} ref - The page reference.\n * @returns {Promise} A promise that is resolved with the page index,\n * starting from zero, that is associated with the reference.\n */\n getPageIndex(ref) {\n return this._transport.getPageIndex(ref);\n }\n\n /**\n * @returns {Promise>>} A promise that is resolved\n * with a mapping from named destinations to references.\n *\n * This can be slow for large documents. Use `getDestination` instead.\n */\n getDestinations() {\n return this._transport.getDestinations();\n }\n\n /**\n * @param {string} id - The named destination to get.\n * @returns {Promise | null>} A promise that is resolved with all\n * information of the given named destination, or `null` when the named\n * destination is not present in the PDF file.\n */\n getDestination(id) {\n return this._transport.getDestination(id);\n }\n\n /**\n * @returns {Promise | null>} A promise that is resolved with\n * an {Array} containing the page labels that correspond to the page\n * indexes, or `null` when no page labels are present in the PDF file.\n */\n getPageLabels() {\n return this._transport.getPageLabels();\n }\n\n /**\n * @returns {Promise} A promise that is resolved with a {string}\n * containing the page layout name.\n */\n getPageLayout() {\n return this._transport.getPageLayout();\n }\n\n /**\n * @returns {Promise} A promise that is resolved with a {string}\n * containing the page mode name.\n */\n getPageMode() {\n return this._transport.getPageMode();\n }\n\n /**\n * @returns {Promise} A promise that is resolved with an\n * {Object} containing the viewer preferences, or `null` when no viewer\n * preferences are present in the PDF file.\n */\n getViewerPreferences() {\n return this._transport.getViewerPreferences();\n }\n\n /**\n * @returns {Promise} A promise that is resolved with an {Array}\n * containing the destination, or `null` when no open action is present\n * in the PDF.\n */\n getOpenAction() {\n return this._transport.getOpenAction();\n }\n\n /**\n * @returns {Promise} A promise that is resolved with a lookup table\n * for mapping named attachments to their content.\n */\n getAttachments() {\n return this._transport.getAttachments();\n }\n\n /**\n * @returns {Promise | null>} A promise that is resolved with\n * an {Array} of all the JavaScript strings in the name tree, or `null`\n * if no JavaScript exists.\n */\n getJavaScript() {\n return this._transport.getJavaScript();\n }\n\n /**\n * @returns {Promise} A promise that is resolved with\n * an {Object} with the JavaScript actions:\n * - from the name tree (like getJavaScript);\n * - from A or AA entries in the catalog dictionary.\n * , or `null` if no JavaScript exists.\n */\n getJSActions() {\n return this._transport.getDocJSActions();\n }\n\n /**\n * @typedef {Object} OutlineNode\n * @property {string} title\n * @property {boolean} bold\n * @property {boolean} italic\n * @property {Uint8ClampedArray} color - The color in RGB format to use for\n * display purposes.\n * @property {string | Array | null} dest\n * @property {string | null} url\n * @property {string | undefined} unsafeUrl\n * @property {boolean | undefined} newWindow\n * @property {number | undefined} count\n * @property {Array} items\n */\n\n /**\n * @returns {Promise>} A promise that is resolved with an\n * {Array} that is a tree outline (if it has one) of the PDF file.\n */\n getOutline() {\n return this._transport.getOutline();\n }\n\n /**\n * @returns {Promise} A promise that is resolved with\n * an {@link OptionalContentConfig} that contains all the optional content\n * groups (assuming that the document has any).\n */\n getOptionalContentConfig() {\n return this._transport.getOptionalContentConfig();\n }\n\n /**\n * @returns {Promise | null>} A promise that is resolved with\n * an {Array} that contains the permission flags for the PDF document, or\n * `null` when no permissions are present in the PDF file.\n */\n getPermissions() {\n return this._transport.getPermissions();\n }\n\n /**\n * @returns {Promise<{ info: Object, metadata: Metadata }>} A promise that is\n * resolved with an {Object} that has `info` and `metadata` properties.\n * `info` is an {Object} filled with anything available in the information\n * dictionary and similarly `metadata` is a {Metadata} object with\n * information from the metadata section of the PDF.\n */\n getMetadata() {\n return this._transport.getMetadata();\n }\n\n /**\n * @typedef {Object} MarkInfo\n * Properties correspond to Table 321 of the PDF 32000-1:2008 spec.\n * @property {boolean} Marked\n * @property {boolean} UserProperties\n * @property {boolean} Suspects\n */\n\n /**\n * @returns {Promise} A promise that is resolved with\n * a {MarkInfo} object that contains the MarkInfo flags for the PDF\n * document, or `null` when no MarkInfo values are present in the PDF file.\n */\n getMarkInfo() {\n return this._transport.getMarkInfo();\n }\n\n /**\n * @returns {Promise} A promise that is resolved with a\n * {TypedArray} that has the raw data from the PDF.\n */\n getData() {\n return this._transport.getData();\n }\n\n /**\n * @returns {Promise<{ length: number }>} A promise that is resolved when the\n * document's data is loaded. It is resolved with an {Object} that contains\n * the `length` property that indicates size of the PDF data in bytes.\n */\n getDownloadInfo() {\n return this._transport.downloadInfoCapability.promise;\n }\n\n /**\n * @typedef {Object} PDFDocumentStats\n * @property {Object} streamTypes - Used stream types in the\n * document (an item is set to true if specific stream ID was used in the\n * document).\n * @property {Object} fontTypes - Used font types in the\n * document (an item is set to true if specific font ID was used in the\n * document).\n */\n\n /**\n * @returns {Promise} A promise this is resolved with\n * current statistics about document structures (see\n * {@link PDFDocumentStats}).\n */\n getStats() {\n return this._transport.getStats();\n }\n\n /**\n * Cleans up resources allocated by the document on both the main and worker\n * threads.\n *\n * NOTE: Do not, under any circumstances, call this method when rendering is\n * currently ongoing since that may lead to rendering errors.\n *\n * @param {boolean} [keepLoadedFonts] - Let fonts remain attached to the DOM.\n * NOTE: This will increase persistent memory usage, hence don't use this\n * option unless absolutely necessary. The default value is `false`.\n * @returns {Promise} A promise that is resolved when clean-up has finished.\n */\n cleanup(keepLoadedFonts = false) {\n return this._transport.startCleanup(keepLoadedFonts || this.isPureXfa);\n }\n\n /**\n * Destroys the current document instance and terminates the worker.\n */\n destroy() {\n return this.loadingTask.destroy();\n }\n\n /**\n * @type {DocumentInitParameters} A subset of the current\n * {DocumentInitParameters}, which are needed in the viewer.\n */\n get loadingParams() {\n return this._transport.loadingParams;\n }\n\n /**\n * @type {PDFDocumentLoadingTask} The loadingTask for the current document.\n */\n get loadingTask() {\n return this._transport.loadingTask;\n }\n\n /**\n * @returns {Promise} A promise that is resolved with a\n * {Uint8Array} containing the full data of the saved document.\n */\n saveDocument() {\n if (\n (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) &&\n this._transport.annotationStorage.size <= 0\n ) {\n deprecated(\n \"saveDocument called while `annotationStorage` is empty, \" +\n \"please use the getData-method instead.\"\n );\n }\n return this._transport.saveDocument();\n }\n\n /**\n * @returns {Promise | null>} A promise that is resolved with an\n * {Array} containing /AcroForm field data for the JS sandbox,\n * or `null` when no field data is present in the PDF file.\n */\n getFieldObjects() {\n return this._transport.getFieldObjects();\n }\n\n /**\n * @returns {Promise} A promise that is resolved with `true`\n * if some /AcroForm fields have JavaScript actions.\n */\n hasJSActions() {\n return this._transport.hasJSActions();\n }\n\n /**\n * @returns {Promise | null>} A promise that is resolved with an\n * {Array} containing IDs of annotations that have a calculation\n * action, or `null` when no such annotations are present in the PDF file.\n */\n getCalculationOrderIds() {\n return this._transport.getCalculationOrderIds();\n }\n}\n\n/**\n * Page getViewport parameters.\n *\n * @typedef {Object} GetViewportParameters\n * @property {number} scale - The desired scale of the viewport.\n * @property {number} [rotation] - The desired rotation, in degrees, of\n * the viewport. If omitted it defaults to the page rotation.\n * @property {number} [offsetX] - The horizontal, i.e. x-axis, offset.\n * The default value is `0`.\n * @property {number} [offsetY] - The vertical, i.e. y-axis, offset.\n * The default value is `0`.\n * @property {boolean} [dontFlip] - If true, the y-axis will not be\n * flipped. The default value is `false`.\n */\n\n/**\n * Page getTextContent parameters.\n *\n * @typedef {Object} getTextContentParameters\n * @property {boolean} normalizeWhitespace - Replaces all occurrences of\n * whitespace with standard spaces (0x20). The default value is `false`.\n * @property {boolean} disableCombineTextItems - Do not attempt to combine\n * same line {@link TextItem}'s. The default value is `false`.\n * @property {boolean} [includeMarkedContent] - When true include marked\n * content items in the items array of TextContent. The default is `false`.\n */\n\n/**\n * Page text content.\n *\n * @typedef {Object} TextContent\n * @property {Array} items - Array of\n * {@link TextItem} and {@link TextMarkedContent} objects. TextMarkedContent\n * items are included when includeMarkedContent is true.\n * @property {Object} styles - {@link TextStyle} objects,\n * indexed by font name.\n */\n\n/**\n * Page text content part.\n *\n * @typedef {Object} TextItem\n * @property {string} str - Text content.\n * @property {string} dir - Text direction: 'ttb', 'ltr' or 'rtl'.\n * @property {Array} transform - Transformation matrix.\n * @property {number} width - Width in device space.\n * @property {number} height - Height in device space.\n * @property {string} fontName - Font name used by PDF.js for converted font.\n * @property {boolean} hasEOL - Indicating if the text content is followed by a\n * line-break.\n */\n\n/**\n * Page text marked content part.\n *\n * @typedef {Object} TextMarkedContent\n * @property {string} type - Either 'beginMarkedContent',\n * 'beginMarkedContentProps', or 'endMarkedContent'.\n * @property {string} id - The marked content identifier. Only used for type\n * 'beginMarkedContentProps'.\n */\n\n/**\n * Text style.\n *\n * @typedef {Object} TextStyle\n * @property {number} ascent - Font ascent.\n * @property {number} descent - Font descent.\n * @property {boolean} vertical - Whether or not the text is in vertical mode.\n * @property {string} fontFamily - The possible font family.\n */\n\n/**\n * Page annotation parameters.\n *\n * @typedef {Object} GetAnnotationsParameters\n * @property {string} [intent] - Determines the annotations that are fetched,\n * can be either 'display' (viewable annotations) or 'print' (printable\n * annotations). If the parameter is omitted, all annotations are fetched.\n */\n\n/**\n * Page render parameters.\n *\n * @typedef {Object} RenderParameters\n * @property {Object} canvasContext - A 2D context of a DOM Canvas object.\n * @property {PageViewport} viewport - Rendering viewport obtained by calling\n * the `PDFPageProxy.getViewport` method.\n * @property {string} [intent] - Rendering intent, can be 'display' or 'print'.\n * The default value is 'display'.\n * @property {boolean} [renderInteractiveForms] - Whether or not interactive\n * form elements are rendered in the display layer. If so, we do not render\n * them on the canvas as well. The default value is `false`.\n * @property {Array} [transform] - Additional transform, applied just\n * before viewport transform.\n * @property {Object} [imageLayer] - An object that has `beginLayout`,\n * `endLayout` and `appendImage` functions.\n * @property {Object} [canvasFactory] - The factory instance that will be used\n * when creating canvases. The default value is {new DOMCanvasFactory()}.\n * @property {Object | string} [background] - Background to use for the canvas.\n * Any valid `canvas.fillStyle` can be used: a `DOMString` parsed as CSS\n * value, a `CanvasGradient` object (a linear or radial gradient) or\n * a `CanvasPattern` object (a repetitive image). The default value is\n * 'rgb(255,255,255)'.\n * @property {boolean} [includeAnnotationStorage] - Render stored interactive\n * form element data, from the {@link AnnotationStorage}-instance, onto the\n * canvas itself; useful e.g. for printing. The default value is `false`.\n * @property {Promise} [optionalContentConfigPromise] -\n * A promise that should resolve with an {@link OptionalContentConfig}\n * created from `PDFDocumentProxy.getOptionalContentConfig`. If `null`,\n * the configuration will be fetched automatically with the default visibility\n * states set.\n */\n\n/**\n * Page getOperatorList parameters.\n *\n * @typedef {Object} GetOperatorListParameters\n * @property {string} [intent] - Rendering intent, can be 'display' or 'print'.\n * The default value is 'display'.\n */\n\n/**\n * Structure tree node. The root node will have a role \"Root\".\n *\n * @typedef {Object} StructTreeNode\n * @property {Array} children - Array of\n * {@link StructTreeNode} and {@link StructTreeContent} objects.\n * @property {string} role - element's role, already mapped if a role map exists\n * in the PDF.\n */\n\n/**\n * Structure tree content.\n *\n * @typedef {Object} StructTreeContent\n * @property {string} type - either \"content\" for page and stream structure\n * elements or \"object\" for object references.\n * @property {string} id - unique id that will map to the text layer.\n */\n\n/**\n * PDF page operator list.\n *\n * @typedef {Object} PDFOperatorList\n * @property {Array} fnArray - Array containing the operator functions.\n * @property {Array} argsArray - Array containing the arguments of the\n * functions.\n */\n\n/**\n * Proxy to a `PDFPage` in the worker thread.\n */\nclass PDFPageProxy {\n constructor(pageIndex, pageInfo, transport, ownerDocument, pdfBug = false) {\n this._pageIndex = pageIndex;\n this._pageInfo = pageInfo;\n this._ownerDocument = ownerDocument;\n this._transport = transport;\n this._stats = pdfBug ? new StatTimer() : null;\n this._pdfBug = pdfBug;\n this.commonObjs = transport.commonObjs;\n this.objs = new PDFObjects();\n\n this.cleanupAfterRender = false;\n this.pendingCleanup = false;\n this._intentStates = new Map();\n this.destroyed = false;\n }\n\n /**\n * @type {number} Page number of the page. First page is 1.\n */\n get pageNumber() {\n return this._pageIndex + 1;\n }\n\n /**\n * @type {number} The number of degrees the page is rotated clockwise.\n */\n get rotate() {\n return this._pageInfo.rotate;\n }\n\n /**\n * @type {RefProxy | null} The reference that points to this page.\n */\n get ref() {\n return this._pageInfo.ref;\n }\n\n /**\n * @type {number} The default size of units in 1/72nds of an inch.\n */\n get userUnit() {\n return this._pageInfo.userUnit;\n }\n\n /**\n * @type {Array} An array of the visible portion of the PDF page in\n * user space units [x1, y1, x2, y2].\n */\n get view() {\n return this._pageInfo.view;\n }\n\n /**\n * @param {GetViewportParameters} params - Viewport parameters.\n * @returns {PageViewport} Contains 'width' and 'height' properties\n * along with transforms required for rendering.\n */\n getViewport({\n scale,\n rotation = this.rotate,\n offsetX = 0,\n offsetY = 0,\n dontFlip = false,\n } = {}) {\n return new PageViewport({\n viewBox: this.view,\n scale,\n rotation,\n offsetX,\n offsetY,\n dontFlip,\n });\n }\n\n /**\n * @param {GetAnnotationsParameters} params - Annotation parameters.\n * @returns {Promise>} A promise that is resolved with an\n * {Array} of the annotation objects.\n */\n getAnnotations({ intent = null } = {}) {\n const renderingIntent =\n intent === \"display\" || intent === \"print\" ? intent : null;\n\n if (\n !this._annotationsPromise ||\n this._annotationsIntent !== renderingIntent\n ) {\n this._annotationsPromise = this._transport.getAnnotations(\n this._pageIndex,\n renderingIntent\n );\n this._annotationsIntent = renderingIntent;\n }\n return this._annotationsPromise;\n }\n\n /**\n * @returns {Promise} A promise that is resolved with an\n * {Object} with JS actions.\n */\n getJSActions() {\n return (this._jsActionsPromise ||= this._transport.getPageJSActions(\n this._pageIndex\n ));\n }\n\n /**\n * @returns {Promise} A promise that is resolved with\n * an {Object} with a fake DOM object (a tree structure where elements\n * are {Object} with a name, attributes (class, style, ...), value and\n * children, very similar to a HTML DOM tree), or `null` if no XFA exists.\n */\n async getXfa() {\n return this._transport._htmlForXfa?.children[this._pageIndex] || null;\n }\n\n /**\n * Begins the process of rendering a page to the desired context.\n *\n * @param {RenderParameters} params - Page render parameters.\n * @returns {RenderTask} An object that contains a promise that is\n * resolved when the page finishes rendering.\n */\n render({\n canvasContext,\n viewport,\n intent = \"display\",\n renderInteractiveForms = false,\n transform = null,\n imageLayer = null,\n canvasFactory = null,\n background = null,\n includeAnnotationStorage = false,\n optionalContentConfigPromise = null,\n }) {\n if (this._stats) {\n this._stats.time(\"Overall\");\n }\n\n const renderingIntent = intent === \"print\" ? \"print\" : \"display\";\n // If there was a pending destroy, cancel it so no cleanup happens during\n // this call to render.\n this.pendingCleanup = false;\n\n if (!optionalContentConfigPromise) {\n optionalContentConfigPromise = this._transport.getOptionalContentConfig();\n }\n\n let intentState = this._intentStates.get(renderingIntent);\n if (!intentState) {\n intentState = Object.create(null);\n this._intentStates.set(renderingIntent, intentState);\n }\n\n // Ensure that a pending `streamReader` cancel timeout is always aborted.\n if (intentState.streamReaderCancelTimeout) {\n clearTimeout(intentState.streamReaderCancelTimeout);\n intentState.streamReaderCancelTimeout = null;\n }\n\n const canvasFactoryInstance =\n canvasFactory ||\n new DefaultCanvasFactory({ ownerDocument: this._ownerDocument });\n const annotationStorage = includeAnnotationStorage\n ? this._transport.annotationStorage.serializable\n : null;\n\n // If there's no displayReadyCapability yet, then the operatorList\n // was never requested before. Make the request and create the promise.\n if (!intentState.displayReadyCapability) {\n intentState.displayReadyCapability = createPromiseCapability();\n intentState.operatorList = {\n fnArray: [],\n argsArray: [],\n lastChunk: false,\n };\n\n if (this._stats) {\n this._stats.time(\"Page Request\");\n }\n this._pumpOperatorList({\n pageIndex: this._pageIndex,\n intent: renderingIntent,\n renderInteractiveForms: renderInteractiveForms === true,\n annotationStorage,\n });\n }\n\n const complete = error => {\n intentState.renderTasks.delete(internalRenderTask);\n\n // Attempt to reduce memory usage during *printing*, by always running\n // cleanup once rendering has finished (regardless of cleanupAfterRender).\n if (this.cleanupAfterRender || renderingIntent === \"print\") {\n this.pendingCleanup = true;\n }\n this._tryCleanup();\n\n if (error) {\n internalRenderTask.capability.reject(error);\n\n this._abortOperatorList({\n intentState,\n reason: error,\n });\n } else {\n internalRenderTask.capability.resolve();\n }\n if (this._stats) {\n this._stats.timeEnd(\"Rendering\");\n this._stats.timeEnd(\"Overall\");\n }\n };\n\n const internalRenderTask = new InternalRenderTask({\n callback: complete,\n // Only include the required properties, and *not* the entire object.\n params: {\n canvasContext,\n viewport,\n transform,\n imageLayer,\n background,\n },\n objs: this.objs,\n commonObjs: this.commonObjs,\n operatorList: intentState.operatorList,\n pageIndex: this._pageIndex,\n canvasFactory: canvasFactoryInstance,\n useRequestAnimationFrame: renderingIntent !== \"print\",\n pdfBug: this._pdfBug,\n });\n\n (intentState.renderTasks ||= new Set()).add(internalRenderTask);\n const renderTask = internalRenderTask.task;\n\n Promise.all([\n intentState.displayReadyCapability.promise,\n optionalContentConfigPromise,\n ])\n .then(([transparency, optionalContentConfig]) => {\n if (this.pendingCleanup) {\n complete();\n return;\n }\n if (this._stats) {\n this._stats.time(\"Rendering\");\n }\n internalRenderTask.initializeGraphics({\n transparency,\n optionalContentConfig,\n });\n internalRenderTask.operatorListChanged();\n })\n .catch(complete);\n\n return renderTask;\n }\n\n /**\n * @param {GetOperatorListParameters} params - Page getOperatorList\n * parameters.\n * @returns {Promise} A promise resolved with an\n * {@link PDFOperatorList} object that represents the page's operator list.\n */\n getOperatorList({ intent = \"display\" } = {}) {\n function operatorListChanged() {\n if (intentState.operatorList.lastChunk) {\n intentState.opListReadCapability.resolve(intentState.operatorList);\n\n intentState.renderTasks.delete(opListTask);\n }\n }\n\n const renderingIntent = `oplist-${\n intent === \"print\" ? \"print\" : \"display\"\n }`;\n let intentState = this._intentStates.get(renderingIntent);\n if (!intentState) {\n intentState = Object.create(null);\n this._intentStates.set(renderingIntent, intentState);\n }\n let opListTask;\n\n if (!intentState.opListReadCapability) {\n opListTask = Object.create(null);\n opListTask.operatorListChanged = operatorListChanged;\n intentState.opListReadCapability = createPromiseCapability();\n (intentState.renderTasks ||= new Set()).add(opListTask);\n intentState.operatorList = {\n fnArray: [],\n argsArray: [],\n lastChunk: false,\n };\n\n if (this._stats) {\n this._stats.time(\"Page Request\");\n }\n this._pumpOperatorList({\n pageIndex: this._pageIndex,\n intent: renderingIntent,\n });\n }\n return intentState.opListReadCapability.promise;\n }\n\n /**\n * @param {getTextContentParameters} params - getTextContent parameters.\n * @returns {ReadableStream} Stream for reading text content chunks.\n */\n streamTextContent({\n normalizeWhitespace = false,\n disableCombineTextItems = false,\n includeMarkedContent = false,\n } = {}) {\n const TEXT_CONTENT_CHUNK_SIZE = 100;\n\n return this._transport.messageHandler.sendWithStream(\n \"GetTextContent\",\n {\n pageIndex: this._pageIndex,\n normalizeWhitespace: normalizeWhitespace === true,\n combineTextItems: disableCombineTextItems !== true,\n includeMarkedContent: includeMarkedContent === true,\n },\n {\n highWaterMark: TEXT_CONTENT_CHUNK_SIZE,\n size(textContent) {\n return textContent.items.length;\n },\n }\n );\n }\n\n /**\n * @param {getTextContentParameters} params - getTextContent parameters.\n * @returns {Promise} A promise that is resolved with a\n * {@link TextContent} object that represents the page's text content.\n */\n getTextContent(params = {}) {\n const readableStream = this.streamTextContent(params);\n\n return new Promise(function (resolve, reject) {\n function pump() {\n reader.read().then(function ({ value, done }) {\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\n const reader = readableStream.getReader();\n const textContent = {\n items: [],\n styles: Object.create(null),\n };\n pump();\n });\n }\n\n /**\n * @returns {Promise} A promise that is resolved with a\n * {@link StructTreeNode} object that represents the page's structure tree,\n * or `null` when no structure tree is present for the current page.\n */\n getStructTree() {\n return (this._structTreePromise ||= this._transport.getStructTree(\n this._pageIndex\n ));\n }\n\n /**\n * Destroys the page object.\n * @private\n */\n _destroy() {\n this.destroyed = true;\n this._transport.pageCache[this._pageIndex] = null;\n\n const waitOn = [];\n for (const [intent, intentState] of this._intentStates) {\n this._abortOperatorList({\n intentState,\n reason: new Error(\"Page was destroyed.\"),\n force: true,\n });\n\n if (intent.startsWith(\"oplist-\")) {\n // Avoid errors below, since the renderTasks are just stubs.\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._annotationsPromise = null;\n this._jsActionsPromise = null;\n this._structTreePromise = null;\n this.pendingCleanup = false;\n return Promise.all(waitOn);\n }\n\n /**\n * Cleans up resources allocated by the page.\n *\n * @param {boolean} [resetStats] - Reset page stats, if enabled.\n * The default value is `false`.\n * @returns {boolean} Indicates if clean-up was successfully run.\n */\n cleanup(resetStats = false) {\n this.pendingCleanup = true;\n return this._tryCleanup(resetStats);\n }\n\n /**\n * Attempts to clean up if rendering is in a state where that's possible.\n * @private\n */\n _tryCleanup(resetStats = false) {\n if (!this.pendingCleanup) {\n return false;\n }\n for (const { renderTasks, operatorList } of this._intentStates.values()) {\n if (renderTasks.size > 0 || !operatorList.lastChunk) {\n return false;\n }\n }\n\n this._intentStates.clear();\n this.objs.clear();\n this._annotationsPromise = null;\n this._jsActionsPromise = null;\n this._structTreePromise = null;\n if (resetStats && this._stats) {\n this._stats = new StatTimer();\n }\n this.pendingCleanup = false;\n return true;\n }\n\n /**\n * @private\n */\n _startRenderPage(transparency, intent) {\n const intentState = this._intentStates.get(intent);\n if (!intentState) {\n return; // Rendering was cancelled.\n }\n if (this._stats) {\n this._stats.timeEnd(\"Page Request\");\n }\n // TODO Refactor RenderPageRequest to separate rendering\n // and operator list logic\n if (intentState.displayReadyCapability) {\n intentState.displayReadyCapability.resolve(transparency);\n }\n }\n\n /**\n * @private\n */\n _renderPageChunk(operatorListChunk, intentState) {\n // Add the new chunk to the current operator list.\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\n // Notify all the rendering tasks there are more operators to be consumed.\n for (const internalRenderTask of intentState.renderTasks) {\n internalRenderTask.operatorListChanged();\n }\n\n if (operatorListChunk.lastChunk) {\n this._tryCleanup();\n }\n }\n\n /**\n * @private\n */\n _pumpOperatorList(args) {\n assert(\n args.intent,\n 'PDFPageProxy._pumpOperatorList: Expected \"intent\" argument.'\n );\n\n const readableStream = this._transport.messageHandler.sendWithStream(\n \"GetOperatorList\",\n args\n );\n const reader = readableStream.getReader();\n\n const intentState = this._intentStates.get(args.intent);\n intentState.streamReader = reader;\n\n const pump = () => {\n reader.read().then(\n ({ value, done }) => {\n if (done) {\n intentState.streamReader = null;\n return;\n }\n if (this._transport.destroyed) {\n return; // Ignore any pending requests if the worker was terminated.\n }\n this._renderPageChunk(value, intentState);\n pump();\n },\n reason => {\n intentState.streamReader = null;\n\n if (this._transport.destroyed) {\n return; // Ignore any pending requests if the worker was terminated.\n }\n if (intentState.operatorList) {\n // Mark operator list as complete.\n intentState.operatorList.lastChunk = true;\n\n for (const internalRenderTask of intentState.renderTasks) {\n internalRenderTask.operatorListChanged();\n }\n this._tryCleanup();\n }\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 };\n pump();\n }\n\n /**\n * @private\n */\n _abortOperatorList({ intentState, reason, force = false }) {\n assert(\n reason instanceof Error ||\n (typeof reason === \"object\" && reason !== null),\n 'PDFPageProxy._abortOperatorList: Expected \"reason\" argument.'\n );\n\n if (!intentState.streamReader) {\n return;\n }\n if (!force) {\n // Ensure that an Error occurring in *only* one `InternalRenderTask`, e.g.\n // multiple render() calls on the same canvas, won't break all rendering.\n if (intentState.renderTasks.size > 0) {\n return;\n }\n // Don't immediately abort parsing on the worker-thread when rendering is\n // cancelled, since that will unnecessarily delay re-rendering when (for\n // partially parsed pages) e.g. zooming/rotation occurs in the viewer.\n if (reason instanceof RenderingCancelledException) {\n intentState.streamReaderCancelTimeout = setTimeout(() => {\n this._abortOperatorList({ intentState, reason, force: true });\n intentState.streamReaderCancelTimeout = null;\n }, RENDERING_CANCELLED_TIMEOUT);\n return;\n }\n }\n intentState.streamReader.cancel(new AbortException(reason?.message));\n intentState.streamReader = null;\n\n if (this._transport.destroyed) {\n return; // Ignore any pending requests if the worker was terminated.\n }\n // Remove the current `intentState`, since a cancelled `getOperatorList`\n // call on the worker-thread cannot be re-started...\n for (const [intent, curIntentState] of this._intentStates) {\n if (curIntentState === intentState) {\n this._intentStates.delete(intent);\n break;\n }\n }\n // ... and force clean-up to ensure that any old state is always removed.\n this.cleanup();\n }\n\n /**\n * @type {Object} Returns page stats, if enabled; returns `null` otherwise.\n */\n get stats() {\n return this._stats;\n }\n}\n\nclass LoopbackPort {\n constructor() {\n this._listeners = [];\n this._deferred = Promise.resolve(undefined);\n }\n\n postMessage(obj, transfers) {\n function cloneValue(value) {\n // Trying to perform a structured clone close to the spec, including\n // transfers.\n if (\n typeof value === \"function\" ||\n typeof value === \"symbol\" ||\n value instanceof URL\n ) {\n throw new Error(\n `LoopbackPort.postMessage - cannot clone: ${value?.toString()}`\n );\n }\n\n if (typeof value !== \"object\" || value === null) {\n return value;\n }\n if (cloned.has(value)) {\n // already cloned the object\n return cloned.get(value);\n }\n let buffer, result;\n if ((buffer = value.buffer) && isArrayBuffer(buffer)) {\n // We found object with ArrayBuffer (typed array).\n if (transfers?.includes(buffer)) {\n result = new value.constructor(\n buffer,\n value.byteOffset,\n value.byteLength\n );\n } else {\n result = new value.constructor(value);\n }\n cloned.set(value, result);\n return result;\n }\n if (value instanceof Map) {\n result = new Map();\n cloned.set(value, result); // Adding to cache now for cyclic references.\n for (const [key, val] of value) {\n result.set(key, cloneValue(val));\n }\n return result;\n }\n if (value instanceof Set) {\n result = new Set();\n cloned.set(value, result); // Adding to cache now for cyclic references.\n for (const val of value) {\n result.add(cloneValue(val));\n }\n return result;\n }\n result = Array.isArray(value) ? [] : Object.create(null);\n cloned.set(value, result); // Adding to cache now for cyclic references.\n // Cloning all value and object properties, however ignoring properties\n // defined via getter.\n for (const i in value) {\n let desc,\n p = value;\n while (!(desc = Object.getOwnPropertyDescriptor(p, i))) {\n p = Object.getPrototypeOf(p);\n }\n if (typeof desc.value === \"undefined\") {\n continue;\n }\n if (typeof desc.value === \"function\" && !value.hasOwnProperty?.(i)) {\n continue;\n }\n result[i] = cloneValue(desc.value);\n }\n return result;\n }\n\n const cloned = new WeakMap();\n const event = { data: cloneValue(obj) };\n\n this._deferred.then(() => {\n for (const listener of this._listeners) {\n listener.call(this, event);\n }\n });\n }\n\n addEventListener(name, listener) {\n this._listeners.push(listener);\n }\n\n removeEventListener(name, listener) {\n const i = this._listeners.indexOf(listener);\n this._listeners.splice(i, 1);\n }\n\n terminate() {\n this._listeners.length = 0;\n }\n}\n\n/**\n * @typedef {Object} PDFWorkerParameters\n * @property {string} [name] - The name of the worker.\n * @property {Object} [port] - The `workerPort` object.\n * @property {number} [verbosity] - Controls the logging level; the\n * constants from {@link VerbosityLevel} should be used.\n */\n\n/** @type {any} */\nconst PDFWorker = (function PDFWorkerClosure() {\n const pdfWorkerPorts = new WeakMap();\n let isWorkerDisabled = false;\n let fallbackWorkerSrc;\n let nextFakeWorkerId = 0;\n let fakeWorkerCapability;\n\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"GENERIC\")) {\n // eslint-disable-next-line no-undef\n if (isNodeJS && typeof __non_webpack_require__ === \"function\") {\n // Workers aren't supported in Node.js, force-disabling them there.\n isWorkerDisabled = true;\n\n if (typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"LIB\")) {\n fallbackWorkerSrc = \"../pdf.worker.js\";\n } else {\n fallbackWorkerSrc = \"./pdf.worker.js\";\n }\n } else if (typeof document === \"object\" && \"currentScript\" in document) {\n const pdfjsFilePath = document.currentScript?.src;\n if (pdfjsFilePath) {\n fallbackWorkerSrc = pdfjsFilePath.replace(\n /(\\.(?:min\\.)?js)(\\?.*)?$/i,\n \".worker$1$2\"\n );\n }\n }\n }\n\n function getWorkerSrc() {\n if (GlobalWorkerOptions.workerSrc) {\n return GlobalWorkerOptions.workerSrc;\n }\n if (typeof fallbackWorkerSrc !== \"undefined\") {\n if (!isNodeJS) {\n deprecated('No \"GlobalWorkerOptions.workerSrc\" specified.');\n }\n return fallbackWorkerSrc;\n }\n throw new Error('No \"GlobalWorkerOptions.workerSrc\" specified.');\n }\n\n function getMainThreadWorkerMessageHandler() {\n let mainWorkerMessageHandler;\n try {\n mainWorkerMessageHandler = globalThis.pdfjsWorker?.WorkerMessageHandler;\n } catch (ex) {\n /* Ignore errors. */\n }\n return mainWorkerMessageHandler || null;\n }\n\n // Loads worker code into main thread.\n function setupFakeWorkerGlobal() {\n if (fakeWorkerCapability) {\n return fakeWorkerCapability.promise;\n }\n fakeWorkerCapability = createPromiseCapability();\n\n const loader = async function () {\n const mainWorkerMessageHandler = getMainThreadWorkerMessageHandler();\n\n if (mainWorkerMessageHandler) {\n // The worker was already loaded using e.g. a ` + + + + + + + +
+ +
+
+
+
+ + + + +
+
+ +
+ +
+
+
+
+
+ + + +
+
+
+ +
+ + + + +
+
+
+
+ +
+ +
+ +
+ +
+ + +
+
+ + + + + + + + + Current View + + +
+ + +
+
+
+ +
+ +
+ + + +
+
+
+
+
+
+
+
+
+
+ +
+
+
+ + +
+ + + +
+
+ + diff --git a/public/pdfjs/web/viewer.js b/public/pdfjs/web/viewer.js new file mode 100644 index 0000000..9632243 --- /dev/null +++ b/public/pdfjs/web/viewer.js @@ -0,0 +1,20200 @@ +/** + * @licstart The following is the entire license notice for the + * Javascript code in this page + * + * Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * @licend The above is the entire license notice for the + * Javascript code in this page + */ + +/******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ([ +/* 0 */, +/* 1 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.OptionKind = exports.AppOptions = void 0; + +var _viewer_compatibility = __webpack_require__(2); + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var OptionKind = { + VIEWER: 0x02, + API: 0x04, + WORKER: 0x08, + PREFERENCE: 0x80 +}; +exports.OptionKind = OptionKind; +var defaultOptions = { + cursorToolOnLoad: { + value: 0, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + defaultUrl: { + value: "compressed.tracemonkey-pldi-09.pdf", + kind: OptionKind.VIEWER + }, + defaultZoomValue: { + value: "", + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + disableHistory: { + value: false, + kind: OptionKind.VIEWER + }, + disablePageLabels: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + enablePermissions: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + enablePrintAutoRotate: { + value: true, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + enableScripting: { + value: true, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + externalLinkRel: { + value: "noopener noreferrer nofollow", + kind: OptionKind.VIEWER + }, + externalLinkTarget: { + value: 0, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + historyUpdateUrl: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + ignoreDestinationZoom: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + imageResourcesPath: { + value: "./images/", + kind: OptionKind.VIEWER + }, + maxCanvasPixels: { + value: 16777216, + compatibility: _viewer_compatibility.viewerCompatibilityParams.maxCanvasPixels, + kind: OptionKind.VIEWER + }, + pdfBugEnabled: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + printResolution: { + value: 150, + kind: OptionKind.VIEWER + }, + renderer: { + value: "canvas", + kind: OptionKind.VIEWER + }, + renderInteractiveForms: { + value: true, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + sidebarViewOnLoad: { + value: -1, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + scrollModeOnLoad: { + value: -1, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + spreadModeOnLoad: { + value: -1, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + textLayerMode: { + value: 1, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + useOnlyCssZoom: { + value: false, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + viewerCssTheme: { + value: 0, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + viewOnLoad: { + value: 0, + kind: OptionKind.VIEWER + OptionKind.PREFERENCE + }, + cMapPacked: { + value: true, + kind: OptionKind.API + }, + cMapUrl: { + value: "../web/cmaps/", + kind: OptionKind.API + }, + disableAutoFetch: { + value: false, + kind: OptionKind.API + OptionKind.PREFERENCE + }, + disableFontFace: { + value: false, + kind: OptionKind.API + OptionKind.PREFERENCE + }, + disableRange: { + value: false, + kind: OptionKind.API + OptionKind.PREFERENCE + }, + disableStream: { + value: false, + kind: OptionKind.API + OptionKind.PREFERENCE + }, + docBaseUrl: { + value: "", + kind: OptionKind.API + }, + enableXfa: { + value: false, + kind: OptionKind.API + OptionKind.PREFERENCE + }, + fontExtraProperties: { + value: false, + kind: OptionKind.API + }, + isEvalSupported: { + value: true, + kind: OptionKind.API + }, + maxImageSize: { + value: -1, + kind: OptionKind.API + }, + pdfBug: { + value: false, + kind: OptionKind.API + }, + standardFontDataUrl: { + value: "../web/standard_fonts/", + kind: OptionKind.API + }, + verbosity: { + value: 1, + kind: OptionKind.API + }, + workerPort: { + value: null, + kind: OptionKind.WORKER + }, + workerSrc: { + value: "../build/pdf.worker.js", + kind: OptionKind.WORKER + } +}; +{ + defaultOptions.disablePreferences = { + value: false, + kind: OptionKind.VIEWER + }; + defaultOptions.locale = { + value: typeof navigator !== "undefined" ? navigator.language : "en-US", + kind: OptionKind.VIEWER + }; + defaultOptions.sandboxBundleSrc = { + value: "../build/pdf.sandbox.js", + kind: OptionKind.VIEWER + }; + defaultOptions.renderer.kind += OptionKind.PREFERENCE; +} +var userOptions = Object.create(null); + +var AppOptions = /*#__PURE__*/function () { + function AppOptions() { + _classCallCheck(this, AppOptions); + + throw new Error("Cannot initialize AppOptions."); + } + + _createClass(AppOptions, null, [{ + key: "get", + value: function get(name) { + var userOption = userOptions[name]; + + if (userOption !== undefined) { + return userOption; + } + + var defaultOption = defaultOptions[name]; + + if (defaultOption !== undefined) { + var _defaultOption$compat; + + return (_defaultOption$compat = defaultOption.compatibility) !== null && _defaultOption$compat !== void 0 ? _defaultOption$compat : defaultOption.value; + } + + return undefined; + } + }, { + key: "getAll", + value: function getAll() { + var kind = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + var options = Object.create(null); + + for (var name in defaultOptions) { + var _defaultOption$compat2; + + var defaultOption = defaultOptions[name]; + + if (kind) { + if ((kind & defaultOption.kind) === 0) { + continue; + } + + if (kind === OptionKind.PREFERENCE) { + var value = defaultOption.value, + valueType = _typeof(value); + + if (valueType === "boolean" || valueType === "string" || valueType === "number" && Number.isInteger(value)) { + options[name] = value; + continue; + } + + throw new Error("Invalid type for preference: ".concat(name)); + } + } + + var userOption = userOptions[name]; + options[name] = userOption !== undefined ? userOption : (_defaultOption$compat2 = defaultOption.compatibility) !== null && _defaultOption$compat2 !== void 0 ? _defaultOption$compat2 : defaultOption.value; + } + + return options; + } + }, { + key: "set", + value: function set(name, value) { + userOptions[name] = value; + } + }, { + key: "setAll", + value: function setAll(options) { + for (var name in options) { + userOptions[name] = options[name]; + } + } + }, { + key: "remove", + value: function remove(name) { + delete userOptions[name]; + } + }]); + + return AppOptions; +}(); + +exports.AppOptions = AppOptions; + +/***/ }), +/* 2 */ +/***/ ((__unused_webpack_module, exports) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.viewerCompatibilityParams = void 0; +var compatibilityParams = Object.create(null); +{ + var userAgent = typeof navigator !== "undefined" && navigator.userAgent || ""; + var platform = typeof navigator !== "undefined" && navigator.platform || ""; + var maxTouchPoints = typeof navigator !== "undefined" && navigator.maxTouchPoints || 1; + var isAndroid = /Android/.test(userAgent); + var isIOS = /\b(iPad|iPhone|iPod)(?=;)/.test(userAgent) || platform === "MacIntel" && maxTouchPoints > 1; + var isIOSChrome = /CriOS/.test(userAgent); + + (function checkOnBlobSupport() { + if (isIOSChrome) { + compatibilityParams.disableCreateObjectURL = true; + } + })(); + + (function checkCanvasSizeLimitation() { + if (isIOS || isAndroid) { + compatibilityParams.maxCanvasPixels = 5242880; + } + })(); +} +var viewerCompatibilityParams = Object.freeze(compatibilityParams); +exports.viewerCompatibilityParams = viewerCompatibilityParams; + +/***/ }), +/* 3 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PDFViewerApplication = exports.PDFPrintServiceFactory = exports.DefaultExternalServices = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__(4)); + +var _ui_utils = __webpack_require__(6); + +var _app_options = __webpack_require__(1); + +var _pdfjsLib = __webpack_require__(7); + +var _pdf_cursor_tools = __webpack_require__(8); + +var _pdf_rendering_queue = __webpack_require__(10); + +var _overlay_manager = __webpack_require__(11); + +var _password_prompt = __webpack_require__(12); + +var _pdf_attachment_viewer = __webpack_require__(13); + +var _pdf_document_properties = __webpack_require__(15); + +var _pdf_find_bar = __webpack_require__(16); + +var _pdf_find_controller = __webpack_require__(17); + +var _pdf_history = __webpack_require__(19); + +var _pdf_layer_viewer = __webpack_require__(20); + +var _pdf_link_service = __webpack_require__(21); + +var _pdf_outline_viewer = __webpack_require__(22); + +var _pdf_presentation_mode = __webpack_require__(23); + +var _pdf_scripting_manager = __webpack_require__(24); + +var _pdf_sidebar = __webpack_require__(25); + +var _pdf_sidebar_resizer = __webpack_require__(26); + +var _pdf_thumbnail_viewer = __webpack_require__(27); + +var _pdf_viewer = __webpack_require__(29); + +var _secondary_toolbar = __webpack_require__(37); + +var _toolbar = __webpack_require__(39); + +var _viewer_compatibility = __webpack_require__(2); + +var _view_history = __webpack_require__(40); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var DEFAULT_SCALE_DELTA = 1.1; +var DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT = 5000; +var FORCE_PAGES_LOADED_TIMEOUT = 10000; +var WHEEL_ZOOM_DISABLED_TIMEOUT = 1000; +var ENABLE_PERMISSIONS_CLASS = "enablePermissions"; +var ViewOnLoad = { + UNKNOWN: -1, + PREVIOUS: 0, + INITIAL: 1 +}; +var ViewerCssTheme = { + AUTOMATIC: 0, + LIGHT: 1, + DARK: 2 +}; +var KNOWN_VERSIONS = ["1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "1.9", "2.0", "2.1", "2.2", "2.3"]; +var KNOWN_GENERATORS = ["acrobat distiller", "acrobat pdfwriter", "adobe livecycle", "adobe pdf library", "adobe photoshop", "ghostscript", "tcpdf", "cairo", "dvipdfm", "dvips", "pdftex", "pdfkit", "itext", "prince", "quarkxpress", "mac os x", "microsoft", "openoffice", "oracle", "luradocument", "pdf-xchange", "antenna house", "aspose.cells", "fpdf"]; + +var DefaultExternalServices = /*#__PURE__*/function () { + function DefaultExternalServices() { + _classCallCheck(this, DefaultExternalServices); + + throw new Error("Cannot initialize DefaultExternalServices."); + } + + _createClass(DefaultExternalServices, null, [{ + key: "updateFindControlState", + value: function updateFindControlState(data) {} + }, { + key: "updateFindMatchesCount", + value: function updateFindMatchesCount(data) {} + }, { + key: "initPassiveLoading", + value: function initPassiveLoading(callbacks) {} + }, { + key: "fallback", + value: function () { + var _fallback = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee(data) { + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + function fallback(_x) { + return _fallback.apply(this, arguments); + } + + return fallback; + }() + }, { + key: "reportTelemetry", + value: function reportTelemetry(data) {} + }, { + key: "createDownloadManager", + value: function createDownloadManager(options) { + throw new Error("Not implemented: createDownloadManager"); + } + }, { + key: "createPreferences", + value: function createPreferences() { + throw new Error("Not implemented: createPreferences"); + } + }, { + key: "createL10n", + value: function createL10n(options) { + throw new Error("Not implemented: createL10n"); + } + }, { + key: "createScripting", + value: function createScripting(options) { + throw new Error("Not implemented: createScripting"); + } + }, { + key: "supportsIntegratedFind", + get: function get() { + return (0, _pdfjsLib.shadow)(this, "supportsIntegratedFind", false); + } + }, { + key: "supportsDocumentFonts", + get: function get() { + return (0, _pdfjsLib.shadow)(this, "supportsDocumentFonts", true); + } + }, { + key: "supportedMouseWheelZoomModifierKeys", + get: function get() { + return (0, _pdfjsLib.shadow)(this, "supportedMouseWheelZoomModifierKeys", { + ctrlKey: true, + metaKey: true + }); + } + }, { + key: "isInAutomation", + get: function get() { + return (0, _pdfjsLib.shadow)(this, "isInAutomation", false); + } + }]); + + return DefaultExternalServices; +}(); + +exports.DefaultExternalServices = DefaultExternalServices; +var PDFViewerApplication = { + initialBookmark: document.location.hash.substring(1), + _initializedCapability: (0, _pdfjsLib.createPromiseCapability)(), + _fellback: false, + appConfig: null, + pdfDocument: null, + pdfLoadingTask: null, + printService: null, + pdfViewer: null, + pdfThumbnailViewer: null, + pdfRenderingQueue: null, + pdfPresentationMode: null, + pdfDocumentProperties: null, + pdfLinkService: null, + pdfHistory: null, + pdfSidebar: null, + pdfSidebarResizer: null, + pdfOutlineViewer: null, + pdfAttachmentViewer: null, + pdfLayerViewer: null, + pdfCursorTools: null, + pdfScriptingManager: null, + store: null, + downloadManager: null, + overlayManager: null, + preferences: null, + toolbar: null, + secondaryToolbar: null, + eventBus: null, + l10n: null, + isInitialViewSet: false, + downloadComplete: false, + isViewerEmbedded: window.parent !== window, + url: "", + baseUrl: "", + externalServices: DefaultExternalServices, + _boundEvents: Object.create(null), + documentInfo: null, + metadata: null, + _contentDispositionFilename: null, + _contentLength: null, + _saveInProgress: false, + _wheelUnusedTicks: 0, + _idleCallbacks: new Set(), + initialize: function initialize(appConfig) { + var _this = this; + + return _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee2() { + var appContainer; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _this.preferences = _this.externalServices.createPreferences(); + _this.appConfig = appConfig; + _context2.next = 4; + return _this._readPreferences(); + + case 4: + _context2.next = 6; + return _this._parseHashParameters(); + + case 6: + _this._forceCssTheme(); + + _context2.next = 9; + return _this._initializeL10n(); + + case 9: + if (_this.isViewerEmbedded && _app_options.AppOptions.get("externalLinkTarget") === _pdfjsLib.LinkTarget.NONE) { + _app_options.AppOptions.set("externalLinkTarget", _pdfjsLib.LinkTarget.TOP); + } + + _context2.next = 12; + return _this._initializeViewerComponents(); + + case 12: + _this.bindEvents(); + + _this.bindWindowEvents(); + + appContainer = appConfig.appContainer || document.documentElement; + + _this.l10n.translate(appContainer).then(function () { + _this.eventBus.dispatch("localized", { + source: _this + }); + }); + + _this._initializedCapability.resolve(); + + case 17: + case "end": + return _context2.stop(); + } + } + }, _callee2); + }))(); + }, + _readPreferences: function _readPreferences() { + var _this2 = this; + + return _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee3() { + return _regenerator["default"].wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + if (!_app_options.AppOptions.get("disablePreferences")) { + _context3.next = 2; + break; + } + + return _context3.abrupt("return"); + + case 2: + _context3.prev = 2; + _context3.t0 = _app_options.AppOptions; + _context3.next = 6; + return _this2.preferences.getAll(); + + case 6: + _context3.t1 = _context3.sent; + + _context3.t0.setAll.call(_context3.t0, _context3.t1); + + _context3.next = 13; + break; + + case 10: + _context3.prev = 10; + _context3.t2 = _context3["catch"](2); + console.error("_readPreferences: \"".concat(_context3.t2 === null || _context3.t2 === void 0 ? void 0 : _context3.t2.message, "\".")); + + case 13: + case "end": + return _context3.stop(); + } + } + }, _callee3, null, [[2, 10]]); + }))(); + }, + _parseHashParameters: function _parseHashParameters() { + var _this3 = this; + + return _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee4() { + var hash, hashParams, waitOn, viewer, enabled; + return _regenerator["default"].wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + if (_app_options.AppOptions.get("pdfBugEnabled")) { + _context4.next = 2; + break; + } + + return _context4.abrupt("return", undefined); + + case 2: + hash = document.location.hash.substring(1); + + if (hash) { + _context4.next = 5; + break; + } + + return _context4.abrupt("return", undefined); + + case 5: + hashParams = (0, _ui_utils.parseQueryString)(hash), waitOn = []; + + if ("disableworker" in hashParams && hashParams.disableworker === "true") { + waitOn.push(loadFakeWorker()); + } + + if ("disablerange" in hashParams) { + _app_options.AppOptions.set("disableRange", hashParams.disablerange === "true"); + } + + if ("disablestream" in hashParams) { + _app_options.AppOptions.set("disableStream", hashParams.disablestream === "true"); + } + + if ("disableautofetch" in hashParams) { + _app_options.AppOptions.set("disableAutoFetch", hashParams.disableautofetch === "true"); + } + + if ("disablefontface" in hashParams) { + _app_options.AppOptions.set("disableFontFace", hashParams.disablefontface === "true"); + } + + if ("disablehistory" in hashParams) { + _app_options.AppOptions.set("disableHistory", hashParams.disablehistory === "true"); + } + + if ("verbosity" in hashParams) { + _app_options.AppOptions.set("verbosity", hashParams.verbosity | 0); + } + + if (!("textlayer" in hashParams)) { + _context4.next = 22; + break; + } + + _context4.t0 = hashParams.textlayer; + _context4.next = _context4.t0 === "off" ? 17 : _context4.t0 === "visible" ? 19 : _context4.t0 === "shadow" ? 19 : _context4.t0 === "hover" ? 19 : 22; + break; + + case 17: + _app_options.AppOptions.set("textLayerMode", _ui_utils.TextLayerMode.DISABLE); + + return _context4.abrupt("break", 22); + + case 19: + viewer = _this3.appConfig.viewerContainer; + viewer.classList.add("textLayer-" + hashParams.textlayer); + return _context4.abrupt("break", 22); + + case 22: + if ("pdfbug" in hashParams) { + _app_options.AppOptions.set("pdfBug", true); + + _app_options.AppOptions.set("fontExtraProperties", true); + + enabled = hashParams.pdfbug.split(","); + waitOn.push(loadAndEnablePDFBug(enabled)); + } + + if ("locale" in hashParams) { + _app_options.AppOptions.set("locale", hashParams.locale); + } + + if (!(waitOn.length === 0)) { + _context4.next = 26; + break; + } + + return _context4.abrupt("return", undefined); + + case 26: + return _context4.abrupt("return", Promise.all(waitOn)["catch"](function (reason) { + console.error("_parseHashParameters: \"".concat(reason.message, "\".")); + })); + + case 27: + case "end": + return _context4.stop(); + } + } + }, _callee4); + }))(); + }, + _initializeL10n: function _initializeL10n() { + var _this4 = this; + + return _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee5() { + var dir; + return _regenerator["default"].wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + _this4.l10n = _this4.externalServices.createL10n({ + locale: _app_options.AppOptions.get("locale") + }); + _context5.next = 3; + return _this4.l10n.getDirection(); + + case 3: + dir = _context5.sent; + document.getElementsByTagName("html")[0].dir = dir; + + case 5: + case "end": + return _context5.stop(); + } + } + }, _callee5); + }))(); + }, + _forceCssTheme: function _forceCssTheme() { + var cssTheme = _app_options.AppOptions.get("viewerCssTheme"); + + if (cssTheme === ViewerCssTheme.AUTOMATIC || !Object.values(ViewerCssTheme).includes(cssTheme)) { + return; + } + + try { + var styleSheet = document.styleSheets[0]; + var cssRules = (styleSheet === null || styleSheet === void 0 ? void 0 : styleSheet.cssRules) || []; + var mediaMatcher = "prefers-color-scheme"; + var mediaRule = "(".concat(mediaMatcher, ": dark)"); + var mediaRegex = new RegExp("^@media \\(".concat(mediaMatcher, ": dark\\) {\\n\\s*([\\w\\s-.,:;/\\\\{}()]+)\\n}$")); + + for (var i = 0, ii = cssRules.length; i < ii; i++) { + var _rule$media; + + var rule = cssRules[i]; + + if (rule instanceof CSSMediaRule && ((_rule$media = rule.media) === null || _rule$media === void 0 ? void 0 : _rule$media[0]) === mediaRule) { + if (cssTheme === ViewerCssTheme.LIGHT) { + styleSheet.deleteRule(i); + return; + } + + var darkRules = mediaRegex.exec(rule.cssText); + + if (darkRules !== null && darkRules !== void 0 && darkRules[1]) { + styleSheet.deleteRule(i); + styleSheet.insertRule(darkRules[1], i); + } + + return; + } + } + } catch (reason) { + console.error("_forceCssTheme: \"".concat(reason === null || reason === void 0 ? void 0 : reason.message, "\".")); + } + }, + _initializeViewerComponents: function _initializeViewerComponents() { + var _this5 = this; + + return _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee6() { + var appConfig, eventBus, pdfRenderingQueue, pdfLinkService, downloadManager, findController, pdfScriptingManager, container, viewer; + return _regenerator["default"].wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + appConfig = _this5.appConfig; + eventBus = appConfig.eventBus || new _ui_utils.EventBus({ + isInAutomation: _this5.externalServices.isInAutomation + }); + _this5.eventBus = eventBus; + _this5.overlayManager = new _overlay_manager.OverlayManager(); + pdfRenderingQueue = new _pdf_rendering_queue.PDFRenderingQueue(); + pdfRenderingQueue.onIdle = _this5._cleanup.bind(_this5); + _this5.pdfRenderingQueue = pdfRenderingQueue; + pdfLinkService = new _pdf_link_service.PDFLinkService({ + eventBus: eventBus, + externalLinkTarget: _app_options.AppOptions.get("externalLinkTarget"), + externalLinkRel: _app_options.AppOptions.get("externalLinkRel"), + ignoreDestinationZoom: _app_options.AppOptions.get("ignoreDestinationZoom") + }); + _this5.pdfLinkService = pdfLinkService; + downloadManager = _this5.externalServices.createDownloadManager(); + _this5.downloadManager = downloadManager; + findController = new _pdf_find_controller.PDFFindController({ + linkService: pdfLinkService, + eventBus: eventBus + }); + _this5.findController = findController; + pdfScriptingManager = new _pdf_scripting_manager.PDFScriptingManager({ + eventBus: eventBus, + sandboxBundleSrc: _app_options.AppOptions.get("sandboxBundleSrc"), + scriptingFactory: _this5.externalServices, + docPropertiesLookup: _this5._scriptingDocProperties.bind(_this5) + }); + _this5.pdfScriptingManager = pdfScriptingManager; + container = appConfig.mainContainer; + viewer = appConfig.viewerContainer; + _this5.pdfViewer = new _pdf_viewer.PDFViewer({ + container: container, + viewer: viewer, + eventBus: eventBus, + renderingQueue: pdfRenderingQueue, + linkService: pdfLinkService, + downloadManager: downloadManager, + findController: findController, + scriptingManager: pdfScriptingManager, + renderer: _app_options.AppOptions.get("renderer"), + l10n: _this5.l10n, + textLayerMode: _app_options.AppOptions.get("textLayerMode"), + imageResourcesPath: _app_options.AppOptions.get("imageResourcesPath"), + renderInteractiveForms: _app_options.AppOptions.get("renderInteractiveForms"), + enablePrintAutoRotate: _app_options.AppOptions.get("enablePrintAutoRotate"), + useOnlyCssZoom: _app_options.AppOptions.get("useOnlyCssZoom"), + maxCanvasPixels: _app_options.AppOptions.get("maxCanvasPixels"), + enableScripting: _app_options.AppOptions.get("enableScripting") + }); + pdfRenderingQueue.setViewer(_this5.pdfViewer); + pdfLinkService.setViewer(_this5.pdfViewer); + pdfScriptingManager.setViewer(_this5.pdfViewer); + _this5.pdfThumbnailViewer = new _pdf_thumbnail_viewer.PDFThumbnailViewer({ + container: appConfig.sidebar.thumbnailView, + eventBus: eventBus, + renderingQueue: pdfRenderingQueue, + linkService: pdfLinkService, + l10n: _this5.l10n + }); + pdfRenderingQueue.setThumbnailViewer(_this5.pdfThumbnailViewer); + _this5.pdfHistory = new _pdf_history.PDFHistory({ + linkService: pdfLinkService, + eventBus: eventBus + }); + pdfLinkService.setHistory(_this5.pdfHistory); + + if (!_this5.supportsIntegratedFind) { + _this5.findBar = new _pdf_find_bar.PDFFindBar(appConfig.findBar, eventBus, _this5.l10n); + } + + _this5.pdfDocumentProperties = new _pdf_document_properties.PDFDocumentProperties(appConfig.documentProperties, _this5.overlayManager, eventBus, _this5.l10n); + _this5.pdfCursorTools = new _pdf_cursor_tools.PDFCursorTools({ + container: container, + eventBus: eventBus, + cursorToolOnLoad: _app_options.AppOptions.get("cursorToolOnLoad") + }); + _this5.toolbar = new _toolbar.Toolbar(appConfig.toolbar, eventBus, _this5.l10n); + _this5.secondaryToolbar = new _secondary_toolbar.SecondaryToolbar(appConfig.secondaryToolbar, container, eventBus); + + if (_this5.supportsFullscreen) { + _this5.pdfPresentationMode = new _pdf_presentation_mode.PDFPresentationMode({ + container: container, + pdfViewer: _this5.pdfViewer, + eventBus: eventBus + }); + } + + _this5.passwordPrompt = new _password_prompt.PasswordPrompt(appConfig.passwordOverlay, _this5.overlayManager, _this5.l10n, _this5.isViewerEmbedded); + _this5.pdfOutlineViewer = new _pdf_outline_viewer.PDFOutlineViewer({ + container: appConfig.sidebar.outlineView, + eventBus: eventBus, + linkService: pdfLinkService + }); + _this5.pdfAttachmentViewer = new _pdf_attachment_viewer.PDFAttachmentViewer({ + container: appConfig.sidebar.attachmentsView, + eventBus: eventBus, + downloadManager: downloadManager + }); + _this5.pdfLayerViewer = new _pdf_layer_viewer.PDFLayerViewer({ + container: appConfig.sidebar.layersView, + eventBus: eventBus, + l10n: _this5.l10n + }); + _this5.pdfSidebar = new _pdf_sidebar.PDFSidebar({ + elements: appConfig.sidebar, + pdfViewer: _this5.pdfViewer, + pdfThumbnailViewer: _this5.pdfThumbnailViewer, + eventBus: eventBus, + l10n: _this5.l10n + }); + _this5.pdfSidebar.onToggled = _this5.forceRendering.bind(_this5); + _this5.pdfSidebarResizer = new _pdf_sidebar_resizer.PDFSidebarResizer(appConfig.sidebarResizer, eventBus, _this5.l10n); + + case 38: + case "end": + return _context6.stop(); + } + } + }, _callee6); + }))(); + }, + run: function run(config) { + this.initialize(config).then(webViewerInitialized); + }, + + get initialized() { + return this._initializedCapability.settled; + }, + + get initializedPromise() { + return this._initializedCapability.promise; + }, + + zoomIn: function zoomIn(ticks) { + if (this.pdfViewer.isInPresentationMode) { + return; + } + + var newScale = this.pdfViewer.currentScale; + + do { + newScale = (newScale * DEFAULT_SCALE_DELTA).toFixed(2); + newScale = Math.ceil(newScale * 10) / 10; + newScale = Math.min(_ui_utils.MAX_SCALE, newScale); + } while (--ticks > 0 && newScale < _ui_utils.MAX_SCALE); + + this.pdfViewer.currentScaleValue = newScale; + }, + zoomOut: function zoomOut(ticks) { + if (this.pdfViewer.isInPresentationMode) { + return; + } + + var newScale = this.pdfViewer.currentScale; + + do { + newScale = (newScale / DEFAULT_SCALE_DELTA).toFixed(2); + newScale = Math.floor(newScale * 10) / 10; + newScale = Math.max(_ui_utils.MIN_SCALE, newScale); + } while (--ticks > 0 && newScale > _ui_utils.MIN_SCALE); + + this.pdfViewer.currentScaleValue = newScale; + }, + zoomReset: function zoomReset() { + if (this.pdfViewer.isInPresentationMode) { + return; + } + + this.pdfViewer.currentScaleValue = _ui_utils.DEFAULT_SCALE_VALUE; + }, + + get pagesCount() { + return this.pdfDocument ? this.pdfDocument.numPages : 0; + }, + + get page() { + return this.pdfViewer.currentPageNumber; + }, + + set page(val) { + this.pdfViewer.currentPageNumber = val; + }, + + get supportsPrinting() { + return PDFPrintServiceFactory.instance.supportsPrinting; + }, + + get supportsFullscreen() { + var doc = document.documentElement; + var support = !!(doc.requestFullscreen || doc.mozRequestFullScreen || doc.webkitRequestFullScreen); + + if (document.fullscreenEnabled === false || document.mozFullScreenEnabled === false || document.webkitFullscreenEnabled === false) { + support = false; + } + + return (0, _pdfjsLib.shadow)(this, "supportsFullscreen", support); + }, + + get supportsIntegratedFind() { + return this.externalServices.supportsIntegratedFind; + }, + + get supportsDocumentFonts() { + return this.externalServices.supportsDocumentFonts; + }, + + get loadingBar() { + var bar = new _ui_utils.ProgressBar("#loadingBar"); + return (0, _pdfjsLib.shadow)(this, "loadingBar", bar); + }, + + get supportedMouseWheelZoomModifierKeys() { + return this.externalServices.supportedMouseWheelZoomModifierKeys; + }, + + initPassiveLoading: function initPassiveLoading() { + throw new Error("Not implemented: initPassiveLoading"); + }, + setTitleUsingUrl: function setTitleUsingUrl() { + var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ""; + this.url = url; + this.baseUrl = url.split("#")[0]; + var title = (0, _pdfjsLib.getPdfFilenameFromUrl)(url, ""); + + if (!title) { + try { + title = decodeURIComponent((0, _pdfjsLib.getFilenameFromUrl)(url)) || url; + } catch (ex) { + title = url; + } + } + + this.setTitle(title); + }, + setTitle: function setTitle(title) { + if (this.isViewerEmbedded) { + return; + } + + document.title = title; + }, + + get _docFilename() { + return this._contentDispositionFilename || (0, _pdfjsLib.getPdfFilenameFromUrl)(this.url); + }, + + _cancelIdleCallbacks: function _cancelIdleCallbacks() { + if (!this._idleCallbacks.size) { + return; + } + + var _iterator = _createForOfIteratorHelper(this._idleCallbacks), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var callback = _step.value; + window.cancelIdleCallback(callback); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + this._idleCallbacks.clear(); + }, + close: function close() { + var _this6 = this; + + return _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee7() { + var _this6$pdfDocument; + + var container, promises; + return _regenerator["default"].wrap(function _callee7$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + _this6._unblockDocumentLoadEvent(); + + container = _this6.appConfig.errorWrapper.container; + container.hidden = true; + + if (_this6.pdfLoadingTask) { + _context7.next = 5; + break; + } + + return _context7.abrupt("return"); + + case 5: + if (!(((_this6$pdfDocument = _this6.pdfDocument) === null || _this6$pdfDocument === void 0 ? void 0 : _this6$pdfDocument.annotationStorage.size) > 0 && _this6._annotationStorageModified)) { + _context7.next = 13; + break; + } + + _context7.prev = 6; + _context7.next = 9; + return _this6.save({ + sourceEventType: "save" + }); + + case 9: + _context7.next = 13; + break; + + case 11: + _context7.prev = 11; + _context7.t0 = _context7["catch"](6); + + case 13: + promises = []; + promises.push(_this6.pdfLoadingTask.destroy()); + _this6.pdfLoadingTask = null; + + if (_this6.pdfDocument) { + _this6.pdfDocument = null; + + _this6.pdfThumbnailViewer.setDocument(null); + + _this6.pdfViewer.setDocument(null); + + _this6.pdfLinkService.setDocument(null); + + _this6.pdfDocumentProperties.setDocument(null); + } + + webViewerResetPermissions(); + _this6.pdfLinkService.externalLinkEnabled = true; + _this6._fellback = false; + _this6.store = null; + _this6.isInitialViewSet = false; + _this6.downloadComplete = false; + _this6.url = ""; + _this6.baseUrl = ""; + _this6.documentInfo = null; + _this6.metadata = null; + _this6._contentDispositionFilename = null; + _this6._contentLength = null; + _this6._saveInProgress = false; + + _this6._cancelIdleCallbacks(); + + promises.push(_this6.pdfScriptingManager.destroyPromise); + + _this6.pdfSidebar.reset(); + + _this6.pdfOutlineViewer.reset(); + + _this6.pdfAttachmentViewer.reset(); + + _this6.pdfLayerViewer.reset(); + + if (_this6.pdfHistory) { + _this6.pdfHistory.reset(); + } + + if (_this6.findBar) { + _this6.findBar.reset(); + } + + _this6.toolbar.reset(); + + _this6.secondaryToolbar.reset(); + + if (typeof PDFBug !== "undefined") { + PDFBug.cleanup(); + } + + _context7.next = 43; + return Promise.all(promises); + + case 43: + case "end": + return _context7.stop(); + } + } + }, _callee7, null, [[6, 11]]); + }))(); + }, + open: function open(file, args) { + var _this7 = this; + + return _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee8() { + var workerParameters, key, parameters, apiParameters, _key, value, _key2, loadingTask; + + return _regenerator["default"].wrap(function _callee8$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + if (!_this7.pdfLoadingTask) { + _context8.next = 3; + break; + } + + _context8.next = 3; + return _this7.close(); + + case 3: + workerParameters = _app_options.AppOptions.getAll(_app_options.OptionKind.WORKER); + + for (key in workerParameters) { + _pdfjsLib.GlobalWorkerOptions[key] = workerParameters[key]; + } + + parameters = Object.create(null); + + if (typeof file === "string") { + _this7.setTitleUsingUrl(file); + + parameters.url = file; + } else if (file && "byteLength" in file) { + parameters.data = file; + } else if (file.url && file.originalUrl) { + _this7.setTitleUsingUrl(file.originalUrl); + + parameters.url = file.url; + } + + apiParameters = _app_options.AppOptions.getAll(_app_options.OptionKind.API); + + for (_key in apiParameters) { + value = apiParameters[_key]; + + if (_key === "docBaseUrl" && !value) {} + + parameters[_key] = value; + } + + if (args) { + for (_key2 in args) { + parameters[_key2] = args[_key2]; + } + } + + loadingTask = (0, _pdfjsLib.getDocument)(parameters); + _this7.pdfLoadingTask = loadingTask; + + loadingTask.onPassword = function (updateCallback, reason) { + _this7.pdfLinkService.externalLinkEnabled = false; + + _this7.passwordPrompt.setUpdateCallback(updateCallback, reason); + + _this7.passwordPrompt.open(); + }; + + loadingTask.onProgress = function (_ref) { + var loaded = _ref.loaded, + total = _ref.total; + + _this7.progress(loaded / total); + }; + + loadingTask.onUnsupportedFeature = _this7.fallback.bind(_this7); + return _context8.abrupt("return", loadingTask.promise.then(function (pdfDocument) { + _this7.load(pdfDocument); + }, function (exception) { + if (loadingTask !== _this7.pdfLoadingTask) { + return undefined; + } + + var key = "loading_error"; + + if (exception instanceof _pdfjsLib.InvalidPDFException) { + key = "invalid_file_error"; + } else if (exception instanceof _pdfjsLib.MissingPDFException) { + key = "missing_file_error"; + } else if (exception instanceof _pdfjsLib.UnexpectedResponseException) { + key = "unexpected_response_error"; + } + + return _this7.l10n.get(key).then(function (msg) { + _this7._documentError(msg, { + message: exception === null || exception === void 0 ? void 0 : exception.message + }); + + throw exception; + }); + })); + + case 16: + case "end": + return _context8.stop(); + } + } + }, _callee8); + }))(); + }, + _ensureDownloadComplete: function _ensureDownloadComplete() { + if (this.pdfDocument && this.downloadComplete) { + return; + } + + throw new Error("PDF document not downloaded."); + }, + download: function download() { + var _arguments = arguments, + _this8 = this; + + return _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee9() { + var _ref2, _ref2$sourceEventType, sourceEventType, url, filename, data, blob; + + return _regenerator["default"].wrap(function _callee9$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + _ref2 = _arguments.length > 0 && _arguments[0] !== undefined ? _arguments[0] : {}, _ref2$sourceEventType = _ref2.sourceEventType, sourceEventType = _ref2$sourceEventType === void 0 ? "download" : _ref2$sourceEventType; + url = _this8.baseUrl, filename = _this8._docFilename; + _context9.prev = 2; + + _this8._ensureDownloadComplete(); + + _context9.next = 6; + return _this8.pdfDocument.getData(); + + case 6: + data = _context9.sent; + blob = new Blob([data], { + type: "application/pdf" + }); + _context9.next = 10; + return _this8.downloadManager.download(blob, url, filename, sourceEventType); + + case 10: + _context9.next = 16; + break; + + case 12: + _context9.prev = 12; + _context9.t0 = _context9["catch"](2); + _context9.next = 16; + return _this8.downloadManager.downloadUrl(url, filename); + + case 16: + case "end": + return _context9.stop(); + } + } + }, _callee9, null, [[2, 12]]); + }))(); + }, + save: function save() { + var _arguments2 = arguments, + _this9 = this; + + return _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee10() { + var _ref3, _ref3$sourceEventType, sourceEventType, url, filename, data, blob; + + return _regenerator["default"].wrap(function _callee10$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + _ref3 = _arguments2.length > 0 && _arguments2[0] !== undefined ? _arguments2[0] : {}, _ref3$sourceEventType = _ref3.sourceEventType, sourceEventType = _ref3$sourceEventType === void 0 ? "download" : _ref3$sourceEventType; + + if (!_this9._saveInProgress) { + _context10.next = 3; + break; + } + + return _context10.abrupt("return"); + + case 3: + _this9._saveInProgress = true; + _context10.next = 6; + return _this9.pdfScriptingManager.dispatchWillSave(); + + case 6: + url = _this9.baseUrl, filename = _this9._docFilename; + _context10.prev = 7; + + _this9._ensureDownloadComplete(); + + _context10.next = 11; + return _this9.pdfDocument.saveDocument(); + + case 11: + data = _context10.sent; + blob = new Blob([data], { + type: "application/pdf" + }); + _context10.next = 15; + return _this9.downloadManager.download(blob, url, filename, sourceEventType); + + case 15: + _context10.next = 21; + break; + + case 17: + _context10.prev = 17; + _context10.t0 = _context10["catch"](7); + _context10.next = 21; + return _this9.download({ + sourceEventType: sourceEventType + }); + + case 21: + _context10.prev = 21; + _context10.next = 24; + return _this9.pdfScriptingManager.dispatchDidSave(); + + case 24: + _this9._saveInProgress = false; + return _context10.finish(21); + + case 26: + case "end": + return _context10.stop(); + } + } + }, _callee10, null, [[7, 17, 21, 26]]); + }))(); + }, + downloadOrSave: function downloadOrSave(options) { + var _this$pdfDocument; + + if (((_this$pdfDocument = this.pdfDocument) === null || _this$pdfDocument === void 0 ? void 0 : _this$pdfDocument.annotationStorage.size) > 0) { + this.save(options); + } else { + this.download(options); + } + }, + fallback: function fallback(featureId) { + var _this10 = this; + + this.externalServices.reportTelemetry({ + type: "unsupportedFeature", + featureId: featureId + }); + + if (this._fellback) { + return; + } + + this._fellback = true; + this.externalServices.fallback({ + featureId: featureId, + url: this.baseUrl + }).then(function (download) { + if (!download) { + return; + } + + _this10.download({ + sourceEventType: "download" + }); + }); + }, + _documentError: function _documentError(message) { + var moreInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + + this._unblockDocumentLoadEvent(); + + this._otherError(message, moreInfo); + }, + _otherError: function _otherError(message) { + var moreInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + var moreInfoText = [this.l10n.get("error_version_info", { + version: _pdfjsLib.version || "?", + build: _pdfjsLib.build || "?" + })]; + + if (moreInfo) { + moreInfoText.push(this.l10n.get("error_message", { + message: moreInfo.message + })); + + if (moreInfo.stack) { + moreInfoText.push(this.l10n.get("error_stack", { + stack: moreInfo.stack + })); + } else { + if (moreInfo.filename) { + moreInfoText.push(this.l10n.get("error_file", { + file: moreInfo.filename + })); + } + + if (moreInfo.lineNumber) { + moreInfoText.push(this.l10n.get("error_line", { + line: moreInfo.lineNumber + })); + } + } + } + + var errorWrapperConfig = this.appConfig.errorWrapper; + var errorWrapper = errorWrapperConfig.container; + errorWrapper.hidden = false; + var errorMessage = errorWrapperConfig.errorMessage; + errorMessage.textContent = message; + var closeButton = errorWrapperConfig.closeButton; + + closeButton.onclick = function () { + errorWrapper.hidden = true; + }; + + var errorMoreInfo = errorWrapperConfig.errorMoreInfo; + var moreInfoButton = errorWrapperConfig.moreInfoButton; + var lessInfoButton = errorWrapperConfig.lessInfoButton; + + moreInfoButton.onclick = function () { + errorMoreInfo.hidden = false; + moreInfoButton.hidden = true; + lessInfoButton.hidden = false; + errorMoreInfo.style.height = errorMoreInfo.scrollHeight + "px"; + }; + + lessInfoButton.onclick = function () { + errorMoreInfo.hidden = true; + moreInfoButton.hidden = false; + lessInfoButton.hidden = true; + }; + + moreInfoButton.oncontextmenu = _ui_utils.noContextMenuHandler; + lessInfoButton.oncontextmenu = _ui_utils.noContextMenuHandler; + closeButton.oncontextmenu = _ui_utils.noContextMenuHandler; + moreInfoButton.hidden = false; + lessInfoButton.hidden = true; + Promise.all(moreInfoText).then(function (parts) { + errorMoreInfo.value = parts.join("\n"); + }); + }, + progress: function progress(level) { + var _this11 = this; + + if (this.downloadComplete) { + return; + } + + var percent = Math.round(level * 100); + + if (percent > this.loadingBar.percent || isNaN(percent)) { + this.loadingBar.percent = percent; + var disableAutoFetch = this.pdfDocument ? this.pdfDocument.loadingParams.disableAutoFetch : _app_options.AppOptions.get("disableAutoFetch"); + + if (disableAutoFetch && percent) { + if (this.disableAutoFetchLoadingBarTimeout) { + clearTimeout(this.disableAutoFetchLoadingBarTimeout); + this.disableAutoFetchLoadingBarTimeout = null; + } + + this.loadingBar.show(); + this.disableAutoFetchLoadingBarTimeout = setTimeout(function () { + _this11.loadingBar.hide(); + + _this11.disableAutoFetchLoadingBarTimeout = null; + }, DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT); + } + } + }, + load: function load(pdfDocument) { + var _this12 = this; + + this.pdfDocument = pdfDocument; + pdfDocument.getDownloadInfo().then(function (_ref4) { + var length = _ref4.length; + _this12._contentLength = length; + _this12.downloadComplete = true; + + _this12.loadingBar.hide(); + + firstPagePromise.then(function () { + _this12.eventBus.dispatch("documentloaded", { + source: _this12 + }); + }); + }); + var pageLayoutPromise = pdfDocument.getPageLayout()["catch"](function () {}); + var pageModePromise = pdfDocument.getPageMode()["catch"](function () {}); + var openActionPromise = pdfDocument.getOpenAction()["catch"](function () {}); + this.toolbar.setPagesCount(pdfDocument.numPages, false); + this.secondaryToolbar.setPagesCount(pdfDocument.numPages); + var baseDocumentUrl; + baseDocumentUrl = null; + this.pdfLinkService.setDocument(pdfDocument, baseDocumentUrl); + this.pdfDocumentProperties.setDocument(pdfDocument, this.url); + var pdfViewer = this.pdfViewer; + pdfViewer.setDocument(pdfDocument); + var firstPagePromise = pdfViewer.firstPagePromise, + onePageRendered = pdfViewer.onePageRendered, + pagesPromise = pdfViewer.pagesPromise; + var pdfThumbnailViewer = this.pdfThumbnailViewer; + pdfThumbnailViewer.setDocument(pdfDocument); + var storedPromise = (this.store = new _view_history.ViewHistory(pdfDocument.fingerprints[0])).getMultiple({ + page: null, + zoom: _ui_utils.DEFAULT_SCALE_VALUE, + scrollLeft: "0", + scrollTop: "0", + rotation: null, + sidebarView: _ui_utils.SidebarView.UNKNOWN, + scrollMode: _ui_utils.ScrollMode.UNKNOWN, + spreadMode: _ui_utils.SpreadMode.UNKNOWN + })["catch"](function () { + return Object.create(null); + }); + firstPagePromise.then(function (pdfPage) { + _this12.loadingBar.setWidth(_this12.appConfig.viewerContainer); + + _this12._initializeAnnotationStorageCallbacks(pdfDocument); + + Promise.all([_ui_utils.animationStarted, storedPromise, pageLayoutPromise, pageModePromise, openActionPromise]).then( /*#__PURE__*/function () { + var _ref6 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee11(_ref5) { + var _ref7, timeStamp, stored, pageLayout, pageMode, openAction, viewOnLoad, initialBookmark, zoom, hash, rotation, sidebarView, scrollMode, spreadMode; + + return _regenerator["default"].wrap(function _callee11$(_context11) { + while (1) { + switch (_context11.prev = _context11.next) { + case 0: + _ref7 = _slicedToArray(_ref5, 5), timeStamp = _ref7[0], stored = _ref7[1], pageLayout = _ref7[2], pageMode = _ref7[3], openAction = _ref7[4]; + viewOnLoad = _app_options.AppOptions.get("viewOnLoad"); + + _this12._initializePdfHistory({ + fingerprint: pdfDocument.fingerprints[0], + viewOnLoad: viewOnLoad, + initialDest: openAction === null || openAction === void 0 ? void 0 : openAction.dest + }); + + initialBookmark = _this12.initialBookmark; + zoom = _app_options.AppOptions.get("defaultZoomValue"); + hash = zoom ? "zoom=".concat(zoom) : null; + rotation = null; + sidebarView = _app_options.AppOptions.get("sidebarViewOnLoad"); + scrollMode = _app_options.AppOptions.get("scrollModeOnLoad"); + spreadMode = _app_options.AppOptions.get("spreadModeOnLoad"); + + if (stored.page && viewOnLoad !== ViewOnLoad.INITIAL) { + hash = "page=".concat(stored.page, "&zoom=").concat(zoom || stored.zoom, ",") + "".concat(stored.scrollLeft, ",").concat(stored.scrollTop); + rotation = parseInt(stored.rotation, 10); + + if (sidebarView === _ui_utils.SidebarView.UNKNOWN) { + sidebarView = stored.sidebarView | 0; + } + + if (scrollMode === _ui_utils.ScrollMode.UNKNOWN) { + scrollMode = stored.scrollMode | 0; + } + + if (spreadMode === _ui_utils.SpreadMode.UNKNOWN) { + spreadMode = stored.spreadMode | 0; + } + } + + if (pageMode && sidebarView === _ui_utils.SidebarView.UNKNOWN) { + sidebarView = (0, _ui_utils.apiPageModeToSidebarView)(pageMode); + } + + if (pageLayout && spreadMode === _ui_utils.SpreadMode.UNKNOWN) { + spreadMode = (0, _ui_utils.apiPageLayoutToSpreadMode)(pageLayout); + } + + _this12.setInitialView(hash, { + rotation: rotation, + sidebarView: sidebarView, + scrollMode: scrollMode, + spreadMode: spreadMode + }); + + _this12.eventBus.dispatch("documentinit", { + source: _this12 + }); + + if (!_this12.isViewerEmbedded) { + pdfViewer.focus(); + } + + _this12._initializePermissions(pdfDocument); + + _context11.next = 19; + return Promise.race([pagesPromise, new Promise(function (resolve) { + setTimeout(resolve, FORCE_PAGES_LOADED_TIMEOUT); + })]); + + case 19: + if (!(!initialBookmark && !hash)) { + _context11.next = 21; + break; + } + + return _context11.abrupt("return"); + + case 21: + if (!pdfViewer.hasEqualPageSizes) { + _context11.next = 23; + break; + } + + return _context11.abrupt("return"); + + case 23: + _this12.initialBookmark = initialBookmark; + pdfViewer.currentScaleValue = pdfViewer.currentScaleValue; + + _this12.setInitialView(hash); + + case 26: + case "end": + return _context11.stop(); + } + } + }, _callee11); + })); + + return function (_x2) { + return _ref6.apply(this, arguments); + }; + }())["catch"](function () { + _this12.setInitialView(); + }).then(function () { + pdfViewer.update(); + }); + }); + pagesPromise.then(function () { + _this12._unblockDocumentLoadEvent(); + + _this12._initializeAutoPrint(pdfDocument, openActionPromise); + }); + onePageRendered.then(function () { + pdfDocument.getOutline().then(function (outline) { + if (pdfDocument !== _this12.pdfDocument) { + return; + } + + _this12.pdfOutlineViewer.render({ + outline: outline, + pdfDocument: pdfDocument + }); + }); + pdfDocument.getAttachments().then(function (attachments) { + if (pdfDocument !== _this12.pdfDocument) { + return; + } + + _this12.pdfAttachmentViewer.render({ + attachments: attachments + }); + }); + pdfViewer.optionalContentConfigPromise.then(function (optionalContentConfig) { + if (pdfDocument !== _this12.pdfDocument) { + return; + } + + _this12.pdfLayerViewer.render({ + optionalContentConfig: optionalContentConfig, + pdfDocument: pdfDocument + }); + }); + + if ("requestIdleCallback" in window) { + var callback = window.requestIdleCallback(function () { + _this12._collectTelemetry(pdfDocument); + + _this12._idleCallbacks["delete"](callback); + }, { + timeout: 1000 + }); + + _this12._idleCallbacks.add(callback); + } + }); + + this._initializePageLabels(pdfDocument); + + this._initializeMetadata(pdfDocument); + }, + _scriptingDocProperties: function _scriptingDocProperties(pdfDocument) { + var _this13 = this; + + return _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee12() { + var _this13$metadata, _this13$metadata2; + + return _regenerator["default"].wrap(function _callee12$(_context12) { + while (1) { + switch (_context12.prev = _context12.next) { + case 0: + if (_this13.documentInfo) { + _context12.next = 5; + break; + } + + _context12.next = 3; + return new Promise(function (resolve) { + _this13.eventBus._on("metadataloaded", resolve, { + once: true + }); + }); + + case 3: + if (!(pdfDocument !== _this13.pdfDocument)) { + _context12.next = 5; + break; + } + + return _context12.abrupt("return", null); + + case 5: + if (_this13._contentLength) { + _context12.next = 10; + break; + } + + _context12.next = 8; + return new Promise(function (resolve) { + _this13.eventBus._on("documentloaded", resolve, { + once: true + }); + }); + + case 8: + if (!(pdfDocument !== _this13.pdfDocument)) { + _context12.next = 10; + break; + } + + return _context12.abrupt("return", null); + + case 10: + return _context12.abrupt("return", _objectSpread(_objectSpread({}, _this13.documentInfo), {}, { + baseURL: _this13.baseUrl, + filesize: _this13._contentLength, + filename: _this13._docFilename, + metadata: (_this13$metadata = _this13.metadata) === null || _this13$metadata === void 0 ? void 0 : _this13$metadata.getRaw(), + authors: (_this13$metadata2 = _this13.metadata) === null || _this13$metadata2 === void 0 ? void 0 : _this13$metadata2.get("dc:creator"), + numPages: _this13.pagesCount, + URL: _this13.url + })); + + case 11: + case "end": + return _context12.stop(); + } + } + }, _callee12); + }))(); + }, + _collectTelemetry: function _collectTelemetry(pdfDocument) { + var _this14 = this; + + return _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee13() { + var markInfo, tagged; + return _regenerator["default"].wrap(function _callee13$(_context13) { + while (1) { + switch (_context13.prev = _context13.next) { + case 0: + _context13.next = 2; + return _this14.pdfDocument.getMarkInfo(); + + case 2: + markInfo = _context13.sent; + + if (!(pdfDocument !== _this14.pdfDocument)) { + _context13.next = 5; + break; + } + + return _context13.abrupt("return"); + + case 5: + tagged = (markInfo === null || markInfo === void 0 ? void 0 : markInfo.Marked) || false; + + _this14.externalServices.reportTelemetry({ + type: "tagged", + tagged: tagged + }); + + case 7: + case "end": + return _context13.stop(); + } + } + }, _callee13); + }))(); + }, + _initializeAutoPrint: function _initializeAutoPrint(pdfDocument, openActionPromise) { + var _this15 = this; + + return _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee14() { + var _yield$Promise$all, _yield$Promise$all2, openAction, javaScript, triggerAutoPrint, _iterator2, _step2, js; + + return _regenerator["default"].wrap(function _callee14$(_context14) { + while (1) { + switch (_context14.prev = _context14.next) { + case 0: + _context14.next = 2; + return Promise.all([openActionPromise, !_this15.pdfViewer.enableScripting ? pdfDocument.getJavaScript() : null]); + + case 2: + _yield$Promise$all = _context14.sent; + _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 2); + openAction = _yield$Promise$all2[0]; + javaScript = _yield$Promise$all2[1]; + + if (!(pdfDocument !== _this15.pdfDocument)) { + _context14.next = 8; + break; + } + + return _context14.abrupt("return"); + + case 8: + triggerAutoPrint = false; + + if ((openAction === null || openAction === void 0 ? void 0 : openAction.action) === "Print") { + triggerAutoPrint = true; + } + + if (!javaScript) { + _context14.next = 31; + break; + } + + javaScript.some(function (js) { + if (!js) { + return false; + } + + console.warn("Warning: JavaScript support is not enabled"); + + _this15.fallback(_pdfjsLib.UNSUPPORTED_FEATURES.javaScript); + + return true; + }); + + if (triggerAutoPrint) { + _context14.next = 31; + break; + } + + _iterator2 = _createForOfIteratorHelper(javaScript); + _context14.prev = 14; + + _iterator2.s(); + + case 16: + if ((_step2 = _iterator2.n()).done) { + _context14.next = 23; + break; + } + + js = _step2.value; + + if (!(js && _ui_utils.AutoPrintRegExp.test(js))) { + _context14.next = 21; + break; + } + + triggerAutoPrint = true; + return _context14.abrupt("break", 23); + + case 21: + _context14.next = 16; + break; + + case 23: + _context14.next = 28; + break; + + case 25: + _context14.prev = 25; + _context14.t0 = _context14["catch"](14); + + _iterator2.e(_context14.t0); + + case 28: + _context14.prev = 28; + + _iterator2.f(); + + return _context14.finish(28); + + case 31: + if (triggerAutoPrint) { + _this15.triggerPrinting(); + } + + case 32: + case "end": + return _context14.stop(); + } + } + }, _callee14, null, [[14, 25, 28, 31]]); + }))(); + }, + _initializeMetadata: function _initializeMetadata(pdfDocument) { + var _this16 = this; + + return _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee15() { + var _this16$_contentDispo, _this16$_contentLengt; + + var _yield$pdfDocument$ge, info, metadata, contentDispositionFilename, contentLength, pdfTitle, metadataTitle, versionId, generatorId, producer, formType; + + return _regenerator["default"].wrap(function _callee15$(_context15) { + while (1) { + switch (_context15.prev = _context15.next) { + case 0: + _context15.next = 2; + return pdfDocument.getMetadata(); + + case 2: + _yield$pdfDocument$ge = _context15.sent; + info = _yield$pdfDocument$ge.info; + metadata = _yield$pdfDocument$ge.metadata; + contentDispositionFilename = _yield$pdfDocument$ge.contentDispositionFilename; + contentLength = _yield$pdfDocument$ge.contentLength; + + if (!(pdfDocument !== _this16.pdfDocument)) { + _context15.next = 9; + break; + } + + return _context15.abrupt("return"); + + case 9: + _this16.documentInfo = info; + _this16.metadata = metadata; + (_this16$_contentDispo = _this16._contentDispositionFilename) !== null && _this16$_contentDispo !== void 0 ? _this16$_contentDispo : _this16._contentDispositionFilename = contentDispositionFilename; + (_this16$_contentLengt = _this16._contentLength) !== null && _this16$_contentLengt !== void 0 ? _this16$_contentLengt : _this16._contentLength = contentLength; + console.log("PDF ".concat(pdfDocument.fingerprints[0], " [").concat(info.PDFFormatVersion, " ") + "".concat((info.Producer || "-").trim(), " / ").concat((info.Creator || "-").trim(), "] ") + "(PDF.js: ".concat(_pdfjsLib.version || "-", ")")); + pdfTitle = info === null || info === void 0 ? void 0 : info.Title; + metadataTitle = metadata === null || metadata === void 0 ? void 0 : metadata.get("dc:title"); + + if (metadataTitle) { + if (metadataTitle !== "Untitled" && !/[\uFFF0-\uFFFF]/g.test(metadataTitle)) { + pdfTitle = metadataTitle; + } + } + + if (pdfTitle) { + _this16.setTitle("".concat(pdfTitle, " - ").concat(contentDispositionFilename || document.title)); + } else if (contentDispositionFilename) { + _this16.setTitle(contentDispositionFilename); + } + + if (info.IsXFAPresent && !info.IsAcroFormPresent && !pdfDocument.isPureXfa) { + console.warn("Warning: XFA support is not enabled"); + + _this16.fallback(_pdfjsLib.UNSUPPORTED_FEATURES.forms); + } else if ((info.IsAcroFormPresent || info.IsXFAPresent) && !_this16.pdfViewer.renderInteractiveForms) { + console.warn("Warning: Interactive form support is not enabled"); + + _this16.fallback(_pdfjsLib.UNSUPPORTED_FEATURES.forms); + } + + if (info.IsSignaturesPresent) { + console.warn("Warning: Digital signatures validation is not supported"); + + _this16.fallback(_pdfjsLib.UNSUPPORTED_FEATURES.signatures); + } + + versionId = "other"; + + if (KNOWN_VERSIONS.includes(info.PDFFormatVersion)) { + versionId = "v".concat(info.PDFFormatVersion.replace(".", "_")); + } + + generatorId = "other"; + + if (info.Producer) { + producer = info.Producer.toLowerCase(); + KNOWN_GENERATORS.some(function (generator) { + if (!producer.includes(generator)) { + return false; + } + + generatorId = generator.replace(/[ .-]/g, "_"); + return true; + }); + } + + formType = null; + + if (info.IsXFAPresent) { + formType = "xfa"; + } else if (info.IsAcroFormPresent) { + formType = "acroform"; + } + + _this16.externalServices.reportTelemetry({ + type: "documentInfo", + version: versionId, + generator: generatorId, + formType: formType + }); + + _this16.eventBus.dispatch("metadataloaded", { + source: _this16 + }); + + case 28: + case "end": + return _context15.stop(); + } + } + }, _callee15); + }))(); + }, + _initializePageLabels: function _initializePageLabels(pdfDocument) { + var _this17 = this; + + return _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee16() { + var labels, numLabels, i, pdfViewer, pdfThumbnailViewer, toolbar; + return _regenerator["default"].wrap(function _callee16$(_context16) { + while (1) { + switch (_context16.prev = _context16.next) { + case 0: + _context16.next = 2; + return pdfDocument.getPageLabels(); + + case 2: + labels = _context16.sent; + + if (!(pdfDocument !== _this17.pdfDocument)) { + _context16.next = 5; + break; + } + + return _context16.abrupt("return"); + + case 5: + if (!(!labels || _app_options.AppOptions.get("disablePageLabels"))) { + _context16.next = 7; + break; + } + + return _context16.abrupt("return"); + + case 7: + numLabels = labels.length; + + if (!(numLabels !== _this17.pagesCount)) { + _context16.next = 11; + break; + } + + console.error("The number of Page Labels does not match the number of pages in the document."); + return _context16.abrupt("return"); + + case 11: + i = 0; + + while (i < numLabels && labels[i] === (i + 1).toString()) { + i++; + } + + if (!(i === numLabels)) { + _context16.next = 15; + break; + } + + return _context16.abrupt("return"); + + case 15: + pdfViewer = _this17.pdfViewer, pdfThumbnailViewer = _this17.pdfThumbnailViewer, toolbar = _this17.toolbar; + pdfViewer.setPageLabels(labels); + pdfThumbnailViewer.setPageLabels(labels); + toolbar.setPagesCount(numLabels, true); + toolbar.setPageNumber(pdfViewer.currentPageNumber, pdfViewer.currentPageLabel); + + case 20: + case "end": + return _context16.stop(); + } + } + }, _callee16); + }))(); + }, + _initializePdfHistory: function _initializePdfHistory(_ref8) { + var fingerprint = _ref8.fingerprint, + viewOnLoad = _ref8.viewOnLoad, + _ref8$initialDest = _ref8.initialDest, + initialDest = _ref8$initialDest === void 0 ? null : _ref8$initialDest; + + if (this.isViewerEmbedded || _app_options.AppOptions.get("disableHistory")) { + return; + } + + this.pdfHistory.initialize({ + fingerprint: fingerprint, + resetHistory: viewOnLoad === ViewOnLoad.INITIAL, + updateUrl: _app_options.AppOptions.get("historyUpdateUrl") + }); + + if (this.pdfHistory.initialBookmark) { + this.initialBookmark = this.pdfHistory.initialBookmark; + this.initialRotation = this.pdfHistory.initialRotation; + } + + if (initialDest && !this.initialBookmark && viewOnLoad === ViewOnLoad.UNKNOWN) { + this.initialBookmark = JSON.stringify(initialDest); + this.pdfHistory.push({ + explicitDest: initialDest, + pageNumber: null + }); + } + }, + _initializePermissions: function _initializePermissions(pdfDocument) { + var _this18 = this; + + return _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee17() { + var permissions; + return _regenerator["default"].wrap(function _callee17$(_context17) { + while (1) { + switch (_context17.prev = _context17.next) { + case 0: + _context17.next = 2; + return pdfDocument.getPermissions(); + + case 2: + permissions = _context17.sent; + + if (!(pdfDocument !== _this18.pdfDocument)) { + _context17.next = 5; + break; + } + + return _context17.abrupt("return"); + + case 5: + if (!(!permissions || !_app_options.AppOptions.get("enablePermissions"))) { + _context17.next = 7; + break; + } + + return _context17.abrupt("return"); + + case 7: + if (!permissions.includes(_pdfjsLib.PermissionFlag.COPY)) { + _this18.appConfig.viewerContainer.classList.add(ENABLE_PERMISSIONS_CLASS); + } + + case 8: + case "end": + return _context17.stop(); + } + } + }, _callee17); + }))(); + }, + _initializeAnnotationStorageCallbacks: function _initializeAnnotationStorageCallbacks(pdfDocument) { + var _this19 = this; + + if (pdfDocument !== this.pdfDocument) { + return; + } + + var annotationStorage = pdfDocument.annotationStorage; + + annotationStorage.onSetModified = function () { + window.addEventListener("beforeunload", beforeUnload); + _this19._annotationStorageModified = true; + }; + + annotationStorage.onResetModified = function () { + window.removeEventListener("beforeunload", beforeUnload); + delete _this19._annotationStorageModified; + }; + }, + setInitialView: function setInitialView(storedHash) { + var _this20 = this; + + var _ref9 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + rotation = _ref9.rotation, + sidebarView = _ref9.sidebarView, + scrollMode = _ref9.scrollMode, + spreadMode = _ref9.spreadMode; + + var setRotation = function setRotation(angle) { + if ((0, _ui_utils.isValidRotation)(angle)) { + _this20.pdfViewer.pagesRotation = angle; + } + }; + + var setViewerModes = function setViewerModes(scroll, spread) { + if ((0, _ui_utils.isValidScrollMode)(scroll)) { + _this20.pdfViewer.scrollMode = scroll; + } + + if ((0, _ui_utils.isValidSpreadMode)(spread)) { + _this20.pdfViewer.spreadMode = spread; + } + }; + + this.isInitialViewSet = true; + this.pdfSidebar.setInitialView(sidebarView); + setViewerModes(scrollMode, spreadMode); + + if (this.initialBookmark) { + setRotation(this.initialRotation); + delete this.initialRotation; + this.pdfLinkService.setHash(this.initialBookmark); + this.initialBookmark = null; + } else if (storedHash) { + setRotation(rotation); + this.pdfLinkService.setHash(storedHash); + } + + this.toolbar.setPageNumber(this.pdfViewer.currentPageNumber, this.pdfViewer.currentPageLabel); + this.secondaryToolbar.setPageNumber(this.pdfViewer.currentPageNumber); + + if (!this.pdfViewer.currentScaleValue) { + this.pdfViewer.currentScaleValue = _ui_utils.DEFAULT_SCALE_VALUE; + } + }, + _cleanup: function _cleanup() { + if (!this.pdfDocument) { + return; + } + + this.pdfViewer.cleanup(); + this.pdfThumbnailViewer.cleanup(); + this.pdfDocument.cleanup(this.pdfViewer.renderer === _ui_utils.RendererType.SVG); + }, + forceRendering: function forceRendering() { + this.pdfRenderingQueue.printing = !!this.printService; + this.pdfRenderingQueue.isThumbnailViewEnabled = this.pdfSidebar.isThumbnailViewVisible; + this.pdfRenderingQueue.renderHighestPriority(); + }, + beforePrint: function beforePrint() { + var _this21 = this; + + this.pdfScriptingManager.dispatchWillPrint(); + + if (this.printService) { + return; + } + + if (!this.supportsPrinting) { + this.l10n.get("printing_not_supported").then(function (msg) { + _this21._otherError(msg); + }); + return; + } + + if (!this.pdfViewer.pageViewsReady) { + this.l10n.get("printing_not_ready").then(function (msg) { + window.alert(msg); + }); + return; + } + + var pagesOverview = this.pdfViewer.getPagesOverview(); + var printContainer = this.appConfig.printContainer; + + var printResolution = _app_options.AppOptions.get("printResolution"); + + var optionalContentConfigPromise = this.pdfViewer.optionalContentConfigPromise; + var printService = PDFPrintServiceFactory.instance.createPrintService(this.pdfDocument, pagesOverview, printContainer, printResolution, optionalContentConfigPromise, this.l10n); + this.printService = printService; + this.forceRendering(); + printService.layout(); + this.externalServices.reportTelemetry({ + type: "print" + }); + }, + afterPrint: function afterPrint() { + this.pdfScriptingManager.dispatchDidPrint(); + + if (this.printService) { + this.printService.destroy(); + this.printService = null; + + if (this.pdfDocument) { + this.pdfDocument.annotationStorage.resetModified(); + } + } + + this.forceRendering(); + }, + rotatePages: function rotatePages(delta) { + this.pdfViewer.pagesRotation += delta; + }, + requestPresentationMode: function requestPresentationMode() { + if (!this.pdfPresentationMode) { + return; + } + + this.pdfPresentationMode.request(); + }, + triggerPrinting: function triggerPrinting() { + if (!this.supportsPrinting) { + return; + } + + window.print(); + }, + bindEvents: function bindEvents() { + var eventBus = this.eventBus, + _boundEvents = this._boundEvents; + _boundEvents.beforePrint = this.beforePrint.bind(this); + _boundEvents.afterPrint = this.afterPrint.bind(this); + + eventBus._on("resize", webViewerResize); + + eventBus._on("hashchange", webViewerHashchange); + + eventBus._on("beforeprint", _boundEvents.beforePrint); + + eventBus._on("afterprint", _boundEvents.afterPrint); + + eventBus._on("pagerendered", webViewerPageRendered); + + eventBus._on("updateviewarea", webViewerUpdateViewarea); + + eventBus._on("pagechanging", webViewerPageChanging); + + eventBus._on("scalechanging", webViewerScaleChanging); + + eventBus._on("rotationchanging", webViewerRotationChanging); + + eventBus._on("sidebarviewchanged", webViewerSidebarViewChanged); + + eventBus._on("pagemode", webViewerPageMode); + + eventBus._on("namedaction", webViewerNamedAction); + + eventBus._on("presentationmodechanged", webViewerPresentationModeChanged); + + eventBus._on("presentationmode", webViewerPresentationMode); + + eventBus._on("print", webViewerPrint); + + eventBus._on("download", webViewerDownload); + + eventBus._on("save", webViewerSave); + + eventBus._on("firstpage", webViewerFirstPage); + + eventBus._on("lastpage", webViewerLastPage); + + eventBus._on("nextpage", webViewerNextPage); + + eventBus._on("previouspage", webViewerPreviousPage); + + eventBus._on("zoomin", webViewerZoomIn); + + eventBus._on("zoomout", webViewerZoomOut); + + eventBus._on("zoomreset", webViewerZoomReset); + + eventBus._on("pagenumberchanged", webViewerPageNumberChanged); + + eventBus._on("scalechanged", webViewerScaleChanged); + + eventBus._on("rotatecw", webViewerRotateCw); + + eventBus._on("rotateccw", webViewerRotateCcw); + + eventBus._on("optionalcontentconfig", webViewerOptionalContentConfig); + + eventBus._on("switchscrollmode", webViewerSwitchScrollMode); + + eventBus._on("scrollmodechanged", webViewerScrollModeChanged); + + eventBus._on("switchspreadmode", webViewerSwitchSpreadMode); + + eventBus._on("spreadmodechanged", webViewerSpreadModeChanged); + + eventBus._on("documentproperties", webViewerDocumentProperties); + + eventBus._on("find", webViewerFind); + + eventBus._on("findfromurlhash", webViewerFindFromUrlHash); + + eventBus._on("updatefindmatchescount", webViewerUpdateFindMatchesCount); + + eventBus._on("updatefindcontrolstate", webViewerUpdateFindControlState); + + if (_app_options.AppOptions.get("pdfBug")) { + _boundEvents.reportPageStatsPDFBug = reportPageStatsPDFBug; + + eventBus._on("pagerendered", _boundEvents.reportPageStatsPDFBug); + + eventBus._on("pagechanging", _boundEvents.reportPageStatsPDFBug); + } + + eventBus._on("fileinputchange", webViewerFileInputChange); + + eventBus._on("openfile", webViewerOpenFile); + }, + bindWindowEvents: function bindWindowEvents() { + var eventBus = this.eventBus, + _boundEvents = this._boundEvents; + + _boundEvents.windowResize = function () { + eventBus.dispatch("resize", { + source: window + }); + }; + + _boundEvents.windowHashChange = function () { + eventBus.dispatch("hashchange", { + source: window, + hash: document.location.hash.substring(1) + }); + }; + + _boundEvents.windowBeforePrint = function () { + eventBus.dispatch("beforeprint", { + source: window + }); + }; + + _boundEvents.windowAfterPrint = function () { + eventBus.dispatch("afterprint", { + source: window + }); + }; + + _boundEvents.windowUpdateFromSandbox = function (event) { + eventBus.dispatch("updatefromsandbox", { + source: window, + detail: event.detail + }); + }; + + window.addEventListener("visibilitychange", webViewerVisibilityChange); + window.addEventListener("wheel", webViewerWheel, { + passive: false + }); + window.addEventListener("touchstart", webViewerTouchStart, { + passive: false + }); + window.addEventListener("click", webViewerClick); + window.addEventListener("keydown", webViewerKeyDown); + window.addEventListener("resize", _boundEvents.windowResize); + window.addEventListener("hashchange", _boundEvents.windowHashChange); + window.addEventListener("beforeprint", _boundEvents.windowBeforePrint); + window.addEventListener("afterprint", _boundEvents.windowAfterPrint); + window.addEventListener("updatefromsandbox", _boundEvents.windowUpdateFromSandbox); + }, + unbindEvents: function unbindEvents() { + var eventBus = this.eventBus, + _boundEvents = this._boundEvents; + + eventBus._off("resize", webViewerResize); + + eventBus._off("hashchange", webViewerHashchange); + + eventBus._off("beforeprint", _boundEvents.beforePrint); + + eventBus._off("afterprint", _boundEvents.afterPrint); + + eventBus._off("pagerendered", webViewerPageRendered); + + eventBus._off("updateviewarea", webViewerUpdateViewarea); + + eventBus._off("pagechanging", webViewerPageChanging); + + eventBus._off("scalechanging", webViewerScaleChanging); + + eventBus._off("rotationchanging", webViewerRotationChanging); + + eventBus._off("sidebarviewchanged", webViewerSidebarViewChanged); + + eventBus._off("pagemode", webViewerPageMode); + + eventBus._off("namedaction", webViewerNamedAction); + + eventBus._off("presentationmodechanged", webViewerPresentationModeChanged); + + eventBus._off("presentationmode", webViewerPresentationMode); + + eventBus._off("print", webViewerPrint); + + eventBus._off("download", webViewerDownload); + + eventBus._off("save", webViewerSave); + + eventBus._off("firstpage", webViewerFirstPage); + + eventBus._off("lastpage", webViewerLastPage); + + eventBus._off("nextpage", webViewerNextPage); + + eventBus._off("previouspage", webViewerPreviousPage); + + eventBus._off("zoomin", webViewerZoomIn); + + eventBus._off("zoomout", webViewerZoomOut); + + eventBus._off("zoomreset", webViewerZoomReset); + + eventBus._off("pagenumberchanged", webViewerPageNumberChanged); + + eventBus._off("scalechanged", webViewerScaleChanged); + + eventBus._off("rotatecw", webViewerRotateCw); + + eventBus._off("rotateccw", webViewerRotateCcw); + + eventBus._off("optionalcontentconfig", webViewerOptionalContentConfig); + + eventBus._off("switchscrollmode", webViewerSwitchScrollMode); + + eventBus._off("scrollmodechanged", webViewerScrollModeChanged); + + eventBus._off("switchspreadmode", webViewerSwitchSpreadMode); + + eventBus._off("spreadmodechanged", webViewerSpreadModeChanged); + + eventBus._off("documentproperties", webViewerDocumentProperties); + + eventBus._off("find", webViewerFind); + + eventBus._off("findfromurlhash", webViewerFindFromUrlHash); + + eventBus._off("updatefindmatchescount", webViewerUpdateFindMatchesCount); + + eventBus._off("updatefindcontrolstate", webViewerUpdateFindControlState); + + if (_boundEvents.reportPageStatsPDFBug) { + eventBus._off("pagerendered", _boundEvents.reportPageStatsPDFBug); + + eventBus._off("pagechanging", _boundEvents.reportPageStatsPDFBug); + + _boundEvents.reportPageStatsPDFBug = null; + } + + eventBus._off("fileinputchange", webViewerFileInputChange); + + eventBus._off("openfile", webViewerOpenFile); + + _boundEvents.beforePrint = null; + _boundEvents.afterPrint = null; + }, + unbindWindowEvents: function unbindWindowEvents() { + var _boundEvents = this._boundEvents; + window.removeEventListener("visibilitychange", webViewerVisibilityChange); + window.removeEventListener("wheel", webViewerWheel, { + passive: false + }); + window.removeEventListener("touchstart", webViewerTouchStart, { + passive: false + }); + window.removeEventListener("click", webViewerClick); + window.removeEventListener("keydown", webViewerKeyDown); + window.removeEventListener("resize", _boundEvents.windowResize); + window.removeEventListener("hashchange", _boundEvents.windowHashChange); + window.removeEventListener("beforeprint", _boundEvents.windowBeforePrint); + window.removeEventListener("afterprint", _boundEvents.windowAfterPrint); + window.removeEventListener("updatefromsandbox", _boundEvents.windowUpdateFromSandbox); + _boundEvents.windowResize = null; + _boundEvents.windowHashChange = null; + _boundEvents.windowBeforePrint = null; + _boundEvents.windowAfterPrint = null; + _boundEvents.windowUpdateFromSandbox = null; + }, + accumulateWheelTicks: function accumulateWheelTicks(ticks) { + if (this._wheelUnusedTicks > 0 && ticks < 0 || this._wheelUnusedTicks < 0 && ticks > 0) { + this._wheelUnusedTicks = 0; + } + + this._wheelUnusedTicks += ticks; + var wholeTicks = Math.sign(this._wheelUnusedTicks) * Math.floor(Math.abs(this._wheelUnusedTicks)); + this._wheelUnusedTicks -= wholeTicks; + return wholeTicks; + }, + _unblockDocumentLoadEvent: function _unblockDocumentLoadEvent() { + if (document.blockUnblockOnload) { + document.blockUnblockOnload(false); + } + + this._unblockDocumentLoadEvent = function () {}; + }, + + get scriptingReady() { + return this.pdfScriptingManager.ready; + } + +}; +exports.PDFViewerApplication = PDFViewerApplication; +var validateFileURL; +{ + var HOSTED_VIEWER_ORIGINS = ["null", "http://mozilla.github.io", "https://mozilla.github.io"]; + + validateFileURL = function validateFileURL(file) { + if (file === undefined) { + return; + } + + try { + var viewerOrigin = new URL(window.location.href).origin || "null"; + + if (HOSTED_VIEWER_ORIGINS.includes(viewerOrigin)) { + return; + } + + var _URL = new URL(file, window.location.href), + origin = _URL.origin, + protocol = _URL.protocol; + + if (origin !== viewerOrigin && protocol !== "blob:") { + throw new Error("file origin does not match viewer's"); + } + } catch (ex) { + PDFViewerApplication.l10n.get("loading_error").then(function (msg) { + PDFViewerApplication._documentError(msg, { + message: ex === null || ex === void 0 ? void 0 : ex.message + }); + }); + throw ex; + } + }; +} + +function loadFakeWorker() { + return _loadFakeWorker.apply(this, arguments); +} + +function _loadFakeWorker() { + _loadFakeWorker = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee18() { + return _regenerator["default"].wrap(function _callee18$(_context18) { + while (1) { + switch (_context18.prev = _context18.next) { + case 0: + if (!_pdfjsLib.GlobalWorkerOptions.workerSrc) { + _pdfjsLib.GlobalWorkerOptions.workerSrc = _app_options.AppOptions.get("workerSrc"); + } + + return _context18.abrupt("return", (0, _pdfjsLib.loadScript)(_pdfjsLib.PDFWorker.getWorkerSrc())); + + case 2: + case "end": + return _context18.stop(); + } + } + }, _callee18); + })); + return _loadFakeWorker.apply(this, arguments); +} + +function loadAndEnablePDFBug(enabledTabs) { + var appConfig = PDFViewerApplication.appConfig; + return (0, _pdfjsLib.loadScript)(appConfig.debuggerScriptPath).then(function () { + PDFBug.enable(enabledTabs); + PDFBug.init({ + OPS: _pdfjsLib.OPS + }, appConfig.mainContainer); + }); +} + +function reportPageStatsPDFBug(_ref10) { + var _pageView$pdfPage; + + var pageNumber = _ref10.pageNumber; + + if (typeof Stats === "undefined" || !Stats.enabled) { + return; + } + + var pageView = PDFViewerApplication.pdfViewer.getPageView(pageNumber - 1); + var pageStats = pageView === null || pageView === void 0 ? void 0 : (_pageView$pdfPage = pageView.pdfPage) === null || _pageView$pdfPage === void 0 ? void 0 : _pageView$pdfPage.stats; + + if (!pageStats) { + return; + } + + Stats.add(pageNumber, pageStats); +} + +function webViewerInitialized() { + var appConfig = PDFViewerApplication.appConfig; + var file; + var queryString = document.location.search.substring(1); + var params = (0, _ui_utils.parseQueryString)(queryString); + file = "file" in params ? params.file : _app_options.AppOptions.get("defaultUrl"); + validateFileURL(file); + var fileInput = document.createElement("input"); + fileInput.id = appConfig.openFileInputName; + fileInput.className = "fileInput"; + fileInput.setAttribute("type", "file"); + fileInput.oncontextmenu = _ui_utils.noContextMenuHandler; + document.body.appendChild(fileInput); + + if (!window.File || !window.FileReader || !window.FileList || !window.Blob) { + appConfig.toolbar.openFile.hidden = true; + appConfig.secondaryToolbar.openFileButton.hidden = true; + } else { + fileInput.value = null; + } + + fileInput.addEventListener("change", function (evt) { + var files = evt.target.files; + + if (!files || files.length === 0) { + return; + } + + PDFViewerApplication.eventBus.dispatch("fileinputchange", { + source: this, + fileInput: evt.target + }); + }); + appConfig.mainContainer.addEventListener("dragover", function (evt) { + evt.preventDefault(); + evt.dataTransfer.dropEffect = "move"; + }); + appConfig.mainContainer.addEventListener("drop", function (evt) { + evt.preventDefault(); + var files = evt.dataTransfer.files; + + if (!files || files.length === 0) { + return; + } + + PDFViewerApplication.eventBus.dispatch("fileinputchange", { + source: this, + fileInput: evt.dataTransfer + }); + }); + + if (!PDFViewerApplication.supportsDocumentFonts) { + _app_options.AppOptions.set("disableFontFace", true); + + PDFViewerApplication.l10n.get("web_fonts_disabled").then(function (msg) { + console.warn(msg); + }); + } + + if (!PDFViewerApplication.supportsPrinting) { + appConfig.toolbar.print.classList.add("hidden"); + appConfig.secondaryToolbar.printButton.classList.add("hidden"); + } + + if (!PDFViewerApplication.supportsFullscreen) { + appConfig.toolbar.presentationModeButton.classList.add("hidden"); + appConfig.secondaryToolbar.presentationModeButton.classList.add("hidden"); + } + + if (PDFViewerApplication.supportsIntegratedFind) { + appConfig.toolbar.viewFind.classList.add("hidden"); + } + + appConfig.mainContainer.addEventListener("transitionend", function (evt) { + if (evt.target === this) { + PDFViewerApplication.eventBus.dispatch("resize", { + source: this + }); + } + }, true); + + try { + webViewerOpenFileViaURL(file); + } catch (reason) { + PDFViewerApplication.l10n.get("loading_error").then(function (msg) { + PDFViewerApplication._documentError(msg, reason); + }); + } +} + +function webViewerOpenFileViaURL(file) { + if (file) { + PDFViewerApplication.open(file); + } +} + +function webViewerResetPermissions() { + var appConfig = PDFViewerApplication.appConfig; + + if (!appConfig) { + return; + } + + appConfig.viewerContainer.classList.remove(ENABLE_PERMISSIONS_CLASS); +} + +function webViewerPageRendered(_ref11) { + var pageNumber = _ref11.pageNumber, + timestamp = _ref11.timestamp, + error = _ref11.error; + + if (pageNumber === PDFViewerApplication.page) { + PDFViewerApplication.toolbar.updateLoadingIndicatorState(false); + } + + if (PDFViewerApplication.pdfSidebar.isThumbnailViewVisible) { + var pageView = PDFViewerApplication.pdfViewer.getPageView(pageNumber - 1); + var thumbnailView = PDFViewerApplication.pdfThumbnailViewer.getThumbnail(pageNumber - 1); + + if (pageView && thumbnailView) { + thumbnailView.setImage(pageView); + } + } + + if (error) { + PDFViewerApplication.l10n.get("rendering_error").then(function (msg) { + PDFViewerApplication._otherError(msg, error); + }); + } + + PDFViewerApplication.externalServices.reportTelemetry({ + type: "pageInfo", + timestamp: timestamp + }); + PDFViewerApplication.pdfDocument.getStats().then(function (stats) { + PDFViewerApplication.externalServices.reportTelemetry({ + type: "documentStats", + stats: stats + }); + }); +} + +function webViewerPageMode(_ref12) { + var mode = _ref12.mode; + var view; + + switch (mode) { + case "thumbs": + view = _ui_utils.SidebarView.THUMBS; + break; + + case "bookmarks": + case "outline": + view = _ui_utils.SidebarView.OUTLINE; + break; + + case "attachments": + view = _ui_utils.SidebarView.ATTACHMENTS; + break; + + case "layers": + view = _ui_utils.SidebarView.LAYERS; + break; + + case "none": + view = _ui_utils.SidebarView.NONE; + break; + + default: + console.error('Invalid "pagemode" hash parameter: ' + mode); + return; + } + + PDFViewerApplication.pdfSidebar.switchView(view, true); +} + +function webViewerNamedAction(evt) { + switch (evt.action) { + case "GoToPage": + PDFViewerApplication.appConfig.toolbar.pageNumber.select(); + break; + + case "Find": + if (!PDFViewerApplication.supportsIntegratedFind) { + PDFViewerApplication.findBar.toggle(); + } + + break; + + case "Print": + PDFViewerApplication.triggerPrinting(); + break; + + case "SaveAs": + webViewerSave(); + break; + } +} + +function webViewerPresentationModeChanged(evt) { + PDFViewerApplication.pdfViewer.presentationModeState = evt.state; +} + +function webViewerSidebarViewChanged(evt) { + PDFViewerApplication.pdfRenderingQueue.isThumbnailViewEnabled = PDFViewerApplication.pdfSidebar.isThumbnailViewVisible; + var store = PDFViewerApplication.store; + + if (store && PDFViewerApplication.isInitialViewSet) { + store.set("sidebarView", evt.view)["catch"](function () {}); + } +} + +function webViewerUpdateViewarea(evt) { + var location = evt.location, + store = PDFViewerApplication.store; + + if (store && PDFViewerApplication.isInitialViewSet) { + store.setMultiple({ + page: location.pageNumber, + zoom: location.scale, + scrollLeft: location.left, + scrollTop: location.top, + rotation: location.rotation + })["catch"](function () {}); + } + + var href = PDFViewerApplication.pdfLinkService.getAnchorUrl(location.pdfOpenParams); + PDFViewerApplication.appConfig.toolbar.viewBookmark.href = href; + PDFViewerApplication.appConfig.secondaryToolbar.viewBookmarkButton.href = href; + var currentPage = PDFViewerApplication.pdfViewer.getPageView(PDFViewerApplication.page - 1); + var loading = (currentPage === null || currentPage === void 0 ? void 0 : currentPage.renderingState) !== _pdf_rendering_queue.RenderingStates.FINISHED; + PDFViewerApplication.toolbar.updateLoadingIndicatorState(loading); +} + +function webViewerScrollModeChanged(evt) { + var store = PDFViewerApplication.store; + + if (store && PDFViewerApplication.isInitialViewSet) { + store.set("scrollMode", evt.mode)["catch"](function () {}); + } +} + +function webViewerSpreadModeChanged(evt) { + var store = PDFViewerApplication.store; + + if (store && PDFViewerApplication.isInitialViewSet) { + store.set("spreadMode", evt.mode)["catch"](function () {}); + } +} + +function webViewerResize() { + var pdfDocument = PDFViewerApplication.pdfDocument, + pdfViewer = PDFViewerApplication.pdfViewer; + + if (!pdfDocument) { + return; + } + + var currentScaleValue = pdfViewer.currentScaleValue; + + if (currentScaleValue === "auto" || currentScaleValue === "page-fit" || currentScaleValue === "page-width") { + pdfViewer.currentScaleValue = currentScaleValue; + } + + pdfViewer.update(); +} + +function webViewerHashchange(evt) { + var hash = evt.hash; + + if (!hash) { + return; + } + + if (!PDFViewerApplication.isInitialViewSet) { + PDFViewerApplication.initialBookmark = hash; + } else if (!PDFViewerApplication.pdfHistory.popStateInProgress) { + PDFViewerApplication.pdfLinkService.setHash(hash); + } +} + +var webViewerFileInputChange, webViewerOpenFile; +{ + webViewerFileInputChange = function webViewerFileInputChange(evt) { + var _PDFViewerApplication; + + if ((_PDFViewerApplication = PDFViewerApplication.pdfViewer) !== null && _PDFViewerApplication !== void 0 && _PDFViewerApplication.isInPresentationMode) { + return; + } + + var file = evt.fileInput.files[0]; + + if (!_viewer_compatibility.viewerCompatibilityParams.disableCreateObjectURL) { + var url = URL.createObjectURL(file); + + if (file.name) { + url = { + url: url, + originalUrl: file.name + }; + } + + PDFViewerApplication.open(url); + } else { + PDFViewerApplication.setTitleUsingUrl(file.name); + var fileReader = new FileReader(); + + fileReader.onload = function webViewerChangeFileReaderOnload(event) { + var buffer = event.target.result; + PDFViewerApplication.open(new Uint8Array(buffer)); + }; + + fileReader.readAsArrayBuffer(file); + } + + var appConfig = PDFViewerApplication.appConfig; + appConfig.toolbar.viewBookmark.hidden = true; + appConfig.secondaryToolbar.viewBookmarkButton.hidden = true; + appConfig.toolbar.download.hidden = true; + appConfig.secondaryToolbar.downloadButton.hidden = true; + }; + + webViewerOpenFile = function webViewerOpenFile(evt) { + var openFileInputName = PDFViewerApplication.appConfig.openFileInputName; + document.getElementById(openFileInputName).click(); + }; +} + +function webViewerPresentationMode() { + PDFViewerApplication.requestPresentationMode(); +} + +function webViewerPrint() { + PDFViewerApplication.triggerPrinting(); +} + +function webViewerDownload() { + PDFViewerApplication.downloadOrSave({ + sourceEventType: "download" + }); +} + +function webViewerSave() { + PDFViewerApplication.downloadOrSave({ + sourceEventType: "save" + }); +} + +function webViewerFirstPage() { + if (PDFViewerApplication.pdfDocument) { + PDFViewerApplication.page = 1; + } +} + +function webViewerLastPage() { + if (PDFViewerApplication.pdfDocument) { + PDFViewerApplication.page = PDFViewerApplication.pagesCount; + } +} + +function webViewerNextPage() { + PDFViewerApplication.pdfViewer.nextPage(); +} + +function webViewerPreviousPage() { + PDFViewerApplication.pdfViewer.previousPage(); +} + +function webViewerZoomIn() { + PDFViewerApplication.zoomIn(); +} + +function webViewerZoomOut() { + PDFViewerApplication.zoomOut(); +} + +function webViewerZoomReset() { + PDFViewerApplication.zoomReset(); +} + +function webViewerPageNumberChanged(evt) { + var pdfViewer = PDFViewerApplication.pdfViewer; + + if (evt.value !== "") { + PDFViewerApplication.pdfLinkService.goToPage(evt.value); + } + + if (evt.value !== pdfViewer.currentPageNumber.toString() && evt.value !== pdfViewer.currentPageLabel) { + PDFViewerApplication.toolbar.setPageNumber(pdfViewer.currentPageNumber, pdfViewer.currentPageLabel); + } +} + +function webViewerScaleChanged(evt) { + PDFViewerApplication.pdfViewer.currentScaleValue = evt.value; +} + +function webViewerRotateCw() { + PDFViewerApplication.rotatePages(90); +} + +function webViewerRotateCcw() { + PDFViewerApplication.rotatePages(-90); +} + +function webViewerOptionalContentConfig(evt) { + PDFViewerApplication.pdfViewer.optionalContentConfigPromise = evt.promise; +} + +function webViewerSwitchScrollMode(evt) { + PDFViewerApplication.pdfViewer.scrollMode = evt.mode; +} + +function webViewerSwitchSpreadMode(evt) { + PDFViewerApplication.pdfViewer.spreadMode = evt.mode; +} + +function webViewerDocumentProperties() { + PDFViewerApplication.pdfDocumentProperties.open(); +} + +function webViewerFind(evt) { + PDFViewerApplication.findController.executeCommand("find" + evt.type, { + query: evt.query, + phraseSearch: evt.phraseSearch, + caseSensitive: evt.caseSensitive, + entireWord: evt.entireWord, + highlightAll: evt.highlightAll, + findPrevious: evt.findPrevious + }); +} + +function webViewerFindFromUrlHash(evt) { + PDFViewerApplication.findController.executeCommand("find", { + query: evt.query, + phraseSearch: evt.phraseSearch, + caseSensitive: false, + entireWord: false, + highlightAll: true, + findPrevious: false + }); +} + +function webViewerUpdateFindMatchesCount(_ref13) { + var matchesCount = _ref13.matchesCount; + + if (PDFViewerApplication.supportsIntegratedFind) { + PDFViewerApplication.externalServices.updateFindMatchesCount(matchesCount); + } else { + PDFViewerApplication.findBar.updateResultsCount(matchesCount); + } +} + +function webViewerUpdateFindControlState(_ref14) { + var state = _ref14.state, + previous = _ref14.previous, + matchesCount = _ref14.matchesCount, + rawQuery = _ref14.rawQuery; + + if (PDFViewerApplication.supportsIntegratedFind) { + PDFViewerApplication.externalServices.updateFindControlState({ + result: state, + findPrevious: previous, + matchesCount: matchesCount, + rawQuery: rawQuery + }); + } else { + PDFViewerApplication.findBar.updateUIState(state, previous, matchesCount); + } +} + +function webViewerScaleChanging(evt) { + PDFViewerApplication.toolbar.setPageScale(evt.presetValue, evt.scale); + PDFViewerApplication.pdfViewer.update(); +} + +function webViewerRotationChanging(evt) { + PDFViewerApplication.pdfThumbnailViewer.pagesRotation = evt.pagesRotation; + PDFViewerApplication.forceRendering(); + PDFViewerApplication.pdfViewer.currentPageNumber = evt.pageNumber; +} + +function webViewerPageChanging(_ref15) { + var pageNumber = _ref15.pageNumber, + pageLabel = _ref15.pageLabel; + PDFViewerApplication.toolbar.setPageNumber(pageNumber, pageLabel); + PDFViewerApplication.secondaryToolbar.setPageNumber(pageNumber); + + if (PDFViewerApplication.pdfSidebar.isThumbnailViewVisible) { + PDFViewerApplication.pdfThumbnailViewer.scrollThumbnailIntoView(pageNumber); + } +} + +function webViewerVisibilityChange(evt) { + if (document.visibilityState === "visible") { + setZoomDisabledTimeout(); + } +} + +var zoomDisabledTimeout = null; + +function setZoomDisabledTimeout() { + if (zoomDisabledTimeout) { + clearTimeout(zoomDisabledTimeout); + } + + zoomDisabledTimeout = setTimeout(function () { + zoomDisabledTimeout = null; + }, WHEEL_ZOOM_DISABLED_TIMEOUT); +} + +function webViewerWheel(evt) { + var pdfViewer = PDFViewerApplication.pdfViewer, + supportedMouseWheelZoomModifierKeys = PDFViewerApplication.supportedMouseWheelZoomModifierKeys; + + if (pdfViewer.isInPresentationMode) { + return; + } + + if (evt.ctrlKey && supportedMouseWheelZoomModifierKeys.ctrlKey || evt.metaKey && supportedMouseWheelZoomModifierKeys.metaKey) { + evt.preventDefault(); + + if (zoomDisabledTimeout || document.visibilityState === "hidden") { + return; + } + + var previousScale = pdfViewer.currentScale; + var delta = (0, _ui_utils.normalizeWheelEventDirection)(evt); + var ticks = 0; + + if (evt.deltaMode === WheelEvent.DOM_DELTA_LINE || evt.deltaMode === WheelEvent.DOM_DELTA_PAGE) { + if (Math.abs(delta) >= 1) { + ticks = Math.sign(delta); + } else { + ticks = PDFViewerApplication.accumulateWheelTicks(delta); + } + } else { + var PIXELS_PER_LINE_SCALE = 30; + ticks = PDFViewerApplication.accumulateWheelTicks(delta / PIXELS_PER_LINE_SCALE); + } + + if (ticks < 0) { + PDFViewerApplication.zoomOut(-ticks); + } else if (ticks > 0) { + PDFViewerApplication.zoomIn(ticks); + } + + var currentScale = pdfViewer.currentScale; + + if (previousScale !== currentScale) { + var scaleCorrectionFactor = currentScale / previousScale - 1; + var rect = pdfViewer.container.getBoundingClientRect(); + var dx = evt.clientX - rect.left; + var dy = evt.clientY - rect.top; + pdfViewer.container.scrollLeft += dx * scaleCorrectionFactor; + pdfViewer.container.scrollTop += dy * scaleCorrectionFactor; + } + } else { + setZoomDisabledTimeout(); + } +} + +function webViewerTouchStart(evt) { + if (evt.touches.length > 1) { + evt.preventDefault(); + } +} + +function webViewerClick(evt) { + if (!PDFViewerApplication.secondaryToolbar.isOpen) { + return; + } + + var appConfig = PDFViewerApplication.appConfig; + + if (PDFViewerApplication.pdfViewer.containsElement(evt.target) || appConfig.toolbar.container.contains(evt.target) && evt.target !== appConfig.secondaryToolbar.toggleButton) { + PDFViewerApplication.secondaryToolbar.close(); + } +} + +function webViewerKeyDown(evt) { + if (PDFViewerApplication.overlayManager.active) { + return; + } + + var handled = false, + ensureViewerFocused = false; + var cmd = (evt.ctrlKey ? 1 : 0) | (evt.altKey ? 2 : 0) | (evt.shiftKey ? 4 : 0) | (evt.metaKey ? 8 : 0); + var pdfViewer = PDFViewerApplication.pdfViewer; + var isViewerInPresentationMode = pdfViewer === null || pdfViewer === void 0 ? void 0 : pdfViewer.isInPresentationMode; + + if (cmd === 1 || cmd === 8 || cmd === 5 || cmd === 12) { + switch (evt.keyCode) { + case 70: + if (!PDFViewerApplication.supportsIntegratedFind && !evt.shiftKey) { + PDFViewerApplication.findBar.open(); + handled = true; + } + + break; + + case 71: + if (!PDFViewerApplication.supportsIntegratedFind) { + var findState = PDFViewerApplication.findController.state; + + if (findState) { + PDFViewerApplication.findController.executeCommand("findagain", { + query: findState.query, + phraseSearch: findState.phraseSearch, + caseSensitive: findState.caseSensitive, + entireWord: findState.entireWord, + highlightAll: findState.highlightAll, + findPrevious: cmd === 5 || cmd === 12 + }); + } + + handled = true; + } + + break; + + case 61: + case 107: + case 187: + case 171: + if (!isViewerInPresentationMode) { + PDFViewerApplication.zoomIn(); + } + + handled = true; + break; + + case 173: + case 109: + case 189: + if (!isViewerInPresentationMode) { + PDFViewerApplication.zoomOut(); + } + + handled = true; + break; + + case 48: + case 96: + if (!isViewerInPresentationMode) { + setTimeout(function () { + PDFViewerApplication.zoomReset(); + }); + handled = false; + } + + break; + + case 38: + if (isViewerInPresentationMode || PDFViewerApplication.page > 1) { + PDFViewerApplication.page = 1; + handled = true; + ensureViewerFocused = true; + } + + break; + + case 40: + if (isViewerInPresentationMode || PDFViewerApplication.page < PDFViewerApplication.pagesCount) { + PDFViewerApplication.page = PDFViewerApplication.pagesCount; + handled = true; + ensureViewerFocused = true; + } + + break; + } + } + + var eventBus = PDFViewerApplication.eventBus; + + if (cmd === 1 || cmd === 8) { + switch (evt.keyCode) { + case 83: + eventBus.dispatch("download", { + source: window + }); + handled = true; + break; + + case 79: + { + eventBus.dispatch("openfile", { + source: window + }); + handled = true; + } + break; + } + } + + if (cmd === 3 || cmd === 10) { + switch (evt.keyCode) { + case 80: + PDFViewerApplication.requestPresentationMode(); + handled = true; + break; + + case 71: + PDFViewerApplication.appConfig.toolbar.pageNumber.select(); + handled = true; + break; + } + } + + if (handled) { + if (ensureViewerFocused && !isViewerInPresentationMode) { + pdfViewer.focus(); + } + + evt.preventDefault(); + return; + } + + var curElement = (0, _ui_utils.getActiveOrFocusedElement)(); + var curElementTagName = curElement === null || curElement === void 0 ? void 0 : curElement.tagName.toUpperCase(); + + if (curElementTagName === "INPUT" || curElementTagName === "TEXTAREA" || curElementTagName === "SELECT" || curElement !== null && curElement !== void 0 && curElement.isContentEditable) { + if (evt.keyCode !== 27) { + return; + } + } + + if (cmd === 0) { + var turnPage = 0, + turnOnlyIfPageFit = false; + + switch (evt.keyCode) { + case 38: + case 33: + if (pdfViewer.isVerticalScrollbarEnabled) { + turnOnlyIfPageFit = true; + } + + turnPage = -1; + break; + + case 8: + if (!isViewerInPresentationMode) { + turnOnlyIfPageFit = true; + } + + turnPage = -1; + break; + + case 37: + if (pdfViewer.isHorizontalScrollbarEnabled) { + turnOnlyIfPageFit = true; + } + + case 75: + case 80: + turnPage = -1; + break; + + case 27: + if (PDFViewerApplication.secondaryToolbar.isOpen) { + PDFViewerApplication.secondaryToolbar.close(); + handled = true; + } + + if (!PDFViewerApplication.supportsIntegratedFind && PDFViewerApplication.findBar.opened) { + PDFViewerApplication.findBar.close(); + handled = true; + } + + break; + + case 40: + case 34: + if (pdfViewer.isVerticalScrollbarEnabled) { + turnOnlyIfPageFit = true; + } + + turnPage = 1; + break; + + case 13: + case 32: + if (!isViewerInPresentationMode) { + turnOnlyIfPageFit = true; + } + + turnPage = 1; + break; + + case 39: + if (pdfViewer.isHorizontalScrollbarEnabled) { + turnOnlyIfPageFit = true; + } + + case 74: + case 78: + turnPage = 1; + break; + + case 36: + if (isViewerInPresentationMode || PDFViewerApplication.page > 1) { + PDFViewerApplication.page = 1; + handled = true; + ensureViewerFocused = true; + } + + break; + + case 35: + if (isViewerInPresentationMode || PDFViewerApplication.page < PDFViewerApplication.pagesCount) { + PDFViewerApplication.page = PDFViewerApplication.pagesCount; + handled = true; + ensureViewerFocused = true; + } + + break; + + case 83: + PDFViewerApplication.pdfCursorTools.switchTool(_pdf_cursor_tools.CursorTool.SELECT); + break; + + case 72: + PDFViewerApplication.pdfCursorTools.switchTool(_pdf_cursor_tools.CursorTool.HAND); + break; + + case 82: + PDFViewerApplication.rotatePages(90); + break; + + case 115: + PDFViewerApplication.pdfSidebar.toggle(); + break; + } + + if (turnPage !== 0 && (!turnOnlyIfPageFit || pdfViewer.currentScaleValue === "page-fit")) { + if (turnPage > 0) { + pdfViewer.nextPage(); + } else { + pdfViewer.previousPage(); + } + + handled = true; + } + } + + if (cmd === 4) { + switch (evt.keyCode) { + case 13: + case 32: + if (!isViewerInPresentationMode && pdfViewer.currentScaleValue !== "page-fit") { + break; + } + + if (PDFViewerApplication.page > 1) { + PDFViewerApplication.page--; + } + + handled = true; + break; + + case 82: + PDFViewerApplication.rotatePages(-90); + break; + } + } + + if (!handled && !isViewerInPresentationMode) { + if (evt.keyCode >= 33 && evt.keyCode <= 40 || evt.keyCode === 32 && curElementTagName !== "BUTTON") { + ensureViewerFocused = true; + } + } + + if (ensureViewerFocused && !pdfViewer.containsElement(curElement)) { + pdfViewer.focus(); + } + + if (handled) { + evt.preventDefault(); + } +} + +function beforeUnload(evt) { + evt.preventDefault(); + evt.returnValue = ""; + return false; +} + +var PDFPrintServiceFactory = { + instance: { + supportsPrinting: false, + createPrintService: function createPrintService() { + throw new Error("Not implemented: createPrintService"); + } + } +}; +exports.PDFPrintServiceFactory = PDFPrintServiceFactory; + +/***/ }), +/* 4 */ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + + + +module.exports = __webpack_require__(5); + +/***/ }), +/* 5 */ +/***/ ((module, __unused_webpack_exports, __webpack_require__) => { + +/* module decorator */ module = __webpack_require__.nmd(module); + + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +var runtime = function (exports) { + "use strict"; + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + function define(obj, key, value) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true + }); + return obj[key]; + } + + try { + define({}, ""); + } catch (err) { + define = function define(obj, key, value) { + return obj[key] = value; + }; + } + + function wrap(innerFn, outerFn, self, tryLocsList) { + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + generator._invoke = makeInvokeMethod(innerFn, self, context); + return generator; + } + + exports.wrap = wrap; + + function tryCatch(fn, obj, arg) { + try { + return { + type: "normal", + arg: fn.call(obj, arg) + }; + } catch (err) { + return { + type: "throw", + arg: err + }; + } + } + + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; + var ContinueSentinel = {}; + + function Generator() {} + + function GeneratorFunction() {} + + function GeneratorFunctionPrototype() {} + + var IteratorPrototype = {}; + define(IteratorPrototype, iteratorSymbol, function () { + return this; + }); + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + + if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = GeneratorFunctionPrototype; + define(Gp, "constructor", GeneratorFunctionPrototype); + define(GeneratorFunctionPrototype, "constructor", GeneratorFunction); + GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"); + + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function (method) { + define(prototype, method, function (arg) { + return this._invoke(method, arg); + }); + }); + } + + exports.isGeneratorFunction = function (genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor ? ctor === GeneratorFunction || (ctor.displayName || ctor.name) === "GeneratorFunction" : false; + }; + + exports.mark = function (genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + define(genFun, toStringTagSymbol, "GeneratorFunction"); + } + + genFun.prototype = Object.create(Gp); + return genFun; + }; + + exports.awrap = function (arg) { + return { + __await: arg + }; + }; + + function AsyncIterator(generator, PromiseImpl) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + + if (value && _typeof(value) === "object" && hasOwn.call(value, "__await")) { + return PromiseImpl.resolve(value.__await).then(function (value) { + invoke("next", value, resolve, reject); + }, function (err) { + invoke("throw", err, resolve, reject); + }); + } + + return PromiseImpl.resolve(value).then(function (unwrapped) { + result.value = unwrapped; + resolve(result); + }, function (error) { + return invoke("throw", error, resolve, reject); + }); + } + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new PromiseImpl(function (resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); + } + + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + define(AsyncIterator.prototype, asyncIteratorSymbol, function () { + return this; + }); + exports.AsyncIterator = AsyncIterator; + + exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { + if (PromiseImpl === void 0) PromiseImpl = Promise; + var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); + return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } + + if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; + } + + return doneResult(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === "next") { + context.sent = context._sent = context.arg; + } else if (context.method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + } else if (context.method === "return") { + context.abrupt("return", context.arg); + } + + state = GenStateExecuting; + var record = tryCatch(innerFn, self, context); + + if (record.type === "normal") { + state = context.done ? GenStateCompleted : GenStateSuspendedYield; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done + }; + } else if (record.type === "throw") { + state = GenStateCompleted; + context.method = "throw"; + context.arg = record.arg; + } + } + }; + } + + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + + if (method === undefined) { + context.delegate = null; + + if (context.method === "throw") { + if (delegate.iterator["return"]) { + context.method = "return"; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + + if (context.method === "throw") { + return ContinueSentinel; + } + } + + context.method = "throw"; + context.arg = new TypeError("The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === "throw") { + context.method = "throw"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (!info) { + context.method = "throw"; + context.arg = new TypeError("iterator result is not an object"); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + context[delegate.resultName] = info.value; + context.next = delegate.nextLoc; + + if (context.method !== "return") { + context.method = "next"; + context.arg = undefined; + } + } else { + return info; + } + + context.delegate = null; + return ContinueSentinel; + } + + defineIteratorMethods(Gp); + define(Gp, toStringTagSymbol, "Generator"); + define(Gp, iteratorSymbol, function () { + return this; + }); + define(Gp, "toString", function () { + return "[object Generator]"; + }); + + function pushTryEntry(locs) { + var entry = { + tryLoc: locs[0] + }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + this.tryEntries = [{ + tryLoc: "root" + }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + exports.keys = function (object) { + var keys = []; + + for (var key in object) { + keys.push(key); + } + + keys.reverse(); + return function next() { + while (keys.length) { + var key = keys.pop(); + + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === "function") { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, + next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + return next; + }; + + return next.next = next; + } + } + + return { + next: doneResult + }; + } + + exports.values = values; + + function doneResult() { + return { + value: undefined, + done: true + }; + } + + Context.prototype = { + constructor: Context, + reset: function reset(skipTempReset) { + this.prev = 0; + this.next = 0; + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + this.method = "next"; + this.arg = undefined; + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + stop: function stop() { + this.done = true; + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + + return this.rval; + }, + dispatchException: function dispatchException(exception) { + if (this.done) { + throw exception; + } + + var context = this; + + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + + if (caught) { + context.method = "next"; + context.arg = undefined; + } + + return !!caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === "root") { + return handle("end"); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, + abrupt: function abrupt(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + + if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.method = "next"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + complete: function complete(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } + + if (record.type === "break" || record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = this.arg = record.arg; + this.method = "return"; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + finish: function finish(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + "catch": function _catch(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + + return thrown; + } + } + + throw new Error("illegal catch attempt"); + }, + delegateYield: function delegateYield(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + + if (this.method === "next") { + this.arg = undefined; + } + + return ContinueSentinel; + } + }; + return exports; +}(( false ? 0 : _typeof(module)) === "object" ? module.exports : {}); + +try { + regeneratorRuntime = runtime; +} catch (accidentalStrictMode) { + if ((typeof globalThis === "undefined" ? "undefined" : _typeof(globalThis)) === "object") { + globalThis.regeneratorRuntime = runtime; + } else { + Function("r", "regeneratorRuntime = r")(runtime); + } +} + +/***/ }), +/* 6 */ +/***/ ((__unused_webpack_module, exports) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.apiPageLayoutToSpreadMode = apiPageLayoutToSpreadMode; +exports.apiPageModeToSidebarView = apiPageModeToSidebarView; +exports.approximateFraction = approximateFraction; +exports.backtrackBeforeAllVisibleElements = backtrackBeforeAllVisibleElements; +exports.binarySearchFirstItem = binarySearchFirstItem; +exports.getActiveOrFocusedElement = getActiveOrFocusedElement; +exports.getOutputScale = getOutputScale; +exports.getPageSizeInches = getPageSizeInches; +exports.getVisibleElements = getVisibleElements; +exports.isPortraitOrientation = isPortraitOrientation; +exports.isValidRotation = isValidRotation; +exports.isValidScrollMode = isValidScrollMode; +exports.isValidSpreadMode = isValidSpreadMode; +exports.moveToEndOfArray = moveToEndOfArray; +exports.noContextMenuHandler = noContextMenuHandler; +exports.normalizeWheelEventDelta = normalizeWheelEventDelta; +exports.normalizeWheelEventDirection = normalizeWheelEventDirection; +exports.parseQueryString = parseQueryString; +exports.roundToDivide = roundToDivide; +exports.scrollIntoView = scrollIntoView; +exports.waitOnEventOrTimeout = waitOnEventOrTimeout; +exports.watchScroll = watchScroll; +exports.WaitOnType = exports.VERTICAL_PADDING = exports.UNKNOWN_SCALE = exports.TextLayerMode = exports.SpreadMode = exports.SidebarView = exports.ScrollMode = exports.SCROLLBAR_PADDING = exports.RendererType = exports.ProgressBar = exports.PresentationModeState = exports.MIN_SCALE = exports.MAX_SCALE = exports.MAX_AUTO_SCALE = exports.EventBus = exports.DEFAULT_SCALE_VALUE = exports.DEFAULT_SCALE = exports.CSS_UNITS = exports.AutoPrintRegExp = exports.animationStarted = void 0; + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +var CSS_UNITS = 96.0 / 72.0; +exports.CSS_UNITS = CSS_UNITS; +var DEFAULT_SCALE_VALUE = "auto"; +exports.DEFAULT_SCALE_VALUE = DEFAULT_SCALE_VALUE; +var DEFAULT_SCALE = 1.0; +exports.DEFAULT_SCALE = DEFAULT_SCALE; +var MIN_SCALE = 0.1; +exports.MIN_SCALE = MIN_SCALE; +var MAX_SCALE = 10.0; +exports.MAX_SCALE = MAX_SCALE; +var UNKNOWN_SCALE = 0; +exports.UNKNOWN_SCALE = UNKNOWN_SCALE; +var MAX_AUTO_SCALE = 1.25; +exports.MAX_AUTO_SCALE = MAX_AUTO_SCALE; +var SCROLLBAR_PADDING = 40; +exports.SCROLLBAR_PADDING = SCROLLBAR_PADDING; +var VERTICAL_PADDING = 5; +exports.VERTICAL_PADDING = VERTICAL_PADDING; +var LOADINGBAR_END_OFFSET_VAR = "--loadingBar-end-offset"; +var PresentationModeState = { + UNKNOWN: 0, + NORMAL: 1, + CHANGING: 2, + FULLSCREEN: 3 +}; +exports.PresentationModeState = PresentationModeState; +var SidebarView = { + UNKNOWN: -1, + NONE: 0, + THUMBS: 1, + OUTLINE: 2, + ATTACHMENTS: 3, + LAYERS: 4 +}; +exports.SidebarView = SidebarView; +var RendererType = { + CANVAS: "canvas", + SVG: "svg" +}; +exports.RendererType = RendererType; +var TextLayerMode = { + DISABLE: 0, + ENABLE: 1, + ENABLE_ENHANCE: 2 +}; +exports.TextLayerMode = TextLayerMode; +var ScrollMode = { + UNKNOWN: -1, + VERTICAL: 0, + HORIZONTAL: 1, + WRAPPED: 2 +}; +exports.ScrollMode = ScrollMode; +var SpreadMode = { + UNKNOWN: -1, + NONE: 0, + ODD: 1, + EVEN: 2 +}; +exports.SpreadMode = SpreadMode; +var AutoPrintRegExp = /\bprint\s*\(/; +exports.AutoPrintRegExp = AutoPrintRegExp; + +function getOutputScale(ctx) { + var devicePixelRatio = window.devicePixelRatio || 1; + var backingStoreRatio = ctx.webkitBackingStorePixelRatio || ctx.mozBackingStorePixelRatio || ctx.backingStorePixelRatio || 1; + var pixelRatio = devicePixelRatio / backingStoreRatio; + return { + sx: pixelRatio, + sy: pixelRatio, + scaled: pixelRatio !== 1 + }; +} + +function scrollIntoView(element, spot) { + var scrollMatches = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var parent = element.offsetParent; + + if (!parent) { + console.error("offsetParent is not set -- cannot scroll"); + return; + } + + var offsetY = element.offsetTop + element.clientTop; + var offsetX = element.offsetLeft + element.clientLeft; + + while (parent.clientHeight === parent.scrollHeight && parent.clientWidth === parent.scrollWidth || scrollMatches && (parent.classList.contains("markedContent") || getComputedStyle(parent).overflow === "hidden")) { + offsetY += parent.offsetTop; + offsetX += parent.offsetLeft; + parent = parent.offsetParent; + + if (!parent) { + return; + } + } + + if (spot) { + if (spot.top !== undefined) { + offsetY += spot.top; + } + + if (spot.left !== undefined) { + offsetX += spot.left; + parent.scrollLeft = offsetX; + } + } + + parent.scrollTop = offsetY; +} + +function watchScroll(viewAreaElement, callback) { + var debounceScroll = function debounceScroll(evt) { + if (rAF) { + return; + } + + rAF = window.requestAnimationFrame(function viewAreaElementScrolled() { + rAF = null; + var currentX = viewAreaElement.scrollLeft; + var lastX = state.lastX; + + if (currentX !== lastX) { + state.right = currentX > lastX; + } + + state.lastX = currentX; + var currentY = viewAreaElement.scrollTop; + var lastY = state.lastY; + + if (currentY !== lastY) { + state.down = currentY > lastY; + } + + state.lastY = currentY; + callback(state); + }); + }; + + var state = { + right: true, + down: true, + lastX: viewAreaElement.scrollLeft, + lastY: viewAreaElement.scrollTop, + _eventHandler: debounceScroll + }; + var rAF = null; + viewAreaElement.addEventListener("scroll", debounceScroll, true); + return state; +} + +function parseQueryString(query) { + var parts = query.split("&"); + var params = Object.create(null); + + for (var i = 0, ii = parts.length; i < ii; ++i) { + var param = parts[i].split("="); + var key = param[0].toLowerCase(); + var value = param.length > 1 ? param[1] : null; + params[decodeURIComponent(key)] = decodeURIComponent(value); + } + + return params; +} + +function binarySearchFirstItem(items, condition) { + var minIndex = 0; + var maxIndex = items.length - 1; + + if (maxIndex < 0 || !condition(items[maxIndex])) { + return items.length; + } + + if (condition(items[minIndex])) { + return minIndex; + } + + while (minIndex < maxIndex) { + var currentIndex = minIndex + maxIndex >> 1; + var currentItem = items[currentIndex]; + + if (condition(currentItem)) { + maxIndex = currentIndex; + } else { + minIndex = currentIndex + 1; + } + } + + return minIndex; +} + +function approximateFraction(x) { + if (Math.floor(x) === x) { + return [x, 1]; + } + + var xinv = 1 / x; + var limit = 8; + + if (xinv > limit) { + return [1, limit]; + } else if (Math.floor(xinv) === xinv) { + return [1, xinv]; + } + + var x_ = x > 1 ? xinv : x; + var a = 0, + b = 1, + c = 1, + d = 1; + + while (true) { + var p = a + c, + q = b + d; + + if (q > limit) { + break; + } + + if (x_ <= p / q) { + c = p; + d = q; + } else { + a = p; + b = q; + } + } + + var result; + + if (x_ - a / b < c / d - x_) { + result = x_ === x ? [a, b] : [b, a]; + } else { + result = x_ === x ? [c, d] : [d, c]; + } + + return result; +} + +function roundToDivide(x, div) { + var r = x % div; + return r === 0 ? x : Math.round(x - r + div); +} + +function getPageSizeInches(_ref) { + var view = _ref.view, + userUnit = _ref.userUnit, + rotate = _ref.rotate; + + var _view = _slicedToArray(view, 4), + x1 = _view[0], + y1 = _view[1], + x2 = _view[2], + y2 = _view[3]; + + var changeOrientation = rotate % 180 !== 0; + var width = (x2 - x1) / 72 * userUnit; + var height = (y2 - y1) / 72 * userUnit; + return { + width: changeOrientation ? height : width, + height: changeOrientation ? width : height + }; +} + +function backtrackBeforeAllVisibleElements(index, views, top) { + if (index < 2) { + return index; + } + + var elt = views[index].div; + var pageTop = elt.offsetTop + elt.clientTop; + + if (pageTop >= top) { + elt = views[index - 1].div; + pageTop = elt.offsetTop + elt.clientTop; + } + + for (var i = index - 2; i >= 0; --i) { + elt = views[i].div; + + if (elt.offsetTop + elt.clientTop + elt.clientHeight <= pageTop) { + break; + } + + index = i; + } + + return index; +} + +function getVisibleElements(_ref2) { + var scrollEl = _ref2.scrollEl, + views = _ref2.views, + _ref2$sortByVisibilit = _ref2.sortByVisibility, + sortByVisibility = _ref2$sortByVisibilit === void 0 ? false : _ref2$sortByVisibilit, + _ref2$horizontal = _ref2.horizontal, + horizontal = _ref2$horizontal === void 0 ? false : _ref2$horizontal, + _ref2$rtl = _ref2.rtl, + rtl = _ref2$rtl === void 0 ? false : _ref2$rtl; + var top = scrollEl.scrollTop, + bottom = top + scrollEl.clientHeight; + var left = scrollEl.scrollLeft, + right = left + scrollEl.clientWidth; + + function isElementBottomAfterViewTop(view) { + var element = view.div; + var elementBottom = element.offsetTop + element.clientTop + element.clientHeight; + return elementBottom > top; + } + + function isElementNextAfterViewHorizontally(view) { + var element = view.div; + var elementLeft = element.offsetLeft + element.clientLeft; + var elementRight = elementLeft + element.clientWidth; + return rtl ? elementLeft < right : elementRight > left; + } + + var visible = [], + numViews = views.length; + var firstVisibleElementInd = binarySearchFirstItem(views, horizontal ? isElementNextAfterViewHorizontally : isElementBottomAfterViewTop); + + if (firstVisibleElementInd > 0 && firstVisibleElementInd < numViews && !horizontal) { + firstVisibleElementInd = backtrackBeforeAllVisibleElements(firstVisibleElementInd, views, top); + } + + var lastEdge = horizontal ? right : -1; + + for (var i = firstVisibleElementInd; i < numViews; i++) { + var view = views[i], + element = view.div; + var currentWidth = element.offsetLeft + element.clientLeft; + var currentHeight = element.offsetTop + element.clientTop; + var viewWidth = element.clientWidth, + viewHeight = element.clientHeight; + var viewRight = currentWidth + viewWidth; + var viewBottom = currentHeight + viewHeight; + + if (lastEdge === -1) { + if (viewBottom >= bottom) { + lastEdge = viewBottom; + } + } else if ((horizontal ? currentWidth : currentHeight) > lastEdge) { + break; + } + + if (viewBottom <= top || currentHeight >= bottom || viewRight <= left || currentWidth >= right) { + continue; + } + + var hiddenHeight = Math.max(0, top - currentHeight) + Math.max(0, viewBottom - bottom); + var hiddenWidth = Math.max(0, left - currentWidth) + Math.max(0, viewRight - right); + var fractionHeight = (viewHeight - hiddenHeight) / viewHeight, + fractionWidth = (viewWidth - hiddenWidth) / viewWidth; + var percent = fractionHeight * fractionWidth * 100 | 0; + visible.push({ + id: view.id, + x: currentWidth, + y: currentHeight, + view: view, + percent: percent, + widthPercent: fractionWidth * 100 | 0 + }); + } + + var first = visible[0], + last = visible[visible.length - 1]; + + if (sortByVisibility) { + visible.sort(function (a, b) { + var pc = a.percent - b.percent; + + if (Math.abs(pc) > 0.001) { + return -pc; + } + + return a.id - b.id; + }); + } + + return { + first: first, + last: last, + views: visible + }; +} + +function noContextMenuHandler(evt) { + evt.preventDefault(); +} + +function normalizeWheelEventDirection(evt) { + var delta = Math.hypot(evt.deltaX, evt.deltaY); + var angle = Math.atan2(evt.deltaY, evt.deltaX); + + if (-0.25 * Math.PI < angle && angle < 0.75 * Math.PI) { + delta = -delta; + } + + return delta; +} + +function normalizeWheelEventDelta(evt) { + var delta = normalizeWheelEventDirection(evt); + var MOUSE_DOM_DELTA_PIXEL_MODE = 0; + var MOUSE_DOM_DELTA_LINE_MODE = 1; + var MOUSE_PIXELS_PER_LINE = 30; + var MOUSE_LINES_PER_PAGE = 30; + + if (evt.deltaMode === MOUSE_DOM_DELTA_PIXEL_MODE) { + delta /= MOUSE_PIXELS_PER_LINE * MOUSE_LINES_PER_PAGE; + } else if (evt.deltaMode === MOUSE_DOM_DELTA_LINE_MODE) { + delta /= MOUSE_LINES_PER_PAGE; + } + + return delta; +} + +function isValidRotation(angle) { + return Number.isInteger(angle) && angle % 90 === 0; +} + +function isValidScrollMode(mode) { + return Number.isInteger(mode) && Object.values(ScrollMode).includes(mode) && mode !== ScrollMode.UNKNOWN; +} + +function isValidSpreadMode(mode) { + return Number.isInteger(mode) && Object.values(SpreadMode).includes(mode) && mode !== SpreadMode.UNKNOWN; +} + +function isPortraitOrientation(size) { + return size.width <= size.height; +} + +var WaitOnType = { + EVENT: "event", + TIMEOUT: "timeout" +}; +exports.WaitOnType = WaitOnType; + +function waitOnEventOrTimeout(_ref3) { + var target = _ref3.target, + name = _ref3.name, + _ref3$delay = _ref3.delay, + delay = _ref3$delay === void 0 ? 0 : _ref3$delay; + return new Promise(function (resolve, reject) { + if (_typeof(target) !== "object" || !(name && typeof name === "string") || !(Number.isInteger(delay) && delay >= 0)) { + throw new Error("waitOnEventOrTimeout - invalid parameters."); + } + + function handler(type) { + if (target instanceof EventBus) { + target._off(name, eventHandler); + } else { + target.removeEventListener(name, eventHandler); + } + + if (timeout) { + clearTimeout(timeout); + } + + resolve(type); + } + + var eventHandler = handler.bind(null, WaitOnType.EVENT); + + if (target instanceof EventBus) { + target._on(name, eventHandler); + } else { + target.addEventListener(name, eventHandler); + } + + var timeoutHandler = handler.bind(null, WaitOnType.TIMEOUT); + var timeout = setTimeout(timeoutHandler, delay); + }); +} + +var animationStarted = new Promise(function (resolve) { + window.requestAnimationFrame(resolve); +}); +exports.animationStarted = animationStarted; + +function dispatchDOMEvent(eventName) { + var args = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + throw new Error("Not implemented: dispatchDOMEvent"); +} + +var EventBus = /*#__PURE__*/function () { + function EventBus(options) { + _classCallCheck(this, EventBus); + + this._listeners = Object.create(null); + } + + _createClass(EventBus, [{ + key: "on", + value: function on(eventName, listener) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + + this._on(eventName, listener, { + external: true, + once: options === null || options === void 0 ? void 0 : options.once + }); + } + }, { + key: "off", + value: function off(eventName, listener) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + + this._off(eventName, listener, { + external: true, + once: options === null || options === void 0 ? void 0 : options.once + }); + } + }, { + key: "dispatch", + value: function dispatch(eventName) { + var eventListeners = this._listeners[eventName]; + + if (!eventListeners || eventListeners.length === 0) { + return; + } + + var args = Array.prototype.slice.call(arguments, 1); + var externalListeners; + + var _iterator = _createForOfIteratorHelper(eventListeners.slice(0)), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var _step$value = _step.value, + _listener = _step$value.listener, + external = _step$value.external, + once = _step$value.once; + + if (once) { + this._off(eventName, _listener); + } + + if (external) { + (externalListeners || (externalListeners = [])).push(_listener); + continue; + } + + _listener.apply(null, args); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + if (externalListeners) { + var _iterator2 = _createForOfIteratorHelper(externalListeners), + _step2; + + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + var listener = _step2.value; + listener.apply(null, args); + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + + externalListeners = null; + } + } + }, { + key: "_on", + value: function _on(eventName, listener) { + var _this$_listeners; + + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + var eventListeners = (_this$_listeners = this._listeners)[eventName] || (_this$_listeners[eventName] = []); + eventListeners.push({ + listener: listener, + external: (options === null || options === void 0 ? void 0 : options.external) === true, + once: (options === null || options === void 0 ? void 0 : options.once) === true + }); + } + }, { + key: "_off", + value: function _off(eventName, listener) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + var eventListeners = this._listeners[eventName]; + + if (!eventListeners) { + return; + } + + for (var i = 0, ii = eventListeners.length; i < ii; i++) { + if (eventListeners[i].listener === listener) { + eventListeners.splice(i, 1); + return; + } + } + } + }]); + + return EventBus; +}(); + +exports.EventBus = EventBus; + +function clamp(v, min, max) { + return Math.min(Math.max(v, min), max); +} + +var ProgressBar = /*#__PURE__*/function () { + function ProgressBar(id) { + var _ref4 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + height = _ref4.height, + width = _ref4.width, + units = _ref4.units; + + _classCallCheck(this, ProgressBar); + + this.visible = true; + this.div = document.querySelector(id + " .progress"); + this.bar = this.div.parentNode; + this.height = height || 100; + this.width = width || 100; + this.units = units || "%"; + this.div.style.height = this.height + this.units; + this.percent = 0; + } + + _createClass(ProgressBar, [{ + key: "_updateBar", + value: function _updateBar() { + if (this._indeterminate) { + this.div.classList.add("indeterminate"); + this.div.style.width = this.width + this.units; + return; + } + + this.div.classList.remove("indeterminate"); + var progressSize = this.width * this._percent / 100; + this.div.style.width = progressSize + this.units; + } + }, { + key: "percent", + get: function get() { + return this._percent; + }, + set: function set(val) { + this._indeterminate = isNaN(val); + this._percent = clamp(val, 0, 100); + + this._updateBar(); + } + }, { + key: "setWidth", + value: function setWidth(viewer) { + if (!viewer) { + return; + } + + var container = viewer.parentNode; + var scrollbarWidth = container.offsetWidth - viewer.offsetWidth; + + if (scrollbarWidth > 0) { + var doc = document.documentElement; + doc.style.setProperty(LOADINGBAR_END_OFFSET_VAR, "".concat(scrollbarWidth, "px")); + } + } + }, { + key: "hide", + value: function hide() { + if (!this.visible) { + return; + } + + this.visible = false; + this.bar.classList.add("hidden"); + } + }, { + key: "show", + value: function show() { + if (this.visible) { + return; + } + + this.visible = true; + this.bar.classList.remove("hidden"); + } + }]); + + return ProgressBar; +}(); + +exports.ProgressBar = ProgressBar; + +function moveToEndOfArray(arr, condition) { + var moved = [], + len = arr.length; + var write = 0; + + for (var read = 0; read < len; ++read) { + if (condition(arr[read])) { + moved.push(arr[read]); + } else { + arr[write] = arr[read]; + ++write; + } + } + + for (var _read = 0; write < len; ++_read, ++write) { + arr[write] = moved[_read]; + } +} + +function getActiveOrFocusedElement() { + var curRoot = document; + var curActiveOrFocused = curRoot.activeElement || curRoot.querySelector(":focus"); + + while ((_curActiveOrFocused = curActiveOrFocused) !== null && _curActiveOrFocused !== void 0 && _curActiveOrFocused.shadowRoot) { + var _curActiveOrFocused; + + curRoot = curActiveOrFocused.shadowRoot; + curActiveOrFocused = curRoot.activeElement || curRoot.querySelector(":focus"); + } + + return curActiveOrFocused; +} + +function apiPageLayoutToSpreadMode(layout) { + switch (layout) { + case "SinglePage": + case "OneColumn": + return SpreadMode.NONE; + + case "TwoColumnLeft": + case "TwoPageLeft": + return SpreadMode.ODD; + + case "TwoColumnRight": + case "TwoPageRight": + return SpreadMode.EVEN; + } + + return SpreadMode.NONE; +} + +function apiPageModeToSidebarView(mode) { + switch (mode) { + case "UseNone": + return SidebarView.NONE; + + case "UseThumbs": + return SidebarView.THUMBS; + + case "UseOutlines": + return SidebarView.OUTLINE; + + case "UseAttachments": + return SidebarView.ATTACHMENTS; + + case "UseOC": + return SidebarView.LAYERS; + } + + return SidebarView.NONE; +} + +/***/ }), +/* 7 */ +/***/ ((module) => { + + + +var pdfjsLib; + +if (typeof window !== "undefined" && window["pdfjs-dist/build/pdf"]) { + pdfjsLib = window["pdfjs-dist/build/pdf"]; +} else { + pdfjsLib = require("../build/pdf.js"); +} + +module.exports = pdfjsLib; + +/***/ }), +/* 8 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PDFCursorTools = exports.CursorTool = void 0; + +var _grab_to_pan = __webpack_require__(9); + +var _ui_utils = __webpack_require__(6); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var CursorTool = { + SELECT: 0, + HAND: 1, + ZOOM: 2 +}; +exports.CursorTool = CursorTool; + +var PDFCursorTools = /*#__PURE__*/function () { + function PDFCursorTools(_ref) { + var _this = this; + + var container = _ref.container, + eventBus = _ref.eventBus, + _ref$cursorToolOnLoad = _ref.cursorToolOnLoad, + cursorToolOnLoad = _ref$cursorToolOnLoad === void 0 ? CursorTool.SELECT : _ref$cursorToolOnLoad; + + _classCallCheck(this, PDFCursorTools); + + this.container = container; + this.eventBus = eventBus; + this.active = CursorTool.SELECT; + this.activeBeforePresentationMode = null; + this.handTool = new _grab_to_pan.GrabToPan({ + element: this.container + }); + + this._addEventListeners(); + + Promise.resolve().then(function () { + _this.switchTool(cursorToolOnLoad); + }); + } + + _createClass(PDFCursorTools, [{ + key: "activeTool", + get: function get() { + return this.active; + } + }, { + key: "switchTool", + value: function switchTool(tool) { + var _this2 = this; + + if (this.activeBeforePresentationMode !== null) { + return; + } + + if (tool === this.active) { + return; + } + + var disableActiveTool = function disableActiveTool() { + switch (_this2.active) { + case CursorTool.SELECT: + break; + + case CursorTool.HAND: + _this2.handTool.deactivate(); + + break; + + case CursorTool.ZOOM: + } + }; + + switch (tool) { + case CursorTool.SELECT: + disableActiveTool(); + break; + + case CursorTool.HAND: + disableActiveTool(); + this.handTool.activate(); + break; + + case CursorTool.ZOOM: + default: + console.error("switchTool: \"".concat(tool, "\" is an unsupported value.")); + return; + } + + this.active = tool; + + this._dispatchEvent(); + } + }, { + key: "_dispatchEvent", + value: function _dispatchEvent() { + this.eventBus.dispatch("cursortoolchanged", { + source: this, + tool: this.active + }); + } + }, { + key: "_addEventListeners", + value: function _addEventListeners() { + var _this3 = this; + + this.eventBus._on("switchcursortool", function (evt) { + _this3.switchTool(evt.tool); + }); + + this.eventBus._on("presentationmodechanged", function (evt) { + switch (evt.state) { + case _ui_utils.PresentationModeState.FULLSCREEN: + { + var previouslyActive = _this3.active; + + _this3.switchTool(CursorTool.SELECT); + + _this3.activeBeforePresentationMode = previouslyActive; + break; + } + + case _ui_utils.PresentationModeState.NORMAL: + { + var _previouslyActive = _this3.activeBeforePresentationMode; + _this3.activeBeforePresentationMode = null; + + _this3.switchTool(_previouslyActive); + + break; + } + } + }); + } + }]); + + return PDFCursorTools; +}(); + +exports.PDFCursorTools = PDFCursorTools; + +/***/ }), +/* 9 */ +/***/ ((__unused_webpack_module, exports) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.GrabToPan = GrabToPan; + +function GrabToPan(options) { + this.element = options.element; + this.document = options.element.ownerDocument; + + if (typeof options.ignoreTarget === "function") { + this.ignoreTarget = options.ignoreTarget; + } + + this.onActiveChanged = options.onActiveChanged; + this.activate = this.activate.bind(this); + this.deactivate = this.deactivate.bind(this); + this.toggle = this.toggle.bind(this); + this._onmousedown = this._onmousedown.bind(this); + this._onmousemove = this._onmousemove.bind(this); + this._endPan = this._endPan.bind(this); + var overlay = this.overlay = document.createElement("div"); + overlay.className = "grab-to-pan-grabbing"; +} + +GrabToPan.prototype = { + CSS_CLASS_GRAB: "grab-to-pan-grab", + activate: function GrabToPan_activate() { + if (!this.active) { + this.active = true; + this.element.addEventListener("mousedown", this._onmousedown, true); + this.element.classList.add(this.CSS_CLASS_GRAB); + + if (this.onActiveChanged) { + this.onActiveChanged(true); + } + } + }, + deactivate: function GrabToPan_deactivate() { + if (this.active) { + this.active = false; + this.element.removeEventListener("mousedown", this._onmousedown, true); + + this._endPan(); + + this.element.classList.remove(this.CSS_CLASS_GRAB); + + if (this.onActiveChanged) { + this.onActiveChanged(false); + } + } + }, + toggle: function GrabToPan_toggle() { + if (this.active) { + this.deactivate(); + } else { + this.activate(); + } + }, + ignoreTarget: function GrabToPan_ignoreTarget(node) { + return node.matches("a[href], a[href] *, input, textarea, button, button *, select, option"); + }, + _onmousedown: function GrabToPan__onmousedown(event) { + if (event.button !== 0 || this.ignoreTarget(event.target)) { + return; + } + + if (event.originalTarget) { + try { + event.originalTarget.tagName; + } catch (e) { + return; + } + } + + this.scrollLeftStart = this.element.scrollLeft; + this.scrollTopStart = this.element.scrollTop; + this.clientXStart = event.clientX; + this.clientYStart = event.clientY; + this.document.addEventListener("mousemove", this._onmousemove, true); + this.document.addEventListener("mouseup", this._endPan, true); + this.element.addEventListener("scroll", this._endPan, true); + event.preventDefault(); + event.stopPropagation(); + var focusedElement = document.activeElement; + + if (focusedElement && !focusedElement.contains(event.target)) { + focusedElement.blur(); + } + }, + _onmousemove: function GrabToPan__onmousemove(event) { + this.element.removeEventListener("scroll", this._endPan, true); + + if (isLeftMouseReleased(event)) { + this._endPan(); + + return; + } + + var xDiff = event.clientX - this.clientXStart; + var yDiff = event.clientY - this.clientYStart; + var scrollTop = this.scrollTopStart - yDiff; + var scrollLeft = this.scrollLeftStart - xDiff; + + if (this.element.scrollTo) { + this.element.scrollTo({ + top: scrollTop, + left: scrollLeft, + behavior: "instant" + }); + } else { + this.element.scrollTop = scrollTop; + this.element.scrollLeft = scrollLeft; + } + + if (!this.overlay.parentNode) { + document.body.appendChild(this.overlay); + } + }, + _endPan: function GrabToPan__endPan() { + this.element.removeEventListener("scroll", this._endPan, true); + this.document.removeEventListener("mousemove", this._onmousemove, true); + this.document.removeEventListener("mouseup", this._endPan, true); + this.overlay.remove(); + } +}; + +function isLeftMouseReleased(event) { + if ("buttons" in event) { + return !(event.buttons & 1); + } + + var chrome = window.chrome; + var isChrome15OrOpera15plus = chrome && (chrome.webstore || chrome.app); + var isSafari6plus = /Apple/.test(navigator.vendor) && /Version\/([6-9]\d*|[1-5]\d+)/.test(navigator.userAgent); + + if (isChrome15OrOpera15plus || isSafari6plus) { + return event.which === 0; + } + + return false; +} + +/***/ }), +/* 10 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.RenderingStates = exports.PDFRenderingQueue = void 0; + +var _pdfjsLib = __webpack_require__(7); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var CLEANUP_TIMEOUT = 30000; +var RenderingStates = { + INITIAL: 0, + RUNNING: 1, + PAUSED: 2, + FINISHED: 3 +}; +exports.RenderingStates = RenderingStates; + +var PDFRenderingQueue = /*#__PURE__*/function () { + function PDFRenderingQueue() { + _classCallCheck(this, PDFRenderingQueue); + + this.pdfViewer = null; + this.pdfThumbnailViewer = null; + this.onIdle = null; + this.highestPriorityPage = null; + this.idleTimeout = null; + this.printing = false; + this.isThumbnailViewEnabled = false; + } + + _createClass(PDFRenderingQueue, [{ + key: "setViewer", + value: function setViewer(pdfViewer) { + this.pdfViewer = pdfViewer; + } + }, { + key: "setThumbnailViewer", + value: function setThumbnailViewer(pdfThumbnailViewer) { + this.pdfThumbnailViewer = pdfThumbnailViewer; + } + }, { + key: "isHighestPriority", + value: function isHighestPriority(view) { + return this.highestPriorityPage === view.renderingId; + } + }, { + key: "renderHighestPriority", + value: function renderHighestPriority(currentlyVisiblePages) { + if (this.idleTimeout) { + clearTimeout(this.idleTimeout); + this.idleTimeout = null; + } + + if (this.pdfViewer.forceRendering(currentlyVisiblePages)) { + return; + } + + if (this.pdfThumbnailViewer && this.isThumbnailViewEnabled) { + if (this.pdfThumbnailViewer.forceRendering()) { + return; + } + } + + if (this.printing) { + return; + } + + if (this.onIdle) { + this.idleTimeout = setTimeout(this.onIdle.bind(this), CLEANUP_TIMEOUT); + } + } + }, { + key: "getHighestPriority", + value: function getHighestPriority(visible, views, scrolledDown) { + var visibleViews = visible.views; + var numVisible = visibleViews.length; + + if (numVisible === 0) { + return null; + } + + for (var i = 0; i < numVisible; ++i) { + var view = visibleViews[i].view; + + if (!this.isViewFinished(view)) { + return view; + } + } + + if (scrolledDown) { + var nextPageIndex = visible.last.id; + + if (views[nextPageIndex] && !this.isViewFinished(views[nextPageIndex])) { + return views[nextPageIndex]; + } + } else { + var previousPageIndex = visible.first.id - 2; + + if (views[previousPageIndex] && !this.isViewFinished(views[previousPageIndex])) { + return views[previousPageIndex]; + } + } + + return null; + } + }, { + key: "isViewFinished", + value: function isViewFinished(view) { + return view.renderingState === RenderingStates.FINISHED; + } + }, { + key: "renderView", + value: function renderView(view) { + var _this = this; + + switch (view.renderingState) { + case RenderingStates.FINISHED: + return false; + + case RenderingStates.PAUSED: + this.highestPriorityPage = view.renderingId; + view.resume(); + break; + + case RenderingStates.RUNNING: + this.highestPriorityPage = view.renderingId; + break; + + case RenderingStates.INITIAL: + this.highestPriorityPage = view.renderingId; + view.draw()["finally"](function () { + _this.renderHighestPriority(); + })["catch"](function (reason) { + if (reason instanceof _pdfjsLib.RenderingCancelledException) { + return; + } + + console.error("renderView: \"".concat(reason, "\"")); + }); + break; + } + + return true; + } + }]); + + return PDFRenderingQueue; +}(); + +exports.PDFRenderingQueue = PDFRenderingQueue; + +/***/ }), +/* 11 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.OverlayManager = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__(4)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var OverlayManager = /*#__PURE__*/function () { + function OverlayManager() { + _classCallCheck(this, OverlayManager); + + this._overlays = {}; + this._active = null; + this._keyDownBound = this._keyDown.bind(this); + } + + _createClass(OverlayManager, [{ + key: "active", + get: function get() { + return this._active; + } + }, { + key: "register", + value: function () { + var _register = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee(name, element) { + var callerCloseMethod, + canForceClose, + container, + _args = arguments; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + callerCloseMethod = _args.length > 2 && _args[2] !== undefined ? _args[2] : null; + canForceClose = _args.length > 3 && _args[3] !== undefined ? _args[3] : false; + + if (!(!name || !element || !(container = element.parentNode))) { + _context.next = 6; + break; + } + + throw new Error("Not enough parameters."); + + case 6: + if (!this._overlays[name]) { + _context.next = 8; + break; + } + + throw new Error("The overlay is already registered."); + + case 8: + this._overlays[name] = { + element: element, + container: container, + callerCloseMethod: callerCloseMethod, + canForceClose: canForceClose + }; + + case 9: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function register(_x, _x2) { + return _register.apply(this, arguments); + } + + return register; + }() + }, { + key: "unregister", + value: function () { + var _unregister = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee2(name) { + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + if (this._overlays[name]) { + _context2.next = 4; + break; + } + + throw new Error("The overlay does not exist."); + + case 4: + if (!(this._active === name)) { + _context2.next = 6; + break; + } + + throw new Error("The overlay cannot be removed while it is active."); + + case 6: + delete this._overlays[name]; + + case 7: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function unregister(_x3) { + return _unregister.apply(this, arguments); + } + + return unregister; + }() + }, { + key: "open", + value: function () { + var _open = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee3(name) { + return _regenerator["default"].wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + if (this._overlays[name]) { + _context3.next = 4; + break; + } + + throw new Error("The overlay does not exist."); + + case 4: + if (!this._active) { + _context3.next = 14; + break; + } + + if (!this._overlays[name].canForceClose) { + _context3.next = 9; + break; + } + + this._closeThroughCaller(); + + _context3.next = 14; + break; + + case 9: + if (!(this._active === name)) { + _context3.next = 13; + break; + } + + throw new Error("The overlay is already active."); + + case 13: + throw new Error("Another overlay is currently active."); + + case 14: + this._active = name; + + this._overlays[this._active].element.classList.remove("hidden"); + + this._overlays[this._active].container.classList.remove("hidden"); + + window.addEventListener("keydown", this._keyDownBound); + + case 18: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function open(_x4) { + return _open.apply(this, arguments); + } + + return open; + }() + }, { + key: "close", + value: function () { + var _close = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee4(name) { + return _regenerator["default"].wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + if (this._overlays[name]) { + _context4.next = 4; + break; + } + + throw new Error("The overlay does not exist."); + + case 4: + if (this._active) { + _context4.next = 8; + break; + } + + throw new Error("The overlay is currently not active."); + + case 8: + if (!(this._active !== name)) { + _context4.next = 10; + break; + } + + throw new Error("Another overlay is currently active."); + + case 10: + this._overlays[this._active].container.classList.add("hidden"); + + this._overlays[this._active].element.classList.add("hidden"); + + this._active = null; + window.removeEventListener("keydown", this._keyDownBound); + + case 14: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function close(_x5) { + return _close.apply(this, arguments); + } + + return close; + }() + }, { + key: "_keyDown", + value: function _keyDown(evt) { + if (this._active && evt.keyCode === 27) { + this._closeThroughCaller(); + + evt.preventDefault(); + } + } + }, { + key: "_closeThroughCaller", + value: function _closeThroughCaller() { + if (this._overlays[this._active].callerCloseMethod) { + this._overlays[this._active].callerCloseMethod(); + } + + if (this._active) { + this.close(this._active); + } + } + }]); + + return OverlayManager; +}(); + +exports.OverlayManager = OverlayManager; + +/***/ }), +/* 12 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PasswordPrompt = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__(4)); + +var _pdfjsLib = __webpack_require__(7); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var PasswordPrompt = /*#__PURE__*/function () { + function PasswordPrompt(options, overlayManager, l10n) { + var _this = this; + + var isViewerEmbedded = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + + _classCallCheck(this, PasswordPrompt); + + this.overlayName = options.overlayName; + this.container = options.container; + this.label = options.label; + this.input = options.input; + this.submitButton = options.submitButton; + this.cancelButton = options.cancelButton; + this.overlayManager = overlayManager; + this.l10n = l10n; + this._isViewerEmbedded = isViewerEmbedded; + this.updateCallback = null; + this.reason = null; + this.submitButton.addEventListener("click", this.verify.bind(this)); + this.cancelButton.addEventListener("click", this.close.bind(this)); + this.input.addEventListener("keydown", function (e) { + if (e.keyCode === 13) { + _this.verify(); + } + }); + this.overlayManager.register(this.overlayName, this.container, this.close.bind(this), true); + } + + _createClass(PasswordPrompt, [{ + key: "open", + value: function () { + var _open = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee() { + var passwordIncorrect; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return this.overlayManager.open(this.overlayName); + + case 2: + passwordIncorrect = this.reason === _pdfjsLib.PasswordResponses.INCORRECT_PASSWORD; + + if (!this._isViewerEmbedded || passwordIncorrect) { + this.input.focus(); + } + + _context.next = 6; + return this.l10n.get("password_".concat(passwordIncorrect ? "invalid" : "label")); + + case 6: + this.label.textContent = _context.sent; + + case 7: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function open() { + return _open.apply(this, arguments); + } + + return open; + }() + }, { + key: "close", + value: function close() { + var _this2 = this; + + this.overlayManager.close(this.overlayName).then(function () { + _this2.input.value = ""; + }); + } + }, { + key: "verify", + value: function verify() { + var password = this.input.value; + + if ((password === null || password === void 0 ? void 0 : password.length) > 0) { + this.close(); + this.updateCallback(password); + } + } + }, { + key: "setUpdateCallback", + value: function setUpdateCallback(updateCallback, reason) { + this.updateCallback = updateCallback; + this.reason = reason; + } + }]); + + return PasswordPrompt; +}(); + +exports.PasswordPrompt = PasswordPrompt; + +/***/ }), +/* 13 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PDFAttachmentViewer = void 0; + +var _pdfjsLib = __webpack_require__(7); + +var _base_tree_viewer = __webpack_require__(14); + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); } + +function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +var PDFAttachmentViewer = /*#__PURE__*/function (_BaseTreeViewer) { + _inherits(PDFAttachmentViewer, _BaseTreeViewer); + + var _super = _createSuper(PDFAttachmentViewer); + + function PDFAttachmentViewer(options) { + var _this; + + _classCallCheck(this, PDFAttachmentViewer); + + _this = _super.call(this, options); + _this.downloadManager = options.downloadManager; + + _this.eventBus._on("fileattachmentannotation", _this._appendAttachment.bind(_assertThisInitialized(_this))); + + return _this; + } + + _createClass(PDFAttachmentViewer, [{ + key: "reset", + value: function reset() { + var keepRenderedCapability = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + _get(_getPrototypeOf(PDFAttachmentViewer.prototype), "reset", this).call(this); + + this._attachments = null; + + if (!keepRenderedCapability) { + this._renderedCapability = (0, _pdfjsLib.createPromiseCapability)(); + } + + if (this._pendingDispatchEvent) { + clearTimeout(this._pendingDispatchEvent); + } + + this._pendingDispatchEvent = null; + } + }, { + key: "_dispatchEvent", + value: function _dispatchEvent(attachmentsCount) { + var _this2 = this; + + this._renderedCapability.resolve(); + + if (this._pendingDispatchEvent) { + clearTimeout(this._pendingDispatchEvent); + this._pendingDispatchEvent = null; + } + + if (attachmentsCount === 0) { + this._pendingDispatchEvent = setTimeout(function () { + _this2.eventBus.dispatch("attachmentsloaded", { + source: _this2, + attachmentsCount: 0 + }); + + _this2._pendingDispatchEvent = null; + }); + return; + } + + this.eventBus.dispatch("attachmentsloaded", { + source: this, + attachmentsCount: attachmentsCount + }); + } + }, { + key: "_bindLink", + value: function _bindLink(element, _ref) { + var _this3 = this; + + var content = _ref.content, + filename = _ref.filename; + + element.onclick = function () { + _this3.downloadManager.openOrDownloadData(element, content, filename); + + return false; + }; + } + }, { + key: "render", + value: function render(_ref2) { + var attachments = _ref2.attachments, + _ref2$keepRenderedCap = _ref2.keepRenderedCapability, + keepRenderedCapability = _ref2$keepRenderedCap === void 0 ? false : _ref2$keepRenderedCap; + + if (this._attachments) { + this.reset(keepRenderedCapability); + } + + this._attachments = attachments || null; + + if (!attachments) { + this._dispatchEvent(0); + + return; + } + + var names = Object.keys(attachments).sort(function (a, b) { + return a.toLowerCase().localeCompare(b.toLowerCase()); + }); + var fragment = document.createDocumentFragment(); + var attachmentsCount = 0; + + var _iterator = _createForOfIteratorHelper(names), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var name = _step.value; + var item = attachments[name]; + var content = item.content, + filename = (0, _pdfjsLib.getFilenameFromUrl)(item.filename); + var div = document.createElement("div"); + div.className = "treeItem"; + var element = document.createElement("a"); + + this._bindLink(element, { + content: content, + filename: filename + }); + + element.textContent = this._normalizeTextContent(filename); + div.appendChild(element); + fragment.appendChild(div); + attachmentsCount++; + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + this._finishRendering(fragment, attachmentsCount); + } + }, { + key: "_appendAttachment", + value: function _appendAttachment(_ref3) { + var _this4 = this; + + var id = _ref3.id, + filename = _ref3.filename, + content = _ref3.content; + var renderedPromise = this._renderedCapability.promise; + renderedPromise.then(function () { + if (renderedPromise !== _this4._renderedCapability.promise) { + return; + } + + var attachments = _this4._attachments; + + if (!attachments) { + attachments = Object.create(null); + } else { + for (var name in attachments) { + if (id === name) { + return; + } + } + } + + attachments[id] = { + filename: filename, + content: content + }; + + _this4.render({ + attachments: attachments, + keepRenderedCapability: true + }); + }); + } + }]); + + return PDFAttachmentViewer; +}(_base_tree_viewer.BaseTreeViewer); + +exports.PDFAttachmentViewer = PDFAttachmentViewer; + +/***/ }), +/* 14 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.BaseTreeViewer = void 0; + +var _pdfjsLib = __webpack_require__(7); + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var TREEITEM_OFFSET_TOP = -100; +var TREEITEM_SELECTED_CLASS = "selected"; + +var BaseTreeViewer = /*#__PURE__*/function () { + function BaseTreeViewer(options) { + _classCallCheck(this, BaseTreeViewer); + + if (this.constructor === BaseTreeViewer) { + throw new Error("Cannot initialize BaseTreeViewer."); + } + + this.container = options.container; + this.eventBus = options.eventBus; + this.reset(); + } + + _createClass(BaseTreeViewer, [{ + key: "reset", + value: function reset() { + this._pdfDocument = null; + this._lastToggleIsShow = true; + this._currentTreeItem = null; + this.container.textContent = ""; + this.container.classList.remove("treeWithDeepNesting"); + } + }, { + key: "_dispatchEvent", + value: function _dispatchEvent(count) { + throw new Error("Not implemented: _dispatchEvent"); + } + }, { + key: "_bindLink", + value: function _bindLink(element, params) { + throw new Error("Not implemented: _bindLink"); + } + }, { + key: "_normalizeTextContent", + value: function _normalizeTextContent(str) { + return (0, _pdfjsLib.removeNullCharacters)(str) || "\u2013"; + } + }, { + key: "_addToggleButton", + value: function _addToggleButton(div) { + var _this = this; + + var hidden = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var toggler = document.createElement("div"); + toggler.className = "treeItemToggler"; + + if (hidden) { + toggler.classList.add("treeItemsHidden"); + } + + toggler.onclick = function (evt) { + evt.stopPropagation(); + toggler.classList.toggle("treeItemsHidden"); + + if (evt.shiftKey) { + var shouldShowAll = !toggler.classList.contains("treeItemsHidden"); + + _this._toggleTreeItem(div, shouldShowAll); + } + }; + + div.insertBefore(toggler, div.firstChild); + } + }, { + key: "_toggleTreeItem", + value: function _toggleTreeItem(root) { + var show = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + this._lastToggleIsShow = show; + + var _iterator = _createForOfIteratorHelper(root.querySelectorAll(".treeItemToggler")), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var toggler = _step.value; + toggler.classList.toggle("treeItemsHidden", !show); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } + }, { + key: "_toggleAllTreeItems", + value: function _toggleAllTreeItems() { + this._toggleTreeItem(this.container, !this._lastToggleIsShow); + } + }, { + key: "_finishRendering", + value: function _finishRendering(fragment, count) { + var hasAnyNesting = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + if (hasAnyNesting) { + this.container.classList.add("treeWithDeepNesting"); + this._lastToggleIsShow = !fragment.querySelector(".treeItemsHidden"); + } + + this.container.appendChild(fragment); + + this._dispatchEvent(count); + } + }, { + key: "render", + value: function render(params) { + throw new Error("Not implemented: render"); + } + }, { + key: "_updateCurrentTreeItem", + value: function _updateCurrentTreeItem() { + var treeItem = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + + if (this._currentTreeItem) { + this._currentTreeItem.classList.remove(TREEITEM_SELECTED_CLASS); + + this._currentTreeItem = null; + } + + if (treeItem) { + treeItem.classList.add(TREEITEM_SELECTED_CLASS); + this._currentTreeItem = treeItem; + } + } + }, { + key: "_scrollToCurrentTreeItem", + value: function _scrollToCurrentTreeItem(treeItem) { + if (!treeItem) { + return; + } + + var currentNode = treeItem.parentNode; + + while (currentNode && currentNode !== this.container) { + if (currentNode.classList.contains("treeItem")) { + var toggler = currentNode.firstElementChild; + toggler === null || toggler === void 0 ? void 0 : toggler.classList.remove("treeItemsHidden"); + } + + currentNode = currentNode.parentNode; + } + + this._updateCurrentTreeItem(treeItem); + + this.container.scrollTo(treeItem.offsetLeft, treeItem.offsetTop + TREEITEM_OFFSET_TOP); + } + }]); + + return BaseTreeViewer; +}(); + +exports.BaseTreeViewer = BaseTreeViewer; + +/***/ }), +/* 15 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PDFDocumentProperties = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__(4)); + +var _pdfjsLib = __webpack_require__(7); + +var _ui_utils = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var DEFAULT_FIELD_CONTENT = "-"; +var NON_METRIC_LOCALES = ["en-us", "en-lr", "my"]; +var US_PAGE_NAMES = { + "8.5x11": "Letter", + "8.5x14": "Legal" +}; +var METRIC_PAGE_NAMES = { + "297x420": "A3", + "210x297": "A4" +}; + +function getPageName(size, isPortrait, pageNames) { + var width = isPortrait ? size.width : size.height; + var height = isPortrait ? size.height : size.width; + return pageNames["".concat(width, "x").concat(height)]; +} + +var PDFDocumentProperties = /*#__PURE__*/function () { + function PDFDocumentProperties(_ref, overlayManager, eventBus, l10n) { + var _this = this; + + var overlayName = _ref.overlayName, + fields = _ref.fields, + container = _ref.container, + closeButton = _ref.closeButton; + + _classCallCheck(this, PDFDocumentProperties); + + this.overlayName = overlayName; + this.fields = fields; + this.container = container; + this.overlayManager = overlayManager; + this.l10n = l10n; + + this._reset(); + + closeButton.addEventListener("click", this.close.bind(this)); + this.overlayManager.register(this.overlayName, this.container, this.close.bind(this)); + + eventBus._on("pagechanging", function (evt) { + _this._currentPageNumber = evt.pageNumber; + }); + + eventBus._on("rotationchanging", function (evt) { + _this._pagesRotation = evt.pagesRotation; + }); + + this._isNonMetricLocale = true; + l10n.getLanguage().then(function (locale) { + _this._isNonMetricLocale = NON_METRIC_LOCALES.includes(locale); + }); + } + + _createClass(PDFDocumentProperties, [{ + key: "open", + value: function () { + var _open = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee() { + var _this2 = this; + + var freezeFieldData, currentPageNumber, pagesRotation, _yield$this$pdfDocume, info, contentDispositionFilename, contentLength, _yield$Promise$all, _yield$Promise$all2, fileName, fileSize, creationDate, modificationDate, pageSize, isLinearized, _yield$this$pdfDocume2, length, data; + + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + freezeFieldData = function freezeFieldData(data) { + Object.defineProperty(_this2, "fieldData", { + value: Object.freeze(data), + writable: false, + enumerable: true, + configurable: true + }); + }; + + _context.next = 3; + return Promise.all([this.overlayManager.open(this.overlayName), this._dataAvailableCapability.promise]); + + case 3: + currentPageNumber = this._currentPageNumber; + pagesRotation = this._pagesRotation; + + if (!(this.fieldData && currentPageNumber === this.fieldData._currentPageNumber && pagesRotation === this.fieldData._pagesRotation)) { + _context.next = 8; + break; + } + + this._updateUI(); + + return _context.abrupt("return"); + + case 8: + _context.next = 10; + return this.pdfDocument.getMetadata(); + + case 10: + _yield$this$pdfDocume = _context.sent; + info = _yield$this$pdfDocume.info; + contentDispositionFilename = _yield$this$pdfDocume.contentDispositionFilename; + contentLength = _yield$this$pdfDocume.contentLength; + _context.next = 16; + return Promise.all([contentDispositionFilename || (0, _pdfjsLib.getPdfFilenameFromUrl)(this.url), this._parseFileSize(contentLength), this._parseDate(info.CreationDate), this._parseDate(info.ModDate), this.pdfDocument.getPage(currentPageNumber).then(function (pdfPage) { + return _this2._parsePageSize((0, _ui_utils.getPageSizeInches)(pdfPage), pagesRotation); + }), this._parseLinearization(info.IsLinearized)]); + + case 16: + _yield$Promise$all = _context.sent; + _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 6); + fileName = _yield$Promise$all2[0]; + fileSize = _yield$Promise$all2[1]; + creationDate = _yield$Promise$all2[2]; + modificationDate = _yield$Promise$all2[3]; + pageSize = _yield$Promise$all2[4]; + isLinearized = _yield$Promise$all2[5]; + freezeFieldData({ + fileName: fileName, + fileSize: fileSize, + title: info.Title, + author: info.Author, + subject: info.Subject, + keywords: info.Keywords, + creationDate: creationDate, + modificationDate: modificationDate, + creator: info.Creator, + producer: info.Producer, + version: info.PDFFormatVersion, + pageCount: this.pdfDocument.numPages, + pageSize: pageSize, + linearized: isLinearized, + _currentPageNumber: currentPageNumber, + _pagesRotation: pagesRotation + }); + + this._updateUI(); + + _context.next = 28; + return this.pdfDocument.getDownloadInfo(); + + case 28: + _yield$this$pdfDocume2 = _context.sent; + length = _yield$this$pdfDocume2.length; + + if (!(contentLength === length)) { + _context.next = 32; + break; + } + + return _context.abrupt("return"); + + case 32: + data = Object.assign(Object.create(null), this.fieldData); + _context.next = 35; + return this._parseFileSize(length); + + case 35: + data.fileSize = _context.sent; + freezeFieldData(data); + + this._updateUI(); + + case 38: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function open() { + return _open.apply(this, arguments); + } + + return open; + }() + }, { + key: "close", + value: function close() { + this.overlayManager.close(this.overlayName); + } + }, { + key: "setDocument", + value: function setDocument(pdfDocument) { + var url = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + + if (this.pdfDocument) { + this._reset(); + + this._updateUI(true); + } + + if (!pdfDocument) { + return; + } + + this.pdfDocument = pdfDocument; + this.url = url; + + this._dataAvailableCapability.resolve(); + } + }, { + key: "_reset", + value: function _reset() { + this.pdfDocument = null; + this.url = null; + delete this.fieldData; + this._dataAvailableCapability = (0, _pdfjsLib.createPromiseCapability)(); + this._currentPageNumber = 1; + this._pagesRotation = 0; + } + }, { + key: "_updateUI", + value: function _updateUI() { + var reset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + if (reset || !this.fieldData) { + for (var id in this.fields) { + this.fields[id].textContent = DEFAULT_FIELD_CONTENT; + } + + return; + } + + if (this.overlayManager.active !== this.overlayName) { + return; + } + + for (var _id in this.fields) { + var content = this.fieldData[_id]; + this.fields[_id].textContent = content || content === 0 ? content : DEFAULT_FIELD_CONTENT; + } + } + }, { + key: "_parseFileSize", + value: function () { + var _parseFileSize2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee2() { + var fileSize, + kb, + mb, + _args2 = arguments; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + fileSize = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : 0; + kb = fileSize / 1024, mb = kb / 1024; + + if (kb) { + _context2.next = 4; + break; + } + + return _context2.abrupt("return", undefined); + + case 4: + return _context2.abrupt("return", this.l10n.get("document_properties_".concat(mb >= 1 ? "mb" : "kb"), { + size_mb: mb >= 1 && (+mb.toPrecision(3)).toLocaleString(), + size_kb: mb < 1 && (+kb.toPrecision(3)).toLocaleString(), + size_b: fileSize.toLocaleString() + })); + + case 5: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function _parseFileSize() { + return _parseFileSize2.apply(this, arguments); + } + + return _parseFileSize; + }() + }, { + key: "_parsePageSize", + value: function () { + var _parsePageSize2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee3(pageSizeInches, pagesRotation) { + var isPortrait, sizeInches, sizeMillimeters, rawName, exactMillimeters, intMillimeters, _yield$Promise$all3, _yield$Promise$all4, _yield$Promise$all4$, width, height, unit, name, orientation; + + return _regenerator["default"].wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + if (pageSizeInches) { + _context3.next = 2; + break; + } + + return _context3.abrupt("return", undefined); + + case 2: + if (pagesRotation % 180 !== 0) { + pageSizeInches = { + width: pageSizeInches.height, + height: pageSizeInches.width + }; + } + + isPortrait = (0, _ui_utils.isPortraitOrientation)(pageSizeInches); + sizeInches = { + width: Math.round(pageSizeInches.width * 100) / 100, + height: Math.round(pageSizeInches.height * 100) / 100 + }; + sizeMillimeters = { + width: Math.round(pageSizeInches.width * 25.4 * 10) / 10, + height: Math.round(pageSizeInches.height * 25.4 * 10) / 10 + }; + rawName = getPageName(sizeInches, isPortrait, US_PAGE_NAMES) || getPageName(sizeMillimeters, isPortrait, METRIC_PAGE_NAMES); + + if (!rawName && !(Number.isInteger(sizeMillimeters.width) && Number.isInteger(sizeMillimeters.height))) { + exactMillimeters = { + width: pageSizeInches.width * 25.4, + height: pageSizeInches.height * 25.4 + }; + intMillimeters = { + width: Math.round(sizeMillimeters.width), + height: Math.round(sizeMillimeters.height) + }; + + if (Math.abs(exactMillimeters.width - intMillimeters.width) < 0.1 && Math.abs(exactMillimeters.height - intMillimeters.height) < 0.1) { + rawName = getPageName(intMillimeters, isPortrait, METRIC_PAGE_NAMES); + + if (rawName) { + sizeInches = { + width: Math.round(intMillimeters.width / 25.4 * 100) / 100, + height: Math.round(intMillimeters.height / 25.4 * 100) / 100 + }; + sizeMillimeters = intMillimeters; + } + } + } + + _context3.next = 10; + return Promise.all([this._isNonMetricLocale ? sizeInches : sizeMillimeters, this.l10n.get("document_properties_page_size_unit_".concat(this._isNonMetricLocale ? "inches" : "millimeters")), rawName && this.l10n.get("document_properties_page_size_name_".concat(rawName.toLowerCase())), this.l10n.get("document_properties_page_size_orientation_".concat(isPortrait ? "portrait" : "landscape"))]); + + case 10: + _yield$Promise$all3 = _context3.sent; + _yield$Promise$all4 = _slicedToArray(_yield$Promise$all3, 4); + _yield$Promise$all4$ = _yield$Promise$all4[0]; + width = _yield$Promise$all4$.width; + height = _yield$Promise$all4$.height; + unit = _yield$Promise$all4[1]; + name = _yield$Promise$all4[2]; + orientation = _yield$Promise$all4[3]; + return _context3.abrupt("return", this.l10n.get("document_properties_page_size_dimension_".concat(name ? "name_" : "", "string"), { + width: width.toLocaleString(), + height: height.toLocaleString(), + unit: unit, + name: name, + orientation: orientation + })); + + case 19: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function _parsePageSize(_x, _x2) { + return _parsePageSize2.apply(this, arguments); + } + + return _parsePageSize; + }() + }, { + key: "_parseDate", + value: function () { + var _parseDate2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee4(inputDate) { + var dateObject; + return _regenerator["default"].wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + dateObject = _pdfjsLib.PDFDateString.toDateObject(inputDate); + + if (dateObject) { + _context4.next = 3; + break; + } + + return _context4.abrupt("return", undefined); + + case 3: + return _context4.abrupt("return", this.l10n.get("document_properties_date_string", { + date: dateObject.toLocaleDateString(), + time: dateObject.toLocaleTimeString() + })); + + case 4: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function _parseDate(_x3) { + return _parseDate2.apply(this, arguments); + } + + return _parseDate; + }() + }, { + key: "_parseLinearization", + value: function _parseLinearization(isLinearized) { + return this.l10n.get("document_properties_linearized_".concat(isLinearized ? "yes" : "no")); + } + }]); + + return PDFDocumentProperties; +}(); + +exports.PDFDocumentProperties = PDFDocumentProperties; + +/***/ }), +/* 16 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PDFFindBar = void 0; + +var _pdf_find_controller = __webpack_require__(17); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var MATCHES_COUNT_LIMIT = 1000; + +var PDFFindBar = /*#__PURE__*/function () { + function PDFFindBar(options, eventBus, l10n) { + var _this = this; + + _classCallCheck(this, PDFFindBar); + + this.opened = false; + this.bar = options.bar; + this.toggleButton = options.toggleButton; + this.findField = options.findField; + this.highlightAll = options.highlightAllCheckbox; + this.caseSensitive = options.caseSensitiveCheckbox; + this.entireWord = options.entireWordCheckbox; + this.findMsg = options.findMsg; + this.findResultsCount = options.findResultsCount; + this.findPreviousButton = options.findPreviousButton; + this.findNextButton = options.findNextButton; + this.eventBus = eventBus; + this.l10n = l10n; + this.toggleButton.addEventListener("click", function () { + _this.toggle(); + }); + this.findField.addEventListener("input", function () { + _this.dispatchEvent(""); + }); + this.bar.addEventListener("keydown", function (e) { + switch (e.keyCode) { + case 13: + if (e.target === _this.findField) { + _this.dispatchEvent("again", e.shiftKey); + } + + break; + + case 27: + _this.close(); + + break; + } + }); + this.findPreviousButton.addEventListener("click", function () { + _this.dispatchEvent("again", true); + }); + this.findNextButton.addEventListener("click", function () { + _this.dispatchEvent("again", false); + }); + this.highlightAll.addEventListener("click", function () { + _this.dispatchEvent("highlightallchange"); + }); + this.caseSensitive.addEventListener("click", function () { + _this.dispatchEvent("casesensitivitychange"); + }); + this.entireWord.addEventListener("click", function () { + _this.dispatchEvent("entirewordchange"); + }); + + this.eventBus._on("resize", this._adjustWidth.bind(this)); + } + + _createClass(PDFFindBar, [{ + key: "reset", + value: function reset() { + this.updateUIState(); + } + }, { + key: "dispatchEvent", + value: function dispatchEvent(type, findPrev) { + this.eventBus.dispatch("find", { + source: this, + type: type, + query: this.findField.value, + phraseSearch: true, + caseSensitive: this.caseSensitive.checked, + entireWord: this.entireWord.checked, + highlightAll: this.highlightAll.checked, + findPrevious: findPrev + }); + } + }, { + key: "updateUIState", + value: function updateUIState(state, previous, matchesCount) { + var _this2 = this; + + var findMsg = Promise.resolve(""); + var status = ""; + + switch (state) { + case _pdf_find_controller.FindState.FOUND: + break; + + case _pdf_find_controller.FindState.PENDING: + status = "pending"; + break; + + case _pdf_find_controller.FindState.NOT_FOUND: + findMsg = this.l10n.get("find_not_found"); + status = "notFound"; + break; + + case _pdf_find_controller.FindState.WRAPPED: + findMsg = this.l10n.get("find_reached_".concat(previous ? "top" : "bottom")); + break; + } + + this.findField.setAttribute("data-status", status); + findMsg.then(function (msg) { + _this2.findMsg.textContent = msg; + + _this2._adjustWidth(); + }); + this.updateResultsCount(matchesCount); + } + }, { + key: "updateResultsCount", + value: function updateResultsCount() { + var _this3 = this; + + var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + _ref$current = _ref.current, + current = _ref$current === void 0 ? 0 : _ref$current, + _ref$total = _ref.total, + total = _ref$total === void 0 ? 0 : _ref$total; + + var limit = MATCHES_COUNT_LIMIT; + var matchCountMsg = Promise.resolve(""); + + if (total > 0) { + if (total > limit) { + var key = "find_match_count_limit"; + matchCountMsg = this.l10n.get(key, { + limit: limit + }); + } else { + var _key = "find_match_count"; + matchCountMsg = this.l10n.get(_key, { + current: current, + total: total + }); + } + } + + matchCountMsg.then(function (msg) { + _this3.findResultsCount.textContent = msg; + + _this3.findResultsCount.classList.toggle("hidden", !total); + + _this3._adjustWidth(); + }); + } + }, { + key: "open", + value: function open() { + if (!this.opened) { + this.opened = true; + this.toggleButton.classList.add("toggled"); + this.toggleButton.setAttribute("aria-expanded", "true"); + this.bar.classList.remove("hidden"); + } + + this.findField.select(); + this.findField.focus(); + + this._adjustWidth(); + } + }, { + key: "close", + value: function close() { + if (!this.opened) { + return; + } + + this.opened = false; + this.toggleButton.classList.remove("toggled"); + this.toggleButton.setAttribute("aria-expanded", "false"); + this.bar.classList.add("hidden"); + this.eventBus.dispatch("findbarclose", { + source: this + }); + } + }, { + key: "toggle", + value: function toggle() { + if (this.opened) { + this.close(); + } else { + this.open(); + } + } + }, { + key: "_adjustWidth", + value: function _adjustWidth() { + if (!this.opened) { + return; + } + + this.bar.classList.remove("wrapContainers"); + var findbarHeight = this.bar.clientHeight; + var inputContainerHeight = this.bar.firstElementChild.clientHeight; + + if (findbarHeight > inputContainerHeight) { + this.bar.classList.add("wrapContainers"); + } + } + }]); + + return PDFFindBar; +}(); + +exports.PDFFindBar = PDFFindBar; + +/***/ }), +/* 17 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PDFFindController = exports.FindState = void 0; + +var _pdfjsLib = __webpack_require__(7); + +var _pdf_find_utils = __webpack_require__(18); + +var _ui_utils = __webpack_require__(6); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +var FindState = { + FOUND: 0, + NOT_FOUND: 1, + WRAPPED: 2, + PENDING: 3 +}; +exports.FindState = FindState; +var FIND_TIMEOUT = 250; +var MATCH_SCROLL_OFFSET_TOP = -50; +var MATCH_SCROLL_OFFSET_LEFT = -400; +var CHARACTERS_TO_NORMALIZE = { + "\u2010": "-", + "\u2018": "'", + "\u2019": "'", + "\u201A": "'", + "\u201B": "'", + "\u201C": '"', + "\u201D": '"', + "\u201E": '"', + "\u201F": '"', + "\xBC": "1/4", + "\xBD": "1/2", + "\xBE": "3/4" +}; +var normalizationRegex = null; + +function normalize(text) { + if (!normalizationRegex) { + var replace = Object.keys(CHARACTERS_TO_NORMALIZE).join(""); + normalizationRegex = new RegExp("[".concat(replace, "]"), "g"); + } + + var diffs = null; + var normalizedText = text.replace(normalizationRegex, function (ch, index) { + var normalizedCh = CHARACTERS_TO_NORMALIZE[ch], + diff = normalizedCh.length - ch.length; + + if (diff !== 0) { + (diffs || (diffs = [])).push([index, diff]); + } + + return normalizedCh; + }); + return [normalizedText, diffs]; +} + +function getOriginalIndex(matchIndex) { + var diffs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + + if (!diffs) { + return matchIndex; + } + + var totalDiff = 0; + + var _iterator = _createForOfIteratorHelper(diffs), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var _step$value = _slicedToArray(_step.value, 2), + index = _step$value[0], + diff = _step$value[1]; + + var currentIndex = index + totalDiff; + + if (currentIndex >= matchIndex) { + break; + } + + if (currentIndex + diff > matchIndex) { + totalDiff += matchIndex - currentIndex; + break; + } + + totalDiff += diff; + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + return matchIndex - totalDiff; +} + +var PDFFindController = /*#__PURE__*/function () { + function PDFFindController(_ref) { + var linkService = _ref.linkService, + eventBus = _ref.eventBus; + + _classCallCheck(this, PDFFindController); + + this._linkService = linkService; + this._eventBus = eventBus; + + this._reset(); + + eventBus._on("findbarclose", this._onFindBarClose.bind(this)); + } + + _createClass(PDFFindController, [{ + key: "highlightMatches", + get: function get() { + return this._highlightMatches; + } + }, { + key: "pageMatches", + get: function get() { + return this._pageMatches; + } + }, { + key: "pageMatchesLength", + get: function get() { + return this._pageMatchesLength; + } + }, { + key: "selected", + get: function get() { + return this._selected; + } + }, { + key: "state", + get: function get() { + return this._state; + } + }, { + key: "setDocument", + value: function setDocument(pdfDocument) { + if (this._pdfDocument) { + this._reset(); + } + + if (!pdfDocument) { + return; + } + + this._pdfDocument = pdfDocument; + + this._firstPageCapability.resolve(); + } + }, { + key: "executeCommand", + value: function executeCommand(cmd, state) { + var _this = this; + + if (!state) { + return; + } + + var pdfDocument = this._pdfDocument; + + if (this._state === null || this._shouldDirtyMatch(cmd, state)) { + this._dirtyMatch = true; + } + + this._state = state; + + if (cmd !== "findhighlightallchange") { + this._updateUIState(FindState.PENDING); + } + + this._firstPageCapability.promise.then(function () { + if (!_this._pdfDocument || pdfDocument && _this._pdfDocument !== pdfDocument) { + return; + } + + _this._extractText(); + + var findbarClosed = !_this._highlightMatches; + var pendingTimeout = !!_this._findTimeout; + + if (_this._findTimeout) { + clearTimeout(_this._findTimeout); + _this._findTimeout = null; + } + + if (cmd === "find") { + _this._findTimeout = setTimeout(function () { + _this._nextMatch(); + + _this._findTimeout = null; + }, FIND_TIMEOUT); + } else if (_this._dirtyMatch) { + _this._nextMatch(); + } else if (cmd === "findagain") { + _this._nextMatch(); + + if (findbarClosed && _this._state.highlightAll) { + _this._updateAllPages(); + } + } else if (cmd === "findhighlightallchange") { + if (pendingTimeout) { + _this._nextMatch(); + } else { + _this._highlightMatches = true; + } + + _this._updateAllPages(); + } else { + _this._nextMatch(); + } + }); + } + }, { + key: "scrollMatchIntoView", + value: function scrollMatchIntoView(_ref2) { + var _ref2$element = _ref2.element, + element = _ref2$element === void 0 ? null : _ref2$element, + _ref2$selectedLeft = _ref2.selectedLeft, + selectedLeft = _ref2$selectedLeft === void 0 ? 0 : _ref2$selectedLeft, + _ref2$pageIndex = _ref2.pageIndex, + pageIndex = _ref2$pageIndex === void 0 ? -1 : _ref2$pageIndex, + _ref2$matchIndex = _ref2.matchIndex, + matchIndex = _ref2$matchIndex === void 0 ? -1 : _ref2$matchIndex; + + if (!this._scrollMatches || !element) { + return; + } else if (matchIndex === -1 || matchIndex !== this._selected.matchIdx) { + return; + } else if (pageIndex === -1 || pageIndex !== this._selected.pageIdx) { + return; + } + + this._scrollMatches = false; + var spot = { + top: MATCH_SCROLL_OFFSET_TOP, + left: selectedLeft + MATCH_SCROLL_OFFSET_LEFT + }; + (0, _ui_utils.scrollIntoView)(element, spot, true); + } + }, { + key: "_reset", + value: function _reset() { + this._highlightMatches = false; + this._scrollMatches = false; + this._pdfDocument = null; + this._pageMatches = []; + this._pageMatchesLength = []; + this._state = null; + this._selected = { + pageIdx: -1, + matchIdx: -1 + }; + this._offset = { + pageIdx: null, + matchIdx: null, + wrapped: false + }; + this._extractTextPromises = []; + this._pageContents = []; + this._pageDiffs = []; + this._matchesCountTotal = 0; + this._pagesToSearch = null; + this._pendingFindMatches = new Set(); + this._resumePageIdx = null; + this._dirtyMatch = false; + clearTimeout(this._findTimeout); + this._findTimeout = null; + this._firstPageCapability = (0, _pdfjsLib.createPromiseCapability)(); + } + }, { + key: "_query", + get: function get() { + if (this._state.query !== this._rawQuery) { + this._rawQuery = this._state.query; + + var _normalize = normalize(this._state.query); + + var _normalize2 = _slicedToArray(_normalize, 1); + + this._normalizedQuery = _normalize2[0]; + } + + return this._normalizedQuery; + } + }, { + key: "_shouldDirtyMatch", + value: function _shouldDirtyMatch(cmd, state) { + if (state.query !== this._state.query) { + return true; + } + + switch (cmd) { + case "findagain": + var pageNumber = this._selected.pageIdx + 1; + var linkService = this._linkService; + + if (pageNumber >= 1 && pageNumber <= linkService.pagesCount && pageNumber !== linkService.page && !linkService.isPageVisible(pageNumber)) { + return true; + } + + return false; + + case "findhighlightallchange": + return false; + } + + return true; + } + }, { + key: "_prepareMatches", + value: function _prepareMatches(matchesWithLength, matches, matchesLength) { + function isSubTerm(currentIndex) { + var currentElem = matchesWithLength[currentIndex]; + var nextElem = matchesWithLength[currentIndex + 1]; + + if (currentIndex < matchesWithLength.length - 1 && currentElem.match === nextElem.match) { + currentElem.skipped = true; + return true; + } + + for (var i = currentIndex - 1; i >= 0; i--) { + var prevElem = matchesWithLength[i]; + + if (prevElem.skipped) { + continue; + } + + if (prevElem.match + prevElem.matchLength < currentElem.match) { + break; + } + + if (prevElem.match + prevElem.matchLength >= currentElem.match + currentElem.matchLength) { + currentElem.skipped = true; + return true; + } + } + + return false; + } + + matchesWithLength.sort(function (a, b) { + return a.match === b.match ? a.matchLength - b.matchLength : a.match - b.match; + }); + + for (var i = 0, len = matchesWithLength.length; i < len; i++) { + if (isSubTerm(i)) { + continue; + } + + matches.push(matchesWithLength[i].match); + matchesLength.push(matchesWithLength[i].matchLength); + } + } + }, { + key: "_isEntireWord", + value: function _isEntireWord(content, startIdx, length) { + if (startIdx > 0) { + var first = content.charCodeAt(startIdx); + var limit = content.charCodeAt(startIdx - 1); + + if ((0, _pdf_find_utils.getCharacterType)(first) === (0, _pdf_find_utils.getCharacterType)(limit)) { + return false; + } + } + + var endIdx = startIdx + length - 1; + + if (endIdx < content.length - 1) { + var last = content.charCodeAt(endIdx); + + var _limit = content.charCodeAt(endIdx + 1); + + if ((0, _pdf_find_utils.getCharacterType)(last) === (0, _pdf_find_utils.getCharacterType)(_limit)) { + return false; + } + } + + return true; + } + }, { + key: "_calculatePhraseMatch", + value: function _calculatePhraseMatch(query, pageIndex, pageContent, pageDiffs, entireWord) { + var matches = [], + matchesLength = []; + var queryLen = query.length; + var matchIdx = -queryLen; + + while (true) { + matchIdx = pageContent.indexOf(query, matchIdx + queryLen); + + if (matchIdx === -1) { + break; + } + + if (entireWord && !this._isEntireWord(pageContent, matchIdx, queryLen)) { + continue; + } + + var originalMatchIdx = getOriginalIndex(matchIdx, pageDiffs), + matchEnd = matchIdx + queryLen - 1, + originalQueryLen = getOriginalIndex(matchEnd, pageDiffs) - originalMatchIdx + 1; + matches.push(originalMatchIdx); + matchesLength.push(originalQueryLen); + } + + this._pageMatches[pageIndex] = matches; + this._pageMatchesLength[pageIndex] = matchesLength; + } + }, { + key: "_calculateWordMatch", + value: function _calculateWordMatch(query, pageIndex, pageContent, pageDiffs, entireWord) { + var matchesWithLength = []; + var queryArray = query.match(/\S+/g); + + for (var i = 0, len = queryArray.length; i < len; i++) { + var subquery = queryArray[i]; + var subqueryLen = subquery.length; + var matchIdx = -subqueryLen; + + while (true) { + matchIdx = pageContent.indexOf(subquery, matchIdx + subqueryLen); + + if (matchIdx === -1) { + break; + } + + if (entireWord && !this._isEntireWord(pageContent, matchIdx, subqueryLen)) { + continue; + } + + var originalMatchIdx = getOriginalIndex(matchIdx, pageDiffs), + matchEnd = matchIdx + subqueryLen - 1, + originalQueryLen = getOriginalIndex(matchEnd, pageDiffs) - originalMatchIdx + 1; + matchesWithLength.push({ + match: originalMatchIdx, + matchLength: originalQueryLen, + skipped: false + }); + } + } + + this._pageMatchesLength[pageIndex] = []; + this._pageMatches[pageIndex] = []; + + this._prepareMatches(matchesWithLength, this._pageMatches[pageIndex], this._pageMatchesLength[pageIndex]); + } + }, { + key: "_calculateMatch", + value: function _calculateMatch(pageIndex) { + var pageContent = this._pageContents[pageIndex]; + var pageDiffs = this._pageDiffs[pageIndex]; + var query = this._query; + var _this$_state = this._state, + caseSensitive = _this$_state.caseSensitive, + entireWord = _this$_state.entireWord, + phraseSearch = _this$_state.phraseSearch; + + if (query.length === 0) { + return; + } + + if (!caseSensitive) { + pageContent = pageContent.toLowerCase(); + query = query.toLowerCase(); + } + + if (phraseSearch) { + this._calculatePhraseMatch(query, pageIndex, pageContent, pageDiffs, entireWord); + } else { + this._calculateWordMatch(query, pageIndex, pageContent, pageDiffs, entireWord); + } + + if (this._state.highlightAll) { + this._updatePage(pageIndex); + } + + if (this._resumePageIdx === pageIndex) { + this._resumePageIdx = null; + + this._nextPageMatch(); + } + + var pageMatchesCount = this._pageMatches[pageIndex].length; + + if (pageMatchesCount > 0) { + this._matchesCountTotal += pageMatchesCount; + + this._updateUIResultsCount(); + } + } + }, { + key: "_extractText", + value: function _extractText() { + var _this2 = this; + + if (this._extractTextPromises.length > 0) { + return; + } + + var promise = Promise.resolve(); + + var _loop = function _loop(i, ii) { + var extractTextCapability = (0, _pdfjsLib.createPromiseCapability)(); + _this2._extractTextPromises[i] = extractTextCapability.promise; + promise = promise.then(function () { + return _this2._pdfDocument.getPage(i + 1).then(function (pdfPage) { + return pdfPage.getTextContent({ + normalizeWhitespace: true + }); + }).then(function (textContent) { + var textItems = textContent.items; + var strBuf = []; + + for (var j = 0, jj = textItems.length; j < jj; j++) { + strBuf.push(textItems[j].str); + } + + var _normalize3 = normalize(strBuf.join("")); + + var _normalize4 = _slicedToArray(_normalize3, 2); + + _this2._pageContents[i] = _normalize4[0]; + _this2._pageDiffs[i] = _normalize4[1]; + extractTextCapability.resolve(i); + }, function (reason) { + console.error("Unable to get text content for page ".concat(i + 1), reason); + _this2._pageContents[i] = ""; + _this2._pageDiffs[i] = null; + extractTextCapability.resolve(i); + }); + }); + }; + + for (var i = 0, ii = this._linkService.pagesCount; i < ii; i++) { + _loop(i, ii); + } + } + }, { + key: "_updatePage", + value: function _updatePage(index) { + if (this._scrollMatches && this._selected.pageIdx === index) { + this._linkService.page = index + 1; + } + + this._eventBus.dispatch("updatetextlayermatches", { + source: this, + pageIndex: index + }); + } + }, { + key: "_updateAllPages", + value: function _updateAllPages() { + this._eventBus.dispatch("updatetextlayermatches", { + source: this, + pageIndex: -1 + }); + } + }, { + key: "_nextMatch", + value: function _nextMatch() { + var _this3 = this; + + var previous = this._state.findPrevious; + var currentPageIndex = this._linkService.page - 1; + var numPages = this._linkService.pagesCount; + this._highlightMatches = true; + + if (this._dirtyMatch) { + this._dirtyMatch = false; + this._selected.pageIdx = this._selected.matchIdx = -1; + this._offset.pageIdx = currentPageIndex; + this._offset.matchIdx = null; + this._offset.wrapped = false; + this._resumePageIdx = null; + this._pageMatches.length = 0; + this._pageMatchesLength.length = 0; + this._matchesCountTotal = 0; + + this._updateAllPages(); + + for (var i = 0; i < numPages; i++) { + if (this._pendingFindMatches.has(i)) { + continue; + } + + this._pendingFindMatches.add(i); + + this._extractTextPromises[i].then(function (pageIdx) { + _this3._pendingFindMatches["delete"](pageIdx); + + _this3._calculateMatch(pageIdx); + }); + } + } + + if (this._query === "") { + this._updateUIState(FindState.FOUND); + + return; + } + + if (this._resumePageIdx) { + return; + } + + var offset = this._offset; + this._pagesToSearch = numPages; + + if (offset.matchIdx !== null) { + var numPageMatches = this._pageMatches[offset.pageIdx].length; + + if (!previous && offset.matchIdx + 1 < numPageMatches || previous && offset.matchIdx > 0) { + offset.matchIdx = previous ? offset.matchIdx - 1 : offset.matchIdx + 1; + + this._updateMatch(true); + + return; + } + + this._advanceOffsetPage(previous); + } + + this._nextPageMatch(); + } + }, { + key: "_matchesReady", + value: function _matchesReady(matches) { + var offset = this._offset; + var numMatches = matches.length; + var previous = this._state.findPrevious; + + if (numMatches) { + offset.matchIdx = previous ? numMatches - 1 : 0; + + this._updateMatch(true); + + return true; + } + + this._advanceOffsetPage(previous); + + if (offset.wrapped) { + offset.matchIdx = null; + + if (this._pagesToSearch < 0) { + this._updateMatch(false); + + return true; + } + } + + return false; + } + }, { + key: "_nextPageMatch", + value: function _nextPageMatch() { + if (this._resumePageIdx !== null) { + console.error("There can only be one pending page."); + } + + var matches = null; + + do { + var pageIdx = this._offset.pageIdx; + matches = this._pageMatches[pageIdx]; + + if (!matches) { + this._resumePageIdx = pageIdx; + break; + } + } while (!this._matchesReady(matches)); + } + }, { + key: "_advanceOffsetPage", + value: function _advanceOffsetPage(previous) { + var offset = this._offset; + var numPages = this._linkService.pagesCount; + offset.pageIdx = previous ? offset.pageIdx - 1 : offset.pageIdx + 1; + offset.matchIdx = null; + this._pagesToSearch--; + + if (offset.pageIdx >= numPages || offset.pageIdx < 0) { + offset.pageIdx = previous ? numPages - 1 : 0; + offset.wrapped = true; + } + } + }, { + key: "_updateMatch", + value: function _updateMatch() { + var found = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var state = FindState.NOT_FOUND; + var wrapped = this._offset.wrapped; + this._offset.wrapped = false; + + if (found) { + var previousPage = this._selected.pageIdx; + this._selected.pageIdx = this._offset.pageIdx; + this._selected.matchIdx = this._offset.matchIdx; + state = wrapped ? FindState.WRAPPED : FindState.FOUND; + + if (previousPage !== -1 && previousPage !== this._selected.pageIdx) { + this._updatePage(previousPage); + } + } + + this._updateUIState(state, this._state.findPrevious); + + if (this._selected.pageIdx !== -1) { + this._scrollMatches = true; + + this._updatePage(this._selected.pageIdx); + } + } + }, { + key: "_onFindBarClose", + value: function _onFindBarClose(evt) { + var _this4 = this; + + var pdfDocument = this._pdfDocument; + + this._firstPageCapability.promise.then(function () { + if (!_this4._pdfDocument || pdfDocument && _this4._pdfDocument !== pdfDocument) { + return; + } + + if (_this4._findTimeout) { + clearTimeout(_this4._findTimeout); + _this4._findTimeout = null; + } + + if (_this4._resumePageIdx) { + _this4._resumePageIdx = null; + _this4._dirtyMatch = true; + } + + _this4._updateUIState(FindState.FOUND); + + _this4._highlightMatches = false; + + _this4._updateAllPages(); + }); + } + }, { + key: "_requestMatchesCount", + value: function _requestMatchesCount() { + var _this$_selected = this._selected, + pageIdx = _this$_selected.pageIdx, + matchIdx = _this$_selected.matchIdx; + var current = 0, + total = this._matchesCountTotal; + + if (matchIdx !== -1) { + for (var i = 0; i < pageIdx; i++) { + var _this$_pageMatches$i; + + current += ((_this$_pageMatches$i = this._pageMatches[i]) === null || _this$_pageMatches$i === void 0 ? void 0 : _this$_pageMatches$i.length) || 0; + } + + current += matchIdx + 1; + } + + if (current < 1 || current > total) { + current = total = 0; + } + + return { + current: current, + total: total + }; + } + }, { + key: "_updateUIResultsCount", + value: function _updateUIResultsCount() { + this._eventBus.dispatch("updatefindmatchescount", { + source: this, + matchesCount: this._requestMatchesCount() + }); + } + }, { + key: "_updateUIState", + value: function _updateUIState(state, previous) { + var _this$_state$query, _this$_state2; + + this._eventBus.dispatch("updatefindcontrolstate", { + source: this, + state: state, + previous: previous, + matchesCount: this._requestMatchesCount(), + rawQuery: (_this$_state$query = (_this$_state2 = this._state) === null || _this$_state2 === void 0 ? void 0 : _this$_state2.query) !== null && _this$_state$query !== void 0 ? _this$_state$query : null + }); + } + }]); + + return PDFFindController; +}(); + +exports.PDFFindController = PDFFindController; + +/***/ }), +/* 18 */ +/***/ ((__unused_webpack_module, exports) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.getCharacterType = getCharacterType; +exports.CharacterType = void 0; +var CharacterType = { + SPACE: 0, + ALPHA_LETTER: 1, + PUNCT: 2, + HAN_LETTER: 3, + KATAKANA_LETTER: 4, + HIRAGANA_LETTER: 5, + HALFWIDTH_KATAKANA_LETTER: 6, + THAI_LETTER: 7 +}; +exports.CharacterType = CharacterType; + +function isAlphabeticalScript(charCode) { + return charCode < 0x2e80; +} + +function isAscii(charCode) { + return (charCode & 0xff80) === 0; +} + +function isAsciiAlpha(charCode) { + return charCode >= 0x61 && charCode <= 0x7a || charCode >= 0x41 && charCode <= 0x5a; +} + +function isAsciiDigit(charCode) { + return charCode >= 0x30 && charCode <= 0x39; +} + +function isAsciiSpace(charCode) { + return charCode === 0x20 || charCode === 0x09 || charCode === 0x0d || charCode === 0x0a; +} + +function isHan(charCode) { + return charCode >= 0x3400 && charCode <= 0x9fff || charCode >= 0xf900 && charCode <= 0xfaff; +} + +function isKatakana(charCode) { + return charCode >= 0x30a0 && charCode <= 0x30ff; +} + +function isHiragana(charCode) { + return charCode >= 0x3040 && charCode <= 0x309f; +} + +function isHalfwidthKatakana(charCode) { + return charCode >= 0xff60 && charCode <= 0xff9f; +} + +function isThai(charCode) { + return (charCode & 0xff80) === 0x0e00; +} + +function getCharacterType(charCode) { + if (isAlphabeticalScript(charCode)) { + if (isAscii(charCode)) { + if (isAsciiSpace(charCode)) { + return CharacterType.SPACE; + } else if (isAsciiAlpha(charCode) || isAsciiDigit(charCode) || charCode === 0x5f) { + return CharacterType.ALPHA_LETTER; + } + + return CharacterType.PUNCT; + } else if (isThai(charCode)) { + return CharacterType.THAI_LETTER; + } else if (charCode === 0xa0) { + return CharacterType.SPACE; + } + + return CharacterType.ALPHA_LETTER; + } + + if (isHan(charCode)) { + return CharacterType.HAN_LETTER; + } else if (isKatakana(charCode)) { + return CharacterType.KATAKANA_LETTER; + } else if (isHiragana(charCode)) { + return CharacterType.HIRAGANA_LETTER; + } else if (isHalfwidthKatakana(charCode)) { + return CharacterType.HALFWIDTH_KATAKANA_LETTER; + } + + return CharacterType.ALPHA_LETTER; +} + +/***/ }), +/* 19 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.isDestArraysEqual = isDestArraysEqual; +exports.isDestHashesEqual = isDestHashesEqual; +exports.PDFHistory = void 0; + +var _ui_utils = __webpack_require__(6); + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var HASH_CHANGE_TIMEOUT = 1000; +var POSITION_UPDATED_THRESHOLD = 50; +var UPDATE_VIEWAREA_TIMEOUT = 1000; + +function getCurrentHash() { + return document.location.hash; +} + +var PDFHistory = /*#__PURE__*/function () { + function PDFHistory(_ref) { + var _this = this; + + var linkService = _ref.linkService, + eventBus = _ref.eventBus; + + _classCallCheck(this, PDFHistory); + + this.linkService = linkService; + this.eventBus = eventBus; + this._initialized = false; + this._fingerprint = ""; + this.reset(); + this._boundEvents = null; + this._isViewerInPresentationMode = false; + + this.eventBus._on("presentationmodechanged", function (evt) { + _this._isViewerInPresentationMode = evt.state !== _ui_utils.PresentationModeState.NORMAL; + }); + + this.eventBus._on("pagesinit", function () { + _this._isPagesLoaded = false; + + _this.eventBus._on("pagesloaded", function (evt) { + _this._isPagesLoaded = !!evt.pagesCount; + }, { + once: true + }); + }); + } + + _createClass(PDFHistory, [{ + key: "initialize", + value: function initialize(_ref2) { + var fingerprint = _ref2.fingerprint, + _ref2$resetHistory = _ref2.resetHistory, + resetHistory = _ref2$resetHistory === void 0 ? false : _ref2$resetHistory, + _ref2$updateUrl = _ref2.updateUrl, + updateUrl = _ref2$updateUrl === void 0 ? false : _ref2$updateUrl; + + if (!fingerprint || typeof fingerprint !== "string") { + console.error('PDFHistory.initialize: The "fingerprint" must be a non-empty string.'); + return; + } + + if (this._initialized) { + this.reset(); + } + + var reInitialized = this._fingerprint !== "" && this._fingerprint !== fingerprint; + this._fingerprint = fingerprint; + this._updateUrl = updateUrl === true; + this._initialized = true; + + this._bindEvents(); + + var state = window.history.state; + this._popStateInProgress = false; + this._blockHashChange = 0; + this._currentHash = getCurrentHash(); + this._numPositionUpdates = 0; + this._uid = this._maxUid = 0; + this._destination = null; + this._position = null; + + if (!this._isValidState(state, true) || resetHistory) { + var _this$_parseCurrentHa = this._parseCurrentHash(true), + hash = _this$_parseCurrentHa.hash, + page = _this$_parseCurrentHa.page, + rotation = _this$_parseCurrentHa.rotation; + + if (!hash || reInitialized || resetHistory) { + this._pushOrReplaceState(null, true); + + return; + } + + this._pushOrReplaceState({ + hash: hash, + page: page, + rotation: rotation + }, true); + + return; + } + + var destination = state.destination; + + this._updateInternalState(destination, state.uid, true); + + if (destination.rotation !== undefined) { + this._initialRotation = destination.rotation; + } + + if (destination.dest) { + this._initialBookmark = JSON.stringify(destination.dest); + this._destination.page = null; + } else if (destination.hash) { + this._initialBookmark = destination.hash; + } else if (destination.page) { + this._initialBookmark = "page=".concat(destination.page); + } + } + }, { + key: "reset", + value: function reset() { + if (this._initialized) { + this._pageHide(); + + this._initialized = false; + + this._unbindEvents(); + } + + if (this._updateViewareaTimeout) { + clearTimeout(this._updateViewareaTimeout); + this._updateViewareaTimeout = null; + } + + this._initialBookmark = null; + this._initialRotation = null; + } + }, { + key: "push", + value: function push(_ref3) { + var _this2 = this; + + var _ref3$namedDest = _ref3.namedDest, + namedDest = _ref3$namedDest === void 0 ? null : _ref3$namedDest, + explicitDest = _ref3.explicitDest, + pageNumber = _ref3.pageNumber; + + if (!this._initialized) { + return; + } + + if (namedDest && typeof namedDest !== "string") { + console.error("PDFHistory.push: " + "\"".concat(namedDest, "\" is not a valid namedDest parameter.")); + return; + } else if (!Array.isArray(explicitDest)) { + console.error("PDFHistory.push: " + "\"".concat(explicitDest, "\" is not a valid explicitDest parameter.")); + return; + } else if (!this._isValidPage(pageNumber)) { + if (pageNumber !== null || this._destination) { + console.error("PDFHistory.push: " + "\"".concat(pageNumber, "\" is not a valid pageNumber parameter.")); + return; + } + } + + var hash = namedDest || JSON.stringify(explicitDest); + + if (!hash) { + return; + } + + var forceReplace = false; + + if (this._destination && (isDestHashesEqual(this._destination.hash, hash) || isDestArraysEqual(this._destination.dest, explicitDest))) { + if (this._destination.page) { + return; + } + + forceReplace = true; + } + + if (this._popStateInProgress && !forceReplace) { + return; + } + + this._pushOrReplaceState({ + dest: explicitDest, + hash: hash, + page: pageNumber, + rotation: this.linkService.rotation + }, forceReplace); + + if (!this._popStateInProgress) { + this._popStateInProgress = true; + Promise.resolve().then(function () { + _this2._popStateInProgress = false; + }); + } + } + }, { + key: "pushPage", + value: function pushPage(pageNumber) { + var _this$_destination, + _this3 = this; + + if (!this._initialized) { + return; + } + + if (!this._isValidPage(pageNumber)) { + console.error("PDFHistory.pushPage: \"".concat(pageNumber, "\" is not a valid page number.")); + return; + } + + if (((_this$_destination = this._destination) === null || _this$_destination === void 0 ? void 0 : _this$_destination.page) === pageNumber) { + return; + } + + if (this._popStateInProgress) { + return; + } + + this._pushOrReplaceState({ + dest: null, + hash: "page=".concat(pageNumber), + page: pageNumber, + rotation: this.linkService.rotation + }); + + if (!this._popStateInProgress) { + this._popStateInProgress = true; + Promise.resolve().then(function () { + _this3._popStateInProgress = false; + }); + } + } + }, { + key: "pushCurrentPosition", + value: function pushCurrentPosition() { + if (!this._initialized || this._popStateInProgress) { + return; + } + + this._tryPushCurrentPosition(); + } + }, { + key: "back", + value: function back() { + if (!this._initialized || this._popStateInProgress) { + return; + } + + var state = window.history.state; + + if (this._isValidState(state) && state.uid > 0) { + window.history.back(); + } + } + }, { + key: "forward", + value: function forward() { + if (!this._initialized || this._popStateInProgress) { + return; + } + + var state = window.history.state; + + if (this._isValidState(state) && state.uid < this._maxUid) { + window.history.forward(); + } + } + }, { + key: "popStateInProgress", + get: function get() { + return this._initialized && (this._popStateInProgress || this._blockHashChange > 0); + } + }, { + key: "initialBookmark", + get: function get() { + return this._initialized ? this._initialBookmark : null; + } + }, { + key: "initialRotation", + get: function get() { + return this._initialized ? this._initialRotation : null; + } + }, { + key: "_pushOrReplaceState", + value: function _pushOrReplaceState(destination) { + var forceReplace = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var shouldReplace = forceReplace || !this._destination; + var newState = { + fingerprint: this._fingerprint, + uid: shouldReplace ? this._uid : this._uid + 1, + destination: destination + }; + + this._updateInternalState(destination, newState.uid); + + var newUrl; + + if (this._updateUrl && destination !== null && destination !== void 0 && destination.hash) { + var baseUrl = document.location.href.split("#")[0]; + + if (!baseUrl.startsWith("file://")) { + newUrl = "".concat(baseUrl, "#").concat(destination.hash); + } + } + + if (shouldReplace) { + window.history.replaceState(newState, "", newUrl); + } else { + window.history.pushState(newState, "", newUrl); + } + } + }, { + key: "_tryPushCurrentPosition", + value: function _tryPushCurrentPosition() { + var temporary = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + if (!this._position) { + return; + } + + var position = this._position; + + if (temporary) { + position = Object.assign(Object.create(null), this._position); + position.temporary = true; + } + + if (!this._destination) { + this._pushOrReplaceState(position); + + return; + } + + if (this._destination.temporary) { + this._pushOrReplaceState(position, true); + + return; + } + + if (this._destination.hash === position.hash) { + return; + } + + if (!this._destination.page && (POSITION_UPDATED_THRESHOLD <= 0 || this._numPositionUpdates <= POSITION_UPDATED_THRESHOLD)) { + return; + } + + var forceReplace = false; + + if (this._destination.page >= position.first && this._destination.page <= position.page) { + if (this._destination.dest !== undefined || !this._destination.first) { + return; + } + + forceReplace = true; + } + + this._pushOrReplaceState(position, forceReplace); + } + }, { + key: "_isValidPage", + value: function _isValidPage(val) { + return Number.isInteger(val) && val > 0 && val <= this.linkService.pagesCount; + } + }, { + key: "_isValidState", + value: function _isValidState(state) { + var checkReload = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + if (!state) { + return false; + } + + if (state.fingerprint !== this._fingerprint) { + if (checkReload) { + if (typeof state.fingerprint !== "string" || state.fingerprint.length !== this._fingerprint.length) { + return false; + } + + var _performance$getEntri = performance.getEntriesByType("navigation"), + _performance$getEntri2 = _slicedToArray(_performance$getEntri, 1), + perfEntry = _performance$getEntri2[0]; + + if ((perfEntry === null || perfEntry === void 0 ? void 0 : perfEntry.type) !== "reload") { + return false; + } + } else { + return false; + } + } + + if (!Number.isInteger(state.uid) || state.uid < 0) { + return false; + } + + if (state.destination === null || _typeof(state.destination) !== "object") { + return false; + } + + return true; + } + }, { + key: "_updateInternalState", + value: function _updateInternalState(destination, uid) { + var removeTemporary = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + + if (this._updateViewareaTimeout) { + clearTimeout(this._updateViewareaTimeout); + this._updateViewareaTimeout = null; + } + + if (removeTemporary && destination !== null && destination !== void 0 && destination.temporary) { + delete destination.temporary; + } + + this._destination = destination; + this._uid = uid; + this._maxUid = Math.max(this._maxUid, uid); + this._numPositionUpdates = 0; + } + }, { + key: "_parseCurrentHash", + value: function _parseCurrentHash() { + var checkNameddest = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var hash = unescape(getCurrentHash()).substring(1); + var params = (0, _ui_utils.parseQueryString)(hash); + var nameddest = params.nameddest || ""; + var page = params.page | 0; + + if (!this._isValidPage(page) || checkNameddest && nameddest.length > 0) { + page = null; + } + + return { + hash: hash, + page: page, + rotation: this.linkService.rotation + }; + } + }, { + key: "_updateViewarea", + value: function _updateViewarea(_ref4) { + var _this4 = this; + + var location = _ref4.location; + + if (this._updateViewareaTimeout) { + clearTimeout(this._updateViewareaTimeout); + this._updateViewareaTimeout = null; + } + + this._position = { + hash: this._isViewerInPresentationMode ? "page=".concat(location.pageNumber) : location.pdfOpenParams.substring(1), + page: this.linkService.page, + first: location.pageNumber, + rotation: location.rotation + }; + + if (this._popStateInProgress) { + return; + } + + if (POSITION_UPDATED_THRESHOLD > 0 && this._isPagesLoaded && this._destination && !this._destination.page) { + this._numPositionUpdates++; + } + + if (UPDATE_VIEWAREA_TIMEOUT > 0) { + this._updateViewareaTimeout = setTimeout(function () { + if (!_this4._popStateInProgress) { + _this4._tryPushCurrentPosition(true); + } + + _this4._updateViewareaTimeout = null; + }, UPDATE_VIEWAREA_TIMEOUT); + } + } + }, { + key: "_popState", + value: function _popState(_ref5) { + var _this5 = this; + + var state = _ref5.state; + var newHash = getCurrentHash(), + hashChanged = this._currentHash !== newHash; + this._currentHash = newHash; + + if (!state) { + this._uid++; + + var _this$_parseCurrentHa2 = this._parseCurrentHash(), + hash = _this$_parseCurrentHa2.hash, + page = _this$_parseCurrentHa2.page, + rotation = _this$_parseCurrentHa2.rotation; + + this._pushOrReplaceState({ + hash: hash, + page: page, + rotation: rotation + }, true); + + return; + } + + if (!this._isValidState(state)) { + return; + } + + this._popStateInProgress = true; + + if (hashChanged) { + this._blockHashChange++; + (0, _ui_utils.waitOnEventOrTimeout)({ + target: window, + name: "hashchange", + delay: HASH_CHANGE_TIMEOUT + }).then(function () { + _this5._blockHashChange--; + }); + } + + var destination = state.destination; + + this._updateInternalState(destination, state.uid, true); + + if ((0, _ui_utils.isValidRotation)(destination.rotation)) { + this.linkService.rotation = destination.rotation; + } + + if (destination.dest) { + this.linkService.goToDestination(destination.dest); + } else if (destination.hash) { + this.linkService.setHash(destination.hash); + } else if (destination.page) { + this.linkService.page = destination.page; + } + + Promise.resolve().then(function () { + _this5._popStateInProgress = false; + }); + } + }, { + key: "_pageHide", + value: function _pageHide() { + if (!this._destination || this._destination.temporary) { + this._tryPushCurrentPosition(); + } + } + }, { + key: "_bindEvents", + value: function _bindEvents() { + if (this._boundEvents) { + return; + } + + this._boundEvents = { + updateViewarea: this._updateViewarea.bind(this), + popState: this._popState.bind(this), + pageHide: this._pageHide.bind(this) + }; + + this.eventBus._on("updateviewarea", this._boundEvents.updateViewarea); + + window.addEventListener("popstate", this._boundEvents.popState); + window.addEventListener("pagehide", this._boundEvents.pageHide); + } + }, { + key: "_unbindEvents", + value: function _unbindEvents() { + if (!this._boundEvents) { + return; + } + + this.eventBus._off("updateviewarea", this._boundEvents.updateViewarea); + + window.removeEventListener("popstate", this._boundEvents.popState); + window.removeEventListener("pagehide", this._boundEvents.pageHide); + this._boundEvents = null; + } + }]); + + return PDFHistory; +}(); + +exports.PDFHistory = PDFHistory; + +function isDestHashesEqual(destHash, pushHash) { + if (typeof destHash !== "string" || typeof pushHash !== "string") { + return false; + } + + if (destHash === pushHash) { + return true; + } + + var _parseQueryString = (0, _ui_utils.parseQueryString)(destHash), + nameddest = _parseQueryString.nameddest; + + if (nameddest === pushHash) { + return true; + } + + return false; +} + +function isDestArraysEqual(firstDest, secondDest) { + function isEntryEqual(first, second) { + if (_typeof(first) !== _typeof(second)) { + return false; + } + + if (Array.isArray(first) || Array.isArray(second)) { + return false; + } + + if (first !== null && _typeof(first) === "object" && second !== null) { + if (Object.keys(first).length !== Object.keys(second).length) { + return false; + } + + for (var key in first) { + if (!isEntryEqual(first[key], second[key])) { + return false; + } + } + + return true; + } + + return first === second || Number.isNaN(first) && Number.isNaN(second); + } + + if (!(Array.isArray(firstDest) && Array.isArray(secondDest))) { + return false; + } + + if (firstDest.length !== secondDest.length) { + return false; + } + + for (var i = 0, ii = firstDest.length; i < ii; i++) { + if (!isEntryEqual(firstDest[i], secondDest[i])) { + return false; + } + } + + return true; +} + +/***/ }), +/* 20 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PDFLayerViewer = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__(4)); + +var _base_tree_viewer = __webpack_require__(14); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); } + +function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +var PDFLayerViewer = /*#__PURE__*/function (_BaseTreeViewer) { + _inherits(PDFLayerViewer, _BaseTreeViewer); + + var _super = _createSuper(PDFLayerViewer); + + function PDFLayerViewer(options) { + var _this; + + _classCallCheck(this, PDFLayerViewer); + + _this = _super.call(this, options); + _this.l10n = options.l10n; + + _this.eventBus._on("resetlayers", _this._resetLayers.bind(_assertThisInitialized(_this))); + + _this.eventBus._on("togglelayerstree", _this._toggleAllTreeItems.bind(_assertThisInitialized(_this))); + + return _this; + } + + _createClass(PDFLayerViewer, [{ + key: "reset", + value: function reset() { + _get(_getPrototypeOf(PDFLayerViewer.prototype), "reset", this).call(this); + + this._optionalContentConfig = null; + } + }, { + key: "_dispatchEvent", + value: function _dispatchEvent(layersCount) { + this.eventBus.dispatch("layersloaded", { + source: this, + layersCount: layersCount + }); + } + }, { + key: "_bindLink", + value: function _bindLink(element, _ref) { + var _this2 = this; + + var groupId = _ref.groupId, + input = _ref.input; + + var setVisibility = function setVisibility() { + _this2._optionalContentConfig.setVisibility(groupId, input.checked); + + _this2.eventBus.dispatch("optionalcontentconfig", { + source: _this2, + promise: Promise.resolve(_this2._optionalContentConfig) + }); + }; + + element.onclick = function (evt) { + if (evt.target === input) { + setVisibility(); + return true; + } else if (evt.target !== element) { + return true; + } + + input.checked = !input.checked; + setVisibility(); + return false; + }; + } + }, { + key: "_setNestedName", + value: function () { + var _setNestedName2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee(element, _ref2) { + var _ref2$name, name; + + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _ref2$name = _ref2.name, name = _ref2$name === void 0 ? null : _ref2$name; + + if (!(typeof name === "string")) { + _context.next = 4; + break; + } + + element.textContent = this._normalizeTextContent(name); + return _context.abrupt("return"); + + case 4: + _context.next = 6; + return this.l10n.get("additional_layers"); + + case 6: + element.textContent = _context.sent; + element.style.fontStyle = "italic"; + + case 8: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function _setNestedName(_x, _x2) { + return _setNestedName2.apply(this, arguments); + } + + return _setNestedName; + }() + }, { + key: "_addToggleButton", + value: function _addToggleButton(div, _ref3) { + var _ref3$name = _ref3.name, + name = _ref3$name === void 0 ? null : _ref3$name; + + _get(_getPrototypeOf(PDFLayerViewer.prototype), "_addToggleButton", this).call(this, div, name === null); + } + }, { + key: "_toggleAllTreeItems", + value: function _toggleAllTreeItems() { + if (!this._optionalContentConfig) { + return; + } + + _get(_getPrototypeOf(PDFLayerViewer.prototype), "_toggleAllTreeItems", this).call(this); + } + }, { + key: "render", + value: function render(_ref4) { + var optionalContentConfig = _ref4.optionalContentConfig, + pdfDocument = _ref4.pdfDocument; + + if (this._optionalContentConfig) { + this.reset(); + } + + this._optionalContentConfig = optionalContentConfig || null; + this._pdfDocument = pdfDocument || null; + var groups = optionalContentConfig === null || optionalContentConfig === void 0 ? void 0 : optionalContentConfig.getOrder(); + + if (!groups) { + this._dispatchEvent(0); + + return; + } + + var fragment = document.createDocumentFragment(), + queue = [{ + parent: fragment, + groups: groups + }]; + var layersCount = 0, + hasAnyNesting = false; + + while (queue.length > 0) { + var levelData = queue.shift(); + + var _iterator = _createForOfIteratorHelper(levelData.groups), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var groupId = _step.value; + var div = document.createElement("div"); + div.className = "treeItem"; + var element = document.createElement("a"); + div.appendChild(element); + + if (_typeof(groupId) === "object") { + hasAnyNesting = true; + + this._addToggleButton(div, groupId); + + this._setNestedName(element, groupId); + + var itemsDiv = document.createElement("div"); + itemsDiv.className = "treeItems"; + div.appendChild(itemsDiv); + queue.push({ + parent: itemsDiv, + groups: groupId.order + }); + } else { + var group = optionalContentConfig.getGroup(groupId); + var input = document.createElement("input"); + + this._bindLink(element, { + groupId: groupId, + input: input + }); + + input.type = "checkbox"; + input.id = groupId; + input.checked = group.visible; + var label = document.createElement("label"); + label.setAttribute("for", groupId); + label.textContent = this._normalizeTextContent(group.name); + element.appendChild(input); + element.appendChild(label); + layersCount++; + } + + levelData.parent.appendChild(div); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } + + this._finishRendering(fragment, layersCount, hasAnyNesting); + } + }, { + key: "_resetLayers", + value: function () { + var _resetLayers2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee2() { + var optionalContentConfig; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + if (this._optionalContentConfig) { + _context2.next = 2; + break; + } + + return _context2.abrupt("return"); + + case 2: + _context2.next = 4; + return this._pdfDocument.getOptionalContentConfig(); + + case 4: + optionalContentConfig = _context2.sent; + this.eventBus.dispatch("optionalcontentconfig", { + source: this, + promise: Promise.resolve(optionalContentConfig) + }); + this.render({ + optionalContentConfig: optionalContentConfig, + pdfDocument: this._pdfDocument + }); + + case 7: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function _resetLayers() { + return _resetLayers2.apply(this, arguments); + } + + return _resetLayers; + }() + }]); + + return PDFLayerViewer; +}(_base_tree_viewer.BaseTreeViewer); + +exports.PDFLayerViewer = PDFLayerViewer; + +/***/ }), +/* 21 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.SimpleLinkService = exports.PDFLinkService = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__(4)); + +var _ui_utils = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var PDFLinkService = /*#__PURE__*/function () { + function PDFLinkService() { + var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + eventBus = _ref.eventBus, + _ref$externalLinkTarg = _ref.externalLinkTarget, + externalLinkTarget = _ref$externalLinkTarg === void 0 ? null : _ref$externalLinkTarg, + _ref$externalLinkRel = _ref.externalLinkRel, + externalLinkRel = _ref$externalLinkRel === void 0 ? null : _ref$externalLinkRel, + _ref$ignoreDestinatio = _ref.ignoreDestinationZoom, + ignoreDestinationZoom = _ref$ignoreDestinatio === void 0 ? false : _ref$ignoreDestinatio; + + _classCallCheck(this, PDFLinkService); + + this.eventBus = eventBus; + this.externalLinkTarget = externalLinkTarget; + this.externalLinkRel = externalLinkRel; + this.externalLinkEnabled = true; + this._ignoreDestinationZoom = ignoreDestinationZoom; + this.baseUrl = null; + this.pdfDocument = null; + this.pdfViewer = null; + this.pdfHistory = null; + this._pagesRefCache = null; + } + + _createClass(PDFLinkService, [{ + key: "setDocument", + value: function setDocument(pdfDocument) { + var baseUrl = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + this.baseUrl = baseUrl; + this.pdfDocument = pdfDocument; + this._pagesRefCache = Object.create(null); + } + }, { + key: "setViewer", + value: function setViewer(pdfViewer) { + this.pdfViewer = pdfViewer; + } + }, { + key: "setHistory", + value: function setHistory(pdfHistory) { + this.pdfHistory = pdfHistory; + } + }, { + key: "pagesCount", + get: function get() { + return this.pdfDocument ? this.pdfDocument.numPages : 0; + } + }, { + key: "page", + get: function get() { + return this.pdfViewer.currentPageNumber; + }, + set: function set(value) { + this.pdfViewer.currentPageNumber = value; + } + }, { + key: "rotation", + get: function get() { + return this.pdfViewer.pagesRotation; + }, + set: function set(value) { + this.pdfViewer.pagesRotation = value; + } + }, { + key: "_goToDestinationHelper", + value: function _goToDestinationHelper(rawDest) { + var _this = this; + + var namedDest = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + var explicitDest = arguments.length > 2 ? arguments[2] : undefined; + var destRef = explicitDest[0]; + var pageNumber; + + if (_typeof(destRef) === "object" && destRef !== null) { + pageNumber = this._cachedPageNumber(destRef); + + if (pageNumber === null) { + this.pdfDocument.getPageIndex(destRef).then(function (pageIndex) { + _this.cachePageRef(pageIndex + 1, destRef); + + _this._goToDestinationHelper(rawDest, namedDest, explicitDest); + })["catch"](function () { + console.error("PDFLinkService._goToDestinationHelper: \"".concat(destRef, "\" is not ") + "a valid page reference, for dest=\"".concat(rawDest, "\".")); + }); + return; + } + } else if (Number.isInteger(destRef)) { + pageNumber = destRef + 1; + } else { + console.error("PDFLinkService._goToDestinationHelper: \"".concat(destRef, "\" is not ") + "a valid destination reference, for dest=\"".concat(rawDest, "\".")); + return; + } + + if (!pageNumber || pageNumber < 1 || pageNumber > this.pagesCount) { + console.error("PDFLinkService._goToDestinationHelper: \"".concat(pageNumber, "\" is not ") + "a valid page number, for dest=\"".concat(rawDest, "\".")); + return; + } + + if (this.pdfHistory) { + this.pdfHistory.pushCurrentPosition(); + this.pdfHistory.push({ + namedDest: namedDest, + explicitDest: explicitDest, + pageNumber: pageNumber + }); + } + + this.pdfViewer.scrollPageIntoView({ + pageNumber: pageNumber, + destArray: explicitDest, + ignoreDestinationZoom: this._ignoreDestinationZoom + }); + } + }, { + key: "goToDestination", + value: function () { + var _goToDestination = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee(dest) { + var namedDest, explicitDest; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + if (this.pdfDocument) { + _context.next = 2; + break; + } + + return _context.abrupt("return"); + + case 2: + if (!(typeof dest === "string")) { + _context.next = 9; + break; + } + + namedDest = dest; + _context.next = 6; + return this.pdfDocument.getDestination(dest); + + case 6: + explicitDest = _context.sent; + _context.next = 13; + break; + + case 9: + namedDest = null; + _context.next = 12; + return dest; + + case 12: + explicitDest = _context.sent; + + case 13: + if (Array.isArray(explicitDest)) { + _context.next = 16; + break; + } + + console.error("PDFLinkService.goToDestination: \"".concat(explicitDest, "\" is not ") + "a valid destination array, for dest=\"".concat(dest, "\".")); + return _context.abrupt("return"); + + case 16: + this._goToDestinationHelper(dest, namedDest, explicitDest); + + case 17: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function goToDestination(_x) { + return _goToDestination.apply(this, arguments); + } + + return goToDestination; + }() + }, { + key: "goToPage", + value: function goToPage(val) { + if (!this.pdfDocument) { + return; + } + + var pageNumber = typeof val === "string" && this.pdfViewer.pageLabelToPageNumber(val) || val | 0; + + if (!(Number.isInteger(pageNumber) && pageNumber > 0 && pageNumber <= this.pagesCount)) { + console.error("PDFLinkService.goToPage: \"".concat(val, "\" is not a valid page.")); + return; + } + + if (this.pdfHistory) { + this.pdfHistory.pushCurrentPosition(); + this.pdfHistory.pushPage(pageNumber); + } + + this.pdfViewer.scrollPageIntoView({ + pageNumber: pageNumber + }); + } + }, { + key: "getDestinationHash", + value: function getDestinationHash(dest) { + if (typeof dest === "string") { + if (dest.length > 0) { + return this.getAnchorUrl("#" + escape(dest)); + } + } else if (Array.isArray(dest)) { + var str = JSON.stringify(dest); + + if (str.length > 0) { + return this.getAnchorUrl("#" + escape(str)); + } + } + + return this.getAnchorUrl(""); + } + }, { + key: "getAnchorUrl", + value: function getAnchorUrl(anchor) { + return (this.baseUrl || "") + anchor; + } + }, { + key: "setHash", + value: function setHash(hash) { + if (!this.pdfDocument) { + return; + } + + var pageNumber, dest; + + if (hash.includes("=")) { + var params = (0, _ui_utils.parseQueryString)(hash); + + if ("search" in params) { + this.eventBus.dispatch("findfromurlhash", { + source: this, + query: params.search.replace(/"/g, ""), + phraseSearch: params.phrase === "true" + }); + } + + if ("page" in params) { + pageNumber = params.page | 0 || 1; + } + + if ("zoom" in params) { + var zoomArgs = params.zoom.split(","); + var zoomArg = zoomArgs[0]; + var zoomArgNumber = parseFloat(zoomArg); + + if (!zoomArg.includes("Fit")) { + dest = [null, { + name: "XYZ" + }, zoomArgs.length > 1 ? zoomArgs[1] | 0 : null, zoomArgs.length > 2 ? zoomArgs[2] | 0 : null, zoomArgNumber ? zoomArgNumber / 100 : zoomArg]; + } else { + if (zoomArg === "Fit" || zoomArg === "FitB") { + dest = [null, { + name: zoomArg + }]; + } else if (zoomArg === "FitH" || zoomArg === "FitBH" || zoomArg === "FitV" || zoomArg === "FitBV") { + dest = [null, { + name: zoomArg + }, zoomArgs.length > 1 ? zoomArgs[1] | 0 : null]; + } else if (zoomArg === "FitR") { + if (zoomArgs.length !== 5) { + console.error('PDFLinkService.setHash: Not enough parameters for "FitR".'); + } else { + dest = [null, { + name: zoomArg + }, zoomArgs[1] | 0, zoomArgs[2] | 0, zoomArgs[3] | 0, zoomArgs[4] | 0]; + } + } else { + console.error("PDFLinkService.setHash: \"".concat(zoomArg, "\" is not ") + "a valid zoom value."); + } + } + } + + if (dest) { + this.pdfViewer.scrollPageIntoView({ + pageNumber: pageNumber || this.page, + destArray: dest, + allowNegativeOffset: true + }); + } else if (pageNumber) { + this.page = pageNumber; + } + + if ("pagemode" in params) { + this.eventBus.dispatch("pagemode", { + source: this, + mode: params.pagemode + }); + } + + if ("nameddest" in params) { + this.goToDestination(params.nameddest); + } + } else { + dest = unescape(hash); + + try { + dest = JSON.parse(dest); + + if (!Array.isArray(dest)) { + dest = dest.toString(); + } + } catch (ex) {} + + if (typeof dest === "string" || isValidExplicitDestination(dest)) { + this.goToDestination(dest); + return; + } + + console.error("PDFLinkService.setHash: \"".concat(unescape(hash), "\" is not ") + "a valid destination."); + } + } + }, { + key: "executeNamedAction", + value: function executeNamedAction(action) { + switch (action) { + case "GoBack": + if (this.pdfHistory) { + this.pdfHistory.back(); + } + + break; + + case "GoForward": + if (this.pdfHistory) { + this.pdfHistory.forward(); + } + + break; + + case "NextPage": + this.pdfViewer.nextPage(); + break; + + case "PrevPage": + this.pdfViewer.previousPage(); + break; + + case "LastPage": + this.page = this.pagesCount; + break; + + case "FirstPage": + this.page = 1; + break; + + default: + break; + } + + this.eventBus.dispatch("namedaction", { + source: this, + action: action + }); + } + }, { + key: "cachePageRef", + value: function cachePageRef(pageNum, pageRef) { + if (!pageRef) { + return; + } + + var refStr = pageRef.gen === 0 ? "".concat(pageRef.num, "R") : "".concat(pageRef.num, "R").concat(pageRef.gen); + this._pagesRefCache[refStr] = pageNum; + } + }, { + key: "_cachedPageNumber", + value: function _cachedPageNumber(pageRef) { + var _this$_pagesRefCache; + + var refStr = pageRef.gen === 0 ? "".concat(pageRef.num, "R") : "".concat(pageRef.num, "R").concat(pageRef.gen); + return ((_this$_pagesRefCache = this._pagesRefCache) === null || _this$_pagesRefCache === void 0 ? void 0 : _this$_pagesRefCache[refStr]) || null; + } + }, { + key: "isPageVisible", + value: function isPageVisible(pageNumber) { + return this.pdfViewer.isPageVisible(pageNumber); + } + }, { + key: "isPageCached", + value: function isPageCached(pageNumber) { + return this.pdfViewer.isPageCached(pageNumber); + } + }]); + + return PDFLinkService; +}(); + +exports.PDFLinkService = PDFLinkService; + +function isValidExplicitDestination(dest) { + if (!Array.isArray(dest)) { + return false; + } + + var destLength = dest.length; + + if (destLength < 2) { + return false; + } + + var page = dest[0]; + + if (!(_typeof(page) === "object" && Number.isInteger(page.num) && Number.isInteger(page.gen)) && !(Number.isInteger(page) && page >= 0)) { + return false; + } + + var zoom = dest[1]; + + if (!(_typeof(zoom) === "object" && typeof zoom.name === "string")) { + return false; + } + + var allowNull = true; + + switch (zoom.name) { + case "XYZ": + if (destLength !== 5) { + return false; + } + + break; + + case "Fit": + case "FitB": + return destLength === 2; + + case "FitH": + case "FitBH": + case "FitV": + case "FitBV": + if (destLength !== 3) { + return false; + } + + break; + + case "FitR": + if (destLength !== 6) { + return false; + } + + allowNull = false; + break; + + default: + return false; + } + + for (var i = 2; i < destLength; i++) { + var param = dest[i]; + + if (!(typeof param === "number" || allowNull && param === null)) { + return false; + } + } + + return true; +} + +var SimpleLinkService = /*#__PURE__*/function () { + function SimpleLinkService() { + _classCallCheck(this, SimpleLinkService); + + this.externalLinkTarget = null; + this.externalLinkRel = null; + this.externalLinkEnabled = true; + this._ignoreDestinationZoom = false; + } + + _createClass(SimpleLinkService, [{ + key: "pagesCount", + get: function get() { + return 0; + } + }, { + key: "page", + get: function get() { + return 0; + }, + set: function set(value) {} + }, { + key: "rotation", + get: function get() { + return 0; + }, + set: function set(value) {} + }, { + key: "goToDestination", + value: function () { + var _goToDestination2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee2(dest) { + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + case "end": + return _context2.stop(); + } + } + }, _callee2); + })); + + function goToDestination(_x2) { + return _goToDestination2.apply(this, arguments); + } + + return goToDestination; + }() + }, { + key: "goToPage", + value: function goToPage(val) {} + }, { + key: "getDestinationHash", + value: function getDestinationHash(dest) { + return "#"; + } + }, { + key: "getAnchorUrl", + value: function getAnchorUrl(hash) { + return "#"; + } + }, { + key: "setHash", + value: function setHash(hash) {} + }, { + key: "executeNamedAction", + value: function executeNamedAction(action) {} + }, { + key: "cachePageRef", + value: function cachePageRef(pageNum, pageRef) {} + }, { + key: "isPageVisible", + value: function isPageVisible(pageNumber) { + return true; + } + }, { + key: "isPageCached", + value: function isPageCached(pageNumber) { + return true; + } + }]); + + return SimpleLinkService; +}(); + +exports.SimpleLinkService = SimpleLinkService; + +/***/ }), +/* 22 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PDFOutlineViewer = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__(4)); + +var _pdfjsLib = __webpack_require__(7); + +var _base_tree_viewer = __webpack_require__(14); + +var _ui_utils = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } + +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } + +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); } + +function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +var PDFOutlineViewer = /*#__PURE__*/function (_BaseTreeViewer) { + _inherits(PDFOutlineViewer, _BaseTreeViewer); + + var _super = _createSuper(PDFOutlineViewer); + + function PDFOutlineViewer(options) { + var _this; + + _classCallCheck(this, PDFOutlineViewer); + + _this = _super.call(this, options); + _this.linkService = options.linkService; + + _this.eventBus._on("toggleoutlinetree", _this._toggleAllTreeItems.bind(_assertThisInitialized(_this))); + + _this.eventBus._on("currentoutlineitem", _this._currentOutlineItem.bind(_assertThisInitialized(_this))); + + _this.eventBus._on("pagechanging", function (evt) { + _this._currentPageNumber = evt.pageNumber; + }); + + _this.eventBus._on("pagesloaded", function (evt) { + _this._isPagesLoaded = !!evt.pagesCount; + + if (_this._currentOutlineItemCapability && !_this._currentOutlineItemCapability.settled) { + _this._currentOutlineItemCapability.resolve(_this._isPagesLoaded); + } + }); + + _this.eventBus._on("sidebarviewchanged", function (evt) { + _this._sidebarView = evt.view; + }); + + return _this; + } + + _createClass(PDFOutlineViewer, [{ + key: "reset", + value: function reset() { + _get(_getPrototypeOf(PDFOutlineViewer.prototype), "reset", this).call(this); + + this._outline = null; + this._pageNumberToDestHashCapability = null; + this._currentPageNumber = 1; + this._isPagesLoaded = false; + + if (this._currentOutlineItemCapability && !this._currentOutlineItemCapability.settled) { + this._currentOutlineItemCapability.resolve(false); + } + + this._currentOutlineItemCapability = null; + } + }, { + key: "_dispatchEvent", + value: function _dispatchEvent(outlineCount) { + var _this$_pdfDocument; + + this._currentOutlineItemCapability = (0, _pdfjsLib.createPromiseCapability)(); + + if (outlineCount === 0 || (_this$_pdfDocument = this._pdfDocument) !== null && _this$_pdfDocument !== void 0 && _this$_pdfDocument.loadingParams.disableAutoFetch) { + this._currentOutlineItemCapability.resolve(false); + } else if (this._isPagesLoaded) { + this._currentOutlineItemCapability.resolve(true); + } + + this.eventBus.dispatch("outlineloaded", { + source: this, + outlineCount: outlineCount, + currentOutlineItemPromise: this._currentOutlineItemCapability.promise + }); + } + }, { + key: "_bindLink", + value: function _bindLink(element, _ref) { + var _this2 = this; + + var url = _ref.url, + newWindow = _ref.newWindow, + dest = _ref.dest; + var linkService = this.linkService; + + if (url) { + (0, _pdfjsLib.addLinkAttributes)(element, { + url: url, + target: newWindow ? _pdfjsLib.LinkTarget.BLANK : linkService.externalLinkTarget, + rel: linkService.externalLinkRel, + enabled: linkService.externalLinkEnabled + }); + return; + } + + element.href = linkService.getDestinationHash(dest); + + element.onclick = function (evt) { + _this2._updateCurrentTreeItem(evt.target.parentNode); + + if (dest) { + linkService.goToDestination(dest); + } + + return false; + }; + } + }, { + key: "_setStyles", + value: function _setStyles(element, _ref2) { + var bold = _ref2.bold, + italic = _ref2.italic; + + if (bold) { + element.style.fontWeight = "bold"; + } + + if (italic) { + element.style.fontStyle = "italic"; + } + } + }, { + key: "_addToggleButton", + value: function _addToggleButton(div, _ref3) { + var count = _ref3.count, + items = _ref3.items; + var hidden = false; + + if (count < 0) { + var totalCount = items.length; + + if (totalCount > 0) { + var queue = _toConsumableArray(items); + + while (queue.length > 0) { + var _queue$shift = queue.shift(), + nestedCount = _queue$shift.count, + nestedItems = _queue$shift.items; + + if (nestedCount > 0 && nestedItems.length > 0) { + totalCount += nestedItems.length; + queue.push.apply(queue, _toConsumableArray(nestedItems)); + } + } + } + + if (Math.abs(count) === totalCount) { + hidden = true; + } + } + + _get(_getPrototypeOf(PDFOutlineViewer.prototype), "_addToggleButton", this).call(this, div, hidden); + } + }, { + key: "_toggleAllTreeItems", + value: function _toggleAllTreeItems() { + if (!this._outline) { + return; + } + + _get(_getPrototypeOf(PDFOutlineViewer.prototype), "_toggleAllTreeItems", this).call(this); + } + }, { + key: "render", + value: function render(_ref4) { + var outline = _ref4.outline, + pdfDocument = _ref4.pdfDocument; + + if (this._outline) { + this.reset(); + } + + this._outline = outline || null; + this._pdfDocument = pdfDocument || null; + + if (!outline) { + this._dispatchEvent(0); + + return; + } + + var fragment = document.createDocumentFragment(); + var queue = [{ + parent: fragment, + items: outline + }]; + var outlineCount = 0, + hasAnyNesting = false; + + while (queue.length > 0) { + var levelData = queue.shift(); + + var _iterator = _createForOfIteratorHelper(levelData.items), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var item = _step.value; + var div = document.createElement("div"); + div.className = "treeItem"; + var element = document.createElement("a"); + + this._bindLink(element, item); + + this._setStyles(element, item); + + element.textContent = this._normalizeTextContent(item.title); + div.appendChild(element); + + if (item.items.length > 0) { + hasAnyNesting = true; + + this._addToggleButton(div, item); + + var itemsDiv = document.createElement("div"); + itemsDiv.className = "treeItems"; + div.appendChild(itemsDiv); + queue.push({ + parent: itemsDiv, + items: item.items + }); + } + + levelData.parent.appendChild(div); + outlineCount++; + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } + + this._finishRendering(fragment, outlineCount, hasAnyNesting); + } + }, { + key: "_currentOutlineItem", + value: function () { + var _currentOutlineItem2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee() { + var pageNumberToDestHash, i, destHash, linkElement; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + if (this._isPagesLoaded) { + _context.next = 2; + break; + } + + throw new Error("_currentOutlineItem: All pages have not been loaded."); + + case 2: + if (!(!this._outline || !this._pdfDocument)) { + _context.next = 4; + break; + } + + return _context.abrupt("return"); + + case 4: + _context.next = 6; + return this._getPageNumberToDestHash(this._pdfDocument); + + case 6: + pageNumberToDestHash = _context.sent; + + if (pageNumberToDestHash) { + _context.next = 9; + break; + } + + return _context.abrupt("return"); + + case 9: + this._updateCurrentTreeItem(null); + + if (!(this._sidebarView !== _ui_utils.SidebarView.OUTLINE)) { + _context.next = 12; + break; + } + + return _context.abrupt("return"); + + case 12: + i = this._currentPageNumber; + + case 13: + if (!(i > 0)) { + _context.next = 25; + break; + } + + destHash = pageNumberToDestHash.get(i); + + if (destHash) { + _context.next = 17; + break; + } + + return _context.abrupt("continue", 22); + + case 17: + linkElement = this.container.querySelector("a[href=\"".concat(destHash, "\"]")); + + if (linkElement) { + _context.next = 20; + break; + } + + return _context.abrupt("continue", 22); + + case 20: + this._scrollToCurrentTreeItem(linkElement.parentNode); + + return _context.abrupt("break", 25); + + case 22: + i--; + _context.next = 13; + break; + + case 25: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function _currentOutlineItem() { + return _currentOutlineItem2.apply(this, arguments); + } + + return _currentOutlineItem; + }() + }, { + key: "_getPageNumberToDestHash", + value: function () { + var _getPageNumberToDestHash2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee2(pdfDocument) { + var pageNumberToDestHash, pageNumberNesting, queue, levelData, currentNesting, _iterator2, _step2, _step2$value, dest, items, explicitDest, pageNumber, _explicitDest, _explicitDest2, destRef, destHash; + + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + if (!this._pageNumberToDestHashCapability) { + _context2.next = 2; + break; + } + + return _context2.abrupt("return", this._pageNumberToDestHashCapability.promise); + + case 2: + this._pageNumberToDestHashCapability = (0, _pdfjsLib.createPromiseCapability)(); + pageNumberToDestHash = new Map(), pageNumberNesting = new Map(); + queue = [{ + nesting: 0, + items: this._outline + }]; + + case 5: + if (!(queue.length > 0)) { + _context2.next = 56; + break; + } + + levelData = queue.shift(), currentNesting = levelData.nesting; + _iterator2 = _createForOfIteratorHelper(levelData.items); + _context2.prev = 8; + + _iterator2.s(); + + case 10: + if ((_step2 = _iterator2.n()).done) { + _context2.next = 46; + break; + } + + _step2$value = _step2.value, dest = _step2$value.dest, items = _step2$value.items; + explicitDest = void 0, pageNumber = void 0; + + if (!(typeof dest === "string")) { + _context2.next = 21; + break; + } + + _context2.next = 16; + return pdfDocument.getDestination(dest); + + case 16: + explicitDest = _context2.sent; + + if (!(pdfDocument !== this._pdfDocument)) { + _context2.next = 19; + break; + } + + return _context2.abrupt("return", null); + + case 19: + _context2.next = 22; + break; + + case 21: + explicitDest = dest; + + case 22: + if (!Array.isArray(explicitDest)) { + _context2.next = 43; + break; + } + + _explicitDest = explicitDest, _explicitDest2 = _slicedToArray(_explicitDest, 1), destRef = _explicitDest2[0]; + + if (!(_typeof(destRef) === "object" && destRef !== null)) { + _context2.next = 41; + break; + } + + pageNumber = this.linkService._cachedPageNumber(destRef); + + if (pageNumber) { + _context2.next = 39; + break; + } + + _context2.prev = 27; + _context2.next = 30; + return pdfDocument.getPageIndex(destRef); + + case 30: + _context2.t0 = _context2.sent; + pageNumber = _context2.t0 + 1; + + if (!(pdfDocument !== this._pdfDocument)) { + _context2.next = 34; + break; + } + + return _context2.abrupt("return", null); + + case 34: + this.linkService.cachePageRef(pageNumber, destRef); + _context2.next = 39; + break; + + case 37: + _context2.prev = 37; + _context2.t1 = _context2["catch"](27); + + case 39: + _context2.next = 42; + break; + + case 41: + if (Number.isInteger(destRef)) { + pageNumber = destRef + 1; + } + + case 42: + if (Number.isInteger(pageNumber) && (!pageNumberToDestHash.has(pageNumber) || currentNesting > pageNumberNesting.get(pageNumber))) { + destHash = this.linkService.getDestinationHash(dest); + pageNumberToDestHash.set(pageNumber, destHash); + pageNumberNesting.set(pageNumber, currentNesting); + } + + case 43: + if (items.length > 0) { + queue.push({ + nesting: currentNesting + 1, + items: items + }); + } + + case 44: + _context2.next = 10; + break; + + case 46: + _context2.next = 51; + break; + + case 48: + _context2.prev = 48; + _context2.t2 = _context2["catch"](8); + + _iterator2.e(_context2.t2); + + case 51: + _context2.prev = 51; + + _iterator2.f(); + + return _context2.finish(51); + + case 54: + _context2.next = 5; + break; + + case 56: + this._pageNumberToDestHashCapability.resolve(pageNumberToDestHash.size > 0 ? pageNumberToDestHash : null); + + return _context2.abrupt("return", this._pageNumberToDestHashCapability.promise); + + case 58: + case "end": + return _context2.stop(); + } + } + }, _callee2, this, [[8, 48, 51, 54], [27, 37]]); + })); + + function _getPageNumberToDestHash(_x) { + return _getPageNumberToDestHash2.apply(this, arguments); + } + + return _getPageNumberToDestHash; + }() + }]); + + return PDFOutlineViewer; +}(_base_tree_viewer.BaseTreeViewer); + +exports.PDFOutlineViewer = PDFOutlineViewer; + +/***/ }), +/* 23 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PDFPresentationMode = void 0; + +var _ui_utils = __webpack_require__(6); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var DELAY_BEFORE_RESETTING_SWITCH_IN_PROGRESS = 1500; +var DELAY_BEFORE_HIDING_CONTROLS = 3000; +var ACTIVE_SELECTOR = "pdfPresentationMode"; +var CONTROLS_SELECTOR = "pdfPresentationModeControls"; +var MOUSE_SCROLL_COOLDOWN_TIME = 50; +var PAGE_SWITCH_THRESHOLD = 0.1; +var SWIPE_MIN_DISTANCE_THRESHOLD = 50; +var SWIPE_ANGLE_THRESHOLD = Math.PI / 6; + +var PDFPresentationMode = /*#__PURE__*/function () { + function PDFPresentationMode(_ref) { + var container = _ref.container, + pdfViewer = _ref.pdfViewer, + eventBus = _ref.eventBus; + + _classCallCheck(this, PDFPresentationMode); + + this.container = container; + this.pdfViewer = pdfViewer; + this.eventBus = eventBus; + this.active = false; + this.args = null; + this.contextMenuOpen = false; + this.mouseScrollTimeStamp = 0; + this.mouseScrollDelta = 0; + this.touchSwipeState = null; + } + + _createClass(PDFPresentationMode, [{ + key: "request", + value: function request() { + if (this.switchInProgress || this.active || !this.pdfViewer.pagesCount) { + return false; + } + + this._addFullscreenChangeListeners(); + + this._setSwitchInProgress(); + + this._notifyStateChange(); + + if (this.container.requestFullscreen) { + this.container.requestFullscreen(); + } else if (this.container.mozRequestFullScreen) { + this.container.mozRequestFullScreen(); + } else if (this.container.webkitRequestFullscreen) { + this.container.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); + } else { + return false; + } + + this.args = { + page: this.pdfViewer.currentPageNumber, + previousScale: this.pdfViewer.currentScaleValue + }; + return true; + } + }, { + key: "_mouseWheel", + value: function _mouseWheel(evt) { + if (!this.active) { + return; + } + + evt.preventDefault(); + var delta = (0, _ui_utils.normalizeWheelEventDelta)(evt); + var currentTime = Date.now(); + var storedTime = this.mouseScrollTimeStamp; + + if (currentTime > storedTime && currentTime - storedTime < MOUSE_SCROLL_COOLDOWN_TIME) { + return; + } + + if (this.mouseScrollDelta > 0 && delta < 0 || this.mouseScrollDelta < 0 && delta > 0) { + this._resetMouseScrollState(); + } + + this.mouseScrollDelta += delta; + + if (Math.abs(this.mouseScrollDelta) >= PAGE_SWITCH_THRESHOLD) { + var totalDelta = this.mouseScrollDelta; + + this._resetMouseScrollState(); + + var success = totalDelta > 0 ? this.pdfViewer.previousPage() : this.pdfViewer.nextPage(); + + if (success) { + this.mouseScrollTimeStamp = currentTime; + } + } + } + }, { + key: "isFullscreen", + get: function get() { + return !!(document.fullscreenElement || document.mozFullScreen || document.webkitIsFullScreen); + } + }, { + key: "_notifyStateChange", + value: function _notifyStateChange() { + var state = _ui_utils.PresentationModeState.NORMAL; + + if (this.switchInProgress) { + state = _ui_utils.PresentationModeState.CHANGING; + } else if (this.active) { + state = _ui_utils.PresentationModeState.FULLSCREEN; + } + + this.eventBus.dispatch("presentationmodechanged", { + source: this, + state: state + }); + } + }, { + key: "_setSwitchInProgress", + value: function _setSwitchInProgress() { + var _this = this; + + if (this.switchInProgress) { + clearTimeout(this.switchInProgress); + } + + this.switchInProgress = setTimeout(function () { + _this._removeFullscreenChangeListeners(); + + delete _this.switchInProgress; + + _this._notifyStateChange(); + }, DELAY_BEFORE_RESETTING_SWITCH_IN_PROGRESS); + } + }, { + key: "_resetSwitchInProgress", + value: function _resetSwitchInProgress() { + if (this.switchInProgress) { + clearTimeout(this.switchInProgress); + delete this.switchInProgress; + } + } + }, { + key: "_enter", + value: function _enter() { + var _this2 = this; + + this.active = true; + + this._resetSwitchInProgress(); + + this._notifyStateChange(); + + this.container.classList.add(ACTIVE_SELECTOR); + setTimeout(function () { + _this2.pdfViewer.currentPageNumber = _this2.args.page; + _this2.pdfViewer.currentScaleValue = "page-fit"; + }, 0); + + this._addWindowListeners(); + + this._showControls(); + + this.contextMenuOpen = false; + window.getSelection().removeAllRanges(); + } + }, { + key: "_exit", + value: function _exit() { + var _this3 = this; + + var page = this.pdfViewer.currentPageNumber; + this.container.classList.remove(ACTIVE_SELECTOR); + setTimeout(function () { + _this3.active = false; + + _this3._removeFullscreenChangeListeners(); + + _this3._notifyStateChange(); + + _this3.pdfViewer.currentScaleValue = _this3.args.previousScale; + _this3.pdfViewer.currentPageNumber = page; + _this3.args = null; + }, 0); + + this._removeWindowListeners(); + + this._hideControls(); + + this._resetMouseScrollState(); + + this.contextMenuOpen = false; + } + }, { + key: "_mouseDown", + value: function _mouseDown(evt) { + if (this.contextMenuOpen) { + this.contextMenuOpen = false; + evt.preventDefault(); + return; + } + + if (evt.button === 0) { + var isInternalLink = evt.target.href && evt.target.classList.contains("internalLink"); + + if (!isInternalLink) { + evt.preventDefault(); + + if (evt.shiftKey) { + this.pdfViewer.previousPage(); + } else { + this.pdfViewer.nextPage(); + } + } + } + } + }, { + key: "_contextMenu", + value: function _contextMenu() { + this.contextMenuOpen = true; + } + }, { + key: "_showControls", + value: function _showControls() { + var _this4 = this; + + if (this.controlsTimeout) { + clearTimeout(this.controlsTimeout); + } else { + this.container.classList.add(CONTROLS_SELECTOR); + } + + this.controlsTimeout = setTimeout(function () { + _this4.container.classList.remove(CONTROLS_SELECTOR); + + delete _this4.controlsTimeout; + }, DELAY_BEFORE_HIDING_CONTROLS); + } + }, { + key: "_hideControls", + value: function _hideControls() { + if (!this.controlsTimeout) { + return; + } + + clearTimeout(this.controlsTimeout); + this.container.classList.remove(CONTROLS_SELECTOR); + delete this.controlsTimeout; + } + }, { + key: "_resetMouseScrollState", + value: function _resetMouseScrollState() { + this.mouseScrollTimeStamp = 0; + this.mouseScrollDelta = 0; + } + }, { + key: "_touchSwipe", + value: function _touchSwipe(evt) { + if (!this.active) { + return; + } + + if (evt.touches.length > 1) { + this.touchSwipeState = null; + return; + } + + switch (evt.type) { + case "touchstart": + this.touchSwipeState = { + startX: evt.touches[0].pageX, + startY: evt.touches[0].pageY, + endX: evt.touches[0].pageX, + endY: evt.touches[0].pageY + }; + break; + + case "touchmove": + if (this.touchSwipeState === null) { + return; + } + + this.touchSwipeState.endX = evt.touches[0].pageX; + this.touchSwipeState.endY = evt.touches[0].pageY; + evt.preventDefault(); + break; + + case "touchend": + if (this.touchSwipeState === null) { + return; + } + + var delta = 0; + var dx = this.touchSwipeState.endX - this.touchSwipeState.startX; + var dy = this.touchSwipeState.endY - this.touchSwipeState.startY; + var absAngle = Math.abs(Math.atan2(dy, dx)); + + if (Math.abs(dx) > SWIPE_MIN_DISTANCE_THRESHOLD && (absAngle <= SWIPE_ANGLE_THRESHOLD || absAngle >= Math.PI - SWIPE_ANGLE_THRESHOLD)) { + delta = dx; + } else if (Math.abs(dy) > SWIPE_MIN_DISTANCE_THRESHOLD && Math.abs(absAngle - Math.PI / 2) <= SWIPE_ANGLE_THRESHOLD) { + delta = dy; + } + + if (delta > 0) { + this.pdfViewer.previousPage(); + } else if (delta < 0) { + this.pdfViewer.nextPage(); + } + + break; + } + } + }, { + key: "_addWindowListeners", + value: function _addWindowListeners() { + this.showControlsBind = this._showControls.bind(this); + this.mouseDownBind = this._mouseDown.bind(this); + this.mouseWheelBind = this._mouseWheel.bind(this); + this.resetMouseScrollStateBind = this._resetMouseScrollState.bind(this); + this.contextMenuBind = this._contextMenu.bind(this); + this.touchSwipeBind = this._touchSwipe.bind(this); + window.addEventListener("mousemove", this.showControlsBind); + window.addEventListener("mousedown", this.mouseDownBind); + window.addEventListener("wheel", this.mouseWheelBind, { + passive: false + }); + window.addEventListener("keydown", this.resetMouseScrollStateBind); + window.addEventListener("contextmenu", this.contextMenuBind); + window.addEventListener("touchstart", this.touchSwipeBind); + window.addEventListener("touchmove", this.touchSwipeBind); + window.addEventListener("touchend", this.touchSwipeBind); + } + }, { + key: "_removeWindowListeners", + value: function _removeWindowListeners() { + window.removeEventListener("mousemove", this.showControlsBind); + window.removeEventListener("mousedown", this.mouseDownBind); + window.removeEventListener("wheel", this.mouseWheelBind, { + passive: false + }); + window.removeEventListener("keydown", this.resetMouseScrollStateBind); + window.removeEventListener("contextmenu", this.contextMenuBind); + window.removeEventListener("touchstart", this.touchSwipeBind); + window.removeEventListener("touchmove", this.touchSwipeBind); + window.removeEventListener("touchend", this.touchSwipeBind); + delete this.showControlsBind; + delete this.mouseDownBind; + delete this.mouseWheelBind; + delete this.resetMouseScrollStateBind; + delete this.contextMenuBind; + delete this.touchSwipeBind; + } + }, { + key: "_fullscreenChange", + value: function _fullscreenChange() { + if (this.isFullscreen) { + this._enter(); + } else { + this._exit(); + } + } + }, { + key: "_addFullscreenChangeListeners", + value: function _addFullscreenChangeListeners() { + this.fullscreenChangeBind = this._fullscreenChange.bind(this); + window.addEventListener("fullscreenchange", this.fullscreenChangeBind); + window.addEventListener("mozfullscreenchange", this.fullscreenChangeBind); + window.addEventListener("webkitfullscreenchange", this.fullscreenChangeBind); + } + }, { + key: "_removeFullscreenChangeListeners", + value: function _removeFullscreenChangeListeners() { + window.removeEventListener("fullscreenchange", this.fullscreenChangeBind); + window.removeEventListener("mozfullscreenchange", this.fullscreenChangeBind); + window.removeEventListener("webkitfullscreenchange", this.fullscreenChangeBind); + delete this.fullscreenChangeBind; + } + }]); + + return PDFPresentationMode; +}(); + +exports.PDFPresentationMode = PDFPresentationMode; + +/***/ }), +/* 24 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PDFScriptingManager = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__(4)); + +var _pdfjsLib = __webpack_require__(7); + +var _ui_utils = __webpack_require__(6); + +var _pdf_rendering_queue = __webpack_require__(10); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } + +function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } + +function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var PDFScriptingManager = /*#__PURE__*/function () { + function PDFScriptingManager(_ref) { + var eventBus = _ref.eventBus, + _ref$sandboxBundleSrc = _ref.sandboxBundleSrc, + sandboxBundleSrc = _ref$sandboxBundleSrc === void 0 ? null : _ref$sandboxBundleSrc, + _ref$scriptingFactory = _ref.scriptingFactory, + scriptingFactory = _ref$scriptingFactory === void 0 ? null : _ref$scriptingFactory, + _ref$docPropertiesLoo = _ref.docPropertiesLookup, + docPropertiesLookup = _ref$docPropertiesLoo === void 0 ? null : _ref$docPropertiesLoo; + + _classCallCheck(this, PDFScriptingManager); + + this._pdfDocument = null; + this._pdfViewer = null; + this._closeCapability = null; + this._destroyCapability = null; + this._scripting = null; + this._mouseState = Object.create(null); + this._ready = false; + this._eventBus = eventBus; + this._sandboxBundleSrc = sandboxBundleSrc; + this._scriptingFactory = scriptingFactory; + this._docPropertiesLookup = docPropertiesLookup; + } + + _createClass(PDFScriptingManager, [{ + key: "setViewer", + value: function setViewer(pdfViewer) { + this._pdfViewer = pdfViewer; + } + }, { + key: "setDocument", + value: function () { + var _setDocument = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee2(pdfDocument) { + var _this = this, + _this$_scripting3; + + var _yield$Promise$all, _yield$Promise$all2, objects, calculationOrder, docActions, _iterator, _step, _step$value, name, listener, _iterator2, _step2, _step2$value, _name, _listener, docProperties; + + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + if (!this._pdfDocument) { + _context2.next = 3; + break; + } + + _context2.next = 3; + return this._destroyScripting(); + + case 3: + this._pdfDocument = pdfDocument; + + if (pdfDocument) { + _context2.next = 6; + break; + } + + return _context2.abrupt("return"); + + case 6: + _context2.next = 8; + return Promise.all([pdfDocument.getFieldObjects(), pdfDocument.getCalculationOrderIds(), pdfDocument.getJSActions()]); + + case 8: + _yield$Promise$all = _context2.sent; + _yield$Promise$all2 = _slicedToArray(_yield$Promise$all, 3); + objects = _yield$Promise$all2[0]; + calculationOrder = _yield$Promise$all2[1]; + docActions = _yield$Promise$all2[2]; + + if (!(!objects && !docActions)) { + _context2.next = 17; + break; + } + + _context2.next = 16; + return this._destroyScripting(); + + case 16: + return _context2.abrupt("return"); + + case 17: + if (!(pdfDocument !== this._pdfDocument)) { + _context2.next = 19; + break; + } + + return _context2.abrupt("return"); + + case 19: + _context2.prev = 19; + this._scripting = this._createScripting(); + _context2.next = 29; + break; + + case 23: + _context2.prev = 23; + _context2.t0 = _context2["catch"](19); + console.error("PDFScriptingManager.setDocument: \"".concat(_context2.t0 === null || _context2.t0 === void 0 ? void 0 : _context2.t0.message, "\".")); + _context2.next = 28; + return this._destroyScripting(); + + case 28: + return _context2.abrupt("return"); + + case 29: + this._internalEvents.set("updatefromsandbox", function (event) { + if ((event === null || event === void 0 ? void 0 : event.source) !== window) { + return; + } + + _this._updateFromSandbox(event.detail); + }); + + this._internalEvents.set("dispatcheventinsandbox", function (event) { + var _this$_scripting; + + (_this$_scripting = _this._scripting) === null || _this$_scripting === void 0 ? void 0 : _this$_scripting.dispatchEventInSandbox(event.detail); + }); + + this._internalEvents.set("pagechanging", function (_ref2) { + var pageNumber = _ref2.pageNumber, + previous = _ref2.previous; + + if (pageNumber === previous) { + return; + } + + _this._dispatchPageClose(previous); + + _this._dispatchPageOpen(pageNumber); + }); + + this._internalEvents.set("pagerendered", function (_ref3) { + var pageNumber = _ref3.pageNumber; + + if (!_this._pageOpenPending.has(pageNumber)) { + return; + } + + if (pageNumber !== _this._pdfViewer.currentPageNumber) { + return; + } + + _this._dispatchPageOpen(pageNumber); + }); + + this._internalEvents.set("pagesdestroy", /*#__PURE__*/function () { + var _ref4 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee(event) { + var _this$_scripting2, _this$_closeCapabilit; + + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return _this._dispatchPageClose(_this._pdfViewer.currentPageNumber); + + case 2: + _context.next = 4; + return (_this$_scripting2 = _this._scripting) === null || _this$_scripting2 === void 0 ? void 0 : _this$_scripting2.dispatchEventInSandbox({ + id: "doc", + name: "WillClose" + }); + + case 4: + (_this$_closeCapabilit = _this._closeCapability) === null || _this$_closeCapabilit === void 0 ? void 0 : _this$_closeCapabilit.resolve(); + + case 5: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function (_x2) { + return _ref4.apply(this, arguments); + }; + }()); + + this._domEvents.set("mousedown", function (event) { + _this._mouseState.isDown = true; + }); + + this._domEvents.set("mouseup", function (event) { + _this._mouseState.isDown = false; + }); + + _iterator = _createForOfIteratorHelper(this._internalEvents); + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + _step$value = _slicedToArray(_step.value, 2), name = _step$value[0], listener = _step$value[1]; + + this._eventBus._on(name, listener); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + _iterator2 = _createForOfIteratorHelper(this._domEvents); + + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + _step2$value = _slicedToArray(_step2.value, 2), _name = _step2$value[0], _listener = _step2$value[1]; + window.addEventListener(_name, _listener); + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + + _context2.prev = 40; + _context2.next = 43; + return this._getDocProperties(); + + case 43: + docProperties = _context2.sent; + + if (!(pdfDocument !== this._pdfDocument)) { + _context2.next = 46; + break; + } + + return _context2.abrupt("return"); + + case 46: + _context2.next = 48; + return this._scripting.createSandbox({ + objects: objects, + calculationOrder: calculationOrder, + appInfo: { + platform: navigator.platform, + language: navigator.language + }, + docInfo: _objectSpread(_objectSpread({}, docProperties), {}, { + actions: docActions + }) + }); + + case 48: + this._eventBus.dispatch("sandboxcreated", { + source: this + }); + + _context2.next = 57; + break; + + case 51: + _context2.prev = 51; + _context2.t1 = _context2["catch"](40); + console.error("PDFScriptingManager.setDocument: \"".concat(_context2.t1 === null || _context2.t1 === void 0 ? void 0 : _context2.t1.message, "\".")); + _context2.next = 56; + return this._destroyScripting(); + + case 56: + return _context2.abrupt("return"); + + case 57: + _context2.next = 59; + return (_this$_scripting3 = this._scripting) === null || _this$_scripting3 === void 0 ? void 0 : _this$_scripting3.dispatchEventInSandbox({ + id: "doc", + name: "Open" + }); + + case 59: + _context2.next = 61; + return this._dispatchPageOpen(this._pdfViewer.currentPageNumber, true); + + case 61: + Promise.resolve().then(function () { + if (pdfDocument === _this._pdfDocument) { + _this._ready = true; + } + }); + + case 62: + case "end": + return _context2.stop(); + } + } + }, _callee2, this, [[19, 23], [40, 51]]); + })); + + function setDocument(_x) { + return _setDocument.apply(this, arguments); + } + + return setDocument; + }() + }, { + key: "dispatchWillSave", + value: function () { + var _dispatchWillSave = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee3(detail) { + var _this$_scripting4; + + return _regenerator["default"].wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + return _context3.abrupt("return", (_this$_scripting4 = this._scripting) === null || _this$_scripting4 === void 0 ? void 0 : _this$_scripting4.dispatchEventInSandbox({ + id: "doc", + name: "WillSave" + })); + + case 1: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function dispatchWillSave(_x3) { + return _dispatchWillSave.apply(this, arguments); + } + + return dispatchWillSave; + }() + }, { + key: "dispatchDidSave", + value: function () { + var _dispatchDidSave = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee4(detail) { + var _this$_scripting5; + + return _regenerator["default"].wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + return _context4.abrupt("return", (_this$_scripting5 = this._scripting) === null || _this$_scripting5 === void 0 ? void 0 : _this$_scripting5.dispatchEventInSandbox({ + id: "doc", + name: "DidSave" + })); + + case 1: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function dispatchDidSave(_x4) { + return _dispatchDidSave.apply(this, arguments); + } + + return dispatchDidSave; + }() + }, { + key: "dispatchWillPrint", + value: function () { + var _dispatchWillPrint = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee5(detail) { + var _this$_scripting6; + + return _regenerator["default"].wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + return _context5.abrupt("return", (_this$_scripting6 = this._scripting) === null || _this$_scripting6 === void 0 ? void 0 : _this$_scripting6.dispatchEventInSandbox({ + id: "doc", + name: "WillPrint" + })); + + case 1: + case "end": + return _context5.stop(); + } + } + }, _callee5, this); + })); + + function dispatchWillPrint(_x5) { + return _dispatchWillPrint.apply(this, arguments); + } + + return dispatchWillPrint; + }() + }, { + key: "dispatchDidPrint", + value: function () { + var _dispatchDidPrint = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee6(detail) { + var _this$_scripting7; + + return _regenerator["default"].wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + return _context6.abrupt("return", (_this$_scripting7 = this._scripting) === null || _this$_scripting7 === void 0 ? void 0 : _this$_scripting7.dispatchEventInSandbox({ + id: "doc", + name: "DidPrint" + })); + + case 1: + case "end": + return _context6.stop(); + } + } + }, _callee6, this); + })); + + function dispatchDidPrint(_x6) { + return _dispatchDidPrint.apply(this, arguments); + } + + return dispatchDidPrint; + }() + }, { + key: "mouseState", + get: function get() { + return this._mouseState; + } + }, { + key: "destroyPromise", + get: function get() { + var _this$_destroyCapabil; + + return ((_this$_destroyCapabil = this._destroyCapability) === null || _this$_destroyCapabil === void 0 ? void 0 : _this$_destroyCapabil.promise) || null; + } + }, { + key: "ready", + get: function get() { + return this._ready; + } + }, { + key: "_internalEvents", + get: function get() { + return (0, _pdfjsLib.shadow)(this, "_internalEvents", new Map()); + } + }, { + key: "_domEvents", + get: function get() { + return (0, _pdfjsLib.shadow)(this, "_domEvents", new Map()); + } + }, { + key: "_pageOpenPending", + get: function get() { + return (0, _pdfjsLib.shadow)(this, "_pageOpenPending", new Set()); + } + }, { + key: "_visitedPages", + get: function get() { + return (0, _pdfjsLib.shadow)(this, "_visitedPages", new Map()); + } + }, { + key: "_updateFromSandbox", + value: function () { + var _updateFromSandbox2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee7(detail) { + var isInPresentationMode, id, siblings, command, value, ids, _iterator3, _step3, elementId, element, _this$_pdfDocument; + + return _regenerator["default"].wrap(function _callee7$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + isInPresentationMode = this._pdfViewer.isInPresentationMode || this._pdfViewer.isChangingPresentationMode; + id = detail.id, siblings = detail.siblings, command = detail.command, value = detail.value; + + if (id) { + _context7.next = 25; + break; + } + + _context7.t0 = command; + _context7.next = _context7.t0 === "clear" ? 6 : _context7.t0 === "error" ? 8 : _context7.t0 === "layout" ? 10 : _context7.t0 === "page-num" ? 12 : _context7.t0 === "print" ? 14 : _context7.t0 === "println" ? 18 : _context7.t0 === "zoom" ? 20 : 24; + break; + + case 6: + console.clear(); + return _context7.abrupt("break", 24); + + case 8: + console.error(value); + return _context7.abrupt("break", 24); + + case 10: + this._pdfViewer.spreadMode = (0, _ui_utils.apiPageLayoutToSpreadMode)(value); + return _context7.abrupt("break", 24); + + case 12: + this._pdfViewer.currentPageNumber = value + 1; + return _context7.abrupt("break", 24); + + case 14: + _context7.next = 16; + return this._pdfViewer.pagesPromise; + + case 16: + this._eventBus.dispatch("print", { + source: this + }); + + return _context7.abrupt("break", 24); + + case 18: + console.log(value); + return _context7.abrupt("break", 24); + + case 20: + if (!isInPresentationMode) { + _context7.next = 22; + break; + } + + return _context7.abrupt("return"); + + case 22: + this._pdfViewer.currentScaleValue = value; + return _context7.abrupt("break", 24); + + case 24: + return _context7.abrupt("return"); + + case 25: + if (!isInPresentationMode) { + _context7.next = 28; + break; + } + + if (!detail.focus) { + _context7.next = 28; + break; + } + + return _context7.abrupt("return"); + + case 28: + delete detail.id; + delete detail.siblings; + ids = siblings ? [id].concat(_toConsumableArray(siblings)) : [id]; + _iterator3 = _createForOfIteratorHelper(ids); + + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { + elementId = _step3.value; + element = document.getElementById(elementId); + + if (element) { + element.dispatchEvent(new CustomEvent("updatefromsandbox", { + detail: detail + })); + } else { + (_this$_pdfDocument = this._pdfDocument) === null || _this$_pdfDocument === void 0 ? void 0 : _this$_pdfDocument.annotationStorage.setValue(elementId, detail); + } + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); + } + + case 33: + case "end": + return _context7.stop(); + } + } + }, _callee7, this); + })); + + function _updateFromSandbox(_x7) { + return _updateFromSandbox2.apply(this, arguments); + } + + return _updateFromSandbox; + }() + }, { + key: "_dispatchPageOpen", + value: function () { + var _dispatchPageOpen2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee9(pageNumber) { + var _this2 = this; + + var initialize, + pdfDocument, + visitedPages, + pageView, + actionsPromise, + _args9 = arguments; + return _regenerator["default"].wrap(function _callee9$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + initialize = _args9.length > 1 && _args9[1] !== undefined ? _args9[1] : false; + pdfDocument = this._pdfDocument, visitedPages = this._visitedPages; + + if (initialize) { + this._closeCapability = (0, _pdfjsLib.createPromiseCapability)(); + } + + if (this._closeCapability) { + _context9.next = 5; + break; + } + + return _context9.abrupt("return"); + + case 5: + pageView = this._pdfViewer.getPageView(pageNumber - 1); + + if (!((pageView === null || pageView === void 0 ? void 0 : pageView.renderingState) !== _pdf_rendering_queue.RenderingStates.FINISHED)) { + _context9.next = 9; + break; + } + + this._pageOpenPending.add(pageNumber); + + return _context9.abrupt("return"); + + case 9: + this._pageOpenPending["delete"](pageNumber); + + actionsPromise = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee8() { + var _pageView$pdfPage, _this2$_scripting; + + var actions; + return _regenerator["default"].wrap(function _callee8$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + _context8.next = 2; + return !visitedPages.has(pageNumber) ? (_pageView$pdfPage = pageView.pdfPage) === null || _pageView$pdfPage === void 0 ? void 0 : _pageView$pdfPage.getJSActions() : null; + + case 2: + actions = _context8.sent; + + if (!(pdfDocument !== _this2._pdfDocument)) { + _context8.next = 5; + break; + } + + return _context8.abrupt("return"); + + case 5: + _context8.next = 7; + return (_this2$_scripting = _this2._scripting) === null || _this2$_scripting === void 0 ? void 0 : _this2$_scripting.dispatchEventInSandbox({ + id: "page", + name: "PageOpen", + pageNumber: pageNumber, + actions: actions + }); + + case 7: + case "end": + return _context8.stop(); + } + } + }, _callee8); + }))(); + visitedPages.set(pageNumber, actionsPromise); + + case 12: + case "end": + return _context9.stop(); + } + } + }, _callee9, this); + })); + + function _dispatchPageOpen(_x8) { + return _dispatchPageOpen2.apply(this, arguments); + } + + return _dispatchPageOpen; + }() + }, { + key: "_dispatchPageClose", + value: function () { + var _dispatchPageClose2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee10(pageNumber) { + var _this$_scripting8; + + var pdfDocument, visitedPages, actionsPromise; + return _regenerator["default"].wrap(function _callee10$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + pdfDocument = this._pdfDocument, visitedPages = this._visitedPages; + + if (this._closeCapability) { + _context10.next = 3; + break; + } + + return _context10.abrupt("return"); + + case 3: + if (!this._pageOpenPending.has(pageNumber)) { + _context10.next = 5; + break; + } + + return _context10.abrupt("return"); + + case 5: + actionsPromise = visitedPages.get(pageNumber); + + if (actionsPromise) { + _context10.next = 8; + break; + } + + return _context10.abrupt("return"); + + case 8: + visitedPages.set(pageNumber, null); + _context10.next = 11; + return actionsPromise; + + case 11: + if (!(pdfDocument !== this._pdfDocument)) { + _context10.next = 13; + break; + } + + return _context10.abrupt("return"); + + case 13: + _context10.next = 15; + return (_this$_scripting8 = this._scripting) === null || _this$_scripting8 === void 0 ? void 0 : _this$_scripting8.dispatchEventInSandbox({ + id: "page", + name: "PageClose", + pageNumber: pageNumber + }); + + case 15: + case "end": + return _context10.stop(); + } + } + }, _callee10, this); + })); + + function _dispatchPageClose(_x9) { + return _dispatchPageClose2.apply(this, arguments); + } + + return _dispatchPageClose; + }() + }, { + key: "_getDocProperties", + value: function () { + var _getDocProperties2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee11() { + return _regenerator["default"].wrap(function _callee11$(_context11) { + while (1) { + switch (_context11.prev = _context11.next) { + case 0: + if (!this._docPropertiesLookup) { + _context11.next = 2; + break; + } + + return _context11.abrupt("return", this._docPropertiesLookup(this._pdfDocument)); + + case 2: + throw new Error("_getDocProperties: Unable to lookup properties."); + + case 3: + case "end": + return _context11.stop(); + } + } + }, _callee11, this); + })); + + function _getDocProperties() { + return _getDocProperties2.apply(this, arguments); + } + + return _getDocProperties; + }() + }, { + key: "_createScripting", + value: function _createScripting() { + this._destroyCapability = (0, _pdfjsLib.createPromiseCapability)(); + + if (this._scripting) { + throw new Error("_createScripting: Scripting already exists."); + } + + if (this._scriptingFactory) { + return this._scriptingFactory.createScripting({ + sandboxBundleSrc: this._sandboxBundleSrc + }); + } + + throw new Error("_createScripting: Cannot create scripting."); + } + }, { + key: "_destroyScripting", + value: function () { + var _destroyScripting2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee12() { + var _this$_destroyCapabil3; + + var _this$_destroyCapabil2, _iterator4, _step4, _step4$value, name, listener, _iterator5, _step5, _step5$value, _name2, _listener2; + + return _regenerator["default"].wrap(function _callee12$(_context12) { + while (1) { + switch (_context12.prev = _context12.next) { + case 0: + if (this._scripting) { + _context12.next = 4; + break; + } + + this._pdfDocument = null; + (_this$_destroyCapabil2 = this._destroyCapability) === null || _this$_destroyCapabil2 === void 0 ? void 0 : _this$_destroyCapabil2.resolve(); + return _context12.abrupt("return"); + + case 4: + if (!this._closeCapability) { + _context12.next = 8; + break; + } + + _context12.next = 7; + return Promise.race([this._closeCapability.promise, new Promise(function (resolve) { + setTimeout(resolve, 1000); + })])["catch"](function (reason) {}); + + case 7: + this._closeCapability = null; + + case 8: + this._pdfDocument = null; + _context12.prev = 9; + _context12.next = 12; + return this._scripting.destroySandbox(); + + case 12: + _context12.next = 16; + break; + + case 14: + _context12.prev = 14; + _context12.t0 = _context12["catch"](9); + + case 16: + _iterator4 = _createForOfIteratorHelper(this._internalEvents); + + try { + for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { + _step4$value = _slicedToArray(_step4.value, 2), name = _step4$value[0], listener = _step4$value[1]; + + this._eventBus._off(name, listener); + } + } catch (err) { + _iterator4.e(err); + } finally { + _iterator4.f(); + } + + this._internalEvents.clear(); + + _iterator5 = _createForOfIteratorHelper(this._domEvents); + + try { + for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) { + _step5$value = _slicedToArray(_step5.value, 2), _name2 = _step5$value[0], _listener2 = _step5$value[1]; + window.removeEventListener(_name2, _listener2); + } + } catch (err) { + _iterator5.e(err); + } finally { + _iterator5.f(); + } + + this._domEvents.clear(); + + this._pageOpenPending.clear(); + + this._visitedPages.clear(); + + this._scripting = null; + delete this._mouseState.isDown; + this._ready = false; + (_this$_destroyCapabil3 = this._destroyCapability) === null || _this$_destroyCapabil3 === void 0 ? void 0 : _this$_destroyCapabil3.resolve(); + + case 28: + case "end": + return _context12.stop(); + } + } + }, _callee12, this, [[9, 14]]); + })); + + function _destroyScripting() { + return _destroyScripting2.apply(this, arguments); + } + + return _destroyScripting; + }() + }]); + + return PDFScriptingManager; +}(); + +exports.PDFScriptingManager = PDFScriptingManager; + +/***/ }), +/* 25 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PDFSidebar = void 0; + +var _ui_utils = __webpack_require__(6); + +var _pdf_rendering_queue = __webpack_require__(10); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var UI_NOTIFICATION_CLASS = "pdfSidebarNotification"; + +var PDFSidebar = /*#__PURE__*/function () { + function PDFSidebar(_ref) { + var elements = _ref.elements, + pdfViewer = _ref.pdfViewer, + pdfThumbnailViewer = _ref.pdfThumbnailViewer, + eventBus = _ref.eventBus, + l10n = _ref.l10n; + + _classCallCheck(this, PDFSidebar); + + this.isOpen = false; + this.active = _ui_utils.SidebarView.THUMBS; + this.isInitialViewSet = false; + this.onToggled = null; + this.pdfViewer = pdfViewer; + this.pdfThumbnailViewer = pdfThumbnailViewer; + this.outerContainer = elements.outerContainer; + this.viewerContainer = elements.viewerContainer; + this.toggleButton = elements.toggleButton; + this.thumbnailButton = elements.thumbnailButton; + this.outlineButton = elements.outlineButton; + this.attachmentsButton = elements.attachmentsButton; + this.layersButton = elements.layersButton; + this.thumbnailView = elements.thumbnailView; + this.outlineView = elements.outlineView; + this.attachmentsView = elements.attachmentsView; + this.layersView = elements.layersView; + this._outlineOptionsContainer = elements.outlineOptionsContainer; + this._currentOutlineItemButton = elements.currentOutlineItemButton; + this.eventBus = eventBus; + this.l10n = l10n; + + this._addEventListeners(); + } + + _createClass(PDFSidebar, [{ + key: "reset", + value: function reset() { + this.isInitialViewSet = false; + + this._hideUINotification(true); + + this.switchView(_ui_utils.SidebarView.THUMBS); + this.outlineButton.disabled = false; + this.attachmentsButton.disabled = false; + this.layersButton.disabled = false; + this._currentOutlineItemButton.disabled = true; + } + }, { + key: "visibleView", + get: function get() { + return this.isOpen ? this.active : _ui_utils.SidebarView.NONE; + } + }, { + key: "isThumbnailViewVisible", + get: function get() { + return this.isOpen && this.active === _ui_utils.SidebarView.THUMBS; + } + }, { + key: "isOutlineViewVisible", + get: function get() { + return this.isOpen && this.active === _ui_utils.SidebarView.OUTLINE; + } + }, { + key: "isAttachmentsViewVisible", + get: function get() { + return this.isOpen && this.active === _ui_utils.SidebarView.ATTACHMENTS; + } + }, { + key: "isLayersViewVisible", + get: function get() { + return this.isOpen && this.active === _ui_utils.SidebarView.LAYERS; + } + }, { + key: "setInitialView", + value: function setInitialView() { + var view = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _ui_utils.SidebarView.NONE; + + if (this.isInitialViewSet) { + return; + } + + this.isInitialViewSet = true; + + if (view === _ui_utils.SidebarView.NONE || view === _ui_utils.SidebarView.UNKNOWN) { + this._dispatchEvent(); + + return; + } + + if (!this._switchView(view, true)) { + this._dispatchEvent(); + } + } + }, { + key: "switchView", + value: function switchView(view) { + var forceOpen = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + this._switchView(view, forceOpen); + } + }, { + key: "_switchView", + value: function _switchView(view) { + var forceOpen = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var isViewChanged = view !== this.active; + var shouldForceRendering = false; + + switch (view) { + case _ui_utils.SidebarView.NONE: + if (this.isOpen) { + this.close(); + return true; + } + + return false; + + case _ui_utils.SidebarView.THUMBS: + if (this.isOpen && isViewChanged) { + shouldForceRendering = true; + } + + break; + + case _ui_utils.SidebarView.OUTLINE: + if (this.outlineButton.disabled) { + return false; + } + + break; + + case _ui_utils.SidebarView.ATTACHMENTS: + if (this.attachmentsButton.disabled) { + return false; + } + + break; + + case _ui_utils.SidebarView.LAYERS: + if (this.layersButton.disabled) { + return false; + } + + break; + + default: + console.error("PDFSidebar._switchView: \"".concat(view, "\" is not a valid view.")); + return false; + } + + this.active = view; + this.thumbnailButton.classList.toggle("toggled", view === _ui_utils.SidebarView.THUMBS); + this.outlineButton.classList.toggle("toggled", view === _ui_utils.SidebarView.OUTLINE); + this.attachmentsButton.classList.toggle("toggled", view === _ui_utils.SidebarView.ATTACHMENTS); + this.layersButton.classList.toggle("toggled", view === _ui_utils.SidebarView.LAYERS); + this.thumbnailView.classList.toggle("hidden", view !== _ui_utils.SidebarView.THUMBS); + this.outlineView.classList.toggle("hidden", view !== _ui_utils.SidebarView.OUTLINE); + this.attachmentsView.classList.toggle("hidden", view !== _ui_utils.SidebarView.ATTACHMENTS); + this.layersView.classList.toggle("hidden", view !== _ui_utils.SidebarView.LAYERS); + + this._outlineOptionsContainer.classList.toggle("hidden", view !== _ui_utils.SidebarView.OUTLINE); + + if (forceOpen && !this.isOpen) { + this.open(); + return true; + } + + if (shouldForceRendering) { + this._updateThumbnailViewer(); + + this._forceRendering(); + } + + if (isViewChanged) { + this._dispatchEvent(); + } + + return isViewChanged; + } + }, { + key: "open", + value: function open() { + if (this.isOpen) { + return; + } + + this.isOpen = true; + this.toggleButton.classList.add("toggled"); + this.toggleButton.setAttribute("aria-expanded", "true"); + this.outerContainer.classList.add("sidebarMoving", "sidebarOpen"); + + if (this.active === _ui_utils.SidebarView.THUMBS) { + this._updateThumbnailViewer(); + } + + this._forceRendering(); + + this._dispatchEvent(); + + this._hideUINotification(); + } + }, { + key: "close", + value: function close() { + if (!this.isOpen) { + return; + } + + this.isOpen = false; + this.toggleButton.classList.remove("toggled"); + this.toggleButton.setAttribute("aria-expanded", "false"); + this.outerContainer.classList.add("sidebarMoving"); + this.outerContainer.classList.remove("sidebarOpen"); + + this._forceRendering(); + + this._dispatchEvent(); + } + }, { + key: "toggle", + value: function toggle() { + if (this.isOpen) { + this.close(); + } else { + this.open(); + } + } + }, { + key: "_dispatchEvent", + value: function _dispatchEvent() { + this.eventBus.dispatch("sidebarviewchanged", { + source: this, + view: this.visibleView + }); + } + }, { + key: "_forceRendering", + value: function _forceRendering() { + if (this.onToggled) { + this.onToggled(); + } else { + this.pdfViewer.forceRendering(); + this.pdfThumbnailViewer.forceRendering(); + } + } + }, { + key: "_updateThumbnailViewer", + value: function _updateThumbnailViewer() { + var pdfViewer = this.pdfViewer, + pdfThumbnailViewer = this.pdfThumbnailViewer; + var pagesCount = pdfViewer.pagesCount; + + for (var pageIndex = 0; pageIndex < pagesCount; pageIndex++) { + var pageView = pdfViewer.getPageView(pageIndex); + + if ((pageView === null || pageView === void 0 ? void 0 : pageView.renderingState) === _pdf_rendering_queue.RenderingStates.FINISHED) { + var thumbnailView = pdfThumbnailViewer.getThumbnail(pageIndex); + thumbnailView.setImage(pageView); + } + } + + pdfThumbnailViewer.scrollThumbnailIntoView(pdfViewer.currentPageNumber); + } + }, { + key: "_showUINotification", + value: function _showUINotification() { + var _this = this; + + this.l10n.get("toggle_sidebar_notification2.title").then(function (msg) { + _this.toggleButton.title = msg; + }); + + if (!this.isOpen) { + this.toggleButton.classList.add(UI_NOTIFICATION_CLASS); + } + } + }, { + key: "_hideUINotification", + value: function _hideUINotification() { + var _this2 = this; + + var reset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + if (this.isOpen || reset) { + this.toggleButton.classList.remove(UI_NOTIFICATION_CLASS); + } + + if (reset) { + this.l10n.get("toggle_sidebar.title").then(function (msg) { + _this2.toggleButton.title = msg; + }); + } + } + }, { + key: "_addEventListeners", + value: function _addEventListeners() { + var _this3 = this; + + this.viewerContainer.addEventListener("transitionend", function (evt) { + if (evt.target === _this3.viewerContainer) { + _this3.outerContainer.classList.remove("sidebarMoving"); + } + }); + this.toggleButton.addEventListener("click", function () { + _this3.toggle(); + }); + this.thumbnailButton.addEventListener("click", function () { + _this3.switchView(_ui_utils.SidebarView.THUMBS); + }); + this.outlineButton.addEventListener("click", function () { + _this3.switchView(_ui_utils.SidebarView.OUTLINE); + }); + this.outlineButton.addEventListener("dblclick", function () { + _this3.eventBus.dispatch("toggleoutlinetree", { + source: _this3 + }); + }); + this.attachmentsButton.addEventListener("click", function () { + _this3.switchView(_ui_utils.SidebarView.ATTACHMENTS); + }); + this.layersButton.addEventListener("click", function () { + _this3.switchView(_ui_utils.SidebarView.LAYERS); + }); + this.layersButton.addEventListener("dblclick", function () { + _this3.eventBus.dispatch("resetlayers", { + source: _this3 + }); + }); + + this._currentOutlineItemButton.addEventListener("click", function () { + _this3.eventBus.dispatch("currentoutlineitem", { + source: _this3 + }); + }); + + var onTreeLoaded = function onTreeLoaded(count, button, view) { + button.disabled = !count; + + if (count) { + _this3._showUINotification(); + } else if (_this3.active === view) { + _this3.switchView(_ui_utils.SidebarView.THUMBS); + } + }; + + this.eventBus._on("outlineloaded", function (evt) { + onTreeLoaded(evt.outlineCount, _this3.outlineButton, _ui_utils.SidebarView.OUTLINE); + evt.currentOutlineItemPromise.then(function (enabled) { + if (!_this3.isInitialViewSet) { + return; + } + + _this3._currentOutlineItemButton.disabled = !enabled; + }); + }); + + this.eventBus._on("attachmentsloaded", function (evt) { + onTreeLoaded(evt.attachmentsCount, _this3.attachmentsButton, _ui_utils.SidebarView.ATTACHMENTS); + }); + + this.eventBus._on("layersloaded", function (evt) { + onTreeLoaded(evt.layersCount, _this3.layersButton, _ui_utils.SidebarView.LAYERS); + }); + + this.eventBus._on("presentationmodechanged", function (evt) { + if (evt.state === _ui_utils.PresentationModeState.NORMAL && _this3.isThumbnailViewVisible) { + _this3._updateThumbnailViewer(); + } + }); + } + }]); + + return PDFSidebar; +}(); + +exports.PDFSidebar = PDFSidebar; + +/***/ }), +/* 26 */ +/***/ ((__unused_webpack_module, exports) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PDFSidebarResizer = void 0; + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var SIDEBAR_WIDTH_VAR = "--sidebar-width"; +var SIDEBAR_MIN_WIDTH = 200; +var SIDEBAR_RESIZING_CLASS = "sidebarResizing"; + +var PDFSidebarResizer = /*#__PURE__*/function () { + function PDFSidebarResizer(options, eventBus, l10n) { + var _this = this; + + _classCallCheck(this, PDFSidebarResizer); + + this.isRTL = false; + this.sidebarOpen = false; + this.doc = document.documentElement; + this._width = null; + this._outerContainerWidth = null; + this._boundEvents = Object.create(null); + this.outerContainer = options.outerContainer; + this.resizer = options.resizer; + this.eventBus = eventBus; + l10n.getDirection().then(function (dir) { + _this.isRTL = dir === "rtl"; + }); + + this._addEventListeners(); + } + + _createClass(PDFSidebarResizer, [{ + key: "outerContainerWidth", + get: function get() { + return this._outerContainerWidth || (this._outerContainerWidth = this.outerContainer.clientWidth); + } + }, { + key: "_updateWidth", + value: function _updateWidth() { + var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + var maxWidth = Math.floor(this.outerContainerWidth / 2); + + if (width > maxWidth) { + width = maxWidth; + } + + if (width < SIDEBAR_MIN_WIDTH) { + width = SIDEBAR_MIN_WIDTH; + } + + if (width === this._width) { + return false; + } + + this._width = width; + this.doc.style.setProperty(SIDEBAR_WIDTH_VAR, "".concat(width, "px")); + return true; + } + }, { + key: "_mouseMove", + value: function _mouseMove(evt) { + var width = evt.clientX; + + if (this.isRTL) { + width = this.outerContainerWidth - width; + } + + this._updateWidth(width); + } + }, { + key: "_mouseUp", + value: function _mouseUp(evt) { + this.outerContainer.classList.remove(SIDEBAR_RESIZING_CLASS); + this.eventBus.dispatch("resize", { + source: this + }); + var _boundEvents = this._boundEvents; + window.removeEventListener("mousemove", _boundEvents.mouseMove); + window.removeEventListener("mouseup", _boundEvents.mouseUp); + } + }, { + key: "_addEventListeners", + value: function _addEventListeners() { + var _this2 = this; + + var _boundEvents = this._boundEvents; + _boundEvents.mouseMove = this._mouseMove.bind(this); + _boundEvents.mouseUp = this._mouseUp.bind(this); + this.resizer.addEventListener("mousedown", function (evt) { + if (evt.button !== 0) { + return; + } + + _this2.outerContainer.classList.add(SIDEBAR_RESIZING_CLASS); + + window.addEventListener("mousemove", _boundEvents.mouseMove); + window.addEventListener("mouseup", _boundEvents.mouseUp); + }); + + this.eventBus._on("sidebarviewchanged", function (evt) { + _this2.sidebarOpen = !!(evt !== null && evt !== void 0 && evt.view); + }); + + this.eventBus._on("resize", function (evt) { + if ((evt === null || evt === void 0 ? void 0 : evt.source) !== window) { + return; + } + + _this2._outerContainerWidth = null; + + if (!_this2._width) { + return; + } + + if (!_this2.sidebarOpen) { + _this2._updateWidth(_this2._width); + + return; + } + + _this2.outerContainer.classList.add(SIDEBAR_RESIZING_CLASS); + + var updated = _this2._updateWidth(_this2._width); + + Promise.resolve().then(function () { + _this2.outerContainer.classList.remove(SIDEBAR_RESIZING_CLASS); + + if (updated) { + _this2.eventBus.dispatch("resize", { + source: _this2 + }); + } + }); + }); + } + }]); + + return PDFSidebarResizer; +}(); + +exports.PDFSidebarResizer = PDFSidebarResizer; + +/***/ }), +/* 27 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PDFThumbnailViewer = void 0; + +var _ui_utils = __webpack_require__(6); + +var _pdf_thumbnail_view = __webpack_require__(28); + +var _pdf_rendering_queue = __webpack_require__(10); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var THUMBNAIL_SCROLL_MARGIN = -19; +var THUMBNAIL_SELECTED_CLASS = "selected"; + +var PDFThumbnailViewer = /*#__PURE__*/function () { + function PDFThumbnailViewer(_ref) { + var _this = this; + + var container = _ref.container, + eventBus = _ref.eventBus, + linkService = _ref.linkService, + renderingQueue = _ref.renderingQueue, + l10n = _ref.l10n; + + _classCallCheck(this, PDFThumbnailViewer); + + this.container = container; + this.linkService = linkService; + this.renderingQueue = renderingQueue; + this.l10n = l10n; + this.scroll = (0, _ui_utils.watchScroll)(this.container, this._scrollUpdated.bind(this)); + + this._resetView(); + + eventBus._on("optionalcontentconfigchanged", function () { + _this._setImageDisabled = true; + }); + } + + _createClass(PDFThumbnailViewer, [{ + key: "_scrollUpdated", + value: function _scrollUpdated() { + this.renderingQueue.renderHighestPriority(); + } + }, { + key: "getThumbnail", + value: function getThumbnail(index) { + return this._thumbnails[index]; + } + }, { + key: "_getVisibleThumbs", + value: function _getVisibleThumbs() { + return (0, _ui_utils.getVisibleElements)({ + scrollEl: this.container, + views: this._thumbnails + }); + } + }, { + key: "scrollThumbnailIntoView", + value: function scrollThumbnailIntoView(pageNumber) { + if (!this.pdfDocument) { + return; + } + + var thumbnailView = this._thumbnails[pageNumber - 1]; + + if (!thumbnailView) { + console.error('scrollThumbnailIntoView: Invalid "pageNumber" parameter.'); + return; + } + + if (pageNumber !== this._currentPageNumber) { + var prevThumbnailView = this._thumbnails[this._currentPageNumber - 1]; + prevThumbnailView.div.classList.remove(THUMBNAIL_SELECTED_CLASS); + thumbnailView.div.classList.add(THUMBNAIL_SELECTED_CLASS); + } + + var visibleThumbs = this._getVisibleThumbs(); + + var numVisibleThumbs = visibleThumbs.views.length; + + if (numVisibleThumbs > 0) { + var first = visibleThumbs.first.id; + var last = numVisibleThumbs > 1 ? visibleThumbs.last.id : first; + var shouldScroll = false; + + if (pageNumber <= first || pageNumber >= last) { + shouldScroll = true; + } else { + visibleThumbs.views.some(function (view) { + if (view.id !== pageNumber) { + return false; + } + + shouldScroll = view.percent < 100; + return true; + }); + } + + if (shouldScroll) { + (0, _ui_utils.scrollIntoView)(thumbnailView.div, { + top: THUMBNAIL_SCROLL_MARGIN + }); + } + } + + this._currentPageNumber = pageNumber; + } + }, { + key: "pagesRotation", + get: function get() { + return this._pagesRotation; + }, + set: function set(rotation) { + if (!(0, _ui_utils.isValidRotation)(rotation)) { + throw new Error("Invalid thumbnails rotation angle."); + } + + if (!this.pdfDocument) { + return; + } + + if (this._pagesRotation === rotation) { + return; + } + + this._pagesRotation = rotation; + + for (var i = 0, ii = this._thumbnails.length; i < ii; i++) { + this._thumbnails[i].update(rotation); + } + } + }, { + key: "cleanup", + value: function cleanup() { + for (var i = 0, ii = this._thumbnails.length; i < ii; i++) { + if (this._thumbnails[i] && this._thumbnails[i].renderingState !== _pdf_rendering_queue.RenderingStates.FINISHED) { + this._thumbnails[i].reset(); + } + } + + _pdf_thumbnail_view.TempImageFactory.destroyCanvas(); + } + }, { + key: "_resetView", + value: function _resetView() { + this._thumbnails = []; + this._currentPageNumber = 1; + this._pageLabels = null; + this._pagesRotation = 0; + this._optionalContentConfigPromise = null; + this._pagesRequests = new WeakMap(); + this._setImageDisabled = false; + this.container.textContent = ""; + } + }, { + key: "setDocument", + value: function setDocument(pdfDocument) { + var _this2 = this; + + if (this.pdfDocument) { + this._cancelRendering(); + + this._resetView(); + } + + this.pdfDocument = pdfDocument; + + if (!pdfDocument) { + return; + } + + var firstPagePromise = pdfDocument.getPage(1); + var optionalContentConfigPromise = pdfDocument.getOptionalContentConfig(); + firstPagePromise.then(function (firstPdfPage) { + _this2._optionalContentConfigPromise = optionalContentConfigPromise; + var pagesCount = pdfDocument.numPages; + var viewport = firstPdfPage.getViewport({ + scale: 1 + }); + + var checkSetImageDisabled = function checkSetImageDisabled() { + return _this2._setImageDisabled; + }; + + for (var pageNum = 1; pageNum <= pagesCount; ++pageNum) { + var thumbnail = new _pdf_thumbnail_view.PDFThumbnailView({ + container: _this2.container, + id: pageNum, + defaultViewport: viewport.clone(), + optionalContentConfigPromise: optionalContentConfigPromise, + linkService: _this2.linkService, + renderingQueue: _this2.renderingQueue, + checkSetImageDisabled: checkSetImageDisabled, + l10n: _this2.l10n + }); + + _this2._thumbnails.push(thumbnail); + } + + var firstThumbnailView = _this2._thumbnails[0]; + + if (firstThumbnailView) { + firstThumbnailView.setPdfPage(firstPdfPage); + } + + var thumbnailView = _this2._thumbnails[_this2._currentPageNumber - 1]; + thumbnailView.div.classList.add(THUMBNAIL_SELECTED_CLASS); + })["catch"](function (reason) { + console.error("Unable to initialize thumbnail viewer", reason); + }); + } + }, { + key: "_cancelRendering", + value: function _cancelRendering() { + for (var i = 0, ii = this._thumbnails.length; i < ii; i++) { + if (this._thumbnails[i]) { + this._thumbnails[i].cancelRendering(); + } + } + } + }, { + key: "setPageLabels", + value: function setPageLabels(labels) { + if (!this.pdfDocument) { + return; + } + + if (!labels) { + this._pageLabels = null; + } else if (!(Array.isArray(labels) && this.pdfDocument.numPages === labels.length)) { + this._pageLabels = null; + console.error("PDFThumbnailViewer_setPageLabels: Invalid page labels."); + } else { + this._pageLabels = labels; + } + + for (var i = 0, ii = this._thumbnails.length; i < ii; i++) { + var _this$_pageLabels$i, _this$_pageLabels; + + this._thumbnails[i].setPageLabel((_this$_pageLabels$i = (_this$_pageLabels = this._pageLabels) === null || _this$_pageLabels === void 0 ? void 0 : _this$_pageLabels[i]) !== null && _this$_pageLabels$i !== void 0 ? _this$_pageLabels$i : null); + } + } + }, { + key: "_ensurePdfPageLoaded", + value: function _ensurePdfPageLoaded(thumbView) { + var _this3 = this; + + if (thumbView.pdfPage) { + return Promise.resolve(thumbView.pdfPage); + } + + if (this._pagesRequests.has(thumbView)) { + return this._pagesRequests.get(thumbView); + } + + var promise = this.pdfDocument.getPage(thumbView.id).then(function (pdfPage) { + if (!thumbView.pdfPage) { + thumbView.setPdfPage(pdfPage); + } + + _this3._pagesRequests["delete"](thumbView); + + return pdfPage; + })["catch"](function (reason) { + console.error("Unable to get page for thumb view", reason); + + _this3._pagesRequests["delete"](thumbView); + }); + + this._pagesRequests.set(thumbView, promise); + + return promise; + } + }, { + key: "forceRendering", + value: function forceRendering() { + var _this4 = this; + + var visibleThumbs = this._getVisibleThumbs(); + + var thumbView = this.renderingQueue.getHighestPriority(visibleThumbs, this._thumbnails, this.scroll.down); + + if (thumbView) { + this._ensurePdfPageLoaded(thumbView).then(function () { + _this4.renderingQueue.renderView(thumbView); + }); + + return true; + } + + return false; + } + }]); + + return PDFThumbnailViewer; +}(); + +exports.PDFThumbnailViewer = PDFThumbnailViewer; + +/***/ }), +/* 28 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.TempImageFactory = exports.PDFThumbnailView = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__(4)); + +var _ui_utils = __webpack_require__(6); + +var _pdfjsLib = __webpack_require__(7); + +var _pdf_rendering_queue = __webpack_require__(10); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var DRAW_UPSCALE_FACTOR = 2; +var MAX_NUM_SCALING_STEPS = 3; +var THUMBNAIL_CANVAS_BORDER_WIDTH = 1; +var THUMBNAIL_WIDTH = 98; + +var TempImageFactory = function TempImageFactoryClosure() { + var tempCanvasCache = null; + return { + getCanvas: function getCanvas(width, height) { + var tempCanvas = tempCanvasCache; + + if (!tempCanvas) { + tempCanvas = document.createElement("canvas"); + tempCanvasCache = tempCanvas; + } + + tempCanvas.width = width; + tempCanvas.height = height; + tempCanvas.mozOpaque = true; + var ctx = tempCanvas.getContext("2d", { + alpha: false + }); + ctx.save(); + ctx.fillStyle = "rgb(255, 255, 255)"; + ctx.fillRect(0, 0, width, height); + ctx.restore(); + return [tempCanvas, tempCanvas.getContext("2d")]; + }, + destroyCanvas: function destroyCanvas() { + var tempCanvas = tempCanvasCache; + + if (tempCanvas) { + tempCanvas.width = 0; + tempCanvas.height = 0; + } + + tempCanvasCache = null; + } + }; +}(); + +exports.TempImageFactory = TempImageFactory; + +var PDFThumbnailView = /*#__PURE__*/function () { + function PDFThumbnailView(_ref) { + var container = _ref.container, + id = _ref.id, + defaultViewport = _ref.defaultViewport, + optionalContentConfigPromise = _ref.optionalContentConfigPromise, + linkService = _ref.linkService, + renderingQueue = _ref.renderingQueue, + checkSetImageDisabled = _ref.checkSetImageDisabled, + l10n = _ref.l10n; + + _classCallCheck(this, PDFThumbnailView); + + this.id = id; + this.renderingId = "thumbnail" + id; + this.pageLabel = null; + this.pdfPage = null; + this.rotation = 0; + this.viewport = defaultViewport; + this.pdfPageRotate = defaultViewport.rotation; + this._optionalContentConfigPromise = optionalContentConfigPromise || null; + this.linkService = linkService; + this.renderingQueue = renderingQueue; + this.renderTask = null; + this.renderingState = _pdf_rendering_queue.RenderingStates.INITIAL; + this.resume = null; + + this._checkSetImageDisabled = checkSetImageDisabled || function () { + return false; + }; + + var pageWidth = this.viewport.width, + pageHeight = this.viewport.height, + pageRatio = pageWidth / pageHeight; + this.canvasWidth = THUMBNAIL_WIDTH; + this.canvasHeight = this.canvasWidth / pageRatio | 0; + this.scale = this.canvasWidth / pageWidth; + this.l10n = l10n; + var anchor = document.createElement("a"); + anchor.href = linkService.getAnchorUrl("#page=" + id); + + this._thumbPageTitle.then(function (msg) { + anchor.title = msg; + }); + + anchor.onclick = function () { + linkService.goToPage(id); + return false; + }; + + this.anchor = anchor; + var div = document.createElement("div"); + div.className = "thumbnail"; + div.setAttribute("data-page-number", this.id); + this.div = div; + var ring = document.createElement("div"); + ring.className = "thumbnailSelectionRing"; + var borderAdjustment = 2 * THUMBNAIL_CANVAS_BORDER_WIDTH; + ring.style.width = this.canvasWidth + borderAdjustment + "px"; + ring.style.height = this.canvasHeight + borderAdjustment + "px"; + this.ring = ring; + div.appendChild(ring); + anchor.appendChild(div); + container.appendChild(anchor); + } + + _createClass(PDFThumbnailView, [{ + key: "setPdfPage", + value: function setPdfPage(pdfPage) { + this.pdfPage = pdfPage; + this.pdfPageRotate = pdfPage.rotate; + var totalRotation = (this.rotation + this.pdfPageRotate) % 360; + this.viewport = pdfPage.getViewport({ + scale: 1, + rotation: totalRotation + }); + this.reset(); + } + }, { + key: "reset", + value: function reset() { + this.cancelRendering(); + this.renderingState = _pdf_rendering_queue.RenderingStates.INITIAL; + var pageWidth = this.viewport.width, + pageHeight = this.viewport.height, + pageRatio = pageWidth / pageHeight; + this.canvasHeight = this.canvasWidth / pageRatio | 0; + this.scale = this.canvasWidth / pageWidth; + this.div.removeAttribute("data-loaded"); + var ring = this.ring; + ring.textContent = ""; + var borderAdjustment = 2 * THUMBNAIL_CANVAS_BORDER_WIDTH; + ring.style.width = this.canvasWidth + borderAdjustment + "px"; + ring.style.height = this.canvasHeight + borderAdjustment + "px"; + + if (this.canvas) { + this.canvas.width = 0; + this.canvas.height = 0; + delete this.canvas; + } + + if (this.image) { + this.image.removeAttribute("src"); + delete this.image; + } + } + }, { + key: "update", + value: function update(rotation) { + if (typeof rotation !== "undefined") { + this.rotation = rotation; + } + + var totalRotation = (this.rotation + this.pdfPageRotate) % 360; + this.viewport = this.viewport.clone({ + scale: 1, + rotation: totalRotation + }); + this.reset(); + } + }, { + key: "cancelRendering", + value: function cancelRendering() { + if (this.renderTask) { + this.renderTask.cancel(); + this.renderTask = null; + } + + this.resume = null; + } + }, { + key: "_getPageDrawContext", + value: function _getPageDrawContext() { + var upscaleFactor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; + var canvas = document.createElement("canvas"); + canvas.mozOpaque = true; + var ctx = canvas.getContext("2d", { + alpha: false + }); + var outputScale = (0, _ui_utils.getOutputScale)(ctx); + canvas.width = upscaleFactor * this.canvasWidth * outputScale.sx | 0; + canvas.height = upscaleFactor * this.canvasHeight * outputScale.sy | 0; + var transform = outputScale.scaled ? [outputScale.sx, 0, 0, outputScale.sy, 0, 0] : null; + return { + ctx: ctx, + canvas: canvas, + transform: transform + }; + } + }, { + key: "_convertCanvasToImage", + value: function _convertCanvasToImage(canvas) { + if (this.renderingState !== _pdf_rendering_queue.RenderingStates.FINISHED) { + throw new Error("_convertCanvasToImage: Rendering has not finished."); + } + + var reducedCanvas = this._reduceImage(canvas); + + var image = document.createElement("img"); + image.className = "thumbnailImage"; + + this._thumbPageCanvas.then(function (msg) { + image.setAttribute("aria-label", msg); + }); + + image.style.width = this.canvasWidth + "px"; + image.style.height = this.canvasHeight + "px"; + image.src = reducedCanvas.toDataURL(); + this.image = image; + this.div.setAttribute("data-loaded", true); + this.ring.appendChild(image); + reducedCanvas.width = 0; + reducedCanvas.height = 0; + } + }, { + key: "draw", + value: function draw() { + var _this = this; + + if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) { + console.error("Must be in new state before drawing"); + return Promise.resolve(undefined); + } + + var pdfPage = this.pdfPage; + + if (!pdfPage) { + this.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED; + return Promise.reject(new Error("pdfPage is not loaded")); + } + + this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING; + + var finishRenderTask = /*#__PURE__*/function () { + var _ref2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee() { + var error, + _args = arguments; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + error = _args.length > 0 && _args[0] !== undefined ? _args[0] : null; + + if (renderTask === _this.renderTask) { + _this.renderTask = null; + } + + if (!(error instanceof _pdfjsLib.RenderingCancelledException)) { + _context.next = 4; + break; + } + + return _context.abrupt("return"); + + case 4: + _this.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED; + + _this._convertCanvasToImage(canvas); + + if (!error) { + _context.next = 8; + break; + } + + throw error; + + case 8: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + return function finishRenderTask() { + return _ref2.apply(this, arguments); + }; + }(); + + var _this$_getPageDrawCon = this._getPageDrawContext(DRAW_UPSCALE_FACTOR), + ctx = _this$_getPageDrawCon.ctx, + canvas = _this$_getPageDrawCon.canvas, + transform = _this$_getPageDrawCon.transform; + + var drawViewport = this.viewport.clone({ + scale: DRAW_UPSCALE_FACTOR * this.scale + }); + + var renderContinueCallback = function renderContinueCallback(cont) { + if (!_this.renderingQueue.isHighestPriority(_this)) { + _this.renderingState = _pdf_rendering_queue.RenderingStates.PAUSED; + + _this.resume = function () { + _this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING; + cont(); + }; + + return; + } + + cont(); + }; + + var renderContext = { + canvasContext: ctx, + transform: transform, + viewport: drawViewport, + optionalContentConfigPromise: this._optionalContentConfigPromise + }; + var renderTask = this.renderTask = pdfPage.render(renderContext); + renderTask.onContinue = renderContinueCallback; + var resultPromise = renderTask.promise.then(function () { + return finishRenderTask(null); + }, function (error) { + return finishRenderTask(error); + }); + resultPromise["finally"](function () { + canvas.width = 0; + canvas.height = 0; + + var pageCached = _this.linkService.isPageCached(_this.id); + + if (!pageCached) { + var _this$pdfPage; + + (_this$pdfPage = _this.pdfPage) === null || _this$pdfPage === void 0 ? void 0 : _this$pdfPage.cleanup(); + } + }); + return resultPromise; + } + }, { + key: "setImage", + value: function setImage(pageView) { + if (this._checkSetImageDisabled()) { + return; + } + + if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) { + return; + } + + var canvas = pageView.canvas, + pdfPage = pageView.pdfPage; + + if (!canvas) { + return; + } + + if (!this.pdfPage) { + this.setPdfPage(pdfPage); + } + + this.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED; + + this._convertCanvasToImage(canvas); + } + }, { + key: "_reduceImage", + value: function _reduceImage(img) { + var _this$_getPageDrawCon2 = this._getPageDrawContext(), + ctx = _this$_getPageDrawCon2.ctx, + canvas = _this$_getPageDrawCon2.canvas; + + if (img.width <= 2 * canvas.width) { + ctx.drawImage(img, 0, 0, img.width, img.height, 0, 0, canvas.width, canvas.height); + return canvas; + } + + var reducedWidth = canvas.width << MAX_NUM_SCALING_STEPS; + var reducedHeight = canvas.height << MAX_NUM_SCALING_STEPS; + + var _TempImageFactory$get = TempImageFactory.getCanvas(reducedWidth, reducedHeight), + _TempImageFactory$get2 = _slicedToArray(_TempImageFactory$get, 2), + reducedImage = _TempImageFactory$get2[0], + reducedImageCtx = _TempImageFactory$get2[1]; + + while (reducedWidth > img.width || reducedHeight > img.height) { + reducedWidth >>= 1; + reducedHeight >>= 1; + } + + reducedImageCtx.drawImage(img, 0, 0, img.width, img.height, 0, 0, reducedWidth, reducedHeight); + + while (reducedWidth > 2 * canvas.width) { + reducedImageCtx.drawImage(reducedImage, 0, 0, reducedWidth, reducedHeight, 0, 0, reducedWidth >> 1, reducedHeight >> 1); + reducedWidth >>= 1; + reducedHeight >>= 1; + } + + ctx.drawImage(reducedImage, 0, 0, reducedWidth, reducedHeight, 0, 0, canvas.width, canvas.height); + return canvas; + } + }, { + key: "_thumbPageTitle", + get: function get() { + var _this$pageLabel; + + return this.l10n.get("thumb_page_title", { + page: (_this$pageLabel = this.pageLabel) !== null && _this$pageLabel !== void 0 ? _this$pageLabel : this.id + }); + } + }, { + key: "_thumbPageCanvas", + get: function get() { + var _this$pageLabel2; + + return this.l10n.get("thumb_page_canvas", { + page: (_this$pageLabel2 = this.pageLabel) !== null && _this$pageLabel2 !== void 0 ? _this$pageLabel2 : this.id + }); + } + }, { + key: "setPageLabel", + value: function setPageLabel(label) { + var _this2 = this; + + this.pageLabel = typeof label === "string" ? label : null; + + this._thumbPageTitle.then(function (msg) { + _this2.anchor.title = msg; + }); + + if (this.renderingState !== _pdf_rendering_queue.RenderingStates.FINISHED) { + return; + } + + this._thumbPageCanvas.then(function (msg) { + var _this2$image; + + (_this2$image = _this2.image) === null || _this2$image === void 0 ? void 0 : _this2$image.setAttribute("aria-label", msg); + }); + } + }]); + + return PDFThumbnailView; +}(); + +exports.PDFThumbnailView = PDFThumbnailView; + +/***/ }), +/* 29 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PDFViewer = void 0; + +var _ui_utils = __webpack_require__(6); + +var _base_viewer = __webpack_require__(30); + +var _pdfjsLib = __webpack_require__(7); + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); } + +function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +var PDFViewer = /*#__PURE__*/function (_BaseViewer) { + _inherits(PDFViewer, _BaseViewer); + + var _super = _createSuper(PDFViewer); + + function PDFViewer() { + _classCallCheck(this, PDFViewer); + + return _super.apply(this, arguments); + } + + _createClass(PDFViewer, [{ + key: "_viewerElement", + get: function get() { + return (0, _pdfjsLib.shadow)(this, "_viewerElement", this.viewer); + } + }, { + key: "_scrollIntoView", + value: function _scrollIntoView(_ref) { + var pageDiv = _ref.pageDiv, + _ref$pageSpot = _ref.pageSpot, + pageSpot = _ref$pageSpot === void 0 ? null : _ref$pageSpot, + _ref$pageNumber = _ref.pageNumber, + pageNumber = _ref$pageNumber === void 0 ? null : _ref$pageNumber; + + if (!pageSpot && !this.isInPresentationMode) { + var left = pageDiv.offsetLeft + pageDiv.clientLeft; + var right = left + pageDiv.clientWidth; + var _this$container = this.container, + scrollLeft = _this$container.scrollLeft, + clientWidth = _this$container.clientWidth; + + if (this._isScrollModeHorizontal || left < scrollLeft || right > scrollLeft + clientWidth) { + pageSpot = { + left: 0, + top: 0 + }; + } + } + + _get(_getPrototypeOf(PDFViewer.prototype), "_scrollIntoView", this).call(this, { + pageDiv: pageDiv, + pageSpot: pageSpot, + pageNumber: pageNumber + }); + } + }, { + key: "_getVisiblePages", + value: function _getVisiblePages() { + if (this.isInPresentationMode) { + return this._getCurrentVisiblePage(); + } + + return _get(_getPrototypeOf(PDFViewer.prototype), "_getVisiblePages", this).call(this); + } + }, { + key: "_updateHelper", + value: function _updateHelper(visiblePages) { + if (this.isInPresentationMode) { + return; + } + + var currentId = this._currentPageNumber; + var stillFullyVisible = false; + + var _iterator = _createForOfIteratorHelper(visiblePages), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var page = _step.value; + + if (page.percent < 100) { + break; + } + + if (page.id === currentId && this._scrollMode === _ui_utils.ScrollMode.VERTICAL && this._spreadMode === _ui_utils.SpreadMode.NONE) { + stillFullyVisible = true; + break; + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + if (!stillFullyVisible) { + currentId = visiblePages[0].id; + } + + this._setCurrentPageNumber(currentId); + } + }]); + + return PDFViewer; +}(_base_viewer.BaseViewer); + +exports.PDFViewer = PDFViewer; + +/***/ }), +/* 30 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.BaseViewer = void 0; + +var _pdfjsLib = __webpack_require__(7); + +var _ui_utils = __webpack_require__(6); + +var _pdf_rendering_queue = __webpack_require__(10); + +var _annotation_layer_builder = __webpack_require__(31); + +var _l10n_utils = __webpack_require__(32); + +var _pdf_page_view = __webpack_require__(33); + +var _pdf_link_service = __webpack_require__(21); + +var _struct_tree_layer_builder = __webpack_require__(34); + +var _text_layer_builder = __webpack_require__(35); + +var _xfa_layer_builder = __webpack_require__(36); + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var DEFAULT_CACHE_SIZE = 10; + +function PDFPageViewBuffer(size) { + var data = []; + + this.push = function (view) { + var i = data.indexOf(view); + + if (i >= 0) { + data.splice(i, 1); + } + + data.push(view); + + if (data.length > size) { + data.shift().destroy(); + } + }; + + this.resize = function (newSize, pagesToKeep) { + size = newSize; + + if (pagesToKeep) { + var pageIdsToKeep = new Set(); + + for (var i = 0, iMax = pagesToKeep.length; i < iMax; ++i) { + pageIdsToKeep.add(pagesToKeep[i].id); + } + + (0, _ui_utils.moveToEndOfArray)(data, function (page) { + return pageIdsToKeep.has(page.id); + }); + } + + while (data.length > size) { + data.shift().destroy(); + } + }; + + this.has = function (view) { + return data.includes(view); + }; +} + +function isSameScale(oldScale, newScale) { + if (newScale === oldScale) { + return true; + } + + if (Math.abs(newScale - oldScale) < 1e-15) { + return true; + } + + return false; +} + +var BaseViewer = /*#__PURE__*/function () { + function BaseViewer(options) { + var _this$container, + _this$viewer, + _this = this; + + _classCallCheck(this, BaseViewer); + + if (this.constructor === BaseViewer) { + throw new Error("Cannot initialize BaseViewer."); + } + + var viewerVersion = '2.10.377'; + + if (_pdfjsLib.version !== viewerVersion) { + throw new Error("The API version \"".concat(_pdfjsLib.version, "\" does not match the Viewer version \"").concat(viewerVersion, "\".")); + } + + this._name = this.constructor.name; + this.container = options.container; + this.viewer = options.viewer || options.container.firstElementChild; + + if (!(((_this$container = this.container) === null || _this$container === void 0 ? void 0 : _this$container.tagName.toUpperCase()) === "DIV" && ((_this$viewer = this.viewer) === null || _this$viewer === void 0 ? void 0 : _this$viewer.tagName.toUpperCase()) === "DIV")) { + throw new Error("Invalid `container` and/or `viewer` option."); + } + + if (this.container.offsetParent && getComputedStyle(this.container).position !== "absolute") { + throw new Error("The `container` must be absolutely positioned."); + } + + this.eventBus = options.eventBus; + this.linkService = options.linkService || new _pdf_link_service.SimpleLinkService(); + this.downloadManager = options.downloadManager || null; + this.findController = options.findController || null; + this._scriptingManager = options.scriptingManager || null; + this.removePageBorders = options.removePageBorders || false; + this.textLayerMode = Number.isInteger(options.textLayerMode) ? options.textLayerMode : _ui_utils.TextLayerMode.ENABLE; + this.imageResourcesPath = options.imageResourcesPath || ""; + this.renderInteractiveForms = options.renderInteractiveForms !== false; + this.enablePrintAutoRotate = options.enablePrintAutoRotate || false; + this.renderer = options.renderer || _ui_utils.RendererType.CANVAS; + this.useOnlyCssZoom = options.useOnlyCssZoom || false; + this.maxCanvasPixels = options.maxCanvasPixels; + this.l10n = options.l10n || _l10n_utils.NullL10n; + this.enableScripting = options.enableScripting === true && !!this._scriptingManager; + this.defaultRenderingQueue = !options.renderingQueue; + + if (this.defaultRenderingQueue) { + this.renderingQueue = new _pdf_rendering_queue.PDFRenderingQueue(); + this.renderingQueue.setViewer(this); + } else { + this.renderingQueue = options.renderingQueue; + } + + this.scroll = (0, _ui_utils.watchScroll)(this.container, this._scrollUpdate.bind(this)); + this.presentationModeState = _ui_utils.PresentationModeState.UNKNOWN; + this._onBeforeDraw = this._onAfterDraw = null; + + this._resetView(); + + if (this.removePageBorders) { + this.viewer.classList.add("removePageBorders"); + } + + Promise.resolve().then(function () { + _this.eventBus.dispatch("baseviewerinit", { + source: _this + }); + }); + } + + _createClass(BaseViewer, [{ + key: "pagesCount", + get: function get() { + return this._pages.length; + } + }, { + key: "getPageView", + value: function getPageView(index) { + return this._pages[index]; + } + }, { + key: "pageViewsReady", + get: function get() { + if (!this._pagesCapability.settled) { + return false; + } + + return this._pages.every(function (pageView) { + return pageView === null || pageView === void 0 ? void 0 : pageView.pdfPage; + }); + } + }, { + key: "currentPageNumber", + get: function get() { + return this._currentPageNumber; + }, + set: function set(val) { + if (!Number.isInteger(val)) { + throw new Error("Invalid page number."); + } + + if (!this.pdfDocument) { + return; + } + + if (!this._setCurrentPageNumber(val, true)) { + console.error("".concat(this._name, ".currentPageNumber: \"").concat(val, "\" is not a valid page.")); + } + } + }, { + key: "_setCurrentPageNumber", + value: function _setCurrentPageNumber(val) { + var _this$_pageLabels, _this$_pageLabels2; + + var resetCurrentPageView = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + if (this._currentPageNumber === val) { + if (resetCurrentPageView) { + this._resetCurrentPageView(); + } + + return true; + } + + if (!(0 < val && val <= this.pagesCount)) { + return false; + } + + var previous = this._currentPageNumber; + this._currentPageNumber = val; + this.eventBus.dispatch("pagechanging", { + source: this, + pageNumber: val, + pageLabel: (_this$_pageLabels = (_this$_pageLabels2 = this._pageLabels) === null || _this$_pageLabels2 === void 0 ? void 0 : _this$_pageLabels2[val - 1]) !== null && _this$_pageLabels !== void 0 ? _this$_pageLabels : null, + previous: previous + }); + + if (resetCurrentPageView) { + this._resetCurrentPageView(); + } + + return true; + } + }, { + key: "currentPageLabel", + get: function get() { + var _this$_pageLabels3, _this$_pageLabels4; + + return (_this$_pageLabels3 = (_this$_pageLabels4 = this._pageLabels) === null || _this$_pageLabels4 === void 0 ? void 0 : _this$_pageLabels4[this._currentPageNumber - 1]) !== null && _this$_pageLabels3 !== void 0 ? _this$_pageLabels3 : null; + }, + set: function set(val) { + if (!this.pdfDocument) { + return; + } + + var page = val | 0; + + if (this._pageLabels) { + var i = this._pageLabels.indexOf(val); + + if (i >= 0) { + page = i + 1; + } + } + + if (!this._setCurrentPageNumber(page, true)) { + console.error("".concat(this._name, ".currentPageLabel: \"").concat(val, "\" is not a valid page.")); + } + } + }, { + key: "currentScale", + get: function get() { + return this._currentScale !== _ui_utils.UNKNOWN_SCALE ? this._currentScale : _ui_utils.DEFAULT_SCALE; + }, + set: function set(val) { + if (isNaN(val)) { + throw new Error("Invalid numeric scale."); + } + + if (!this.pdfDocument) { + return; + } + + this._setScale(val, false); + } + }, { + key: "currentScaleValue", + get: function get() { + return this._currentScaleValue; + }, + set: function set(val) { + if (!this.pdfDocument) { + return; + } + + this._setScale(val, false); + } + }, { + key: "pagesRotation", + get: function get() { + return this._pagesRotation; + }, + set: function set(rotation) { + if (!(0, _ui_utils.isValidRotation)(rotation)) { + throw new Error("Invalid pages rotation angle."); + } + + if (!this.pdfDocument) { + return; + } + + rotation %= 360; + + if (rotation < 0) { + rotation += 360; + } + + if (this._pagesRotation === rotation) { + return; + } + + this._pagesRotation = rotation; + var pageNumber = this._currentPageNumber; + + for (var i = 0, ii = this._pages.length; i < ii; i++) { + var pageView = this._pages[i]; + pageView.update(pageView.scale, rotation); + } + + if (this._currentScaleValue) { + this._setScale(this._currentScaleValue, true); + } + + this.eventBus.dispatch("rotationchanging", { + source: this, + pagesRotation: rotation, + pageNumber: pageNumber + }); + + if (this.defaultRenderingQueue) { + this.update(); + } + } + }, { + key: "firstPagePromise", + get: function get() { + return this.pdfDocument ? this._firstPageCapability.promise : null; + } + }, { + key: "onePageRendered", + get: function get() { + return this.pdfDocument ? this._onePageRenderedCapability.promise : null; + } + }, { + key: "pagesPromise", + get: function get() { + return this.pdfDocument ? this._pagesCapability.promise : null; + } + }, { + key: "_viewerElement", + get: function get() { + throw new Error("Not implemented: _viewerElement"); + } + }, { + key: "_onePageRenderedOrForceFetch", + value: function _onePageRenderedOrForceFetch() { + if (!this.container.offsetParent || this._getVisiblePages().views.length === 0) { + return Promise.resolve(); + } + + return this._onePageRenderedCapability.promise; + } + }, { + key: "setDocument", + value: function setDocument(pdfDocument) { + var _this2 = this; + + if (this.pdfDocument) { + this.eventBus.dispatch("pagesdestroy", { + source: this + }); + + this._cancelRendering(); + + this._resetView(); + + if (this.findController) { + this.findController.setDocument(null); + } + + if (this._scriptingManager) { + this._scriptingManager.setDocument(null); + } + } + + this.pdfDocument = pdfDocument; + + if (!pdfDocument) { + return; + } + + var isPureXfa = pdfDocument.isPureXfa; + var pagesCount = pdfDocument.numPages; + var firstPagePromise = pdfDocument.getPage(1); + var optionalContentConfigPromise = pdfDocument.getOptionalContentConfig(); + + this._pagesCapability.promise.then(function () { + _this2.eventBus.dispatch("pagesloaded", { + source: _this2, + pagesCount: pagesCount + }); + }); + + this._onBeforeDraw = function (evt) { + var pageView = _this2._pages[evt.pageNumber - 1]; + + if (!pageView) { + return; + } + + _this2._buffer.push(pageView); + }; + + this.eventBus._on("pagerender", this._onBeforeDraw); + + this._onAfterDraw = function (evt) { + if (evt.cssTransform || _this2._onePageRenderedCapability.settled) { + return; + } + + _this2._onePageRenderedCapability.resolve(); + + _this2.eventBus._off("pagerendered", _this2._onAfterDraw); + + _this2._onAfterDraw = null; + }; + + this.eventBus._on("pagerendered", this._onAfterDraw); + + firstPagePromise.then(function (firstPdfPage) { + _this2._firstPageCapability.resolve(firstPdfPage); + + _this2._optionalContentConfigPromise = optionalContentConfigPromise; + var scale = _this2.currentScale; + var viewport = firstPdfPage.getViewport({ + scale: scale * _ui_utils.CSS_UNITS + }); + var textLayerFactory = _this2.textLayerMode !== _ui_utils.TextLayerMode.DISABLE ? _this2 : null; + var xfaLayerFactory = isPureXfa ? _this2 : null; + + for (var pageNum = 1; pageNum <= pagesCount; ++pageNum) { + var pageView = new _pdf_page_view.PDFPageView({ + container: _this2._viewerElement, + eventBus: _this2.eventBus, + id: pageNum, + scale: scale, + defaultViewport: viewport.clone(), + optionalContentConfigPromise: optionalContentConfigPromise, + renderingQueue: _this2.renderingQueue, + textLayerFactory: textLayerFactory, + textLayerMode: _this2.textLayerMode, + annotationLayerFactory: _this2, + xfaLayerFactory: xfaLayerFactory, + structTreeLayerFactory: _this2, + imageResourcesPath: _this2.imageResourcesPath, + renderInteractiveForms: _this2.renderInteractiveForms, + renderer: _this2.renderer, + useOnlyCssZoom: _this2.useOnlyCssZoom, + maxCanvasPixels: _this2.maxCanvasPixels, + l10n: _this2.l10n + }); + + _this2._pages.push(pageView); + } + + var firstPageView = _this2._pages[0]; + + if (firstPageView) { + firstPageView.setPdfPage(firstPdfPage); + + _this2.linkService.cachePageRef(1, firstPdfPage.ref); + } + + if (_this2._spreadMode !== _ui_utils.SpreadMode.NONE) { + _this2._updateSpreadMode(); + } + + _this2._onePageRenderedOrForceFetch().then(function () { + if (_this2.findController) { + _this2.findController.setDocument(pdfDocument); + } + + if (_this2.enableScripting) { + _this2._scriptingManager.setDocument(pdfDocument); + } + + if (pdfDocument.loadingParams.disableAutoFetch || pagesCount > 7500) { + _this2._pagesCapability.resolve(); + + return; + } + + var getPagesLeft = pagesCount - 1; + + if (getPagesLeft <= 0) { + _this2._pagesCapability.resolve(); + + return; + } + + var _loop = function _loop(_pageNum) { + pdfDocument.getPage(_pageNum).then(function (pdfPage) { + var pageView = _this2._pages[_pageNum - 1]; + + if (!pageView.pdfPage) { + pageView.setPdfPage(pdfPage); + } + + _this2.linkService.cachePageRef(_pageNum, pdfPage.ref); + + if (--getPagesLeft === 0) { + _this2._pagesCapability.resolve(); + } + }, function (reason) { + console.error("Unable to get page ".concat(_pageNum, " to initialize viewer"), reason); + + if (--getPagesLeft === 0) { + _this2._pagesCapability.resolve(); + } + }); + }; + + for (var _pageNum = 2; _pageNum <= pagesCount; ++_pageNum) { + _loop(_pageNum); + } + }); + + _this2.eventBus.dispatch("pagesinit", { + source: _this2 + }); + + if (_this2.defaultRenderingQueue) { + _this2.update(); + } + })["catch"](function (reason) { + console.error("Unable to initialize viewer", reason); + }); + } + }, { + key: "setPageLabels", + value: function setPageLabels(labels) { + if (!this.pdfDocument) { + return; + } + + if (!labels) { + this._pageLabels = null; + } else if (!(Array.isArray(labels) && this.pdfDocument.numPages === labels.length)) { + this._pageLabels = null; + console.error("".concat(this._name, ".setPageLabels: Invalid page labels.")); + } else { + this._pageLabels = labels; + } + + for (var i = 0, ii = this._pages.length; i < ii; i++) { + var _this$_pageLabels$i, _this$_pageLabels5; + + this._pages[i].setPageLabel((_this$_pageLabels$i = (_this$_pageLabels5 = this._pageLabels) === null || _this$_pageLabels5 === void 0 ? void 0 : _this$_pageLabels5[i]) !== null && _this$_pageLabels$i !== void 0 ? _this$_pageLabels$i : null); + } + } + }, { + key: "_resetView", + value: function _resetView() { + this._pages = []; + this._currentPageNumber = 1; + this._currentScale = _ui_utils.UNKNOWN_SCALE; + this._currentScaleValue = null; + this._pageLabels = null; + this._buffer = new PDFPageViewBuffer(DEFAULT_CACHE_SIZE); + this._location = null; + this._pagesRotation = 0; + this._optionalContentConfigPromise = null; + this._pagesRequests = new WeakMap(); + this._firstPageCapability = (0, _pdfjsLib.createPromiseCapability)(); + this._onePageRenderedCapability = (0, _pdfjsLib.createPromiseCapability)(); + this._pagesCapability = (0, _pdfjsLib.createPromiseCapability)(); + this._scrollMode = _ui_utils.ScrollMode.VERTICAL; + this._spreadMode = _ui_utils.SpreadMode.NONE; + + if (this._onBeforeDraw) { + this.eventBus._off("pagerender", this._onBeforeDraw); + + this._onBeforeDraw = null; + } + + if (this._onAfterDraw) { + this.eventBus._off("pagerendered", this._onAfterDraw); + + this._onAfterDraw = null; + } + + this.viewer.textContent = ""; + + this._updateScrollMode(); + } + }, { + key: "_scrollUpdate", + value: function _scrollUpdate() { + if (this.pagesCount === 0) { + return; + } + + this.update(); + } + }, { + key: "_scrollIntoView", + value: function _scrollIntoView(_ref) { + var pageDiv = _ref.pageDiv, + _ref$pageSpot = _ref.pageSpot, + pageSpot = _ref$pageSpot === void 0 ? null : _ref$pageSpot, + _ref$pageNumber = _ref.pageNumber, + pageNumber = _ref$pageNumber === void 0 ? null : _ref$pageNumber; + (0, _ui_utils.scrollIntoView)(pageDiv, pageSpot); + } + }, { + key: "_setScaleUpdatePages", + value: function _setScaleUpdatePages(newScale, newValue) { + var noScroll = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; + var preset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + this._currentScaleValue = newValue.toString(); + + if (isSameScale(this._currentScale, newScale)) { + if (preset) { + this.eventBus.dispatch("scalechanging", { + source: this, + scale: newScale, + presetValue: newValue + }); + } + + return; + } + + for (var i = 0, ii = this._pages.length; i < ii; i++) { + this._pages[i].update(newScale); + } + + this._currentScale = newScale; + + if (!noScroll) { + var page = this._currentPageNumber, + dest; + + if (this._location && !(this.isInPresentationMode || this.isChangingPresentationMode)) { + page = this._location.pageNumber; + dest = [null, { + name: "XYZ" + }, this._location.left, this._location.top, null]; + } + + this.scrollPageIntoView({ + pageNumber: page, + destArray: dest, + allowNegativeOffset: true + }); + } + + this.eventBus.dispatch("scalechanging", { + source: this, + scale: newScale, + presetValue: preset ? newValue : undefined + }); + + if (this.defaultRenderingQueue) { + this.update(); + } + } + }, { + key: "_pageWidthScaleFactor", + get: function get() { + if (this._spreadMode !== _ui_utils.SpreadMode.NONE && this._scrollMode !== _ui_utils.ScrollMode.HORIZONTAL && !this.isInPresentationMode) { + return 2; + } + + return 1; + } + }, { + key: "_setScale", + value: function _setScale(value) { + var noScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var scale = parseFloat(value); + + if (scale > 0) { + this._setScaleUpdatePages(scale, value, noScroll, false); + } else { + var currentPage = this._pages[this._currentPageNumber - 1]; + + if (!currentPage) { + return; + } + + var noPadding = this.isInPresentationMode || this.removePageBorders; + var hPadding = noPadding ? 0 : _ui_utils.SCROLLBAR_PADDING; + var vPadding = noPadding ? 0 : _ui_utils.VERTICAL_PADDING; + + if (!noPadding && this._isScrollModeHorizontal) { + var _ref2 = [vPadding, hPadding]; + hPadding = _ref2[0]; + vPadding = _ref2[1]; + } + + var pageWidthScale = (this.container.clientWidth - hPadding) / currentPage.width * currentPage.scale / this._pageWidthScaleFactor; + var pageHeightScale = (this.container.clientHeight - vPadding) / currentPage.height * currentPage.scale; + + switch (value) { + case "page-actual": + scale = 1; + break; + + case "page-width": + scale = pageWidthScale; + break; + + case "page-height": + scale = pageHeightScale; + break; + + case "page-fit": + scale = Math.min(pageWidthScale, pageHeightScale); + break; + + case "auto": + var horizontalScale = (0, _ui_utils.isPortraitOrientation)(currentPage) ? pageWidthScale : Math.min(pageHeightScale, pageWidthScale); + scale = Math.min(_ui_utils.MAX_AUTO_SCALE, horizontalScale); + break; + + default: + console.error("".concat(this._name, "._setScale: \"").concat(value, "\" is an unknown zoom value.")); + return; + } + + this._setScaleUpdatePages(scale, value, noScroll, true); + } + } + }, { + key: "_resetCurrentPageView", + value: function _resetCurrentPageView() { + if (this.isInPresentationMode) { + this._setScale(this._currentScaleValue, true); + } + + var pageView = this._pages[this._currentPageNumber - 1]; + + this._scrollIntoView({ + pageDiv: pageView.div + }); + } + }, { + key: "pageLabelToPageNumber", + value: function pageLabelToPageNumber(label) { + if (!this._pageLabels) { + return null; + } + + var i = this._pageLabels.indexOf(label); + + if (i < 0) { + return null; + } + + return i + 1; + } + }, { + key: "scrollPageIntoView", + value: function scrollPageIntoView(_ref3) { + var pageNumber = _ref3.pageNumber, + _ref3$destArray = _ref3.destArray, + destArray = _ref3$destArray === void 0 ? null : _ref3$destArray, + _ref3$allowNegativeOf = _ref3.allowNegativeOffset, + allowNegativeOffset = _ref3$allowNegativeOf === void 0 ? false : _ref3$allowNegativeOf, + _ref3$ignoreDestinati = _ref3.ignoreDestinationZoom, + ignoreDestinationZoom = _ref3$ignoreDestinati === void 0 ? false : _ref3$ignoreDestinati; + + if (!this.pdfDocument) { + return; + } + + var pageView = Number.isInteger(pageNumber) && this._pages[pageNumber - 1]; + + if (!pageView) { + console.error("".concat(this._name, ".scrollPageIntoView: ") + "\"".concat(pageNumber, "\" is not a valid pageNumber parameter.")); + return; + } + + if (this.isInPresentationMode || !destArray) { + this._setCurrentPageNumber(pageNumber, true); + + return; + } + + var x = 0, + y = 0; + var width = 0, + height = 0, + widthScale, + heightScale; + var changeOrientation = pageView.rotation % 180 !== 0; + var pageWidth = (changeOrientation ? pageView.height : pageView.width) / pageView.scale / _ui_utils.CSS_UNITS; + var pageHeight = (changeOrientation ? pageView.width : pageView.height) / pageView.scale / _ui_utils.CSS_UNITS; + var scale = 0; + + switch (destArray[1].name) { + case "XYZ": + x = destArray[2]; + y = destArray[3]; + scale = destArray[4]; + x = x !== null ? x : 0; + y = y !== null ? y : pageHeight; + break; + + case "Fit": + case "FitB": + scale = "page-fit"; + break; + + case "FitH": + case "FitBH": + y = destArray[2]; + scale = "page-width"; + + if (y === null && this._location) { + x = this._location.left; + y = this._location.top; + } else if (typeof y !== "number") { + y = pageHeight; + } + + break; + + case "FitV": + case "FitBV": + x = destArray[2]; + width = pageWidth; + height = pageHeight; + scale = "page-height"; + break; + + case "FitR": + x = destArray[2]; + y = destArray[3]; + width = destArray[4] - x; + height = destArray[5] - y; + var hPadding = this.removePageBorders ? 0 : _ui_utils.SCROLLBAR_PADDING; + var vPadding = this.removePageBorders ? 0 : _ui_utils.VERTICAL_PADDING; + widthScale = (this.container.clientWidth - hPadding) / width / _ui_utils.CSS_UNITS; + heightScale = (this.container.clientHeight - vPadding) / height / _ui_utils.CSS_UNITS; + scale = Math.min(Math.abs(widthScale), Math.abs(heightScale)); + break; + + default: + console.error("".concat(this._name, ".scrollPageIntoView: ") + "\"".concat(destArray[1].name, "\" is not a valid destination type.")); + return; + } + + if (!ignoreDestinationZoom) { + if (scale && scale !== this._currentScale) { + this.currentScaleValue = scale; + } else if (this._currentScale === _ui_utils.UNKNOWN_SCALE) { + this.currentScaleValue = _ui_utils.DEFAULT_SCALE_VALUE; + } + } + + if (scale === "page-fit" && !destArray[4]) { + this._scrollIntoView({ + pageDiv: pageView.div, + pageNumber: pageNumber + }); + + return; + } + + var boundingRect = [pageView.viewport.convertToViewportPoint(x, y), pageView.viewport.convertToViewportPoint(x + width, y + height)]; + var left = Math.min(boundingRect[0][0], boundingRect[1][0]); + var top = Math.min(boundingRect[0][1], boundingRect[1][1]); + + if (!allowNegativeOffset) { + left = Math.max(left, 0); + top = Math.max(top, 0); + } + + this._scrollIntoView({ + pageDiv: pageView.div, + pageSpot: { + left: left, + top: top + }, + pageNumber: pageNumber + }); + } + }, { + key: "_updateLocation", + value: function _updateLocation(firstPage) { + var currentScale = this._currentScale; + var currentScaleValue = this._currentScaleValue; + var normalizedScaleValue = parseFloat(currentScaleValue) === currentScale ? Math.round(currentScale * 10000) / 100 : currentScaleValue; + var pageNumber = firstPage.id; + var pdfOpenParams = "#page=" + pageNumber; + pdfOpenParams += "&zoom=" + normalizedScaleValue; + var currentPageView = this._pages[pageNumber - 1]; + var container = this.container; + var topLeft = currentPageView.getPagePoint(container.scrollLeft - firstPage.x, container.scrollTop - firstPage.y); + var intLeft = Math.round(topLeft[0]); + var intTop = Math.round(topLeft[1]); + pdfOpenParams += "," + intLeft + "," + intTop; + this._location = { + pageNumber: pageNumber, + scale: normalizedScaleValue, + top: intTop, + left: intLeft, + rotation: this._pagesRotation, + pdfOpenParams: pdfOpenParams + }; + } + }, { + key: "_updateHelper", + value: function _updateHelper(visiblePages) { + throw new Error("Not implemented: _updateHelper"); + } + }, { + key: "update", + value: function update() { + var visible = this._getVisiblePages(); + + var visiblePages = visible.views, + numVisiblePages = visiblePages.length; + + if (numVisiblePages === 0) { + return; + } + + var newCacheSize = Math.max(DEFAULT_CACHE_SIZE, 2 * numVisiblePages + 1); + + this._buffer.resize(newCacheSize, visiblePages); + + this.renderingQueue.renderHighestPriority(visible); + + this._updateHelper(visiblePages); + + this._updateLocation(visible.first); + + this.eventBus.dispatch("updateviewarea", { + source: this, + location: this._location + }); + } + }, { + key: "containsElement", + value: function containsElement(element) { + return this.container.contains(element); + } + }, { + key: "focus", + value: function focus() { + this.container.focus(); + } + }, { + key: "_isScrollModeHorizontal", + get: function get() { + return this.isInPresentationMode ? false : this._scrollMode === _ui_utils.ScrollMode.HORIZONTAL; + } + }, { + key: "_isContainerRtl", + get: function get() { + return getComputedStyle(this.container).direction === "rtl"; + } + }, { + key: "isInPresentationMode", + get: function get() { + return this.presentationModeState === _ui_utils.PresentationModeState.FULLSCREEN; + } + }, { + key: "isChangingPresentationMode", + get: function get() { + return this.presentationModeState === _ui_utils.PresentationModeState.CHANGING; + } + }, { + key: "isHorizontalScrollbarEnabled", + get: function get() { + return this.isInPresentationMode ? false : this.container.scrollWidth > this.container.clientWidth; + } + }, { + key: "isVerticalScrollbarEnabled", + get: function get() { + return this.isInPresentationMode ? false : this.container.scrollHeight > this.container.clientHeight; + } + }, { + key: "_getCurrentVisiblePage", + value: function _getCurrentVisiblePage() { + if (!this.pagesCount) { + return { + views: [] + }; + } + + var pageView = this._pages[this._currentPageNumber - 1]; + var element = pageView.div; + var view = { + id: pageView.id, + x: element.offsetLeft + element.clientLeft, + y: element.offsetTop + element.clientTop, + view: pageView + }; + return { + first: view, + last: view, + views: [view] + }; + } + }, { + key: "_getVisiblePages", + value: function _getVisiblePages() { + return (0, _ui_utils.getVisibleElements)({ + scrollEl: this.container, + views: this._pages, + sortByVisibility: true, + horizontal: this._isScrollModeHorizontal, + rtl: this._isScrollModeHorizontal && this._isContainerRtl + }); + } + }, { + key: "isPageVisible", + value: function isPageVisible(pageNumber) { + if (!this.pdfDocument) { + return false; + } + + if (!(Number.isInteger(pageNumber) && pageNumber > 0 && pageNumber <= this.pagesCount)) { + console.error("".concat(this._name, ".isPageVisible: \"").concat(pageNumber, "\" is not a valid page.")); + return false; + } + + return this._getVisiblePages().views.some(function (view) { + return view.id === pageNumber; + }); + } + }, { + key: "isPageCached", + value: function isPageCached(pageNumber) { + if (!this.pdfDocument || !this._buffer) { + return false; + } + + if (!(Number.isInteger(pageNumber) && pageNumber > 0 && pageNumber <= this.pagesCount)) { + console.error("".concat(this._name, ".isPageCached: \"").concat(pageNumber, "\" is not a valid page.")); + return false; + } + + var pageView = this._pages[pageNumber - 1]; + + if (!pageView) { + return false; + } + + return this._buffer.has(pageView); + } + }, { + key: "cleanup", + value: function cleanup() { + for (var i = 0, ii = this._pages.length; i < ii; i++) { + if (this._pages[i] && this._pages[i].renderingState !== _pdf_rendering_queue.RenderingStates.FINISHED) { + this._pages[i].reset(); + } + } + } + }, { + key: "_cancelRendering", + value: function _cancelRendering() { + for (var i = 0, ii = this._pages.length; i < ii; i++) { + if (this._pages[i]) { + this._pages[i].cancelRendering(); + } + } + } + }, { + key: "_ensurePdfPageLoaded", + value: function _ensurePdfPageLoaded(pageView) { + var _this3 = this; + + if (pageView.pdfPage) { + return Promise.resolve(pageView.pdfPage); + } + + if (this._pagesRequests.has(pageView)) { + return this._pagesRequests.get(pageView); + } + + var promise = this.pdfDocument.getPage(pageView.id).then(function (pdfPage) { + if (!pageView.pdfPage) { + pageView.setPdfPage(pdfPage); + } + + _this3._pagesRequests["delete"](pageView); + + return pdfPage; + })["catch"](function (reason) { + console.error("Unable to get page for page view", reason); + + _this3._pagesRequests["delete"](pageView); + }); + + this._pagesRequests.set(pageView, promise); + + return promise; + } + }, { + key: "forceRendering", + value: function forceRendering(currentlyVisiblePages) { + var _this4 = this; + + var visiblePages = currentlyVisiblePages || this._getVisiblePages(); + + var scrollAhead = this._isScrollModeHorizontal ? this.scroll.right : this.scroll.down; + var pageView = this.renderingQueue.getHighestPriority(visiblePages, this._pages, scrollAhead); + + if (pageView) { + this._ensurePdfPageLoaded(pageView).then(function () { + _this4.renderingQueue.renderView(pageView); + }); + + return true; + } + + return false; + } + }, { + key: "createTextLayerBuilder", + value: function createTextLayerBuilder(textLayerDiv, pageIndex, viewport) { + var enhanceTextSelection = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + var eventBus = arguments.length > 4 ? arguments[4] : undefined; + return new _text_layer_builder.TextLayerBuilder({ + textLayerDiv: textLayerDiv, + eventBus: eventBus, + pageIndex: pageIndex, + viewport: viewport, + findController: this.isInPresentationMode ? null : this.findController, + enhanceTextSelection: this.isInPresentationMode ? false : enhanceTextSelection + }); + } + }, { + key: "createAnnotationLayerBuilder", + value: function createAnnotationLayerBuilder(pageDiv, pdfPage) { + var _this$pdfDocument, _this$pdfDocument2, _this$_scriptingManag; + + var annotationStorage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + var imageResourcesPath = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ""; + var renderInteractiveForms = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; + var l10n = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : _l10n_utils.NullL10n; + var enableScripting = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null; + var hasJSActionsPromise = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null; + var mouseState = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : null; + return new _annotation_layer_builder.AnnotationLayerBuilder({ + pageDiv: pageDiv, + pdfPage: pdfPage, + annotationStorage: annotationStorage || ((_this$pdfDocument = this.pdfDocument) === null || _this$pdfDocument === void 0 ? void 0 : _this$pdfDocument.annotationStorage), + imageResourcesPath: imageResourcesPath, + renderInteractiveForms: renderInteractiveForms, + linkService: this.linkService, + downloadManager: this.downloadManager, + l10n: l10n, + enableScripting: enableScripting !== null && enableScripting !== void 0 ? enableScripting : this.enableScripting, + hasJSActionsPromise: hasJSActionsPromise || ((_this$pdfDocument2 = this.pdfDocument) === null || _this$pdfDocument2 === void 0 ? void 0 : _this$pdfDocument2.hasJSActions()), + mouseState: mouseState || ((_this$_scriptingManag = this._scriptingManager) === null || _this$_scriptingManag === void 0 ? void 0 : _this$_scriptingManag.mouseState) + }); + } + }, { + key: "createXfaLayerBuilder", + value: function createXfaLayerBuilder(pageDiv, pdfPage) { + var _this$pdfDocument3; + + var annotationStorage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + return new _xfa_layer_builder.XfaLayerBuilder({ + pageDiv: pageDiv, + pdfPage: pdfPage, + annotationStorage: annotationStorage || ((_this$pdfDocument3 = this.pdfDocument) === null || _this$pdfDocument3 === void 0 ? void 0 : _this$pdfDocument3.annotationStorage) + }); + } + }, { + key: "createStructTreeLayerBuilder", + value: function createStructTreeLayerBuilder(pdfPage) { + return new _struct_tree_layer_builder.StructTreeLayerBuilder({ + pdfPage: pdfPage + }); + } + }, { + key: "hasEqualPageSizes", + get: function get() { + var firstPageView = this._pages[0]; + + for (var i = 1, ii = this._pages.length; i < ii; ++i) { + var pageView = this._pages[i]; + + if (pageView.width !== firstPageView.width || pageView.height !== firstPageView.height) { + return false; + } + } + + return true; + } + }, { + key: "getPagesOverview", + value: function getPagesOverview() { + var _this5 = this; + + return this._pages.map(function (pageView) { + var viewport = pageView.pdfPage.getViewport({ + scale: 1 + }); + + if (!_this5.enablePrintAutoRotate || (0, _ui_utils.isPortraitOrientation)(viewport)) { + return { + width: viewport.width, + height: viewport.height, + rotation: viewport.rotation + }; + } + + return { + width: viewport.height, + height: viewport.width, + rotation: (viewport.rotation - 90) % 360 + }; + }); + } + }, { + key: "optionalContentConfigPromise", + get: function get() { + if (!this.pdfDocument) { + return Promise.resolve(null); + } + + if (!this._optionalContentConfigPromise) { + return this.pdfDocument.getOptionalContentConfig(); + } + + return this._optionalContentConfigPromise; + }, + set: function set(promise) { + if (!(promise instanceof Promise)) { + throw new Error("Invalid optionalContentConfigPromise: ".concat(promise)); + } + + if (!this.pdfDocument) { + return; + } + + if (!this._optionalContentConfigPromise) { + return; + } + + this._optionalContentConfigPromise = promise; + + var _iterator = _createForOfIteratorHelper(this._pages), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var pageView = _step.value; + pageView.update(pageView.scale, pageView.rotation, promise); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + this.update(); + this.eventBus.dispatch("optionalcontentconfigchanged", { + source: this, + promise: promise + }); + } + }, { + key: "scrollMode", + get: function get() { + return this._scrollMode; + }, + set: function set(mode) { + if (this._scrollMode === mode) { + return; + } + + if (!(0, _ui_utils.isValidScrollMode)(mode)) { + throw new Error("Invalid scroll mode: ".concat(mode)); + } + + this._scrollMode = mode; + this.eventBus.dispatch("scrollmodechanged", { + source: this, + mode: mode + }); + + this._updateScrollMode(this._currentPageNumber); + } + }, { + key: "_updateScrollMode", + value: function _updateScrollMode() { + var pageNumber = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + var scrollMode = this._scrollMode, + viewer = this.viewer; + viewer.classList.toggle("scrollHorizontal", scrollMode === _ui_utils.ScrollMode.HORIZONTAL); + viewer.classList.toggle("scrollWrapped", scrollMode === _ui_utils.ScrollMode.WRAPPED); + + if (!this.pdfDocument || !pageNumber) { + return; + } + + if (this._currentScaleValue && isNaN(this._currentScaleValue)) { + this._setScale(this._currentScaleValue, true); + } + + this._setCurrentPageNumber(pageNumber, true); + + this.update(); + } + }, { + key: "spreadMode", + get: function get() { + return this._spreadMode; + }, + set: function set(mode) { + if (this._spreadMode === mode) { + return; + } + + if (!(0, _ui_utils.isValidSpreadMode)(mode)) { + throw new Error("Invalid spread mode: ".concat(mode)); + } + + this._spreadMode = mode; + this.eventBus.dispatch("spreadmodechanged", { + source: this, + mode: mode + }); + + this._updateSpreadMode(this._currentPageNumber); + } + }, { + key: "_updateSpreadMode", + value: function _updateSpreadMode() { + var pageNumber = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; + + if (!this.pdfDocument) { + return; + } + + var viewer = this.viewer, + pages = this._pages; + viewer.textContent = ""; + + if (this._spreadMode === _ui_utils.SpreadMode.NONE) { + for (var i = 0, iMax = pages.length; i < iMax; ++i) { + viewer.appendChild(pages[i].div); + } + } else { + var parity = this._spreadMode - 1; + var spread = null; + + for (var _i = 0, _iMax = pages.length; _i < _iMax; ++_i) { + if (spread === null) { + spread = document.createElement("div"); + spread.className = "spread"; + viewer.appendChild(spread); + } else if (_i % 2 === parity) { + spread = spread.cloneNode(false); + viewer.appendChild(spread); + } + + spread.appendChild(pages[_i].div); + } + } + + if (!pageNumber) { + return; + } + + if (this._currentScaleValue && isNaN(this._currentScaleValue)) { + this._setScale(this._currentScaleValue, true); + } + + this._setCurrentPageNumber(pageNumber, true); + + this.update(); + } + }, { + key: "_getPageAdvance", + value: function _getPageAdvance(currentPageNumber) { + var previous = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + + if (this.isInPresentationMode) { + return 1; + } + + switch (this._scrollMode) { + case _ui_utils.ScrollMode.WRAPPED: + { + var _this$_getVisiblePage = this._getVisiblePages(), + views = _this$_getVisiblePage.views, + pageLayout = new Map(); + + var _iterator2 = _createForOfIteratorHelper(views), + _step2; + + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + var _step2$value = _step2.value, + id = _step2$value.id, + y = _step2$value.y, + percent = _step2$value.percent, + widthPercent = _step2$value.widthPercent; + + if (percent === 0 || widthPercent < 100) { + continue; + } + + var yArray = pageLayout.get(y); + + if (!yArray) { + pageLayout.set(y, yArray || (yArray = [])); + } + + yArray.push(id); + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + + var _iterator3 = _createForOfIteratorHelper(pageLayout.values()), + _step3; + + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { + var _yArray = _step3.value; + + var currentIndex = _yArray.indexOf(currentPageNumber); + + if (currentIndex === -1) { + continue; + } + + var numPages = _yArray.length; + + if (numPages === 1) { + break; + } + + if (previous) { + for (var i = currentIndex - 1, ii = 0; i >= ii; i--) { + var currentId = _yArray[i], + expectedId = _yArray[i + 1] - 1; + + if (currentId < expectedId) { + return currentPageNumber - expectedId; + } + } + } else { + for (var _i2 = currentIndex + 1, _ii = numPages; _i2 < _ii; _i2++) { + var _currentId = _yArray[_i2], + _expectedId = _yArray[_i2 - 1] + 1; + + if (_currentId > _expectedId) { + return _expectedId - currentPageNumber; + } + } + } + + if (previous) { + var firstId = _yArray[0]; + + if (firstId < currentPageNumber) { + return currentPageNumber - firstId + 1; + } + } else { + var lastId = _yArray[numPages - 1]; + + if (lastId > currentPageNumber) { + return lastId - currentPageNumber + 1; + } + } + + break; + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); + } + + break; + } + + case _ui_utils.ScrollMode.HORIZONTAL: + { + break; + } + + case _ui_utils.ScrollMode.VERTICAL: + { + if (this._spreadMode === _ui_utils.SpreadMode.NONE) { + break; + } + + var parity = this._spreadMode - 1; + + if (previous && currentPageNumber % 2 !== parity) { + break; + } else if (!previous && currentPageNumber % 2 === parity) { + break; + } + + var _this$_getVisiblePage2 = this._getVisiblePages(), + _views = _this$_getVisiblePage2.views, + _expectedId2 = previous ? currentPageNumber - 1 : currentPageNumber + 1; + + var _iterator4 = _createForOfIteratorHelper(_views), + _step4; + + try { + for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) { + var _step4$value = _step4.value, + _id = _step4$value.id, + _percent = _step4$value.percent, + _widthPercent = _step4$value.widthPercent; + + if (_id !== _expectedId2) { + continue; + } + + if (_percent > 0 && _widthPercent === 100) { + return 2; + } + + break; + } + } catch (err) { + _iterator4.e(err); + } finally { + _iterator4.f(); + } + + break; + } + } + + return 1; + } + }, { + key: "nextPage", + value: function nextPage() { + var currentPageNumber = this._currentPageNumber, + pagesCount = this.pagesCount; + + if (currentPageNumber >= pagesCount) { + return false; + } + + var advance = this._getPageAdvance(currentPageNumber, false) || 1; + this.currentPageNumber = Math.min(currentPageNumber + advance, pagesCount); + return true; + } + }, { + key: "previousPage", + value: function previousPage() { + var currentPageNumber = this._currentPageNumber; + + if (currentPageNumber <= 1) { + return false; + } + + var advance = this._getPageAdvance(currentPageNumber, true) || 1; + this.currentPageNumber = Math.max(currentPageNumber - advance, 1); + return true; + } + }]); + + return BaseViewer; +}(); + +exports.BaseViewer = BaseViewer; + +/***/ }), +/* 31 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.DefaultAnnotationLayerFactory = exports.AnnotationLayerBuilder = void 0; + +var _pdfjsLib = __webpack_require__(7); + +var _l10n_utils = __webpack_require__(32); + +var _pdf_link_service = __webpack_require__(21); + +function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } + +function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } + +function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var AnnotationLayerBuilder = /*#__PURE__*/function () { + function AnnotationLayerBuilder(_ref) { + var pageDiv = _ref.pageDiv, + pdfPage = _ref.pdfPage, + linkService = _ref.linkService, + downloadManager = _ref.downloadManager, + _ref$annotationStorag = _ref.annotationStorage, + annotationStorage = _ref$annotationStorag === void 0 ? null : _ref$annotationStorag, + _ref$imageResourcesPa = _ref.imageResourcesPath, + imageResourcesPath = _ref$imageResourcesPa === void 0 ? "" : _ref$imageResourcesPa, + _ref$renderInteractiv = _ref.renderInteractiveForms, + renderInteractiveForms = _ref$renderInteractiv === void 0 ? true : _ref$renderInteractiv, + _ref$l10n = _ref.l10n, + l10n = _ref$l10n === void 0 ? _l10n_utils.NullL10n : _ref$l10n, + _ref$enableScripting = _ref.enableScripting, + enableScripting = _ref$enableScripting === void 0 ? false : _ref$enableScripting, + _ref$hasJSActionsProm = _ref.hasJSActionsPromise, + hasJSActionsPromise = _ref$hasJSActionsProm === void 0 ? null : _ref$hasJSActionsProm, + _ref$mouseState = _ref.mouseState, + mouseState = _ref$mouseState === void 0 ? null : _ref$mouseState; + + _classCallCheck(this, AnnotationLayerBuilder); + + this.pageDiv = pageDiv; + this.pdfPage = pdfPage; + this.linkService = linkService; + this.downloadManager = downloadManager; + this.imageResourcesPath = imageResourcesPath; + this.renderInteractiveForms = renderInteractiveForms; + this.l10n = l10n; + this.annotationStorage = annotationStorage; + this.enableScripting = enableScripting; + this._hasJSActionsPromise = hasJSActionsPromise; + this._mouseState = mouseState; + this.div = null; + this._cancelled = false; + } + + _createClass(AnnotationLayerBuilder, [{ + key: "render", + value: function render(viewport) { + var _this = this; + + var intent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "display"; + return Promise.all([this.pdfPage.getAnnotations({ + intent: intent + }), this._hasJSActionsPromise]).then(function (_ref2) { + var _ref3 = _slicedToArray(_ref2, 2), + annotations = _ref3[0], + _ref3$ = _ref3[1], + hasJSActions = _ref3$ === void 0 ? false : _ref3$; + + if (_this._cancelled) { + return; + } + + if (annotations.length === 0) { + return; + } + + var parameters = { + viewport: viewport.clone({ + dontFlip: true + }), + div: _this.div, + annotations: annotations, + page: _this.pdfPage, + imageResourcesPath: _this.imageResourcesPath, + renderInteractiveForms: _this.renderInteractiveForms, + linkService: _this.linkService, + downloadManager: _this.downloadManager, + annotationStorage: _this.annotationStorage, + enableScripting: _this.enableScripting, + hasJSActions: hasJSActions, + mouseState: _this._mouseState + }; + + if (_this.div) { + _pdfjsLib.AnnotationLayer.update(parameters); + } else { + _this.div = document.createElement("div"); + _this.div.className = "annotationLayer"; + + _this.pageDiv.appendChild(_this.div); + + parameters.div = _this.div; + + _pdfjsLib.AnnotationLayer.render(parameters); + + _this.l10n.translate(_this.div); + } + }); + } + }, { + key: "cancel", + value: function cancel() { + this._cancelled = true; + } + }, { + key: "hide", + value: function hide() { + if (!this.div) { + return; + } + + this.div.hidden = true; + } + }]); + + return AnnotationLayerBuilder; +}(); + +exports.AnnotationLayerBuilder = AnnotationLayerBuilder; + +var DefaultAnnotationLayerFactory = /*#__PURE__*/function () { + function DefaultAnnotationLayerFactory() { + _classCallCheck(this, DefaultAnnotationLayerFactory); + } + + _createClass(DefaultAnnotationLayerFactory, [{ + key: "createAnnotationLayerBuilder", + value: function createAnnotationLayerBuilder(pageDiv, pdfPage) { + var annotationStorage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + var imageResourcesPath = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ""; + var renderInteractiveForms = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true; + var l10n = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : _l10n_utils.NullL10n; + var enableScripting = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false; + var hasJSActionsPromise = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null; + var mouseState = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : null; + return new AnnotationLayerBuilder({ + pageDiv: pageDiv, + pdfPage: pdfPage, + imageResourcesPath: imageResourcesPath, + renderInteractiveForms: renderInteractiveForms, + linkService: new _pdf_link_service.SimpleLinkService(), + l10n: l10n, + annotationStorage: annotationStorage, + enableScripting: enableScripting, + hasJSActionsPromise: hasJSActionsPromise, + mouseState: mouseState + }); + } + }]); + + return DefaultAnnotationLayerFactory; +}(); + +exports.DefaultAnnotationLayerFactory = DefaultAnnotationLayerFactory; + +/***/ }), +/* 32 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.fixupLangCode = fixupLangCode; +exports.getL10nFallback = getL10nFallback; +exports.NullL10n = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__(4)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +var DEFAULT_L10N_STRINGS = { + of_pages: "of {{pagesCount}}", + page_of_pages: "({{pageNumber}} of {{pagesCount}})", + document_properties_kb: "{{size_kb}} KB ({{size_b}} bytes)", + document_properties_mb: "{{size_mb}} MB ({{size_b}} bytes)", + document_properties_date_string: "{{date}}, {{time}}", + document_properties_page_size_unit_inches: "in", + document_properties_page_size_unit_millimeters: "mm", + document_properties_page_size_orientation_portrait: "portrait", + document_properties_page_size_orientation_landscape: "landscape", + document_properties_page_size_name_a3: "A3", + document_properties_page_size_name_a4: "A4", + document_properties_page_size_name_letter: "Letter", + document_properties_page_size_name_legal: "Legal", + document_properties_page_size_dimension_string: "{{width}} × {{height}} {{unit}} ({{orientation}})", + document_properties_page_size_dimension_name_string: "{{width}} × {{height}} {{unit}} ({{name}}, {{orientation}})", + document_properties_linearized_yes: "Yes", + document_properties_linearized_no: "No", + print_progress_percent: "{{progress}}%", + "toggle_sidebar.title": "Toggle Sidebar", + "toggle_sidebar_notification2.title": "Toggle Sidebar (document contains outline/attachments/layers)", + additional_layers: "Additional Layers", + page_landmark: "Page {{page}}", + thumb_page_title: "Page {{page}}", + thumb_page_canvas: "Thumbnail of Page {{page}}", + find_reached_top: "Reached top of document, continued from bottom", + find_reached_bottom: "Reached end of document, continued from top", + "find_match_count[one]": "{{current}} of {{total}} match", + "find_match_count[other]": "{{current}} of {{total}} matches", + "find_match_count_limit[one]": "More than {{limit}} match", + "find_match_count_limit[other]": "More than {{limit}} matches", + find_not_found: "Phrase not found", + error_version_info: "PDF.js v{{version}} (build: {{build}})", + error_message: "Message: {{message}}", + error_stack: "Stack: {{stack}}", + error_file: "File: {{file}}", + error_line: "Line: {{line}}", + rendering_error: "An error occurred while rendering the page.", + page_scale_width: "Page Width", + page_scale_fit: "Page Fit", + page_scale_auto: "Automatic Zoom", + page_scale_actual: "Actual Size", + page_scale_percent: "{{scale}}%", + loading: "Loading…", + loading_error: "An error occurred while loading the PDF.", + invalid_file_error: "Invalid or corrupted PDF file.", + missing_file_error: "Missing PDF file.", + unexpected_response_error: "Unexpected server response.", + printing_not_supported: "Warning: Printing is not fully supported by this browser.", + printing_not_ready: "Warning: The PDF is not fully loaded for printing.", + web_fonts_disabled: "Web fonts are disabled: unable to use embedded PDF fonts." +}; + +function getL10nFallback(key, args) { + switch (key) { + case "find_match_count": + key = "find_match_count[".concat(args.total === 1 ? "one" : "other", "]"); + break; + + case "find_match_count_limit": + key = "find_match_count_limit[".concat(args.limit === 1 ? "one" : "other", "]"); + break; + } + + return DEFAULT_L10N_STRINGS[key] || ""; +} + +var PARTIAL_LANG_CODES = { + en: "en-US", + es: "es-ES", + fy: "fy-NL", + ga: "ga-IE", + gu: "gu-IN", + hi: "hi-IN", + hy: "hy-AM", + nb: "nb-NO", + ne: "ne-NP", + nn: "nn-NO", + pa: "pa-IN", + pt: "pt-PT", + sv: "sv-SE", + zh: "zh-CN" +}; + +function fixupLangCode(langCode) { + return PARTIAL_LANG_CODES[langCode === null || langCode === void 0 ? void 0 : langCode.toLowerCase()] || langCode; +} + +function formatL10nValue(text, args) { + if (!args) { + return text; + } + + return text.replace(/\{\{\s*(\w+)\s*\}\}/g, function (all, name) { + return name in args ? args[name] : "{{" + name + "}}"; + }); +} + +var NullL10n = { + getLanguage: function getLanguage() { + return _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee() { + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", "en-us"); + + case 1: + case "end": + return _context.stop(); + } + } + }, _callee); + }))(); + }, + getDirection: function getDirection() { + return _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee2() { + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", "ltr"); + + case 1: + case "end": + return _context2.stop(); + } + } + }, _callee2); + }))(); + }, + get: function get(key) { + var _arguments = arguments; + return _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee3() { + var args, fallback; + return _regenerator["default"].wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + args = _arguments.length > 1 && _arguments[1] !== undefined ? _arguments[1] : null; + fallback = _arguments.length > 2 && _arguments[2] !== undefined ? _arguments[2] : getL10nFallback(key, args); + return _context3.abrupt("return", formatL10nValue(fallback, args)); + + case 3: + case "end": + return _context3.stop(); + } + } + }, _callee3); + }))(); + }, + translate: function translate(element) { + return _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee4() { + return _regenerator["default"].wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + case "end": + return _context4.stop(); + } + } + }, _callee4); + }))(); + } +}; +exports.NullL10n = NullL10n; + +/***/ }), +/* 33 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PDFPageView = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__(4)); + +var _ui_utils = __webpack_require__(6); + +var _pdfjsLib = __webpack_require__(7); + +var _l10n_utils = __webpack_require__(32); + +var _pdf_rendering_queue = __webpack_require__(10); + +var _viewer_compatibility = __webpack_require__(2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var MAX_CANVAS_PIXELS = _viewer_compatibility.viewerCompatibilityParams.maxCanvasPixels || 16777216; + +var PDFPageView = /*#__PURE__*/function () { + function PDFPageView(options) { + _classCallCheck(this, PDFPageView); + + var container = options.container; + var defaultViewport = options.defaultViewport; + this.id = options.id; + this.renderingId = "page" + this.id; + this.pdfPage = null; + this.pageLabel = null; + this.rotation = 0; + this.scale = options.scale || _ui_utils.DEFAULT_SCALE; + this.viewport = defaultViewport; + this.pdfPageRotate = defaultViewport.rotation; + this._optionalContentConfigPromise = options.optionalContentConfigPromise || null; + this.hasRestrictedScaling = false; + this.textLayerMode = Number.isInteger(options.textLayerMode) ? options.textLayerMode : _ui_utils.TextLayerMode.ENABLE; + this.imageResourcesPath = options.imageResourcesPath || ""; + this.renderInteractiveForms = options.renderInteractiveForms !== false; + this.useOnlyCssZoom = options.useOnlyCssZoom || false; + this.maxCanvasPixels = options.maxCanvasPixels || MAX_CANVAS_PIXELS; + this.eventBus = options.eventBus; + this.renderingQueue = options.renderingQueue; + this.textLayerFactory = options.textLayerFactory; + this.annotationLayerFactory = options.annotationLayerFactory; + this.xfaLayerFactory = options.xfaLayerFactory; + this.structTreeLayerFactory = options.structTreeLayerFactory; + this.renderer = options.renderer || _ui_utils.RendererType.CANVAS; + this.l10n = options.l10n || _l10n_utils.NullL10n; + this.paintTask = null; + this.paintedViewportMap = new WeakMap(); + this.renderingState = _pdf_rendering_queue.RenderingStates.INITIAL; + this.resume = null; + this._renderError = null; + this.annotationLayer = null; + this.textLayer = null; + this.zoomLayer = null; + this.xfaLayer = null; + this.structTreeLayer = null; + var div = document.createElement("div"); + div.className = "page"; + div.style.width = Math.floor(this.viewport.width) + "px"; + div.style.height = Math.floor(this.viewport.height) + "px"; + div.setAttribute("data-page-number", this.id); + div.setAttribute("role", "region"); + this.l10n.get("page_landmark", { + page: this.id + }).then(function (msg) { + div.setAttribute("aria-label", msg); + }); + this.div = div; + container.appendChild(div); + } + + _createClass(PDFPageView, [{ + key: "setPdfPage", + value: function setPdfPage(pdfPage) { + this.pdfPage = pdfPage; + this.pdfPageRotate = pdfPage.rotate; + var totalRotation = (this.rotation + this.pdfPageRotate) % 360; + this.viewport = pdfPage.getViewport({ + scale: this.scale * _ui_utils.CSS_UNITS, + rotation: totalRotation + }); + this.reset(); + } + }, { + key: "destroy", + value: function destroy() { + this.reset(); + + if (this.pdfPage) { + this.pdfPage.cleanup(); + } + } + }, { + key: "_renderAnnotationLayer", + value: function () { + var _renderAnnotationLayer2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee() { + var error; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + error = null; + _context.prev = 1; + _context.next = 4; + return this.annotationLayer.render(this.viewport, "display"); + + case 4: + _context.next = 9; + break; + + case 6: + _context.prev = 6; + _context.t0 = _context["catch"](1); + error = _context.t0; + + case 9: + _context.prev = 9; + this.eventBus.dispatch("annotationlayerrendered", { + source: this, + pageNumber: this.id, + error: error + }); + return _context.finish(9); + + case 12: + case "end": + return _context.stop(); + } + } + }, _callee, this, [[1, 6, 9, 12]]); + })); + + function _renderAnnotationLayer() { + return _renderAnnotationLayer2.apply(this, arguments); + } + + return _renderAnnotationLayer; + }() + }, { + key: "_renderXfaLayer", + value: function () { + var _renderXfaLayer2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee2() { + var error; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + error = null; + _context2.prev = 1; + _context2.next = 4; + return this.xfaLayer.render(this.viewport, "display"); + + case 4: + _context2.next = 9; + break; + + case 6: + _context2.prev = 6; + _context2.t0 = _context2["catch"](1); + error = _context2.t0; + + case 9: + _context2.prev = 9; + this.eventBus.dispatch("xfalayerrendered", { + source: this, + pageNumber: this.id, + error: error + }); + return _context2.finish(9); + + case 12: + case "end": + return _context2.stop(); + } + } + }, _callee2, this, [[1, 6, 9, 12]]); + })); + + function _renderXfaLayer() { + return _renderXfaLayer2.apply(this, arguments); + } + + return _renderXfaLayer; + }() + }, { + key: "_resetZoomLayer", + value: function _resetZoomLayer() { + var removeFromDOM = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + if (!this.zoomLayer) { + return; + } + + var zoomLayerCanvas = this.zoomLayer.firstChild; + this.paintedViewportMap["delete"](zoomLayerCanvas); + zoomLayerCanvas.width = 0; + zoomLayerCanvas.height = 0; + + if (removeFromDOM) { + this.zoomLayer.remove(); + } + + this.zoomLayer = null; + } + }, { + key: "reset", + value: function reset() { + var _this$annotationLayer, + _this$xfaLayer, + _this = this; + + var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + _ref$keepZoomLayer = _ref.keepZoomLayer, + keepZoomLayer = _ref$keepZoomLayer === void 0 ? false : _ref$keepZoomLayer, + _ref$keepAnnotationLa = _ref.keepAnnotationLayer, + keepAnnotationLayer = _ref$keepAnnotationLa === void 0 ? false : _ref$keepAnnotationLa, + _ref$keepXfaLayer = _ref.keepXfaLayer, + keepXfaLayer = _ref$keepXfaLayer === void 0 ? false : _ref$keepXfaLayer; + + this.cancelRendering({ + keepAnnotationLayer: keepAnnotationLayer, + keepXfaLayer: keepXfaLayer + }); + this.renderingState = _pdf_rendering_queue.RenderingStates.INITIAL; + var div = this.div; + div.style.width = Math.floor(this.viewport.width) + "px"; + div.style.height = Math.floor(this.viewport.height) + "px"; + var childNodes = div.childNodes, + zoomLayerNode = keepZoomLayer && this.zoomLayer || null, + annotationLayerNode = keepAnnotationLayer && ((_this$annotationLayer = this.annotationLayer) === null || _this$annotationLayer === void 0 ? void 0 : _this$annotationLayer.div) || null, + xfaLayerNode = keepXfaLayer && ((_this$xfaLayer = this.xfaLayer) === null || _this$xfaLayer === void 0 ? void 0 : _this$xfaLayer.div) || null; + + for (var i = childNodes.length - 1; i >= 0; i--) { + var node = childNodes[i]; + + switch (node) { + case zoomLayerNode: + case annotationLayerNode: + case xfaLayerNode: + continue; + } + + div.removeChild(node); + } + + div.removeAttribute("data-loaded"); + + if (annotationLayerNode) { + this.annotationLayer.hide(); + } + + if (xfaLayerNode) { + this.xfaLayer.hide(); + } + + if (!zoomLayerNode) { + if (this.canvas) { + this.paintedViewportMap["delete"](this.canvas); + this.canvas.width = 0; + this.canvas.height = 0; + delete this.canvas; + } + + this._resetZoomLayer(); + } + + if (this.svg) { + this.paintedViewportMap["delete"](this.svg); + delete this.svg; + } + + this.loadingIconDiv = document.createElement("div"); + this.loadingIconDiv.className = "loadingIcon"; + this.loadingIconDiv.setAttribute("role", "img"); + this.l10n.get("loading").then(function (msg) { + var _this$loadingIconDiv; + + (_this$loadingIconDiv = _this.loadingIconDiv) === null || _this$loadingIconDiv === void 0 ? void 0 : _this$loadingIconDiv.setAttribute("aria-label", msg); + }); + div.appendChild(this.loadingIconDiv); + } + }, { + key: "update", + value: function update(scale, rotation) { + var optionalContentConfigPromise = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + this.scale = scale || this.scale; + + if (typeof rotation !== "undefined") { + this.rotation = rotation; + } + + if (optionalContentConfigPromise instanceof Promise) { + this._optionalContentConfigPromise = optionalContentConfigPromise; + } + + var totalRotation = (this.rotation + this.pdfPageRotate) % 360; + this.viewport = this.viewport.clone({ + scale: this.scale * _ui_utils.CSS_UNITS, + rotation: totalRotation + }); + + if (this.svg) { + this.cssTransform({ + target: this.svg, + redrawAnnotationLayer: true, + redrawXfaLayer: true + }); + this.eventBus.dispatch("pagerendered", { + source: this, + pageNumber: this.id, + cssTransform: true, + timestamp: performance.now(), + error: this._renderError + }); + return; + } + + var isScalingRestricted = false; + + if (this.canvas && this.maxCanvasPixels > 0) { + var outputScale = this.outputScale; + + if ((Math.floor(this.viewport.width) * outputScale.sx | 0) * (Math.floor(this.viewport.height) * outputScale.sy | 0) > this.maxCanvasPixels) { + isScalingRestricted = true; + } + } + + if (this.canvas) { + if (this.useOnlyCssZoom || this.hasRestrictedScaling && isScalingRestricted) { + this.cssTransform({ + target: this.canvas, + redrawAnnotationLayer: true, + redrawXfaLayer: true + }); + this.eventBus.dispatch("pagerendered", { + source: this, + pageNumber: this.id, + cssTransform: true, + timestamp: performance.now(), + error: this._renderError + }); + return; + } + + if (!this.zoomLayer && !this.canvas.hidden) { + this.zoomLayer = this.canvas.parentNode; + this.zoomLayer.style.position = "absolute"; + } + } + + if (this.zoomLayer) { + this.cssTransform({ + target: this.zoomLayer.firstChild + }); + } + + this.reset({ + keepZoomLayer: true, + keepAnnotationLayer: true, + keepXfaLayer: true + }); + } + }, { + key: "cancelRendering", + value: function cancelRendering() { + var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, + _ref2$keepAnnotationL = _ref2.keepAnnotationLayer, + keepAnnotationLayer = _ref2$keepAnnotationL === void 0 ? false : _ref2$keepAnnotationL, + _ref2$keepXfaLayer = _ref2.keepXfaLayer, + keepXfaLayer = _ref2$keepXfaLayer === void 0 ? false : _ref2$keepXfaLayer; + + if (this.paintTask) { + this.paintTask.cancel(); + this.paintTask = null; + } + + this.resume = null; + + if (this.textLayer) { + this.textLayer.cancel(); + this.textLayer = null; + } + + if (this.annotationLayer && (!keepAnnotationLayer || !this.annotationLayer.div)) { + this.annotationLayer.cancel(); + this.annotationLayer = null; + } + + if (this.xfaLayer && (!keepXfaLayer || !this.xfaLayer.div)) { + this.xfaLayer.cancel(); + this.xfaLayer = null; + } + + if (this._onTextLayerRendered) { + this.eventBus._off("textlayerrendered", this._onTextLayerRendered); + + this._onTextLayerRendered = null; + } + } + }, { + key: "cssTransform", + value: function cssTransform(_ref3) { + var target = _ref3.target, + _ref3$redrawAnnotatio = _ref3.redrawAnnotationLayer, + redrawAnnotationLayer = _ref3$redrawAnnotatio === void 0 ? false : _ref3$redrawAnnotatio, + _ref3$redrawXfaLayer = _ref3.redrawXfaLayer, + redrawXfaLayer = _ref3$redrawXfaLayer === void 0 ? false : _ref3$redrawXfaLayer; + var width = this.viewport.width; + var height = this.viewport.height; + var div = this.div; + target.style.width = target.parentNode.style.width = div.style.width = Math.floor(width) + "px"; + target.style.height = target.parentNode.style.height = div.style.height = Math.floor(height) + "px"; + var relativeRotation = this.viewport.rotation - this.paintedViewportMap.get(target).rotation; + var absRotation = Math.abs(relativeRotation); + var scaleX = 1, + scaleY = 1; + + if (absRotation === 90 || absRotation === 270) { + scaleX = height / width; + scaleY = width / height; + } + + target.style.transform = "rotate(".concat(relativeRotation, "deg) scale(").concat(scaleX, ", ").concat(scaleY, ")"); + + if (this.textLayer) { + var textLayerViewport = this.textLayer.viewport; + var textRelativeRotation = this.viewport.rotation - textLayerViewport.rotation; + var textAbsRotation = Math.abs(textRelativeRotation); + var scale = width / textLayerViewport.width; + + if (textAbsRotation === 90 || textAbsRotation === 270) { + scale = width / textLayerViewport.height; + } + + var textLayerDiv = this.textLayer.textLayerDiv; + var transX, transY; + + switch (textAbsRotation) { + case 0: + transX = transY = 0; + break; + + case 90: + transX = 0; + transY = "-" + textLayerDiv.style.height; + break; + + case 180: + transX = "-" + textLayerDiv.style.width; + transY = "-" + textLayerDiv.style.height; + break; + + case 270: + transX = "-" + textLayerDiv.style.width; + transY = 0; + break; + + default: + console.error("Bad rotation value."); + break; + } + + textLayerDiv.style.transform = "rotate(".concat(textAbsRotation, "deg) ") + "scale(".concat(scale, ") ") + "translate(".concat(transX, ", ").concat(transY, ")"); + textLayerDiv.style.transformOrigin = "0% 0%"; + } + + if (redrawAnnotationLayer && this.annotationLayer) { + this._renderAnnotationLayer(); + } + + if (redrawXfaLayer && this.xfaLayer) { + this._renderXfaLayer(); + } + } + }, { + key: "width", + get: function get() { + return this.viewport.width; + } + }, { + key: "height", + get: function get() { + return this.viewport.height; + } + }, { + key: "getPagePoint", + value: function getPagePoint(x, y) { + return this.viewport.convertToPdfPoint(x, y); + } + }, { + key: "draw", + value: function draw() { + var _this$annotationLayer2, + _this$xfaLayer2, + _this2 = this; + + if (this.renderingState !== _pdf_rendering_queue.RenderingStates.INITIAL) { + console.error("Must be in new state before drawing"); + this.reset(); + } + + var div = this.div, + pdfPage = this.pdfPage; + + if (!pdfPage) { + this.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED; + + if (this.loadingIconDiv) { + div.removeChild(this.loadingIconDiv); + delete this.loadingIconDiv; + } + + return Promise.reject(new Error("pdfPage is not loaded")); + } + + this.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING; + var canvasWrapper = document.createElement("div"); + canvasWrapper.style.width = div.style.width; + canvasWrapper.style.height = div.style.height; + canvasWrapper.classList.add("canvasWrapper"); + + if ((_this$annotationLayer2 = this.annotationLayer) !== null && _this$annotationLayer2 !== void 0 && _this$annotationLayer2.div) { + div.insertBefore(canvasWrapper, this.annotationLayer.div); + } else { + div.appendChild(canvasWrapper); + } + + var textLayer = null; + + if (this.textLayerMode !== _ui_utils.TextLayerMode.DISABLE && this.textLayerFactory) { + var _this$annotationLayer3; + + var textLayerDiv = document.createElement("div"); + textLayerDiv.className = "textLayer"; + textLayerDiv.style.width = canvasWrapper.style.width; + textLayerDiv.style.height = canvasWrapper.style.height; + + if ((_this$annotationLayer3 = this.annotationLayer) !== null && _this$annotationLayer3 !== void 0 && _this$annotationLayer3.div) { + div.insertBefore(textLayerDiv, this.annotationLayer.div); + } else { + div.appendChild(textLayerDiv); + } + + textLayer = this.textLayerFactory.createTextLayerBuilder(textLayerDiv, this.id - 1, this.viewport, this.textLayerMode === _ui_utils.TextLayerMode.ENABLE_ENHANCE, this.eventBus); + } + + this.textLayer = textLayer; + + if ((_this$xfaLayer2 = this.xfaLayer) !== null && _this$xfaLayer2 !== void 0 && _this$xfaLayer2.div) { + div.appendChild(this.xfaLayer.div); + } + + var renderContinueCallback = null; + + if (this.renderingQueue) { + renderContinueCallback = function renderContinueCallback(cont) { + if (!_this2.renderingQueue.isHighestPriority(_this2)) { + _this2.renderingState = _pdf_rendering_queue.RenderingStates.PAUSED; + + _this2.resume = function () { + _this2.renderingState = _pdf_rendering_queue.RenderingStates.RUNNING; + cont(); + }; + + return; + } + + cont(); + }; + } + + var finishPaintTask = /*#__PURE__*/function () { + var _ref4 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee3() { + var error, + _args3 = arguments; + return _regenerator["default"].wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + error = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : null; + + if (paintTask === _this2.paintTask) { + _this2.paintTask = null; + } + + if (!(error instanceof _pdfjsLib.RenderingCancelledException)) { + _context3.next = 5; + break; + } + + _this2._renderError = null; + return _context3.abrupt("return"); + + case 5: + _this2._renderError = error; + _this2.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED; + + if (_this2.loadingIconDiv) { + div.removeChild(_this2.loadingIconDiv); + delete _this2.loadingIconDiv; + } + + _this2._resetZoomLayer(true); + + _this2.eventBus.dispatch("pagerendered", { + source: _this2, + pageNumber: _this2.id, + cssTransform: false, + timestamp: performance.now(), + error: _this2._renderError + }); + + if (!error) { + _context3.next = 12; + break; + } + + throw error; + + case 12: + case "end": + return _context3.stop(); + } + } + }, _callee3); + })); + + return function finishPaintTask() { + return _ref4.apply(this, arguments); + }; + }(); + + var paintTask = this.renderer === _ui_utils.RendererType.SVG ? this.paintOnSvg(canvasWrapper) : this.paintOnCanvas(canvasWrapper); + paintTask.onRenderContinue = renderContinueCallback; + this.paintTask = paintTask; + var resultPromise = paintTask.promise.then(function () { + return finishPaintTask(null).then(function () { + if (textLayer) { + var readableStream = pdfPage.streamTextContent({ + normalizeWhitespace: true, + includeMarkedContent: true + }); + textLayer.setTextContentStream(readableStream); + textLayer.render(); + } + }); + }, function (reason) { + return finishPaintTask(reason); + }); + + if (this.annotationLayerFactory) { + if (!this.annotationLayer) { + this.annotationLayer = this.annotationLayerFactory.createAnnotationLayerBuilder(div, pdfPage, null, this.imageResourcesPath, this.renderInteractiveForms, this.l10n, null, null, null); + } + + this._renderAnnotationLayer(); + } + + if (this.xfaLayerFactory) { + if (!this.xfaLayer) { + this.xfaLayer = this.xfaLayerFactory.createXfaLayerBuilder(div, pdfPage, null); + } + + this._renderXfaLayer(); + } + + if (this.structTreeLayerFactory && this.textLayer && this.canvas) { + this._onTextLayerRendered = function (event) { + if (event.pageNumber !== _this2.id) { + return; + } + + _this2.eventBus._off("textlayerrendered", _this2._onTextLayerRendered); + + _this2._onTextLayerRendered = null; + + if (!_this2.canvas) { + return; + } + + _this2.pdfPage.getStructTree().then(function (tree) { + if (!tree) { + return; + } + + if (!_this2.canvas) { + return; + } + + var treeDom = _this2.structTreeLayer.render(tree); + + treeDom.classList.add("structTree"); + + _this2.canvas.appendChild(treeDom); + }); + }; + + this.eventBus._on("textlayerrendered", this._onTextLayerRendered); + + this.structTreeLayer = this.structTreeLayerFactory.createStructTreeLayerBuilder(pdfPage); + } + + div.setAttribute("data-loaded", true); + this.eventBus.dispatch("pagerender", { + source: this, + pageNumber: this.id + }); + return resultPromise; + } + }, { + key: "paintOnCanvas", + value: function paintOnCanvas(canvasWrapper) { + var renderCapability = (0, _pdfjsLib.createPromiseCapability)(); + var result = { + promise: renderCapability.promise, + onRenderContinue: function onRenderContinue(cont) { + cont(); + }, + cancel: function cancel() { + renderTask.cancel(); + } + }; + var viewport = this.viewport; + var canvas = document.createElement("canvas"); + canvas.hidden = true; + var isCanvasHidden = true; + + var showCanvas = function showCanvas() { + if (isCanvasHidden) { + canvas.hidden = false; + isCanvasHidden = false; + } + }; + + canvasWrapper.appendChild(canvas); + this.canvas = canvas; + canvas.mozOpaque = true; + var ctx = canvas.getContext("2d", { + alpha: false + }); + var outputScale = (0, _ui_utils.getOutputScale)(ctx); + this.outputScale = outputScale; + + if (this.useOnlyCssZoom) { + var actualSizeViewport = viewport.clone({ + scale: _ui_utils.CSS_UNITS + }); + outputScale.sx *= actualSizeViewport.width / viewport.width; + outputScale.sy *= actualSizeViewport.height / viewport.height; + outputScale.scaled = true; + } + + if (this.maxCanvasPixels > 0) { + var pixelsInViewport = viewport.width * viewport.height; + var maxScale = Math.sqrt(this.maxCanvasPixels / pixelsInViewport); + + if (outputScale.sx > maxScale || outputScale.sy > maxScale) { + outputScale.sx = maxScale; + outputScale.sy = maxScale; + outputScale.scaled = true; + this.hasRestrictedScaling = true; + } else { + this.hasRestrictedScaling = false; + } + } + + var sfx = (0, _ui_utils.approximateFraction)(outputScale.sx); + var sfy = (0, _ui_utils.approximateFraction)(outputScale.sy); + canvas.width = (0, _ui_utils.roundToDivide)(viewport.width * outputScale.sx, sfx[0]); + canvas.height = (0, _ui_utils.roundToDivide)(viewport.height * outputScale.sy, sfy[0]); + canvas.style.width = (0, _ui_utils.roundToDivide)(viewport.width, sfx[1]) + "px"; + canvas.style.height = (0, _ui_utils.roundToDivide)(viewport.height, sfy[1]) + "px"; + this.paintedViewportMap.set(canvas, viewport); + var transform = !outputScale.scaled ? null : [outputScale.sx, 0, 0, outputScale.sy, 0, 0]; + var renderContext = { + canvasContext: ctx, + transform: transform, + viewport: this.viewport, + renderInteractiveForms: this.renderInteractiveForms, + optionalContentConfigPromise: this._optionalContentConfigPromise + }; + var renderTask = this.pdfPage.render(renderContext); + + renderTask.onContinue = function (cont) { + showCanvas(); + + if (result.onRenderContinue) { + result.onRenderContinue(cont); + } else { + cont(); + } + }; + + renderTask.promise.then(function () { + showCanvas(); + renderCapability.resolve(undefined); + }, function (error) { + showCanvas(); + renderCapability.reject(error); + }); + return result; + } + }, { + key: "paintOnSvg", + value: function paintOnSvg(wrapper) { + var _this3 = this; + + var cancelled = false; + + var ensureNotCancelled = function ensureNotCancelled() { + if (cancelled) { + throw new _pdfjsLib.RenderingCancelledException("Rendering cancelled, page ".concat(_this3.id), "svg"); + } + }; + + var pdfPage = this.pdfPage; + var actualSizeViewport = this.viewport.clone({ + scale: _ui_utils.CSS_UNITS + }); + var promise = pdfPage.getOperatorList().then(function (opList) { + ensureNotCancelled(); + var svgGfx = new _pdfjsLib.SVGGraphics(pdfPage.commonObjs, pdfPage.objs, _viewer_compatibility.viewerCompatibilityParams.disableCreateObjectURL); + return svgGfx.getSVG(opList, actualSizeViewport).then(function (svg) { + ensureNotCancelled(); + _this3.svg = svg; + + _this3.paintedViewportMap.set(svg, actualSizeViewport); + + svg.style.width = wrapper.style.width; + svg.style.height = wrapper.style.height; + _this3.renderingState = _pdf_rendering_queue.RenderingStates.FINISHED; + wrapper.appendChild(svg); + }); + }); + return { + promise: promise, + onRenderContinue: function onRenderContinue(cont) { + cont(); + }, + cancel: function cancel() { + cancelled = true; + } + }; + } + }, { + key: "setPageLabel", + value: function setPageLabel(label) { + this.pageLabel = typeof label === "string" ? label : null; + + if (this.pageLabel !== null) { + this.div.setAttribute("data-page-label", this.pageLabel); + } else { + this.div.removeAttribute("data-page-label"); + } + } + }]); + + return PDFPageView; +}(); + +exports.PDFPageView = PDFPageView; + +/***/ }), +/* 34 */ +/***/ ((__unused_webpack_module, exports) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.StructTreeLayerBuilder = exports.DefaultStructTreeLayerFactory = void 0; + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var PDF_ROLE_TO_HTML_ROLE = { + Document: null, + DocumentFragment: null, + Part: "group", + Sect: "group", + Div: "group", + Aside: "note", + NonStruct: "none", + P: null, + H: "heading", + Title: null, + FENote: "note", + Sub: "group", + Lbl: null, + Span: null, + Em: null, + Strong: null, + Link: "link", + Annot: "note", + Form: "form", + Ruby: null, + RB: null, + RT: null, + RP: null, + Warichu: null, + WT: null, + WP: null, + L: "list", + LI: "listitem", + LBody: null, + Table: "table", + TR: "row", + TH: "columnheader", + TD: "cell", + THead: "columnheader", + TBody: null, + TFoot: null, + Caption: null, + Figure: "figure", + Formula: null, + Artifact: null +}; +var HEADING_PATTERN = /^H(\d+)$/; + +var StructTreeLayerBuilder = /*#__PURE__*/function () { + function StructTreeLayerBuilder(_ref) { + var pdfPage = _ref.pdfPage; + + _classCallCheck(this, StructTreeLayerBuilder); + + this.pdfPage = pdfPage; + } + + _createClass(StructTreeLayerBuilder, [{ + key: "render", + value: function render(structTree) { + return this._walk(structTree); + } + }, { + key: "_setAttributes", + value: function _setAttributes(structElement, htmlElement) { + if (structElement.alt !== undefined) { + htmlElement.setAttribute("aria-label", structElement.alt); + } + + if (structElement.id !== undefined) { + htmlElement.setAttribute("aria-owns", structElement.id); + } + } + }, { + key: "_walk", + value: function _walk(node) { + if (!node) { + return null; + } + + var element = document.createElement("span"); + + if ("role" in node) { + var role = node.role; + var match = role.match(HEADING_PATTERN); + + if (match) { + element.setAttribute("role", "heading"); + element.setAttribute("aria-level", match[1]); + } else if (PDF_ROLE_TO_HTML_ROLE[role]) { + element.setAttribute("role", PDF_ROLE_TO_HTML_ROLE[role]); + } + } + + this._setAttributes(node, element); + + if (node.children) { + if (node.children.length === 1 && "id" in node.children[0]) { + this._setAttributes(node.children[0], element); + } else { + var _iterator = _createForOfIteratorHelper(node.children), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var kid = _step.value; + element.appendChild(this._walk(kid)); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } + } + + return element; + } + }]); + + return StructTreeLayerBuilder; +}(); + +exports.StructTreeLayerBuilder = StructTreeLayerBuilder; + +var DefaultStructTreeLayerFactory = /*#__PURE__*/function () { + function DefaultStructTreeLayerFactory() { + _classCallCheck(this, DefaultStructTreeLayerFactory); + } + + _createClass(DefaultStructTreeLayerFactory, [{ + key: "createStructTreeLayerBuilder", + value: function createStructTreeLayerBuilder(pdfPage) { + return new StructTreeLayerBuilder({ + pdfPage: pdfPage + }); + } + }]); + + return DefaultStructTreeLayerFactory; +}(); + +exports.DefaultStructTreeLayerFactory = DefaultStructTreeLayerFactory; + +/***/ }), +/* 35 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.TextLayerBuilder = exports.DefaultTextLayerFactory = void 0; + +var _pdfjsLib = __webpack_require__(7); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var EXPAND_DIVS_TIMEOUT = 300; + +var TextLayerBuilder = /*#__PURE__*/function () { + function TextLayerBuilder(_ref) { + var textLayerDiv = _ref.textLayerDiv, + eventBus = _ref.eventBus, + pageIndex = _ref.pageIndex, + viewport = _ref.viewport, + _ref$findController = _ref.findController, + findController = _ref$findController === void 0 ? null : _ref$findController, + _ref$enhanceTextSelec = _ref.enhanceTextSelection, + enhanceTextSelection = _ref$enhanceTextSelec === void 0 ? false : _ref$enhanceTextSelec; + + _classCallCheck(this, TextLayerBuilder); + + this.textLayerDiv = textLayerDiv; + this.eventBus = eventBus; + this.textContent = null; + this.textContentItemsStr = []; + this.textContentStream = null; + this.renderingDone = false; + this.pageIdx = pageIndex; + this.pageNumber = this.pageIdx + 1; + this.matches = []; + this.viewport = viewport; + this.textDivs = []; + this.findController = findController; + this.textLayerRenderTask = null; + this.enhanceTextSelection = enhanceTextSelection; + this._onUpdateTextLayerMatches = null; + + this._bindMouse(); + } + + _createClass(TextLayerBuilder, [{ + key: "_finishRendering", + value: function _finishRendering() { + this.renderingDone = true; + + if (!this.enhanceTextSelection) { + var endOfContent = document.createElement("div"); + endOfContent.className = "endOfContent"; + this.textLayerDiv.appendChild(endOfContent); + } + + this.eventBus.dispatch("textlayerrendered", { + source: this, + pageNumber: this.pageNumber, + numTextDivs: this.textDivs.length + }); + } + }, { + key: "render", + value: function render() { + var _this = this; + + var timeout = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + + if (!(this.textContent || this.textContentStream) || this.renderingDone) { + return; + } + + this.cancel(); + this.textDivs = []; + var textLayerFrag = document.createDocumentFragment(); + this.textLayerRenderTask = (0, _pdfjsLib.renderTextLayer)({ + textContent: this.textContent, + textContentStream: this.textContentStream, + container: textLayerFrag, + viewport: this.viewport, + textDivs: this.textDivs, + textContentItemsStr: this.textContentItemsStr, + timeout: timeout, + enhanceTextSelection: this.enhanceTextSelection + }); + this.textLayerRenderTask.promise.then(function () { + _this.textLayerDiv.appendChild(textLayerFrag); + + _this._finishRendering(); + + _this._updateMatches(); + }, function (reason) {}); + + if (!this._onUpdateTextLayerMatches) { + this._onUpdateTextLayerMatches = function (evt) { + if (evt.pageIndex === _this.pageIdx || evt.pageIndex === -1) { + _this._updateMatches(); + } + }; + + this.eventBus._on("updatetextlayermatches", this._onUpdateTextLayerMatches); + } + } + }, { + key: "cancel", + value: function cancel() { + if (this.textLayerRenderTask) { + this.textLayerRenderTask.cancel(); + this.textLayerRenderTask = null; + } + + if (this._onUpdateTextLayerMatches) { + this.eventBus._off("updatetextlayermatches", this._onUpdateTextLayerMatches); + + this._onUpdateTextLayerMatches = null; + } + } + }, { + key: "setTextContentStream", + value: function setTextContentStream(readableStream) { + this.cancel(); + this.textContentStream = readableStream; + } + }, { + key: "setTextContent", + value: function setTextContent(textContent) { + this.cancel(); + this.textContent = textContent; + } + }, { + key: "_convertMatches", + value: function _convertMatches(matches, matchesLength) { + if (!matches) { + return []; + } + + var textContentItemsStr = this.textContentItemsStr; + var i = 0, + iIndex = 0; + var end = textContentItemsStr.length - 1; + var result = []; + + for (var m = 0, mm = matches.length; m < mm; m++) { + var matchIdx = matches[m]; + + while (i !== end && matchIdx >= iIndex + textContentItemsStr[i].length) { + iIndex += textContentItemsStr[i].length; + i++; + } + + if (i === textContentItemsStr.length) { + console.error("Could not find a matching mapping"); + } + + var match = { + begin: { + divIdx: i, + offset: matchIdx - iIndex + } + }; + matchIdx += matchesLength[m]; + + while (i !== end && matchIdx > iIndex + textContentItemsStr[i].length) { + iIndex += textContentItemsStr[i].length; + i++; + } + + match.end = { + divIdx: i, + offset: matchIdx - iIndex + }; + result.push(match); + } + + return result; + } + }, { + key: "_renderMatches", + value: function _renderMatches(matches) { + if (matches.length === 0) { + return; + } + + var findController = this.findController, + pageIdx = this.pageIdx, + textContentItemsStr = this.textContentItemsStr, + textDivs = this.textDivs; + var isSelectedPage = pageIdx === findController.selected.pageIdx; + var selectedMatchIdx = findController.selected.matchIdx; + var highlightAll = findController.state.highlightAll; + var prevEnd = null; + var infinity = { + divIdx: -1, + offset: undefined + }; + + function beginText(begin, className) { + var divIdx = begin.divIdx; + textDivs[divIdx].textContent = ""; + return appendTextToDiv(divIdx, 0, begin.offset, className); + } + + function appendTextToDiv(divIdx, fromOffset, toOffset, className) { + var div = textDivs[divIdx]; + var content = textContentItemsStr[divIdx].substring(fromOffset, toOffset); + var node = document.createTextNode(content); + + if (className) { + var span = document.createElement("span"); + span.className = "".concat(className, " appended"); + span.appendChild(node); + div.appendChild(span); + return className.includes("selected") ? span.offsetLeft : 0; + } + + div.appendChild(node); + return 0; + } + + var i0 = selectedMatchIdx, + i1 = i0 + 1; + + if (highlightAll) { + i0 = 0; + i1 = matches.length; + } else if (!isSelectedPage) { + return; + } + + for (var i = i0; i < i1; i++) { + var match = matches[i]; + var begin = match.begin; + var end = match.end; + var isSelected = isSelectedPage && i === selectedMatchIdx; + var highlightSuffix = isSelected ? " selected" : ""; + var selectedLeft = 0; + + if (!prevEnd || begin.divIdx !== prevEnd.divIdx) { + if (prevEnd !== null) { + appendTextToDiv(prevEnd.divIdx, prevEnd.offset, infinity.offset); + } + + beginText(begin); + } else { + appendTextToDiv(prevEnd.divIdx, prevEnd.offset, begin.offset); + } + + if (begin.divIdx === end.divIdx) { + selectedLeft = appendTextToDiv(begin.divIdx, begin.offset, end.offset, "highlight" + highlightSuffix); + } else { + selectedLeft = appendTextToDiv(begin.divIdx, begin.offset, infinity.offset, "highlight begin" + highlightSuffix); + + for (var n0 = begin.divIdx + 1, n1 = end.divIdx; n0 < n1; n0++) { + textDivs[n0].className = "highlight middle" + highlightSuffix; + } + + beginText(end, "highlight end" + highlightSuffix); + } + + prevEnd = end; + + if (isSelected) { + findController.scrollMatchIntoView({ + element: textDivs[begin.divIdx], + selectedLeft: selectedLeft, + pageIndex: pageIdx, + matchIndex: selectedMatchIdx + }); + } + } + + if (prevEnd) { + appendTextToDiv(prevEnd.divIdx, prevEnd.offset, infinity.offset); + } + } + }, { + key: "_updateMatches", + value: function _updateMatches() { + if (!this.renderingDone) { + return; + } + + var findController = this.findController, + matches = this.matches, + pageIdx = this.pageIdx, + textContentItemsStr = this.textContentItemsStr, + textDivs = this.textDivs; + var clearedUntilDivIdx = -1; + + for (var i = 0, ii = matches.length; i < ii; i++) { + var match = matches[i]; + var begin = Math.max(clearedUntilDivIdx, match.begin.divIdx); + + for (var n = begin, end = match.end.divIdx; n <= end; n++) { + var div = textDivs[n]; + div.textContent = textContentItemsStr[n]; + div.className = ""; + } + + clearedUntilDivIdx = match.end.divIdx + 1; + } + + if (!(findController !== null && findController !== void 0 && findController.highlightMatches)) { + return; + } + + var pageMatches = findController.pageMatches[pageIdx] || null; + var pageMatchesLength = findController.pageMatchesLength[pageIdx] || null; + this.matches = this._convertMatches(pageMatches, pageMatchesLength); + + this._renderMatches(this.matches); + } + }, { + key: "_bindMouse", + value: function _bindMouse() { + var _this2 = this; + + var div = this.textLayerDiv; + var expandDivsTimer = null; + div.addEventListener("mousedown", function (evt) { + if (_this2.enhanceTextSelection && _this2.textLayerRenderTask) { + _this2.textLayerRenderTask.expandTextDivs(true); + + if (expandDivsTimer) { + clearTimeout(expandDivsTimer); + expandDivsTimer = null; + } + + return; + } + + var end = div.querySelector(".endOfContent"); + + if (!end) { + return; + } + + var adjustTop = evt.target !== div; + adjustTop = adjustTop && window.getComputedStyle(end).getPropertyValue("-moz-user-select") !== "none"; + + if (adjustTop) { + var divBounds = div.getBoundingClientRect(); + var r = Math.max(0, (evt.pageY - divBounds.top) / divBounds.height); + end.style.top = (r * 100).toFixed(2) + "%"; + } + + end.classList.add("active"); + }); + div.addEventListener("mouseup", function () { + if (_this2.enhanceTextSelection && _this2.textLayerRenderTask) { + expandDivsTimer = setTimeout(function () { + if (_this2.textLayerRenderTask) { + _this2.textLayerRenderTask.expandTextDivs(false); + } + + expandDivsTimer = null; + }, EXPAND_DIVS_TIMEOUT); + return; + } + + var end = div.querySelector(".endOfContent"); + + if (!end) { + return; + } + + end.style.top = ""; + end.classList.remove("active"); + }); + } + }]); + + return TextLayerBuilder; +}(); + +exports.TextLayerBuilder = TextLayerBuilder; + +var DefaultTextLayerFactory = /*#__PURE__*/function () { + function DefaultTextLayerFactory() { + _classCallCheck(this, DefaultTextLayerFactory); + } + + _createClass(DefaultTextLayerFactory, [{ + key: "createTextLayerBuilder", + value: function createTextLayerBuilder(textLayerDiv, pageIndex, viewport) { + var enhanceTextSelection = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + var eventBus = arguments.length > 4 ? arguments[4] : undefined; + return new TextLayerBuilder({ + textLayerDiv: textLayerDiv, + pageIndex: pageIndex, + viewport: viewport, + enhanceTextSelection: enhanceTextSelection, + eventBus: eventBus + }); + } + }]); + + return DefaultTextLayerFactory; +}(); + +exports.DefaultTextLayerFactory = DefaultTextLayerFactory; + +/***/ }), +/* 36 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.XfaLayerBuilder = exports.DefaultXfaLayerFactory = void 0; + +var _pdfjsLib = __webpack_require__(7); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var XfaLayerBuilder = /*#__PURE__*/function () { + function XfaLayerBuilder(_ref) { + var pageDiv = _ref.pageDiv, + pdfPage = _ref.pdfPage, + xfaHtml = _ref.xfaHtml, + annotationStorage = _ref.annotationStorage; + + _classCallCheck(this, XfaLayerBuilder); + + this.pageDiv = pageDiv; + this.pdfPage = pdfPage; + this.xfaHtml = xfaHtml; + this.annotationStorage = annotationStorage; + this.div = null; + this._cancelled = false; + } + + _createClass(XfaLayerBuilder, [{ + key: "render", + value: function render(viewport) { + var _this = this; + + var intent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "display"; + + if (intent === "print") { + var parameters = { + viewport: viewport.clone({ + dontFlip: true + }), + div: this.div, + xfa: this.xfaHtml, + page: null, + annotationStorage: this.annotationStorage, + intent: intent + }; + var div = document.createElement("div"); + this.pageDiv.appendChild(div); + parameters.div = div; + + _pdfjsLib.XfaLayer.render(parameters); + + return Promise.resolve(); + } + + return this.pdfPage.getXfa().then(function (xfa) { + if (_this._cancelled) { + return; + } + + var parameters = { + viewport: viewport.clone({ + dontFlip: true + }), + div: _this.div, + xfa: xfa, + page: _this.pdfPage, + annotationStorage: _this.annotationStorage, + intent: intent + }; + + if (_this.div) { + _pdfjsLib.XfaLayer.update(parameters); + } else { + _this.div = document.createElement("div"); + + _this.pageDiv.appendChild(_this.div); + + parameters.div = _this.div; + + _pdfjsLib.XfaLayer.render(parameters); + } + })["catch"](function (error) { + console.error(error); + }); + } + }, { + key: "cancel", + value: function cancel() { + this._cancelled = true; + } + }, { + key: "hide", + value: function hide() { + if (!this.div) { + return; + } + + this.div.hidden = true; + } + }]); + + return XfaLayerBuilder; +}(); + +exports.XfaLayerBuilder = XfaLayerBuilder; + +var DefaultXfaLayerFactory = /*#__PURE__*/function () { + function DefaultXfaLayerFactory() { + _classCallCheck(this, DefaultXfaLayerFactory); + } + + _createClass(DefaultXfaLayerFactory, [{ + key: "createXfaLayerBuilder", + value: function createXfaLayerBuilder(pageDiv, pdfPage) { + var annotationStorage = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; + var xfaHtml = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; + return new XfaLayerBuilder({ + pageDiv: pageDiv, + pdfPage: pdfPage, + annotationStorage: annotationStorage, + xfaHtml: xfaHtml + }); + } + }]); + + return DefaultXfaLayerFactory; +}(); + +exports.DefaultXfaLayerFactory = DefaultXfaLayerFactory; + +/***/ }), +/* 37 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.SecondaryToolbar = void 0; + +var _ui_utils = __webpack_require__(6); + +var _pdf_cursor_tools = __webpack_require__(8); + +var _pdf_single_page_viewer = __webpack_require__(38); + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var SecondaryToolbar = /*#__PURE__*/function () { + function SecondaryToolbar(options, mainContainer, eventBus) { + var _this = this; + + _classCallCheck(this, SecondaryToolbar); + + this.toolbar = options.toolbar; + this.toggleButton = options.toggleButton; + this.toolbarButtonContainer = options.toolbarButtonContainer; + this.buttons = [{ + element: options.presentationModeButton, + eventName: "presentationmode", + close: true + }, { + element: options.openFileButton, + eventName: "openfile", + close: true + }, { + element: options.printButton, + eventName: "print", + close: true + }, { + element: options.downloadButton, + eventName: "download", + close: true + }, { + element: options.viewBookmarkButton, + eventName: null, + close: true + }, { + element: options.firstPageButton, + eventName: "firstpage", + close: true + }, { + element: options.lastPageButton, + eventName: "lastpage", + close: true + }, { + element: options.pageRotateCwButton, + eventName: "rotatecw", + close: false + }, { + element: options.pageRotateCcwButton, + eventName: "rotateccw", + close: false + }, { + element: options.cursorSelectToolButton, + eventName: "switchcursortool", + eventDetails: { + tool: _pdf_cursor_tools.CursorTool.SELECT + }, + close: true + }, { + element: options.cursorHandToolButton, + eventName: "switchcursortool", + eventDetails: { + tool: _pdf_cursor_tools.CursorTool.HAND + }, + close: true + }, { + element: options.scrollVerticalButton, + eventName: "switchscrollmode", + eventDetails: { + mode: _ui_utils.ScrollMode.VERTICAL + }, + close: true + }, { + element: options.scrollHorizontalButton, + eventName: "switchscrollmode", + eventDetails: { + mode: _ui_utils.ScrollMode.HORIZONTAL + }, + close: true + }, { + element: options.scrollWrappedButton, + eventName: "switchscrollmode", + eventDetails: { + mode: _ui_utils.ScrollMode.WRAPPED + }, + close: true + }, { + element: options.spreadNoneButton, + eventName: "switchspreadmode", + eventDetails: { + mode: _ui_utils.SpreadMode.NONE + }, + close: true + }, { + element: options.spreadOddButton, + eventName: "switchspreadmode", + eventDetails: { + mode: _ui_utils.SpreadMode.ODD + }, + close: true + }, { + element: options.spreadEvenButton, + eventName: "switchspreadmode", + eventDetails: { + mode: _ui_utils.SpreadMode.EVEN + }, + close: true + }, { + element: options.documentPropertiesButton, + eventName: "documentproperties", + close: true + }]; + this.items = { + firstPage: options.firstPageButton, + lastPage: options.lastPageButton, + pageRotateCw: options.pageRotateCwButton, + pageRotateCcw: options.pageRotateCcwButton + }; + this.mainContainer = mainContainer; + this.eventBus = eventBus; + this.opened = false; + this.containerHeight = null; + this.previousContainerHeight = null; + this.reset(); + + this._bindClickListeners(); + + this._bindCursorToolsListener(options); + + this._bindScrollModeListener(options); + + this._bindSpreadModeListener(options); + + this.eventBus._on("resize", this._setMaxHeight.bind(this)); + + this.eventBus._on("baseviewerinit", function (evt) { + if (evt.source instanceof _pdf_single_page_viewer.PDFSinglePageViewer) { + _this.toolbarButtonContainer.classList.add("hiddenScrollModeButtons", "hiddenSpreadModeButtons"); + } else { + _this.toolbarButtonContainer.classList.remove("hiddenScrollModeButtons", "hiddenSpreadModeButtons"); + } + }); + } + + _createClass(SecondaryToolbar, [{ + key: "isOpen", + get: function get() { + return this.opened; + } + }, { + key: "setPageNumber", + value: function setPageNumber(pageNumber) { + this.pageNumber = pageNumber; + + this._updateUIState(); + } + }, { + key: "setPagesCount", + value: function setPagesCount(pagesCount) { + this.pagesCount = pagesCount; + + this._updateUIState(); + } + }, { + key: "reset", + value: function reset() { + this.pageNumber = 0; + this.pagesCount = 0; + + this._updateUIState(); + + this.eventBus.dispatch("secondarytoolbarreset", { + source: this + }); + } + }, { + key: "_updateUIState", + value: function _updateUIState() { + this.items.firstPage.disabled = this.pageNumber <= 1; + this.items.lastPage.disabled = this.pageNumber >= this.pagesCount; + this.items.pageRotateCw.disabled = this.pagesCount === 0; + this.items.pageRotateCcw.disabled = this.pagesCount === 0; + } + }, { + key: "_bindClickListeners", + value: function _bindClickListeners() { + var _this2 = this; + + this.toggleButton.addEventListener("click", this.toggle.bind(this)); + + var _iterator = _createForOfIteratorHelper(this.buttons), + _step; + + try { + var _loop = function _loop() { + var _step$value = _step.value, + element = _step$value.element, + eventName = _step$value.eventName, + close = _step$value.close, + eventDetails = _step$value.eventDetails; + element.addEventListener("click", function (evt) { + if (eventName !== null) { + var details = { + source: _this2 + }; + + for (var property in eventDetails) { + details[property] = eventDetails[property]; + } + + _this2.eventBus.dispatch(eventName, details); + } + + if (close) { + _this2.close(); + } + }); + }; + + for (_iterator.s(); !(_step = _iterator.n()).done;) { + _loop(); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } + }, { + key: "_bindCursorToolsListener", + value: function _bindCursorToolsListener(buttons) { + this.eventBus._on("cursortoolchanged", function (_ref) { + var tool = _ref.tool; + buttons.cursorSelectToolButton.classList.toggle("toggled", tool === _pdf_cursor_tools.CursorTool.SELECT); + buttons.cursorHandToolButton.classList.toggle("toggled", tool === _pdf_cursor_tools.CursorTool.HAND); + }); + } + }, { + key: "_bindScrollModeListener", + value: function _bindScrollModeListener(buttons) { + var _this3 = this; + + function scrollModeChanged(_ref2) { + var mode = _ref2.mode; + buttons.scrollVerticalButton.classList.toggle("toggled", mode === _ui_utils.ScrollMode.VERTICAL); + buttons.scrollHorizontalButton.classList.toggle("toggled", mode === _ui_utils.ScrollMode.HORIZONTAL); + buttons.scrollWrappedButton.classList.toggle("toggled", mode === _ui_utils.ScrollMode.WRAPPED); + var isScrollModeHorizontal = mode === _ui_utils.ScrollMode.HORIZONTAL; + buttons.spreadNoneButton.disabled = isScrollModeHorizontal; + buttons.spreadOddButton.disabled = isScrollModeHorizontal; + buttons.spreadEvenButton.disabled = isScrollModeHorizontal; + } + + this.eventBus._on("scrollmodechanged", scrollModeChanged); + + this.eventBus._on("secondarytoolbarreset", function (evt) { + if (evt.source === _this3) { + scrollModeChanged({ + mode: _ui_utils.ScrollMode.VERTICAL + }); + } + }); + } + }, { + key: "_bindSpreadModeListener", + value: function _bindSpreadModeListener(buttons) { + var _this4 = this; + + function spreadModeChanged(_ref3) { + var mode = _ref3.mode; + buttons.spreadNoneButton.classList.toggle("toggled", mode === _ui_utils.SpreadMode.NONE); + buttons.spreadOddButton.classList.toggle("toggled", mode === _ui_utils.SpreadMode.ODD); + buttons.spreadEvenButton.classList.toggle("toggled", mode === _ui_utils.SpreadMode.EVEN); + } + + this.eventBus._on("spreadmodechanged", spreadModeChanged); + + this.eventBus._on("secondarytoolbarreset", function (evt) { + if (evt.source === _this4) { + spreadModeChanged({ + mode: _ui_utils.SpreadMode.NONE + }); + } + }); + } + }, { + key: "open", + value: function open() { + if (this.opened) { + return; + } + + this.opened = true; + + this._setMaxHeight(); + + this.toggleButton.classList.add("toggled"); + this.toggleButton.setAttribute("aria-expanded", "true"); + this.toolbar.classList.remove("hidden"); + } + }, { + key: "close", + value: function close() { + if (!this.opened) { + return; + } + + this.opened = false; + this.toolbar.classList.add("hidden"); + this.toggleButton.classList.remove("toggled"); + this.toggleButton.setAttribute("aria-expanded", "false"); + } + }, { + key: "toggle", + value: function toggle() { + if (this.opened) { + this.close(); + } else { + this.open(); + } + } + }, { + key: "_setMaxHeight", + value: function _setMaxHeight() { + if (!this.opened) { + return; + } + + this.containerHeight = this.mainContainer.clientHeight; + + if (this.containerHeight === this.previousContainerHeight) { + return; + } + + this.toolbarButtonContainer.style.maxHeight = "".concat(this.containerHeight - _ui_utils.SCROLLBAR_PADDING, "px"); + this.previousContainerHeight = this.containerHeight; + } + }]); + + return SecondaryToolbar; +}(); + +exports.SecondaryToolbar = SecondaryToolbar; + +/***/ }), +/* 38 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PDFSinglePageViewer = void 0; + +var _base_viewer = __webpack_require__(30); + +var _pdfjsLib = __webpack_require__(7); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); } + +function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +var PDFSinglePageViewer = /*#__PURE__*/function (_BaseViewer) { + _inherits(PDFSinglePageViewer, _BaseViewer); + + var _super = _createSuper(PDFSinglePageViewer); + + function PDFSinglePageViewer(options) { + var _this; + + _classCallCheck(this, PDFSinglePageViewer); + + _this = _super.call(this, options); + + _this.eventBus._on("pagesinit", function (evt) { + _this._ensurePageViewVisible(); + }); + + return _this; + } + + _createClass(PDFSinglePageViewer, [{ + key: "_viewerElement", + get: function get() { + return (0, _pdfjsLib.shadow)(this, "_viewerElement", this._shadowViewer); + } + }, { + key: "_pageWidthScaleFactor", + get: function get() { + return 1; + } + }, { + key: "_resetView", + value: function _resetView() { + _get(_getPrototypeOf(PDFSinglePageViewer.prototype), "_resetView", this).call(this); + + this._previousPageNumber = 1; + this._shadowViewer = document.createDocumentFragment(); + this._updateScrollDown = null; + } + }, { + key: "_ensurePageViewVisible", + value: function _ensurePageViewVisible() { + var pageView = this._pages[this._currentPageNumber - 1]; + var previousPageView = this._pages[this._previousPageNumber - 1]; + var viewerNodes = this.viewer.childNodes; + + switch (viewerNodes.length) { + case 0: + this.viewer.appendChild(pageView.div); + break; + + case 1: + if (viewerNodes[0] !== previousPageView.div) { + throw new Error("_ensurePageViewVisible: Unexpected previously visible page."); + } + + if (pageView === previousPageView) { + break; + } + + this._shadowViewer.appendChild(previousPageView.div); + + this.viewer.appendChild(pageView.div); + this.container.scrollTop = 0; + break; + + default: + throw new Error("_ensurePageViewVisible: Only one page should be visible at a time."); + } + + this._previousPageNumber = this._currentPageNumber; + } + }, { + key: "_scrollUpdate", + value: function _scrollUpdate() { + if (this._updateScrollDown) { + this._updateScrollDown(); + } + + _get(_getPrototypeOf(PDFSinglePageViewer.prototype), "_scrollUpdate", this).call(this); + } + }, { + key: "_scrollIntoView", + value: function _scrollIntoView(_ref) { + var _this2 = this; + + var pageDiv = _ref.pageDiv, + _ref$pageSpot = _ref.pageSpot, + pageSpot = _ref$pageSpot === void 0 ? null : _ref$pageSpot, + _ref$pageNumber = _ref.pageNumber, + pageNumber = _ref$pageNumber === void 0 ? null : _ref$pageNumber; + + if (pageNumber) { + this._setCurrentPageNumber(pageNumber); + } + + var scrolledDown = this._currentPageNumber >= this._previousPageNumber; + + this._ensurePageViewVisible(); + + this.update(); + + _get(_getPrototypeOf(PDFSinglePageViewer.prototype), "_scrollIntoView", this).call(this, { + pageDiv: pageDiv, + pageSpot: pageSpot, + pageNumber: pageNumber + }); + + this._updateScrollDown = function () { + _this2.scroll.down = scrolledDown; + _this2._updateScrollDown = null; + }; + } + }, { + key: "_getVisiblePages", + value: function _getVisiblePages() { + return this._getCurrentVisiblePage(); + } + }, { + key: "_updateHelper", + value: function _updateHelper(visiblePages) {} + }, { + key: "_isScrollModeHorizontal", + get: function get() { + return (0, _pdfjsLib.shadow)(this, "_isScrollModeHorizontal", false); + } + }, { + key: "_updateScrollMode", + value: function _updateScrollMode() {} + }, { + key: "_updateSpreadMode", + value: function _updateSpreadMode() {} + }, { + key: "_getPageAdvance", + value: function _getPageAdvance() { + return 1; + } + }]); + + return PDFSinglePageViewer; +}(_base_viewer.BaseViewer); + +exports.PDFSinglePageViewer = PDFSinglePageViewer; + +/***/ }), +/* 39 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.Toolbar = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__(4)); + +var _ui_utils = __webpack_require__(6); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var PAGE_NUMBER_LOADING_INDICATOR = "visiblePageIsLoading"; +var SCALE_SELECT_CONTAINER_WIDTH = 140; +var SCALE_SELECT_WIDTH = 162; + +var Toolbar = /*#__PURE__*/function () { + function Toolbar(options, eventBus, l10n) { + _classCallCheck(this, Toolbar); + + this.toolbar = options.container; + this.eventBus = eventBus; + this.l10n = l10n; + this.buttons = [{ + element: options.previous, + eventName: "previouspage" + }, { + element: options.next, + eventName: "nextpage" + }, { + element: options.zoomIn, + eventName: "zoomin" + }, { + element: options.zoomOut, + eventName: "zoomout" + }, { + element: options.openFile, + eventName: "openfile" + }, { + element: options.print, + eventName: "print" + }, { + element: options.presentationModeButton, + eventName: "presentationmode" + }, { + element: options.download, + eventName: "download" + }, { + element: options.viewBookmark, + eventName: null + }]; + this.items = { + numPages: options.numPages, + pageNumber: options.pageNumber, + scaleSelectContainer: options.scaleSelectContainer, + scaleSelect: options.scaleSelect, + customScaleOption: options.customScaleOption, + previous: options.previous, + next: options.next, + zoomIn: options.zoomIn, + zoomOut: options.zoomOut + }; + this._wasLocalized = false; + this.reset(); + + this._bindListeners(); + } + + _createClass(Toolbar, [{ + key: "setPageNumber", + value: function setPageNumber(pageNumber, pageLabel) { + this.pageNumber = pageNumber; + this.pageLabel = pageLabel; + + this._updateUIState(false); + } + }, { + key: "setPagesCount", + value: function setPagesCount(pagesCount, hasPageLabels) { + this.pagesCount = pagesCount; + this.hasPageLabels = hasPageLabels; + + this._updateUIState(true); + } + }, { + key: "setPageScale", + value: function setPageScale(pageScaleValue, pageScale) { + this.pageScaleValue = (pageScaleValue || pageScale).toString(); + this.pageScale = pageScale; + + this._updateUIState(false); + } + }, { + key: "reset", + value: function reset() { + this.pageNumber = 0; + this.pageLabel = null; + this.hasPageLabels = false; + this.pagesCount = 0; + this.pageScaleValue = _ui_utils.DEFAULT_SCALE_VALUE; + this.pageScale = _ui_utils.DEFAULT_SCALE; + + this._updateUIState(true); + + this.updateLoadingIndicatorState(); + } + }, { + key: "_bindListeners", + value: function _bindListeners() { + var _this = this; + + var _this$items = this.items, + pageNumber = _this$items.pageNumber, + scaleSelect = _this$items.scaleSelect; + var self = this; + + var _iterator = _createForOfIteratorHelper(this.buttons), + _step; + + try { + var _loop = function _loop() { + var _step$value = _step.value, + element = _step$value.element, + eventName = _step$value.eventName; + element.addEventListener("click", function (evt) { + if (eventName !== null) { + _this.eventBus.dispatch(eventName, { + source: _this + }); + } + }); + }; + + for (_iterator.s(); !(_step = _iterator.n()).done;) { + _loop(); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + + pageNumber.addEventListener("click", function () { + this.select(); + }); + pageNumber.addEventListener("change", function () { + self.eventBus.dispatch("pagenumberchanged", { + source: self, + value: this.value + }); + }); + scaleSelect.addEventListener("change", function () { + if (this.value === "custom") { + return; + } + + self.eventBus.dispatch("scalechanged", { + source: self, + value: this.value + }); + }); + scaleSelect.addEventListener("click", function (evt) { + var target = evt.target; + + if (this.value === self.pageScaleValue && target.tagName.toUpperCase() === "OPTION") { + this.blur(); + } + }); + scaleSelect.oncontextmenu = _ui_utils.noContextMenuHandler; + + this.eventBus._on("localized", function () { + _this._wasLocalized = true; + + _this._adjustScaleWidth(); + + _this._updateUIState(true); + }); + } + }, { + key: "_updateUIState", + value: function _updateUIState() { + var resetNumPages = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + + if (!this._wasLocalized) { + return; + } + + var pageNumber = this.pageNumber, + pagesCount = this.pagesCount, + pageScaleValue = this.pageScaleValue, + pageScale = this.pageScale, + items = this.items; + + if (resetNumPages) { + if (this.hasPageLabels) { + items.pageNumber.type = "text"; + } else { + items.pageNumber.type = "number"; + this.l10n.get("of_pages", { + pagesCount: pagesCount + }).then(function (msg) { + items.numPages.textContent = msg; + }); + } + + items.pageNumber.max = pagesCount; + } + + if (this.hasPageLabels) { + items.pageNumber.value = this.pageLabel; + this.l10n.get("page_of_pages", { + pageNumber: pageNumber, + pagesCount: pagesCount + }).then(function (msg) { + items.numPages.textContent = msg; + }); + } else { + items.pageNumber.value = pageNumber; + } + + items.previous.disabled = pageNumber <= 1; + items.next.disabled = pageNumber >= pagesCount; + items.zoomOut.disabled = pageScale <= _ui_utils.MIN_SCALE; + items.zoomIn.disabled = pageScale >= _ui_utils.MAX_SCALE; + this.l10n.get("page_scale_percent", { + scale: Math.round(pageScale * 10000) / 100 + }).then(function (msg) { + var predefinedValueFound = false; + + var _iterator2 = _createForOfIteratorHelper(items.scaleSelect.options), + _step2; + + try { + for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { + var option = _step2.value; + + if (option.value !== pageScaleValue) { + option.selected = false; + continue; + } + + option.selected = true; + predefinedValueFound = true; + } + } catch (err) { + _iterator2.e(err); + } finally { + _iterator2.f(); + } + + if (!predefinedValueFound) { + items.customScaleOption.textContent = msg; + items.customScaleOption.selected = true; + } + }); + } + }, { + key: "updateLoadingIndicatorState", + value: function updateLoadingIndicatorState() { + var loading = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; + var pageNumberInput = this.items.pageNumber; + pageNumberInput.classList.toggle(PAGE_NUMBER_LOADING_INDICATOR, loading); + } + }, { + key: "_adjustScaleWidth", + value: function () { + var _adjustScaleWidth2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee() { + var items, l10n, predefinedValuesPromise, canvas, ctx, _getComputedStyle, fontSize, fontFamily, maxWidth, _iterator3, _step3, predefinedValue, _ctx$measureText, width, overflow; + + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + items = this.items, l10n = this.l10n; + predefinedValuesPromise = Promise.all([l10n.get("page_scale_auto"), l10n.get("page_scale_actual"), l10n.get("page_scale_fit"), l10n.get("page_scale_width")]); + canvas = document.createElement("canvas"); + canvas.mozOpaque = true; + ctx = canvas.getContext("2d", { + alpha: false + }); + _context.next = 7; + return _ui_utils.animationStarted; + + case 7: + _getComputedStyle = getComputedStyle(items.scaleSelect), fontSize = _getComputedStyle.fontSize, fontFamily = _getComputedStyle.fontFamily; + ctx.font = "".concat(fontSize, " ").concat(fontFamily); + maxWidth = 0; + _context.t0 = _createForOfIteratorHelper; + _context.next = 13; + return predefinedValuesPromise; + + case 13: + _context.t1 = _context.sent; + _iterator3 = (0, _context.t0)(_context.t1); + + try { + for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) { + predefinedValue = _step3.value; + _ctx$measureText = ctx.measureText(predefinedValue), width = _ctx$measureText.width; + + if (width > maxWidth) { + maxWidth = width; + } + } + } catch (err) { + _iterator3.e(err); + } finally { + _iterator3.f(); + } + + overflow = SCALE_SELECT_WIDTH - SCALE_SELECT_CONTAINER_WIDTH; + maxWidth += 2 * overflow; + + if (maxWidth > SCALE_SELECT_CONTAINER_WIDTH) { + items.scaleSelect.style.width = "".concat(maxWidth + overflow, "px"); + items.scaleSelectContainer.style.width = "".concat(maxWidth, "px"); + } + + canvas.width = 0; + canvas.height = 0; + canvas = ctx = null; + + case 22: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function _adjustScaleWidth() { + return _adjustScaleWidth2.apply(this, arguments); + } + + return _adjustScaleWidth; + }() + }]); + + return Toolbar; +}(); + +exports.Toolbar = Toolbar; + +/***/ }), +/* 40 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.ViewHistory = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__(4)); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var DEFAULT_VIEW_HISTORY_CACHE_SIZE = 20; + +var ViewHistory = /*#__PURE__*/function () { + function ViewHistory(fingerprint) { + var _this = this; + + var cacheSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_VIEW_HISTORY_CACHE_SIZE; + + _classCallCheck(this, ViewHistory); + + this.fingerprint = fingerprint; + this.cacheSize = cacheSize; + this._initializedPromise = this._readFromStorage().then(function (databaseStr) { + var database = JSON.parse(databaseStr || "{}"); + var index = -1; + + if (!Array.isArray(database.files)) { + database.files = []; + } else { + while (database.files.length >= _this.cacheSize) { + database.files.shift(); + } + + for (var i = 0, ii = database.files.length; i < ii; i++) { + var branch = database.files[i]; + + if (branch.fingerprint === _this.fingerprint) { + index = i; + break; + } + } + } + + if (index === -1) { + index = database.files.push({ + fingerprint: _this.fingerprint + }) - 1; + } + + _this.file = database.files[index]; + _this.database = database; + }); + } + + _createClass(ViewHistory, [{ + key: "_writeToStorage", + value: function () { + var _writeToStorage2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee() { + var databaseStr; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + databaseStr = JSON.stringify(this.database); + localStorage.setItem("pdfjs.history", databaseStr); + + case 2: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function _writeToStorage() { + return _writeToStorage2.apply(this, arguments); + } + + return _writeToStorage; + }() + }, { + key: "_readFromStorage", + value: function () { + var _readFromStorage2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee2() { + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", localStorage.getItem("pdfjs.history")); + + case 1: + case "end": + return _context2.stop(); + } + } + }, _callee2); + })); + + function _readFromStorage() { + return _readFromStorage2.apply(this, arguments); + } + + return _readFromStorage; + }() + }, { + key: "set", + value: function () { + var _set = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee3(name, val) { + return _regenerator["default"].wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _context3.next = 2; + return this._initializedPromise; + + case 2: + this.file[name] = val; + return _context3.abrupt("return", this._writeToStorage()); + + case 4: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function set(_x, _x2) { + return _set.apply(this, arguments); + } + + return set; + }() + }, { + key: "setMultiple", + value: function () { + var _setMultiple = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee4(properties) { + var name; + return _regenerator["default"].wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + _context4.next = 2; + return this._initializedPromise; + + case 2: + for (name in properties) { + this.file[name] = properties[name]; + } + + return _context4.abrupt("return", this._writeToStorage()); + + case 4: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function setMultiple(_x3) { + return _setMultiple.apply(this, arguments); + } + + return setMultiple; + }() + }, { + key: "get", + value: function () { + var _get = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee5(name, defaultValue) { + var val; + return _regenerator["default"].wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + _context5.next = 2; + return this._initializedPromise; + + case 2: + val = this.file[name]; + return _context5.abrupt("return", val !== undefined ? val : defaultValue); + + case 4: + case "end": + return _context5.stop(); + } + } + }, _callee5, this); + })); + + function get(_x4, _x5) { + return _get.apply(this, arguments); + } + + return get; + }() + }, { + key: "getMultiple", + value: function () { + var _getMultiple = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee6(properties) { + var values, name, val; + return _regenerator["default"].wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + _context6.next = 2; + return this._initializedPromise; + + case 2: + values = Object.create(null); + + for (name in properties) { + val = this.file[name]; + values[name] = val !== undefined ? val : properties[name]; + } + + return _context6.abrupt("return", values); + + case 5: + case "end": + return _context6.stop(); + } + } + }, _callee6, this); + })); + + function getMultiple(_x6) { + return _getMultiple.apply(this, arguments); + } + + return getMultiple; + }() + }]); + + return ViewHistory; +}(); + +exports.ViewHistory = ViewHistory; + +/***/ }), +/* 41 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.GenericCom = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__(4)); + +var _app = __webpack_require__(3); + +var _preferences = __webpack_require__(42); + +var _download_manager = __webpack_require__(43); + +var _genericl10n = __webpack_require__(44); + +var _generic_scripting = __webpack_require__(46); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } + +function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } + +function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } + +function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } + +function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } + +function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } + +function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } + +; +var GenericCom = {}; +exports.GenericCom = GenericCom; + +var GenericPreferences = /*#__PURE__*/function (_BasePreferences) { + _inherits(GenericPreferences, _BasePreferences); + + var _super = _createSuper(GenericPreferences); + + function GenericPreferences() { + _classCallCheck(this, GenericPreferences); + + return _super.apply(this, arguments); + } + + _createClass(GenericPreferences, [{ + key: "_writeToStorage", + value: function () { + var _writeToStorage2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee(prefObj) { + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + localStorage.setItem("pdfjs.preferences", JSON.stringify(prefObj)); + + case 1: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + function _writeToStorage(_x) { + return _writeToStorage2.apply(this, arguments); + } + + return _writeToStorage; + }() + }, { + key: "_readFromStorage", + value: function () { + var _readFromStorage2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee2(prefObj) { + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", JSON.parse(localStorage.getItem("pdfjs.preferences"))); + + case 1: + case "end": + return _context2.stop(); + } + } + }, _callee2); + })); + + function _readFromStorage(_x2) { + return _readFromStorage2.apply(this, arguments); + } + + return _readFromStorage; + }() + }]); + + return GenericPreferences; +}(_preferences.BasePreferences); + +var GenericExternalServices = /*#__PURE__*/function (_DefaultExternalServi) { + _inherits(GenericExternalServices, _DefaultExternalServi); + + var _super2 = _createSuper(GenericExternalServices); + + function GenericExternalServices() { + _classCallCheck(this, GenericExternalServices); + + return _super2.apply(this, arguments); + } + + _createClass(GenericExternalServices, null, [{ + key: "createDownloadManager", + value: function createDownloadManager(options) { + return new _download_manager.DownloadManager(); + } + }, { + key: "createPreferences", + value: function createPreferences() { + return new GenericPreferences(); + } + }, { + key: "createL10n", + value: function createL10n(_ref) { + var _ref$locale = _ref.locale, + locale = _ref$locale === void 0 ? "en-US" : _ref$locale; + return new _genericl10n.GenericL10n(locale); + } + }, { + key: "createScripting", + value: function createScripting(_ref2) { + var sandboxBundleSrc = _ref2.sandboxBundleSrc; + return new _generic_scripting.GenericScripting(sandboxBundleSrc); + } + }]); + + return GenericExternalServices; +}(_app.DefaultExternalServices); + +_app.PDFViewerApplication.externalServices = GenericExternalServices; + +/***/ }), +/* 42 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.BasePreferences = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__(4)); + +var _app_options = __webpack_require__(1); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var BasePreferences = /*#__PURE__*/function () { + function BasePreferences() { + var _this = this; + + _classCallCheck(this, BasePreferences); + + if (this.constructor === BasePreferences) { + throw new Error("Cannot initialize BasePreferences."); + } + + Object.defineProperty(this, "defaults", { + value: Object.freeze({ + "cursorToolOnLoad": 0, + "defaultZoomValue": "", + "disablePageLabels": false, + "enablePermissions": false, + "enablePrintAutoRotate": true, + "enableScripting": true, + "externalLinkTarget": 0, + "historyUpdateUrl": false, + "ignoreDestinationZoom": false, + "pdfBugEnabled": false, + "renderer": "canvas", + "renderInteractiveForms": true, + "sidebarViewOnLoad": -1, + "scrollModeOnLoad": -1, + "spreadModeOnLoad": -1, + "textLayerMode": 1, + "useOnlyCssZoom": false, + "viewerCssTheme": 0, + "viewOnLoad": 0, + "disableAutoFetch": false, + "disableFontFace": false, + "disableRange": false, + "disableStream": false, + "enableXfa": false + }), + writable: false, + enumerable: true, + configurable: false + }); + this.prefs = Object.create(null); + this._initializedPromise = this._readFromStorage(this.defaults).then(function (prefs) { + for (var name in _this.defaults) { + var prefValue = prefs === null || prefs === void 0 ? void 0 : prefs[name]; + + if (_typeof(prefValue) === _typeof(_this.defaults[name])) { + _this.prefs[name] = prefValue; + } + } + }); + } + + _createClass(BasePreferences, [{ + key: "_writeToStorage", + value: function () { + var _writeToStorage2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee(prefObj) { + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + throw new Error("Not implemented: _writeToStorage"); + + case 1: + case "end": + return _context.stop(); + } + } + }, _callee); + })); + + function _writeToStorage(_x) { + return _writeToStorage2.apply(this, arguments); + } + + return _writeToStorage; + }() + }, { + key: "_readFromStorage", + value: function () { + var _readFromStorage2 = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee2(prefObj) { + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + throw new Error("Not implemented: _readFromStorage"); + + case 1: + case "end": + return _context2.stop(); + } + } + }, _callee2); + })); + + function _readFromStorage(_x2) { + return _readFromStorage2.apply(this, arguments); + } + + return _readFromStorage; + }() + }, { + key: "reset", + value: function () { + var _reset = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee3() { + return _regenerator["default"].wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _context3.next = 2; + return this._initializedPromise; + + case 2: + this.prefs = Object.create(null); + return _context3.abrupt("return", this._writeToStorage(this.defaults)); + + case 4: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function reset() { + return _reset.apply(this, arguments); + } + + return reset; + }() + }, { + key: "set", + value: function () { + var _set = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee4(name, value) { + var defaultValue, valueType, defaultType; + return _regenerator["default"].wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + _context4.next = 2; + return this._initializedPromise; + + case 2: + defaultValue = this.defaults[name]; + + if (!(defaultValue === undefined)) { + _context4.next = 7; + break; + } + + throw new Error("Set preference: \"".concat(name, "\" is undefined.")); + + case 7: + if (!(value === undefined)) { + _context4.next = 9; + break; + } + + throw new Error("Set preference: no value is specified."); + + case 9: + valueType = _typeof(value); + defaultType = _typeof(defaultValue); + + if (!(valueType !== defaultType)) { + _context4.next = 19; + break; + } + + if (!(valueType === "number" && defaultType === "string")) { + _context4.next = 16; + break; + } + + value = value.toString(); + _context4.next = 17; + break; + + case 16: + throw new Error("Set preference: \"".concat(value, "\" is a ").concat(valueType, ", expected a ").concat(defaultType, ".")); + + case 17: + _context4.next = 21; + break; + + case 19: + if (!(valueType === "number" && !Number.isInteger(value))) { + _context4.next = 21; + break; + } + + throw new Error("Set preference: \"".concat(value, "\" must be an integer.")); + + case 21: + this.prefs[name] = value; + return _context4.abrupt("return", this._writeToStorage(this.prefs)); + + case 23: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function set(_x3, _x4) { + return _set.apply(this, arguments); + } + + return set; + }() + }, { + key: "get", + value: function () { + var _get = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee5(name) { + var defaultValue, prefValue; + return _regenerator["default"].wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + _context5.next = 2; + return this._initializedPromise; + + case 2: + defaultValue = this.defaults[name], prefValue = this.prefs[name]; + + if (!(defaultValue === undefined)) { + _context5.next = 5; + break; + } + + throw new Error("Get preference: \"".concat(name, "\" is undefined.")); + + case 5: + return _context5.abrupt("return", prefValue !== undefined ? prefValue : defaultValue); + + case 6: + case "end": + return _context5.stop(); + } + } + }, _callee5, this); + })); + + function get(_x5) { + return _get.apply(this, arguments); + } + + return get; + }() + }, { + key: "getAll", + value: function () { + var _getAll = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee6() { + var obj, name, prefValue; + return _regenerator["default"].wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + _context6.next = 2; + return this._initializedPromise; + + case 2: + obj = Object.create(null); + + for (name in this.defaults) { + prefValue = this.prefs[name]; + obj[name] = prefValue !== undefined ? prefValue : this.defaults[name]; + } + + return _context6.abrupt("return", obj); + + case 5: + case "end": + return _context6.stop(); + } + } + }, _callee6, this); + })); + + function getAll() { + return _getAll.apply(this, arguments); + } + + return getAll; + }() + }]); + + return BasePreferences; +}(); + +exports.BasePreferences = BasePreferences; + +/***/ }), +/* 43 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.DownloadManager = void 0; + +var _pdfjsLib = __webpack_require__(7); + +var _viewer_compatibility = __webpack_require__(2); + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +; + +function _download(blobUrl, filename) { + var a = document.createElement("a"); + + if (!a.click) { + throw new Error('DownloadManager: "a.click()" is not supported.'); + } + + a.href = blobUrl; + a.target = "_parent"; + + if ("download" in a) { + a.download = filename; + } + + (document.body || document.documentElement).appendChild(a); + a.click(); + a.remove(); +} + +var DownloadManager = /*#__PURE__*/function () { + function DownloadManager() { + _classCallCheck(this, DownloadManager); + + this._openBlobUrls = new WeakMap(); + } + + _createClass(DownloadManager, [{ + key: "downloadUrl", + value: function downloadUrl(url, filename) { + if (!(0, _pdfjsLib.createValidAbsoluteUrl)(url, "http://example.com")) { + return; + } + + _download(url + "#pdfjs.action=download", filename); + } + }, { + key: "downloadData", + value: function downloadData(data, filename, contentType) { + var blobUrl = (0, _pdfjsLib.createObjectURL)(data, contentType, _viewer_compatibility.viewerCompatibilityParams.disableCreateObjectURL); + + _download(blobUrl, filename); + } + }, { + key: "openOrDownloadData", + value: function openOrDownloadData(element, data, filename) { + var isPdfData = (0, _pdfjsLib.isPdfFile)(filename); + var contentType = isPdfData ? "application/pdf" : ""; + + if (isPdfData && !_viewer_compatibility.viewerCompatibilityParams.disableCreateObjectURL) { + var blobUrl = this._openBlobUrls.get(element); + + if (!blobUrl) { + blobUrl = URL.createObjectURL(new Blob([data], { + type: contentType + })); + + this._openBlobUrls.set(element, blobUrl); + } + + var viewerUrl; + viewerUrl = "?file=" + encodeURIComponent(blobUrl + "#" + filename); + + try { + window.open(viewerUrl); + return true; + } catch (ex) { + console.error("openOrDownloadData: ".concat(ex)); + URL.revokeObjectURL(blobUrl); + + this._openBlobUrls["delete"](element); + } + } + + this.downloadData(data, filename, contentType); + return false; + } + }, { + key: "download", + value: function download(blob, url, filename) { + var sourceEventType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "download"; + + if (_viewer_compatibility.viewerCompatibilityParams.disableCreateObjectURL) { + this.downloadUrl(url, filename); + return; + } + + var blobUrl = URL.createObjectURL(blob); + + _download(blobUrl, filename); + } + }]); + + return DownloadManager; +}(); + +exports.DownloadManager = DownloadManager; + +/***/ }), +/* 44 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.GenericL10n = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__(4)); + +__webpack_require__(45); + +var _l10n_utils = __webpack_require__(32); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +var webL10n = document.webL10n; + +var GenericL10n = /*#__PURE__*/function () { + function GenericL10n(lang) { + _classCallCheck(this, GenericL10n); + + this._lang = lang; + this._ready = new Promise(function (resolve, reject) { + webL10n.setLanguage((0, _l10n_utils.fixupLangCode)(lang), function () { + resolve(webL10n); + }); + }); + } + + _createClass(GenericL10n, [{ + key: "getLanguage", + value: function () { + var _getLanguage = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee() { + var l10n; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return this._ready; + + case 2: + l10n = _context.sent; + return _context.abrupt("return", l10n.getLanguage()); + + case 4: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function getLanguage() { + return _getLanguage.apply(this, arguments); + } + + return getLanguage; + }() + }, { + key: "getDirection", + value: function () { + var _getDirection = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee2() { + var l10n; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return this._ready; + + case 2: + l10n = _context2.sent; + return _context2.abrupt("return", l10n.getDirection()); + + case 4: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function getDirection() { + return _getDirection.apply(this, arguments); + } + + return getDirection; + }() + }, { + key: "get", + value: function () { + var _get = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee3(key) { + var args, + fallback, + l10n, + _args3 = arguments; + return _regenerator["default"].wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + args = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : null; + fallback = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : (0, _l10n_utils.getL10nFallback)(key, args); + _context3.next = 4; + return this._ready; + + case 4: + l10n = _context3.sent; + return _context3.abrupt("return", l10n.get(key, args, fallback)); + + case 6: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function get(_x) { + return _get.apply(this, arguments); + } + + return get; + }() + }, { + key: "translate", + value: function () { + var _translate = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee4(element) { + var l10n; + return _regenerator["default"].wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + _context4.next = 2; + return this._ready; + + case 2: + l10n = _context4.sent; + return _context4.abrupt("return", l10n.translate(element)); + + case 4: + case "end": + return _context4.stop(); + } + } + }, _callee4, this); + })); + + function translate(_x2) { + return _translate.apply(this, arguments); + } + + return translate; + }() + }]); + + return GenericL10n; +}(); + +exports.GenericL10n = GenericL10n; + +/***/ }), +/* 45 */ +/***/ (() => { + + + +document.webL10n = function (window, document, undefined) { + var gL10nData = {}; + var gTextData = ''; + var gTextProp = 'textContent'; + var gLanguage = ''; + var gMacros = {}; + var gReadyState = 'loading'; + var gAsyncResourceLoading = true; + + function getL10nResourceLinks() { + return document.querySelectorAll('link[type="application/l10n"]'); + } + + function getL10nDictionary() { + var script = document.querySelector('script[type="application/l10n"]'); + return script ? JSON.parse(script.innerHTML) : null; + } + + function getTranslatableChildren(element) { + return element ? element.querySelectorAll('*[data-l10n-id]') : []; + } + + function getL10nAttributes(element) { + if (!element) return {}; + var l10nId = element.getAttribute('data-l10n-id'); + var l10nArgs = element.getAttribute('data-l10n-args'); + var args = {}; + + if (l10nArgs) { + try { + args = JSON.parse(l10nArgs); + } catch (e) { + console.warn('could not parse arguments for #' + l10nId); + } + } + + return { + id: l10nId, + args: args + }; + } + + function xhrLoadText(url, onSuccess, onFailure) { + onSuccess = onSuccess || function _onSuccess(data) {}; + + onFailure = onFailure || function _onFailure() {}; + + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, gAsyncResourceLoading); + + if (xhr.overrideMimeType) { + xhr.overrideMimeType('text/plain; charset=utf-8'); + } + + xhr.onreadystatechange = function () { + if (xhr.readyState == 4) { + if (xhr.status == 200 || xhr.status === 0) { + onSuccess(xhr.responseText); + } else { + onFailure(); + } + } + }; + + xhr.onerror = onFailure; + xhr.ontimeout = onFailure; + + try { + xhr.send(null); + } catch (e) { + onFailure(); + } + } + + function parseResource(href, lang, successCallback, failureCallback) { + var baseURL = href.replace(/[^\/]*$/, '') || './'; + + function evalString(text) { + if (text.lastIndexOf('\\') < 0) return text; + return text.replace(/\\\\/g, '\\').replace(/\\n/g, '\n').replace(/\\r/g, '\r').replace(/\\t/g, '\t').replace(/\\b/g, '\b').replace(/\\f/g, '\f').replace(/\\{/g, '{').replace(/\\}/g, '}').replace(/\\"/g, '"').replace(/\\'/g, "'"); + } + + function parseProperties(text, parsedPropertiesCallback) { + var dictionary = {}; + var reBlank = /^\s*|\s*$/; + var reComment = /^\s*#|^\s*$/; + var reSection = /^\s*\[(.*)\]\s*$/; + var reImport = /^\s*@import\s+url\((.*)\)\s*$/i; + var reSplit = /^([^=\s]*)\s*=\s*(.+)$/; + + function parseRawLines(rawText, extendedSyntax, parsedRawLinesCallback) { + var entries = rawText.replace(reBlank, '').split(/[\r\n]+/); + var currentLang = '*'; + var genericLang = lang.split('-', 1)[0]; + var skipLang = false; + var match = ''; + + function nextEntry() { + while (true) { + if (!entries.length) { + parsedRawLinesCallback(); + return; + } + + var line = entries.shift(); + if (reComment.test(line)) continue; + + if (extendedSyntax) { + match = reSection.exec(line); + + if (match) { + currentLang = match[1].toLowerCase(); + skipLang = currentLang !== '*' && currentLang !== lang && currentLang !== genericLang; + continue; + } else if (skipLang) { + continue; + } + + match = reImport.exec(line); + + if (match) { + loadImport(baseURL + match[1], nextEntry); + return; + } + } + + var tmp = line.match(reSplit); + + if (tmp && tmp.length == 3) { + dictionary[tmp[1]] = evalString(tmp[2]); + } + } + } + + nextEntry(); + } + + function loadImport(url, callback) { + xhrLoadText(url, function (content) { + parseRawLines(content, false, callback); + }, function () { + console.warn(url + ' not found.'); + callback(); + }); + } + + parseRawLines(text, true, function () { + parsedPropertiesCallback(dictionary); + }); + } + + xhrLoadText(href, function (response) { + gTextData += response; + parseProperties(response, function (data) { + for (var key in data) { + var id, + prop, + index = key.lastIndexOf('.'); + + if (index > 0) { + id = key.substring(0, index); + prop = key.substring(index + 1); + } else { + id = key; + prop = gTextProp; + } + + if (!gL10nData[id]) { + gL10nData[id] = {}; + } + + gL10nData[id][prop] = data[key]; + } + + if (successCallback) { + successCallback(); + } + }); + }, failureCallback); + } + + function loadLocale(lang, callback) { + if (lang) { + lang = lang.toLowerCase(); + } + + callback = callback || function _callback() {}; + + clear(); + gLanguage = lang; + var langLinks = getL10nResourceLinks(); + var langCount = langLinks.length; + + if (langCount === 0) { + var dict = getL10nDictionary(); + + if (dict && dict.locales && dict.default_locale) { + console.log('using the embedded JSON directory, early way out'); + gL10nData = dict.locales[lang]; + + if (!gL10nData) { + var defaultLocale = dict.default_locale.toLowerCase(); + + for (var anyCaseLang in dict.locales) { + anyCaseLang = anyCaseLang.toLowerCase(); + + if (anyCaseLang === lang) { + gL10nData = dict.locales[lang]; + break; + } else if (anyCaseLang === defaultLocale) { + gL10nData = dict.locales[defaultLocale]; + } + } + } + + callback(); + } else { + console.log('no resource to load, early way out'); + } + + gReadyState = 'complete'; + return; + } + + var onResourceLoaded = null; + var gResourceCount = 0; + + onResourceLoaded = function onResourceLoaded() { + gResourceCount++; + + if (gResourceCount >= langCount) { + callback(); + gReadyState = 'complete'; + } + }; + + function L10nResourceLink(link) { + var href = link.href; + + this.load = function (lang, callback) { + parseResource(href, lang, callback, function () { + console.warn(href + ' not found.'); + console.warn('"' + lang + '" resource not found'); + gLanguage = ''; + callback(); + }); + }; + } + + for (var i = 0; i < langCount; i++) { + var resource = new L10nResourceLink(langLinks[i]); + resource.load(lang, onResourceLoaded); + } + } + + function clear() { + gL10nData = {}; + gTextData = ''; + gLanguage = ''; + } + + function getPluralRules(lang) { + var locales2rules = { + 'af': 3, + 'ak': 4, + 'am': 4, + 'ar': 1, + 'asa': 3, + 'az': 0, + 'be': 11, + 'bem': 3, + 'bez': 3, + 'bg': 3, + 'bh': 4, + 'bm': 0, + 'bn': 3, + 'bo': 0, + 'br': 20, + 'brx': 3, + 'bs': 11, + 'ca': 3, + 'cgg': 3, + 'chr': 3, + 'cs': 12, + 'cy': 17, + 'da': 3, + 'de': 3, + 'dv': 3, + 'dz': 0, + 'ee': 3, + 'el': 3, + 'en': 3, + 'eo': 3, + 'es': 3, + 'et': 3, + 'eu': 3, + 'fa': 0, + 'ff': 5, + 'fi': 3, + 'fil': 4, + 'fo': 3, + 'fr': 5, + 'fur': 3, + 'fy': 3, + 'ga': 8, + 'gd': 24, + 'gl': 3, + 'gsw': 3, + 'gu': 3, + 'guw': 4, + 'gv': 23, + 'ha': 3, + 'haw': 3, + 'he': 2, + 'hi': 4, + 'hr': 11, + 'hu': 0, + 'id': 0, + 'ig': 0, + 'ii': 0, + 'is': 3, + 'it': 3, + 'iu': 7, + 'ja': 0, + 'jmc': 3, + 'jv': 0, + 'ka': 0, + 'kab': 5, + 'kaj': 3, + 'kcg': 3, + 'kde': 0, + 'kea': 0, + 'kk': 3, + 'kl': 3, + 'km': 0, + 'kn': 0, + 'ko': 0, + 'ksb': 3, + 'ksh': 21, + 'ku': 3, + 'kw': 7, + 'lag': 18, + 'lb': 3, + 'lg': 3, + 'ln': 4, + 'lo': 0, + 'lt': 10, + 'lv': 6, + 'mas': 3, + 'mg': 4, + 'mk': 16, + 'ml': 3, + 'mn': 3, + 'mo': 9, + 'mr': 3, + 'ms': 0, + 'mt': 15, + 'my': 0, + 'nah': 3, + 'naq': 7, + 'nb': 3, + 'nd': 3, + 'ne': 3, + 'nl': 3, + 'nn': 3, + 'no': 3, + 'nr': 3, + 'nso': 4, + 'ny': 3, + 'nyn': 3, + 'om': 3, + 'or': 3, + 'pa': 3, + 'pap': 3, + 'pl': 13, + 'ps': 3, + 'pt': 3, + 'rm': 3, + 'ro': 9, + 'rof': 3, + 'ru': 11, + 'rwk': 3, + 'sah': 0, + 'saq': 3, + 'se': 7, + 'seh': 3, + 'ses': 0, + 'sg': 0, + 'sh': 11, + 'shi': 19, + 'sk': 12, + 'sl': 14, + 'sma': 7, + 'smi': 7, + 'smj': 7, + 'smn': 7, + 'sms': 7, + 'sn': 3, + 'so': 3, + 'sq': 3, + 'sr': 11, + 'ss': 3, + 'ssy': 3, + 'st': 3, + 'sv': 3, + 'sw': 3, + 'syr': 3, + 'ta': 3, + 'te': 3, + 'teo': 3, + 'th': 0, + 'ti': 4, + 'tig': 3, + 'tk': 3, + 'tl': 4, + 'tn': 3, + 'to': 0, + 'tr': 0, + 'ts': 3, + 'tzm': 22, + 'uk': 11, + 'ur': 3, + 've': 3, + 'vi': 0, + 'vun': 3, + 'wa': 4, + 'wae': 3, + 'wo': 0, + 'xh': 3, + 'xog': 3, + 'yo': 0, + 'zh': 0, + 'zu': 3 + }; + + function isIn(n, list) { + return list.indexOf(n) !== -1; + } + + function isBetween(n, start, end) { + return start <= n && n <= end; + } + + var pluralRules = { + '0': function _(n) { + return 'other'; + }, + '1': function _(n) { + if (isBetween(n % 100, 3, 10)) return 'few'; + if (n === 0) return 'zero'; + if (isBetween(n % 100, 11, 99)) return 'many'; + if (n == 2) return 'two'; + if (n == 1) return 'one'; + return 'other'; + }, + '2': function _(n) { + if (n !== 0 && n % 10 === 0) return 'many'; + if (n == 2) return 'two'; + if (n == 1) return 'one'; + return 'other'; + }, + '3': function _(n) { + if (n == 1) return 'one'; + return 'other'; + }, + '4': function _(n) { + if (isBetween(n, 0, 1)) return 'one'; + return 'other'; + }, + '5': function _(n) { + if (isBetween(n, 0, 2) && n != 2) return 'one'; + return 'other'; + }, + '6': function _(n) { + if (n === 0) return 'zero'; + if (n % 10 == 1 && n % 100 != 11) return 'one'; + return 'other'; + }, + '7': function _(n) { + if (n == 2) return 'two'; + if (n == 1) return 'one'; + return 'other'; + }, + '8': function _(n) { + if (isBetween(n, 3, 6)) return 'few'; + if (isBetween(n, 7, 10)) return 'many'; + if (n == 2) return 'two'; + if (n == 1) return 'one'; + return 'other'; + }, + '9': function _(n) { + if (n === 0 || n != 1 && isBetween(n % 100, 1, 19)) return 'few'; + if (n == 1) return 'one'; + return 'other'; + }, + '10': function _(n) { + if (isBetween(n % 10, 2, 9) && !isBetween(n % 100, 11, 19)) return 'few'; + if (n % 10 == 1 && !isBetween(n % 100, 11, 19)) return 'one'; + return 'other'; + }, + '11': function _(n) { + if (isBetween(n % 10, 2, 4) && !isBetween(n % 100, 12, 14)) return 'few'; + if (n % 10 === 0 || isBetween(n % 10, 5, 9) || isBetween(n % 100, 11, 14)) return 'many'; + if (n % 10 == 1 && n % 100 != 11) return 'one'; + return 'other'; + }, + '12': function _(n) { + if (isBetween(n, 2, 4)) return 'few'; + if (n == 1) return 'one'; + return 'other'; + }, + '13': function _(n) { + if (isBetween(n % 10, 2, 4) && !isBetween(n % 100, 12, 14)) return 'few'; + if (n != 1 && isBetween(n % 10, 0, 1) || isBetween(n % 10, 5, 9) || isBetween(n % 100, 12, 14)) return 'many'; + if (n == 1) return 'one'; + return 'other'; + }, + '14': function _(n) { + if (isBetween(n % 100, 3, 4)) return 'few'; + if (n % 100 == 2) return 'two'; + if (n % 100 == 1) return 'one'; + return 'other'; + }, + '15': function _(n) { + if (n === 0 || isBetween(n % 100, 2, 10)) return 'few'; + if (isBetween(n % 100, 11, 19)) return 'many'; + if (n == 1) return 'one'; + return 'other'; + }, + '16': function _(n) { + if (n % 10 == 1 && n != 11) return 'one'; + return 'other'; + }, + '17': function _(n) { + if (n == 3) return 'few'; + if (n === 0) return 'zero'; + if (n == 6) return 'many'; + if (n == 2) return 'two'; + if (n == 1) return 'one'; + return 'other'; + }, + '18': function _(n) { + if (n === 0) return 'zero'; + if (isBetween(n, 0, 2) && n !== 0 && n != 2) return 'one'; + return 'other'; + }, + '19': function _(n) { + if (isBetween(n, 2, 10)) return 'few'; + if (isBetween(n, 0, 1)) return 'one'; + return 'other'; + }, + '20': function _(n) { + if ((isBetween(n % 10, 3, 4) || n % 10 == 9) && !(isBetween(n % 100, 10, 19) || isBetween(n % 100, 70, 79) || isBetween(n % 100, 90, 99))) return 'few'; + if (n % 1000000 === 0 && n !== 0) return 'many'; + if (n % 10 == 2 && !isIn(n % 100, [12, 72, 92])) return 'two'; + if (n % 10 == 1 && !isIn(n % 100, [11, 71, 91])) return 'one'; + return 'other'; + }, + '21': function _(n) { + if (n === 0) return 'zero'; + if (n == 1) return 'one'; + return 'other'; + }, + '22': function _(n) { + if (isBetween(n, 0, 1) || isBetween(n, 11, 99)) return 'one'; + return 'other'; + }, + '23': function _(n) { + if (isBetween(n % 10, 1, 2) || n % 20 === 0) return 'one'; + return 'other'; + }, + '24': function _(n) { + if (isBetween(n, 3, 10) || isBetween(n, 13, 19)) return 'few'; + if (isIn(n, [2, 12])) return 'two'; + if (isIn(n, [1, 11])) return 'one'; + return 'other'; + } + }; + var index = locales2rules[lang.replace(/-.*$/, '')]; + + if (!(index in pluralRules)) { + console.warn('plural form unknown for [' + lang + ']'); + return function () { + return 'other'; + }; + } + + return pluralRules[index]; + } + + gMacros.plural = function (str, param, key, prop) { + var n = parseFloat(param); + if (isNaN(n)) return str; + if (prop != gTextProp) return str; + + if (!gMacros._pluralRules) { + gMacros._pluralRules = getPluralRules(gLanguage); + } + + var index = '[' + gMacros._pluralRules(n) + ']'; + + if (n === 0 && key + '[zero]' in gL10nData) { + str = gL10nData[key + '[zero]'][prop]; + } else if (n == 1 && key + '[one]' in gL10nData) { + str = gL10nData[key + '[one]'][prop]; + } else if (n == 2 && key + '[two]' in gL10nData) { + str = gL10nData[key + '[two]'][prop]; + } else if (key + index in gL10nData) { + str = gL10nData[key + index][prop]; + } else if (key + '[other]' in gL10nData) { + str = gL10nData[key + '[other]'][prop]; + } + + return str; + }; + + function getL10nData(key, args, fallback) { + var data = gL10nData[key]; + + if (!data) { + console.warn('#' + key + ' is undefined.'); + + if (!fallback) { + return null; + } + + data = fallback; + } + + var rv = {}; + + for (var prop in data) { + var str = data[prop]; + str = substIndexes(str, args, key, prop); + str = substArguments(str, args, key); + rv[prop] = str; + } + + return rv; + } + + function substIndexes(str, args, key, prop) { + var reIndex = /\{\[\s*([a-zA-Z]+)\(([a-zA-Z]+)\)\s*\]\}/; + var reMatch = reIndex.exec(str); + if (!reMatch || !reMatch.length) return str; + var macroName = reMatch[1]; + var paramName = reMatch[2]; + var param; + + if (args && paramName in args) { + param = args[paramName]; + } else if (paramName in gL10nData) { + param = gL10nData[paramName]; + } + + if (macroName in gMacros) { + var macro = gMacros[macroName]; + str = macro(str, param, key, prop); + } + + return str; + } + + function substArguments(str, args, key) { + var reArgs = /\{\{\s*(.+?)\s*\}\}/g; + return str.replace(reArgs, function (matched_text, arg) { + if (args && arg in args) { + return args[arg]; + } + + if (arg in gL10nData) { + return gL10nData[arg]; + } + + console.log('argument {{' + arg + '}} for #' + key + ' is undefined.'); + return matched_text; + }); + } + + function translateElement(element) { + var l10n = getL10nAttributes(element); + if (!l10n.id) return; + var data = getL10nData(l10n.id, l10n.args); + + if (!data) { + console.warn('#' + l10n.id + ' is undefined.'); + return; + } + + if (data[gTextProp]) { + if (getChildElementCount(element) === 0) { + element[gTextProp] = data[gTextProp]; + } else { + var children = element.childNodes; + var found = false; + + for (var i = 0, l = children.length; i < l; i++) { + if (children[i].nodeType === 3 && /\S/.test(children[i].nodeValue)) { + if (found) { + children[i].nodeValue = ''; + } else { + children[i].nodeValue = data[gTextProp]; + found = true; + } + } + } + + if (!found) { + var textNode = document.createTextNode(data[gTextProp]); + element.insertBefore(textNode, element.firstChild); + } + } + + delete data[gTextProp]; + } + + for (var k in data) { + element[k] = data[k]; + } + } + + function getChildElementCount(element) { + if (element.children) { + return element.children.length; + } + + if (typeof element.childElementCount !== 'undefined') { + return element.childElementCount; + } + + var count = 0; + + for (var i = 0; i < element.childNodes.length; i++) { + count += element.nodeType === 1 ? 1 : 0; + } + + return count; + } + + function translateFragment(element) { + element = element || document.documentElement; + var children = getTranslatableChildren(element); + var elementCount = children.length; + + for (var i = 0; i < elementCount; i++) { + translateElement(children[i]); + } + + translateElement(element); + } + + return { + get: function get(key, args, fallbackString) { + var index = key.lastIndexOf('.'); + var prop = gTextProp; + + if (index > 0) { + prop = key.substring(index + 1); + key = key.substring(0, index); + } + + var fallback; + + if (fallbackString) { + fallback = {}; + fallback[prop] = fallbackString; + } + + var data = getL10nData(key, args, fallback); + + if (data && prop in data) { + return data[prop]; + } + + return '{{' + key + '}}'; + }, + getData: function getData() { + return gL10nData; + }, + getText: function getText() { + return gTextData; + }, + getLanguage: function getLanguage() { + return gLanguage; + }, + setLanguage: function setLanguage(lang, callback) { + loadLocale(lang, function () { + if (callback) callback(); + }); + }, + getDirection: function getDirection() { + var rtlList = ['ar', 'he', 'fa', 'ps', 'ur']; + var shortCode = gLanguage.split('-', 1)[0]; + return rtlList.indexOf(shortCode) >= 0 ? 'rtl' : 'ltr'; + }, + translate: translateFragment, + getReadyState: function getReadyState() { + return gReadyState; + }, + ready: function ready(callback) { + if (!callback) { + return; + } else if (gReadyState == 'complete' || gReadyState == 'interactive') { + window.setTimeout(function () { + callback(); + }); + } else if (document.addEventListener) { + document.addEventListener('localized', function once() { + document.removeEventListener('localized', once); + callback(); + }); + } + } + }; +}(window, document); + +/***/ }), +/* 46 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.docPropertiesLookup = docPropertiesLookup; +exports.GenericScripting = void 0; + +var _regenerator = _interopRequireDefault(__webpack_require__(4)); + +var _pdfjsLib = __webpack_require__(7); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + +function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + +function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } + +function docPropertiesLookup(_x) { + return _docPropertiesLookup.apply(this, arguments); +} + +function _docPropertiesLookup() { + _docPropertiesLookup = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee4(pdfDocument) { + var url, baseUrl, _yield$pdfDocument$ge, info, metadata, contentDispositionFilename, contentLength, _yield$pdfDocument$ge2, length; + + return _regenerator["default"].wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + url = "", baseUrl = url.split("#")[0]; + _context4.next = 3; + return pdfDocument.getMetadata(); + + case 3: + _yield$pdfDocument$ge = _context4.sent; + info = _yield$pdfDocument$ge.info; + metadata = _yield$pdfDocument$ge.metadata; + contentDispositionFilename = _yield$pdfDocument$ge.contentDispositionFilename; + contentLength = _yield$pdfDocument$ge.contentLength; + + if (contentLength) { + _context4.next = 14; + break; + } + + _context4.next = 11; + return pdfDocument.getDownloadInfo(); + + case 11: + _yield$pdfDocument$ge2 = _context4.sent; + length = _yield$pdfDocument$ge2.length; + contentLength = length; + + case 14: + return _context4.abrupt("return", _objectSpread(_objectSpread({}, info), {}, { + baseURL: baseUrl, + filesize: contentLength, + filename: contentDispositionFilename || (0, _pdfjsLib.getPdfFilenameFromUrl)(url), + metadata: metadata === null || metadata === void 0 ? void 0 : metadata.getRaw(), + authors: metadata === null || metadata === void 0 ? void 0 : metadata.get("dc:creator"), + numPages: pdfDocument.numPages, + URL: url + })); + + case 15: + case "end": + return _context4.stop(); + } + } + }, _callee4); + })); + return _docPropertiesLookup.apply(this, arguments); +} + +var GenericScripting = /*#__PURE__*/function () { + function GenericScripting(sandboxBundleSrc) { + _classCallCheck(this, GenericScripting); + + this._ready = (0, _pdfjsLib.loadScript)(sandboxBundleSrc, true).then(function () { + return window.pdfjsSandbox.QuickJSSandbox(); + }); + } + + _createClass(GenericScripting, [{ + key: "createSandbox", + value: function () { + var _createSandbox = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee(data) { + var sandbox; + return _regenerator["default"].wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return this._ready; + + case 2: + sandbox = _context.sent; + sandbox.create(data); + + case 4: + case "end": + return _context.stop(); + } + } + }, _callee, this); + })); + + function createSandbox(_x2) { + return _createSandbox.apply(this, arguments); + } + + return createSandbox; + }() + }, { + key: "dispatchEventInSandbox", + value: function () { + var _dispatchEventInSandbox = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee2(event) { + var sandbox; + return _regenerator["default"].wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + _context2.next = 2; + return this._ready; + + case 2: + sandbox = _context2.sent; + sandbox.dispatchEvent(event); + + case 4: + case "end": + return _context2.stop(); + } + } + }, _callee2, this); + })); + + function dispatchEventInSandbox(_x3) { + return _dispatchEventInSandbox.apply(this, arguments); + } + + return dispatchEventInSandbox; + }() + }, { + key: "destroySandbox", + value: function () { + var _destroySandbox = _asyncToGenerator( /*#__PURE__*/_regenerator["default"].mark(function _callee3() { + var sandbox; + return _regenerator["default"].wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _context3.next = 2; + return this._ready; + + case 2: + sandbox = _context3.sent; + sandbox.nukeSandbox(); + + case 4: + case "end": + return _context3.stop(); + } + } + }, _callee3, this); + })); + + function destroySandbox() { + return _destroySandbox.apply(this, arguments); + } + + return destroySandbox; + }() + }]); + + return GenericScripting; +}(); + +exports.GenericScripting = GenericScripting; + +/***/ }), +/* 47 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.PDFPrintService = PDFPrintService; + +var _app = __webpack_require__(3); + +var _print_utils = __webpack_require__(48); + +var _viewer_compatibility = __webpack_require__(2); + +var activeService = null; +var overlayManager = null; + +function renderPage(activeServiceOnEntry, pdfDocument, pageNumber, size, printResolution, optionalContentConfigPromise) { + var scratchCanvas = activeService.scratchCanvas; + var PRINT_UNITS = printResolution / 72.0; + scratchCanvas.width = Math.floor(size.width * PRINT_UNITS); + scratchCanvas.height = Math.floor(size.height * PRINT_UNITS); + var ctx = scratchCanvas.getContext("2d"); + ctx.save(); + ctx.fillStyle = "rgb(255, 255, 255)"; + ctx.fillRect(0, 0, scratchCanvas.width, scratchCanvas.height); + ctx.restore(); + return pdfDocument.getPage(pageNumber).then(function (pdfPage) { + var renderContext = { + canvasContext: ctx, + transform: [PRINT_UNITS, 0, 0, PRINT_UNITS, 0, 0], + viewport: pdfPage.getViewport({ + scale: 1, + rotation: size.rotation + }), + intent: "print", + includeAnnotationStorage: true, + optionalContentConfigPromise: optionalContentConfigPromise + }; + return pdfPage.render(renderContext).promise; + }); +} + +function PDFPrintService(pdfDocument, pagesOverview, printContainer, printResolution) { + var optionalContentConfigPromise = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null; + var l10n = arguments.length > 5 ? arguments[5] : undefined; + this.pdfDocument = pdfDocument; + this.pagesOverview = pagesOverview; + this.printContainer = printContainer; + this._printResolution = printResolution || 150; + this._optionalContentConfigPromise = optionalContentConfigPromise || pdfDocument.getOptionalContentConfig(); + this.l10n = l10n; + this.currentPage = -1; + this.scratchCanvas = document.createElement("canvas"); +} + +PDFPrintService.prototype = { + layout: function layout() { + this.throwIfInactive(); + var body = document.querySelector("body"); + body.setAttribute("data-pdfjsprinting", true); + var hasEqualPageSizes = this.pagesOverview.every(function (size) { + return size.width === this.pagesOverview[0].width && size.height === this.pagesOverview[0].height; + }, this); + + if (!hasEqualPageSizes) { + console.warn("Not all pages have the same size. The printed " + "result may be incorrect!"); + } + + this.pageStyleSheet = document.createElement("style"); + var pageSize = this.pagesOverview[0]; + this.pageStyleSheet.textContent = "@page { size: " + pageSize.width + "pt " + pageSize.height + "pt;}"; + body.appendChild(this.pageStyleSheet); + }, + destroy: function destroy() { + if (activeService !== this) { + return; + } + + this.printContainer.textContent = ""; + var body = document.querySelector("body"); + body.removeAttribute("data-pdfjsprinting"); + + if (this.pageStyleSheet) { + this.pageStyleSheet.remove(); + this.pageStyleSheet = null; + } + + this.scratchCanvas.width = this.scratchCanvas.height = 0; + this.scratchCanvas = null; + activeService = null; + ensureOverlay().then(function () { + if (overlayManager.active !== "printServiceOverlay") { + return; + } + + overlayManager.close("printServiceOverlay"); + }); + }, + renderPages: function renderPages() { + var _this = this; + + if (this.pdfDocument.isPureXfa) { + (0, _print_utils.getXfaHtmlForPrinting)(this.printContainer, this.pdfDocument); + return Promise.resolve(); + } + + var pageCount = this.pagesOverview.length; + + var renderNextPage = function renderNextPage(resolve, reject) { + _this.throwIfInactive(); + + if (++_this.currentPage >= pageCount) { + renderProgress(pageCount, pageCount, _this.l10n); + resolve(); + return; + } + + var index = _this.currentPage; + renderProgress(index, pageCount, _this.l10n); + renderPage(_this, _this.pdfDocument, index + 1, _this.pagesOverview[index], _this._printResolution, _this._optionalContentConfigPromise).then(_this.useRenderedPage.bind(_this)).then(function () { + renderNextPage(resolve, reject); + }, reject); + }; + + return new Promise(renderNextPage); + }, + useRenderedPage: function useRenderedPage() { + this.throwIfInactive(); + var img = document.createElement("img"); + var scratchCanvas = this.scratchCanvas; + + if ("toBlob" in scratchCanvas && !_viewer_compatibility.viewerCompatibilityParams.disableCreateObjectURL) { + scratchCanvas.toBlob(function (blob) { + img.src = URL.createObjectURL(blob); + }); + } else { + img.src = scratchCanvas.toDataURL(); + } + + var wrapper = document.createElement("div"); + wrapper.className = "printedPage"; + wrapper.appendChild(img); + this.printContainer.appendChild(wrapper); + return new Promise(function (resolve, reject) { + img.onload = resolve; + img.onerror = reject; + }); + }, + performPrint: function performPrint() { + var _this2 = this; + + this.throwIfInactive(); + return new Promise(function (resolve) { + setTimeout(function () { + if (!_this2.active) { + resolve(); + return; + } + + print.call(window); + setTimeout(resolve, 20); + }, 0); + }); + }, + + get active() { + return this === activeService; + }, + + throwIfInactive: function throwIfInactive() { + if (!this.active) { + throw new Error("This print request was cancelled or completed."); + } + } +}; +var print = window.print; + +window.print = function () { + if (activeService) { + console.warn("Ignored window.print() because of a pending print job."); + return; + } + + ensureOverlay().then(function () { + if (activeService) { + overlayManager.open("printServiceOverlay"); + } + }); + + try { + dispatchEvent("beforeprint"); + } finally { + if (!activeService) { + console.error("Expected print service to be initialized."); + ensureOverlay().then(function () { + if (overlayManager.active === "printServiceOverlay") { + overlayManager.close("printServiceOverlay"); + } + }); + return; + } + + var activeServiceOnEntry = activeService; + activeService.renderPages().then(function () { + return activeServiceOnEntry.performPrint(); + })["catch"](function () {}).then(function () { + if (activeServiceOnEntry.active) { + abort(); + } + }); + } +}; + +function dispatchEvent(eventType) { + var event = document.createEvent("CustomEvent"); + event.initCustomEvent(eventType, false, false, "custom"); + window.dispatchEvent(event); +} + +function abort() { + if (activeService) { + activeService.destroy(); + dispatchEvent("afterprint"); + } +} + +function renderProgress(index, total, l10n) { + var progressContainer = document.getElementById("printServiceOverlay"); + var progress = Math.round(100 * index / total); + var progressBar = progressContainer.querySelector("progress"); + var progressPerc = progressContainer.querySelector(".relative-progress"); + progressBar.value = progress; + l10n.get("print_progress_percent", { + progress: progress + }).then(function (msg) { + progressPerc.textContent = msg; + }); +} + +window.addEventListener("keydown", function (event) { + if (event.keyCode === 80 && (event.ctrlKey || event.metaKey) && !event.altKey && (!event.shiftKey || window.chrome || window.opera)) { + window.print(); + event.preventDefault(); + + if (event.stopImmediatePropagation) { + event.stopImmediatePropagation(); + } else { + event.stopPropagation(); + } + } +}, true); + +if ("onbeforeprint" in window) { + var stopPropagationIfNeeded = function stopPropagationIfNeeded(event) { + if (event.detail !== "custom" && event.stopImmediatePropagation) { + event.stopImmediatePropagation(); + } + }; + + window.addEventListener("beforeprint", stopPropagationIfNeeded); + window.addEventListener("afterprint", stopPropagationIfNeeded); +} + +var overlayPromise; + +function ensureOverlay() { + if (!overlayPromise) { + overlayManager = _app.PDFViewerApplication.overlayManager; + + if (!overlayManager) { + throw new Error("The overlay manager has not yet been initialized."); + } + + overlayPromise = overlayManager.register("printServiceOverlay", document.getElementById("printServiceOverlay"), abort, true); + document.getElementById("printCancel").onclick = abort; + } + + return overlayPromise; +} + +_app.PDFPrintServiceFactory.instance = { + supportsPrinting: true, + createPrintService: function createPrintService(pdfDocument, pagesOverview, printContainer, printResolution, optionalContentConfigPromise, l10n) { + if (activeService) { + throw new Error("The print service is created and active."); + } + + activeService = new PDFPrintService(pdfDocument, pagesOverview, printContainer, printResolution, optionalContentConfigPromise, l10n); + return activeService; + } +}; + +/***/ }), +/* 48 */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +exports.getXfaHtmlForPrinting = getXfaHtmlForPrinting; + +var _ui_utils = __webpack_require__(6); + +var _xfa_layer_builder = __webpack_require__(36); + +var _pdfjsLib = __webpack_require__(7); + +function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; } + +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + +function getXfaHtmlForPrinting(printContainer, pdfDocument) { + var xfaHtml = pdfDocument.allXfaHtml; + var factory = new _xfa_layer_builder.DefaultXfaLayerFactory(); + var scale = Math.round(_ui_utils.CSS_UNITS * 100) / 100; + + var _iterator = _createForOfIteratorHelper(xfaHtml.children), + _step; + + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var xfaPage = _step.value; + var page = document.createElement("div"); + page.className = "xfaPrintedPage"; + printContainer.appendChild(page); + var builder = factory.createXfaLayerBuilder(page, null, pdfDocument.annotationStorage, xfaPage); + var viewport = (0, _pdfjsLib.getXfaPageViewport)(xfaPage, { + scale: scale + }); + builder.render(viewport, "print"); + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } +} + +/***/ }) +/******/ ]); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ id: moduleId, +/******/ loaded: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.loaded = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/node module decorator */ +/******/ (() => { +/******/ __webpack_require__.nmd = (module) => { +/******/ module.paths = []; +/******/ if (!module.children) module.children = []; +/******/ return module; +/******/ }; +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; +// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. +(() => { +var exports = __webpack_exports__; + + +Object.defineProperty(exports, "__esModule", ({ + value: true +})); +Object.defineProperty(exports, "PDFViewerApplicationOptions", ({ + enumerable: true, + get: function get() { + return _app_options.AppOptions; + } +})); +Object.defineProperty(exports, "PDFViewerApplication", ({ + enumerable: true, + get: function get() { + return _app.PDFViewerApplication; + } +})); + +var _app_options = __webpack_require__(1); + +var _app = __webpack_require__(3); + +var pdfjsVersion = '2.10.377'; +var pdfjsBuild = '156762c48'; +window.PDFViewerApplication = _app.PDFViewerApplication; +window.PDFViewerApplicationOptions = _app_options.AppOptions; +; +; +{ + __webpack_require__(41); +} +; +{ + __webpack_require__(47); +} + +function getViewerConfiguration() { + var errorWrapper = null; + errorWrapper = { + container: document.getElementById("errorWrapper"), + errorMessage: document.getElementById("errorMessage"), + closeButton: document.getElementById("errorClose"), + errorMoreInfo: document.getElementById("errorMoreInfo"), + moreInfoButton: document.getElementById("errorShowMore"), + lessInfoButton: document.getElementById("errorShowLess") + }; + return { + appContainer: document.body, + mainContainer: document.getElementById("viewerContainer"), + viewerContainer: document.getElementById("viewer"), + eventBus: null, + toolbar: { + container: document.getElementById("toolbarViewer"), + numPages: document.getElementById("numPages"), + pageNumber: document.getElementById("pageNumber"), + scaleSelectContainer: document.getElementById("scaleSelectContainer"), + scaleSelect: document.getElementById("scaleSelect"), + customScaleOption: document.getElementById("customScaleOption"), + previous: document.getElementById("previous"), + next: document.getElementById("next"), + zoomIn: document.getElementById("zoomIn"), + zoomOut: document.getElementById("zoomOut"), + viewFind: document.getElementById("viewFind"), + openFile: document.getElementById("openFile"), + print: document.getElementById("print"), + presentationModeButton: document.getElementById("presentationMode"), + download: document.getElementById("download"), + viewBookmark: document.getElementById("viewBookmark") + }, + secondaryToolbar: { + toolbar: document.getElementById("secondaryToolbar"), + toggleButton: document.getElementById("secondaryToolbarToggle"), + toolbarButtonContainer: document.getElementById("secondaryToolbarButtonContainer"), + presentationModeButton: document.getElementById("secondaryPresentationMode"), + openFileButton: document.getElementById("secondaryOpenFile"), + printButton: document.getElementById("secondaryPrint"), + downloadButton: document.getElementById("secondaryDownload"), + viewBookmarkButton: document.getElementById("secondaryViewBookmark"), + firstPageButton: document.getElementById("firstPage"), + lastPageButton: document.getElementById("lastPage"), + pageRotateCwButton: document.getElementById("pageRotateCw"), + pageRotateCcwButton: document.getElementById("pageRotateCcw"), + cursorSelectToolButton: document.getElementById("cursorSelectTool"), + cursorHandToolButton: document.getElementById("cursorHandTool"), + scrollVerticalButton: document.getElementById("scrollVertical"), + scrollHorizontalButton: document.getElementById("scrollHorizontal"), + scrollWrappedButton: document.getElementById("scrollWrapped"), + spreadNoneButton: document.getElementById("spreadNone"), + spreadOddButton: document.getElementById("spreadOdd"), + spreadEvenButton: document.getElementById("spreadEven"), + documentPropertiesButton: document.getElementById("documentProperties") + }, + sidebar: { + outerContainer: document.getElementById("outerContainer"), + viewerContainer: document.getElementById("viewerContainer"), + toggleButton: document.getElementById("sidebarToggle"), + thumbnailButton: document.getElementById("viewThumbnail"), + outlineButton: document.getElementById("viewOutline"), + attachmentsButton: document.getElementById("viewAttachments"), + layersButton: document.getElementById("viewLayers"), + thumbnailView: document.getElementById("thumbnailView"), + outlineView: document.getElementById("outlineView"), + attachmentsView: document.getElementById("attachmentsView"), + layersView: document.getElementById("layersView"), + outlineOptionsContainer: document.getElementById("outlineOptionsContainer"), + currentOutlineItemButton: document.getElementById("currentOutlineItem") + }, + sidebarResizer: { + outerContainer: document.getElementById("outerContainer"), + resizer: document.getElementById("sidebarResizer") + }, + findBar: { + bar: document.getElementById("findbar"), + toggleButton: document.getElementById("viewFind"), + findField: document.getElementById("findInput"), + highlightAllCheckbox: document.getElementById("findHighlightAll"), + caseSensitiveCheckbox: document.getElementById("findMatchCase"), + entireWordCheckbox: document.getElementById("findEntireWord"), + findMsg: document.getElementById("findMsg"), + findResultsCount: document.getElementById("findResultsCount"), + findPreviousButton: document.getElementById("findPrevious"), + findNextButton: document.getElementById("findNext") + }, + passwordOverlay: { + overlayName: "passwordOverlay", + container: document.getElementById("passwordOverlay"), + label: document.getElementById("passwordText"), + input: document.getElementById("password"), + submitButton: document.getElementById("passwordSubmit"), + cancelButton: document.getElementById("passwordCancel") + }, + documentProperties: { + overlayName: "documentPropertiesOverlay", + container: document.getElementById("documentPropertiesOverlay"), + closeButton: document.getElementById("documentPropertiesClose"), + fields: { + fileName: document.getElementById("fileNameField"), + fileSize: document.getElementById("fileSizeField"), + title: document.getElementById("titleField"), + author: document.getElementById("authorField"), + subject: document.getElementById("subjectField"), + keywords: document.getElementById("keywordsField"), + creationDate: document.getElementById("creationDateField"), + modificationDate: document.getElementById("modificationDateField"), + creator: document.getElementById("creatorField"), + producer: document.getElementById("producerField"), + version: document.getElementById("versionField"), + pageCount: document.getElementById("pageCountField"), + pageSize: document.getElementById("pageSizeField"), + linearized: document.getElementById("linearizedField") + } + }, + errorWrapper: errorWrapper, + printContainer: document.getElementById("printContainer"), + openFileInputName: "fileInput", + debuggerScriptPath: "./debugger.js" + }; +} + +function webViewerLoad() { + var config = getViewerConfiguration(); + var event = document.createEvent("CustomEvent"); + event.initCustomEvent("webviewerloaded", true, true, { + source: window + }); + + try { + parent.document.dispatchEvent(event); + } catch (ex) { + console.error("webviewerloaded: ".concat(ex)); + document.dispatchEvent(event); + } + + _app.PDFViewerApplication.run(config); +} + +if (document.blockUnblockOnload) { + document.blockUnblockOnload(true); +} + +if (document.readyState === "interactive" || document.readyState === "complete") { + webViewerLoad(); +} else { + document.addEventListener("DOMContentLoaded", webViewerLoad, true); +} +})(); + +/******/ })() +; +//# sourceMappingURL=viewer.js.map \ No newline at end of file diff --git a/public/pdfjs/web/viewer.js.map b/public/pdfjs/web/viewer.js.map new file mode 100644 index 0000000..1d0a2be --- /dev/null +++ b/public/pdfjs/web/viewer.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack://pdf.js/web/app_options.js","webpack://pdf.js/web/viewer_compatibility.js","webpack://pdf.js/web/app.js","webpack://pdf.js/node_modules/@babel/runtime/regenerator/index.js","webpack://pdf.js/node_modules/@babel/runtime/node_modules/regenerator-runtime/runtime.js","webpack://pdf.js/web/ui_utils.js","webpack://pdf.js/web/pdfjs.js","webpack://pdf.js/web/pdf_cursor_tools.js","webpack://pdf.js/web/grab_to_pan.js","webpack://pdf.js/web/pdf_rendering_queue.js","webpack://pdf.js/web/overlay_manager.js","webpack://pdf.js/web/password_prompt.js","webpack://pdf.js/web/pdf_attachment_viewer.js","webpack://pdf.js/web/base_tree_viewer.js","webpack://pdf.js/web/pdf_document_properties.js","webpack://pdf.js/web/pdf_find_bar.js","webpack://pdf.js/web/pdf_find_controller.js","webpack://pdf.js/web/pdf_find_utils.js","webpack://pdf.js/web/pdf_history.js","webpack://pdf.js/web/pdf_layer_viewer.js","webpack://pdf.js/web/pdf_link_service.js","webpack://pdf.js/web/pdf_outline_viewer.js","webpack://pdf.js/web/pdf_presentation_mode.js","webpack://pdf.js/web/pdf_scripting_manager.js","webpack://pdf.js/web/pdf_sidebar.js","webpack://pdf.js/web/pdf_sidebar_resizer.js","webpack://pdf.js/web/pdf_thumbnail_viewer.js","webpack://pdf.js/web/pdf_thumbnail_view.js","webpack://pdf.js/web/pdf_viewer.js","webpack://pdf.js/web/base_viewer.js","webpack://pdf.js/web/annotation_layer_builder.js","webpack://pdf.js/web/l10n_utils.js","webpack://pdf.js/web/pdf_page_view.js","webpack://pdf.js/web/struct_tree_layer_builder.js","webpack://pdf.js/web/text_layer_builder.js","webpack://pdf.js/web/xfa_layer_builder.js","webpack://pdf.js/web/secondary_toolbar.js","webpack://pdf.js/web/pdf_single_page_viewer.js","webpack://pdf.js/web/toolbar.js","webpack://pdf.js/web/view_history.js","webpack://pdf.js/web/genericcom.js","webpack://pdf.js/web/preferences.js","webpack://pdf.js/web/download_manager.js","webpack://pdf.js/web/genericl10n.js","webpack://pdf.js/external/webL10n/l10n.js","webpack://pdf.js/web/generic_scripting.js","webpack://pdf.js/web/pdf_print_service.js","webpack://pdf.js/web/print_utils.js","webpack://pdf.js/webpack/bootstrap","webpack://pdf.js/webpack/runtime/node module decorator","webpack://pdf.js/web/viewer.js"],"names":["OptionKind","VIEWER","API","WORKER","PREFERENCE","defaultOptions","cursorToolOnLoad","value","kind","defaultUrl","defaultZoomValue","disableHistory","disablePageLabels","enablePermissions","enablePrintAutoRotate","enableScripting","externalLinkRel","externalLinkTarget","historyUpdateUrl","ignoreDestinationZoom","imageResourcesPath","maxCanvasPixels","compatibility","viewerCompatibilityParams","pdfBugEnabled","printResolution","renderer","renderInteractiveForms","sidebarViewOnLoad","scrollModeOnLoad","spreadModeOnLoad","textLayerMode","useOnlyCssZoom","viewerCssTheme","viewOnLoad","cMapPacked","cMapUrl","disableAutoFetch","disableFontFace","disableRange","disableStream","docBaseUrl","enableXfa","fontExtraProperties","isEvalSupported","maxImageSize","pdfBug","standardFontDataUrl","verbosity","workerPort","workerSrc","navigator","userOptions","Object","constructor","userOption","defaultOption","options","valueType","Number","compatibilityParams","userAgent","platform","maxTouchPoints","isAndroid","isIOS","isIOSChrome","DEFAULT_SCALE_DELTA","DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT","FORCE_PAGES_LOADED_TIMEOUT","WHEEL_ZOOM_DISABLED_TIMEOUT","ENABLE_PERMISSIONS_CLASS","ViewOnLoad","UNKNOWN","PREVIOUS","INITIAL","ViewerCssTheme","AUTOMATIC","LIGHT","DARK","KNOWN_VERSIONS","KNOWN_GENERATORS","shadow","ctrlKey","metaKey","PDFViewerApplication","initialBookmark","document","_initializedCapability","_fellback","appConfig","pdfDocument","pdfLoadingTask","printService","pdfViewer","pdfThumbnailViewer","pdfRenderingQueue","pdfPresentationMode","pdfDocumentProperties","pdfLinkService","pdfHistory","pdfSidebar","pdfSidebarResizer","pdfOutlineViewer","pdfAttachmentViewer","pdfLayerViewer","pdfCursorTools","pdfScriptingManager","store","downloadManager","overlayManager","preferences","toolbar","secondaryToolbar","eventBus","l10n","isInitialViewSet","downloadComplete","isViewerEmbedded","window","url","baseUrl","externalServices","_boundEvents","documentInfo","metadata","_contentDispositionFilename","_contentLength","_saveInProgress","_wheelUnusedTicks","_idleCallbacks","AppOptions","LinkTarget","appContainer","source","console","reason","hash","hashParams","parseQueryString","waitOn","loadFakeWorker","TextLayerMode","viewer","enabled","loadAndEnablePDFBug","locale","dir","_forceCssTheme","cssTheme","styleSheet","cssRules","mediaMatcher","mediaRule","mediaRegex","i","ii","rule","darkRules","isInAutomation","findController","linkService","sandboxBundleSrc","scriptingFactory","docPropertiesLookup","container","renderingQueue","scriptingManager","elements","run","zoomIn","newScale","Math","zoomOut","zoomReset","PDFPrintServiceFactory","doc","support","bar","initPassiveLoading","setTitleUsingUrl","title","getPdfFilenameFromUrl","decodeURIComponent","getFilenameFromUrl","setTitle","_cancelIdleCallbacks","sourceEventType","promises","webViewerResetPermissions","PDFBug","Promise","workerParameters","GlobalWorkerOptions","parameters","file","apiParameters","key","args","loadingTask","getDocument","loaded","exception","msg","message","_ensureDownloadComplete","filename","data","blob","type","downloadOrSave","fallback","featureId","download","_documentError","moreInfo","_otherError","moreInfoText","version","build","stack","line","errorWrapperConfig","errorWrapper","errorMessage","closeButton","errorMoreInfo","moreInfoButton","lessInfoButton","parts","progress","percent","level","isNaN","clearTimeout","load","firstPagePromise","pageLayoutPromise","pageModePromise","openActionPromise","baseDocumentUrl","storedPromise","page","zoom","scrollLeft","scrollTop","rotation","sidebarView","SidebarView","scrollMode","ScrollMode","spreadMode","SpreadMode","pdfPage","fingerprint","initialDest","openAction","stored","parseInt","pageMode","apiPageModeToSidebarView","pageLayout","apiPageLayoutToSpreadMode","resolve","setTimeout","pagesPromise","onePageRendered","outline","attachments","optionalContentConfig","callback","timeout","once","baseURL","filesize","authors","numPages","URL","markInfo","tagged","triggerAutoPrint","javaScript","js","UNSUPPORTED_FEATURES","AutoPrintRegExp","info","pdfTitle","metadataTitle","contentDispositionFilename","versionId","generatorId","producer","generator","formType","labels","numLabels","_initializePdfHistory","resetHistory","updateUrl","JSON","explicitDest","pageNumber","permissions","PermissionFlag","_initializeAnnotationStorageCallbacks","annotationStorage","setInitialView","setRotation","angle","isValidRotation","setViewerModes","isValidScrollMode","isValidSpreadMode","_cleanup","RendererType","forceRendering","beforePrint","pagesOverview","printContainer","optionalContentConfigPromise","afterPrint","rotatePages","requestPresentationMode","triggerPrinting","bindEvents","bindWindowEvents","event","detail","passive","unbindEvents","unbindWindowEvents","accumulateWheelTicks","ticks","wholeTicks","_unblockDocumentLoadEvent","HOSTED_VIEWER_ORIGINS","validateFileURL","viewerOrigin","origin","protocol","ex","loadScript","PDFWorker","OPS","Stats","pageView","pageStats","queryString","params","fileInput","files","evt","webViewerOpenFileViaURL","thumbnailView","timestamp","stats","view","webViewerSave","location","href","currentPage","loading","RenderingStates","currentScaleValue","webViewerFileInputChange","originalUrl","fileReader","buffer","webViewerOpenFile","openFileInputName","query","phraseSearch","caseSensitive","entireWord","highlightAll","findPrevious","result","matchesCount","rawQuery","setZoomDisabledTimeout","zoomDisabledTimeout","supportedMouseWheelZoomModifierKeys","previousScale","delta","normalizeWheelEventDirection","WheelEvent","PIXELS_PER_LINE_SCALE","currentScale","scaleCorrectionFactor","rect","dx","dy","handled","ensureViewerFocused","cmd","isViewerInPresentationMode","findState","curElement","curElementTagName","turnPage","turnOnlyIfPageFit","CursorTool","instance","supportsPrinting","createPrintService","module","runtime","Op","hasOwn","$Symbol","iteratorSymbol","asyncIteratorSymbol","toStringTagSymbol","enumerable","configurable","writable","obj","define","protoGenerator","outerFn","context","tryLocsList","makeInvokeMethod","exports","arg","fn","GenStateSuspendedStart","GenStateSuspendedYield","GenStateExecuting","GenStateCompleted","ContinueSentinel","IteratorPrototype","getProto","NativeIteratorPrototype","values","Gp","GeneratorFunctionPrototype","Generator","GeneratorFunction","ctor","genFun","__await","record","tryCatch","reject","invoke","previousPromise","callInvokeWithMethodAndArg","defineIteratorMethods","AsyncIterator","PromiseImpl","iter","wrap","state","method","doneResult","delegate","delegateResult","maybeInvokeDelegate","done","entry","tryLoc","locs","keys","next","iteratorMethod","iterable","Context","reset","name","stop","rootEntry","rootRecord","dispatchException","handle","hasCatch","hasFinally","abrupt","finallyEntry","complete","finish","resetTryEntry","thrown","delegateYield","iterator","resultName","nextLoc","regeneratorRuntime","globalThis","Function","CSS_UNITS","DEFAULT_SCALE_VALUE","DEFAULT_SCALE","MIN_SCALE","MAX_SCALE","UNKNOWN_SCALE","MAX_AUTO_SCALE","SCROLLBAR_PADDING","VERTICAL_PADDING","LOADINGBAR_END_OFFSET_VAR","PresentationModeState","NORMAL","CHANGING","FULLSCREEN","NONE","THUMBS","OUTLINE","ATTACHMENTS","LAYERS","CANVAS","SVG","DISABLE","ENABLE","ENABLE_ENHANCE","VERTICAL","HORIZONTAL","WRAPPED","ODD","EVEN","devicePixelRatio","backingStoreRatio","ctx","pixelRatio","sx","sy","scaled","scrollMatches","parent","element","offsetY","offsetX","getComputedStyle","spot","debounceScroll","rAF","currentX","viewAreaElement","lastX","currentY","lastY","right","down","_eventHandler","param","minIndex","maxIndex","items","condition","currentIndex","currentItem","xinv","limit","x_","x","a","b","c","d","p","q","r","changeOrientation","rotate","width","height","index","elt","views","pageTop","sortByVisibility","horizontal","rtl","top","scrollEl","bottom","left","elementBottom","elementLeft","elementRight","visible","numViews","firstVisibleElementInd","binarySearchFirstItem","backtrackBeforeAllVisibleElements","lastEdge","currentWidth","currentHeight","viewWidth","viewHeight","viewRight","viewBottom","hiddenHeight","hiddenWidth","fractionHeight","fractionWidth","id","y","widthPercent","first","last","pc","MOUSE_DOM_DELTA_PIXEL_MODE","MOUSE_DOM_DELTA_LINE_MODE","MOUSE_PIXELS_PER_LINE","MOUSE_LINES_PER_PAGE","mode","size","WaitOnType","EVENT","TIMEOUT","delay","target","eventHandler","handler","timeoutHandler","animationStarted","on","external","off","dispatch","eventListeners","Array","listener","externalListeners","_on","_off","units","_updateBar","progressSize","clamp","setWidth","scrollbarWidth","hide","show","moved","len","arr","write","read","curRoot","curActiveOrFocused","pdfjsLib","__non_webpack_require__","SELECT","HAND","ZOOM","switchTool","tool","disableActiveTool","_dispatchEvent","_addEventListeners","previouslyActive","overlay","GrabToPan","CSS_CLASS_GRAB","activate","deactivate","toggle","ignoreTarget","node","_onmousedown","focusedElement","_onmousemove","isLeftMouseReleased","xDiff","yDiff","behavior","_endPan","chrome","isChrome15OrOpera15plus","isSafari6plus","CLEANUP_TIMEOUT","RUNNING","PAUSED","FINISHED","setViewer","setThumbnailViewer","isHighestPriority","renderHighestPriority","getHighestPriority","visibleViews","numVisible","nextPageIndex","previousPageIndex","isViewFinished","renderView","callerCloseMethod","canForceClose","_keyDown","_closeThroughCaller","e","passwordIncorrect","PasswordResponses","close","verify","password","setUpdateCallback","keepRenderedCapability","attachmentsCount","_bindLink","render","names","fragment","item","content","div","_appendAttachment","renderedPromise","TREEITEM_OFFSET_TOP","TREEITEM_SELECTED_CLASS","_normalizeTextContent","removeNullCharacters","_addToggleButton","hidden","toggler","shouldShowAll","_toggleTreeItem","root","_toggleAllTreeItems","_finishRendering","hasAnyNesting","_updateCurrentTreeItem","treeItem","_scrollToCurrentTreeItem","currentNode","DEFAULT_FIELD_CONTENT","NON_METRIC_LOCALES","US_PAGE_NAMES","METRIC_PAGE_NAMES","isPortrait","pageNames","freezeFieldData","currentPageNumber","pagesRotation","getPageSizeInches","fileName","fileSize","author","subject","keywords","creationDate","modificationDate","creator","pageCount","pageSize","linearized","_currentPageNumber","_pagesRotation","contentLength","setDocument","_reset","_updateUI","kb","mb","size_mb","size_kb","size_b","pageSizeInches","isPortraitOrientation","sizeInches","sizeMillimeters","rawName","getPageName","exactMillimeters","intMillimeters","unit","orientation","dateObject","PDFDateString","date","time","_parseLinearization","isLinearized","MATCHES_COUNT_LIMIT","dispatchEvent","updateUIState","findMsg","status","FindState","previous","updateResultsCount","current","total","matchCountMsg","open","_adjustWidth","findbarHeight","inputContainerHeight","FOUND","NOT_FOUND","PENDING","FIND_TIMEOUT","MATCH_SCROLL_OFFSET_TOP","MATCH_SCROLL_OFFSET_LEFT","CHARACTERS_TO_NORMALIZE","normalizationRegex","replace","diffs","normalizedText","normalizedCh","diff","ch","totalDiff","matchIndex","executeCommand","findbarClosed","pendingTimeout","scrollMatchIntoView","selectedLeft","pageIndex","scrollIntoView","pageIdx","matchIdx","wrapped","normalize","_shouldDirtyMatch","_prepareMatches","currentElem","matchesWithLength","nextElem","prevElem","isSubTerm","matches","matchesLength","_isEntireWord","startIdx","getCharacterType","endIdx","_calculatePhraseMatch","queryLen","pageContent","originalMatchIdx","getOriginalIndex","matchEnd","originalQueryLen","_calculateWordMatch","queryArray","subquery","subqueryLen","match","matchLength","skipped","_calculateMatch","pageDiffs","pageMatchesCount","_extractText","promise","extractTextCapability","normalizeWhitespace","textContent","textItems","strBuf","j","jj","_updatePage","_updateAllPages","_nextMatch","currentPageIndex","offset","numPageMatches","_matchesReady","numMatches","_nextPageMatch","_advanceOffsetPage","_updateMatch","found","previousPage","_onFindBarClose","_requestMatchesCount","_updateUIResultsCount","_updateUIState","CharacterType","SPACE","ALPHA_LETTER","PUNCT","HAN_LETTER","KATAKANA_LETTER","HIRAGANA_LETTER","HALFWIDTH_KATAKANA_LETTER","THAI_LETTER","charCode","isAlphabeticalScript","isAscii","isAsciiSpace","isAsciiAlpha","isAsciiDigit","isThai","isHan","isKatakana","isHiragana","isHalfwidthKatakana","HASH_CHANGE_TIMEOUT","POSITION_UPDATED_THRESHOLD","UPDATE_VIEWAREA_TIMEOUT","initialize","reInitialized","getCurrentHash","destination","push","namedDest","forceReplace","isDestArraysEqual","dest","pushPage","pushCurrentPosition","back","forward","_pushOrReplaceState","shouldReplace","newState","uid","newUrl","_tryPushCurrentPosition","temporary","position","_isValidPage","val","_isValidState","checkReload","performance","perfEntry","_updateInternalState","removeTemporary","_parseCurrentHash","checkNameddest","unescape","nameddest","_updateViewarea","_popState","newHash","hashChanged","waitOnEventOrTimeout","_pageHide","_bindEvents","updateViewarea","popState","pageHide","_unbindEvents","destHash","second","isEntryEqual","firstDest","secondDest","layersCount","setVisibility","input","groups","queue","levelData","itemsDiv","groupId","group","label","setHistory","_goToDestinationHelper","destRef","destArray","goToPage","getDestinationHash","escape","str","getAnchorUrl","setHash","zoomArgs","zoomArg","zoomArgNumber","parseFloat","allowNegativeOffset","isValidExplicitDestination","executeNamedAction","action","cachePageRef","refStr","pageRef","_cachedPageNumber","isPageVisible","isPageCached","destLength","allowNull","outlineCount","currentOutlineItemPromise","addLinkAttributes","newWindow","rel","_setStyles","count","totalCount","nestedCount","nestedItems","pageNumberToDestHash","linkElement","pageNumberNesting","nesting","currentNesting","DELAY_BEFORE_RESETTING_SWITCH_IN_PROGRESS","DELAY_BEFORE_HIDING_CONTROLS","ACTIVE_SELECTOR","CONTROLS_SELECTOR","MOUSE_SCROLL_COOLDOWN_TIME","PAGE_SWITCH_THRESHOLD","SWIPE_MIN_DISTANCE_THRESHOLD","SWIPE_ANGLE_THRESHOLD","request","Element","_mouseWheel","normalizeWheelEventDelta","currentTime","Date","storedTime","totalDelta","success","_notifyStateChange","_setSwitchInProgress","_resetSwitchInProgress","_enter","_exit","_mouseDown","isInternalLink","_contextMenu","_showControls","_hideControls","_resetMouseScrollState","_touchSwipe","startX","startY","endX","endY","absAngle","_addWindowListeners","_removeWindowListeners","_fullscreenChange","_addFullscreenChangeListeners","_removeFullscreenChangeListeners","error","docProperties","objects","calculationOrder","appInfo","language","docInfo","actions","isInPresentationMode","ids","visitedPages","actionsPromise","_createScripting","UI_NOTIFICATION_CLASS","switchView","forceOpen","_switchView","isViewChanged","shouldForceRendering","_forceRendering","_updateThumbnailViewer","pagesCount","_showUINotification","_hideUINotification","onTreeLoaded","button","SIDEBAR_WIDTH_VAR","SIDEBAR_MIN_WIDTH","SIDEBAR_RESIZING_CLASS","_updateWidth","maxWidth","_mouseMove","_mouseUp","updated","THUMBNAIL_SCROLL_MARGIN","THUMBNAIL_SELECTED_CLASS","watchScroll","_scrollUpdated","getThumbnail","_getVisibleThumbs","scrollThumbnailIntoView","prevThumbnailView","visibleThumbs","numVisibleThumbs","shouldScroll","cleanup","TempImageFactory","_resetView","firstPdfPage","viewport","scale","checkSetImageDisabled","pageNum","thumbnail","defaultViewport","firstThumbnailView","_cancelRendering","setPageLabels","_ensurePdfPageLoaded","thumbView","DRAW_UPSCALE_FACTOR","MAX_NUM_SCALING_STEPS","THUMBNAIL_CANVAS_BORDER_WIDTH","THUMBNAIL_WIDTH","tempCanvasCache","getCanvas","tempCanvas","alpha","destroyCanvas","pageWidth","pageHeight","pageRatio","anchor","ring","borderAdjustment","setPdfPage","totalRotation","update","cancelRendering","_getPageDrawContext","upscaleFactor","canvas","outputScale","getOutputScale","transform","_convertCanvasToImage","reducedCanvas","image","draw","finishRenderTask","renderTask","drawViewport","renderContinueCallback","cont","renderContext","canvasContext","resultPromise","pageCached","setImage","_reduceImage","img","reducedWidth","reducedHeight","reducedImageCtx","setPageLabel","_scrollIntoView","pageSpot","pageDiv","_getVisiblePages","_updateHelper","currentId","stillFullyVisible","visiblePages","DEFAULT_CACHE_SIZE","pageIdsToKeep","iMax","pagesToKeep","moveToEndOfArray","viewerVersion","getPageView","_setCurrentPageNumber","resetCurrentPageView","pageLabel","_onePageRenderedOrForceFetch","isPureXfa","textLayerFactory","xfaLayerFactory","annotationLayerFactory","structTreeLayerFactory","firstPageView","getPagesLeft","_scrollUpdate","_setScaleUpdatePages","noScroll","preset","newValue","isSameScale","presetValue","_setScale","noPadding","hPadding","vPadding","pageWidthScale","pageHeightScale","horizontalScale","_resetCurrentPageView","pageLabelToPageNumber","scrollPageIntoView","widthScale","heightScale","boundingRect","_updateLocation","normalizedScaleValue","firstPage","pdfOpenParams","currentPageView","topLeft","intLeft","intTop","numVisiblePages","newCacheSize","containsElement","focus","_getCurrentVisiblePage","currentlyVisiblePages","scrollAhead","createTextLayerBuilder","enhanceTextSelection","textLayerDiv","createAnnotationLayerBuilder","hasJSActionsPromise","mouseState","createXfaLayerBuilder","createStructTreeLayerBuilder","getPagesOverview","_updateScrollMode","_updateSpreadMode","pages","parity","spread","_getPageAdvance","yArray","expectedId","firstId","lastId","nextPage","advance","intent","hasJSActions","annotations","dontFlip","AnnotationLayer","cancel","DEFAULT_L10N_STRINGS","of_pages","page_of_pages","document_properties_kb","document_properties_mb","document_properties_date_string","document_properties_page_size_unit_inches","document_properties_page_size_unit_millimeters","document_properties_page_size_orientation_portrait","document_properties_page_size_orientation_landscape","document_properties_page_size_name_a3","document_properties_page_size_name_a4","document_properties_page_size_name_letter","document_properties_page_size_name_legal","document_properties_page_size_dimension_string","document_properties_page_size_dimension_name_string","document_properties_linearized_yes","document_properties_linearized_no","print_progress_percent","additional_layers","page_landmark","thumb_page_title","thumb_page_canvas","find_reached_top","find_reached_bottom","find_not_found","error_version_info","error_message","error_stack","error_file","error_line","rendering_error","page_scale_width","page_scale_fit","page_scale_auto","page_scale_actual","page_scale_percent","loading_error","invalid_file_error","missing_file_error","unexpected_response_error","printing_not_supported","printing_not_ready","web_fonts_disabled","PARTIAL_LANG_CODES","en","es","fy","ga","gu","hi","hy","nb","ne","nn","pa","pt","sv","zh","langCode","NullL10n","getL10nFallback","formatL10nValue","MAX_CANVAS_PIXELS","destroy","_resetZoomLayer","removeFromDOM","zoomLayerCanvas","keepZoomLayer","keepAnnotationLayer","keepXfaLayer","childNodes","zoomLayerNode","annotationLayerNode","xfaLayerNode","redrawAnnotationLayer","redrawXfaLayer","cssTransform","isScalingRestricted","relativeRotation","absRotation","scaleX","scaleY","textLayerViewport","textRelativeRotation","textAbsRotation","transX","transY","getPagePoint","canvasWrapper","textLayer","finishPaintTask","paintTask","readableStream","includeMarkedContent","tree","treeDom","paintOnCanvas","renderCapability","onRenderContinue","isCanvasHidden","showCanvas","actualSizeViewport","pixelsInViewport","maxScale","sfx","approximateFraction","sfy","roundToDivide","paintOnSvg","cancelled","ensureNotCancelled","opList","svgGfx","svg","wrapper","PDF_ROLE_TO_HTML_ROLE","Document","DocumentFragment","Part","Sect","Div","Aside","NonStruct","P","H","Title","FENote","Sub","Lbl","Span","Em","Strong","Link","Annot","Form","Ruby","RB","RT","RP","Warichu","WT","WP","L","LI","LBody","Table","TR","TH","TD","THead","TBody","TFoot","Caption","Figure","Formula","Artifact","HEADING_PATTERN","_setAttributes","structElement","htmlElement","_walk","role","EXPAND_DIVS_TIMEOUT","endOfContent","numTextDivs","textLayerFrag","textContentStream","textDivs","textContentItemsStr","setTextContentStream","setTextContent","_convertMatches","iIndex","end","m","mm","begin","divIdx","_renderMatches","isSelectedPage","selectedMatchIdx","prevEnd","infinity","appendTextToDiv","span","className","i0","i1","isSelected","highlightSuffix","beginText","n0","n1","_updateMatches","clearedUntilDivIdx","n","pageMatches","pageMatchesLength","_bindMouse","expandDivsTimer","adjustTop","divBounds","xfa","XfaLayer","xfaHtml","eventName","eventDetails","lastPage","pageRotateCw","pageRotateCcw","setPageNumber","setPagesCount","_bindClickListeners","details","_bindCursorToolsListener","buttons","_bindScrollModeListener","isScrollModeHorizontal","scrollModeChanged","_bindSpreadModeListener","spreadModeChanged","_setMaxHeight","_ensurePageViewVisible","previousPageView","viewerNodes","scrolledDown","PAGE_NUMBER_LOADING_INDICATOR","SCALE_SELECT_CONTAINER_WIDTH","SCALE_SELECT_WIDTH","scaleSelectContainer","scaleSelect","customScaleOption","setPageScale","_bindListeners","self","resetNumPages","pageScale","predefinedValueFound","option","updateLoadingIndicatorState","pageNumberInput","predefinedValuesPromise","overflow","DEFAULT_VIEW_HISTORY_CACHE_SIZE","cacheSize","databaseStr","database","branch","localStorage","properties","GenericCom","prefs","prefValue","defaultValue","defaultType","downloadUrl","createValidAbsoluteUrl","downloadData","blobUrl","createObjectURL","openOrDownloadData","isPdfData","isPdfFile","contentType","viewerUrl","encodeURIComponent","webL10n","fixupLangCode","gL10nData","gTextData","gTextProp","gLanguage","gMacros","gReadyState","gAsyncResourceLoading","script","l10nId","l10nArgs","onSuccess","onFailure","xhr","text","dictionary","reBlank","reComment","reSection","reImport","reSplit","entries","rawText","currentLang","genericLang","lang","skipLang","parsedRawLinesCallback","loadImport","tmp","evalString","nextEntry","xhrLoadText","parseRawLines","parsedPropertiesCallback","parseProperties","prop","successCallback","clear","langLinks","getL10nResourceLinks","langCount","dict","getL10nDictionary","defaultLocale","anyCaseLang","onResourceLoaded","gResourceCount","link","parseResource","resource","locales2rules","list","start","pluralRules","isBetween","getPluralRules","rv","substIndexes","substArguments","reIndex","reMatch","macroName","paramName","macro","reArgs","getL10nAttributes","getL10nData","getChildElementCount","children","l","textNode","getTranslatableChildren","elementCount","translateElement","get","getData","getText","getLanguage","setLanguage","loadLocale","getDirection","rtlList","shortCode","translate","getReadyState","ready","sandbox","activeService","scratchCanvas","PRINT_UNITS","includeAnnotationStorage","PDFPrintService","layout","body","hasEqualPageSizes","ensureOverlay","renderPages","getXfaHtmlForPrinting","renderNextPage","renderProgress","renderPage","useRenderedPage","performPrint","print","throwIfInactive","activeServiceOnEntry","abort","progressContainer","progressBar","progressPerc","stopPropagationIfNeeded","overlayPromise","factory","builder","getXfaPageViewport","pdfjsVersion","pdfjsBuild","require","mainContainer","viewerContainer","viewFind","openFile","presentationModeButton","viewBookmark","toggleButton","toolbarButtonContainer","openFileButton","printButton","downloadButton","viewBookmarkButton","firstPageButton","lastPageButton","pageRotateCwButton","pageRotateCcwButton","cursorSelectToolButton","cursorHandToolButton","scrollVerticalButton","scrollHorizontalButton","scrollWrappedButton","spreadNoneButton","spreadOddButton","spreadEvenButton","documentPropertiesButton","sidebar","outerContainer","thumbnailButton","outlineButton","attachmentsButton","layersButton","outlineView","attachmentsView","layersView","outlineOptionsContainer","currentOutlineItemButton","sidebarResizer","resizer","findBar","findField","highlightAllCheckbox","caseSensitiveCheckbox","entireWordCheckbox","findResultsCount","findPreviousButton","findNextButton","passwordOverlay","overlayName","submitButton","cancelButton","documentProperties","fields","debuggerScriptPath","config","getViewerConfiguration","webViewerLoad"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;AAiBA,IAAMA,aAAa;AACjBC,UADiB;AAEjBC,OAFiB;AAGjBC,UAHiB;AAIjBC,cAJiB;AAAA,CAAnB;;AAWA,IAAMC,iBAAiB;AACrBC,oBAAkB;AAEhBC,WAFgB;AAGhBC,UAAMR,oBAAoBA,WAHV;AAAA,GADG;AAMrBS,cAAY;AAEVF,WAFU;AAGVC,UAAMR,WAHI;AAAA,GANS;AAWrBU,oBAAkB;AAEhBH,WAFgB;AAGhBC,UAAMR,oBAAoBA,WAHV;AAAA,GAXG;AAgBrBW,kBAAgB;AAEd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BAbJ,eAaIA,CAbJ;AAcNkpB,oBAAYlpB,wBAdN,iBAcMA;AAdN;AAJU,KA/Ff;AAoHLwI,gBApHK,EAoHLA,YApHK;AAqHL+F,oBAAgBvO,wBArHX,gBAqHWA,CArHX;AAsHL0R,uBAtHK;AAuHLgxC,wBAvHK;AAAA,GAAP;AA3EF;;AAsMA,yBAAyB;AACvB,MAAMC,SAASC,sBADQ,EACvB;AAiBI,MAAM7zC,QAAQ/O,qBAlBK,aAkBLA,CAAd;AACA+O,uDAAqD;AACnDhM,YApBiB;AAmBkC,GAArDgM;;AAGA,MAAI;AAIFyM,kCAJE,KAIFA;AAJF,IAKE,WAAW;AAGXxY,6CAHW,EAGXA;AACAhD,2BAJW,KAIXA;AA/BiB;;AAmCrBF,gCAnCqB,MAmCrBA;AAzOJ;;AA+OA,IAAIE,SAAJ,oBAAiC;AAC/BA,8BAD+B,IAC/BA;AAhPF;;AAmPA,IACEA,yCACAA,wBAFF,YAGE;AACA6iD,eADA;AAHF,OAKO;AACL7iD,+DADK,IACLA;AAzPF,C","file":"viewer.js","sourcesContent":["/* Copyright 2018 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\nimport { viewerCompatibilityParams } from \"./viewer_compatibility.js\";\n\nconst OptionKind = {\n VIEWER: 0x02,\n API: 0x04,\n WORKER: 0x08,\n PREFERENCE: 0x80,\n};\n\n/**\n * PLEASE NOTE: To avoid introducing unnecessary dependencies, we specify the\n * values below *explicitly* rather than relying on imported types.\n */\nconst defaultOptions = {\n cursorToolOnLoad: {\n /** @type {number} */\n value: 0,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n defaultUrl: {\n /** @type {string} */\n value: \"compressed.tracemonkey-pldi-09.pdf\",\n kind: OptionKind.VIEWER,\n },\n defaultZoomValue: {\n /** @type {string} */\n value: \"\",\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n disableHistory: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.VIEWER,\n },\n disablePageLabels: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n enablePermissions: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n enablePrintAutoRotate: {\n /** @type {boolean} */\n value: true,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n enableScripting: {\n /** @type {boolean} */\n value: true,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n externalLinkRel: {\n /** @type {string} */\n value: \"noopener noreferrer nofollow\",\n kind: OptionKind.VIEWER,\n },\n externalLinkTarget: {\n /** @type {number} */\n value: 0,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n historyUpdateUrl: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n ignoreDestinationZoom: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n imageResourcesPath: {\n /** @type {string} */\n value: \"./images/\",\n kind: OptionKind.VIEWER,\n },\n maxCanvasPixels: {\n /** @type {number} */\n value: 16777216,\n compatibility: viewerCompatibilityParams.maxCanvasPixels,\n kind: OptionKind.VIEWER,\n },\n pdfBugEnabled: {\n /** @type {boolean} */\n value: typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"PRODUCTION\"),\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n printResolution: {\n /** @type {number} */\n value: 150,\n kind: OptionKind.VIEWER,\n },\n renderer: {\n /** @type {string} */\n value: \"canvas\",\n kind: OptionKind.VIEWER,\n },\n renderInteractiveForms: {\n /** @type {boolean} */\n value: true,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n sidebarViewOnLoad: {\n /** @type {number} */\n value: -1,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n scrollModeOnLoad: {\n /** @type {number} */\n value: -1,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n spreadModeOnLoad: {\n /** @type {number} */\n value: -1,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n textLayerMode: {\n /** @type {number} */\n value: 1,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n useOnlyCssZoom: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n viewerCssTheme: {\n /** @type {number} */\n value: 0,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n viewOnLoad: {\n /** @type {boolean} */\n value: 0,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n },\n\n cMapPacked: {\n /** @type {boolean} */\n value: true,\n kind: OptionKind.API,\n },\n cMapUrl: {\n /** @type {string} */\n value:\n typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"PRODUCTION\")\n ? \"../external/bcmaps/\"\n : \"../web/cmaps/\",\n kind: OptionKind.API,\n },\n disableAutoFetch: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.API + OptionKind.PREFERENCE,\n },\n disableFontFace: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.API + OptionKind.PREFERENCE,\n },\n disableRange: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.API + OptionKind.PREFERENCE,\n },\n disableStream: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.API + OptionKind.PREFERENCE,\n },\n docBaseUrl: {\n /** @type {string} */\n value: \"\",\n kind: OptionKind.API,\n },\n enableXfa: {\n /** @type {boolean} */\n value: typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"PRODUCTION\"),\n kind: OptionKind.API + OptionKind.PREFERENCE,\n },\n fontExtraProperties: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.API,\n },\n isEvalSupported: {\n /** @type {boolean} */\n value: true,\n kind: OptionKind.API,\n },\n maxImageSize: {\n /** @type {number} */\n value: -1,\n kind: OptionKind.API,\n },\n pdfBug: {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.API,\n },\n standardFontDataUrl: {\n /** @type {string} */\n value:\n typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"PRODUCTION\")\n ? \"../external/standard_fonts/\"\n : \"../web/standard_fonts/\",\n kind: OptionKind.API,\n },\n verbosity: {\n /** @type {number} */\n value: 1,\n kind: OptionKind.API,\n },\n\n workerPort: {\n /** @type {Object} */\n value: null,\n kind: OptionKind.WORKER,\n },\n workerSrc: {\n /** @type {string} */\n value:\n typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"PRODUCTION\")\n ? \"../src/worker_loader.js\"\n : \"../build/pdf.worker.js\",\n kind: OptionKind.WORKER,\n },\n};\nif (\n typeof PDFJSDev === \"undefined\" ||\n PDFJSDev.test(\"!PRODUCTION || GENERIC\")\n) {\n defaultOptions.disablePreferences = {\n /** @type {boolean} */\n value: typeof PDFJSDev !== \"undefined\" && PDFJSDev.test(\"TESTING\"),\n kind: OptionKind.VIEWER,\n };\n defaultOptions.locale = {\n /** @type {string} */\n value: typeof navigator !== \"undefined\" ? navigator.language : \"en-US\",\n kind: OptionKind.VIEWER,\n };\n defaultOptions.sandboxBundleSrc = {\n /** @type {string} */\n value:\n typeof PDFJSDev === \"undefined\" || !PDFJSDev.test(\"PRODUCTION\")\n ? \"../build/dev-sandbox/pdf.sandbox.js\"\n : \"../build/pdf.sandbox.js\",\n kind: OptionKind.VIEWER,\n };\n\n defaultOptions.renderer.kind += OptionKind.PREFERENCE;\n} else if (PDFJSDev.test(\"CHROME\")) {\n defaultOptions.disableTelemetry = {\n /** @type {boolean} */\n value: false,\n kind: OptionKind.VIEWER + OptionKind.PREFERENCE,\n };\n defaultOptions.sandboxBundleSrc = {\n /** @type {string} */\n value: \"../build/pdf.sandbox.js\",\n kind: OptionKind.VIEWER,\n };\n}\n\nconst userOptions = Object.create(null);\n\nclass AppOptions {\n constructor() {\n throw new Error(\"Cannot initialize AppOptions.\");\n }\n\n static get(name) {\n const userOption = userOptions[name];\n if (userOption !== undefined) {\n return userOption;\n }\n const defaultOption = defaultOptions[name];\n if (defaultOption !== undefined) {\n return defaultOption.compatibility ?? defaultOption.value;\n }\n return undefined;\n }\n\n static getAll(kind = null) {\n const options = Object.create(null);\n for (const name in defaultOptions) {\n const defaultOption = defaultOptions[name];\n if (kind) {\n if ((kind & defaultOption.kind) === 0) {\n continue;\n }\n if (kind === OptionKind.PREFERENCE) {\n const value = defaultOption.value,\n valueType = typeof value;\n\n if (\n valueType === \"boolean\" ||\n valueType === \"string\" ||\n (valueType === \"number\" && Number.isInteger(value))\n ) {\n options[name] = value;\n continue;\n }\n throw new Error(`Invalid type for preference: ${name}`);\n }\n }\n const userOption = userOptions[name];\n options[name] =\n userOption !== undefined\n ? userOption\n : defaultOption.compatibility ?? defaultOption.value;\n }\n return options;\n }\n\n static set(name, value) {\n userOptions[name] = value;\n }\n\n static setAll(options) {\n for (const name in options) {\n userOptions[name] = options[name];\n }\n }\n\n static remove(name) {\n delete userOptions[name];\n }\n}\n\nexport { AppOptions, OptionKind };\n","/* Copyright 2018 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\nconst compatibilityParams = Object.create(null);\nif (typeof PDFJSDev === \"undefined\" || PDFJSDev.test(\"GENERIC\")) {\n const userAgent =\n (typeof navigator !== \"undefined\" && navigator.userAgent) || \"\";\n const platform =\n (typeof navigator !== \"undefined\" && navigator.platform) || \"\";\n const maxTouchPoints =\n (typeof navigator !== \"undefined\" && navigator.maxTouchPoints) || 1;\n\n const isAndroid = /Android/.test(userAgent);\n const isIOS =\n /\\b(iPad|iPhone|iPod)(?=;)/.test(userAgent) ||\n (platform === \"MacIntel\" && maxTouchPoints > 1);\n const isIOSChrome = /CriOS/.test(userAgent);\n\n // Checks if possible to use URL.createObjectURL()\n // Support: IE, Chrome on iOS\n (function checkOnBlobSupport() {\n // Sometimes Chrome on iOS loses data created with createObjectURL(),\n // see issue #8081.\n if (isIOSChrome) {\n compatibilityParams.disableCreateObjectURL = true;\n }\n })();\n\n // Limit canvas size to 5 mega-pixels on mobile.\n // Support: Android, iOS\n (function checkCanvasSizeLimitation() {\n if (isIOS || isAndroid) {\n compatibilityParams.maxCanvasPixels = 5242880;\n }\n })();\n}\nconst viewerCompatibilityParams = Object.freeze(compatibilityParams);\n\nexport { viewerCompatibilityParams };\n","/* Copyright 2012 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/* globals PDFBug, Stats */\n\nimport {\n animationStarted,\n apiPageLayoutToSpreadMode,\n apiPageModeToSidebarView,\n AutoPrintRegExp,\n DEFAULT_SCALE_VALUE,\n EventBus,\n getActiveOrFocusedElement,\n isValidRotation,\n isValidScrollMode,\n isValidSpreadMode,\n MAX_SCALE,\n MIN_SCALE,\n noContextMenuHandler,\n normalizeWheelEventDirection,\n parseQueryString,\n ProgressBar,\n RendererType,\n ScrollMode,\n SidebarView,\n SpreadMode,\n TextLayerMode,\n} from \"./ui_utils.js\";\nimport { AppOptions, OptionKind } from \"./app_options.js\";\nimport {\n build,\n createPromiseCapability,\n getDocument,\n getFilenameFromUrl,\n getPdfFilenameFromUrl,\n GlobalWorkerOptions,\n InvalidPDFException,\n isPdfFile,\n LinkTarget,\n loadScript,\n MissingPDFException,\n OPS,\n PDFWorker,\n PermissionFlag,\n shadow,\n UnexpectedResponseException,\n UNSUPPORTED_FEATURES,\n version,\n} from \"pdfjs-lib\";\nimport { CursorTool, PDFCursorTools } from \"./pdf_cursor_tools.js\";\nimport { PDFRenderingQueue, RenderingStates } from \"./pdf_rendering_queue.js\";\nimport { OverlayManager } from \"./overlay_manager.js\";\nimport { PasswordPrompt } from \"./password_prompt.js\";\nimport { PDFAttachmentViewer } from \"./pdf_attachment_viewer.js\";\nimport { PDFDocumentProperties } from \"./pdf_document_properties.js\";\nimport { PDFFindBar } from \"./pdf_find_bar.js\";\nimport { PDFFindController } from \"./pdf_find_controller.js\";\nimport { PDFHistory } from \"./pdf_history.js\";\nimport { PDFLayerViewer } from \"./pdf_layer_viewer.js\";\nimport { PDFLinkService } from \"./pdf_link_service.js\";\nimport { PDFOutlineViewer } from \"./pdf_outline_viewer.js\";\nimport { PDFPresentationMode } from \"./pdf_presentation_mode.js\";\nimport { PDFScriptingManager } from \"./pdf_scripting_manager.js\";\nimport { PDFSidebar } from \"./pdf_sidebar.js\";\nimport { PDFSidebarResizer } from \"./pdf_sidebar_resizer.js\";\nimport { PDFThumbnailViewer } from \"./pdf_thumbnail_viewer.js\";\nimport { PDFViewer } from \"./pdf_viewer.js\";\nimport { SecondaryToolbar } from \"./secondary_toolbar.js\";\nimport { Toolbar } from \"./toolbar.js\";\nimport { viewerCompatibilityParams } from \"./viewer_compatibility.js\";\nimport { ViewHistory } from \"./view_history.js\";\n\nconst DEFAULT_SCALE_DELTA = 1.1;\nconst DISABLE_AUTO_FETCH_LOADING_BAR_TIMEOUT = 5000; // ms\nconst FORCE_PAGES_LOADED_TIMEOUT = 10000; // ms\nconst WHEEL_ZOOM_DISABLED_TIMEOUT = 1000; // ms\nconst ENABLE_PERMISSIONS_CLASS = \"enablePermissions\";\n\nconst ViewOnLoad = {\n UNKNOWN: -1,\n PREVIOUS: 0, // Default value.\n INITIAL: 1,\n};\n\nconst ViewerCssTheme = {\n AUTOMATIC: 0, // Default value.\n LIGHT: 1,\n DARK: 2,\n};\n\n// Keep these in sync with mozilla-central's Histograms.json.\nconst KNOWN_VERSIONS = [\n \"1.0\",\n \"1.1\",\n \"1.2\",\n \"1.3\",\n \"1.4\",\n \"1.5\",\n \"1.6\",\n \"1.7\",\n \"1.8\",\n \"1.9\",\n \"2.0\",\n \"2.1\",\n \"2.2\",\n \"2.3\",\n];\n// Keep these in sync with mozilla-central's Histograms.json.\nconst KNOWN_GENERATORS = [\n \"acrobat distiller\",\n \"acrobat pdfwriter\",\n \"adobe livecycle\",\n \"adobe pdf library\",\n \"adobe photoshop\",\n \"ghostscript\",\n \"tcpdf\",\n \"cairo\",\n \"dvipdfm\",\n \"dvips\",\n \"pdftex\",\n \"pdfkit\",\n \"itext\",\n \"prince\",\n \"quarkxpress\",\n \"mac os x\",\n \"microsoft\",\n \"openoffice\",\n \"oracle\",\n \"luradocument\",\n \"pdf-xchange\",\n \"antenna house\",\n \"aspose.cells\",\n \"fpdf\",\n];\n\nclass DefaultExternalServices {\n constructor() {\n throw new Error(\"Cannot initialize DefaultExternalServices.\");\n }\n\n static updateFindControlState(data) {}\n\n static updateFindMatchesCount(data) {}\n\n static initPassiveLoading(callbacks) {}\n\n static async fallback(data) {}\n\n static reportTelemetry(data) {}\n\n static createDownloadManager(options) {\n throw new Error(\"Not implemented: createDownloadManager\");\n }\n\n static createPreferences() {\n throw new Error(\"Not implemented: createPreferences\");\n }\n\n static createL10n(options) {\n throw new Error(\"Not implemented: createL10n\");\n }\n\n static createScripting(options) {\n throw new Error(\"Not implemented: createScripting\");\n }\n\n static get supportsIntegratedFind() {\n return shadow(this, \"supportsIntegratedFind\", false);\n }\n\n static get supportsDocumentFonts() {\n return shadow(this, \"supportsDocumentFonts\", true);\n }\n\n static get supportedMouseWheelZoomModifierKeys() {\n return shadow(this, \"supportedMouseWheelZoomModifierKeys\", {\n ctrlKey: true,\n metaKey: true,\n });\n }\n\n static get isInAutomation() {\n return shadow(this, \"isInAutomation\", false);\n }\n}\n\nconst PDFViewerApplication = {\n initialBookmark: document.location.hash.substring(1),\n _initializedCapability: createPromiseCapability(),\n _fellback: false,\n appConfig: null,\n pdfDocument: null,\n pdfLoadingTask: null,\n printService: null,\n /** @type {PDFViewer} */\n pdfViewer: null,\n /** @type {PDFThumbnailViewer} */\n pdfThumbnailViewer: null,\n /** @type {PDFRenderingQueue} */\n pdfRenderingQueue: null,\n /** @type {PDFPresentationMode} */\n pdfPresentationMode: null,\n /** @type {PDFDocumentProperties} */\n pdfDocumentProperties: null,\n /** @type {PDFLinkService} */\n pdfLinkService: null,\n /** @type {PDFHistory} */\n pdfHistory: null,\n /** @type {PDFSidebar} */\n pdfSidebar: null,\n /** @type {PDFSidebarResizer} */\n pdfSidebarResizer: null,\n /** @type {PDFOutlineViewer} */\n pdfOutlineViewer: null,\n /** @type {PDFAttachmentViewer} */\n pdfAttachmentViewer: null,\n /** @type {PDFLayerViewer} */\n pdfLayerViewer: null,\n /** @type {PDFCursorTools} */\n pdfCursorTools: null,\n /** @type {PDFScriptingManager} */\n pdfScriptingManager: null,\n /** @type {ViewHistory} */\n store: null,\n /** @type {DownloadManager} */\n downloadManager: null,\n /** @type {OverlayManager} */\n overlayManager: null,\n /** @type {Preferences} */\n preferences: null,\n /** @type {Toolbar} */\n toolbar: null,\n /** @type {SecondaryToolbar} */\n secondaryToolbar: null,\n /** @type {EventBus} */\n eventBus: null,\n /** @type {IL10n} */\n l10n: null,\n isInitialViewSet: false,\n downloadComplete: false,\n isViewerEmbedded: window.parent !== window,\n url: \"\",\n baseUrl: \"\",\n externalServices: DefaultExternalServices,\n _boundEvents: Object.create(null),\n documentInfo: null,\n metadata: null,\n _contentDispositionFilename: null,\n _contentLength: null,\n _saveInProgress: false,\n _wheelUnusedTicks: 0,\n _idleCallbacks: new Set(),\n\n // Called once when the document is loaded.\n async initialize(appConfig) {\n this.preferences = this.externalServices.createPreferences();\n this.appConfig = appConfig;\n\n await this._readPreferences();\n await this._parseHashParameters();\n this._forceCssTheme();\n await this._initializeL10n();\n\n if (\n this.isViewerEmbedded &&\n AppOptions.get(\"externalLinkTarget\") === LinkTarget.NONE\n ) {\n // Prevent external links from \"replacing\" the viewer,\n // when it's embedded in e.g. an