UNPKG

pdfjs-dist

Version:

Generic build of Mozilla's PDF.js library.

22 lines 1.2 MB
/** * @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(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf.worker",[],r):"object"==typeof exports?exports["pdfjs-dist/build/pdf.worker"]=r():t["pdfjs-dist/build/pdf.worker"]=t.pdfjsWorker=r()}(this,(function(){return(()=>{var t=[,(t,r,o)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.WorkerTask=r.WorkerMessageHandler=void 0;var l=function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}(o(2)),c=o(4),u=o(125),h=o(126),d=o(168),m=o(6),g=o(189),y=o(190),v=o(128);function _toArray(t){return _arrayWithHoles(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||_unsupportedIterableToArray(t)||_nonIterableRest()}function _slicedToArray(t,r){return _arrayWithHoles(t)||function _iterableToArrayLimit(t,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var o=[],l=!0,c=!1,u=void 0;try{for(var h,d=t[Symbol.iterator]();!(l=(h=d.next()).done);l=!0){o.push(h.value);if(r&&o.length===r)break}}catch(t){c=!0;u=t}finally{try{l||null==d.return||d.return()}finally{if(c)throw u}}return o}(t,r)||_unsupportedIterableToArray(t,r)||_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(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var o=Object.prototype.toString.call(t).slice(8,-1);"Object"===o&&t.constructor&&(o=t.constructor.name);return"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var o=0,l=new Array(r);o<r;o++)l[o]=t[o];return l}function _arrayWithHoles(t){if(Array.isArray(t))return t}function asyncGeneratorStep(t,r,o,l,c,u,h){try{var d=t[u](h),m=d.value}catch(t){o(t);return}d.done?r(m):Promise.resolve(m).then(l,c)}function _asyncToGenerator(t){return function(){var r=this,o=arguments;return new Promise((function(l,c){var u=t.apply(r,o);function _next(t){asyncGeneratorStep(u,l,c,_next,_throw,"next",t)}function _throw(t){asyncGeneratorStep(u,l,c,_next,_throw,"throw",t)}_next(void 0)}))}}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,r){for(var o=0;o<r.length;o++){var l=r[o];l.enumerable=l.enumerable||!1;l.configurable=!0;"value"in l&&(l.writable=!0);Object.defineProperty(t,l.key,l)}}function _createClass(t,r,o){r&&_defineProperties(t.prototype,r);o&&_defineProperties(t,o);return t}var S=function(){function WorkerTask(t){_classCallCheck(this,WorkerTask);this.name=t;this.terminated=!1;this._capability=(0,c.createPromiseCapability)()}_createClass(WorkerTask,[{key:"finished",get:function get(){return this._capability.promise}},{key:"finish",value:function finish(){this._capability.resolve()}},{key:"terminate",value:function terminate(){this.terminated=!0}},{key:"ensureNotTerminated",value:function ensureNotTerminated(){if(this.terminated)throw new Error("Worker task was terminated")}}]);return WorkerTask}();r.WorkerTask=S;var k=function(){function WorkerMessageHandler(){_classCallCheck(this,WorkerMessageHandler)}_createClass(WorkerMessageHandler,null,[{key:"setup",value:function setup(t,r){var o=!1;t.on("test",(function wphSetupTest(r){if(!o){o=!0;if(r instanceof Uint8Array){var l=255===r[0];t.postMessageTransfers=l;t.send("test",{supportTransfers:l})}else t.send("test",null)}}));t.on("configure",(function wphConfigure(t){(0,c.setVerbosityLevel)(t.verbosity)}));t.on("GetDocRequest",(function wphSetupDoc(t){return WorkerMessageHandler.createDocumentHandler(t,r)}))}},{key:"createDocumentHandler",value:function createDocumentHandler(t,r){var o,m=!1,k=null,C=[],w=(0,c.getVerbosityLevel)(),_=t.apiVersion,O="2.8.335";if(_!==O)throw new Error('The API version "'.concat(_,'" does not match ')+'the Worker version "'.concat(O,'".'));var x=[];for(var T in[])x.push(T);if(x.length)throw new Error("The `Array.prototype` contains unexpected enumerable properties: "+x.join(", ")+"; thus breaking e.g. `for...in` iteration of `Array`s.");var R=t.docId,E=t.docBaseUrl,D=t.docId+"_worker",j=new g.MessageHandler(D,R,r);j.postMessageTransfers=t.postMessageTransfers;function ensureNotTerminated(){if(m)throw new Error("Worker was terminated")}function startWorkerTask(t){C.push(t)}function finishWorkerTask(t){t.finish();var r=C.indexOf(t);C.splice(r,1)}function loadDocument(t){return _loadDocument.apply(this,arguments)}function _loadDocument(){return(_loadDocument=_asyncToGenerator(l.default.mark((function _callee(t){var r,c,u,h,d;return l.default.wrap((function _callee$(l){for(;;)switch(l.prev=l.next){case 0:l.next=2;return o.ensureDoc("checkHeader");case 2:l.next=4;return o.ensureDoc("parseStartXRef");case 4:l.next=6;return o.ensureDoc("parse",[t]);case 6:if(t){l.next=9;break}l.next=9;return o.ensureDoc("checkFirstPage");case 9:l.next=11;return Promise.all([o.ensureDoc("numPages"),o.ensureDoc("fingerprint"),o.ensureDoc("isPureXfa")]);case 11:r=l.sent;c=_slicedToArray(r,3);u=c[0];h=c[1];d=c[2];return l.abrupt("return",{numPages:u,fingerprint:h,isPureXfa:d});case 17:case"end":return l.stop()}}),_callee)})))).apply(this,arguments)}function getPdfManager(t,r,o){var l,u=(0,c.createPromiseCapability)(),d=t.source;if(d.data){try{l=new h.LocalPdfManager(R,d.data,d.password,r,o,E);u.resolve(l)}catch(t){u.reject(t)}return u.promise}var m,g=[];try{m=new y.PDFWorkerStream(j)}catch(t){u.reject(t);return u.promise}var v=m.getFullReader();v.headersReady.then((function(){if(v.isRangeSupported){var t=d.disableAutoFetch||v.isStreamingSupported;l=new h.NetworkPdfManager(R,m,{msgHandler:j,password:d.password,length:v.contentLength,disableAutoFetch:t,rangeChunkSize:d.rangeChunkSize},r,o,E);for(var c=0;c<g.length;c++)l.sendProgressiveData(g[c]);g=[];u.resolve(l);k=null}})).catch((function(t){u.reject(t);k=null}));var S=0;new Promise((function(t,m){v.read().then((function readChunk(t){var y=t.value,C=t.done;try{ensureNotTerminated();if(C){l||function flushChunks(){var t=(0,c.arraysToBytes)(g);d.length&&t.length!==d.length&&(0,c.warn)("reported HTTP length is different from actual");try{l=new h.LocalPdfManager(R,t,d.password,r,o,E);u.resolve(l)}catch(t){u.reject(t)}g=[]}();k=null;return}S+=(0,c.arrayByteLength)(y);v.isStreamingSupported||j.send("DocProgress",{loaded:S,total:Math.max(S,v.contentLength||0)});l?l.sendProgressiveData(y):g.push(y);v.read().then(readChunk,m)}catch(t){m(t)}}),m)})).catch((function(t){u.reject(t);k=null}));k=function cancelXHRs(t){m.cancelAllRequests(t)};return u.promise}j.on("GetPage",(function wphSetupGetPage(t){return o.getPage(t.pageIndex).then((function(t){return Promise.all([o.ensure(t,"rotate"),o.ensure(t,"ref"),o.ensure(t,"userUnit"),o.ensure(t,"view")]).then((function(t){var r=_slicedToArray(t,4);return{rotate:r[0],ref:r[1],userUnit:r[2],view:r[3]}}))}))}));j.on("GetPageIndex",(function wphSetupGetPageIndex(t){var r=t.ref,l=u.Ref.get(r.num,r.gen);return o.ensureCatalog("getPageIndex",[l])}));j.on("GetDestinations",(function wphSetupGetDestinations(t){return o.ensureCatalog("destinations")}));j.on("GetDestination",(function wphSetupGetDestination(t){return o.ensureCatalog("getDestination",[t.id])}));j.on("GetPageLabels",(function wphSetupGetPageLabels(t){return o.ensureCatalog("pageLabels")}));j.on("GetPageLayout",(function wphSetupGetPageLayout(t){return o.ensureCatalog("pageLayout")}));j.on("GetPageMode",(function wphSetupGetPageMode(t){return o.ensureCatalog("pageMode")}));j.on("GetViewerPreferences",(function(t){return o.ensureCatalog("viewerPreferences")}));j.on("GetOpenAction",(function(t){return o.ensureCatalog("openAction")}));j.on("GetAttachments",(function wphSetupGetAttachments(t){return o.ensureCatalog("attachments")}));j.on("GetJavaScript",(function wphSetupGetJavaScript(t){return o.ensureCatalog("javaScript")}));j.on("GetDocJSActions",(function wphSetupGetDocJSActions(t){return o.ensureCatalog("jsActions")}));j.on("GetPageJSActions",(function(t){var r=t.pageIndex;return o.getPage(r).then((function(t){return t.jsActions}))}));j.on("GetPageXfa",(function wphSetupGetXfa(t){var r=t.pageIndex;return o.getPage(r).then((function(t){return o.ensure(t,"xfaData")}))}));j.on("GetIsPureXfa",(function wphSetupGetIsPureXfa(t){return o.ensureDoc("isPureXfa")}));j.on("GetOutline",(function wphSetupGetOutline(t){return o.ensureCatalog("documentOutline")}));j.on("GetOptionalContentConfig",(function(t){return o.ensureCatalog("optionalContentConfig")}));j.on("GetPermissions",(function(t){return o.ensureCatalog("permissions")}));j.on("GetMetadata",(function wphSetupGetMetadata(t){return Promise.all([o.ensureDoc("documentInfo"),o.ensureCatalog("metadata")])}));j.on("GetMarkInfo",(function wphSetupGetMarkInfo(t){return o.ensureCatalog("markInfo")}));j.on("GetData",(function wphSetupGetData(t){o.requestLoadedStream();return o.onLoadedStream().then((function(t){return t.bytes}))}));j.on("GetStats",(function wphSetupGetStats(t){return o.ensureXRef("stats")}));j.on("GetAnnotations",(function(t){var r=t.pageIndex,l=t.intent;return o.getPage(r).then((function(t){return t.getAnnotationsData(l)}))}));j.on("GetFieldObjects",(function(t){return o.ensureDoc("fieldObjects")}));j.on("HasJSActions",(function(t){return o.ensureDoc("hasJSActions")}));j.on("GetCalculationOrderIds",(function(t){return o.ensureDoc("calculationOrderIds")}));j.on("SaveDocument",(function(t){var r=t.numPages,l=t.annotationStorage,h=t.filename;o.requestLoadedStream();for(var m=[o.onLoadedStream(),o.ensureCatalog("acroForm"),o.ensureDoc("xref"),o.ensureDoc("startXRef")],g=function _loop(t){m.push(o.getPage(t).then((function(r){var o=new S("Save: page ".concat(t));startWorkerTask(o);return r.save(j,o,l).finally((function(){finishWorkerTask(o)}))})))},y=0;y<r;y++)g(y);return Promise.all(m).then((function(t){var r,o=_toArray(t),l=o[0],m=o[1],g=o[2],y=o[3],v=[],S=function _createForOfIteratorHelper(t,r){var o;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(o=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){o&&(t=o);var l=0,c=function F(){};return{s:c,n:function n(){return l>=t.length?{done:!0}:{done:!1,value:t[l++]}},e:function e(t){throw t},f:c}}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 u,h=!0,d=!1;return{s:function s(){o=t[Symbol.iterator]()},n:function n(){var t=o.next();h=t.done;return t},e:function e(t){d=!0;u=t},f:function f(){try{h||null==o.return||o.return()}finally{if(d)throw u}}}}(o.slice(4));try{for(S.s();!(r=S.n()).done;){v=r.value.filter((function(t){return null!==t})).reduce((function(t,r){return t.concat(r)}),v)}}catch(t){S.e(t)}finally{S.f()}if(0===v.length)return l.bytes;var k=m instanceof u.Dict&&m.get("XFA")||[],C=null;if(Array.isArray(k))for(var w=0,_=k.length;w<_;w+=2)"datasets"===k[w]&&(C=k[w+1]);else(0,c.warn)("Unsupported XFA type.");var O=Object.create(null);if(g.trailer){var x=Object.create(null),T=g.trailer.get("Info")||null;T instanceof u.Dict&&T.forEach((function(t,r){(0,c.isString)(t)&&(0,c.isString)(r)&&(x[t]=(0,c.stringToPDFString)(r))}));O={rootRef:g.trailer.getRaw("Root")||null,encrypt:g.trailer.getRaw("Encrypt")||null,newRef:g.getNewRef(),infoRef:g.trailer.getRaw("Info")||null,info:x,fileIds:g.trailer.getRaw("ID")||null,startXRef:y,filename:h}}g.resetNewRef();return(0,d.incrementalUpdate)({originalData:l.bytes,xrefInfo:O,newRefs:v,xref:g,datasetsRef:C})}))}));j.on("GetOperatorList",(function wphSetupRenderPage(t,r){var l=t.pageIndex;o.getPage(l).then((function(o){var u=new S("GetOperatorList: page ".concat(l));startWorkerTask(u);var h=w>=c.VerbosityLevel.INFOS?Date.now():0;o.getOperatorList({handler:j,sink:r,task:u,intent:t.intent,renderInteractiveForms:t.renderInteractiveForms,annotationStorage:t.annotationStorage}).then((function(t){finishWorkerTask(u);h&&(0,c.info)("page=".concat(l+1," - getOperatorList: time=")+"".concat(Date.now()-h,"ms, len=").concat(t.length));r.close()}),(function(t){finishWorkerTask(u);if(!u.terminated){j.send("UnsupportedFeature",{featureId:c.UNSUPPORTED_FEATURES.errorOperatorList});r.error(t)}}))}))}));j.on("GetTextContent",(function wphExtractText(t,r){var l=t.pageIndex;r.onPull=function(t){};r.onCancel=function(t){};o.getPage(l).then((function(o){var u=new S("GetTextContent: page "+l);startWorkerTask(u);var h=w>=c.VerbosityLevel.INFOS?Date.now():0;o.extractTextContent({handler:j,task:u,sink:r,normalizeWhitespace:t.normalizeWhitespace,combineTextItems:t.combineTextItems}).then((function(){finishWorkerTask(u);h&&(0,c.info)("page=".concat(l+1," - getTextContent: time=")+"".concat(Date.now()-h,"ms"));r.close()}),(function(t){finishWorkerTask(u);u.terminated||r.error(t)}))}))}));j.on("FontFallback",(function(t){return o.fontFallback(t.id,j)}));j.on("Cleanup",(function wphCleanup(t){return o.cleanup(!0)}));j.on("Terminate",(function wphTerminate(t){m=!0;var r=[];if(o){o.terminate(new c.AbortException("Worker was terminated."));var l=o.cleanup();r.push(l);o=null}else(0,u.clearPrimitiveCaches)();k&&k(new c.AbortException("Worker was terminated."));C.forEach((function(t){r.push(t.finished);t.terminate()}));return Promise.all(r).then((function(){j.destroy();j=null}))}));j.on("Ready",(function wphReady(r){!function setupDoc(t){function onSuccess(t){ensureNotTerminated();j.send("GetDoc",{pdfInfo:t})}function onFailure(t){ensureNotTerminated();if(t instanceof c.PasswordException){var r=new S("PasswordException: response ".concat(t.code));startWorkerTask(r);j.sendWithPromise("PasswordRequest",t).then((function(t){var l=t.password;finishWorkerTask(r);o.updatePassword(l);pdfManagerReady()})).catch((function(){finishWorkerTask(r);j.send("DocException",t)}))}else t instanceof c.InvalidPDFException||t instanceof c.MissingPDFException||t instanceof c.UnexpectedResponseException||t instanceof c.UnknownErrorException?j.send("DocException",t):j.send("DocException",new c.UnknownErrorException(t.message,t.toString()))}function pdfManagerReady(){ensureNotTerminated();loadDocument(!1).then(onSuccess,(function(t){ensureNotTerminated();if(t instanceof v.XRefParseException){o.requestLoadedStream();o.onLoadedStream().then((function(){ensureNotTerminated();loadDocument(!0).then(onSuccess,onFailure)}))}else onFailure(t)}))}ensureNotTerminated();getPdfManager(t,{maxImageSize:t.maxImageSize,disableFontFace:t.disableFontFace,ignoreErrors:t.ignoreErrors,isEvalSupported:t.isEvalSupported,fontExtraProperties:t.fontExtraProperties},t.enableXfa).then((function(t){if(m){t.terminate(new c.AbortException("Worker was terminated."));throw new Error("Worker was terminated")}(o=t).onLoadedStream().then((function(t){j.send("DataLoaded",{length:t.bytes.byteLength})}))})).then(pdfManagerReady,onFailure)}(t);t=null}));return D}},{key:"initializeFromPort",value:function initializeFromPort(t){var r=new g.MessageHandler("worker","main",t);WorkerMessageHandler.setup(r,t);r.send("ready",null)}}]);return WorkerMessageHandler}();r.WorkerMessageHandler=k;"undefined"==typeof window&&!m.isNodeJS&&"undefined"!=typeof self&&function isMessagePort(t){return"function"==typeof t.postMessage&&"onmessage"in t}(self)&&k.initializeFromPort(self)},(t,r,o)=>{"use strict";t.exports=o(3)},(t,r,o)=>{"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var l=function(t){var r,o=Object.prototype,l=o.hasOwnProperty,c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",h=c.asyncIterator||"@@asyncIterator",d=c.toStringTag||"@@toStringTag";function define(t,r,o){Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!0});return t[r]}try{define({},"")}catch(t){define=function define(t,r,o){return t[r]=o}}function wrap(t,r,o,l){var c=r&&r.prototype instanceof Generator?r:Generator,u=Object.create(c.prototype),h=new Context(l||[]);u._invoke=function makeInvokeMethod(t,r,o){var l=m;return function invoke(c,u){if(l===y)throw new Error("Generator is already running");if(l===v){if("throw"===c)throw u;return doneResult()}o.method=c;o.arg=u;for(;;){var h=o.delegate;if(h){var d=maybeInvokeDelegate(h,o);if(d){if(d===S)continue;return d}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(l===m){l=v;throw o.arg}o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);l=y;var k=tryCatch(t,r,o);if("normal"===k.type){l=o.done?v:g;if(k.arg===S)continue;return{value:k.arg,done:o.done}}if("throw"===k.type){l=v;o.method="throw";o.arg=k.arg}}}}(t,o,h);return u}t.wrap=wrap;function tryCatch(t,r,o){try{return{type:"normal",arg:t.call(r,o)}}catch(t){return{type:"throw",arg:t}}}var m="suspendedStart",g="suspendedYield",y="executing",v="completed",S={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var k={};k[u]=function(){return this};var C=Object.getPrototypeOf,w=C&&C(C(values([])));w&&w!==o&&l.call(w,u)&&(k=w);var _=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(k);GeneratorFunction.prototype=_.constructor=GeneratorFunctionPrototype;GeneratorFunctionPrototype.constructor=GeneratorFunction;GeneratorFunction.displayName=define(GeneratorFunctionPrototype,d,"GeneratorFunction");function defineIteratorMethods(t){["next","throw","return"].forEach((function(r){define(t,r,(function(t){return this._invoke(r,t)}))}))}t.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===GeneratorFunction||"GeneratorFunction"===(r.displayName||r.name))};t.mark=function(t){if(Object.setPrototypeOf)Object.setPrototypeOf(t,GeneratorFunctionPrototype);else{t.__proto__=GeneratorFunctionPrototype;define(t,d,"GeneratorFunction")}t.prototype=Object.create(_);return t};t.awrap=function(t){return{__await:t}};function AsyncIterator(t,r){function invoke(o,c,u,h){var d=tryCatch(t[o],t,c);if("throw"!==d.type){var m=d.arg,g=m.value;return g&&"object"===_typeof(g)&&l.call(g,"__await")?r.resolve(g.__await).then((function(t){invoke("next",t,u,h)}),(function(t){invoke("throw",t,u,h)})):r.resolve(g).then((function(t){m.value=t;u(m)}),(function(t){return invoke("throw",t,u,h)}))}h(d.arg)}var o;this._invoke=function enqueue(t,l){function callInvokeWithMethodAndArg(){return new r((function(r,o){invoke(t,l,r,o)}))}return o=o?o.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}}defineIteratorMethods(AsyncIterator.prototype);AsyncIterator.prototype[h]=function(){return this};t.AsyncIterator=AsyncIterator;t.async=function(r,o,l,c,u){void 0===u&&(u=Promise);var h=new AsyncIterator(wrap(r,o,l,c),u);return t.isGeneratorFunction(o)?h:h.next().then((function(t){return t.done?t.value:h.next()}))};function maybeInvokeDelegate(t,o){var l=t.iterator[o.method];if(l===r){o.delegate=null;if("throw"===o.method){if(t.iterator.return){o.method="return";o.arg=r;maybeInvokeDelegate(t,o);if("throw"===o.method)return S}o.method="throw";o.arg=new TypeError("The iterator does not provide a 'throw' method")}return S}var c=tryCatch(l,t.iterator,o.arg);if("throw"===c.type){o.method="throw";o.arg=c.arg;o.delegate=null;return S}var u=c.arg;if(!u){o.method="throw";o.arg=new TypeError("iterator result is not an object");o.delegate=null;return S}if(!u.done)return u;o[t.resultName]=u.value;o.next=t.nextLoc;if("return"!==o.method){o.method="next";o.arg=r}o.delegate=null;return S}defineIteratorMethods(_);define(_,d,"Generator");_[u]=function(){return this};_.toString=function(){return"[object Generator]"};function pushTryEntry(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]);if(2 in t){r.finallyLoc=t[2];r.afterLoc=t[3]}this.tryEntries.push(r)}function resetTryEntry(t){var r=t.completion||{};r.type="normal";delete r.arg;t.completion=r}function Context(t){this.tryEntries=[{tryLoc:"root"}];t.forEach(pushTryEntry,this);this.reset(!0)}t.keys=function(t){var r=[];for(var o in t)r.push(o);r.reverse();return function next(){for(;r.length;){var o=r.pop();if(o in t){next.value=o;next.done=!1;return next}}next.done=!0;return next}};function values(t){if(t){var o=t[u];if(o)return o.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var c=-1,h=function next(){for(;++c<t.length;)if(l.call(t,c)){next.value=t[c];next.done=!1;return next}next.value=r;next.done=!0;return next};return h.next=h}}return{next:doneResult}}t.values=values;function doneResult(){return{value:r,done:!0}}Context.prototype={constructor:Context,reset:function reset(t){this.prev=0;this.next=0;this.sent=this._sent=r;this.done=!1;this.delegate=null;this.method="next";this.arg=r;this.tryEntries.forEach(resetTryEntry);if(!t)for(var o in this)"t"===o.charAt(0)&&l.call(this,o)&&!isNaN(+o.slice(1))&&(this[o]=r)},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function dispatchException(t){if(this.done)throw t;var o=this;function handle(l,c){h.type="throw";h.arg=t;o.next=l;if(c){o.method="next";o.arg=r}return!!c}for(var c=this.tryEntries.length-1;c>=0;--c){var u=this.tryEntries[c],h=u.completion;if("root"===u.tryLoc)return handle("end");if(u.tryLoc<=this.prev){var d=l.call(u,"catchLoc"),m=l.call(u,"finallyLoc");if(d&&m){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0);if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}else if(d){if(this.prev<u.catchLoc)return handle(u.catchLoc,!0)}else{if(!m)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return handle(u.finallyLoc)}}}},abrupt:function abrupt(t,r){for(var o=this.tryEntries.length-1;o>=0;--o){var c=this.tryEntries[o];if(c.tryLoc<=this.prev&&l.call(c,"finallyLoc")&&this.prev<c.finallyLoc){var u=c;break}}u&&("break"===t||"continue"===t)&&u.tryLoc<=r&&r<=u.finallyLoc&&(u=null);var h=u?u.completion:{};h.type=t;h.arg=r;if(u){this.method="next";this.next=u.finallyLoc;return S}return this.complete(h)},complete:function complete(t,r){if("throw"===t.type)throw t.arg;if("break"===t.type||"continue"===t.type)this.next=t.arg;else if("return"===t.type){this.rval=this.arg=t.arg;this.method="return";this.next="end"}else"normal"===t.type&&r&&(this.next=r);return S},finish:function finish(t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.finallyLoc===t){this.complete(o.completion,o.afterLoc);resetTryEntry(o);return S}}},catch:function _catch(t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc===t){var l=o.completion;if("throw"===l.type){var c=l.arg;resetTryEntry(o)}return c}}throw new Error("illegal catch attempt")},delegateYield:function delegateYield(t,o,l){this.delegate={iterator:values(t),resultName:o,nextLoc:l};"next"===this.method&&(this.arg=r);return S}};return t}("object"===_typeof(t=o.nmd(t))?t.exports:{});try{regeneratorRuntime=l}catch(t){Function("r","regeneratorRuntime = r")(l)}},(t,r,o)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.arrayByteLength=arrayByteLength;r.arraysToBytes=function arraysToBytes(t){var r=t.length;if(1===r&&t[0]instanceof Uint8Array)return t[0];for(var o=0,l=0;l<r;l++)o+=arrayByteLength(t[l]);for(var c=0,u=new Uint8Array(o),h=0;h<r;h++){var d=t[h];d instanceof Uint8Array||(d="string"==typeof d?stringToBytes(d):new Uint8Array(d));var m=d.byteLength;u.set(d,c);c+=m}return u};r.assert=assert;r.bytesToString=function bytesToString(t){assert(null!==t&&"object"===_typeof(t)&&void 0!==t.length,"Invalid argument for bytesToString");var r=t.length,o=8192;if(r<o)return String.fromCharCode.apply(null,t);for(var l=[],c=0;c<r;c+=o){var u=Math.min(c+o,r),h=t.subarray(c,u);l.push(String.fromCharCode.apply(null,h))}return l.join("")};r.createObjectURL=function createObjectURL(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(URL.createObjectURL&&!o)return URL.createObjectURL(new Blob([t],{type:r}));for(var l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c="data:".concat(r,";base64,"),u=0,h=t.length;u<h;u+=3){var d=255&t[u],m=255&t[u+1],g=255&t[u+2],y=d>>2,v=(3&d)<<4|m>>4,S=u+1<h?(15&m)<<2|g>>6:64,k=u+2<h?63&g:64;c+=l[y]+l[v]+l[S]+l[k]}return c};r.createPromiseCapability=function createPromiseCapability(){var t=Object.create(null),r=!1;Object.defineProperty(t,"settled",{get:function get(){return r}});t.promise=new Promise((function(o,l){t.resolve=function(t){r=!0;o(t)};t.reject=function(t){r=!0;l(t)}}));return t};r.createValidAbsoluteUrl=function createValidAbsoluteUrl(t,r){if(!t)return null;try{var o=r?new URL(t,r):new URL(t);if(function _isValidProtocol(t){if(!t)return!1;switch(t.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(o))return o}catch(t){}return null};r.escapeString=function escapeString(t){return t.replace(/([()\\\n\r])/g,(function(t){return"\n"===t?"\\n":"\r"===t?"\\r":"\\".concat(t)}))};r.getModificationDate=function getModificationDate(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,r=[t.getUTCFullYear().toString(),(t.getUTCMonth()+1).toString().padStart(2,"0"),t.getUTCDate().toString().padStart(2,"0"),t.getUTCHours().toString().padStart(2,"0"),t.getUTCMinutes().toString().padStart(2,"0"),t.getUTCSeconds().toString().padStart(2,"0")];return r.join("")};r.getVerbosityLevel=function getVerbosityLevel(){return c};r.info=function info(t){c>=l.INFOS&&console.log("Info: ".concat(t))};r.isArrayBuffer=function isArrayBuffer(t){return"object"===_typeof(t)&&null!==t&&void 0!==t.byteLength};r.isArrayEqual=function isArrayEqual(t,r){if(t.length!==r.length)return!1;for(var o=0,l=t.length;o<l;o++)if(t[o]!==r[o])return!1;return!0};r.isAscii=function isAscii(t){return/^[\x00-\x7F]*$/.test(t)};r.isBool=function isBool(t){return"boolean"==typeof t};r.isNum=function isNum(t){return"number"==typeof t};r.isSameOrigin=function isSameOrigin(t,r){var o;try{if(!(o=new URL(t)).origin||"null"===o.origin)return!1}catch(t){return!1}var l=new URL(r,o);return o.origin===l.origin};r.isString=function isString(t){return"string"==typeof t};r.objectFromMap=function objectFromMap(t){var r,o=Object.create(null),l=function _createForOfIteratorHelper(t,r){var o;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(o=_unsupportedIterableToArray(t))||r&&t&&"number"==typeof t.length){o&&(t=o);var l=0,c=function F(){};return{s:c,n:function n(){return l>=t.length?{done:!0}:{done:!1,value:t[l++]}},e:function e(t){throw t},f:c}}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 u,h=!0,d=!1;return{s:function s(){o=t[Symbol.iterator]()},n:function n(){var t=o.next();h=t.done;return t},e:function e(t){d=!0;u=t},f:function f(){try{h||null==o.return||o.return()}finally{if(d)throw u}}}}(t);try{for(l.s();!(r=l.n()).done;){var c=(d=r.value,m=2,function _arrayWithHoles(t){if(Array.isArray(t))return t}(d)||function _iterableToArrayLimit(t,r){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var o=[],l=!0,c=!1,u=void 0;try{for(var h,d=t[Symbol.iterator]();!(l=(h=d.next()).done);l=!0){o.push(h.value);if(r&&o.length===r)break}}catch(t){c=!0;u=t}finally{try{l||null==d.return||d.return()}finally{if(c)throw u}}return o}(d,m)||_unsupportedIterableToArray(d,m)||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.")}()),u=c[0],h=c[1];o[u]=h}}catch(t){l.e(t)}finally{l.f()}var d,m;return o};r.objectSize=function objectSize(t){return Object.keys(t).length};r.removeNullCharacters=function removeNullCharacters(t){if("string"!=typeof t){warn("The argument for removeNullCharacters must be a string.");return t}return t.replace(k,"")};r.setVerbosityLevel=function setVerbosityLevel(t){Number.isInteger(t)&&(c=t)};r.shadow=shadow;r.string32=function string32(t){return String.fromCharCode(t>>24&255,t>>16&255,t>>8&255,255&t)};r.stringToBytes=stringToBytes;r.stringToPDFString=function stringToPDFString(t){var r=t.length,o=[];if("þ"===t[0]&&"ÿ"===t[1])for(var l=2;l<r;l+=2)o.push(String.fromCharCode(t.charCodeAt(l)<<8|t.charCodeAt(l+1)));else if("ÿ"===t[0]&&"þ"===t[1])for(var c=2;c<r;c+=2)o.push(String.fromCharCode(t.charCodeAt(c+1)<<8|t.charCodeAt(c)));else for(var u=0;u<r;++u){var h=x[t.charCodeAt(u)];o.push(h?String.fromCharCode(h):t.charAt(u))}return o.join("")};r.stringToUTF16BEString=function stringToUTF16BEString(t){for(var r=["þÿ"],o=0,l=t.length;o<l;o++){var c=t.charCodeAt(o);r.push(String.fromCharCode(c>>8&255));r.push(String.fromCharCode(255&c))}return r.join("")};r.stringToUTF8String=function stringToUTF8String(t){return decodeURIComponent(escape(t))};r.unreachable=unreachable;r.utf8StringToString=function utf8StringToString(t){return unescape(encodeURIComponent(t))};r.warn=warn;r.VerbosityLevel=r.Util=r.UNSUPPORTED_FEATURES=r.UnknownErrorException=r.UnexpectedResponseException=r.TextRenderingMode=r.StreamType=r.PermissionFlag=r.PasswordResponses=r.PasswordException=r.PageActionEventType=r.OPS=r.MissingPDFException=r.IsLittleEndianCached=r.IsEvalSupportedCached=r.InvalidPDFException=r.ImageKind=r.IDENTITY_MATRIX=r.FormatError=r.FontType=r.FONT_IDENTITY_MATRIX=r.DocumentActionEventType=r.CMapCompressionType=r.BaseException=r.AnnotationType=r.AnnotationStateModelType=r.AnnotationReviewState=r.AnnotationReplyType=r.AnnotationMarkedState=r.AnnotationFlag=r.AnnotationFieldFlag=r.AnnotationBorderStyleType=r.AnnotationActionEventType=r.AbortException=void 0;o(5);function _defineProperties(t,r){for(var o=0;o<r.length;o++){var l=r[o];l.enumerable=l.enumerable||!1;l.configurable=!0;"value"in l&&(l.writable=!0);Object.defineProperty(t,l.key,l)}}function _unsupportedIterableToArray(t,r){if(t){if("string"==typeof t)return _arrayLikeToArray(t,r);var o=Object.prototype.toString.call(t).slice(8,-1);"Object"===o&&t.constructor&&(o=t.constructor.name);return"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?_arrayLikeToArray(t,r):void 0}}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var o=0,l=new Array(r);o<r;o++)l[o]=t[o];return l}function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _inherits(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}});r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,r){t.__proto__=r;return t})(t,r)}function _createSuper(t){var r=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})));return!0}catch(t){return!1}}();return function _createSuperInternal(){var o,l=_getPrototypeOf(t);if(r){var c=_getPrototypeOf(this).constructor;o=Reflect.construct(l,arguments,c)}else o=l.apply(this,arguments);return _possibleConstructorReturn(this,o)}}function _possibleConstructorReturn(t,r){return!r||"object"!==_typeof(r)&&"function"!=typeof r?function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):r}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}r.IDENTITY_MATRIX=[1,0,0,1,0,0];r.FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0];r.PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};r.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};r.ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};r.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};r.AnnotationStateModelType={MARKED:"Marked",REVIEW:"Review"};r.AnnotationMarkedState={MARKED:"Marked",UNMARKED:"Unmarked"};r.AnnotationReviewState={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"};r.AnnotationReplyType={GROUP:"Group",REPLY:"R"};r.AnnotationFlag={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};r.AnnotationFieldFlag={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864};r.AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};r.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"};r.DocumentActionEventType={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"};r.PageActionEventType={O:"PageOpen",C:"PageClose"};r.StreamType={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"};r.FontType={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};var l={ERRORS:0,WARNINGS:1,INFOS:5};r.VerbosityLevel=l;r.CMapCompressionType={NONE:0,BINARY:1,STREAM:2};r.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};r.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",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",errorFontGetPath:"errorFontGetPath",errorMarkedContent:"errorMarkedContent"};r.PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var c=l.WARNINGS;function warn(t){c>=l.WARNINGS&&console.log("Warning: ".concat(t))}function unreachable(t){throw new Error(t)}function assert(t,r){t||unreachable(r)}function shadow(t,r,o){Object.defineProperty(t,r,{value:o,enumerable:!0,configurable:!0,writable:!1});return o}var u=function BaseExceptionClosure(){function BaseException(t){this.constructor===BaseException&&unreachable("Cannot initialize BaseException.");this.message=t;this.name=this.constructor.name}BaseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();r.BaseException=u;var h=function(t){_inherits(PasswordException,t);var r=_createSuper(PasswordException);function PasswordException(t,o){var l;_classCallCheck(this,PasswordException);(l=r.call(this,t)).code=o;return l}return PasswordException}(u);r.PasswordException=h;var d=function(t){_inherits(UnknownErrorException,t);var r=_createSuper(UnknownErrorException);function UnknownErrorException(t,o){var l;_classCallCheck(this,UnknownErrorException);(l=r.call(this,t)).details=o;return l}return UnknownErrorException}(u);r.UnknownErrorException=d;var m=function(t){_inherits(InvalidPDFException,t);var r=_createSuper(InvalidPDFException);function InvalidPDFException(){_classCallCheck(this,InvalidPDFException);return r.apply(this,arguments)}return InvalidPDFException}(u);r.InvalidPDFException=m;var g=function(t){_inherits(MissingPDFException,t);var r=_createSuper(MissingPDFException);function MissingPDFException(){_classCallCheck(this,MissingPDFException);return r.apply(this,arguments)}return MissingPDFException}(u);r.MissingPDFException=g;var y=function(t){_inherits(UnexpectedResponseException,t);var r=_createSuper(UnexpectedResponseException);function UnexpectedResponseException(t,o){var l;_classCallCheck(this,UnexpectedResponseException);(l=r.call(this,t)).status=o;return l}return UnexpectedResponseException}(u);r.UnexpectedResponseException=y;var v=function(t){_inherits(FormatError,t);var r=_createSuper(FormatError);function FormatError(){_classCallCheck(this,FormatError);return r.apply(this,arguments)}return FormatError}(u);r.FormatError=v;var S=function(t){_inherits(AbortException,t);var r=_createSuper(AbortException);function AbortException(){_classCallCheck(this,AbortException);return r.apply(this,arguments)}return AbortException}(u);r.AbortException=S;var k=/\x00/g;function stringToBytes(t){assert("string"==typeof t,"Invalid argument for stringToBytes");for(var r=t.length,o=new Uint8Array(r),l=0;l<r;++l)o[l]=255&t.charCodeAt(l);return o}function arrayByteLength(t){if(void 0!==t.length)return t.length;assert(void 0!==t.byteLength,"arrayByteLength - invalid argument.");return t.byteLength}var C={get value(){return shadow(this,"value",function isLittleEndian(){var t=new Uint8Array(4);t[0]=1;return 1===new Uint32Array(t.buffer,0,1)[0]}())}};r.IsLittleEndianCached=C;var w={get value(){return shadow(this,"value",function isEvalSupported(){try{new Function("");return!0}catch(t){return!1}}())}};r.IsEvalSupportedCached=w;var _=function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return _arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||_unsupportedIterableToArray(t)||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.")}()}(Array(256).keys()).map((function(t){return t.toString(16).padStart(2,"0")})),O=function(){function Util(){_classCallCheck(this,Util)}!function _createClass(t,r,o){r&&_defineProperties(t.prototype,r);o&&_defineProperties(t,o);return t}(Util,null,[{key:"makeHexColor",value:function makeHexColor(t,r,o){return"#".concat(_[t]).concat(_[r]).concat(_[o])}},{key:"transform",value:function transform(t,r){return[t[0]*r[0]+t[2]*r[1],t[1]*r[0]+t[3]*r[1],t[0]*r[2]+t[2]*r[3],t[1]*r[2]+t[3]*r[3],t[0]*r[4]+t[2]*r[5]+t[4],t[1]*r[4]+t[3]*r[5]+t[5]]}},{key:"applyTransform",value:function applyTransform(t,r){return[t[0]*r[0]+t[1]*r[2]+r[4],t[0]*r[1]+t[1]*r[3]+r[5]]}},{key:"applyInverseTransform",value:function applyInverseTransform(t,r){var o=r[0]*r[3]-r[1]*r[2];return[(t[0]*r[3]-t[1]*r[2]+r[2]*r[5]-r[4]*r[3])/o,(-t[0]*r[1]+t[1]*r[0]+r[4]*r[1]-r[5]*r[0])/o]}},{key:"getAxialAlignedBoundingBox",value:function getAxialAlignedBoundingBox(t,r){var o=Util.applyTransform(t,r),l=Util.applyTransform(t.slice(2,4),r),c=Util.applyTransform([t[0],t[3]],r),u=Util.applyTransform([t[2],t[1]],r);return[Math.min(o[0],l[0],c[0],u[0]),Math.min(o[1],l[1],c[1],u[1]),Math.max(o[0],l[0],c[0],u[0]),Math.max(o[1],l[1],c[1],u[1])]}},{key:"inverseTransform",value:function inverseTransform(t){var r=t[0]*t[3]-t[1]*t[2];return[t[3]/r,-t[1]/r,-t[2]/r,t[0]/r,(t[2]*t[5]-t[4]*t[3])/r,(t[4]*t[1]-t[5]*t[0])/r]}},{key:"apply3dTransform",value:function apply3dTransform(t,r){return[t[0]*r[0]+t[1]*r[1]+t[2]*r[2],t[3]*r[0]+t[4]*r[1]+t[5]*r[2],t[6]*r[0]+t[7]*r[1]+t[8]*r[2]]}},{key:"singularValueDecompose2dScale",value:function singularValueDecompose2dScale(t){var r=[t[0],t[2],t[1],t[3]],o=t[0]*r[0]+t[1]*r[2],l=t[0]*r[1]+t[1]*r[3],c=t[2]*r[0]+t[3]*r[2],u=t[2]*r[1]+t[3]*r[3],h=(o+u)/2,d=Math.sqrt(Math.pow(o+u,2)-4*(o*u-c*l))/2,m=h+d||1,g=h-d||1;return[Math.sqrt(m),Math.sqrt(g)]}},{key:"normalizeRect",value:function normalizeRect(t){var r=t.slice(0);if(t[0]>t[2]){r[0]=t[2];r[2]=t[0]}if(t[1]>t[3]){r[1]=t[3];r[3]=t[1]}return r}},{key:"intersect",value:function intersect(t,r){function compare(t,r){return t-r}var o=[t[0],t[2],r[0],r[2]].sort(compare),l=[t[1],t[3],r[1],r[3]].sort(compare),c=[];t=Util.normalizeRect(t);r=Util.normalizeRect(r);if(!(o[0]===t[0]&&o[1]===r[0]||o[0]===r[0]&&o[1]===t[0]))return null;c[0]=o[1];c[2]=o[2];if(!(l[0]===t[1]&&l[1]===r[1]||l[0]===r[1]&&l[1]===t[1]))return null;c[1]=l[1];c[3]=l[2];return c}}]);return Util}();r.Util=O;var x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364]},(t,r,o)=>{"use strict";var l=o(6);if("undefined"==typeof globalThis||!globalThis._pdfjsCompatibilityChecked){"undefined"!=typeof globalThis&&globalThis.Math===Math||(globalThis=o(7));globalThis._pdfjsCompatibilityChecked=!0;!function checkNodeBtoa(){!globalThis.btoa&&l.isNodeJS&&(globalThis.btoa=function(t){return Buffer.from(t,"binary").toString("base64")})}();!function checkNodeAtob(){!globalThis.atob&&l.isNodeJS&&(globalThis.atob=function(t){return Buffer.from(t,"base64").toString("binary")})}();!function checkObjectFromEntries(){Object.fromEntries||o(52)}();!function checkPromise(){globalThis.Promise.allSettled||(globalThis.Promise=o(85))}();!function checkReadableStream(){var t=!1;if("undefined"!=typeof ReadableStream)try{new ReadableStream({start:function start(t){t.close()}});t=!0}catch(t){}t||(globalThis.ReadableStream=o(111).ReadableStream)}();!function checkStringPadStart(){String.prototype.padStart||o(112)}();!function checkStringPadEnd(){String.prototype.padEnd||o(118)}();!function checkObjectValues(){Object.values||(Object.values=o(120))}();!function checkObjectEntries(){Object.entries||(Object.entries=o(123))}()}},(t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});r.isNodeJS=void 0;function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(t){return typeof t}:function _typeof(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=!("object"!==("undefined"==typeof process?"undefined":_typeof(process))||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);r.isNodeJS=o},(t,r,o)=>{o(8);t.exports=o(10)},(t,r,o)=>{o(9)({global:!0},{globalThis:o(10)})},(t,r,o)=>{var l=o(10),c=o(11).f,u=o(25),h=o(28),d=o(29),m=o(39),g=o(51);t.exports=function(t,r){var o,y,v,S,k,C=t.target,w=t.global,_=t.stat;if(o=w?l:_?l[C]||d(C,{}):(l[C]||{}).prototype)for(y in r){S=r[y];v=t.noTargetGet?(k=c(o,y))&&k.value:o[y];if(!g(w?y:C+(_?".":"#")+y,t.forced)&&void 0!==v){if(typeof S==typeof v)continue;m(S,v)}(t.sham||v&&v.sham)&&u(S,"sham",!0);h(o,y,S,t)}}},t=>{var check=function(t){return t&&t.Math==Math&&t};t.exports=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof global&&global)||function(){return this}()||Function("return this")()},(t,r,o)=>{var l=o(12),c=o(14),u=o(15),h=o(16),d=o(20),m=o(22),g=o(23),y=Object.getOwnPropertyDescriptor;r.f=l?y:function getOwnPropertyDescriptor(t,r){t=h(t);r=d(r,!0);if(g)try{return y(t,r)}catch(t){}if(m(t,r))return u(!c.f.call(t,r),t[r])}},(t,r,o)=>{var l=o(13);t.exports=!l((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},(t,r)=>{"use strict";var o={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,c=l&&!o.call({1:2},1);r.f=c?function propertyIsEnumerable(t){var r=l(this,t);return!!r&&r.enumerable}:o},t=>{t.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},(t,r,o)=>{var l=o(17),c=o(19);t.exports=function(t){return l(c(t))}},(t,r,o)=>{var l=o(13),c=o(18),u="".split;t.exports=l((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==c(t)?u.call(t,""):Object(t)}:Object},t=>{var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},t=>{t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},(t,r,o)=>{var l=o(21);t.exports=function(t,r){if(!l(t))return t;var o,c;if(r&&"function"==typeof(o=t.toString)&&!l(c=o.call(t)))return c;if("function"==typeof(o=t.valueOf)&&!l(c=o.call(t)))return c;if(!r&&"function"==typeof(o=t.toString)&&!l(c=o.call(t)))return c;throw TypeError("Can't convert object to primitive value")}},t=>{t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},t=>{var r={}.hasOwnProperty;t.exports=function(t,o){return r.call(t,o)}},(t,r,o)=>{var l=o(12),c=o(13),u=o(24);t.exports=!l&&!c((function(){return 7!=Object.defineProperty(u("div"),"a",{get:function(){return 7}}).a}))},(t,r,o)=>{var l=o(10),c=o(21),u=l.document,h=c(u)&&c(u.createElement);t.exports=function(t){return h?u.createElement(t):{}}},(t,r,o)=>{var l=o(12),c=o(26),u=o(15);t.exports=l?function(t,r,o){return c.f(t,r,u(1,o))}:function(t,r,o){t[r]=o;return t}},(t,r,o)=>{var l=o(12),c=o(23),u=o(27),h=o(20),d=Object.defineProperty;r.f=l?d:function defineProperty(t,r,o){u(t);r=h(r,!0);u(o);if(c)try{return d(t,r,o)}catch(t){}if("get"in o||"set"in o)throw TypeError("Accessors not supported");"value"in o&&(t[r]=o.value);return t}},(t,r,o)=>{var l=o(21);t.exports=function(t){if(!l(t))throw TypeError(String(t)+" is not an object");return t}},(t,r,o)=>{var l=o(10),c=o(25),u=o(22),h=o(29),d=o(30),m=o(32),g=m.get,y=m.enforce,v=String(String).split("String");(t.exports=function(t,r,o,d){var m,g=!!d&&!!d.unsafe,S=!!d&&!!d.enumerable,k=!!d&&!!d.noTargetGet;if("function"==typeof o){"string"!=typeof r||u(o,"name")||c(o,"name",r);(m=y(o)).source||(m.source=v.join("string"==typeof r?r:""))}if(t!==l){g?!k&&t[r]&&(S=!0):delete t[r];S?t[r]=o:c(t,r,o)}else S?t[r]=o:h(r,o)})(Function.prototype,"toString",(function toString(){return"function"==typeof this&&g(this).source||d(this)}))},(t,r,o)=>{var l=o(10),c=o(25);t.exports=function(t,r){try{c(l,t,r)}catch(o){l[t]=r}return r}},(t,r,o)=>{var l=o(31),c=Function.toString;"function"!=typeof l.inspectSource&&(l.inspectSource=function(t){return c.call(t)});t.exports=l.inspectSource},(t,r,o)=>{var l=o(10),c=o(29),u="__core-js_shared__",h=l[u]||c(u,{});t.exports=h},(t,r,o)=>{var l,c,u,h=o(33),d=o(10),m=o(21),g=o(25),y=o(22),v=o(31),S=o(34),k=o(38),C=d.Weak