(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.worker",[],factory);else if(typeof exports==='object')exports["pdfjs-dist/build/pdf.worker"]=factory();else root["pdfjs-dist/build/pdf.worker"]=root.pdfjsWorker=factory()})(this,function(){return(function(modules){var installedModules={};function __w_pdfjs_require__(moduleId){if(installedModules[moduleId]){return installedModules[moduleId].exports}var module=installedModules[moduleId]={i:moduleId,l:false,exports:{}};modules[moduleId].call(module.exports,module,module.exports,__w_pdfjs_require__);module.l=true;return module.exports}__w_pdfjs_require__.m=modules;__w_pdfjs_require__.c=installedModules;__w_pdfjs_require__.d=function(exports,name,getter){if(!__w_pdfjs_require__.o(exports,name)){Object.defineProperty(exports,name,{enumerable:true,get:getter})}};__w_pdfjs_require__.r=function(exports){if(typeof Symbol!=='undefined'&&Symbol.toStringTag){Object.defineProperty(exports,Symbol.toStringTag,{value:'Module'})}Object.defineProperty(exports,'__esModule',{value:true})};__w_pdfjs_require__.t=function(value,mode){if(mode&1)value=__w_pdfjs_require__(value);if(mode&8)return value;if((mode&4)&&typeof value==='object'&&value&&value.__esModule)return value;var ns=Object.create(null);__w_pdfjs_require__.r(ns);Object.defineProperty(ns,'default',{enumerable:true,value:value});if(mode&2&&typeof value!='string')for(var key in value)__w_pdfjs_require__.d(ns,key,function(key){return value[key]}.bind(null,key));return ns};__w_pdfjs_require__.n=function(module){var getter=module&&module.__esModule?function getDefault(){return module['default']}:function getModuleExports(){return module};__w_pdfjs_require__.d(getter,'a',getter);return getter};__w_pdfjs_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)};__w_pdfjs_require__.p="";return __w_pdfjs_require__(__w_pdfjs_require__.s=0)})([(function(module,exports,__w_pdfjs_require__){"use strict";var pdfjsVersion='2.2.228';var pdfjsBuild='d7afb74a';var pdfjsCoreWorker=__w_pdfjs_require__(1);exports.WorkerMessageHandler=pdfjsCoreWorker.WorkerMessageHandler}),(function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.WorkerMessageHandler=exports.WorkerTask=void 0;var _regenerator=_interopRequireDefault(__w_pdfjs_require__(2));var _util=__w_pdfjs_require__(5);var _primitives=__w_pdfjs_require__(151);var _pdf_manager=__w_pdfjs_require__(152);var _is_node=_interopRequireDefault(__w_pdfjs_require__(8));var _message_handler=__w_pdfjs_require__(191);var _worker_stream=__w_pdfjs_require__(192);var _core_utils=__w_pdfjs_require__(154);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _typeof(obj){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)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance");}function _iterableToArrayLimit(arr,i){var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_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)})}}var WorkerTask=function WorkerTaskClosure(){function WorkerTask(name){this.name=name;this.terminated=false;this._capability=(0,_util.createPromiseCapability)()}WorkerTask.prototype={get finished(){return this._capability.promise},finish:function finish(){this._capability.resolve()},terminate:function terminate(){this.terminated=true},ensureNotTerminated:function ensureNotTerminated(){if(this.terminated){throw new Error('Worker task was terminated');}}};return WorkerTask}();exports.WorkerTask=WorkerTask;var WorkerMessageHandler={setup:function setup(handler,port){var testMessageProcessed=false;handler.on('test',function wphSetupTest(data){if(testMessageProcessed){return}testMessageProcessed=true;if(!(data instanceof Uint8Array)){handler.send('test',false);return}var supportTransfers=data[0]===255;handler.postMessageTransfers=supportTransfers;var xhr=new XMLHttpRequest();var responseExists='response'in xhr;try{xhr.responseType}catch(e){responseExists=false}if(!responseExists){handler.send('test',false);return}handler.send('test',{supportTypedArray:true,supportTransfers:supportTransfers})});handler.on('configure',function wphConfigure(data){(0,_util.setVerbosityLevel)(data.verbosity)});handler.on('GetDocRequest',function wphSetupDoc(data){return WorkerMessageHandler.createDocumentHandler(data,port)})},createDocumentHandler:function createDocumentHandler(docParams,port){var pdfManager;var terminated=false;var cancelXHRs=null;var WorkerTasks=[];var verbosity=(0,_util.getVerbosityLevel)();var apiVersion=docParams.apiVersion;var workerVersion='2.2.228';if(apiVersion!==workerVersion){throw new Error("The API version \"".concat(apiVersion,"\" does not match ")+"the Worker version \"".concat(workerVersion,"\"."));}var docId=docParams.docId;var docBaseUrl=docParams.docBaseUrl;var workerHandlerName=docParams.docId+'_worker';var handler=new _message_handler.MessageHandler(workerHandlerName,docId,port);handler.postMessageTransfers=docParams.postMessageTransfers;function ensureNotTerminated(){if(terminated){throw new Error('Worker was terminated');}}function startWorkerTask(task){WorkerTasks.push(task)}function finishWorkerTask(task){task.finish();var i=WorkerTasks.indexOf(task);WorkerTasks.splice(i,1)}function loadDocument(_x){return _loadDocument.apply(this,arguments)}function _loadDocument(){_loadDocument=_asyncToGenerator(_regenerator["default"].mark(function _callee(recoveryMode){var _ref4,_ref5,numPages,fingerprint;return _regenerator["default"].wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:_context.next=2;return pdfManager.ensureDoc('checkHeader');case 2:_context.next=4;return pdfManager.ensureDoc('parseStartXRef');case 4:_context.next=6;return pdfManager.ensureDoc('parse',[recoveryMode]);case 6:if(recoveryMode){_context.next=9;break}_context.next=9;return pdfManager.ensureDoc('checkFirstPage');case 9:_context.next=11;return Promise.all([pdfManager.ensureDoc('numPages'),pdfManager.ensureDoc('fingerprint')]);case 11:_ref4=_context.sent;_ref5=_slicedToArray(_ref4,2);numPages=_ref5[0];fingerprint=_ref5[1];return _context.abrupt("return",{numPages:numPages,fingerprint:fingerprint});case 16:case"end":return _context.stop()}}},_callee)}));return _loadDocument.apply(this,arguments)}function getPdfManager(data,evaluatorOptions){var pdfManagerCapability=(0,_util.createPromiseCapability)();var pdfManager;var source=data.source;if(source.data){try{pdfManager=new _pdf_manager.LocalPdfManager(docId,source.data,source.password,evaluatorOptions,docBaseUrl);pdfManagerCapability.resolve(pdfManager)}catch(ex){pdfManagerCapability.reject(ex)}return pdfManagerCapability.promise}var pdfStream,cachedChunks=[];try{pdfStream=new _worker_stream.PDFWorkerStream(handler)}catch(ex){pdfManagerCapability.reject(ex);return pdfManagerCapability.promise}var fullRequest=pdfStream.getFullReader();fullRequest.headersReady.then(function(){if(!fullRequest.isRangeSupported){return}var disableAutoFetch=source.disableAutoFetch||fullRequest.isStreamingSupported;pdfManager=new _pdf_manager.NetworkPdfManager(docId,pdfStream,{msgHandler:handler,password:source.password,length:fullRequest.contentLength,disableAutoFetch:disableAutoFetch,rangeChunkSize:source.rangeChunkSize},evaluatorOptions,docBaseUrl);for(var i=0;i=_util.VerbosityLevel.INFOS?Date.now():0;page.getOperatorList({handler:handler,task:task,intent:data.intent,renderInteractiveForms:data.renderInteractiveForms}).then(function(operatorList){finishWorkerTask(task);if(start){(0,_util.info)("page=".concat(pageIndex+1," - getOperatorList: time=")+"".concat(Date.now()-start,"ms, len=").concat(operatorList.totalLength))}},function(e){finishWorkerTask(task);if(task.terminated){return}handler.send('UnsupportedFeature',{featureId:_util.UNSUPPORTED_FEATURES.unknown});var minimumStackMessage='worker.js: while trying to getPage() and getOperatorList()';var wrappedException;if(typeof e==='string'){wrappedException={message:e,stack:minimumStackMessage}}else if(_typeof(e)==='object'){wrappedException={message:e.message||e.toString(),stack:e.stack||minimumStackMessage}}else{wrappedException={message:'Unknown exception type: '+_typeof(e),stack:minimumStackMessage}}handler.send('PageError',{pageIndex:pageIndex,error:wrappedException,intent:data.intent})})})},this);handler.on('GetTextContent',function wphExtractText(data,sink){var pageIndex=data.pageIndex;sink.onPull=function(desiredSize){};sink.onCancel=function(reason){};pdfManager.getPage(pageIndex).then(function(page){var task=new WorkerTask('GetTextContent: page '+pageIndex);startWorkerTask(task);var start=verbosity>=_util.VerbosityLevel.INFOS?Date.now():0;page.extractTextContent({handler:handler,task:task,sink:sink,normalizeWhitespace:data.normalizeWhitespace,combineTextItems:data.combineTextItems}).then(function(){finishWorkerTask(task);if(start){(0,_util.info)("page=".concat(pageIndex+1," - getTextContent: time=")+"".concat(Date.now()-start,"ms"))}sink.close()},function(reason){finishWorkerTask(task);if(task.terminated){return}sink.error(reason);throw reason;})})});handler.on('FontFallback',function(data){return pdfManager.fontFallback(data.id,handler)});handler.on('Cleanup',function wphCleanup(data){return pdfManager.cleanup()});handler.on('Terminate',function wphTerminate(data){terminated=true;if(pdfManager){pdfManager.terminate();pdfManager=null}if(cancelXHRs){cancelXHRs()}(0,_primitives.clearPrimitiveCaches)();var waitOn=[];WorkerTasks.forEach(function(task){waitOn.push(task.finished);task.terminate()});return Promise.all(waitOn).then(function(){handler.destroy();handler=null})});handler.on('Ready',function wphReady(data){setupDoc(docParams);docParams=null});return workerHandlerName},initializeFromPort:function initializeFromPort(port){var handler=new _message_handler.MessageHandler('worker','main',port);WorkerMessageHandler.setup(handler,port);handler.send('ready',null)}};exports.WorkerMessageHandler=WorkerMessageHandler;function isMessagePort(maybePort){return typeof maybePort.postMessage==='function'&&'onmessage'in maybePort}if(typeof window==='undefined'&&!(0,_is_node["default"])()&&typeof self!=='undefined'&&isMessagePort(self)){WorkerMessageHandler.initializeFromPort(self)}}),(function(module,exports,__w_pdfjs_require__){"use strict";module.exports=__w_pdfjs_require__(3)}),(function(module,exports,__w_pdfjs_require__){"use strict";(function(module){function _typeof(obj){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 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={};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=Gp.constructor=GeneratorFunctionPrototype;GeneratorFunctionPrototype.constructor=GeneratorFunction;GeneratorFunctionPrototype[toStringTagSymbol]=GeneratorFunction.displayName="GeneratorFunction";function defineIteratorMethods(prototype){["next","throw","return"].forEach(function(method){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;if(!(toStringTagSymbol in genFun)){genFun[toStringTagSymbol]="GeneratorFunction"}}genFun.prototype=Object.create(Gp);return genFun};exports.awrap=function(arg){return{__await:arg}};function AsyncIterator(generator){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 Promise.resolve(value.__await).then(function(value){invoke("next",value,resolve,reject)},function(err){invoke("throw",err,resolve,reject)})}return Promise.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 Promise(function(resolve,reject){invoke(method,arg,resolve,reject)})}return previousPromise=previousPromise?previousPromise.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}this._invoke=enqueue}defineIteratorMethods(AsyncIterator.prototype);AsyncIterator.prototype[asyncIteratorSymbol]=function(){return this};exports.AsyncIterator=AsyncIterator;exports.async=function(innerFn,outerFn,self,tryLocsList){var iter=new AsyncIterator(wrap(innerFn,outerFn,self,tryLocsList));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);Gp[toStringTagSymbol]="Generator";Gp[iteratorSymbol]=function(){return this};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=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=0;--i){var entry=this.tryEntries[i];if(entry.tryLoc<=this.prev&&hasOwn.call(entry,"finallyLoc")&&this.prev=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?undefined:_typeof(module))==="object"?module.exports:{});try{regeneratorRuntime=runtime}catch(accidentalStrictMode){Function("r","regeneratorRuntime = r")(runtime)}}.call(this,__w_pdfjs_require__(4)(module)))}),(function(module,exports,__w_pdfjs_require__){"use strict";module.exports=function(module){if(!module.webpackPolyfill){module.deprecate=function(){};module.paths=[];if(!module.children)module.children=[];Object.defineProperty(module,"loaded",{enumerable:true,get:function get(){return module.l}});Object.defineProperty(module,"id",{enumerable:true,get:function get(){return module.i}});module.webpackPolyfill=1}return module}}),(function(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.createPromiseCapability=createPromiseCapability;exports.getVerbosityLevel=getVerbosityLevel;exports.info=info;exports.isArrayBuffer=isArrayBuffer;exports.isArrayEqual=isArrayEqual;exports.isBool=isBool;exports.isEmptyObj=isEmptyObj;exports.isNum=isNum;exports.isString=isString;exports.isSpace=isSpace;exports.isSameOrigin=isSameOrigin;exports.createValidAbsoluteUrl=createValidAbsoluteUrl;exports.isLittleEndian=isLittleEndian;exports.isEvalSupported=isEvalSupported;exports.log2=log2;exports.readInt8=readInt8;exports.readUint16=readUint16;exports.readUint32=readUint32;exports.removeNullCharacters=removeNullCharacters;exports.setVerbosityLevel=setVerbosityLevel;exports.shadow=shadow;exports.string32=string32;exports.stringToBytes=stringToBytes;exports.stringToPDFString=stringToPDFString;exports.stringToUTF8String=stringToUTF8String;exports.utf8StringToString=utf8StringToString;exports.warn=warn;exports.unreachable=unreachable;Object.defineProperty(exports,"ReadableStream",{enumerable:true,get:function get(){return _streams_polyfill.ReadableStream}});Object.defineProperty(exports,"URL",{enumerable:true,get:function get(){return _url_polyfill.URL}});exports.createObjectURL=exports.FormatError=exports.Util=exports.UnknownErrorException=exports.UnexpectedResponseException=exports.TextRenderingMode=exports.StreamType=exports.PermissionFlag=exports.PasswordResponses=exports.PasswordException=exports.NativeImageDecoding=exports.MissingPDFException=exports.InvalidPDFException=exports.AbortException=exports.CMapCompressionType=exports.ImageKind=exports.FontType=exports.AnnotationType=exports.AnnotationFlag=exports.AnnotationFieldFlag=exports.AnnotationBorderStyleType=exports.UNSUPPORTED_FEATURES=exports.VerbosityLevel=exports.OPS=exports.IDENTITY_MATRIX=exports.FONT_IDENTITY_MATRIX=void 0;__w_pdfjs_require__(6);var _streams_polyfill=__w_pdfjs_require__(147);var _url_polyfill=__w_pdfjs_require__(149);function _typeof(obj){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 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 NativeImageDecoding={NONE:'none',DECODE:'decode',DISPLAY:'display'};exports.NativeImageDecoding=NativeImageDecoding;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 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 StreamType={UNKNOWN:0,FLATE:1,LZW:2,DCT:3,JPX:4,JBIG:5,A85:6,AHX:7,CCF:8,RL:9};exports.StreamType=StreamType;var FontType={UNKNOWN:0,TYPE1:1,TYPE1C:2,CIDFONTTYPE0:3,CIDFONTTYPE0C:4,TRUETYPE:5,CIDFONTTYPE2:6,TYPE3:7,OPENTYPE:8,TYPE0:9,MMTYPE1:10};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',smask:'smask',shadingPattern:'shadingPattern',font:'font'};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: '+msg)}}function warn(msg){if(verbosity>=VerbosityLevel.WARNINGS){console.log('Warning: '+msg)}}function unreachable(msg){throw new Error(msg);}function assert(cond,msg){if(!cond){unreachable(msg)}}function isSameOrigin(baseUrl,otherUrl){try{var base=new _url_polyfill.URL(baseUrl);if(!base.origin||base.origin==='null'){return false}}catch(e){return false}var other=new _url_polyfill.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_polyfill.URL(url,baseUrl):new _url_polyfill.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 PasswordException=function PasswordExceptionClosure(){function PasswordException(msg,code){this.name='PasswordException';this.message=msg;this.code=code}PasswordException.prototype=new Error();PasswordException.constructor=PasswordException;return PasswordException}();exports.PasswordException=PasswordException;var UnknownErrorException=function UnknownErrorExceptionClosure(){function UnknownErrorException(msg,details){this.name='UnknownErrorException';this.message=msg;this.details=details}UnknownErrorException.prototype=new Error();UnknownErrorException.constructor=UnknownErrorException;return UnknownErrorException}();exports.UnknownErrorException=UnknownErrorException;var InvalidPDFException=function InvalidPDFExceptionClosure(){function InvalidPDFException(msg){this.name='InvalidPDFException';this.message=msg}InvalidPDFException.prototype=new Error();InvalidPDFException.constructor=InvalidPDFException;return InvalidPDFException}();exports.InvalidPDFException=InvalidPDFException;var MissingPDFException=function MissingPDFExceptionClosure(){function MissingPDFException(msg){this.name='MissingPDFException';this.message=msg}MissingPDFException.prototype=new Error();MissingPDFException.constructor=MissingPDFException;return MissingPDFException}();exports.MissingPDFException=MissingPDFException;var UnexpectedResponseException=function UnexpectedResponseExceptionClosure(){function UnexpectedResponseException(msg,status){this.name='UnexpectedResponseException';this.message=msg;this.status=status}UnexpectedResponseException.prototype=new Error();UnexpectedResponseException.constructor=UnexpectedResponseException;return UnexpectedResponseException}();exports.UnexpectedResponseException=UnexpectedResponseException;var FormatError=function FormatErrorClosure(){function FormatError(msg){this.message=msg}FormatError.prototype=new Error();FormatError.prototype.name='FormatError';FormatError.constructor=FormatError;return FormatError}();exports.FormatError=FormatError;var AbortException=function AbortExceptionClosure(){function AbortException(msg){this.name='AbortException';this.message=msg}AbortException.prototype=new Error();AbortException.constructor=AbortException;return AbortException}();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>24&0xff,value>>16&0xff,value>>8&0xff,value&0xff)}function log2(x){if(x<=0){return 0}return Math.ceil(Math.log2(x))}function readInt8(data,start){return data[start]<<24>>24}function readUint16(data,offset){return data[offset]<<8|data[offset+1]}function readUint32(data,offset){return(data[offset]<<24|data[offset+1]<<16|data[offset+2]<<8|data[offset+3])>>>0}function isLittleEndian(){var buffer8=new Uint8Array(4);buffer8[0]=1;var view32=new Uint32Array(buffer8.buffer,0,1);return view32[0]===1}function isEvalSupported(){try{new Function('');return true}catch(e){return false}}var Util=function UtilClosure(){function Util(){}var rgbBuf=['rgb(',0,',',0,',',0,')'];Util.makeCssRgb=function Util_makeCssRgb(r,g,b){rgbBuf[1]=r;rgbBuf[3]=g;rgbBuf[5]=b;return rgbBuf.join('')};Util.transform=function Util_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]]};Util.applyTransform=function Util_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]};Util.applyInverseTransform=function Util_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]};Util.getAxialAlignedBoundingBox=function Util_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])]};Util.inverseTransform=function Util_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]};Util.apply3dTransform=function Util_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]]};Util.singularValueDecompose2dScale=function Util_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((a+d)*(a+d)-4*(a*d-c*b))/2;var sx=first+second||1;var sy=first-second||1;return[Math.sqrt(sx),Math.sqrt(sy)]};Util.normalizeRect=function Util_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};Util.intersect=function Util_intersect(rect1,rect2){function compare(a,b){return a-b}var orderedX=[rect1[0],rect1[2],rect2[0],rect2[2]].sort(compare),orderedY=[rect1[1],rect1[3],rect2[1],rect2[3]].sort(compare),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 false}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 false}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 i,n=str.length,strBuf=[];if(str[0]==='\xFE'&&str[1]==='\xFF'){for(i=2;i2&&arguments[2]!==undefined?arguments[2]:false;if(!forceDataSchema&&_url_polyfill.URL.createObjectURL){var blob=new Blob([data],{type:contentType});return _url_polyfill.URL.createObjectURL(blob)}var buffer='data:'+contentType+';base64,';for(var i=0,ii=data.length;i>2,d2=(b1&3)<<4|b2>>4;var d3=i+1>6:64;var d4=i+21?!!arguments[1]:!this.contains(token);return this[force?'add':'remove'](token),force}})();(function checkStringStartsWith(){if(String.prototype.startsWith){return}__w_pdfjs_require__(9)})();(function checkStringEndsWith(){if(String.prototype.endsWith){return}__w_pdfjs_require__(40)})();(function checkStringIncludes(){if(String.prototype.includes){return}__w_pdfjs_require__(42)})();(function checkArrayIncludes(){if(Array.prototype.includes){return}__w_pdfjs_require__(44)})();(function checkArrayFrom(){if(Array.from){return}__w_pdfjs_require__(51)})();(function checkObjectAssign(){if(Object.assign){return}__w_pdfjs_require__(74)})();(function checkMathLog2(){if(Math.log2){return}Math.log2=__w_pdfjs_require__(79)})();(function checkNumberIsNaN(){if(Number.isNaN){return}Number.isNaN=__w_pdfjs_require__(81)})();(function checkNumberIsInteger(){if(Number.isInteger){return}Number.isInteger=__w_pdfjs_require__(83)})();(function checkPromise(){if(globalScope.Promise&&globalScope.Promise.prototype&&globalScope.Promise.prototype["finally"]){return}globalScope.Promise=__w_pdfjs_require__(86)})();(function checkWeakMap(){if(globalScope.WeakMap){return}globalScope.WeakMap=__w_pdfjs_require__(106)})();(function checkWeakSet(){if(globalScope.WeakSet){return}globalScope.WeakSet=__w_pdfjs_require__(123)})();(function checkStringCodePointAt(){if(String.codePointAt){return}String.codePointAt=__w_pdfjs_require__(127)})();(function checkStringFromCodePoint(){if(String.fromCodePoint){return}String.fromCodePoint=__w_pdfjs_require__(129)})();(function checkSymbol(){if(globalScope.Symbol){return}__w_pdfjs_require__(131)})();(function checkStringPadStart(){if(String.prototype.padStart){return}__w_pdfjs_require__(138)})();(function checkStringPadEnd(){if(String.prototype.padEnd){return}__w_pdfjs_require__(142)})();(function checkObjectValues(){if(Object.values){return}Object.values=__w_pdfjs_require__(144)})()}}),(function(module,exports,__w_pdfjs_require__){"use strict";module.exports=typeof window!=='undefined'&&window.Math===Math?window:typeof global!=='undefined'&&global.Math===Math?global:typeof self!=='undefined'&&self.Math===Math?self:{}}),(function(module,exports,__w_pdfjs_require__){"use strict";function _typeof(obj){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)}module.exports=function isNodeJS(){return(typeof process==="undefined"?"undefined":_typeof(process))==='object'&&process+''==='[object process]'&&!process.versions['nw']&&!process.versions['electron']}}),(function(module,exports,__w_pdfjs_require__){"use strict";__w_pdfjs_require__(10);module.exports=__w_pdfjs_require__(13).String.startsWith}),(function(module,exports,__w_pdfjs_require__){"use strict";var $export=__w_pdfjs_require__(11);var toLength=__w_pdfjs_require__(32);var context=__w_pdfjs_require__(34);var STARTS_WITH='startsWith';var $startsWith=''[STARTS_WITH];$export($export.P+$export.F*__w_pdfjs_require__(39)(STARTS_WITH),'String',{startsWith:function startsWith(searchString){var that=context(this,searchString,STARTS_WITH);var index=toLength(Math.min(arguments.length>1?arguments[1]:undefined,that.length));var search=String(searchString);return $startsWith?$startsWith.call(that,search,index):that.slice(index,index+search.length)===search}})}),(function(module,exports,__w_pdfjs_require__){"use strict";var global=__w_pdfjs_require__(12);var core=__w_pdfjs_require__(13);var hide=__w_pdfjs_require__(14);var redefine=__w_pdfjs_require__(24);var ctx=__w_pdfjs_require__(30);var PROTOTYPE='prototype';var $export=function $export(type,name,source){var IS_FORCED=type&$export.F;var IS_GLOBAL=type&$export.G;var IS_STATIC=type&$export.S;var IS_PROTO=type&$export.P;var IS_BIND=type&$export.B;var target=IS_GLOBAL?global:IS_STATIC?global[name]||(global[name]={}):(global[name]||{})[PROTOTYPE];var exports=IS_GLOBAL?core:core[name]||(core[name]={});var expProto=exports[PROTOTYPE]||(exports[PROTOTYPE]={});var key,own,out,exp;if(IS_GLOBAL)source=name;for(key in source){own=!IS_FORCED&&target&&target[key]!==undefined;out=(own?target:source)[key];exp=IS_BIND&&own?ctx(out,global):IS_PROTO&&typeof out=='function'?ctx(Function.call,out):out;if(target)redefine(target,key,out,type&$export.U);if(exports[key]!=out)hide(exports,key,exp);if(IS_PROTO&&expProto[key]!=out)expProto[key]=out}};global.core=core;$export.F=1;$export.G=2;$export.S=4;$export.P=8;$export.B=16;$export.W=32;$export.U=64;$export.R=128;module.exports=$export}),(function(module,exports,__w_pdfjs_require__){"use strict";var global=module.exports=typeof window!='undefined'&&window.Math==Math?window:typeof self!='undefined'&&self.Math==Math?self:Function('return this')();if(typeof __g=='number')__g=global}),(function(module,exports,__w_pdfjs_require__){"use strict";var core=module.exports={version:'2.6.9'};if(typeof __e=='number')__e=core}),(function(module,exports,__w_pdfjs_require__){"use strict";var dP=__w_pdfjs_require__(15);var createDesc=__w_pdfjs_require__(23);module.exports=__w_pdfjs_require__(19)?function(object,key,value){return dP.f(object,key,createDesc(1,value))}:function(object,key,value){object[key]=value;return object}}),(function(module,exports,__w_pdfjs_require__){"use strict";var anObject=__w_pdfjs_require__(16);var IE8_DOM_DEFINE=__w_pdfjs_require__(18);var toPrimitive=__w_pdfjs_require__(22);var dP=Object.defineProperty;exports.f=__w_pdfjs_require__(19)?Object.defineProperty:function defineProperty(O,P,Attributes){anObject(O);P=toPrimitive(P,true);anObject(Attributes);if(IE8_DOM_DEFINE)try{return dP(O,P,Attributes)}catch(e){}if('get'in Attributes||'set'in Attributes)throw TypeError('Accessors not supported!');if('value'in Attributes)O[P]=Attributes.value;return O}}),(function(module,exports,__w_pdfjs_require__){"use strict";var isObject=__w_pdfjs_require__(17);module.exports=function(it){if(!isObject(it))throw TypeError(it+' is not an object!');return it}}),(function(module,exports,__w_pdfjs_require__){"use strict";function _typeof(obj){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)}module.exports=function(it){return _typeof(it)==='object'?it!==null:typeof it==='function'}}),(function(module,exports,__w_pdfjs_require__){"use strict";module.exports=!__w_pdfjs_require__(19)&&!__w_pdfjs_require__(20)(function(){return Object.defineProperty(__w_pdfjs_require__(21)('div'),'a',{get:function get(){return 7}}).a!=7})}),(function(module,exports,__w_pdfjs_require__){"use strict";module.exports=!__w_pdfjs_require__(20)(function(){return Object.defineProperty({},'a',{get:function get(){return 7}}).a!=7})}),(function(module,exports,__w_pdfjs_require__){"use strict";module.exports=function(exec){try{return!!exec()}catch(e){return true}}}),(function(module,exports,__w_pdfjs_require__){"use strict";var isObject=__w_pdfjs_require__(17);var document=__w_pdfjs_require__(12).document;var is=isObject(document)&&isObject(document.createElement);module.exports=function(it){return is?document.createElement(it):{}}}),(function(module,exports,__w_pdfjs_require__){"use strict";var isObject=__w_pdfjs_require__(17);module.exports=function(it,S){if(!isObject(it))return it;var fn,val;if(S&&typeof(fn=it.toString)=='function'&&!isObject(val=fn.call(it)))return val;if(typeof(fn=it.valueOf)=='function'&&!isObject(val=fn.call(it)))return val;if(!S&&typeof(fn=it.toString)=='function'&&!isObject(val=fn.call(it)))return val;throw TypeError("Can't convert object to primitive value");}}),(function(module,exports,__w_pdfjs_require__){"use strict";module.exports=function(bitmap,value){return{enumerable:!(bitmap&1),configurable:!(bitmap&2),writable:!(bitmap&4),value:value}}}),(function(module,exports,__w_pdfjs_require__){"use strict";var global=__w_pdfjs_require__(12);var hide=__w_pdfjs_require__(14);var has=__w_pdfjs_require__(25);var SRC=__w_pdfjs_require__(26)('src');var $toString=__w_pdfjs_require__(27);var TO_STRING='toString';var TPL=(''+$toString).split(TO_STRING);__w_pdfjs_require__(13).inspectSource=function(it){return $toString.call(it)};(module.exports=function(O,key,val,safe){var isFunction=typeof val=='function';if(isFunction)has(val,'name')||hide(val,'name',key);if(O[key]===val)return;if(isFunction)has(val,SRC)||hide(val,SRC,O[key]?''+O[key]:TPL.join(String(key)));if(O===global){O[key]=val}else if(!safe){delete O[key];hide(O,key,val)}else if(O[key]){O[key]=val}else{hide(O,key,val)}})(Function.prototype,TO_STRING,function toString(){return typeof this=='function'&&this[SRC]||$toString.call(this)})}),(function(module,exports,__w_pdfjs_require__){"use strict";var hasOwnProperty={}.hasOwnProperty;module.exports=function(it,key){return hasOwnProperty.call(it,key)}}),(function(module,exports,__w_pdfjs_require__){"use strict";var id=0;var px=Math.random();module.exports=function(key){return'Symbol('.concat(key===undefined?'':key,')_',(++id+px).toString(36))}}),(function(module,exports,__w_pdfjs_require__){"use strict";module.exports=__w_pdfjs_require__(28)('native-function-to-string',Function.toString)}),(function(module,exports,__w_pdfjs_require__){"use strict";var core=__w_pdfjs_require__(13);var global=__w_pdfjs_require__(12);var SHARED='__core-js_shared__';var store=global[SHARED]||(global[SHARED]={});(module.exports=function(key,value){return store[key]||(store[key]=value!==undefined?value:{})})('versions',[]).push({version:core.version,mode:__w_pdfjs_require__(29)?'pure':'global',copyright:'© 2019 Denis Pushkarev (zloirock.ru)'})}),(function(module,exports,__w_pdfjs_require__){"use strict";module.exports=false}),(function(module,exports,__w_pdfjs_require__){"use strict";var aFunction=__w_pdfjs_require__(31);module.exports=function(fn,that,length){aFunction(fn);if(that===undefined)return fn;switch(length){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)}}}),(function(module,exports,__w_pdfjs_require__){"use strict";module.exports=function(it){if(typeof it!='function')throw TypeError(it+' is not a function!');return it}}),(function(module,exports,__w_pdfjs_require__){"use strict";var toInteger=__w_pdfjs_require__(33);var min=Math.min;module.exports=function(it){return it>0?min(toInteger(it),0x1fffffffffffff):0}}),(function(module,exports,__w_pdfjs_require__){"use strict";var ceil=Math.ceil;var floor=Math.floor;module.exports=function(it){return isNaN(it=+it)?0:(it>0?floor:ceil)(it)}}),(function(module,exports,__w_pdfjs_require__){"use strict";var isRegExp=__w_pdfjs_require__(35);var defined=__w_pdfjs_require__(38);module.exports=function(that,searchString,NAME){if(isRegExp(searchString))throw TypeError('String#'+NAME+" doesn't accept regex!");return String(defined(that))}}),(function(module,exports,__w_pdfjs_require__){"use strict";var isObject=__w_pdfjs_require__(17);var cof=__w_pdfjs_require__(36);var MATCH=__w_pdfjs_require__(37)('match');module.exports=function(it){var isRegExp;return isObject(it)&&((isRegExp=it[MATCH])!==undefined?!!isRegExp:cof(it)=='RegExp')}}),(function(module,exports,__w_pdfjs_require__){"use strict";var toString={}.toString;module.exports=function(it){return toString.call(it).slice(8,-1)}}),(function(module,exports,__w_pdfjs_require__){"use strict";var store=__w_pdfjs_require__(28)('wks');var uid=__w_pdfjs_require__(26);var _Symbol=__w_pdfjs_require__(12).Symbol;var USE_SYMBOL=typeof _Symbol=='function';var $exports=module.exports=function(name){return store[name]||(store[name]=USE_SYMBOL&&_Symbol[name]||(USE_SYMBOL?_Symbol:uid)('Symbol.'+name))};$exports.store=store}),(function(module,exports,__w_pdfjs_require__){"use strict";module.exports=function(it){if(it==undefined)throw TypeError("Can't call method on "+it);return it}}),(function(module,exports,__w_pdfjs_require__){"use strict";var MATCH=__w_pdfjs_require__(37)('match');module.exports=function(KEY){var re=/./;try{'/./'[KEY](re)}catch(e){try{re[MATCH]=false;return!'/./'[KEY](re)}catch(f){}}return true}}),(function(module,exports,__w_pdfjs_require__){"use strict";__w_pdfjs_require__(41);module.exports=__w_pdfjs_require__(13).String.endsWith}),(function(module,exports,__w_pdfjs_require__){"use strict";var $export=__w_pdfjs_require__(11);var toLength=__w_pdfjs_require__(32);var context=__w_pdfjs_require__(34);var ENDS_WITH='endsWith';var $endsWith=''[ENDS_WITH];$export($export.P+$export.F*__w_pdfjs_require__(39)(ENDS_WITH),'String',{endsWith:function endsWith(searchString){var that=context(this,searchString,ENDS_WITH);var endPosition=arguments.length>1?arguments[1]:undefined;var len=toLength(that.length);var end=endPosition===undefined?len:Math.min(toLength(endPosition),len);var search=String(searchString);return $endsWith?$endsWith.call(that,search,end):that.slice(end-search.length,end)===search}})}),(function(module,exports,__w_pdfjs_require__){"use strict";__w_pdfjs_require__(43);module.exports=__w_pdfjs_require__(13).String.includes}),(function(module,exports,__w_pdfjs_require__){"use strict";var $export=__w_pdfjs_require__(11);var context=__w_pdfjs_require__(34);var INCLUDES='includes';$export($export.P+$export.F*__w_pdfjs_require__(39)(INCLUDES),'String',{includes:function includes(searchString){return!!~context(this,searchString,INCLUDES).indexOf(searchString,arguments.length>1?arguments[1]:undefined)}})}),(function(module,exports,__w_pdfjs_require__){"use strict";__w_pdfjs_require__(45);module.exports=__w_pdfjs_require__(13).Array.includes}),(function(module,exports,__w_pdfjs_require__){"use strict";var $export=__w_pdfjs_require__(11);var $includes=__w_pdfjs_require__(46)(true);$export($export.P,'Array',{includes:function includes(el){return $includes(this,el,arguments.length>1?arguments[1]:undefined)}});__w_pdfjs_require__(50)('includes')}),(function(module,exports,__w_pdfjs_require__){"use strict";var toIObject=__w_pdfjs_require__(47);var toLength=__w_pdfjs_require__(32);var toAbsoluteIndex=__w_pdfjs_require__(49);module.exports=function(IS_INCLUDES){return function($this,el,fromIndex){var O=toIObject($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){if(O[index]===el)return IS_INCLUDES||index||0}}return!IS_INCLUDES&&-1}}}),(function(module,exports,__w_pdfjs_require__){"use strict";var IObject=__w_pdfjs_require__(48);var defined=__w_pdfjs_require__(38);module.exports=function(it){return IObject(defined(it))}}),(function(module,exports,__w_pdfjs_require__){"use strict";var cof=__w_pdfjs_require__(36);module.exports=Object('z').propertyIsEnumerable(0)?Object:function(it){return cof(it)=='String'?it.split(''):Object(it)}}),(function(module,exports,__w_pdfjs_require__){"use strict";var toInteger=__w_pdfjs_require__(33);var max=Math.max;var min=Math.min;module.exports=function(index,length){index=toInteger(index);return index<0?max(index+length,0):min(index,length)}}),(function(module,exports,__w_pdfjs_require__){"use strict";var UNSCOPABLES=__w_pdfjs_require__(37)('unscopables');var ArrayProto=Array.prototype;if(ArrayProto[UNSCOPABLES]==undefined)__w_pdfjs_require__(14)(ArrayProto,UNSCOPABLES,{});module.exports=function(key){ArrayProto[UNSCOPABLES][key]=true}}),(function(module,exports,__w_pdfjs_require__){"use strict";__w_pdfjs_require__(52);__w_pdfjs_require__(67);module.exports=__w_pdfjs_require__(13).Array.from}),(function(module,exports,__w_pdfjs_require__){"use strict";var $at=__w_pdfjs_require__(53)(true);__w_pdfjs_require__(54)(String,'String',function(iterated){this._t=String(iterated);this._i=0},function(){var O=this._t;var index=this._i;var point;if(index>=O.length)return{value:undefined,done:true};point=$at(O,index);this._i+=point.length;return{value:point,done:false}})}),(function(module,exports,__w_pdfjs_require__){"use strict";var toInteger=__w_pdfjs_require__(33);var defined=__w_pdfjs_require__(38);module.exports=function(TO_STRING){return function(that,pos){var s=String(defined(that));var i=toInteger(pos);var l=s.length;var a,b;if(i<0||i>=l)return TO_STRING?'':undefined;a=s.charCodeAt(i);return a<0xd800||a>0xdbff||i+1===l||(b=s.charCodeAt(i+1))<0xdc00||b>0xdfff?TO_STRING?s.charAt(i):a:TO_STRING?s.slice(i,i+2):(a-0xd800<<10)+(b-0xdc00)+0x10000}}}),(function(module,exports,__w_pdfjs_require__){"use strict";var LIBRARY=__w_pdfjs_require__(29);var $export=__w_pdfjs_require__(11);var redefine=__w_pdfjs_require__(24);var hide=__w_pdfjs_require__(14);var Iterators=__w_pdfjs_require__(55);var $iterCreate=__w_pdfjs_require__(56);var setToStringTag=__w_pdfjs_require__(64);var getPrototypeOf=__w_pdfjs_require__(65);var ITERATOR=__w_pdfjs_require__(37)('iterator');var BUGGY=!([].keys&&'next'in[].keys());var FF_ITERATOR='@@iterator';var KEYS='keys';var VALUES='values';var returnThis=function returnThis(){return this};module.exports=function(Base,NAME,Constructor,next,DEFAULT,IS_SET,FORCED){$iterCreate(Constructor,NAME,next);var getMethod=function getMethod(kind){if(!BUGGY&&kind in proto)return proto[kind];switch(kind){case KEYS:return function keys(){return new Constructor(this,kind)};case VALUES:return function values(){return new Constructor(this,kind)}}return function entries(){return new Constructor(this,kind)}};var TAG=NAME+' Iterator';var DEF_VALUES=DEFAULT==VALUES;var VALUES_BUG=false;var proto=Base.prototype;var $native=proto[ITERATOR]||proto[FF_ITERATOR]||DEFAULT&&proto[DEFAULT];var $default=$native||getMethod(DEFAULT);var $entries=DEFAULT?!DEF_VALUES?$default:getMethod('entries'):undefined;var $anyNative=NAME=='Array'?proto.entries||$native:$native;var methods,key,IteratorPrototype;if($anyNative){IteratorPrototype=getPrototypeOf($anyNative.call(new Base()));if(IteratorPrototype!==Object.prototype&&IteratorPrototype.next){setToStringTag(IteratorPrototype,TAG,true);if(!LIBRARY&&typeof IteratorPrototype[ITERATOR]!='function')hide(IteratorPrototype,ITERATOR,returnThis)}}if(DEF_VALUES&&$native&&$native.name!==VALUES){VALUES_BUG=true;$default=function values(){return $native.call(this)}}if((!LIBRARY||FORCED)&&(BUGGY||VALUES_BUG||!proto[ITERATOR])){hide(proto,ITERATOR,$default)}Iterators[NAME]=$default;Iterators[TAG]=returnThis;if(DEFAULT){methods={values:DEF_VALUES?$default:getMethod(VALUES),keys:IS_SET?$default:getMethod(KEYS),entries:$entries};if(FORCED)for(key in methods){if(!(key in proto))redefine(proto,key,methods[key])}else $export($export.P+$export.F*(BUGGY||VALUES_BUG),NAME,methods)}return methods}}),(function(module,exports,__w_pdfjs_require__){"use strict";module.exports={}}),(function(module,exports,__w_pdfjs_require__){"use strict";var create=__w_pdfjs_require__(57);var descriptor=__w_pdfjs_require__(23);var setToStringTag=__w_pdfjs_require__(64);var IteratorPrototype={};__w_pdfjs_require__(14)(IteratorPrototype,__w_pdfjs_require__(37)('iterator'),function(){return this});module.exports=function(Constructor,NAME,next){Constructor.prototype=create(IteratorPrototype,{next:descriptor(1,next)});setToStringTag(Constructor,NAME+' Iterator')}}),(function(module,exports,__w_pdfjs_require__){"use strict";var anObject=__w_pdfjs_require__(16);var dPs=__w_pdfjs_require__(58);var enumBugKeys=__w_pdfjs_require__(62);var IE_PROTO=__w_pdfjs_require__(61)('IE_PROTO');var Empty=function Empty(){};var PROTOTYPE='prototype';var _createDict=function createDict(){var iframe=__w_pdfjs_require__(21)('iframe');var i=enumBugKeys.length;var lt='<';var gt='>';var iframeDocument;iframe.style.display='none';__w_pdfjs_require__(63).appendChild(iframe);iframe.src='javascript:';iframeDocument=iframe.contentWindow.document;iframeDocument.open();iframeDocument.write(lt+'script'+gt+'document.F=Object'+lt+'/script'+gt);iframeDocument.close();_createDict=iframeDocument.F;while(i--){delete _createDict[PROTOTYPE][enumBugKeys[i]]}return _createDict()};module.exports=Object.create||function create(O,Properties){var result;if(O!==null){Empty[PROTOTYPE]=anObject(O);result=new Empty();Empty[PROTOTYPE]=null;result[IE_PROTO]=O}else result=_createDict();return Properties===undefined?result:dPs(result,Properties)}}),(function(module,exports,__w_pdfjs_require__){"use strict";var dP=__w_pdfjs_require__(15);var anObject=__w_pdfjs_require__(16);var getKeys=__w_pdfjs_require__(59);module.exports=__w_pdfjs_require__(19)?Object.defineProperties:function defineProperties(O,Properties){anObject(O);var keys=getKeys(Properties);var length=keys.length;var i=0;var P;while(length>i){dP.f(O,P=keys[i++],Properties[P])}return O}}),(function(module,exports,__w_pdfjs_require__){"use strict";var $keys=__w_pdfjs_require__(60);var enumBugKeys=__w_pdfjs_require__(62);module.exports=Object.keys||function keys(O){return $keys(O,enumBugKeys)}}),(function(module,exports,__w_pdfjs_require__){"use strict";var has=__w_pdfjs_require__(25);var toIObject=__w_pdfjs_require__(47);var arrayIndexOf=__w_pdfjs_require__(46)(false);var IE_PROTO=__w_pdfjs_require__(61)('IE_PROTO');module.exports=function(object,names){var O=toIObject(object);var i=0;var result=[];var key;for(key in O){if(key!=IE_PROTO)has(O,key)&&result.push(key)}while(names.length>i){if(has(O,key=names[i++])){~arrayIndexOf(result,key)||result.push(key)}}return result}}),(function(module,exports,__w_pdfjs_require__){"use strict";var shared=__w_pdfjs_require__(28)('keys');var uid=__w_pdfjs_require__(26);module.exports=function(key){return shared[key]||(shared[key]=uid(key))}}),(function(module,exports,__w_pdfjs_require__){"use strict";module.exports='constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split(',')}),(function(module,exports,__w_pdfjs_require__){"use strict";var document=__w_pdfjs_require__(12).document;module.exports=document&&document.documentElement}),(function(module,exports,__w_pdfjs_require__){"use strict";var def=__w_pdfjs_require__(15).f;var has=__w_pdfjs_require__(25);var TAG=__w_pdfjs_require__(37)('toStringTag');module.exports=function(it,tag,stat){if(it&&!has(it=stat?it:it.prototype,TAG))def(it,TAG,{configurable:true,value:tag})}}),(function(module,exports,__w_pdfjs_require__){"use strict";var has=__w_pdfjs_require__(25);var toObject=__w_pdfjs_require__(66);var IE_PROTO=__w_pdfjs_require__(61)('IE_PROTO');var ObjectProto=Object.prototype;module.exports=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?ObjectProto:null}}),(function(module,exports,__w_pdfjs_require__){"use strict";var defined=__w_pdfjs_require__(38);module.exports=function(it){return Object(defined(it))}}),(function(module,exports,__w_pdfjs_require__){"use strict";var ctx=__w_pdfjs_require__(30);var $export=__w_pdfjs_require__(11);var toObject=__w_pdfjs_require__(66);var call=__w_pdfjs_require__(68);var isArrayIter=__w_pdfjs_require__(69);var toLength=__w_pdfjs_require__(32);var createProperty=__w_pdfjs_require__(70);var getIterFn=__w_pdfjs_require__(71);$export($export.S+$export.F*!__w_pdfjs_require__(73)(function(iter){Array.from(iter)}),'Array',{from:function from(arrayLike){var O=toObject(arrayLike);var C=typeof this=='function'?this:Array;var aLen=arguments.length;var mapfn=aLen>1?arguments[1]:undefined;var mapping=mapfn!==undefined;var index=0;var iterFn=getIterFn(O);var length,result,step,iterator;if(mapping)mapfn=ctx(mapfn,aLen>2?arguments[2]:undefined,2);if(iterFn!=undefined&&!(C==Array&&isArrayIter(iterFn))){for(iterator=iterFn.call(O),result=new C();!(step=iterator.next()).done;index++){createProperty(result,index,mapping?call(iterator,mapfn,[step.value,index],true):step.value)}}else{length=toLength(O.length);for(result=new C(length);length>index;index++){createProperty(result,index,mapping?mapfn(O[index],index):O[index])}}result.length=index;return result}})}),(function(module,exports,__w_pdfjs_require__){"use strict";var anObject=__w_pdfjs_require__(16);module.exports=function(iterator,fn,value,entries){try{return entries?fn(anObject(value)[0],value[1]):fn(value)}catch(e){var ret=iterator['return'];if(ret!==undefined)anObject(ret.call(iterator));throw e;}}}),(function(module,exports,__w_pdfjs_require__){"use strict";var Iterators=__w_pdfjs_require__(55);var ITERATOR=__w_pdfjs_require__(37)('iterator');var ArrayProto=Array.prototype;module.exports=function(it){return it!==undefined&&(Iterators.Array===it||ArrayProto[ITERATOR]===it)}}),(function(module,exports,__w_pdfjs_require__){"use strict";var $defineProperty=__w_pdfjs_require__(15);var createDesc=__w_pdfjs_require__(23);module.exports=function(object,index,value){if(index in object)$defineProperty.f(object,index,createDesc(0,value));else object[index]=value}}),(function(module,exports,__w_pdfjs_require__){"use strict";var classof=__w_pdfjs_require__(72);var ITERATOR=__w_pdfjs_require__(37)('iterator');var Iterators=__w_pdfjs_require__(55);module.exports=__w_pdfjs_require__(13).getIteratorMethod=function(it){if(it!=undefined)return it[ITERATOR]||it['@@iterator']||Iterators[classof(it)]}}),(function(module,exports,__w_pdfjs_require__){"use strict";var cof=__w_pdfjs_require__(36);var TAG=__w_pdfjs_require__(37)('toStringTag');var ARG=cof(function(){return arguments}())=='Arguments';var tryGet=function tryGet(it,key){try{return it[key]}catch(e){}};module.exports=function(it){var O,T,B;return it===undefined?'Undefined':it===null?'Null':typeof(T=tryGet(O=Object(it),TAG))=='string'?T:ARG?cof(O):(B=cof(O))=='Object'&&typeof O.callee=='function'?'Arguments':B}}),(function(module,exports,__w_pdfjs_require__){"use strict";var ITERATOR=__w_pdfjs_require__(37)('iterator');var SAFE_CLOSING=false;try{var riter=[7][ITERATOR]();riter['return']=function(){SAFE_CLOSING=true};Array.from(riter,function(){throw 2;})}catch(e){}module.exports=function(exec,skipClosing){if(!skipClosing&&!SAFE_CLOSING)return false;var safe=false;try{var arr=[7];var iter=arr[ITERATOR]();iter.next=function(){return{done:safe=true}};arr[ITERATOR]=function(){return iter};exec(arr)}catch(e){}return safe}}),(function(module,exports,__w_pdfjs_require__){"use strict";__w_pdfjs_require__(75);module.exports=__w_pdfjs_require__(13).Object.assign}),(function(module,exports,__w_pdfjs_require__){"use strict";var $export=__w_pdfjs_require__(11);$export($export.S+$export.F,'Object',{assign:__w_pdfjs_require__(76)})}),(function(module,exports,__w_pdfjs_require__){"use strict";var DESCRIPTORS=__w_pdfjs_require__(19);var getKeys=__w_pdfjs_require__(59);var gOPS=__w_pdfjs_require__(77);var pIE=__w_pdfjs_require__(78);var toObject=__w_pdfjs_require__(66);var IObject=__w_pdfjs_require__(48);var $assign=Object.assign;module.exports=!$assign||__w_pdfjs_require__(20)(function(){var A={};var B={};var S=Symbol();var K='abcdefghijklmnopqrst';A[S]=7;K.split('').forEach(function(k){B[k]=k});return $assign({},A)[S]!=7||Object.keys($assign({},B)).join('')!=K})?function assign(target,source){var T=toObject(target);var aLen=arguments.length;var index=1;var getSymbols=gOPS.f;var isEnum=pIE.f;while(aLen>index){var S=IObject(arguments[index++]);var keys=getSymbols?getKeys(S).concat(getSymbols(S)):getKeys(S);var length=keys.length;var j=0;var key;while(length>j){key=keys[j++];if(!DESCRIPTORS||isEnum.call(S,key))T[key]=S[key]}}return T}:$assign}),(function(module,exports,__w_pdfjs_require__){"use strict";exports.f=Object.getOwnPropertySymbols}),(function(module,exports,__w_pdfjs_require__){"use strict";exports.f={}.propertyIsEnumerable}),(function(module,exports,__w_pdfjs_require__){"use strict";__w_pdfjs_require__(80);module.exports=__w_pdfjs_require__(13).Math.log2}),(function(module,exports,__w_pdfjs_require__){"use strict";var $export=__w_pdfjs_require__(11);$export($export.S,'Math',{log2:function log2(x){return Math.log(x)/Math.LN2}})}),(function(module,exports,__w_pdfjs_require__){"use strict";__w_pdfjs_require__(82);module.exports=__w_pdfjs_require__(13).Number.isNaN}),(function(module,exports,__w_pdfjs_require__){"use strict";var $export=__w_pdfjs_require__(11);$export($export.S,'Number',{isNaN:function isNaN(number){return number!=number}})}),(function(module,exports,__w_pdfjs_require__){"use strict";__w_pdfjs_require__(84);module.exports=__w_pdfjs_require__(13).Number.isInteger}),(function(module,exports,__w_pdfjs_require__){"use strict";var $export=__w_pdfjs_require__(11);$export($export.S,'Number',{isInteger:__w_pdfjs_require__(85)})}),(function(module,exports,__w_pdfjs_require__){"use strict";var isObject=__w_pdfjs_require__(17);var floor=Math.floor;module.exports=function isInteger(it){return!isObject(it)&&isFinite(it)&&floor(it)===it}}),(function(module,exports,__w_pdfjs_require__){"use strict";__w_pdfjs_require__(87);__w_pdfjs_require__(52);__w_pdfjs_require__(88);__w_pdfjs_require__(91);__w_pdfjs_require__(104);__w_pdfjs_require__(105);module.exports=__w_pdfjs_require__(13).Promise}),(function(module,exports,__w_pdfjs_require__){"use strict";var classof=__w_pdfjs_require__(72);var test={};test[__w_pdfjs_require__(37)('toStringTag')]='z';if(test+''!='[object z]'){__w_pdfjs_require__(24)(Object.prototype,'toString',function toString(){return'[object '+classof(this)+']'},true)}}),(function(module,exports,__w_pdfjs_require__){"use strict";var $iterators=__w_pdfjs_require__(89);var getKeys=__w_pdfjs_require__(59);var redefine=__w_pdfjs_require__(24);var global=__w_pdfjs_require__(12);var hide=__w_pdfjs_require__(14);var Iterators=__w_pdfjs_require__(55);var wks=__w_pdfjs_require__(37);var ITERATOR=wks('iterator');var TO_STRING_TAG=wks('toStringTag');var ArrayValues=Iterators.Array;var DOMIterables={CSSRuleList:true,CSSStyleDeclaration:false,CSSValueList:false,ClientRectList:false,DOMRectList:false,DOMStringList:false,DOMTokenList:true,DataTransferItemList:false,FileList:false,HTMLAllCollection:false,HTMLCollection:false,HTMLFormElement:false,HTMLSelectElement:false,MediaList:true,MimeTypeArray:false,NamedNodeMap:false,NodeList:true,PaintRequestList:false,Plugin:false,PluginArray:false,SVGLengthList:false,SVGNumberList:false,SVGPathSegList:false,SVGPointList:false,SVGStringList:false,SVGTransformList:false,SourceBufferList:false,StyleSheetList:true,TextTrackCueList:false,TextTrackList:false,TouchList:false};for(var collections=getKeys(DOMIterables),i=0;i=O.length){this._t=undefined;return step(1)}if(kind=='keys')return step(0,index);if(kind=='values')return step(0,O[index]);return step(0,[index,O[index]])},'values');Iterators.Arguments=Iterators.Array;addToUnscopables('keys');addToUnscopables('values');addToUnscopables('entries')}),(function(module,exports,__w_pdfjs_require__){"use strict";module.exports=function(done,value){return{value:value,done:!!done}}}),(function(module,exports,__w_pdfjs_require__){"use strict";var LIBRARY=__w_pdfjs_require__(29);var global=__w_pdfjs_require__(12);var ctx=__w_pdfjs_require__(30);var classof=__w_pdfjs_require__(72);var $export=__w_pdfjs_require__(11);var isObject=__w_pdfjs_require__(17);var aFunction=__w_pdfjs_require__(31);var anInstance=__w_pdfjs_require__(92);var forOf=__w_pdfjs_require__(93);var speciesConstructor=__w_pdfjs_require__(94);var task=__w_pdfjs_require__(95).set;var microtask=__w_pdfjs_require__(97)();var newPromiseCapabilityModule=__w_pdfjs_require__(98);var perform=__w_pdfjs_require__(99);var userAgent=__w_pdfjs_require__(100);var promiseResolve=__w_pdfjs_require__(101);var PROMISE='Promise';var TypeError=global.TypeError;var process=global.process;var versions=process&&process.versions;var v8=versions&&versions.v8||'';var $Promise=global[PROMISE];var isNode=classof(process)=='process';var empty=function empty(){};var Internal,newGenericPromiseCapability,OwnPromiseCapability,Wrapper;var newPromiseCapability=newGenericPromiseCapability=newPromiseCapabilityModule.f;var USE_NATIVE=!!function(){try{var promise=$Promise.resolve(1);var FakePromise=(promise.constructor={})[__w_pdfjs_require__(37)('species')]=function(exec){exec(empty,empty)};return(isNode||typeof PromiseRejectionEvent=='function')&&promise.then(empty)instanceof FakePromise&&v8.indexOf('6.6')!==0&&userAgent.indexOf('Chrome/66')===-1}catch(e){}}();var isThenable=function isThenable(it){var then;return isObject(it)&&typeof(then=it.then)=='function'?then:false};var notify=function notify(promise,isReject){if(promise._n)return;promise._n=true;var chain=promise._c;microtask(function(){var value=promise._v;var ok=promise._s==1;var i=0;var run=function run(reaction){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(promise._h==2)onHandleUnhandled(promise);promise._h=1}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(e){if(domain&&!exited)domain.exit();reject(e)}};while(chain.length>i){run(chain[i++])}promise._c=[];promise._n=false;if(isReject&&!promise._h)onUnhandled(promise)})};var onUnhandled=function onUnhandled(promise){task.call(global,function(){var value=promise._v;var unhandled=isUnhandled(promise);var result,handler,console;if(unhandled){result=perform(function(){if(isNode){process.emit('unhandledRejection',value,promise)}else if(handler=global.onunhandledrejection){handler({promise:promise,reason:value})}else if((console=global.console)&&console.error){console.error('Unhandled promise rejection',value)}});promise._h=isNode||isUnhandled(promise)?2:1}promise._a=undefined;if(unhandled&&result.e)throw result.v;})};var isUnhandled=function isUnhandled(promise){return promise._h!==1&&(promise._a||promise._c).length===0};var onHandleUnhandled=function onHandleUnhandled(promise){task.call(global,function(){var handler;if(isNode){process.emit('rejectionHandled',promise)}else if(handler=global.onrejectionhandled){handler({promise:promise,reason:promise._v})}})};var $reject=function $reject(value){var promise=this;if(promise._d)return;promise._d=true;promise=promise._w||promise;promise._v=value;promise._s=2;if(!promise._a)promise._a=promise._c.slice();notify(promise,true)};var $resolve=function $resolve(value){var promise=this;var then;if(promise._d)return;promise._d=true;promise=promise._w||promise;try{if(promise===value)throw TypeError("Promise can't be resolved itself");if(then=isThenable(value)){microtask(function(){var wrapper={_w:promise,_d:false};try{then.call(value,ctx($resolve,wrapper,1),ctx($reject,wrapper,1))}catch(e){$reject.call(wrapper,e)}})}else{promise._v=value;promise._s=1;notify(promise,false)}}catch(e){$reject.call({_w:promise,_d:false},e)}};if(!USE_NATIVE){$Promise=function Promise(executor){anInstance(this,$Promise,PROMISE,'_h');aFunction(executor);Internal.call(this);try{executor(ctx($resolve,this,1),ctx($reject,this,1))}catch(err){$reject.call(this,err)}};Internal=function Promise(executor){this._c=[];this._a=undefined;this._s=0;this._d=false;this._v=undefined;this._h=0;this._n=false};Internal.prototype=__w_pdfjs_require__(102)($Promise.prototype,{then:function then(onFulfilled,onRejected){var reaction=newPromiseCapability(speciesConstructor(this,$Promise));reaction.ok=typeof onFulfilled=='function'?onFulfilled:true;reaction.fail=typeof onRejected=='function'&&onRejected;reaction.domain=isNode?process.domain:undefined;this._c.push(reaction);if(this._a)this._a.push(reaction);if(this._s)notify(this,false);return reaction.promise},'catch':function _catch(onRejected){return this.then(undefined,onRejected)}});OwnPromiseCapability=function OwnPromiseCapability(){var promise=new Internal();this.promise=promise;this.resolve=ctx($resolve,promise,1);this.reject=ctx($reject,promise,1)};newPromiseCapabilityModule.f=newPromiseCapability=function newPromiseCapability(C){return C===$Promise||C===Wrapper?new OwnPromiseCapability(C):newGenericPromiseCapability(C)}}$export($export.G+$export.W+$export.F*!USE_NATIVE,{Promise:$Promise});__w_pdfjs_require__(64)($Promise,PROMISE);__w_pdfjs_require__(103)(PROMISE);Wrapper=__w_pdfjs_require__(13)[PROMISE];$export($export.S+$export.F*!USE_NATIVE,PROMISE,{reject:function reject(r){var capability=newPromiseCapability(this);var $$reject=capability.reject;$$reject(r);return capability.promise}});$export($export.S+$export.F*(LIBRARY||!USE_NATIVE),PROMISE,{resolve:function resolve(x){return promiseResolve(LIBRARY&&this===Wrapper?$Promise:this,x)}});$export($export.S+$export.F*!(USE_NATIVE&&__w_pdfjs_require__(73)(function(iter){$Promise.all(iter)['catch'](empty)})),PROMISE,{all:function all(iterable){var C=this;var capability=newPromiseCapability(C);var resolve=capability.resolve;var reject=capability.reject;var result=perform(function(){var values=[];var index=0;var remaining=1;forOf(iterable,false,function(promise){var $index=index++;var alreadyCalled=false;values.push(undefined);remaining++;C.resolve(promise).then(function(value){if(alreadyCalled)return;alreadyCalled=true;values[$index]=value;--remaining||resolve(values)},reject)});--remaining||resolve(values)});if(result.e)reject(result.v);return capability.promise},race:function race(iterable){var C=this;var capability=newPromiseCapability(C);var reject=capability.reject;var result=perform(function(){forOf(iterable,false,function(promise){C.resolve(promise).then(capability.resolve,reject)})});if(result.e)reject(result.v);return capability.promise}})}),(function(module,exports,__w_pdfjs_require__){"use strict";module.exports=function(it,Constructor,name,forbiddenField){if(!(it instanceof Constructor)||forbiddenField!==undefined&&forbiddenField in it){throw TypeError(name+': incorrect invocation!');}return it}}),(function(module,exports,__w_pdfjs_require__){"use strict";var ctx=__w_pdfjs_require__(30);var call=__w_pdfjs_require__(68);var isArrayIter=__w_pdfjs_require__(69);var anObject=__w_pdfjs_require__(16);var toLength=__w_pdfjs_require__(32);var getIterFn=__w_pdfjs_require__(71);var BREAK={};var RETURN={};var _exports=module.exports=function(iterable,entries,fn,that,ITERATOR){var iterFn=ITERATOR?function(){return iterable}:getIterFn(iterable);var f=ctx(fn,that,entries?2:1);var index=0;var length,step,iterator,result;if(typeof iterFn!='function')throw TypeError(iterable+' is not iterable!');if(isArrayIter(iterFn))for(length=toLength(iterable.length);length>index;index++){result=entries?f(anObject(step=iterable[index])[0],step[1]):f(iterable[index]);if(result===BREAK||result===RETURN)return result}else for(iterator=iterFn.call(iterable);!(step=iterator.next()).done;){result=call(iterator,f,step.value,entries);if(result===BREAK||result===RETURN)return result}};_exports.BREAK=BREAK;_exports.RETURN=RETURN}),(function(module,exports,__w_pdfjs_require__){"use strict";var anObject=__w_pdfjs_require__(16);var aFunction=__w_pdfjs_require__(31);var SPECIES=__w_pdfjs_require__(37)('species');module.exports=function(O,D){var C=anObject(O).constructor;var S;return C===undefined||(S=anObject(C)[SPECIES])==undefined?D:aFunction(S)}}),(function(module,exports,__w_pdfjs_require__){"use strict";var ctx=__w_pdfjs_require__(30);var invoke=__w_pdfjs_require__(96);var html=__w_pdfjs_require__(63);var cel=__w_pdfjs_require__(21);var global=__w_pdfjs_require__(12);var process=global.process;var setTask=global.setImmediate;var clearTask=global.clearImmediate;var MessageChannel=global.MessageChannel;var Dispatch=global.Dispatch;var counter=0;var queue={};var ONREADYSTATECHANGE='onreadystatechange';var defer,channel,port;var run=function run(){var id=+this;if(queue.hasOwnProperty(id)){var fn=queue[id];delete queue[id];fn()}};var listener=function listener(event){run.call(event.data)};if(!setTask||!clearTask){setTask=function setImmediate(fn){var args=[];var i=1;while(arguments.length>i){args.push(arguments[i++])}queue[++counter]=function(){invoke(typeof fn=='function'?fn:Function(fn),args)};defer(counter);return counter};clearTask=function clearImmediate(id){delete queue[id]};if(__w_pdfjs_require__(36)(process)=='process'){defer=function defer(id){process.nextTick(ctx(run,id,1))}}else if(Dispatch&&Dispatch.now){defer=function defer(id){Dispatch.now(ctx(run,id,1))}}else if(MessageChannel){channel=new MessageChannel();port=channel.port2;channel.port1.onmessage=listener;defer=ctx(port.postMessage,port,1)}else if(global.addEventListener&&typeof postMessage=='function'&&!global.importScripts){defer=function defer(id){global.postMessage(id+'','*')};global.addEventListener('message',listener,false)}else if(ONREADYSTATECHANGE in cel('script')){defer=function defer(id){html.appendChild(cel('script'))[ONREADYSTATECHANGE]=function(){html.removeChild(this);run.call(id)}}}else{defer=function defer(id){setTimeout(ctx(run,id,1),0)}}}module.exports={set:setTask,clear:clearTask}}),(function(module,exports,__w_pdfjs_require__){"use strict";module.exports=function(fn,args,that){var un=that===undefined;switch(args.length){case 0:return un?fn():fn.call(that);case 1:return un?fn(args[0]):fn.call(that,args[0]);case 2:return un?fn(args[0],args[1]):fn.call(that,args[0],args[1]);case 3:return un?fn(args[0],args[1],args[2]):fn.call(that,args[0],args[1],args[2]);case 4:return un?fn(args[0],args[1],args[2],args[3]):fn.call(that,args[0],args[1],args[2],args[3])}return fn.apply(that,args)}}),(function(module,exports,__w_pdfjs_require__){"use strict";var global=__w_pdfjs_require__(12);var macrotask=__w_pdfjs_require__(95).set;var Observer=global.MutationObserver||global.WebKitMutationObserver;var process=global.process;var Promise=global.Promise;var isNode=__w_pdfjs_require__(36)(process)=='process';module.exports=function(){var head,last,notify;var flush=function flush(){var parent,fn;if(isNode&&(parent=process.domain))parent.exit();while(head){fn=head.fn;head=head.next;try{fn()}catch(e){if(head)notify();else last=undefined;throw e;}}last=undefined;if(parent)parent.enter()};if(isNode){notify=function notify(){process.nextTick(flush)}}else if(Observer&&!(global.navigator&&global.navigator.standalone)){var toggle=true;var node=document.createTextNode('');new Observer(flush).observe(node,{characterData:true});notify=function notify(){node.data=toggle=!toggle}}else if(Promise&&Promise.resolve){var promise=Promise.resolve(undefined);notify=function notify(){promise.then(flush)}}else{notify=function notify(){macrotask.call(global,flush)}}return function(fn){var task={fn:fn,next:undefined};if(last)last.next=task;if(!head){head=task;notify()}last=task}}}),(function(module,exports,__w_pdfjs_require__){"use strict";var aFunction=__w_pdfjs_require__(31);function PromiseCapability(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)}}),(function(module,exports,__w_pdfjs_require__){"use strict";module.exports=function(exec){try{return{e:false,v:exec()}}catch(e){return{e:true,v:e}}}}),(function(module,exports,__w_pdfjs_require__){"use strict";var global=__w_pdfjs_require__(12);var navigator=global.navigator;module.exports=navigator&&navigator.userAgent||''}),(function(module,exports,__w_pdfjs_require__){"use strict";var anObject=__w_pdfjs_require__(16);var isObject=__w_pdfjs_require__(17);var newPromiseCapability=__w_pdfjs_require__(98);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}}),(function(module,exports,__w_pdfjs_require__){"use strict";var redefine=__w_pdfjs_require__(24);module.exports=function(target,src,safe){for(var key in src){redefine(target,key,src[key],safe)}return target}}),(function(module,exports,__w_pdfjs_require__){"use strict";var global=__w_pdfjs_require__(12);var dP=__w_pdfjs_require__(15);var DESCRIPTORS=__w_pdfjs_require__(19);var SPECIES=__w_pdfjs_require__(37)('species');module.exports=function(KEY){var C=global[KEY];if(DESCRIPTORS&&C&&!C[SPECIES])dP.f(C,SPECIES,{configurable:true,get:function get(){return this}})}}),(function(module,exports,__w_pdfjs_require__){"use strict";var $export=__w_pdfjs_require__(11);var core=__w_pdfjs_require__(13);var global=__w_pdfjs_require__(12);var speciesConstructor=__w_pdfjs_require__(94);var promiseResolve=__w_pdfjs_require__(101);$export($export.P+$export.R,'Promise',{'finally':function _finally(onFinally){var C=speciesConstructor(this,core.Promise||global.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)}})}),(function(module,exports,__w_pdfjs_require__){"use strict";var $export=__w_pdfjs_require__(11);var newPromiseCapability=__w_pdfjs_require__(98);var perform=__w_pdfjs_require__(99);$export($export.S,'Promise',{'try':function _try(callbackfn){var promiseCapability=newPromiseCapability.f(this);var result=perform(callbackfn);(result.e?promiseCapability.reject:promiseCapability.resolve)(result.v);return promiseCapability.promise}})}),(function(module,exports,__w_pdfjs_require__){"use strict";__w_pdfjs_require__(87);__w_pdfjs_require__(88);__w_pdfjs_require__(107);__w_pdfjs_require__(119);__w_pdfjs_require__(121);module.exports=__w_pdfjs_require__(13).WeakMap}),(function(module,exports,__w_pdfjs_require__){"use strict";var global=__w_pdfjs_require__(12);var each=__w_pdfjs_require__(108)(0);var redefine=__w_pdfjs_require__(24);var meta=__w_pdfjs_require__(112);var assign=__w_pdfjs_require__(76);var weak=__w_pdfjs_require__(113);var isObject=__w_pdfjs_require__(17);var validate=__w_pdfjs_require__(114);var NATIVE_WEAK_MAP=__w_pdfjs_require__(114);var IS_IE11=!global.ActiveXObject&&'ActiveXObject'in global;var WEAK_MAP='WeakMap';var getWeak=meta.getWeak;var isExtensible=Object.isExtensible;var uncaughtFrozenStore=weak.ufstore;var InternalMap;var wrapper=function wrapper(get){return function WeakMap(){return get(this,arguments.length>0?arguments[0]:undefined)}};var methods={get:function get(key){if(isObject(key)){var data=getWeak(key);if(data===true)return uncaughtFrozenStore(validate(this,WEAK_MAP)).get(key);return data?data[this._i]:undefined}},set:function set(key,value){return weak.def(validate(this,WEAK_MAP),key,value)}};var $WeakMap=module.exports=__w_pdfjs_require__(115)(WEAK_MAP,wrapper,methods,weak,true,true);if(NATIVE_WEAK_MAP&&IS_IE11){InternalMap=weak.getConstructor(wrapper,WEAK_MAP);assign(InternalMap.prototype,methods);meta.NEED=true;each(['delete','has','get','set'],function(key){var proto=$WeakMap.prototype;var method=proto[key];redefine(proto,key,function(a,b){if(isObject(a)&&!isExtensible(a)){if(!this._f)this._f=new InternalMap();var result=this._f[key](a,b);return key=='set'?this:result}return method.call(this,a,b)})})}}),(function(module,exports,__w_pdfjs_require__){"use strict";var ctx=__w_pdfjs_require__(30);var IObject=__w_pdfjs_require__(48);var toObject=__w_pdfjs_require__(66);var toLength=__w_pdfjs_require__(32);var asc=__w_pdfjs_require__(109);module.exports=function(TYPE,$create){var IS_MAP=TYPE==1;var IS_FILTER=TYPE==2;var IS_SOME=TYPE==3;var IS_EVERY=TYPE==4;var IS_FIND_INDEX=TYPE==6;var NO_HOLES=TYPE==5||IS_FIND_INDEX;var create=$create||asc;return function($this,callbackfn,that){var O=toObject($this);var self=IObject(O);var f=ctx(callbackfn,that,3);var length=toLength(self.length);var index=0;var result=IS_MAP?create($this,length):IS_FILTER?create($this,0):undefined;var val,res;for(;length>index;index++){if(NO_HOLES||index in self){val=self[index];res=f(val,index,O);if(TYPE){if(IS_MAP)result[index]=res;else if(res)switch(TYPE){case 3:return true;case 5:return val;case 6:return index;case 2:result.push(val)}else if(IS_EVERY)return false}}}return IS_FIND_INDEX?-1:IS_SOME||IS_EVERY?IS_EVERY:result}}}),(function(module,exports,__w_pdfjs_require__){"use strict";var speciesConstructor=__w_pdfjs_require__(110);module.exports=function(original,length){return new(speciesConstructor(original))(length)}}),(function(module,exports,__w_pdfjs_require__){"use strict";var isObject=__w_pdfjs_require__(17);var isArray=__w_pdfjs_require__(111);var SPECIES=__w_pdfjs_require__(37)('species');module.exports=function(original){var C;if(isArray(original)){C=original.constructor;if(typeof C=='function'&&(C===Array||isArray(C.prototype)))C=undefined;if(isObject(C)){C=C[SPECIES];if(C===null)C=undefined}}return C===undefined?Array:C}}),(function(module,exports,__w_pdfjs_require__){"use strict";var cof=__w_pdfjs_require__(36);module.exports=Array.isArray||function isArray(arg){return cof(arg)=='Array'}}),(function(module,exports,__w_pdfjs_require__){"use strict";function _typeof(obj){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 META=__w_pdfjs_require__(26)('meta');var isObject=__w_pdfjs_require__(17);var has=__w_pdfjs_require__(25);var setDesc=__w_pdfjs_require__(15).f;var id=0;var isExtensible=Object.isExtensible||function(){return true};var FREEZE=!__w_pdfjs_require__(20)(function(){return isExtensible(Object.preventExtensions({}))});var setMeta=function setMeta(it){setDesc(it,META,{value:{i:'O'+ ++id,w:{}}})};var fastKey=function fastKey(it,create){if(!isObject(it))return _typeof(it)=='symbol'?it:(typeof it=='string'?'S':'P')+it;if(!has(it,META)){if(!isExtensible(it))return'F';if(!create)return'E';setMeta(it)}return it[META].i};var getWeak=function getWeak(it,create){if(!has(it,META)){if(!isExtensible(it))return true;if(!create)return false;setMeta(it)}return it[META].w};var onFreeze=function onFreeze(it){if(FREEZE&&meta.NEED&&isExtensible(it)&&!has(it,META))setMeta(it);return it};var meta=module.exports={KEY:META,NEED:false,fastKey:fastKey,getWeak:getWeak,onFreeze:onFreeze}}),(function(module,exports,__w_pdfjs_require__){"use strict";var redefineAll=__w_pdfjs_require__(102);var getWeak=__w_pdfjs_require__(112).getWeak;var anObject=__w_pdfjs_require__(16);var isObject=__w_pdfjs_require__(17);var anInstance=__w_pdfjs_require__(92);var forOf=__w_pdfjs_require__(93);var createArrayMethod=__w_pdfjs_require__(108);var $has=__w_pdfjs_require__(25);var validate=__w_pdfjs_require__(114);var arrayFind=createArrayMethod(5);var arrayFindIndex=createArrayMethod(6);var id=0;var uncaughtFrozenStore=function uncaughtFrozenStore(that){return that._l||(that._l=new UncaughtFrozenStore())};var UncaughtFrozenStore=function UncaughtFrozenStore(){this.a=[]};var findUncaughtFrozen=function findUncaughtFrozen(store,key){return arrayFind(store.a,function(it){return it[0]===key})};UncaughtFrozenStore.prototype={get:function get(key){var entry=findUncaughtFrozen(this,key);if(entry)return entry[1]},has:function has(key){return!!findUncaughtFrozen(this,key)},set:function set(key,value){var entry=findUncaughtFrozen(this,key);if(entry)entry[1]=value;else this.a.push([key,value])},'delete':function _delete(key){var index=arrayFindIndex(this.a,function(it){return it[0]===key});if(~index)this.a.splice(index,1);return!!~index}};module.exports={getConstructor:function getConstructor(wrapper,NAME,IS_MAP,ADDER){var C=wrapper(function(that,iterable){anInstance(that,C,NAME,'_i');that._t=NAME;that._i=id++;that._l=undefined;if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that)});redefineAll(C.prototype,{'delete':function _delete(key){if(!isObject(key))return false;var data=getWeak(key);if(data===true)return uncaughtFrozenStore(validate(this,NAME))['delete'](key);return data&&$has(data,this._i)&&delete data[this._i]},has:function has(key){if(!isObject(key))return false;var data=getWeak(key);if(data===true)return uncaughtFrozenStore(validate(this,NAME)).has(key);return data&&$has(data,this._i)}});return C},def:function def(that,key,value){var data=getWeak(anObject(key),true);if(data===true)uncaughtFrozenStore(that).set(key,value);else data[that._i]=value;return that},ufstore:uncaughtFrozenStore}}),(function(module,exports,__w_pdfjs_require__){"use strict";var isObject=__w_pdfjs_require__(17);module.exports=function(it,TYPE){if(!isObject(it)||it._t!==TYPE)throw TypeError('Incompatible receiver, '+TYPE+' required!');return it}}),(function(module,exports,__w_pdfjs_require__){"use strict";var global=__w_pdfjs_require__(12);var $export=__w_pdfjs_require__(11);var redefine=__w_pdfjs_require__(24);var redefineAll=__w_pdfjs_require__(102);var meta=__w_pdfjs_require__(112);var forOf=__w_pdfjs_require__(93);var anInstance=__w_pdfjs_require__(92);var isObject=__w_pdfjs_require__(17);var fails=__w_pdfjs_require__(20);var $iterDetect=__w_pdfjs_require__(73);var setToStringTag=__w_pdfjs_require__(64);var inheritIfRequired=__w_pdfjs_require__(116);module.exports=function(NAME,wrapper,methods,common,IS_MAP,IS_WEAK){var Base=global[NAME];var C=Base;var ADDER=IS_MAP?'set':'add';var proto=C&&C.prototype;var O={};var fixMethod=function fixMethod(KEY){var fn=proto[KEY];redefine(proto,KEY,KEY=='delete'?function(a){return IS_WEAK&&!isObject(a)?false:fn.call(this,a===0?0:a)}:KEY=='has'?function has(a){return IS_WEAK&&!isObject(a)?false:fn.call(this,a===0?0:a)}:KEY=='get'?function get(a){return IS_WEAK&&!isObject(a)?undefined:fn.call(this,a===0?0:a)}:KEY=='add'?function add(a){fn.call(this,a===0?0:a);return this}:function set(a,b){fn.call(this,a===0?0:a,b);return this})};if(typeof C!='function'||!(IS_WEAK||proto.forEach&&!fails(function(){new C().entries().next()}))){C=common.getConstructor(wrapper,NAME,IS_MAP,ADDER);redefineAll(C.prototype,methods);meta.NEED=true}else{var instance=new C();var HASNT_CHAINING=instance[ADDER](IS_WEAK?{}:-0,1)!=instance;var THROWS_ON_PRIMITIVES=fails(function(){instance.has(1)});var ACCEPT_ITERABLES=$iterDetect(function(iter){new C(iter)});var BUGGY_ZERO=!IS_WEAK&&fails(function(){var $instance=new C();var index=5;while(index--){$instance[ADDER](index,index)}return!$instance.has(-0)});if(!ACCEPT_ITERABLES){C=wrapper(function(target,iterable){anInstance(target,C,NAME);var that=inheritIfRequired(new Base(),target,C);if(iterable!=undefined)forOf(iterable,IS_MAP,that[ADDER],that);return that});C.prototype=proto;proto.constructor=C}if(THROWS_ON_PRIMITIVES||BUGGY_ZERO){fixMethod('delete');fixMethod('has');IS_MAP&&fixMethod('get')}if(BUGGY_ZERO||HASNT_CHAINING)fixMethod(ADDER);if(IS_WEAK&&proto.clear)delete proto.clear}setToStringTag(C,NAME);O[NAME]=C;$export($export.G+$export.W+$export.F*(C!=Base),O);if(!IS_WEAK)common.setStrong(C,NAME,IS_MAP);return C}}),(function(module,exports,__w_pdfjs_require__){"use strict";var isObject=__w_pdfjs_require__(17);var setPrototypeOf=__w_pdfjs_require__(117).set;module.exports=function(that,target,C){var S=target.constructor;var P;if(S!==C&&typeof S=='function'&&(P=S.prototype)!==C.prototype&&isObject(P)&&setPrototypeOf){setPrototypeOf(that,P)}return that}}),(function(module,exports,__w_pdfjs_require__){"use strict";var isObject=__w_pdfjs_require__(17);var anObject=__w_pdfjs_require__(16);var check=function check(O,proto){anObject(O);if(!isObject(proto)&&proto!==null)throw TypeError(proto+": can't set as prototype!");};module.exports={set:Object.setPrototypeOf||('__proto__'in{}?function(test,buggy,set){try{set=__w_pdfjs_require__(30)(Function.call,__w_pdfjs_require__(118).f(Object.prototype,'__proto__').set,2);set(test,[]);buggy=!(test instanceof Array)}catch(e){buggy=true}return function setPrototypeOf(O,proto){check(O,proto);if(buggy)O.__proto__=proto;else set(O,proto);return O}}({},false):undefined),check:check}}),(function(module,exports,__w_pdfjs_require__){"use strict";var pIE=__w_pdfjs_require__(78);var createDesc=__w_pdfjs_require__(23);var toIObject=__w_pdfjs_require__(47);var toPrimitive=__w_pdfjs_require__(22);var has=__w_pdfjs_require__(25);var IE8_DOM_DEFINE=__w_pdfjs_require__(18);var gOPD=Object.getOwnPropertyDescriptor;exports.f=__w_pdfjs_require__(19)?gOPD:function getOwnPropertyDescriptor(O,P){O=toIObject(O);P=toPrimitive(P,true);if(IE8_DOM_DEFINE)try{return gOPD(O,P)}catch(e){}if(has(O,P))return createDesc(!pIE.f.call(O,P),O[P])}}),(function(module,exports,__w_pdfjs_require__){"use strict";__w_pdfjs_require__(120)('WeakMap')}),(function(module,exports,__w_pdfjs_require__){"use strict";var $export=__w_pdfjs_require__(11);module.exports=function(COLLECTION){$export($export.S,COLLECTION,{of:function of(){var length=arguments.length;var A=new Array(length);while(length--){A[length]=arguments[length]}return new this(A)}})}}),(function(module,exports,__w_pdfjs_require__){"use strict";__w_pdfjs_require__(122)('WeakMap')}),(function(module,exports,__w_pdfjs_require__){"use strict";var $export=__w_pdfjs_require__(11);var aFunction=__w_pdfjs_require__(31);var ctx=__w_pdfjs_require__(30);var forOf=__w_pdfjs_require__(93);module.exports=function(COLLECTION){$export($export.S,COLLECTION,{from:function from(source){var mapFn=arguments[1];var mapping,A,n,cb;aFunction(this);mapping=mapFn!==undefined;if(mapping)aFunction(mapFn);if(source==undefined)return new this();A=[];if(mapping){n=0;cb=ctx(mapFn,arguments[2],2);forOf(source,false,function(nextItem){A.push(cb(nextItem,n++))})}else{forOf(source,false,A.push,A)}return new this(A)}})}}),(function(module,exports,__w_pdfjs_require__){"use strict";__w_pdfjs_require__(87);__w_pdfjs_require__(88);__w_pdfjs_require__(124);__w_pdfjs_require__(125);__w_pdfjs_require__(126);module.exports=__w_pdfjs_require__(13).WeakSet}),(function(module,exports,__w_pdfjs_require__){"use strict";var weak=__w_pdfjs_require__(113);var validate=__w_pdfjs_require__(114);var WEAK_SET='WeakSet';__w_pdfjs_require__(115)(WEAK_SET,function(get){return function WeakSet(){return get(this,arguments.length>0?arguments[0]:undefined)}},{add:function add(value){return weak.def(validate(this,WEAK_SET),value,true)}},weak,false,true)}),(function(module,exports,__w_pdfjs_require__){"use strict";__w_pdfjs_require__(120)('WeakSet')}),(function(module,exports,__w_pdfjs_require__){"use strict";__w_pdfjs_require__(122)('WeakSet')}),(function(module,exports,__w_pdfjs_require__){"use strict";__w_pdfjs_require__(128);module.exports=__w_pdfjs_require__(13).String.codePointAt}),(function(module,exports,__w_pdfjs_require__){"use strict";var $export=__w_pdfjs_require__(11);var $at=__w_pdfjs_require__(53)(false);$export($export.P,'String',{codePointAt:function codePointAt(pos){return $at(this,pos)}})}),(function(module,exports,__w_pdfjs_require__){"use strict";__w_pdfjs_require__(130);module.exports=__w_pdfjs_require__(13).String.fromCodePoint}),(function(module,exports,__w_pdfjs_require__){"use strict";var $export=__w_pdfjs_require__(11);var toAbsoluteIndex=__w_pdfjs_require__(49);var fromCharCode=String.fromCharCode;var $fromCodePoint=String.fromCodePoint;$export($export.S+$export.F*(!!$fromCodePoint&&$fromCodePoint.length!=1),'String',{fromCodePoint:function fromCodePoint(x){var res=[];var aLen=arguments.length;var i=0;var code;while(aLen>i){code=+arguments[i++];if(toAbsoluteIndex(code,0x10ffff)!==code)throw RangeError(code+' is not a valid code point');res.push(code<0x10000?fromCharCode(code):fromCharCode(((code-=0x10000)>>10)+0xd800,code%0x400+0xdc00))}return res.join('')}})}),(function(module,exports,__w_pdfjs_require__){"use strict";__w_pdfjs_require__(132);__w_pdfjs_require__(87);module.exports=__w_pdfjs_require__(13).Symbol}),(function(module,exports,__w_pdfjs_require__){"use strict";function _typeof(obj){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 global=__w_pdfjs_require__(12);var has=__w_pdfjs_require__(25);var DESCRIPTORS=__w_pdfjs_require__(19);var $export=__w_pdfjs_require__(11);var redefine=__w_pdfjs_require__(24);var META=__w_pdfjs_require__(112).KEY;var $fails=__w_pdfjs_require__(20);var shared=__w_pdfjs_require__(28);var setToStringTag=__w_pdfjs_require__(64);var uid=__w_pdfjs_require__(26);var wks=__w_pdfjs_require__(37);var wksExt=__w_pdfjs_require__(133);var wksDefine=__w_pdfjs_require__(134);var enumKeys=__w_pdfjs_require__(135);var isArray=__w_pdfjs_require__(111);var anObject=__w_pdfjs_require__(16);var isObject=__w_pdfjs_require__(17);var toObject=__w_pdfjs_require__(66);var toIObject=__w_pdfjs_require__(47);var toPrimitive=__w_pdfjs_require__(22);var createDesc=__w_pdfjs_require__(23);var _create=__w_pdfjs_require__(57);var gOPNExt=__w_pdfjs_require__(136);var $GOPD=__w_pdfjs_require__(118);var $GOPS=__w_pdfjs_require__(77);var $DP=__w_pdfjs_require__(15);var $keys=__w_pdfjs_require__(59);var gOPD=$GOPD.f;var dP=$DP.f;var gOPN=gOPNExt.f;var $Symbol=global.Symbol;var $JSON=global.JSON;var _stringify=$JSON&&$JSON.stringify;var PROTOTYPE='prototype';var HIDDEN=wks('_hidden');var TO_PRIMITIVE=wks('toPrimitive');var isEnum={}.propertyIsEnumerable;var SymbolRegistry=shared('symbol-registry');var AllSymbols=shared('symbols');var OPSymbols=shared('op-symbols');var ObjectProto=Object[PROTOTYPE];var USE_NATIVE=typeof $Symbol=='function'&&!!$GOPS.f;var QObject=global.QObject;var setter=!QObject||!QObject[PROTOTYPE]||!QObject[PROTOTYPE].findChild;var setSymbolDesc=DESCRIPTORS&&$fails(function(){return _create(dP({},'a',{get:function get(){return dP(this,'a',{value:7}).a}})).a!=7})?function(it,key,D){var protoDesc=gOPD(ObjectProto,key);if(protoDesc)delete ObjectProto[key];dP(it,key,D);if(protoDesc&&it!==ObjectProto)dP(ObjectProto,key,protoDesc)}:dP;var wrap=function wrap(tag){var sym=AllSymbols[tag]=_create($Symbol[PROTOTYPE]);sym._k=tag;return sym};var isSymbol=USE_NATIVE&&_typeof($Symbol.iterator)=='symbol'?function(it){return _typeof(it)=='symbol'}:function(it){return it instanceof $Symbol};var $defineProperty=function defineProperty(it,key,D){if(it===ObjectProto)$defineProperty(OPSymbols,key,D);anObject(it);key=toPrimitive(key,true);anObject(D);if(has(AllSymbols,key)){if(!D.enumerable){if(!has(it,HIDDEN))dP(it,HIDDEN,createDesc(1,{}));it[HIDDEN][key]=true}else{if(has(it,HIDDEN)&&it[HIDDEN][key])it[HIDDEN][key]=false;D=_create(D,{enumerable:createDesc(0,false)})}return setSymbolDesc(it,key,D)}return dP(it,key,D)};var $defineProperties=function defineProperties(it,P){anObject(it);var keys=enumKeys(P=toIObject(P));var i=0;var l=keys.length;var key;while(l>i){$defineProperty(it,key=keys[i++],P[key])}return it};var $create=function create(it,P){return P===undefined?_create(it):$defineProperties(_create(it),P)};var $propertyIsEnumerable=function propertyIsEnumerable(key){var E=isEnum.call(this,key=toPrimitive(key,true));if(this===ObjectProto&&has(AllSymbols,key)&&!has(OPSymbols,key))return false;return E||!has(this,key)||!has(AllSymbols,key)||has(this,HIDDEN)&&this[HIDDEN][key]?E:true};var $getOwnPropertyDescriptor=function getOwnPropertyDescriptor(it,key){it=toIObject(it);key=toPrimitive(key,true);if(it===ObjectProto&&has(AllSymbols,key)&&!has(OPSymbols,key))return;var D=gOPD(it,key);if(D&&has(AllSymbols,key)&&!(has(it,HIDDEN)&&it[HIDDEN][key]))D.enumerable=true;return D};var $getOwnPropertyNames=function getOwnPropertyNames(it){var names=gOPN(toIObject(it));var result=[];var i=0;var key;while(names.length>i){if(!has(AllSymbols,key=names[i++])&&key!=HIDDEN&&key!=META)result.push(key)}return result};var $getOwnPropertySymbols=function getOwnPropertySymbols(it){var IS_OP=it===ObjectProto;var names=gOPN(IS_OP?OPSymbols:toIObject(it));var result=[];var i=0;var key;while(names.length>i){if(has(AllSymbols,key=names[i++])&&(IS_OP?has(ObjectProto,key):true))result.push(AllSymbols[key])}return result};if(!USE_NATIVE){$Symbol=function _Symbol(){if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!');var tag=uid(arguments.length>0?arguments[0]:undefined);var $set=function $set(value){if(this===ObjectProto)$set.call(OPSymbols,value);if(has(this,HIDDEN)&&has(this[HIDDEN],tag))this[HIDDEN][tag]=false;setSymbolDesc(this,tag,createDesc(1,value))};if(DESCRIPTORS&&setter)setSymbolDesc(ObjectProto,tag,{configurable:true,set:$set});return wrap(tag)};redefine($Symbol[PROTOTYPE],'toString',function toString(){return this._k});$GOPD.f=$getOwnPropertyDescriptor;$DP.f=$defineProperty;__w_pdfjs_require__(137).f=gOPNExt.f=$getOwnPropertyNames;__w_pdfjs_require__(78).f=$propertyIsEnumerable;$GOPS.f=$getOwnPropertySymbols;if(DESCRIPTORS&&!__w_pdfjs_require__(29)){redefine(ObjectProto,'propertyIsEnumerable',$propertyIsEnumerable,true)}wksExt.f=function(name){return wrap(wks(name))}}$export($export.G+$export.W+$export.F*!USE_NATIVE,{Symbol:$Symbol});for(var es6Symbols='hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split(','),j=0;es6Symbols.length>j;){wks(es6Symbols[j++])}for(var wellKnownSymbols=$keys(wks.store),k=0;wellKnownSymbols.length>k;){wksDefine(wellKnownSymbols[k++])}$export($export.S+$export.F*!USE_NATIVE,'Symbol',{'for':function _for(key){return has(SymbolRegistry,key+='')?SymbolRegistry[key]:SymbolRegistry[key]=$Symbol(key)},keyFor:function keyFor(sym){if(!isSymbol(sym))throw TypeError(sym+' is not a symbol!');for(var key in SymbolRegistry){if(SymbolRegistry[key]===sym)return key}},useSetter:function useSetter(){setter=true},useSimple:function useSimple(){setter=false}});$export($export.S+$export.F*!USE_NATIVE,'Object',{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor,getOwnPropertyNames:$getOwnPropertyNames,getOwnPropertySymbols:$getOwnPropertySymbols});var FAILS_ON_PRIMITIVES=$fails(function(){$GOPS.f(1)});$export($export.S+$export.F*FAILS_ON_PRIMITIVES,'Object',{getOwnPropertySymbols:function getOwnPropertySymbols(it){return $GOPS.f(toObject(it))}});$JSON&&$export($export.S+$export.F*(!USE_NATIVE||$fails(function(){var S=$Symbol();return _stringify([S])!='[null]'||_stringify({a:S})!='{}'||_stringify(Object(S))!='{}'})),'JSON',{stringify:function stringify(it){var args=[it];var i=1;var replacer,$replacer;while(arguments.length>i){args.push(arguments[i++])}$replacer=replacer=args[1];if(!isObject(replacer)&&it===undefined||isSymbol(it))return;if(!isArray(replacer))replacer=function replacer(key,value){if(typeof $replacer=='function')value=$replacer.call(this,key,value);if(!isSymbol(value))return value};args[1]=replacer;return _stringify.apply($JSON,args)}});$Symbol[PROTOTYPE][TO_PRIMITIVE]||__w_pdfjs_require__(14)($Symbol[PROTOTYPE],TO_PRIMITIVE,$Symbol[PROTOTYPE].valueOf);setToStringTag($Symbol,'Symbol');setToStringTag(Math,'Math',true);setToStringTag(global.JSON,'JSON',true)}),(function(module,exports,__w_pdfjs_require__){"use strict";exports.f=__w_pdfjs_require__(37)}),(function(module,exports,__w_pdfjs_require__){"use strict";var global=__w_pdfjs_require__(12);var core=__w_pdfjs_require__(13);var LIBRARY=__w_pdfjs_require__(29);var wksExt=__w_pdfjs_require__(133);var defineProperty=__w_pdfjs_require__(15).f;module.exports=function(name){var $Symbol=core.Symbol||(core.Symbol=LIBRARY?{}:global.Symbol||{});if(name.charAt(0)!='_'&&!(name in $Symbol))defineProperty($Symbol,name,{value:wksExt.f(name)})}}),(function(module,exports,__w_pdfjs_require__){"use strict";var getKeys=__w_pdfjs_require__(59);var gOPS=__w_pdfjs_require__(77);var pIE=__w_pdfjs_require__(78);module.exports=function(it){var result=getKeys(it);var getSymbols=gOPS.f;if(getSymbols){var symbols=getSymbols(it);var isEnum=pIE.f;var i=0;var key;while(symbols.length>i){if(isEnum.call(it,key=symbols[i++]))result.push(key)}}return result}}),(function(module,exports,__w_pdfjs_require__){"use strict";function _typeof(obj){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 toIObject=__w_pdfjs_require__(47);var gOPN=__w_pdfjs_require__(137).f;var toString={}.toString;var windowNames=(typeof window==="undefined"?"undefined":_typeof(window))=='object'&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];var getWindowNames=function getWindowNames(it){try{return gOPN(it)}catch(e){return windowNames.slice()}};module.exports.f=function getOwnPropertyNames(it){return windowNames&&toString.call(it)=='[object Window]'?getWindowNames(it):gOPN(toIObject(it))}}),(function(module,exports,__w_pdfjs_require__){"use strict";var $keys=__w_pdfjs_require__(60);var hiddenKeys=__w_pdfjs_require__(62).concat('length','prototype');exports.f=Object.getOwnPropertyNames||function getOwnPropertyNames(O){return $keys(O,hiddenKeys)}}),(function(module,exports,__w_pdfjs_require__){"use strict";__w_pdfjs_require__(139);module.exports=__w_pdfjs_require__(13).String.padStart}),(function(module,exports,__w_pdfjs_require__){"use strict";var $export=__w_pdfjs_require__(11);var $pad=__w_pdfjs_require__(140);var userAgent=__w_pdfjs_require__(100);var WEBKIT_BUG=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent);$export($export.P+$export.F*WEBKIT_BUG,'String',{padStart:function padStart(maxLength){return $pad(this,maxLength,arguments.length>1?arguments[1]:undefined,true)}})}),(function(module,exports,__w_pdfjs_require__){"use strict";var toLength=__w_pdfjs_require__(32);var repeat=__w_pdfjs_require__(141);var defined=__w_pdfjs_require__(38);module.exports=function(that,maxLength,fillString,left){var S=String(defined(that));var stringLength=S.length;var fillStr=fillString===undefined?' ':String(fillString);var intMaxLength=toLength(maxLength);if(intMaxLength<=stringLength||fillStr=='')return S;var fillLen=intMaxLength-stringLength;var stringFiller=repeat.call(fillStr,Math.ceil(fillLen/fillStr.length));if(stringFiller.length>fillLen)stringFiller=stringFiller.slice(0,fillLen);return left?stringFiller+S:S+stringFiller}}),(function(module,exports,__w_pdfjs_require__){"use strict";var toInteger=__w_pdfjs_require__(33);var defined=__w_pdfjs_require__(38);module.exports=function repeat(count){var str=String(defined(this));var res='';var n=toInteger(count);if(n<0||n==Infinity)throw RangeError("Count can't be negative");for(;n>0;(n>>>=1)&&(str+=str)){if(n&1)res+=str}return res}}),(function(module,exports,__w_pdfjs_require__){"use strict";__w_pdfjs_require__(143);module.exports=__w_pdfjs_require__(13).String.padEnd}),(function(module,exports,__w_pdfjs_require__){"use strict";var $export=__w_pdfjs_require__(11);var $pad=__w_pdfjs_require__(140);var userAgent=__w_pdfjs_require__(100);var WEBKIT_BUG=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent);$export($export.P+$export.F*WEBKIT_BUG,'String',{padEnd:function padEnd(maxLength){return $pad(this,maxLength,arguments.length>1?arguments[1]:undefined,false)}})}),(function(module,exports,__w_pdfjs_require__){"use strict";__w_pdfjs_require__(145);module.exports=__w_pdfjs_require__(13).Object.values}),(function(module,exports,__w_pdfjs_require__){"use strict";var $export=__w_pdfjs_require__(11);var $values=__w_pdfjs_require__(146)(false);$export($export.S,'Object',{values:function values(it){return $values(it)}})}),(function(module,exports,__w_pdfjs_require__){"use strict";var DESCRIPTORS=__w_pdfjs_require__(19);var getKeys=__w_pdfjs_require__(59);var toIObject=__w_pdfjs_require__(47);var isEnum=__w_pdfjs_require__(78).f;module.exports=function(isEntries){return function(it){var O=toIObject(it);var keys=getKeys(O);var length=keys.length;var i=0;var result=[];var key;while(length>i){key=keys[i++];if(!DESCRIPTORS||isEnum.call(O,key)){result.push(isEntries?[key,O[key]]:O[key])}}return result}}}),(function(module,exports,__w_pdfjs_require__){"use strict";{var isReadableStreamSupported=false;if(typeof ReadableStream!=='undefined'){try{new ReadableStream({start:function start(controller){controller.close()}});isReadableStreamSupported=true}catch(e){}}if(isReadableStreamSupported){exports.ReadableStream=ReadableStream}else{exports.ReadableStream=__w_pdfjs_require__(148).ReadableStream}}}),(function(module,exports,__w_pdfjs_require__){"use strict";function _typeof2(obj){if(typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"){_typeof2=function _typeof2(obj){return typeof obj}}else{_typeof2=function _typeof2(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj}}return _typeof2(obj)}(function(e,a){for(var i in a){e[i]=a[i]}})(exports,function(modules){var installedModules={};function __w_pdfjs_require__(moduleId){if(installedModules[moduleId])return installedModules[moduleId].exports;var module=installedModules[moduleId]={i:moduleId,l:false,exports:{}};modules[moduleId].call(module.exports,module,module.exports,__w_pdfjs_require__);module.l=true;return module.exports}__w_pdfjs_require__.m=modules;__w_pdfjs_require__.c=installedModules;__w_pdfjs_require__.i=function(value){return value};__w_pdfjs_require__.d=function(exports,name,getter){if(!__w_pdfjs_require__.o(exports,name)){Object.defineProperty(exports,name,{configurable:false,enumerable:true,get:getter})}};__w_pdfjs_require__.n=function(module){var getter=module&&module.__esModule?function getDefault(){return module['default']}:function getModuleExports(){return module};__w_pdfjs_require__.d(getter,'a',getter);return getter};__w_pdfjs_require__.o=function(object,property){return Object.prototype.hasOwnProperty.call(object,property)};__w_pdfjs_require__.p="";return __w_pdfjs_require__(__w_pdfjs_require__.s=7)}([function(module,exports,__w_pdfjs_require__){"use strict";var _typeof=typeof Symbol==="function"&&_typeof2(Symbol.iterator)==="symbol"?function(obj){return _typeof2(obj)}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":_typeof2(obj)};var _require=__w_pdfjs_require__(1),assert=_require.assert;function IsPropertyKey(argument){return typeof argument==='string'||(typeof argument==='undefined'?'undefined':_typeof(argument))==='symbol'}exports.typeIsObject=function(x){return(typeof x==='undefined'?'undefined':_typeof(x))==='object'&&x!==null||typeof x==='function'};exports.createDataProperty=function(o,p,v){assert(exports.typeIsObject(o));Object.defineProperty(o,p,{value:v,writable:true,enumerable:true,configurable:true})};exports.createArrayFromList=function(elements){return elements.slice()};exports.ArrayBufferCopy=function(dest,destOffset,src,srcOffset,n){new Uint8Array(dest).set(new Uint8Array(src,srcOffset,n),destOffset)};exports.CreateIterResultObject=function(value,done){assert(typeof done==='boolean');var obj={};Object.defineProperty(obj,'value',{value:value,enumerable:true,writable:true,configurable:true});Object.defineProperty(obj,'done',{value:done,enumerable:true,writable:true,configurable:true});return obj};exports.IsFiniteNonNegativeNumber=function(v){if(Number.isNaN(v)){return false}if(v===Infinity){return false}if(v<0){return false}return true};function Call(F,V,args){if(typeof F!=='function'){throw new TypeError('Argument is not a function');}return Function.prototype.apply.call(F,V,args)}exports.InvokeOrNoop=function(O,P,args){assert(O!==undefined);assert(IsPropertyKey(P));assert(Array.isArray(args));var method=O[P];if(method===undefined){return undefined}return Call(method,O,args)};exports.PromiseInvokeOrNoop=function(O,P,args){assert(O!==undefined);assert(IsPropertyKey(P));assert(Array.isArray(args));try{return Promise.resolve(exports.InvokeOrNoop(O,P,args))}catch(returnValueE){return Promise.reject(returnValueE)}};exports.PromiseInvokeOrPerformFallback=function(O,P,args,F,argsF){assert(O!==undefined);assert(IsPropertyKey(P));assert(Array.isArray(args));assert(Array.isArray(argsF));var method=void 0;try{method=O[P]}catch(methodE){return Promise.reject(methodE)}if(method===undefined){return F.apply(null,argsF)}try{return Promise.resolve(Call(method,O,args))}catch(e){return Promise.reject(e)}};exports.TransferArrayBuffer=function(O){return O.slice()};exports.ValidateAndNormalizeHighWaterMark=function(highWaterMark){highWaterMark=Number(highWaterMark);if(Number.isNaN(highWaterMark)||highWaterMark<0){throw new RangeError('highWaterMark property of a queuing strategy must be non-negative and non-NaN');}return highWaterMark};exports.ValidateAndNormalizeQueuingStrategy=function(size,highWaterMark){if(size!==undefined&&typeof size!=='function'){throw new TypeError('size property of a queuing strategy must be a function');}highWaterMark=exports.ValidateAndNormalizeHighWaterMark(highWaterMark);return{size:size,highWaterMark:highWaterMark}}},function(module,exports,__w_pdfjs_require__){"use strict";function rethrowAssertionErrorRejection(e){if(e&&e.constructor===AssertionError){setTimeout(function(){throw e;},0)}}function AssertionError(message){this.name='AssertionError';this.message=message||'';this.stack=new Error().stack}AssertionError.prototype=Object.create(Error.prototype);AssertionError.prototype.constructor=AssertionError;function assert(value,message){if(!value){throw new AssertionError(message);}}module.exports={rethrowAssertionErrorRejection:rethrowAssertionErrorRejection,AssertionError:AssertionError,assert:assert}},function(module,exports,__w_pdfjs_require__){"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i0&&arguments[0]!==undefined?arguments[0]:{};var _ref=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},size=_ref.size,_ref$highWaterMark=_ref.highWaterMark,highWaterMark=_ref$highWaterMark===undefined?1:_ref$highWaterMark;_classCallCheck(this,WritableStream);this._state='writable';this._storedError=undefined;this._writer=undefined;this._writableStreamController=undefined;this._writeRequests=[];this._inFlightWriteRequest=undefined;this._closeRequest=undefined;this._inFlightCloseRequest=undefined;this._pendingAbortRequest=undefined;this._backpressure=false;var type=underlyingSink.type;if(type!==undefined){throw new RangeError('Invalid type is specified');}this._writableStreamController=new WritableStreamDefaultController(this,underlyingSink,size,highWaterMark);this._writableStreamController.__startSteps()}_createClass(WritableStream,[{key:'abort',value:function abort(reason){if(IsWritableStream(this)===false){return Promise.reject(streamBrandCheckException('abort'))}if(IsWritableStreamLocked(this)===true){return Promise.reject(new TypeError('Cannot abort a stream that already has a writer'))}return WritableStreamAbort(this,reason)}},{key:'getWriter',value:function getWriter(){if(IsWritableStream(this)===false){throw streamBrandCheckException('getWriter');}return AcquireWritableStreamDefaultWriter(this)}},{key:'locked',get:function get(){if(IsWritableStream(this)===false){throw streamBrandCheckException('locked');}return IsWritableStreamLocked(this)}}]);return WritableStream}();module.exports={AcquireWritableStreamDefaultWriter:AcquireWritableStreamDefaultWriter,IsWritableStream:IsWritableStream,IsWritableStreamLocked:IsWritableStreamLocked,WritableStream:WritableStream,WritableStreamAbort:WritableStreamAbort,WritableStreamDefaultControllerError:WritableStreamDefaultControllerError,WritableStreamDefaultWriterCloseWithErrorPropagation:WritableStreamDefaultWriterCloseWithErrorPropagation,WritableStreamDefaultWriterRelease:WritableStreamDefaultWriterRelease,WritableStreamDefaultWriterWrite:WritableStreamDefaultWriterWrite,WritableStreamCloseQueuedOrInFlight:WritableStreamCloseQueuedOrInFlight};function AcquireWritableStreamDefaultWriter(stream){return new WritableStreamDefaultWriter(stream)}function IsWritableStream(x){if(!typeIsObject(x)){return false}if(!Object.prototype.hasOwnProperty.call(x,'_writableStreamController')){return false}return true}function IsWritableStreamLocked(stream){assert(IsWritableStream(stream)===true,'IsWritableStreamLocked should only be used on known writable streams');if(stream._writer===undefined){return false}return true}function WritableStreamAbort(stream,reason){var state=stream._state;if(state==='closed'){return Promise.resolve(undefined)}if(state==='errored'){return Promise.reject(stream._storedError)}var error=new TypeError('Requested to abort');if(stream._pendingAbortRequest!==undefined){return Promise.reject(error)}assert(state==='writable'||state==='erroring','state must be writable or erroring');var wasAlreadyErroring=false;if(state==='erroring'){wasAlreadyErroring=true;reason=undefined}var promise=new Promise(function(resolve,reject){stream._pendingAbortRequest={_resolve:resolve,_reject:reject,_reason:reason,_wasAlreadyErroring:wasAlreadyErroring}});if(wasAlreadyErroring===false){WritableStreamStartErroring(stream,error)}return promise}function WritableStreamAddWriteRequest(stream){assert(IsWritableStreamLocked(stream)===true);assert(stream._state==='writable');var promise=new Promise(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}assert(state==='erroring');WritableStreamFinishErroring(stream)}function WritableStreamStartErroring(stream,reason){assert(stream._storedError===undefined,'stream._storedError === undefined');assert(stream._state==='writable','state must be writable');var controller=stream._writableStreamController;assert(controller!==undefined,'controller must not be undefined');stream._state='erroring';stream._storedError=reason;var writer=stream._writer;if(writer!==undefined){WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer,reason)}if(WritableStreamHasOperationMarkedInFlight(stream)===false&&controller._started===true){WritableStreamFinishErroring(stream)}}function WritableStreamFinishErroring(stream){assert(stream._state==='erroring','stream._state === erroring');assert(WritableStreamHasOperationMarkedInFlight(stream)===false,'WritableStreamHasOperationMarkedInFlight(stream) === false');stream._state='errored';stream._writableStreamController.__errorSteps();var storedError=stream._storedError;for(var i=0;i0,'Spec-level failure: should never dequeue from an empty queue.');var pair=container._queue.shift();container._queueTotalSize-=pair.size;if(container._queueTotalSize<0){container._queueTotalSize=0}return pair.value};exports.EnqueueValueWithSize=function(container,value,size){assert('_queue'in container&&'_queueTotalSize'in container,'Spec-level failure: EnqueueValueWithSize should only be used on containers with [[queue]] and [[queueTotalSize]].');size=Number(size);if(!IsFiniteNonNegativeNumber(size)){throw new RangeError('Size must be a finite, non-NaN, non-negative number.');}container._queue.push({value:value,size:size});container._queueTotalSize+=size};exports.PeekQueueValue=function(container){assert('_queue'in container&&'_queueTotalSize'in container,'Spec-level failure: PeekQueueValue should only be used on containers with [[queue]] and [[queueTotalSize]].');assert(container._queue.length>0,'Spec-level failure: should never peek at an empty queue.');var pair=container._queue[0];return pair.value};exports.ResetQueue=function(container){assert('_queue'in container&&'_queueTotalSize'in container,'Spec-level failure: ResetQueue should only be used on containers with [[queue]] and [[queueTotalSize]].');container._queue=[];container._queueTotalSize=0}},function(module,exports,__w_pdfjs_require__){"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i0&&arguments[0]!==undefined?arguments[0]:{};var _ref=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},size=_ref.size,highWaterMark=_ref.highWaterMark;_classCallCheck(this,ReadableStream);this._state='readable';this._reader=undefined;this._storedError=undefined;this._disturbed=false;this._readableStreamController=undefined;var type=underlyingSource.type;var typeString=String(type);if(typeString==='bytes'){if(highWaterMark===undefined){highWaterMark=0}this._readableStreamController=new ReadableByteStreamController(this,underlyingSource,highWaterMark)}else if(type===undefined){if(highWaterMark===undefined){highWaterMark=1}this._readableStreamController=new ReadableStreamDefaultController(this,underlyingSource,size,highWaterMark)}else{throw new RangeError('Invalid type is specified');}}_createClass(ReadableStream,[{key:'cancel',value:function cancel(reason){if(IsReadableStream(this)===false){return Promise.reject(streamBrandCheckException('cancel'))}if(IsReadableStreamLocked(this)===true){return Promise.reject(new TypeError('Cannot cancel a stream that already has a reader'))}return ReadableStreamCancel(this,reason)}},{key:'getReader',value:function getReader(){var _ref2=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},mode=_ref2.mode;if(IsReadableStream(this)===false){throw streamBrandCheckException('getReader');}if(mode===undefined){return AcquireReadableStreamDefaultReader(this)}mode=String(mode);if(mode==='byob'){return AcquireReadableStreamBYOBReader(this)}throw new RangeError('Invalid mode is specified');}},{key:'pipeThrough',value:function pipeThrough(_ref3,options){var writable=_ref3.writable,readable=_ref3.readable;var promise=this.pipeTo(writable,options);ifIsObjectAndHasAPromiseIsHandledInternalSlotSetPromiseIsHandledToTrue(promise);return readable}},{key:'pipeTo',value:function pipeTo(dest){var _this=this;var _ref4=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},preventClose=_ref4.preventClose,preventAbort=_ref4.preventAbort,preventCancel=_ref4.preventCancel;if(IsReadableStream(this)===false){return Promise.reject(streamBrandCheckException('pipeTo'))}if(IsWritableStream(dest)===false){return Promise.reject(new TypeError('ReadableStream.prototype.pipeTo\'s first argument must be a WritableStream'))}preventClose=Boolean(preventClose);preventAbort=Boolean(preventAbort);preventCancel=Boolean(preventCancel);if(IsReadableStreamLocked(this)===true){return Promise.reject(new TypeError('ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream'))}if(IsWritableStreamLocked(dest)===true){return Promise.reject(new TypeError('ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream'))}var reader=AcquireReadableStreamDefaultReader(this);var writer=AcquireWritableStreamDefaultWriter(dest);var shuttingDown=false;var currentWrite=Promise.resolve();return new Promise(function(resolve,reject){function pipeLoop(){currentWrite=Promise.resolve();if(shuttingDown===true){return Promise.resolve()}return writer._readyPromise.then(function(){return ReadableStreamDefaultReaderRead(reader).then(function(_ref5){var value=_ref5.value,done=_ref5.done;if(done===true){return}currentWrite=WritableStreamDefaultWriterWrite(writer,value)["catch"](function(){})})}).then(pipeLoop)}isOrBecomesErrored(_this,reader._closedPromise,function(storedError){if(preventAbort===false){shutdownWithAction(function(){return WritableStreamAbort(dest,storedError)},true,storedError)}else{shutdown(true,storedError)}});isOrBecomesErrored(dest,writer._closedPromise,function(storedError){if(preventCancel===false){shutdownWithAction(function(){return ReadableStreamCancel(_this,storedError)},true,storedError)}else{shutdown(true,storedError)}});isOrBecomesClosed(_this,reader._closedPromise,function(){if(preventClose===false){shutdownWithAction(function(){return WritableStreamDefaultWriterCloseWithErrorPropagation(writer)})}else{shutdown()}});if(WritableStreamCloseQueuedOrInFlight(dest)===true||dest._state==='closed'){var destClosed=new TypeError('the destination writable stream closed before all data could be piped to it');if(preventCancel===false){shutdownWithAction(function(){return ReadableStreamCancel(_this,destClosed)},true,destClosed)}else{shutdown(true,destClosed)}}pipeLoop()["catch"](function(err){currentWrite=Promise.resolve();rethrowAssertionErrorRejection(err);});function waitForWritesToFinish(){var oldCurrentWrite=currentWrite;return currentWrite.then(function(){return oldCurrentWrite!==currentWrite?waitForWritesToFinish():undefined})}function isOrBecomesErrored(stream,promise,action){if(stream._state==='errored'){action(stream._storedError)}else{promise["catch"](action)["catch"](rethrowAssertionErrorRejection);}}function isOrBecomesClosed(stream,promise,action){if(stream._state==='closed'){action()}else{promise.then(action)["catch"](rethrowAssertionErrorRejection);}}function shutdownWithAction(action,originalIsError,originalError){if(shuttingDown===true){return}shuttingDown=true;if(dest._state==='writable'&&WritableStreamCloseQueuedOrInFlight(dest)===false){waitForWritesToFinish().then(doTheRest)}else{doTheRest()}function doTheRest(){action().then(function(){return finalize(originalIsError,originalError)},function(newError){return finalize(true,newError)})["catch"](rethrowAssertionErrorRejection);}}function shutdown(isError,error){if(shuttingDown===true){return}shuttingDown=true;if(dest._state==='writable'&&WritableStreamCloseQueuedOrInFlight(dest)===false){waitForWritesToFinish().then(function(){return finalize(isError,error)})["catch"](rethrowAssertionErrorRejection);}else{finalize(isError,error)}}function finalize(isError,error){WritableStreamDefaultWriterRelease(writer);ReadableStreamReaderGenericRelease(reader);if(isError){reject(error)}else{resolve(undefined)}}})}},{key:'tee',value:function tee(){if(IsReadableStream(this)===false){throw streamBrandCheckException('tee');}var branches=ReadableStreamTee(this,false);return createArrayFromList(branches)}},{key:'locked',get:function get(){if(IsReadableStream(this)===false){throw streamBrandCheckException('locked');}return IsReadableStreamLocked(this)}}]);return ReadableStream}();module.exports={ReadableStream:ReadableStream,IsReadableStreamDisturbed:IsReadableStreamDisturbed,ReadableStreamDefaultControllerClose:ReadableStreamDefaultControllerClose,ReadableStreamDefaultControllerEnqueue:ReadableStreamDefaultControllerEnqueue,ReadableStreamDefaultControllerError:ReadableStreamDefaultControllerError,ReadableStreamDefaultControllerGetDesiredSize:ReadableStreamDefaultControllerGetDesiredSize};function AcquireReadableStreamBYOBReader(stream){return new ReadableStreamBYOBReader(stream)}function AcquireReadableStreamDefaultReader(stream){return new ReadableStreamDefaultReader(stream)}function IsReadableStream(x){if(!typeIsObject(x)){return false}if(!Object.prototype.hasOwnProperty.call(x,'_readableStreamController')){return false}return true}function IsReadableStreamDisturbed(stream){assert(IsReadableStream(stream)===true,'IsReadableStreamDisturbed should only be used on known readable streams');return stream._disturbed}function IsReadableStreamLocked(stream){assert(IsReadableStream(stream)===true,'IsReadableStreamLocked should only be used on known readable streams');if(stream._reader===undefined){return false}return true}function ReadableStreamTee(stream,cloneForBranch2){assert(IsReadableStream(stream)===true);assert(typeof cloneForBranch2==='boolean');var reader=AcquireReadableStreamDefaultReader(stream);var teeState={closedOrErrored:false,canceled1:false,canceled2:false,reason1:undefined,reason2:undefined};teeState.promise=new Promise(function(resolve){teeState._resolve=resolve});var pull=create_ReadableStreamTeePullFunction();pull._reader=reader;pull._teeState=teeState;pull._cloneForBranch2=cloneForBranch2;var cancel1=create_ReadableStreamTeeBranch1CancelFunction();cancel1._stream=stream;cancel1._teeState=teeState;var cancel2=create_ReadableStreamTeeBranch2CancelFunction();cancel2._stream=stream;cancel2._teeState=teeState;var underlyingSource1=Object.create(Object.prototype);createDataProperty(underlyingSource1,'pull',pull);createDataProperty(underlyingSource1,'cancel',cancel1);var branch1Stream=new ReadableStream(underlyingSource1);var underlyingSource2=Object.create(Object.prototype);createDataProperty(underlyingSource2,'pull',pull);createDataProperty(underlyingSource2,'cancel',cancel2);var branch2Stream=new ReadableStream(underlyingSource2);pull._branch1=branch1Stream._readableStreamController;pull._branch2=branch2Stream._readableStreamController;reader._closedPromise["catch"](function(r){if(teeState.closedOrErrored===true){return}ReadableStreamDefaultControllerError(pull._branch1,r);ReadableStreamDefaultControllerError(pull._branch2,r);teeState.closedOrErrored=true});return[branch1Stream,branch2Stream]}function create_ReadableStreamTeePullFunction(){function f(){var reader=f._reader,branch1=f._branch1,branch2=f._branch2,teeState=f._teeState;return ReadableStreamDefaultReaderRead(reader).then(function(result){assert(typeIsObject(result));var value=result.value;var done=result.done;assert(typeof done==='boolean');if(done===true&&teeState.closedOrErrored===false){if(teeState.canceled1===false){ReadableStreamDefaultControllerClose(branch1)}if(teeState.canceled2===false){ReadableStreamDefaultControllerClose(branch2)}teeState.closedOrErrored=true}if(teeState.closedOrErrored===true){return}var value1=value;var value2=value;if(teeState.canceled1===false){ReadableStreamDefaultControllerEnqueue(branch1,value1)}if(teeState.canceled2===false){ReadableStreamDefaultControllerEnqueue(branch2,value2)}})}return f}function create_ReadableStreamTeeBranch1CancelFunction(){function f(reason){var stream=f._stream,teeState=f._teeState;teeState.canceled1=true;teeState.reason1=reason;if(teeState.canceled2===true){var compositeReason=createArrayFromList([teeState.reason1,teeState.reason2]);var cancelResult=ReadableStreamCancel(stream,compositeReason);teeState._resolve(cancelResult)}return teeState.promise}return f}function create_ReadableStreamTeeBranch2CancelFunction(){function f(reason){var stream=f._stream,teeState=f._teeState;teeState.canceled2=true;teeState.reason2=reason;if(teeState.canceled1===true){var compositeReason=createArrayFromList([teeState.reason1,teeState.reason2]);var cancelResult=ReadableStreamCancel(stream,compositeReason);teeState._resolve(cancelResult)}return teeState.promise}return f}function ReadableStreamAddReadIntoRequest(stream){assert(IsReadableStreamBYOBReader(stream._reader)===true);assert(stream._state==='readable'||stream._state==='closed');var promise=new Promise(function(resolve,reject){var readIntoRequest={_resolve:resolve,_reject:reject};stream._reader._readIntoRequests.push(readIntoRequest)});return promise}function ReadableStreamAddReadRequest(stream){assert(IsReadableStreamDefaultReader(stream._reader)===true);assert(stream._state==='readable');var promise=new Promise(function(resolve,reject){var readRequest={_resolve:resolve,_reject:reject};stream._reader._readRequests.push(readRequest)});return promise}function ReadableStreamCancel(stream,reason){stream._disturbed=true;if(stream._state==='closed'){return Promise.resolve(undefined)}if(stream._state==='errored'){return Promise.reject(stream._storedError)}ReadableStreamClose(stream);var sourceCancelPromise=stream._readableStreamController.__cancelSteps(reason);return sourceCancelPromise.then(function(){return undefined})}function ReadableStreamClose(stream){assert(stream._state==='readable');stream._state='closed';var reader=stream._reader;if(reader===undefined){return undefined}if(IsReadableStreamDefaultReader(reader)===true){for(var i=0;i0);var readIntoRequest=reader._readIntoRequests.shift();readIntoRequest._resolve(CreateIterResultObject(chunk,done))}function ReadableStreamFulfillReadRequest(stream,chunk,done){var reader=stream._reader;assert(reader._readRequests.length>0);var readRequest=reader._readRequests.shift();readRequest._resolve(CreateIterResultObject(chunk,done))}function ReadableStreamGetNumReadIntoRequests(stream){return stream._reader._readIntoRequests.length}function ReadableStreamGetNumReadRequests(stream){return stream._reader._readRequests.length}function ReadableStreamHasBYOBReader(stream){var reader=stream._reader;if(reader===undefined){return false}if(IsReadableStreamBYOBReader(reader)===false){return false}return true}function ReadableStreamHasDefaultReader(stream){var reader=stream._reader;if(reader===undefined){return false}if(IsReadableStreamDefaultReader(reader)===false){return false}return true}var ReadableStreamDefaultReader=function(){function ReadableStreamDefaultReader(stream){_classCallCheck(this,ReadableStreamDefaultReader);if(IsReadableStream(stream)===false){throw new TypeError('ReadableStreamDefaultReader can only be constructed with a ReadableStream instance');}if(IsReadableStreamLocked(stream)===true){throw new TypeError('This stream has already been locked for exclusive reading by another reader');}ReadableStreamReaderGenericInitialize(this,stream);this._readRequests=[]}_createClass(ReadableStreamDefaultReader,[{key:'cancel',value:function cancel(reason){if(IsReadableStreamDefaultReader(this)===false){return Promise.reject(defaultReaderBrandCheckException('cancel'))}if(this._ownerReadableStream===undefined){return Promise.reject(readerLockException('cancel'))}return ReadableStreamReaderGenericCancel(this,reason)}},{key:'read',value:function read(){if(IsReadableStreamDefaultReader(this)===false){return Promise.reject(defaultReaderBrandCheckException('read'))}if(this._ownerReadableStream===undefined){return Promise.reject(readerLockException('read from'))}return ReadableStreamDefaultReaderRead(this)}},{key:'releaseLock',value:function releaseLock(){if(IsReadableStreamDefaultReader(this)===false){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)}},{key:'closed',get:function get(){if(IsReadableStreamDefaultReader(this)===false){return Promise.reject(defaultReaderBrandCheckException('closed'))}return this._closedPromise}}]);return ReadableStreamDefaultReader}();var ReadableStreamBYOBReader=function(){function ReadableStreamBYOBReader(stream){_classCallCheck(this,ReadableStreamBYOBReader);if(!IsReadableStream(stream)){throw new TypeError('ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source');}if(IsReadableByteStreamController(stream._readableStreamController)===false){throw new TypeError('Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source');}if(IsReadableStreamLocked(stream)){throw new TypeError('This stream has already been locked for exclusive reading by another reader');}ReadableStreamReaderGenericInitialize(this,stream);this._readIntoRequests=[]}_createClass(ReadableStreamBYOBReader,[{key:'cancel',value:function cancel(reason){if(!IsReadableStreamBYOBReader(this)){return Promise.reject(byobReaderBrandCheckException('cancel'))}if(this._ownerReadableStream===undefined){return Promise.reject(readerLockException('cancel'))}return ReadableStreamReaderGenericCancel(this,reason)}},{key:'read',value:function read(view){if(!IsReadableStreamBYOBReader(this)){return Promise.reject(byobReaderBrandCheckException('read'))}if(this._ownerReadableStream===undefined){return Promise.reject(readerLockException('read from'))}if(!ArrayBuffer.isView(view)){return Promise.reject(new TypeError('view must be an array buffer view'))}if(view.byteLength===0){return Promise.reject(new TypeError('view must have non-zero byteLength'))}return ReadableStreamBYOBReaderRead(this,view)}},{key:'releaseLock',value:function releaseLock(){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)}},{key:'closed',get:function get(){if(!IsReadableStreamBYOBReader(this)){return Promise.reject(byobReaderBrandCheckException('closed'))}return this._closedPromise}}]);return ReadableStreamBYOBReader}();function IsReadableStreamBYOBReader(x){if(!typeIsObject(x)){return false}if(!Object.prototype.hasOwnProperty.call(x,'_readIntoRequests')){return false}return true}function IsReadableStreamDefaultReader(x){if(!typeIsObject(x)){return false}if(!Object.prototype.hasOwnProperty.call(x,'_readRequests')){return false}return true}function ReadableStreamReaderGenericInitialize(reader,stream){reader._ownerReadableStream=stream;stream._reader=reader;if(stream._state==='readable'){defaultReaderClosedPromiseInitialize(reader)}else if(stream._state==='closed'){defaultReaderClosedPromiseInitializeAsResolved(reader)}else{assert(stream._state==='errored','state must be errored');defaultReaderClosedPromiseInitializeAsRejected(reader,stream._storedError);reader._closedPromise["catch"](function(){})}}function ReadableStreamReaderGenericCancel(reader,reason){var stream=reader._ownerReadableStream;assert(stream!==undefined);return ReadableStreamCancel(stream,reason)}function ReadableStreamReaderGenericRelease(reader){assert(reader._ownerReadableStream!==undefined);assert(reader._ownerReadableStream._reader===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._closedPromise["catch"](function(){});reader._ownerReadableStream._reader=undefined;reader._ownerReadableStream=undefined}function ReadableStreamBYOBReaderRead(reader,view){var stream=reader._ownerReadableStream;assert(stream!==undefined);stream._disturbed=true;if(stream._state==='errored'){return Promise.reject(stream._storedError)}return ReadableByteStreamControllerPullInto(stream._readableStreamController,view)}function ReadableStreamDefaultReaderRead(reader){var stream=reader._ownerReadableStream;assert(stream!==undefined);stream._disturbed=true;if(stream._state==='closed'){return Promise.resolve(CreateIterResultObject(undefined,true))}if(stream._state==='errored'){return Promise.reject(stream._storedError)}assert(stream._state==='readable');return stream._readableStreamController.__pullSteps()}var ReadableStreamDefaultController=function(){function ReadableStreamDefaultController(stream,underlyingSource,size,highWaterMark){_classCallCheck(this,ReadableStreamDefaultController);if(IsReadableStream(stream)===false){throw new TypeError('ReadableStreamDefaultController can only be constructed with a ReadableStream instance');}if(stream._readableStreamController!==undefined){throw new TypeError('ReadableStreamDefaultController instances can only be created by the ReadableStream constructor');}this._controlledReadableStream=stream;this._underlyingSource=underlyingSource;this._queue=undefined;this._queueTotalSize=undefined;ResetQueue(this);this._started=false;this._closeRequested=false;this._pullAgain=false;this._pulling=false;var normalizedStrategy=ValidateAndNormalizeQueuingStrategy(size,highWaterMark);this._strategySize=normalizedStrategy.size;this._strategyHWM=normalizedStrategy.highWaterMark;var controller=this;var startResult=InvokeOrNoop(underlyingSource,'start',[this]);Promise.resolve(startResult).then(function(){controller._started=true;assert(controller._pulling===false);assert(controller._pullAgain===false);ReadableStreamDefaultControllerCallPullIfNeeded(controller)},function(r){ReadableStreamDefaultControllerErrorIfNeeded(controller,r)})["catch"](rethrowAssertionErrorRejection);}_createClass(ReadableStreamDefaultController,[{key:'close',value:function close(){if(IsReadableStreamDefaultController(this)===false){throw defaultControllerBrandCheckException('close');}if(this._closeRequested===true){throw new TypeError('The stream has already been closed; do not close it again!');}var state=this._controlledReadableStream._state;if(state!=='readable'){throw new TypeError('The stream (in '+state+' state) is not in the readable state and cannot be closed');}ReadableStreamDefaultControllerClose(this);}},{key:'enqueue',value:function enqueue(chunk){if(IsReadableStreamDefaultController(this)===false){throw defaultControllerBrandCheckException('enqueue');}if(this._closeRequested===true){throw new TypeError('stream is closed or draining');}var state=this._controlledReadableStream._state;if(state!=='readable'){throw new TypeError('The stream (in '+state+' state) is not in the readable state and cannot be enqueued to');}return ReadableStreamDefaultControllerEnqueue(this,chunk);}},{key:'error',value:function error(e){if(IsReadableStreamDefaultController(this)===false){throw defaultControllerBrandCheckException('error');}var stream=this._controlledReadableStream;if(stream._state!=='readable'){throw new TypeError('The stream is '+stream._state+' and so cannot be errored');}ReadableStreamDefaultControllerError(this,e);}},{key:'__cancelSteps',value:function __cancelSteps(reason){ResetQueue(this);return PromiseInvokeOrNoop(this._underlyingSource,'cancel',[reason]);}},{key:'__pullSteps',value:function __pullSteps(){var stream=this._controlledReadableStream;if(this._queue.length>0){var chunk=DequeueValue(this);if(this._closeRequested===true&&this._queue.length===0){ReadableStreamClose(stream);}else{ReadableStreamDefaultControllerCallPullIfNeeded(this);}return Promise.resolve(CreateIterResultObject(chunk,false));}var pendingPromise=ReadableStreamAddReadRequest(stream);ReadableStreamDefaultControllerCallPullIfNeeded(this);return pendingPromise;}},{key:'desiredSize',get:function get(){if(IsReadableStreamDefaultController(this)===false){throw defaultControllerBrandCheckException('desiredSize');}return ReadableStreamDefaultControllerGetDesiredSize(this);}}]);return ReadableStreamDefaultController;}();function IsReadableStreamDefaultController(x){if(!typeIsObject(x)){return false;}if(!Object.prototype.hasOwnProperty.call(x,'_underlyingSource')){return false;}return true;}function ReadableStreamDefaultControllerCallPullIfNeeded(controller){var shouldPull=ReadableStreamDefaultControllerShouldCallPull(controller);if(shouldPull===false){return undefined;}if(controller._pulling===true){controller._pullAgain=true;return undefined;}assert(controller._pullAgain===false);controller._pulling=true;var pullPromise=PromiseInvokeOrNoop(controller._underlyingSource,'pull',[controller]);pullPromise.then(function(){controller._pulling=false;if(controller._pullAgain===true){controller._pullAgain=false;return ReadableStreamDefaultControllerCallPullIfNeeded(controller);}return undefined;},function(e){ReadableStreamDefaultControllerErrorIfNeeded(controller,e);})["catch"](rethrowAssertionErrorRejection);return undefined;}function ReadableStreamDefaultControllerShouldCallPull(controller){var stream=controller._controlledReadableStream;if(stream._state==='closed'||stream._state==='errored'){return false;}if(controller._closeRequested===true){return false;}if(controller._started===false){return false;}if(IsReadableStreamLocked(stream)===true&&ReadableStreamGetNumReadRequests(stream)>0){return true;}var desiredSize=ReadableStreamDefaultControllerGetDesiredSize(controller);if(desiredSize>0){return true;}return false;}function ReadableStreamDefaultControllerClose(controller){var stream=controller._controlledReadableStream;assert(controller._closeRequested===false);assert(stream._state==='readable');controller._closeRequested=true;if(controller._queue.length===0){ReadableStreamClose(stream);}}function ReadableStreamDefaultControllerEnqueue(controller,chunk){var stream=controller._controlledReadableStream;assert(controller._closeRequested===false);assert(stream._state==='readable');if(IsReadableStreamLocked(stream)===true&&ReadableStreamGetNumReadRequests(stream)>0){ReadableStreamFulfillReadRequest(stream,chunk,false);}else{var chunkSize=1;if(controller._strategySize!==undefined){var strategySize=controller._strategySize;try{chunkSize=strategySize(chunk);}catch(chunkSizeE){ReadableStreamDefaultControllerErrorIfNeeded(controller,chunkSizeE);throw chunkSizeE;}}try{EnqueueValueWithSize(controller,chunk,chunkSize);}catch(enqueueE){ReadableStreamDefaultControllerErrorIfNeeded(controller,enqueueE);throw enqueueE;}}ReadableStreamDefaultControllerCallPullIfNeeded(controller);return undefined;}function ReadableStreamDefaultControllerError(controller,e){var stream=controller._controlledReadableStream;assert(stream._state==='readable');ResetQueue(controller);ReadableStreamError(stream,e);}function ReadableStreamDefaultControllerErrorIfNeeded(controller,e){if(controller._controlledReadableStream._state==='readable'){ReadableStreamDefaultControllerError(controller,e);}}function ReadableStreamDefaultControllerGetDesiredSize(controller){var stream=controller._controlledReadableStream;var state=stream._state;if(state==='errored'){return null;}if(state==='closed'){return 0;}return controller._strategyHWM-controller._queueTotalSize;}var ReadableStreamBYOBRequest=function(){function ReadableStreamBYOBRequest(controller,view){_classCallCheck(this,ReadableStreamBYOBRequest);this._associatedReadableByteStreamController=controller;this._view=view;}_createClass(ReadableStreamBYOBRequest,[{key:'respond',value:function respond(bytesWritten){if(IsReadableStreamBYOBRequest(this)===false){throw byobRequestBrandCheckException('respond');}if(this._associatedReadableByteStreamController===undefined){throw new TypeError('This BYOB request has been invalidated');}ReadableByteStreamControllerRespond(this._associatedReadableByteStreamController,bytesWritten);}},{key:'respondWithNewView',value:function respondWithNewView(view){if(IsReadableStreamBYOBRequest(this)===false){throw byobRequestBrandCheckException('respond');}if(this._associatedReadableByteStreamController===undefined){throw new TypeError('This BYOB request has been invalidated');}if(!ArrayBuffer.isView(view)){throw new TypeError('You can only respond with array buffer views');}ReadableByteStreamControllerRespondWithNewView(this._associatedReadableByteStreamController,view);}},{key:'view',get:function get(){return this._view;}}]);return ReadableStreamBYOBRequest;}();var ReadableByteStreamController=function(){function ReadableByteStreamController(stream,underlyingByteSource,highWaterMark){_classCallCheck(this,ReadableByteStreamController);if(IsReadableStream(stream)===false){throw new TypeError('ReadableByteStreamController can only be constructed with a ReadableStream instance given a byte source');}if(stream._readableStreamController!==undefined){throw new TypeError('ReadableByteStreamController instances can only be created by the ReadableStream constructor given a byte source');}this._controlledReadableStream=stream;this._underlyingByteSource=underlyingByteSource;this._pullAgain=false;this._pulling=false;ReadableByteStreamControllerClearPendingPullIntos(this);this._queue=this._queueTotalSize=undefined;ResetQueue(this);this._closeRequested=false;this._started=false;this._strategyHWM=ValidateAndNormalizeHighWaterMark(highWaterMark);var autoAllocateChunkSize=underlyingByteSource.autoAllocateChunkSize;if(autoAllocateChunkSize!==undefined){if(Number.isInteger(autoAllocateChunkSize)===false||autoAllocateChunkSize<=0){throw new RangeError('autoAllocateChunkSize must be a positive integer');}}this._autoAllocateChunkSize=autoAllocateChunkSize;this._pendingPullIntos=[];var controller=this;var startResult=InvokeOrNoop(underlyingByteSource,'start',[this]);Promise.resolve(startResult).then(function(){controller._started=true;assert(controller._pulling===false);assert(controller._pullAgain===false);ReadableByteStreamControllerCallPullIfNeeded(controller);},function(r){if(stream._state==='readable'){ReadableByteStreamControllerError(controller,r);}})["catch"](rethrowAssertionErrorRejection);}_createClass(ReadableByteStreamController,[{key:'close',value:function close(){if(IsReadableByteStreamController(this)===false){throw byteStreamControllerBrandCheckException('close');}if(this._closeRequested===true){throw new TypeError('The stream has already been closed; do not close it again!');}var state=this._controlledReadableStream._state;if(state!=='readable'){throw new TypeError('The stream (in '+state+' state) is not in the readable state and cannot be closed');}ReadableByteStreamControllerClose(this);}},{key:'enqueue',value:function enqueue(chunk){if(IsReadableByteStreamController(this)===false){throw byteStreamControllerBrandCheckException('enqueue');}if(this._closeRequested===true){throw new TypeError('stream is closed or draining');}var state=this._controlledReadableStream._state;if(state!=='readable'){throw new TypeError('The stream (in '+state+' state) is not in the readable state and cannot be enqueued to');}if(!ArrayBuffer.isView(chunk)){throw new TypeError('You can only enqueue array buffer views when using a ReadableByteStreamController');}ReadableByteStreamControllerEnqueue(this,chunk);}},{key:'error',value:function error(e){if(IsReadableByteStreamController(this)===false){throw byteStreamControllerBrandCheckException('error');}var stream=this._controlledReadableStream;if(stream._state!=='readable'){throw new TypeError('The stream is '+stream._state+' and so cannot be errored');}ReadableByteStreamControllerError(this,e);}},{key:'__cancelSteps',value:function __cancelSteps(reason){if(this._pendingPullIntos.length>0){var firstDescriptor=this._pendingPullIntos[0];firstDescriptor.bytesFilled=0;}ResetQueue(this);return PromiseInvokeOrNoop(this._underlyingByteSource,'cancel',[reason]);}},{key:'__pullSteps',value:function __pullSteps(){var stream=this._controlledReadableStream;assert(ReadableStreamHasDefaultReader(stream)===true);if(this._queueTotalSize>0){assert(ReadableStreamGetNumReadRequests(stream)===0);var entry=this._queue.shift();this._queueTotalSize-=entry.byteLength;ReadableByteStreamControllerHandleQueueDrain(this);var view=void 0;try{view=new Uint8Array(entry.buffer,entry.byteOffset,entry.byteLength);}catch(viewE){return Promise.reject(viewE);}return Promise.resolve(CreateIterResultObject(view,false));}var autoAllocateChunkSize=this._autoAllocateChunkSize;if(autoAllocateChunkSize!==undefined){var buffer=void 0;try{buffer=new ArrayBuffer(autoAllocateChunkSize);}catch(bufferE){return Promise.reject(bufferE);}var pullIntoDescriptor={buffer:buffer,byteOffset:0,byteLength:autoAllocateChunkSize,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:'default'};this._pendingPullIntos.push(pullIntoDescriptor);}var promise=ReadableStreamAddReadRequest(stream);ReadableByteStreamControllerCallPullIfNeeded(this);return promise;}},{key:'byobRequest',get:function get(){if(IsReadableByteStreamController(this)===false){throw byteStreamControllerBrandCheckException('byobRequest');}if(this._byobRequest===undefined&&this._pendingPullIntos.length>0){var firstDescriptor=this._pendingPullIntos[0];var view=new Uint8Array(firstDescriptor.buffer,firstDescriptor.byteOffset+firstDescriptor.bytesFilled,firstDescriptor.byteLength-firstDescriptor.bytesFilled);this._byobRequest=new ReadableStreamBYOBRequest(this,view);}return this._byobRequest;}},{key:'desiredSize',get:function get(){if(IsReadableByteStreamController(this)===false){throw byteStreamControllerBrandCheckException('desiredSize');}return ReadableByteStreamControllerGetDesiredSize(this);}}]);return ReadableByteStreamController;}();function IsReadableByteStreamController(x){if(!typeIsObject(x)){return false;}if(!Object.prototype.hasOwnProperty.call(x,'_underlyingByteSource')){return false;}return true;}function IsReadableStreamBYOBRequest(x){if(!typeIsObject(x)){return false;}if(!Object.prototype.hasOwnProperty.call(x,'_associatedReadableByteStreamController')){return false;}return true;}function ReadableByteStreamControllerCallPullIfNeeded(controller){var shouldPull=ReadableByteStreamControllerShouldCallPull(controller);if(shouldPull===false){return undefined;}if(controller._pulling===true){controller._pullAgain=true;return undefined;}assert(controller._pullAgain===false);controller._pulling=true;var pullPromise=PromiseInvokeOrNoop(controller._underlyingByteSource,'pull',[controller]);pullPromise.then(function(){controller._pulling=false;if(controller._pullAgain===true){controller._pullAgain=false;ReadableByteStreamControllerCallPullIfNeeded(controller);}},function(e){if(controller._controlledReadableStream._state==='readable'){ReadableByteStreamControllerError(controller,e);}})["catch"](rethrowAssertionErrorRejection);return undefined;}function ReadableByteStreamControllerClearPendingPullIntos(controller){ReadableByteStreamControllerInvalidateBYOBRequest(controller);controller._pendingPullIntos=[];}function ReadableByteStreamControllerCommitPullIntoDescriptor(stream,pullIntoDescriptor){assert(stream._state!=='errored','state must not be errored');var done=false;if(stream._state==='closed'){assert(pullIntoDescriptor.bytesFilled===0);done=true;}var filledView=ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor);if(pullIntoDescriptor.readerType==='default'){ReadableStreamFulfillReadRequest(stream,filledView,done);}else{assert(pullIntoDescriptor.readerType==='byob');ReadableStreamFulfillReadIntoRequest(stream,filledView,done);}}function ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor){var bytesFilled=pullIntoDescriptor.bytesFilled;var elementSize=pullIntoDescriptor.elementSize;assert(bytesFilled<=pullIntoDescriptor.byteLength);assert(bytesFilled%elementSize===0);return new pullIntoDescriptor.ctor(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[0];var bytesToCopy=Math.min(totalBytesToCopyRemaining,headOfQueue.byteLength);var destStart=pullIntoDescriptor.byteOffset+pullIntoDescriptor.bytesFilled;ArrayBufferCopy(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;}if(ready===false){assert(controller._queueTotalSize===0,'queue must be empty');assert(pullIntoDescriptor.bytesFilled>0);assert(pullIntoDescriptor.bytesFilled0){if(controller._queueTotalSize===0){return;}var pullIntoDescriptor=controller._pendingPullIntos[0];if(ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller,pullIntoDescriptor)===true){ReadableByteStreamControllerShiftPendingPullInto(controller);ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableStream,pullIntoDescriptor);}}}function ReadableByteStreamControllerPullInto(controller,view){var stream=controller._controlledReadableStream;var elementSize=1;if(view.constructor!==DataView){elementSize=view.constructor.BYTES_PER_ELEMENT;}var ctor=view.constructor;var pullIntoDescriptor={buffer:view.buffer,byteOffset:view.byteOffset,byteLength:view.byteLength,bytesFilled:0,elementSize:elementSize,ctor:ctor,readerType:'byob'};if(controller._pendingPullIntos.length>0){pullIntoDescriptor.buffer=TransferArrayBuffer(pullIntoDescriptor.buffer);controller._pendingPullIntos.push(pullIntoDescriptor);return ReadableStreamAddReadIntoRequest(stream);}if(stream._state==='closed'){var emptyView=new view.constructor(pullIntoDescriptor.buffer,pullIntoDescriptor.byteOffset,0);return Promise.resolve(CreateIterResultObject(emptyView,true));}if(controller._queueTotalSize>0){if(ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller,pullIntoDescriptor)===true){var filledView=ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor);ReadableByteStreamControllerHandleQueueDrain(controller);return Promise.resolve(CreateIterResultObject(filledView,false));}if(controller._closeRequested===true){var e=new TypeError('Insufficient bytes to fill elements in the given buffer');ReadableByteStreamControllerError(controller,e);return Promise.reject(e);}}pullIntoDescriptor.buffer=TransferArrayBuffer(pullIntoDescriptor.buffer);controller._pendingPullIntos.push(pullIntoDescriptor);var promise=ReadableStreamAddReadIntoRequest(stream);ReadableByteStreamControllerCallPullIfNeeded(controller);return promise;}function ReadableByteStreamControllerRespondInClosedState(controller,firstDescriptor){firstDescriptor.buffer=TransferArrayBuffer(firstDescriptor.buffer);assert(firstDescriptor.bytesFilled===0,'bytesFilled must be 0');var stream=controller._controlledReadableStream;if(ReadableStreamHasBYOBReader(stream)===true){while(ReadableStreamGetNumReadIntoRequests(stream)>0){var pullIntoDescriptor=ReadableByteStreamControllerShiftPendingPullInto(controller);ReadableByteStreamControllerCommitPullIntoDescriptor(stream,pullIntoDescriptor);}}}function ReadableByteStreamControllerRespondInReadableState(controller,bytesWritten,pullIntoDescriptor){if(pullIntoDescriptor.bytesFilled+bytesWritten>pullIntoDescriptor.byteLength){throw new RangeError('bytesWritten out of range');}ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller,bytesWritten,pullIntoDescriptor);if(pullIntoDescriptor.bytesFilled0){var end=pullIntoDescriptor.byteOffset+pullIntoDescriptor.bytesFilled;var remainder=pullIntoDescriptor.buffer.slice(end-remainderSize,end);ReadableByteStreamControllerEnqueueChunkToQueue(controller,remainder,0,remainder.byteLength);}pullIntoDescriptor.buffer=TransferArrayBuffer(pullIntoDescriptor.buffer);pullIntoDescriptor.bytesFilled-=remainderSize;ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableStream,pullIntoDescriptor);ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller);}function ReadableByteStreamControllerRespondInternal(controller,bytesWritten){var firstDescriptor=controller._pendingPullIntos[0];var stream=controller._controlledReadableStream;if(stream._state==='closed'){if(bytesWritten!==0){throw new TypeError('bytesWritten must be 0 when calling respond() on a closed stream');}ReadableByteStreamControllerRespondInClosedState(controller,firstDescriptor);}else{assert(stream._state==='readable');ReadableByteStreamControllerRespondInReadableState(controller,bytesWritten,firstDescriptor);}}function ReadableByteStreamControllerShiftPendingPullInto(controller){var descriptor=controller._pendingPullIntos.shift();ReadableByteStreamControllerInvalidateBYOBRequest(controller);return descriptor;}function ReadableByteStreamControllerShouldCallPull(controller){var stream=controller._controlledReadableStream;if(stream._state!=='readable'){return false;}if(controller._closeRequested===true){return false;}if(controller._started===false){return false;}if(ReadableStreamHasDefaultReader(stream)===true&&ReadableStreamGetNumReadRequests(stream)>0){return true;}if(ReadableStreamHasBYOBReader(stream)===true&&ReadableStreamGetNumReadIntoRequests(stream)>0){return true;}if(ReadableByteStreamControllerGetDesiredSize(controller)>0){return true;}return false;}function ReadableByteStreamControllerClose(controller){var stream=controller._controlledReadableStream;assert(controller._closeRequested===false);assert(stream._state==='readable');if(controller._queueTotalSize>0){controller._closeRequested=true;return;}if(controller._pendingPullIntos.length>0){var firstPendingPullInto=controller._pendingPullIntos[0];if(firstPendingPullInto.bytesFilled>0){var e=new TypeError('Insufficient bytes to fill elements in the given buffer');ReadableByteStreamControllerError(controller,e);throw e;}}ReadableStreamClose(stream);}function ReadableByteStreamControllerEnqueue(controller,chunk){var stream=controller._controlledReadableStream;assert(controller._closeRequested===false);assert(stream._state==='readable');var buffer=chunk.buffer;var byteOffset=chunk.byteOffset;var byteLength=chunk.byteLength;var transferredBuffer=TransferArrayBuffer(buffer);if(ReadableStreamHasDefaultReader(stream)===true){if(ReadableStreamGetNumReadRequests(stream)===0){ReadableByteStreamControllerEnqueueChunkToQueue(controller,transferredBuffer,byteOffset,byteLength);}else{assert(controller._queue.length===0);var transferredView=new Uint8Array(transferredBuffer,byteOffset,byteLength);ReadableStreamFulfillReadRequest(stream,transferredView,false);}}else if(ReadableStreamHasBYOBReader(stream)===true){ReadableByteStreamControllerEnqueueChunkToQueue(controller,transferredBuffer,byteOffset,byteLength);ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller);}else{assert(IsReadableStreamLocked(stream)===false,'stream must not be locked');ReadableByteStreamControllerEnqueueChunkToQueue(controller,transferredBuffer,byteOffset,byteLength);}}function ReadableByteStreamControllerError(controller,e){var stream=controller._controlledReadableStream;assert(stream._state==='readable');ReadableByteStreamControllerClearPendingPullIntos(controller);ResetQueue(controller);ReadableStreamError(stream,e);}function ReadableByteStreamControllerGetDesiredSize(controller){var stream=controller._controlledReadableStream;var state=stream._state;if(state==='errored'){return null;}if(state==='closed'){return 0;}return controller._strategyHWM-controller._queueTotalSize;}function ReadableByteStreamControllerRespond(controller,bytesWritten){bytesWritten=Number(bytesWritten);if(IsFiniteNonNegativeNumber(bytesWritten)===false){throw new RangeError('bytesWritten must be a finite');}assert(controller._pendingPullIntos.length>0);ReadableByteStreamControllerRespondInternal(controller,bytesWritten);}function ReadableByteStreamControllerRespondWithNewView(controller,view){assert(controller._pendingPullIntos.length>0);var firstDescriptor=controller._pendingPullIntos[0];if(firstDescriptor.byteOffset+firstDescriptor.bytesFilled!==view.byteOffset){throw new RangeError('The region specified by view does not match byobRequest');}if(firstDescriptor.byteLength!==view.byteLength){throw new RangeError('The buffer of view has different capacity than byobRequest');}firstDescriptor.buffer=view.buffer;ReadableByteStreamControllerRespondInternal(controller,view.byteLength);}function streamBrandCheckException(name){return new TypeError('ReadableStream.prototype.'+name+' can only be used on a ReadableStream');}function readerLockException(name){return new TypeError('Cannot '+name+' a stream using a released reader');}function defaultReaderBrandCheckException(name){return new TypeError('ReadableStreamDefaultReader.prototype.'+name+' can only be used on a ReadableStreamDefaultReader');}function defaultReaderClosedPromiseInitialize(reader){reader._closedPromise=new Promise(function(resolve,reject){reader._closedPromise_resolve=resolve;reader._closedPromise_reject=reject;});}function defaultReaderClosedPromiseInitializeAsRejected(reader,reason){reader._closedPromise=Promise.reject(reason);reader._closedPromise_resolve=undefined;reader._closedPromise_reject=undefined;}function defaultReaderClosedPromiseInitializeAsResolved(reader){reader._closedPromise=Promise.resolve(undefined);reader._closedPromise_resolve=undefined;reader._closedPromise_reject=undefined;}function defaultReaderClosedPromiseReject(reader,reason){assert(reader._closedPromise_resolve!==undefined);assert(reader._closedPromise_reject!==undefined);reader._closedPromise_reject(reason);reader._closedPromise_resolve=undefined;reader._closedPromise_reject=undefined;}function defaultReaderClosedPromiseResetToRejected(reader,reason){assert(reader._closedPromise_resolve===undefined);assert(reader._closedPromise_reject===undefined);reader._closedPromise=Promise.reject(reason);}function defaultReaderClosedPromiseResolve(reader){assert(reader._closedPromise_resolve!==undefined);assert(reader._closedPromise_reject!==undefined);reader._closedPromise_resolve(undefined);reader._closedPromise_resolve=undefined;reader._closedPromise_reject=undefined;}function byobReaderBrandCheckException(name){return new TypeError('ReadableStreamBYOBReader.prototype.'+name+' can only be used on a ReadableStreamBYOBReader');}function defaultControllerBrandCheckException(name){return new TypeError('ReadableStreamDefaultController.prototype.'+name+' can only be used on a ReadableStreamDefaultController');}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 ifIsObjectAndHasAPromiseIsHandledInternalSlotSetPromiseIsHandledToTrue(promise){try{Promise.prototype.then.call(promise,undefined,function(){});}catch(e){}}},function(module,exports,__w_pdfjs_require__){"use strict";var transformStream=__w_pdfjs_require__(6);var readableStream=__w_pdfjs_require__(4);var writableStream=__w_pdfjs_require__(2);exports.TransformStream=transformStream.TransformStream;exports.ReadableStream=readableStream.ReadableStream;exports.IsReadableStreamDisturbed=readableStream.IsReadableStreamDisturbed;exports.ReadableStreamDefaultControllerClose=readableStream.ReadableStreamDefaultControllerClose;exports.ReadableStreamDefaultControllerEnqueue=readableStream.ReadableStreamDefaultControllerEnqueue;exports.ReadableStreamDefaultControllerError=readableStream.ReadableStreamDefaultControllerError;exports.ReadableStreamDefaultControllerGetDesiredSize=readableStream.ReadableStreamDefaultControllerGetDesiredSize;exports.AcquireWritableStreamDefaultWriter=writableStream.AcquireWritableStreamDefaultWriter;exports.IsWritableStream=writableStream.IsWritableStream;exports.IsWritableStreamLocked=writableStream.IsWritableStreamLocked;exports.WritableStream=writableStream.WritableStream;exports.WritableStreamAbort=writableStream.WritableStreamAbort;exports.WritableStreamDefaultControllerError=writableStream.WritableStreamDefaultControllerError;exports.WritableStreamDefaultWriterCloseWithErrorPropagation=writableStream.WritableStreamDefaultWriterCloseWithErrorPropagation;exports.WritableStreamDefaultWriterRelease=writableStream.WritableStreamDefaultWriterRelease;exports.WritableStreamDefaultWriterWrite=writableStream.WritableStreamDefaultWriterWrite;},function(module,exports,__w_pdfjs_require__){"use strict";var _createClass=function(){function defineProperties(target,props){for(var i=0;i0&&arguments[0]!==undefined?arguments[0]:{};_classCallCheck(this,TransformStream);this._transformer=transformer;var readableStrategy=transformer.readableStrategy,writableStrategy=transformer.writableStrategy;this._transforming=false;this._errored=false;this._storedError=undefined;this._writableController=undefined;this._readableController=undefined;this._transformStreamController=undefined;this._writableDone=false;this._readableClosed=false;this._backpressure=undefined;this._backpressureChangePromise=undefined;this._backpressureChangePromise_resolve=undefined;this._transformStreamController=new TransformStreamDefaultController(this);var startPromise_resolve=void 0;var startPromise=new Promise(function(resolve){startPromise_resolve=resolve;});var source=new TransformStreamSource(this,startPromise);this._readable=new ReadableStream(source,readableStrategy);var sink=new TransformStreamSink(this,startPromise);this._writable=new WritableStream(sink,writableStrategy);assert(this._writableController!==undefined);assert(this._readableController!==undefined);var desiredSize=ReadableStreamDefaultControllerGetDesiredSize(this._readableController);TransformStreamSetBackpressure(this,desiredSize<=0);var transformStream=this;var startResult=InvokeOrNoop(transformer,'start',[transformStream._transformStreamController]);startPromise_resolve(startResult);startPromise["catch"](function(e){if(transformStream._errored===false){transformStream._errored=true;transformStream._storedError=e;}});}_createClass(TransformStream,[{key:'readable',get:function get(){if(IsTransformStream(this)===false){throw streamBrandCheckException('readable');}return this._readable;}},{key:'writable',get:function get(){if(IsTransformStream(this)===false){throw streamBrandCheckException('writable');}return this._writable;}}]);return TransformStream;}();module.exports={TransformStream:TransformStream};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');}},function(module,exports,__w_pdfjs_require__){module.exports=__w_pdfjs_require__(5);}]));}),(function(module,exports,__w_pdfjs_require__){"use strict";function _typeof(obj){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 isURLSupported=false;try{if(typeof URL==='function'&&_typeof(URL.prototype)==='object'&&'origin'in URL.prototype){var u=new URL('b','http://a');u.pathname='c%20d';isURLSupported=u.href==='http://a/c%20d';}}catch(ex){}if(isURLSupported){exports.URL=URL;}else{var PolyfillURL=__w_pdfjs_require__(150).URL;var OriginalURL=__w_pdfjs_require__(7).URL;if(OriginalURL){PolyfillURL.createObjectURL=function(blob){return OriginalURL.createObjectURL.apply(OriginalURL,arguments);};PolyfillURL.revokeObjectURL=function(url){OriginalURL.revokeObjectURL(url);};}exports.URL=PolyfillURL;}}}),(function(module,exports,__w_pdfjs_require__){"use strict";(function URLConstructorClosure(){'use strict';var relative=Object.create(null);relative['ftp']=21;relative['file']=0;relative['gopher']=70;relative['http']=80;relative['https']=443;relative['ws']=80;relative['wss']=443;var relativePathDotMapping=Object.create(null);relativePathDotMapping['%2e']='.';relativePathDotMapping['.%2e']='..';relativePathDotMapping['%2e.']='..';relativePathDotMapping['%2e%2e']='..';function isRelativeScheme(scheme){return relative[scheme]!==undefined;}function invalid(){clear.call(this);this._isInvalid=true;}function IDNAToASCII(h){if(h===''){invalid.call(this);}return h.toLowerCase();}function percentEscape(c){var unicode=c.charCodeAt(0);if(unicode>0x20&&unicode<0x7F&&[0x22,0x23,0x3C,0x3E,0x3F,0x60].indexOf(unicode)===-1){return c;}return encodeURIComponent(c);}function percentEscapeQuery(c){var unicode=c.charCodeAt(0);if(unicode>0x20&&unicode<0x7F&&[0x22,0x23,0x3C,0x3E,0x60].indexOf(unicode)===-1){return c;}return encodeURIComponent(c);}var EOF,ALPHA=/[a-zA-Z]/,ALPHANUMERIC=/[a-zA-Z0-9\+\-\.]/;function parse(input,stateOverride,base){function err(message){errors.push(message);}var state=stateOverride||'scheme start',cursor=0,buffer='',seenAt=false,seenBracket=false,errors=[];loop:while((input[cursor-1]!==EOF||cursor===0)&&!this._isInvalid){var c=input[cursor];switch(state){case'scheme start':if(c&&ALPHA.test(c)){buffer+=c.toLowerCase();state='scheme';}else if(!stateOverride){buffer='';state='no scheme';continue;}else{err('Invalid scheme.');break loop;}break;case'scheme':if(c&&ALPHANUMERIC.test(c)){buffer+=c.toLowerCase();}else if(c===':'){this._scheme=buffer;buffer='';if(stateOverride){break loop;}if(isRelativeScheme(this._scheme)){this._isRelative=true;}if(this._scheme==='file'){state='relative';}else if(this._isRelative&&base&&base._scheme===this._scheme){state='relative or authority';}else if(this._isRelative){state='authority first slash';}else{state='scheme data';}}else if(!stateOverride){buffer='';cursor=0;state='no scheme';continue;}else if(c===EOF){break loop;}else{err('Code point not allowed in scheme: '+c);break loop;}break;case'scheme data':if(c==='?'){this._query='?';state='query';}else if(c==='#'){this._fragment='#';state='fragment';}else{if(c!==EOF&&c!=='\t'&&c!=='\n'&&c!=='\r'){this._schemeData+=percentEscape(c);}}break;case'no scheme':if(!base||!isRelativeScheme(base._scheme)){err('Missing scheme.');invalid.call(this);}else{state='relative';continue;}break;case'relative or authority':if(c==='/'&&input[cursor+1]==='/'){state='authority ignore slashes';}else{err('Expected /, got: '+c);state='relative';continue;}break;case'relative':this._isRelative=true;if(this._scheme!=='file'){this._scheme=base._scheme;}if(c===EOF){this._host=base._host;this._port=base._port;this._path=base._path.slice();this._query=base._query;this._username=base._username;this._password=base._password;break loop;}else if(c==='/'||c==='\\'){if(c==='\\'){err('\\ is an invalid code point.');}state='relative slash';}else if(c==='?'){this._host=base._host;this._port=base._port;this._path=base._path.slice();this._query='?';this._username=base._username;this._password=base._password;state='query';}else if(c==='#'){this._host=base._host;this._port=base._port;this._path=base._path.slice();this._query=base._query;this._fragment='#';this._username=base._username;this._password=base._password;state='fragment';}else{var nextC=input[cursor+1];var nextNextC=input[cursor+2];if(this._scheme!=='file'||!ALPHA.test(c)||nextC!==':'&&nextC!=='|'||nextNextC!==EOF&&nextNextC!=='/'&&nextNextC!=='\\'&&nextNextC!=='?'&&nextNextC!=='#'){this._host=base._host;this._port=base._port;this._username=base._username;this._password=base._password;this._path=base._path.slice();this._path.pop();}state='relative path';continue;}break;case'relative slash':if(c==='/'||c==='\\'){if(c==='\\'){err('\\ is an invalid code point.');}if(this._scheme==='file'){state='file host';}else{state='authority ignore slashes';}}else{if(this._scheme!=='file'){this._host=base._host;this._port=base._port;this._username=base._username;this._password=base._password;}state='relative path';continue;}break;case'authority first slash':if(c==='/'){state='authority second slash';}else{err('Expected \'/\', got: '+c);state='authority ignore slashes';continue}break;case'authority second slash':state='authority ignore slashes';if(c!=='/'){err('Expected \'/\', got: '+c);continue}break;case'authority ignore slashes':if(c!=='/'&&c!=='\\'){state='authority';continue}else{err('Expected authority, got: '+c)}break;case'authority':if(c==='@'){if(seenAt){err('@ already seen.');buffer+='%40'}seenAt=true;for(var i=0;i=this.end?this.numChunks:Math.floor(position/this.chunkSize);for(var curChunk=beginChunk;curChunk=end){return}if(end<=this.progressiveDataLength){return}var chunkSize=this.chunkSize;var beginChunk=Math.floor(begin/chunkSize);var endChunk=Math.floor((end-1)/chunkSize)+1;for(var chunk=beginChunk;chunk=this.end){return-1}this.ensureByte(pos);return this.bytes[this.pos++]}},{key:"getUint16",value:function getUint16(){var b0=this.getByte();var b1=this.getByte();if(b0===-1||b1===-1){return-1}return(b0<<8)+b1}},{key:"getInt32",value:function getInt32(){var b0=this.getByte();var b1=this.getByte();var b2=this.getByte();var b3=this.getByte();return(b0<<24)+(b1<<16)+(b2<<8)+b3}},{key:"getBytes",value:function getBytes(length){var forceClamped=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var bytes=this.bytes;var pos=this.pos;var strEnd=this.end;if(!length){this.ensureRange(pos,strEnd);var _subarray=bytes.subarray(pos,strEnd);return forceClamped?new Uint8ClampedArray(_subarray):_subarray}var end=pos+length;if(end>strEnd){end=strEnd}this.ensureRange(pos,end);this.pos=end;var subarray=bytes.subarray(pos,end);return forceClamped?new Uint8ClampedArray(subarray):subarray}},{key:"peekByte",value:function peekByte(){var peekedByte=this.getByte();this.pos--;return peekedByte}},{key:"peekBytes",value:function peekBytes(length){var forceClamped=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var bytes=this.getBytes(length,forceClamped);this.pos-=bytes.length;return bytes}},{key:"getByteRange",value:function getByteRange(begin,end){this.ensureRange(begin,end);return this.bytes.subarray(begin,end)}},{key:"skip",value:function skip(n){if(!n){n=1}this.pos+=n}},{key:"reset",value:function reset(){this.pos=this.start}},{key:"moveStart",value:function moveStart(){this.start=this.pos}},{key:"makeSubStream",value:function makeSubStream(start,length,dict){if(length){this.ensureRange(start,start+length)}else{this.ensureByte(start)}function ChunkedStreamSubstream(){}ChunkedStreamSubstream.prototype=Object.create(this);ChunkedStreamSubstream.prototype.getMissingChunks=function(){var chunkSize=this.chunkSize;var beginChunk=Math.floor(this.start/chunkSize);var endChunk=Math.floor((this.end-1)/chunkSize)+1;var missingChunks=[];for(var chunk=beginChunk;chunk0&&arguments[0]!==undefined?arguments[0]:[];var chunksToRequest=[];var _iteratorNormalCompletion3=true;var _didIteratorError3=false;var _iteratorError3=undefined;try{for(var _iterator3=ranges[Symbol.iterator](),_step3;!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=true){var range=_step3.value;var beginChunk=this.getBeginChunk(range.begin);var endChunk=this.getEndChunk(range.end);for(var chunk=beginChunk;chunk=0&&prevChunk+1!==chunk){groupedChunks.push({beginChunk:beginChunk,endChunk:prevChunk+1});beginChunk=chunk}if(i+1===chunks.length){groupedChunks.push({beginChunk:beginChunk,endChunk:chunk+1})}prevChunk=chunk}return groupedChunks}},{key:"onProgress",value:function onProgress(args){this.msgHandler.send('DocProgress',{loaded:this.stream.numChunksLoaded*this.chunkSize+args.loaded,total:this.length})}},{key:"onReceiveData",value:function onReceiveData(args){var chunk=args.chunk;var isProgressive=args.begin===undefined;var begin=isProgressive?this.progressiveDataLength:args.begin;var end=begin+chunk.byteLength;var beginChunk=Math.floor(begin/this.chunkSize);var endChunk=endLOOP_LIMIT){(0,_util.warn)("getInheritableProperty: maximum loop count exceeded for \"".concat(key,"\""));break}dict=dict.get('Parent')}return values}var ROMAN_NUMBER_MAP=['','C','CC','CCC','CD','D','DC','DCC','DCCC','CM','','X','XX','XXX','XL','L','LX','LXX','LXXX','XC','','I','II','III','IV','V','VI','VII','VIII','IX'];function toRomanNumerals(number){var lowerCase=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;(0,_util.assert)(Number.isInteger(number)&&number>0,'The number should be a positive integer.');var pos,romanBuf=[];while(number>=1000){number-=1000;romanBuf.push('M')}pos=number/100|0;number%=100;romanBuf.push(ROMAN_NUMBER_MAP[pos]);pos=number/10|0;number%=10;romanBuf.push(ROMAN_NUMBER_MAP[10+pos]);romanBuf.push(ROMAN_NUMBER_MAP[20+number]);var romanStr=romanBuf.join('');return lowerCase?romanStr.toLowerCase():romanStr}}),(function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.PDFDocument=exports.Page=void 0;var _util=__w_pdfjs_require__(5);var _obj=__w_pdfjs_require__(156);var _primitives=__w_pdfjs_require__(151);var _core_utils=__w_pdfjs_require__(154);var _stream2=__w_pdfjs_require__(158);var _annotation=__w_pdfjs_require__(170);var _crypto=__w_pdfjs_require__(168);var _parser=__w_pdfjs_require__(157);var _operator_list=__w_pdfjs_require__(171);var _evaluator=__w_pdfjs_require__(172);var _function=__w_pdfjs_require__(186);function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance");}function _iterableToArrayLimit(arr,i){var _arr=[];var _n=true;var _d=false;var _e=undefined;try{for(var _i=arr[Symbol.iterator](),_s;!(_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;i1&&arguments[1]!==undefined?arguments[1]:false;var value=(0,_core_utils.getInheritableProperty)({dict:this.pageDict,key:key,getArray:getArray,stopWhenFound:false});if(!Array.isArray(value)){return value}if(value.length===1||!(0,_primitives.isDict)(value[0])){return value[0]}return _primitives.Dict.merge(this.xref,value)}},{key:"getContentStream",value:function getContentStream(){var content=this.content;var stream;if(Array.isArray(content)){var xref=this.xref;var streams=[];var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=content[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var _stream=_step.value;streams.push(xref.fetchIfRef(_stream))}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator["return"]!=null){_iterator["return"]()}}finally{if(_didIteratorError){throw _iteratorError;}}}stream=new _stream2.StreamsSequenceStream(streams)}else if((0,_primitives.isStream)(content)){stream=content}else{stream=new _stream2.NullStream()}return stream}},{key:"loadResources",value:function loadResources(keys){var _this=this;if(!this.resourcesPromise){this.resourcesPromise=this.pdfManager.ensure(this,'resources')}return this.resourcesPromise.then(function(){var objectLoader=new _obj.ObjectLoader(_this.resources,keys,_this.xref);return objectLoader.load()})}},{key:"getOperatorList",value:function getOperatorList(_ref2){var _this2=this;var handler=_ref2.handler,task=_ref2.task,intent=_ref2.intent,renderInteractiveForms=_ref2.renderInteractiveForms;var contentStreamPromise=this.pdfManager.ensure(this,'getContentStream');var resourcesPromise=this.loadResources(['ExtGState','ColorSpace','Pattern','Shading','XObject','Font']);var partialEvaluator=new _evaluator.PartialEvaluator({xref:this.xref,handler:handler,pageIndex:this.pageIndex,idFactory:this.idFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,options:this.evaluatorOptions,pdfFunctionFactory:this.pdfFunctionFactory});var dataPromises=Promise.all([contentStreamPromise,resourcesPromise]);var pageListPromise=dataPromises.then(function(_ref3){var _ref4=_slicedToArray(_ref3,1),contentStream=_ref4[0];var opList=new _operator_list.OperatorList(intent,handler,_this2.pageIndex);handler.send('StartRenderPage',{transparency:partialEvaluator.hasBlendModes(_this2.resources),pageIndex:_this2.pageIndex,intent:intent});return partialEvaluator.getOperatorList({stream:contentStream,task:task,resources:_this2.resources,operatorList:opList}).then(function(){return opList})});return Promise.all([pageListPromise,this._parsedAnnotations]).then(function(_ref5){var _ref6=_slicedToArray(_ref5,2),pageOpList=_ref6[0],annotations=_ref6[1];if(annotations.length===0){pageOpList.flush(true);return pageOpList}var opListPromises=[];var _iteratorNormalCompletion2=true;var _didIteratorError2=false;var _iteratorError2=undefined;try{for(var _iterator2=annotations[Symbol.iterator](),_step2;!(_iteratorNormalCompletion2=(_step2=_iterator2.next()).done);_iteratorNormalCompletion2=true){var annotation=_step2.value;if(isAnnotationRenderable(annotation,intent)){opListPromises.push(annotation.getOperatorList(partialEvaluator,task,renderInteractiveForms))}}}catch(err){_didIteratorError2=true;_iteratorError2=err}finally{try{if(!_iteratorNormalCompletion2&&_iterator2["return"]!=null){_iterator2["return"]()}}finally{if(_didIteratorError2){throw _iteratorError2;}}}return Promise.all(opListPromises).then(function(opLists){pageOpList.addOp(_util.OPS.beginAnnotations,[]);var _iteratorNormalCompletion3=true;var _didIteratorError3=false;var _iteratorError3=undefined;try{for(var _iterator3=opLists[Symbol.iterator](),_step3;!(_iteratorNormalCompletion3=(_step3=_iterator3.next()).done);_iteratorNormalCompletion3=true){var opList=_step3.value;pageOpList.addOpList(opList)}}catch(err){_didIteratorError3=true;_iteratorError3=err}finally{try{if(!_iteratorNormalCompletion3&&_iterator3["return"]!=null){_iterator3["return"]()}}finally{if(_didIteratorError3){throw _iteratorError3;}}}pageOpList.addOp(_util.OPS.endAnnotations,[]);pageOpList.flush(true);return pageOpList})})}},{key:"extractTextContent",value:function extractTextContent(_ref7){var _this3=this;var handler=_ref7.handler,task=_ref7.task,normalizeWhitespace=_ref7.normalizeWhitespace,sink=_ref7.sink,combineTextItems=_ref7.combineTextItems;var contentStreamPromise=this.pdfManager.ensure(this,'getContentStream');var resourcesPromise=this.loadResources(['ExtGState','XObject','Font']);var dataPromises=Promise.all([contentStreamPromise,resourcesPromise]);return dataPromises.then(function(_ref8){var _ref9=_slicedToArray(_ref8,1),contentStream=_ref9[0];var partialEvaluator=new _evaluator.PartialEvaluator({xref:_this3.xref,handler:handler,pageIndex:_this3.pageIndex,idFactory:_this3.idFactory,fontCache:_this3.fontCache,builtInCMapCache:_this3.builtInCMapCache,options:_this3.evaluatorOptions,pdfFunctionFactory:_this3.pdfFunctionFactory});return partialEvaluator.getTextContent({stream:contentStream,task:task,resources:_this3.resources,normalizeWhitespace:normalizeWhitespace,combineTextItems:combineTextItems,sink:sink})})}},{key:"getAnnotationsData",value:function getAnnotationsData(intent){return this._parsedAnnotations.then(function(annotations){var annotationsData=[];for(var i=0,ii=annotations.length;i=360){rotate=rotate%360}else if(rotate<0){rotate=(rotate%360+360)%360}return(0,_util.shadow)(this,'rotate',rotate)}},{key:"annotations",get:function get(){return(0,_util.shadow)(this,'annotations',this._getInheritableProperty('Annots')||[])}},{key:"_parsedAnnotations",get:function get(){var _this4=this;var parsedAnnotations=this.pdfManager.ensure(this,'annotations').then(function(){var annotationRefs=_this4.annotations;var annotationPromises=[];for(var i=0,ii=annotationRefs.length;i3&&arguments[3]!==undefined?arguments[3]:false;(0,_util.assert)(limit>0,'The "limit" must be a positive integer.');var str=(0,_util.bytesToString)(stream.peekBytes(limit));var index=backwards?str.lastIndexOf(needle):str.indexOf(needle);if(index===-1){return false}stream.pos+=index;return true}var PDFDocument=function(){function PDFDocument(pdfManager,arg){_classCallCheck(this,PDFDocument);var stream;if((0,_primitives.isStream)(arg)){stream=arg}else if((0,_util.isArrayBuffer)(arg)){stream=new _stream2.Stream(arg)}else{throw new Error('PDFDocument: Unknown argument type');}if(stream.length<=0){throw new Error('PDFDocument: Stream must have data');}this.pdfManager=pdfManager;this.stream=stream;this.xref=new _obj.XRef(stream,pdfManager);this.pdfFunctionFactory=new _function.PDFFunctionFactory({xref:this.xref,isEvalSupported:pdfManager.evaluatorOptions.isEvalSupported});this._pagePromises=[]}_createClass(PDFDocument,[{key:"parse",value:function parse(recoveryMode){this.setup(recoveryMode);var version=this.catalog.catDict.get('Version');if((0,_primitives.isName)(version)){this.pdfFormatVersion=version.name}try{this.acroForm=this.catalog.catDict.get('AcroForm');if(this.acroForm){this.xfa=this.acroForm.get('XFA');var fields=this.acroForm.get('Fields');if((!Array.isArray(fields)||fields.length===0)&&!this.xfa){this.acroForm=null}}}catch(ex){if(ex instanceof _core_utils.MissingDataException){throw ex;}(0,_util.info)('Cannot fetch AcroForm entry; assuming no AcroForms are present');this.acroForm=null}try{var collection=this.catalog.catDict.get('Collection');if((0,_primitives.isDict)(collection)&&collection.getKeys().length>0){this.collection=collection}}catch(ex){if(ex instanceof _core_utils.MissingDataException){throw ex;}(0,_util.info)('Cannot fetch Collection dictionary.')}}},{key:"checkHeader",value:function checkHeader(){var stream=this.stream;stream.reset();if(!find(stream,'%PDF-',1024)){return}stream.moveStart();var MAX_PDF_VERSION_LENGTH=12;var version='',ch;while((ch=stream.getByte())>0x20){if(version.length>=MAX_PDF_VERSION_LENGTH){break}version+=String.fromCharCode(ch)}if(!this.pdfFormatVersion){this.pdfFormatVersion=version.substring(5)}}},{key:"parseStartXRef",value:function parseStartXRef(){this.xref.setStartXRef(this.startXRef)}},{key:"setup",value:function setup(recoveryMode){this.xref.parse(recoveryMode);this.catalog=new _obj.Catalog(this.pdfManager,this.xref)}},{key:"_getLinearizationPage",value:function _getLinearizationPage(pageIndex){var catalog=this.catalog,linearization=this.linearization;(0,_util.assert)(linearization&&linearization.pageFirst===pageIndex);var ref=_primitives.Ref.get(linearization.objectNumberFirst,0);return this.xref.fetchAsync(ref).then(function(obj){if((0,_primitives.isDict)(obj,'Page')||(0,_primitives.isDict)(obj)&&!obj.has('Type')&&obj.has('Contents')){if(ref&&!catalog.pageKidsCountCache.has(ref)){catalog.pageKidsCountCache.put(ref,1)}return[obj,ref]}throw new _util.FormatError('The Linearization dictionary doesn\'t point to a valid Page dictionary.');})["catch"](function(reason){(0,_util.info)(reason);return catalog.getPageDict(pageIndex)})}},{key:"getPage",value:function getPage(pageIndex){var _this5=this;if(this._pagePromises[pageIndex]!==undefined){return this._pagePromises[pageIndex]}var catalog=this.catalog,linearization=this.linearization;var promise=linearization&&linearization.pageFirst===pageIndex?this._getLinearizationPage(pageIndex):catalog.getPageDict(pageIndex);return this._pagePromises[pageIndex]=promise.then(function(_ref10){var _ref11=_slicedToArray(_ref10,2),pageDict=_ref11[0],ref=_ref11[1];return new Page({pdfManager:_this5.pdfManager,xref:_this5.xref,pageIndex:pageIndex,pageDict:pageDict,ref:ref,fontCache:catalog.fontCache,builtInCMapCache:catalog.builtInCMapCache,pdfFunctionFactory:_this5.pdfFunctionFactory})})}},{key:"checkFirstPage",value:function checkFirstPage(){var _this6=this;return this.getPage(0)["catch"](function(reason){if(reason instanceof _core_utils.XRefEntryException){_this6._pagePromises.length=0;_this6.cleanup();throw new _core_utils.XRefParseException();}})}},{key:"fontFallback",value:function fontFallback(id,handler){return this.catalog.fontFallback(id,handler)}},{key:"cleanup",value:function cleanup(){return this.catalog.cleanup()}},{key:"linearization",get:function get(){var linearization=null;try{linearization=_parser.Linearization.create(this.stream)}catch(err){if(err instanceof _core_utils.MissingDataException){throw err;}(0,_util.info)(err)}return(0,_util.shadow)(this,'linearization',linearization)}},{key:"startXRef",get:function get(){var stream=this.stream;var startXRef=0;if(this.linearization){stream.reset();if(find(stream,'endobj',1024)){startXRef=stream.pos+6}}else{var step=1024;var startXRefLength='startxref'.length;var found=false,pos=stream.end;while(!found&&pos>0){pos-=step-startXRefLength;if(pos<0){pos=0}stream.pos=pos;found=find(stream,'startxref',step,true)}if(found){stream.skip(9);var ch;do{ch=stream.getByte()}while((0,_util.isSpace)(ch));var str='';while(ch>=0x20&&ch<=0x39){str+=String.fromCharCode(ch);ch=stream.getByte()}startXRef=parseInt(str,10);if(isNaN(startXRef)){startXRef=0}}}return(0,_util.shadow)(this,'startXRef',startXRef)}},{key:"numPages",get:function get(){var linearization=this.linearization;var num=linearization?linearization.numPages:this.catalog.numPages;return(0,_util.shadow)(this,'numPages',num)}},{key:"documentInfo",get:function get(){var DocumentInfoValidators={Title:_util.isString,Author:_util.isString,Subject:_util.isString,Keywords:_util.isString,Creator:_util.isString,Producer:_util.isString,CreationDate:_util.isString,ModDate:_util.isString,Trapped:_primitives.isName};var docInfo={PDFFormatVersion:this.pdfFormatVersion,IsLinearized:!!this.linearization,IsAcroFormPresent:!!this.acroForm,IsXFAPresent:!!this.xfa,IsCollectionPresent:!!this.collection};var infoDict;try{infoDict=this.xref.trailer.get('Info')}catch(err){if(err instanceof _core_utils.MissingDataException){throw err;}(0,_util.info)('The document information dictionary is invalid.')}if((0,_primitives.isDict)(infoDict)){var _iteratorNormalCompletion4=true;var _didIteratorError4=false;var _iteratorError4=undefined;try{for(var _iterator4=infoDict.getKeys()[Symbol.iterator](),_step4;!(_iteratorNormalCompletion4=(_step4=_iterator4.next()).done);_iteratorNormalCompletion4=true){var key=_step4.value;var value=infoDict.get(key);if(DocumentInfoValidators[key]){if(DocumentInfoValidators[key](value)){docInfo[key]=typeof value!=='string'?value:(0,_util.stringToPDFString)(value)}else{(0,_util.info)("Bad value in document info for \"".concat(key,"\"."))}}else if(typeof key==='string'){var customValue=void 0;if((0,_util.isString)(value)){customValue=(0,_util.stringToPDFString)(value)}else if((0,_primitives.isName)(value)||(0,_util.isNum)(value)||(0,_util.isBool)(value)){customValue=value}else{(0,_util.info)("Unsupported value in document info for (custom) \"".concat(key,"\"."));continue}if(!docInfo['Custom']){docInfo['Custom']=Object.create(null)}docInfo['Custom'][key]=customValue}}}catch(err){_didIteratorError4=true;_iteratorError4=err}finally{try{if(!_iteratorNormalCompletion4&&_iterator4["return"]!=null){_iterator4["return"]()}}finally{if(_didIteratorError4){throw _iteratorError4;}}}}return(0,_util.shadow)(this,'documentInfo',docInfo)}},{key:"fingerprint",get:function get(){var hash;var idArray=this.xref.trailer.get('ID');if(Array.isArray(idArray)&&idArray[0]&&(0,_util.isString)(idArray[0])&&idArray[0]!==EMPTY_FINGERPRINT){hash=(0,_util.stringToBytes)(idArray[0])}else{if(this.stream.ensureRange){this.stream.ensureRange(0,Math.min(FINGERPRINT_FIRST_BYTES,this.stream.end))}hash=(0,_crypto.calculateMD5)(this.stream.bytes.subarray(0,FINGERPRINT_FIRST_BYTES),0,FINGERPRINT_FIRST_BYTES)}var fingerprint='';for(var i=0,ii=hash.length;i0){var i=queue.shift();var outlineDict=xref.fetchIfRef(i.obj);if(outlineDict===null){continue}if(!outlineDict.has('Title')){throw new _util.FormatError('Invalid outline item encountered.');}var data={url:null,dest:null};Catalog.parseDestDictionary({destDict:outlineDict,resultObj:data,docBaseUrl:this.pdfManager.docBaseUrl});var title=outlineDict.get('Title');var flags=outlineDict.get('F')||0;var color=outlineDict.getArray('C');var count=outlineDict.get('Count');var rgbColor=blackColor;if(Array.isArray(color)&&color.length===3&&(color[0]!==0||color[1]!==0||color[2]!==0)){rgbColor=_colorspace.ColorSpace.singletons.rgb.getRgb(color,0)}var outlineItem={dest:data.dest,url:data.url,unsafeUrl:data.unsafeUrl,newWindow:data.newWindow,title:(0,_util.stringToPDFString)(title),color:rgbColor,count:Number.isInteger(count)?count:undefined,bold:!!(flags&2),italic:!!(flags&1),items:[]};i.parent.items.push(outlineItem);obj=outlineDict.getRaw('First');if((0,_primitives.isRef)(obj)&&!processed.has(obj)){queue.push({obj:obj,parent:outlineItem});processed.put(obj)}obj=outlineDict.getRaw('Next');if((0,_primitives.isRef)(obj)&&!processed.has(obj)){queue.push({obj:obj,parent:i.parent});processed.put(obj)}}return root.items.length>0?root.items:null}},{key:"_readPermissions",value:function _readPermissions(){var encrypt=this.xref.trailer.get('Encrypt');if(!(0,_primitives.isDict)(encrypt)){return null}var flags=encrypt.get('P');if(!(0,_util.isNum)(flags)){return null}flags+=Math.pow(2,32);var permissions=[];for(var key in _util.PermissionFlag){var value=_util.PermissionFlag[key];if(flags&value){permissions.push(value)}}return permissions}},{key:"getDestination",value:function getDestination(destinationId){var obj=this._readDests();if(obj instanceof NameTree||obj instanceof _primitives.Dict){return fetchDestination(obj.get(destinationId)||null)}return null}},{key:"_readDests",value:function _readDests(){var obj=this.catDict.get('Names');if(obj&&obj.has('Dests')){return new NameTree(obj.getRaw('Dests'),this.xref)}else if(this.catDict.has('Dests')){return this.catDict.get('Dests')}return undefined}},{key:"_readPageLabels",value:function _readPageLabels(){var obj=this.catDict.getRaw('PageLabels');if(!obj){return null}var pageLabels=new Array(this.numPages);var style=null,prefix='';var numberTree=new NumberTree(obj,this.xref);var nums=numberTree.getAll();var currentLabel='',currentIndex=1;for(var i=0,ii=this.numPages;i=1)){throw new _util.FormatError('Invalid start in PageLabel dictionary.');}currentIndex=st}else{currentIndex=1}}switch(style){case'D':currentLabel=currentIndex;break;case'R':case'r':currentLabel=(0,_core_utils.toRomanNumerals)(currentIndex,style==='r');break;case'A':case'a':var LIMIT=26;var A_UPPER_CASE=0x41,A_LOWER_CASE=0x61;var baseCharCode=style==='a'?A_LOWER_CASE:A_UPPER_CASE;var letterIndex=currentIndex-1;var character=String.fromCharCode(baseCharCode+letterIndex%LIMIT);var charBuf=[];for(var j=0,jj=letterIndex/LIMIT|0;j<=jj;j++){charBuf.push(character)}currentLabel=charBuf.join('');break;default:if(style){throw new _util.FormatError("Invalid style \"".concat(style,"\" in PageLabel dictionary."));}currentLabel=''}pageLabels[i]=prefix+currentLabel;currentIndex++}return pageLabels}},{key:"fontFallback",value:function fontFallback(id,handler){var promises=[];this.fontCache.forEach(function(promise){promises.push(promise)});return Promise.all(promises).then(function(translatedFonts){var _iteratorNormalCompletion=true;var _didIteratorError=false;var _iteratorError=undefined;try{for(var _iterator=translatedFonts[Symbol.iterator](),_step;!(_iteratorNormalCompletion=(_step=_iterator.next()).done);_iteratorNormalCompletion=true){var translatedFont=_step.value;if(translatedFont.loadedName===id){translatedFont.fallback(handler);return}}}catch(err){_didIteratorError=true;_iteratorError=err}finally{try{if(!_iteratorNormalCompletion&&_iterator["return"]!=null){_iterator["return"]()}}finally{if(_didIteratorError){throw _iteratorError;}}}})}},{key:"cleanup",value:function cleanup(){var _this=this;(0,_primitives.clearPrimitiveCaches)();this.pageKidsCountCache.clear();var promises=[];this.fontCache.forEach(function(promise){promises.push(promise)});return Promise.all(promises).then(function(translatedFonts){for(var i=0,ii=translatedFonts.length;i0&¤tPageIndex+count=0){var objId=currentNode.objId;if(objId&&!pageKidsCountCache.has(objId)){pageKidsCountCache.put(objId,count)}if(currentPageIndex+count<=pageIndex){currentPageIndex+=count;return"continue"}}var kids=currentNode.get('Kids');if(!Array.isArray(kids)){if((0,_primitives.isName)(currentNode.get('Type'),'Page')||!currentNode.has('Type')&¤tNode.has('Contents')){if(currentPageIndex===pageIndex){capability.resolve([currentNode,null]);return{v:void 0}}currentPageIndex++;return"continue"}capability.reject(new _util.FormatError('Page dictionary kids object is not an array.'));return{v:void 0}}for(var last=kids.length-1;last>=0;last--){nodesToVisit.push(kids[last])}};while(nodesToVisit.length){var _ret=_loop();switch(_ret){case"continue":continue;default:if(_typeof(_ret)==="object")return _ret.v}}capability.reject(new Error("Page index ".concat(pageIndex," not found.")))}next();return capability.promise}},{key:"getPageIndex",value:function getPageIndex(pageRef){var xref=this.xref;function pagesBeforeRef(kidRef){var total=0,parentRef;return xref.fetchAsync(kidRef).then(function(node){if((0,_primitives.isRefsEqual)(kidRef,pageRef)&&!(0,_primitives.isDict)(node,'Page')&&!((0,_primitives.isDict)(node)&&!node.has('Type')&&node.has('Contents'))){throw new _util.FormatError('The reference does not point to a /Page dictionary.');}if(!node){return null}if(!(0,_primitives.isDict)(node)){throw new _util.FormatError('Node must be a dictionary.');}parentRef=node.getRaw('Parent');return node.getAsync('Parent')}).then(function(parent){if(!parent){return null}if(!(0,_primitives.isDict)(parent)){throw new _util.FormatError('Parent must be a dictionary.');}return parent.getAsync('Kids')}).then(function(kids){if(!kids){return null}var kidPromises=[];var found=false;for(var i=0,ii=kids.length;i0&&(i===0||page>=arr[i-1])&&page<=_this2.numPages});if(isValid){prefValue=value}break;case'NumCopies':if(value>0){prefValue=value}break;default:(0,_util.assert)(typeof value==='boolean');prefValue=value}if(prefValue!==undefined){prefs[key]=prefValue}else{(0,_util.info)("Bad value in ViewerPreferences for \"".concat(key,"\"."))}}}return(0,_util.shadow)(this,'viewerPreferences',prefs)}},{key:"openActionDestination",get:function get(){var obj=this.catDict.get('OpenAction');var openActionDest=null;if((0,_primitives.isDict)(obj)){var destDict=new _primitives.Dict(this.xref);destDict.set('A',obj);var resultObj={url:null,dest:null};Catalog.parseDestDictionary({destDict:destDict,resultObj:resultObj});if(Array.isArray(resultObj.dest)){openActionDest=resultObj.dest}}else if(Array.isArray(obj)){openActionDest=obj}return(0,_util.shadow)(this,'openActionDestination',openActionDest)}},{key:"attachments",get:function get(){var obj=this.catDict.get('Names');var attachments=null;if(obj&&obj.has('EmbeddedFiles')){var nameTree=new NameTree(obj.getRaw('EmbeddedFiles'),this.xref);var names=nameTree.getAll();for(var name in names){var fs=new FileSpec(names[name],this.xref);if(!attachments){attachments=Object.create(null)}attachments[(0,_util.stringToPDFString)(name)]=fs.serializable}}return(0,_util.shadow)(this,'attachments',attachments)}},{key:"javaScript",get:function get(){var obj=this.catDict.get('Names');var javaScript=null;function appendIfJavaScriptDict(jsDict){var type=jsDict.get('S');if(!(0,_primitives.isName)(type,'JavaScript')){return}var js=jsDict.get('JS');if((0,_primitives.isStream)(js)){js=(0,_util.bytesToString)(js.getBytes())}else if(!(0,_util.isString)(js)){return}if(!javaScript){javaScript=[]}javaScript.push((0,_util.stringToPDFString)(js))}if(obj&&obj.has('JavaScript')){var nameTree=new NameTree(obj.getRaw('JavaScript'),this.xref);var names=nameTree.getAll();for(var name in names){var jsDict=names[name];if((0,_primitives.isDict)(jsDict)){appendIfJavaScriptDict(jsDict)}}}var openActionDict=this.catDict.get('OpenAction');if((0,_primitives.isDict)(openActionDict,'Action')){var actionType=openActionDict.get('S');if((0,_primitives.isName)(actionType,'Named')){var action=openActionDict.get('N');if((0,_primitives.isName)(action,'Print')){if(!javaScript){javaScript=[]}javaScript.push('print({});')}}else{appendIfJavaScriptDict(openActionDict)}}return(0,_util.shadow)(this,'javaScript',javaScript)}}],[{key:"parseDestDictionary",value:function parseDestDictionary(params){function addDefaultProtocolToUrl(url){return url.startsWith('www.')?"http://".concat(url):url}function tryConvertUrlEncoding(url){try{return(0,_util.stringToUTF8String)(url)}catch(e){return url}}var destDict=params.destDict;if(!(0,_primitives.isDict)(destDict)){(0,_util.warn)('parseDestDictionary: `destDict` must be a dictionary.');return}var resultObj=params.resultObj;if(_typeof(resultObj)!=='object'){(0,_util.warn)('parseDestDictionary: `resultObj` must be an object.');return}var docBaseUrl=params.docBaseUrl||null;var action=destDict.get('A'),url,dest;if(!(0,_primitives.isDict)(action)&&destDict.has('Dest')){action=destDict.get('Dest')}if((0,_primitives.isDict)(action)){var actionType=action.get('S');if(!(0,_primitives.isName)(actionType)){(0,_util.warn)('parseDestDictionary: Invalid type in Action dictionary.');return}var actionName=actionType.name;switch(actionName){case'URI':url=action.get('URI');if((0,_primitives.isName)(url)){url='/'+url.name}else if((0,_util.isString)(url)){url=addDefaultProtocolToUrl(url)}break;case'GoTo':dest=action.get('D');break;case'Launch':case'GoToR':var urlDict=action.get('F');if((0,_primitives.isDict)(urlDict)){url=urlDict.get('F')||null}else if((0,_util.isString)(urlDict)){url=urlDict}var remoteDest=action.get('D');if(remoteDest){if((0,_primitives.isName)(remoteDest)){remoteDest=remoteDest.name}if((0,_util.isString)(url)){var baseUrl=url.split('#')[0];if((0,_util.isString)(remoteDest)){url=baseUrl+'#'+remoteDest}else if(Array.isArray(remoteDest)){url=baseUrl+'#'+JSON.stringify(remoteDest)}}}var newWindow=action.get('NewWindow');if((0,_util.isBool)(newWindow)){resultObj.newWindow=newWindow}break;case'Named':var namedAction=action.get('N');if((0,_primitives.isName)(namedAction)){resultObj.action=namedAction.name}break;case'JavaScript':var jsAction=action.get('JS');var js;if((0,_primitives.isStream)(jsAction)){js=(0,_util.bytesToString)(jsAction.getBytes())}else if((0,_util.isString)(jsAction)){js=jsAction}if(js){var URL_OPEN_METHODS=['app.launchURL','window.open'];var regex=new RegExp('^\\s*('+URL_OPEN_METHODS.join('|').split('.').join('\\.')+')\\((?:\'|\")([^\'\"]*)(?:\'|\")(?:,\\s*(\\w+)\\)|\\))','i');var jsUrl=regex.exec((0,_util.stringToPDFString)(js));if(jsUrl&&jsUrl[2]){url=jsUrl[2];if(jsUrl[3]==='true'&&jsUrl[1]==='app.launchURL'){resultObj.newWindow=true}break}}default:(0,_util.warn)("parseDestDictionary: unsupported action type \"".concat(actionName,"\"."));break}}else if(destDict.has('Dest')){dest=destDict.get('Dest')}if((0,_util.isString)(url)){url=tryConvertUrlEncoding(url);var absoluteUrl=(0,_util.createValidAbsoluteUrl)(url,docBaseUrl);if(absoluteUrl){resultObj.url=absoluteUrl.href}resultObj.unsafeUrl=url}if(dest){if((0,_primitives.isName)(dest)){dest=dest.name}if((0,_util.isString)(dest)||Array.isArray(dest)){resultObj.dest=dest}}}}]);return Catalog}();exports.Catalog=Catalog;var XRef=function XRefClosure(){function XRef(stream,pdfManager){this.stream=stream;this.pdfManager=pdfManager;this.entries=[];this.xrefstms=Object.create(null);this.cache=[];this.stats={streamTypes:[],fontTypes:[]}}XRef.prototype={setStartXRef:function XRef_setStartXRef(startXRef){this.startXRefQueue=[startXRef]},parse:function XRef_parse(recoveryMode){var trailerDict;if(!recoveryMode){trailerDict=this.readXRef()}else{(0,_util.warn)('Indexing all PDF objects');trailerDict=this.indexObjects()}trailerDict.assignXref(this);this.trailer=trailerDict;var encrypt;try{encrypt=trailerDict.get('Encrypt')}catch(ex){if(ex instanceof _core_utils.MissingDataException){throw ex;}(0,_util.warn)("XRef.parse - Invalid \"Encrypt\" reference: \"".concat(ex,"\"."))}if((0,_primitives.isDict)(encrypt)){var ids=trailerDict.get('ID');var fileId=ids&&ids.length?ids[0]:'';encrypt.suppressEncryption=true;this.encrypt=new _crypto.CipherTransformFactory(encrypt,fileId,this.pdfManager.password)}var root;try{root=trailerDict.get('Root')}catch(ex){if(ex instanceof _core_utils.MissingDataException){throw ex;}(0,_util.warn)("XRef.parse - Invalid \"Root\" reference: \"".concat(ex,"\"."))}if((0,_primitives.isDict)(root)&&root.has('Pages')){this.root=root}else{if(!recoveryMode){throw new _core_utils.XRefParseException();}throw new _util.FormatError('Invalid root reference');}},processXRefTable:function XRef_processXRefTable(parser){if(!('tableState'in this)){this.tableState={entryNum:0,streamPos:parser.lexer.stream.pos,parserBuf1:parser.buf1,parserBuf2:parser.buf2}}var obj=this.readXRefTable(parser);if(!(0,_primitives.isCmd)(obj,'trailer')){throw new _util.FormatError('Invalid XRef table: could not find trailer dictionary');}var dict=parser.getObj();if(!(0,_primitives.isDict)(dict)&&dict.dict){dict=dict.dict}if(!(0,_primitives.isDict)(dict)){throw new _util.FormatError('Invalid XRef table: could not parse trailer dictionary');}delete this.tableState;return dict},readXRefTable:function XRef_readXRefTable(parser){var stream=parser.lexer.stream;var tableState=this.tableState;stream.pos=tableState.streamPos;parser.buf1=tableState.parserBuf1;parser.buf2=tableState.parserBuf2;var obj;while(true){if(!('firstEntryNum'in tableState)||!('entryCount'in tableState)){if((0,_primitives.isCmd)(obj=parser.getObj(),'trailer')){break}tableState.firstEntryNum=obj;tableState.entryCount=parser.getObj()}var first=tableState.firstEntryNum;var count=tableState.entryCount;if(!Number.isInteger(first)||!Number.isInteger(count)){throw new _util.FormatError('Invalid XRef table: wrong types in subsection header');}for(var i=tableState.entryNum;i0){var first=entryRanges[0];var n=entryRanges[1];if(!Number.isInteger(first)||!Number.isInteger(n)){throw new _util.FormatError("Invalid XRef range fields: ".concat(first,", ").concat(n));}if(!Number.isInteger(typeFieldWidth)||!Number.isInteger(offsetFieldWidth)||!Number.isInteger(generationFieldWidth)){throw new _util.FormatError("Invalid XRef entry fields length: ".concat(first,", ").concat(n));}for(i=streamState.entryNum;i=data.length){break}token+=String.fromCharCode(ch);ch=data[offset]}return token}function skipUntil(data,offset,what){var length=what.length,dataLength=data.length;var skipped=0;while(offset=length){break}offset++;skipped++}return skipped}var objRegExp=/^(\d+)\s+(\d+)\s+obj\b/;var endobjRegExp=/\bendobj[\b\s]$/;var nestedObjRegExp=/\s+(\d+\s+\d+\s+obj[\b\s<])$/;var CHECK_CONTENT_LENGTH=25;var trailerBytes=new Uint8Array([116,114,97,105,108,101,114]);var startxrefBytes=new Uint8Array([115,116,97,114,116,120,114,101,102]);var objBytes=new Uint8Array([111,98,106]);var xrefBytes=new Uint8Array([47,88,82,101,102]);this.entries.length=0;var stream=this.stream;stream.pos=0;var buffer=stream.getBytes();var position=stream.start,length=buffer.length;var trailers=[],xrefStms=[];while(position=length){break}ch=buffer[position]}while(ch!==LF&&ch!==CR);continue}var token=readToken(buffer,position);var m;if(token.startsWith('xref')&&(token.length===4||/\s/.test(token[4]))){position+=skipUntil(buffer,position,trailerBytes);trailers.push(position);position+=skipUntil(buffer,position,startxrefBytes)}else if(m=objRegExp.exec(token)){var num=m[1]|0,gen=m[2]|0;if(typeof this.entries[num]==='undefined'){this.entries[num]={offset:position-stream.start,gen:gen,uncompressed:true}}var contentLength=void 0,startPos=position+token.length;while(startPos2&&arguments[2]!==undefined?arguments[2]:false;var gen=ref.gen;var num=ref.num;if(xrefEntry.gen!==gen){throw new _core_utils.XRefEntryException("Inconsistent generation in XRef: ".concat(ref));}var stream=this.stream.makeSubStream(xrefEntry.offset+this.stream.start);var parser=new _parser.Parser({lexer:new _parser.Lexer(stream),xref:this,allowStreams:true});var obj1=parser.getObj();var obj2=parser.getObj();var obj3=parser.getObj();if(!Number.isInteger(obj1)){obj1=parseInt(obj1,10)}if(!Number.isInteger(obj2)){obj2=parseInt(obj2,10)}if(obj1!==num||obj2!==gen||!(obj3 instanceof _primitives.Cmd)){throw new _core_utils.XRefEntryException("Bad (uncompressed) XRef entry: ".concat(ref));}if(obj3.cmd!=='obj'){if(obj3.cmd.startsWith('obj')){num=parseInt(obj3.cmd.substring(3),10);if(!Number.isNaN(num)){return num}}throw new _core_utils.XRefEntryException("Bad (uncompressed) XRef entry: ".concat(ref));}if(this.encrypt&&!suppressEncryption){xrefEntry=parser.getObj(this.encrypt.createCipherTransform(num,gen))}else{xrefEntry=parser.getObj()}if(!(0,_primitives.isStream)(xrefEntry)){this.cache[num]=xrefEntry}return xrefEntry},fetchCompressed:function fetchCompressed(ref,xrefEntry){var suppressEncryption=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var tableOffset=xrefEntry.offset;var stream=this.fetch(_primitives.Ref.get(tableOffset,0));if(!(0,_primitives.isStream)(stream)){throw new _util.FormatError('bad ObjStm stream');}var first=stream.dict.get('First');var n=stream.dict.get('N');if(!Number.isInteger(first)||!Number.isInteger(n)){throw new _util.FormatError('invalid first and n parameters for ObjStm stream');}var parser=new _parser.Parser({lexer:new _parser.Lexer(stream),xref:this,allowStreams:true});var i,entries=[],num,nums=[];for(i=0;i0){var obj=xref.fetchIfRef(queue.shift());if(!(0,_primitives.isDict)(obj)){continue}if(obj.has('Kids')){var kids=obj.get('Kids');for(var i=0,ii=kids.length;iMAX_LEVELS){(0,_util.warn)("Search depth limit reached for \"".concat(this._type,"\" tree."));return null}var kids=kidsOrEntries.get('Kids');if(!Array.isArray(kids)){return null}var l=0,r=kids.length-1;while(l<=r){var m=l+r>>1;var kid=xref.fetchIfRef(kids[m]);var limits=kid.get('Limits');if(keyxref.fetchIfRef(limits[1])){l=m+1}else{kidsOrEntries=xref.fetchIfRef(kids[m]);break}}if(l>r){return null}}var entries=kidsOrEntries.get(this._type);if(Array.isArray(entries)){var _l=0,_r=entries.length-2;while(_l<=_r){var tmp=_l+_r>>1,_m=tmp+(tmp&1);var currentKey=xref.fetchIfRef(entries[_m]);if(keycurrentKey){_l=_m+2}else{return xref.fetchIfRef(entries[_m+1])}}(0,_util.info)("Falling back to an exhaustive search, for key \"".concat(key,"\", ")+"in \"".concat(this._type,"\" tree."));for(var _m2=0,mm=entries.length;_m2>')&&!(0,_primitives.isEOF)(this.buf1)){if(!(0,_primitives.isName)(this.buf1)){(0,_util.info)('Malformed dictionary: key must be a name object');this.shift();continue}var key=this.buf1.name;this.shift();if((0,_primitives.isEOF)(this.buf1)){break}dict.set(key,this.getObj(cipherTransform))}if((0,_primitives.isEOF)(this.buf1)){if(!this.recoveryMode){throw new _util.FormatError('End of file inside dictionary');}return dict}if((0,_primitives.isCmd)(this.buf2,'stream')){return this.allowStreams?this.makeStream(dict,cipherTransform):dict}this.shift();return dict;default:return buf1}}if(Number.isInteger(buf1)){var num=buf1;if(Number.isInteger(this.buf1)&&(0,_primitives.isCmd)(this.buf2,'R')){var ref=_primitives.Ref.get(num,this.buf1);this.shift();this.shift();return ref}return num}if((0,_util.isString)(buf1)){var str=buf1;if(cipherTransform){str=cipherTransform.decryptString(str)}return str}return buf1}},{key:"findDefaultInlineStreamEnd",value:function findDefaultInlineStreamEnd(stream){var E=0x45,I=0x49,SPACE=0x20,LF=0xA,CR=0xD;var n=10,NUL=0x0;var startPos=stream.pos,state=0,ch,maybeEIPos;while((ch=stream.getByte())!==-1){if(state===0){state=ch===E?1:0}else if(state===1){state=ch===I?2:0}else{(0,_util.assert)(state===2);if(ch===SPACE||ch===LF||ch===CR){maybeEIPos=stream.pos;var followingBytes=stream.peekBytes(n);for(var i=0,ii=followingBytes.length;i0x7F)){state=0;break}}if(state===2){break}}else{state=0}}}if(ch===-1){(0,_util.warn)('findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker');if(maybeEIPos){(0,_util.warn)('... trying to recover by using the last "EI" occurrence.');stream.skip(-(stream.pos-maybeEIPos))}}var endOffset=4;stream.skip(-endOffset);ch=stream.peekByte();stream.skip(endOffset);if(!(0,_util.isSpace)(ch)){endOffset--}return stream.pos-endOffset-startPos}},{key:"findDCTDecodeInlineStreamEnd",value:function findDCTDecodeInlineStreamEnd(stream){var startPos=stream.pos,foundEOI=false,b,markerLength,length;while((b=stream.getByte())!==-1){if(b!==0xFF){continue}switch(stream.getByte()){case 0x00:break;case 0xFF:stream.skip(-1);break;case 0xD9:foundEOI=true;break;case 0xC0:case 0xC1:case 0xC2:case 0xC3:case 0xC5:case 0xC6:case 0xC7:case 0xC9:case 0xCA:case 0xCB:case 0xCD:case 0xCE:case 0xCF:case 0xC4:case 0xCC:case 0xDA:case 0xDB:case 0xDC:case 0xDD:case 0xDE:case 0xDF:case 0xE0:case 0xE1:case 0xE2:case 0xE3:case 0xE4:case 0xE5:case 0xE6:case 0xE7:case 0xE8:case 0xE9:case 0xEA:case 0xEB:case 0xEC:case 0xED:case 0xEE:case 0xEF:case 0xFE:markerLength=stream.getUint16();if(markerLength>2){stream.skip(markerLength-2)}else{stream.skip(-2)}break}if(foundEOI){break}}length=stream.pos-startPos;if(b===-1){(0,_util.warn)('Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead.');stream.skip(-length);return this.findDefaultInlineStreamEnd(stream)}this.inlineStreamSkipEI(stream);return length}},{key:"findASCII85DecodeInlineStreamEnd",value:function findASCII85DecodeInlineStreamEnd(stream){var TILDE=0x7E,GT=0x3E;var startPos=stream.pos,ch,length;while((ch=stream.getByte())!==-1){if(ch===TILDE){ch=stream.peekByte();while((0,_util.isSpace)(ch)){stream.skip();ch=stream.peekByte()}if(ch===GT){stream.skip();break}}}length=stream.pos-startPos;if(ch===-1){(0,_util.warn)('Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead.');stream.skip(-length);return this.findDefaultInlineStreamEnd(stream)}this.inlineStreamSkipEI(stream);return length}},{key:"findASCIIHexDecodeInlineStreamEnd",value:function findASCIIHexDecodeInlineStreamEnd(stream){var GT=0x3E;var startPos=stream.pos,ch,length;while((ch=stream.getByte())!==-1){if(ch===GT){break}}length=stream.pos-startPos;if(ch===-1){(0,_util.warn)('Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead.');stream.skip(-length);return this.findDefaultInlineStreamEnd(stream)}this.inlineStreamSkipEI(stream);return length}},{key:"inlineStreamSkipEI",value:function inlineStreamSkipEI(stream){var E=0x45,I=0x49;var state=0,ch;while((ch=stream.getByte())!==-1){if(state===0){state=ch===E?1:0}else if(state===1){state=ch===I?2:0}else if(state===2){break}}}},{key:"makeInlineImage",value:function makeInlineImage(cipherTransform){var lexer=this.lexer;var stream=lexer.stream;var dict=new _primitives.Dict(this.xref);var dictLength;while(!(0,_primitives.isCmd)(this.buf1,'ID')&&!(0,_primitives.isEOF)(this.buf1)){if(!(0,_primitives.isName)(this.buf1)){throw new _util.FormatError('Dictionary key must be a name object');}var key=this.buf1.name;this.shift();if((0,_primitives.isEOF)(this.buf1)){break}dict.set(key,this.getObj(cipherTransform))}if(lexer.beginInlineImagePos!==-1){dictLength=stream.pos-lexer.beginInlineImagePos}var filter=dict.get('Filter','F');var filterName;if((0,_primitives.isName)(filter)){filterName=filter.name}else if(Array.isArray(filter)){var filterZero=this.xref.fetchIfRef(filter[0]);if((0,_primitives.isName)(filterZero)){filterName=filterZero.name}}var startPos=stream.pos;var length;if(filterName==='DCTDecode'||filterName==='DCT'){length=this.findDCTDecodeInlineStreamEnd(stream)}else if(filterName==='ASCII85Decode'||filterName==='A85'){length=this.findASCII85DecodeInlineStreamEnd(stream)}else if(filterName==='ASCIIHexDecode'||filterName==='AHx'){length=this.findASCIIHexDecodeInlineStreamEnd(stream)}else{length=this.findDefaultInlineStreamEnd(stream)}var imageStream=stream.makeSubStream(startPos,length,dict);var cacheKey;if(length=signatureLength){stream.pos+=pos;return stream.pos-startPos}pos++}stream.pos+=scanLength}return-1}},{key:"makeStream",value:function makeStream(dict,cipherTransform){var lexer=this.lexer;var stream=lexer.stream;lexer.skipToNextLine();var startPos=stream.pos-1;var length=dict.get('Length');if(!Number.isInteger(length)){(0,_util.info)("Bad length \"".concat(length,"\" in stream"));length=0}stream.pos=startPos+length;lexer.nextChar();if(this.tryShift()&&(0,_primitives.isCmd)(this.buf2,'endstream')){this.shift()}else{var ENDSTREAM_SIGNATURE=new Uint8Array([0x65,0x6E,0x64,0x73,0x74,0x72,0x65,0x61,0x6D]);var actualLength=this._findStreamLength(startPos,ENDSTREAM_SIGNATURE);if(actualLength<0){var MAX_TRUNCATION=1;for(var i=1;i<=MAX_TRUNCATION;i++){var end=ENDSTREAM_SIGNATURE.length-i;var TRUNCATED_SIGNATURE=ENDSTREAM_SIGNATURE.slice(0,end);var maybeLength=this._findStreamLength(startPos,TRUNCATED_SIGNATURE);if(maybeLength>=0){var lastByte=stream.peekBytes(end+1)[end];if(!(0,_util.isSpace)(lastByte)){break}(0,_util.info)("Found \"".concat((0,_util.bytesToString)(TRUNCATED_SIGNATURE),"\" when ")+'searching for endstream command.');actualLength=maybeLength;break}}if(actualLength<0){throw new _util.FormatError('Missing endstream command.');}}length=actualLength;lexer.nextChar();this.shift();this.shift()}this.shift();stream=stream.makeSubStream(startPos,length,dict);if(cipherTransform){stream=cipherTransform.createStream(stream,length)}stream=this.filter(stream,dict,length);stream.dict=dict;return stream}},{key:"filter",value:function filter(stream,dict,length){var filter=dict.get('Filter','F');var params=dict.get('DecodeParms','DP');if((0,_primitives.isName)(filter)){if(Array.isArray(params)){(0,_util.warn)('/DecodeParms should not contain an Array, when /Filter contains a Name.')}return this.makeFilter(stream,filter.name,length,params)}var maybeLength=length;if(Array.isArray(filter)){var filterArray=filter;var paramsArray=params;for(var i=0,ii=filterArray.length;i=0x30&&ch<=0x39){return ch&0x0F}if(ch>=0x41&&ch<=0x46||ch>=0x61&&ch<=0x66){return(ch&0x0F)+9}return-1}var Lexer=function(){function Lexer(stream){var knownCommands=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;_classCallCheck(this,Lexer);this.stream=stream;this.nextChar();this.strBuf=[];this.knownCommands=knownCommands;this.beginInlineImagePos=-1}_createClass(Lexer,[{key:"nextChar",value:function nextChar(){return this.currentChar=this.stream.getByte()}},{key:"peekChar",value:function peekChar(){return this.stream.peekByte()}},{key:"getNumber",value:function getNumber(){var ch=this.currentChar;var eNotation=false;var divideBy=0;var sign=0;if(ch===0x2D){sign=-1;ch=this.nextChar();if(ch===0x2D){ch=this.nextChar()}}else if(ch===0x2B){sign=1;ch=this.nextChar()}if(ch===0x0A||ch===0x0D){do{ch=this.nextChar()}while(ch===0x0A||ch===0x0D)}if(ch===0x2E){divideBy=10;ch=this.nextChar()}if(ch<0x30||ch>0x39){if(divideBy===10&&sign===0&&((0,_util.isSpace)(ch)||ch===-1)){(0,_util.warn)('Lexer.getNumber - treating a single decimal point as zero.');return 0}throw new _util.FormatError("Invalid number: ".concat(String.fromCharCode(ch)," (charCode ").concat(ch,")"));}sign=sign||1;var baseValue=ch-0x30;var powerValue=0;var powerValueSign=1;while((ch=this.nextChar())>=0){if(0x30<=ch&&ch<=0x39){var currentDigit=ch-0x30;if(eNotation){powerValue=powerValue*10+currentDigit}else{if(divideBy!==0){divideBy*=10}baseValue=baseValue*10+currentDigit}}else if(ch===0x2E){if(divideBy===0){divideBy=1}else{break}}else if(ch===0x2D){(0,_util.warn)('Badly formatted number: minus sign in the middle')}else if(ch===0x45||ch===0x65){ch=this.peekChar();if(ch===0x2B||ch===0x2D){powerValueSign=ch===0x2D?-1:1;this.nextChar()}else if(ch<0x30||ch>0x39){break}eNotation=true}else{break}}if(divideBy!==0){baseValue/=divideBy}if(eNotation){baseValue*=Math.pow(10,powerValueSign*powerValue)}return sign*baseValue}},{key:"getString",value:function getString(){var numParen=1;var done=false;var strBuf=this.strBuf;strBuf.length=0;var ch=this.nextChar();while(true){var charBuffered=false;switch(ch|0){case-1:(0,_util.warn)('Unterminated string');done=true;break;case 0x28:++numParen;strBuf.push('(');break;case 0x29:if(--numParen===0){this.nextChar();done=true}else{strBuf.push(')')}break;case 0x5C:ch=this.nextChar();switch(ch){case-1:(0,_util.warn)('Unterminated string');done=true;break;case 0x6E:strBuf.push('\n');break;case 0x72:strBuf.push('\r');break;case 0x74:strBuf.push('\t');break;case 0x62:strBuf.push('\b');break;case 0x66:strBuf.push('\f');break;case 0x5C:case 0x28:case 0x29:strBuf.push(String.fromCharCode(ch));break;case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36:case 0x37:var x=ch&0x0F;ch=this.nextChar();charBuffered=true;if(ch>=0x30&&ch<=0x37){x=(x<<3)+(ch&0x0F);ch=this.nextChar();if(ch>=0x30&&ch<=0x37){charBuffered=false;x=(x<<3)+(ch&0x0F)}}strBuf.push(String.fromCharCode(x));break;case 0x0D:if(this.peekChar()===0x0A){this.nextChar()}break;case 0x0A:break;default:strBuf.push(String.fromCharCode(ch));break}break;default:strBuf.push(String.fromCharCode(ch));break}if(done){break}if(!charBuffered){ch=this.nextChar()}}return strBuf.join('')}},{key:"getName",value:function getName(){var ch,previousCh;var strBuf=this.strBuf;strBuf.length=0;while((ch=this.nextChar())>=0&&!specialChars[ch]){if(ch===0x23){ch=this.nextChar();if(specialChars[ch]){(0,_util.warn)('Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number.');strBuf.push('#');break}var x=toHexDigit(ch);if(x!==-1){previousCh=ch;ch=this.nextChar();var x2=toHexDigit(ch);if(x2===-1){(0,_util.warn)("Lexer_getName: Illegal digit (".concat(String.fromCharCode(ch),") ")+'in hexadecimal number.');strBuf.push('#',String.fromCharCode(previousCh));if(specialChars[ch]){break}strBuf.push(String.fromCharCode(ch));continue}strBuf.push(String.fromCharCode(x<<4|x2))}else{strBuf.push('#',String.fromCharCode(ch))}}else{strBuf.push(String.fromCharCode(ch))}}if(strBuf.length>127){(0,_util.warn)("Name token is longer than allowed by the spec: ".concat(strBuf.length))}return _primitives.Name.get(strBuf.join(''))}},{key:"getHexString",value:function getHexString(){var strBuf=this.strBuf;strBuf.length=0;var ch=this.currentChar;var isFirstHex=true;var firstDigit,secondDigit;while(true){if(ch<0){(0,_util.warn)('Unterminated hex string');break}else if(ch===0x3E){this.nextChar();break}else if(specialChars[ch]===1){ch=this.nextChar();continue}else{if(isFirstHex){firstDigit=toHexDigit(ch);if(firstDigit===-1){(0,_util.warn)("Ignoring invalid character \"".concat(ch,"\" in hex string"));ch=this.nextChar();continue}}else{secondDigit=toHexDigit(ch);if(secondDigit===-1){(0,_util.warn)("Ignoring invalid character \"".concat(ch,"\" in hex string"));ch=this.nextChar();continue}strBuf.push(String.fromCharCode(firstDigit<<4|secondDigit))}isFirstHex=!isFirstHex;ch=this.nextChar()}}return strBuf.join('')}},{key:"getObj",value:function getObj(){var comment=false;var ch=this.currentChar;while(true){if(ch<0){return _primitives.EOF}if(comment){if(ch===0x0A||ch===0x0D){comment=false}}else if(ch===0x25){comment=true}else if(specialChars[ch]!==1){break}ch=this.nextChar()}switch(ch|0){case 0x30:case 0x31:case 0x32:case 0x33:case 0x34:case 0x35:case 0x36:case 0x37:case 0x38:case 0x39:case 0x2B:case 0x2D:case 0x2E:return this.getNumber();case 0x28:return this.getString();case 0x2F:return this.getName();case 0x5B:this.nextChar();return _primitives.Cmd.get('[');case 0x5D:this.nextChar();return _primitives.Cmd.get(']');case 0x3C:ch=this.nextChar();if(ch===0x3C){this.nextChar();return _primitives.Cmd.get('<<')}return this.getHexString();case 0x3E:ch=this.nextChar();if(ch===0x3E){this.nextChar();return _primitives.Cmd.get('>>')}return _primitives.Cmd.get('>');case 0x7B:this.nextChar();return _primitives.Cmd.get('{');case 0x7D:this.nextChar();return _primitives.Cmd.get('}');case 0x29:this.nextChar();throw new _util.FormatError("Illegal character: ".concat(ch));}var str=String.fromCharCode(ch);var knownCommands=this.knownCommands;var knownCommandFound=knownCommands&&knownCommands[str]!==undefined;while((ch=this.nextChar())>=0&&!specialChars[ch]){var possibleCommand=str+String.fromCharCode(ch);if(knownCommandFound&&knownCommands[possibleCommand]===undefined){break}if(str.length===128){throw new _util.FormatError("Command token too long: ".concat(str.length));}str=possibleCommand;knownCommandFound=knownCommands&&knownCommands[str]!==undefined}if(str==='true'){return true}if(str==='false'){return false}if(str==='null'){return null}if(str==='BI'){this.beginInlineImagePos=this.stream.pos}return _primitives.Cmd.get(str)}},{key:"skipToNextLine",value:function skipToNextLine(){var ch=this.currentChar;while(ch>=0){if(ch===0x0D){ch=this.nextChar();if(ch===0x0A){this.nextChar()}break}else if(ch===0x0A){this.nextChar();break}ch=this.nextChar()}}}]);return Lexer}();exports.Lexer=Lexer;var Linearization=function(){function Linearization(){_classCallCheck(this,Linearization)}_createClass(Linearization,null,[{key:"create",value:function create(stream){function getInt(linDict,name){var allowZeroValue=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;var obj=linDict.get(name);if(Number.isInteger(obj)&&(allowZeroValue?obj>=0:obj>0)){return obj}throw new Error("The \"".concat(name,"\" parameter in the linearization ")+'dictionary is invalid.');}function getHints(linDict){var hints=linDict.get('H');var hintsLength;if(Array.isArray(hints)&&((hintsLength=hints.length)===2||hintsLength===4)){for(var index=0;index0)){throw new Error("Hint (".concat(index,") in the linearization dictionary ")+'is invalid.');}}return hints}throw new Error('Hint array in the linearization dictionary is invalid.');}var parser=new Parser({lexer:new Lexer(stream),xref:null});var obj1=parser.getObj();var obj2=parser.getObj();var obj3=parser.getObj();var linDict=parser.getObj();var obj,length;if(!(Number.isInteger(obj1)&&Number.isInteger(obj2)&&(0,_primitives.isCmd)(obj3,'obj')&&(0,_primitives.isDict)(linDict)&&(0,_util.isNum)(obj=linDict.get('Linearized'))&&obj>0)){return null}else if((length=getInt(linDict,'L'))!==stream.length){throw new Error('The "L" parameter in the linearization dictionary does not equal the stream length.');}return{length:length,hints:getHints(linDict),objectNumberFirst:getInt(linDict,'O'),endFirst:getInt(linDict,'E'),numPages:getInt(linDict,'N'),mainXRefEntriesOffset:getInt(linDict,'T'),pageFirst:linDict.has('P')?getInt(linDict,'P',true):0}}}]);return Linearization}();exports.Linearization=Linearization}),(function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.LZWStream=exports.StringStream=exports.StreamsSequenceStream=exports.Stream=exports.RunLengthStream=exports.PredictorStream=exports.NullStream=exports.FlateStream=exports.DecodeStream=exports.DecryptStream=exports.AsciiHexStream=exports.Ascii85Stream=void 0;var _util=__w_pdfjs_require__(5);var _primitives=__w_pdfjs_require__(151);function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance");}function _iterableToArray(iter){if(Symbol.iterator in Object(iter)||Object.prototype.toString.call(iter)==="[object Arguments]")return Array.from(iter)}function _arrayWithoutHoles(arr){if(Array.isArray(arr)){for(var i=0,arr2=new Array(arr.length);i=this.end){return-1}return this.bytes[this.pos++]},getUint16:function Stream_getUint16(){var b0=this.getByte();var b1=this.getByte();if(b0===-1||b1===-1){return-1}return(b0<<8)+b1},getInt32:function Stream_getInt32(){var b0=this.getByte();var b1=this.getByte();var b2=this.getByte();var b3=this.getByte();return(b0<<24)+(b1<<16)+(b2<<8)+b3},getBytes:function getBytes(length){var forceClamped=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var bytes=this.bytes;var pos=this.pos;var strEnd=this.end;if(!length){var _subarray=bytes.subarray(pos,strEnd);return forceClamped?new Uint8ClampedArray(_subarray):_subarray}var end=pos+length;if(end>strEnd){end=strEnd}this.pos=end;var subarray=bytes.subarray(pos,end);return forceClamped?new Uint8ClampedArray(subarray):subarray},peekByte:function Stream_peekByte(){var peekedByte=this.getByte();this.pos--;return peekedByte},peekBytes:function peekBytes(length){var forceClamped=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var bytes=this.getBytes(length,forceClamped);this.pos-=bytes.length;return bytes},skip:function Stream_skip(n){if(!n){n=1}this.pos+=n},reset:function Stream_reset(){this.pos=this.start},moveStart:function Stream_moveStart(){this.start=this.pos},makeSubStream:function Stream_makeSubStream(start,length,dict){return new Stream(this.bytes.buffer,start,length,dict)}};return Stream}();exports.Stream=Stream;var StringStream=function StringStreamClosure(){function StringStream(str){var bytes=(0,_util.stringToBytes)(str);Stream.call(this,bytes)}StringStream.prototype=Stream.prototype;return StringStream}();exports.StringStream=StringStream;var DecodeStream=function DecodeStreamClosure(){var emptyBuffer=new Uint8Array(0);function DecodeStream(maybeMinBufferLength){this._rawMinBufferLength=maybeMinBufferLength||0;this.pos=0;this.bufferLength=0;this.eof=false;this.buffer=emptyBuffer;this.minBufferLength=512;if(maybeMinBufferLength){while(this.minBufferLength1&&arguments[1]!==undefined?arguments[1]:false;var end,pos=this.pos;if(length){this.ensureBuffer(pos+length);end=pos+length;while(!this.eof&&this.bufferLengthbufEnd){end=bufEnd}}else{while(!this.eof){this.readBlock()}end=this.bufferLength}this.pos=end;var subarray=this.buffer.subarray(pos,end);return forceClamped&&!(subarray instanceof Uint8ClampedArray)?new Uint8ClampedArray(subarray):subarray},peekByte:function DecodeStream_peekByte(){var peekedByte=this.getByte();this.pos--;return peekedByte},peekBytes:function peekBytes(length){var forceClamped=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;var bytes=this.getBytes(length,forceClamped);this.pos-=bytes.length;return bytes},makeSubStream:function DecodeStream_makeSubStream(start,length,dict){var end=start+length;while(this.bufferLength<=end&&!this.eof){this.readBlock()}return new Stream(this.buffer,start,length,dict)},skip:function DecodeStream_skip(n){if(!n){n=1}this.pos+=n},reset:function DecodeStream_reset(){this.pos=0},getBaseStreams:function DecodeStream_getBaseStreams(){if(this.str&&this.str.getBaseStreams){return this.str.getBaseStreams()}return[]}};return DecodeStream}();exports.DecodeStream=DecodeStream;var StreamsSequenceStream=function StreamsSequenceStreamClosure(){function StreamsSequenceStream(streams){this.streams=streams;var maybeLength=0;for(var i=0,ii=streams.length;i>bits;this.codeSize=codeSize-=bits;return b};FlateStream.prototype.getCode=function FlateStream_getCode(table){var str=this.str;var codes=table[0];var maxLen=table[1];var codeSize=this.codeSize;var codeBuf=this.codeBuf;var b;while(codeSize>16;var codeVal=code&0xffff;if(codeLen<1||codeSize>codeLen;this.codeSize=codeSize-codeLen;return codeVal};FlateStream.prototype.generateHuffmanTable=function flateStreamGenerateHuffmanTable(lengths){var n=lengths.length;var maxLen=0;var i;for(i=0;imaxLen){maxLen=lengths[i]}}var size=1<>=1}for(i=code2;i>=1;if(hdr===0){var b;if((b=str.getByte())===-1){throw new _util.FormatError('Bad block header in flate stream');}var blockLen=b;if((b=str.getByte())===-1){throw new _util.FormatError('Bad block header in flate stream');}blockLen|=b<<8;if((b=str.getByte())===-1){throw new _util.FormatError('Bad block header in flate stream');}var check=b;if((b=str.getByte())===-1){throw new _util.FormatError('Bad block header in flate stream');}check|=b<<8;if(check!==(~blockLen&0xffff)&&(blockLen!==0||check!==0)){throw new _util.FormatError('Bad uncompressed block length in flate stream');}this.codeBuf=0;this.codeSize=0;var bufferLength=this.bufferLength;buffer=this.ensureBuffer(bufferLength+blockLen);var end=bufferLength+blockLen;this.bufferLength=end;if(blockLen===0){if(str.peekByte()===-1){this.eof=true}}else{for(var n=bufferLength;n0){codeLengths[i++]=what}}litCodeTable=this.generateHuffmanTable(codeLengths.subarray(0,numLitCodes));distCodeTable=this.generateHuffmanTable(codeLengths.subarray(numLitCodes,codes))}else{throw new _util.FormatError('Unknown block type in flate stream');}buffer=this.buffer;var limit=buffer?buffer.length:0;var pos=this.bufferLength;while(true){var code1=this.getCode(litCodeTable);if(code1<256){if(pos+1>=limit){buffer=this.ensureBuffer(pos+1);limit=buffer.length}buffer[pos++]=code1;continue}if(code1===256){this.bufferLength=pos;return}code1-=257;code1=lengthDecode[code1];var code2=code1>>16;if(code2>0){code2=this.getBits(code2)}len=(code1&0xffff)+code2;code1=this.getCode(distCodeTable);code1=distDecode[code1];code2=code1>>16;if(code2>0){code2=this.getBits(code2)}var dist=(code1&0xffff)+code2;if(pos+len>=limit){buffer=this.ensureBuffer(pos+len);limit=buffer.length}for(var k=0;k15)){throw new _util.FormatError("Unsupported predictor: ".concat(predictor));}if(predictor===2){this.readBlock=this.readBlockTiff}else{this.readBlock=this.readBlockPng}this.str=str;this.dict=str.dict;var colors=this.colors=params.get('Colors')||1;var bits=this.bits=params.get('BitsPerComponent')||8;var columns=this.columns=params.get('Columns')||1;this.pixBytes=colors*bits+7>>3;this.rowBytes=columns*colors*bits+7>>3;DecodeStream.call(this,maybeLength);return this}PredictorStream.prototype=Object.create(DecodeStream.prototype);PredictorStream.prototype.readBlockTiff=function predictorStreamReadBlockTiff(){var rowBytes=this.rowBytes;var bufferLength=this.bufferLength;var buffer=this.ensureBuffer(bufferLength+rowBytes);var bits=this.bits;var colors=this.colors;var rawBytes=this.str.getBytes(rowBytes);this.eof=!rawBytes.length;if(this.eof){return}var inbuf=0,outbuf=0;var inbits=0,outbits=0;var pos=bufferLength;var i;if(bits===1&&colors===1){for(i=0;i>1;c^=c>>2;c^=c>>4;inbuf=(c&1)<<7;buffer[pos++]=c}}else if(bits===8){for(i=0;i>8&0xFF;buffer[pos++]=sum&0xFF}}else{var compArray=new Uint8Array(colors+1);var bitMask=(1<>inbits-bits)&bitMask;inbits-=bits;outbuf=outbuf<=8){buffer[k++]=outbuf>>outbits-8&0xFF;outbits-=8}}}if(outbits>0){buffer[k++]=(outbuf<<8-outbits)+(inbuf&(1<<8-outbits)-1)}}this.bufferLength+=rowBytes};PredictorStream.prototype.readBlockPng=function predictorStreamReadBlockPng(){var rowBytes=this.rowBytes;var pixBytes=this.pixBytes;var predictor=this.str.getByte();var rawBytes=this.str.getBytes(rowBytes);this.eof=!rawBytes.length;if(this.eof){return}var bufferLength=this.bufferLength;var buffer=this.ensureBuffer(bufferLength+rowBytes);var prevRow=buffer.subarray(bufferLength-rowBytes,bufferLength);if(prevRow.length===0){prevRow=new Uint8Array(rowBytes)}var i,j=bufferLength,up,c;switch(predictor){case 0:for(i=0;i>1)+rawBytes[i]}for(;i>1)+rawBytes[i]&0xFF;j++}break;case 4:for(i=0;i0;var decrypt=this.decrypt;chunk=decrypt(chunk,!hasMoreData);var bufferLength=this.bufferLength;var i,n=chunk.length;var buffer=this.ensureBuffer(bufferLength+n);for(i=0;i=0;--i){buffer[bufferLength+i]=t&0xFF;t>>=8}}};return Ascii85Stream}();exports.Ascii85Stream=Ascii85Stream;var AsciiHexStream=function AsciiHexStreamClosure(){function AsciiHexStream(str,maybeLength){this.str=str;this.dict=str.dict;this.firstDigit=-1;if(maybeLength){maybeLength=0.5*maybeLength}DecodeStream.call(this,maybeLength)}AsciiHexStream.prototype=Object.create(DecodeStream.prototype);AsciiHexStream.prototype.readBlock=function AsciiHexStream_readBlock(){var UPSTREAM_BLOCK_SIZE=8000;var bytes=this.str.getBytes(UPSTREAM_BLOCK_SIZE);if(!bytes.length){this.eof=true;return}var maxDecodeLength=bytes.length+1>>1;var buffer=this.ensureBuffer(this.bufferLength+maxDecodeLength);var bufferLength=this.bufferLength;var firstDigit=this.firstDigit;for(var i=0,ii=bytes.length;i=0x30&&ch<=0x39){digit=ch&0x0F}else if(ch>=0x41&&ch<=0x46||ch>=0x61&&ch<=0x66){digit=(ch&0x0F)+9}else if(ch===0x3E){this.eof=true;break}else{continue}if(firstDigit<0){firstDigit=digit}else{buffer[bufferLength++]=firstDigit<<4|digit;firstDigit=-1}}if(firstDigit>=0&&this.eof){buffer[bufferLength++]=firstDigit<<4;firstDigit=-1}this.firstDigit=firstDigit;this.bufferLength=bufferLength};return AsciiHexStream}();exports.AsciiHexStream=AsciiHexStream;var RunLengthStream=function RunLengthStreamClosure(){function RunLengthStream(str,maybeLength){this.str=str;this.dict=str.dict;DecodeStream.call(this,maybeLength)}RunLengthStream.prototype=Object.create(DecodeStream.prototype);RunLengthStream.prototype.readBlock=function RunLengthStream_readBlock(){var repeatHeader=this.str.getBytes(2);if(!repeatHeader||repeatHeader.length<2||repeatHeader[0]===128){this.eof=true;return}var buffer;var bufferLength=this.bufferLength;var n=repeatHeader[0];if(n<128){buffer=this.ensureBuffer(bufferLength+n+1);buffer[bufferLength++]=repeatHeader[1];if(n>0){var source=this.str.getBytes(n);buffer.set(source,bufferLength);bufferLength+=n}}else{n=257-n;var b=repeatHeader[1];buffer=this.ensureBuffer(bufferLength+n+1);for(var i=0;i>>bitsCached&(1<0;if(code<256){currentSequence[0]=code;currentSequenceLength=1}else if(code>=258){if(code=0;j--){currentSequence[j]=dictionaryValues[q];q=dictionaryPrevCodes[q]}}else{currentSequence[currentSequenceLength++]=currentSequence[0]}}else if(code===256){codeLength=9;nextCode=258;currentSequenceLength=0;continue}else{this.eof=true;delete this.lzwState;break}if(hasPrev){dictionaryPrevCodes[nextCode]=prevCode;dictionaryLengths[nextCode]=dictionaryLengths[prevCode]+1;dictionaryValues[nextCode]=currentSequence[0];nextCode++;codeLength=nextCode+earlyChange&nextCode+earlyChange-1?codeLength:Math.min(Math.log(nextCode+earlyChange)/0.6931471805599453+1,12)|0}prevCode=code;decodedLength+=currentSequenceLength;if(estimatedDecodedSize1&&arguments[1]!==undefined?arguments[1]:{};if(!source||typeof source.next!=='function'){throw new Error('CCITTFaxDecoder - invalid "source" parameter.');}this.source=source;this.eof=false;this.encoding=options['K']||0;this.eoline=options['EndOfLine']||false;this.byteAlign=options['EncodedByteAlign']||false;this.columns=options['Columns']||1728;this.rows=options['Rows']||0;var eoblock=options['EndOfBlock'];if(eoblock===null||eoblock===undefined){eoblock=true}this.eoblock=eoblock;this.black=options['BlackIs1']||false;this.codingLine=new Uint32Array(this.columns+1);this.refLine=new Uint32Array(this.columns+2);this.codingLine[0]=this.columns;this.codingPos=0;this.row=0;this.nextLine2D=this.encoding<0;this.inputBits=0;this.inputBuf=0;this.outputBits=0;this.rowsDone=false;var code1;while((code1=this._lookBits(12))===0){this._eatBits(1)}if(code1===1){this._eatBits(12)}if(this.encoding>0){this.nextLine2D=!this._lookBits(1);this._eatBits(1)}}CCITTFaxDecoder.prototype={readNextChar:function readNextChar(){if(this.eof){return-1}var refLine=this.refLine;var codingLine=this.codingLine;var columns=this.columns;var refPos,blackPixels,bits,i;if(this.outputBits===0){if(this.rowsDone){this.eof=true}if(this.eof){return-1}this.err=false;var code1,code2,code3;if(this.nextLine2D){for(i=0;codingLine[i]=64);do{code2+=code3=this._getWhiteCode()}while(code3>=64)}else{do{code1+=code3=this._getWhiteCode()}while(code3>=64);do{code2+=code3=this._getBlackCode()}while(code3>=64)}this._addPixels(codingLine[this.codingPos]+code1,blackPixels);if(codingLine[this.codingPos]0){--refPos}else{++refPos}while(refLine[refPos]<=codingLine[this.codingPos]&&refLine[refPos]0){--refPos}else{++refPos}while(refLine[refPos]<=codingLine[this.codingPos]&&refLine[refPos]0){--refPos}else{++refPos}while(refLine[refPos]<=codingLine[this.codingPos]&&refLine[refPos]=64)}else{do{code1+=code3=this._getWhiteCode()}while(code3>=64)}this._addPixels(codingLine[this.codingPos]+code1,blackPixels);blackPixels^=1}}var gotEOL=false;if(this.byteAlign){this.inputBits&=~7}if(!this.eoblock&&this.row===this.rows-1){this.rowsDone=true}else{code1=this._lookBits(12);if(this.eoline){while(code1!==ccittEOF&&code1!==1){this._eatBits(1);code1=this._lookBits(12)}}else{while(code1===0){this._eatBits(1);code1=this._lookBits(12)}}if(code1===1){this._eatBits(12);gotEOL=true}else if(code1===ccittEOF){this.eof=true}}if(!this.eof&&this.encoding>0&&!this.rowsDone){this.nextLine2D=!this._lookBits(1);this._eatBits(1)}if(this.eoblock&&gotEOL&&this.byteAlign){code1=this._lookBits(12);if(code1===1){this._eatBits(12);if(this.encoding>0){this._lookBits(1);this._eatBits(1)}if(this.encoding>=0){for(i=0;i<4;++i){code1=this._lookBits(12);if(code1!==1){(0,_util.info)('bad rtc code: '+code1)}this._eatBits(12);if(this.encoding>0){this._lookBits(1);this._eatBits(1)}}}this.eof=true}}else if(this.err&&this.eoline){while(true){code1=this._lookBits(13);if(code1===ccittEOF){this.eof=true;return-1}if(code1>>1===1){break}this._eatBits(1)}this._eatBits(12);if(this.encoding>0){this._eatBits(1);this.nextLine2D=!(code1&1)}}if(codingLine[0]>0){this.outputBits=codingLine[this.codingPos=0]}else{this.outputBits=codingLine[this.codingPos=1]}this.row++}var c;if(this.outputBits>=8){c=this.codingPos&1?0:0xFF;this.outputBits-=8;if(this.outputBits===0&&codingLine[this.codingPos]bits){c<<=bits;if(!(this.codingPos&1)){c|=0xFF>>8-bits}this.outputBits-=bits;bits=0}else{c<<=this.outputBits;if(!(this.codingPos&1)){c|=0xFF>>8-this.outputBits}bits-=this.outputBits;this.outputBits=0;if(codingLine[this.codingPos]0){c<<=bits;bits=0}}}while(bits)}if(this.black){c^=0xFF}return c},_addPixels:function _addPixels(a1,blackPixels){var codingLine=this.codingLine;var codingPos=this.codingPos;if(a1>codingLine[codingPos]){if(a1>this.columns){(0,_util.info)('row is wrong length');this.err=true;a1=this.columns}if(codingPos&1^blackPixels){++codingPos}codingLine[codingPos]=a1}this.codingPos=codingPos},_addPixelsNeg:function _addPixelsNeg(a1,blackPixels){var codingLine=this.codingLine;var codingPos=this.codingPos;if(a1>codingLine[codingPos]){if(a1>this.columns){(0,_util.info)('row is wrong length');this.err=true;a1=this.columns}if(codingPos&1^blackPixels){++codingPos}codingLine[codingPos]=a1}else if(a10&&a1=limitValue){var p=table[code-limitValue];if(p[0]===i){this._eatBits(i);return[true,p[1],true]}}}return[false,0,false]},_getTwoDimCode:function _getTwoDimCode(){var code=0;var p;if(this.eoblock){code=this._lookBits(7);p=twoDimTable[code];if(p&&p[0]>0){this._eatBits(p[0]);return p[1]}}else{var result=this._findTableCode(1,7,twoDimTable);if(result[0]&&result[2]){return result[1]}}(0,_util.info)('Bad two dim code');return ccittEOF},_getWhiteCode:function _getWhiteCode(){var code=0;var p;if(this.eoblock){code=this._lookBits(12);if(code===ccittEOF){return 1}if(code>>5===0){p=whiteTable1[code]}else{p=whiteTable2[code>>3]}if(p[0]>0){this._eatBits(p[0]);return p[1]}}else{var result=this._findTableCode(1,9,whiteTable2);if(result[0]){return result[1]}result=this._findTableCode(11,12,whiteTable1);if(result[0]){return result[1]}}(0,_util.info)('bad white code');this._eatBits(1);return 1},_getBlackCode:function _getBlackCode(){var code,p;if(this.eoblock){code=this._lookBits(13);if(code===ccittEOF){return 1}if(code>>7===0){p=blackTable1[code]}else if(code>>9===0&&code>>7!==0){p=blackTable2[(code>>1)-64]}else{p=blackTable3[code>>7]}if(p[0]>0){this._eatBits(p[0]);return p[1]}}else{var result=this._findTableCode(2,6,blackTable3);if(result[0]){return result[1]}result=this._findTableCode(7,12,blackTable2,64);if(result[0]){return result[1]}result=this._findTableCode(10,13,blackTable1);if(result[0]){return result[1]}}(0,_util.info)('bad black code');this._eatBits(1);return 1},_lookBits:function _lookBits(n){var c;while(this.inputBits>16-n}this.inputBuf=this.inputBuf<<8|c;this.inputBits+=8}return this.inputBuf>>this.inputBits-n&0xFFFF>>16-n},_eatBits:function _eatBits(n){if((this.inputBits-=n)<0){this.inputBits=0}}};return CCITTFaxDecoder}();exports.CCITTFaxDecoder=CCITTFaxDecoder}),(function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.Jbig2Stream=void 0;var _primitives=__w_pdfjs_require__(151);var _stream=__w_pdfjs_require__(158);var _jbig=__w_pdfjs_require__(162);var _util=__w_pdfjs_require__(5);var Jbig2Stream=function Jbig2StreamClosure(){function Jbig2Stream(stream,maybeLength,dict,params){this.stream=stream;this.maybeLength=maybeLength;this.dict=dict;this.params=params;_stream.DecodeStream.call(this,maybeLength)}Jbig2Stream.prototype=Object.create(_stream.DecodeStream.prototype);Object.defineProperty(Jbig2Stream.prototype,'bytes',{get:function get(){return(0,_util.shadow)(this,'bytes',this.stream.getBytes(this.maybeLength))},configurable:true});Jbig2Stream.prototype.ensureBuffer=function(requested){};Jbig2Stream.prototype.readBlock=function(){if(this.eof){return}var jbig2Image=new _jbig.Jbig2Image();var chunks=[];if((0,_primitives.isDict)(this.params)){var globalsStream=this.params.get('JBIG2Globals');if((0,_primitives.isStream)(globalsStream)){var globals=globalsStream.getBytes();chunks.push({data:globals,start:0,end:globals.length})}}chunks.push({data:this.bytes,start:0,end:this.bytes.length});var data=jbig2Image.parseChunks(chunks);var dataLength=data.length;for(var i=0;i>>0}var sign=readBits(1);var value=readBits(1)?readBits(1)?readBits(1)?readBits(1)?readBits(1)?readBits(32)+4436:readBits(12)+340:readBits(8)+84:readBits(6)+20:readBits(4)+4:readBits(2);return sign===0?value:value>0?-value:null}function decodeIAID(contextCache,decoder,codeLength){var contexts=contextCache.getContexts('IAID');var prev=1;for(var i=0;i=sbb_left&&j=sbb_top){contextLabel=contextLabel<<1&reuseMask;for(k=0;k=0&&j0=0){bit=bitmap[i0][j0];if(bit){contextLabel|=bit<=width){contextLabel<<=1}else{contextLabel=contextLabel<<1|bitmap[i0][j0]}}for(k=0;k=referenceHeight||j0<0||j0>=referenceWidth){contextLabel<<=1}else{contextLabel=contextLabel<<1|referenceBitmap[i0][j0]}}var pixel=decoder.readBit(contexts,contextLabel);row[j]=pixel}}return bitmap}function decodeSymbolDictionary(huffman,refinement,symbols,numberOfNewSymbols,numberOfExportedSymbols,huffmanTables,templateIndex,at,refinementTemplateIndex,refinementAt,decodingContext,huffmanInput){if(huffman&&refinement){throw new Jbig2Error('symbol refinement with Huffman is not supported');}var newSymbols=[];var currentHeight=0;var symbolCodeLength=(0,_util.log2)(symbols.length+numberOfNewSymbols);var decoder=decodingContext.decoder;var contextCache=decodingContext.contextCache;var tableB1,symbolWidths;if(huffman){tableB1=getStandardTable(1);symbolWidths=[];symbolCodeLength=Math.max(symbolCodeLength,1)}while(newSymbols.length1){bitmap=decodeTextRegion(huffman,refinement,currentWidth,currentHeight,0,numberOfInstances,1,symbols.concat(newSymbols),symbolCodeLength,0,0,1,0,huffmanTables,refinementTemplateIndex,refinementAt,decodingContext,0,huffmanInput)}else{var symbolId=decodeIAID(contextCache,decoder,symbolCodeLength);var rdx=decodeInteger(contextCache,'IARDX',decoder);var rdy=decodeInteger(contextCache,'IARDY',decoder);var symbol=symbolId1){currentT=huffman?huffmanInput.readBits(logStripSize):decodeInteger(contextCache,'IAIT',decoder)}var t=stripSize*stripT+currentT;var symbolId=huffman?huffmanTables.symbolIDTable.decode(huffmanInput):decodeIAID(contextCache,decoder,symbolCodeLength);var applyRefinement=refinement&&(huffman?huffmanInput.readBit():decodeInteger(contextCache,'IARI',decoder));var symbolBitmap=inputSymbols[symbolId];var symbolWidth=symbolBitmap[0].length;var symbolHeight=symbolBitmap.length;if(applyRefinement){var rdw=decodeInteger(contextCache,'IARDW',decoder);var rdh=decodeInteger(contextCache,'IARDH',decoder);var rdx=decodeInteger(contextCache,'IARDX',decoder);var rdy=decodeInteger(contextCache,'IARDY',decoder);symbolWidth+=rdw;symbolHeight+=rdh;symbolBitmap=decodeRefinement(symbolWidth,symbolHeight,refinementTemplateIndex,symbolBitmap,(rdw>>1)+rdx,(rdh>>1)+rdy,false,refinementAt,decodingContext)}var offsetT=t-(referenceCorner&1?0:symbolHeight-1);var offsetS=currentS-(referenceCorner&2?symbolWidth-1:0);var s2,t2,symbolRow;if(transposed){for(s2=0;s2=0;i--){if(mmr){bitmap=decodeMMRBitmap(mmrInput,gridWidth,gridHeight,true)}else{bitmap=decodeBitmap(false,gridWidth,gridHeight,template,false,skip,at,decodingContext)}grayScaleBitPlanes[i]=bitmap}var mg,ng,bit,patternIndex,patternBitmap,x,y,patternRow,regionRow;for(mg=0;mg=0;j--){bit=grayScaleBitPlanes[j][mg][ng]^bit;patternIndex|=bit<>8;y=gridOffsetY+mg*gridVectorX-ng*gridVectorY>>8;if(x>=0&&x+patternWidth<=regionWidth&&y>=0&&y+patternHeight<=regionHeight){for(i=0;i=regionHeight){continue}regionRow=regionBitmap[regionY];patternRow=patternBitmap[i];for(j=0;j=0&®ionX>5&7;var retainBits=[referredFlags&31];var position=start+6;if(referredFlags===7){referredToCount=(0,_util.readUint32)(data,position-1)&0x1FFFFFFF;position+=3;var bytes=referredToCount+7>>3;retainBits[0]=data[position++];while(--bytes>0){retainBits.push(data[position++])}}else if(referredFlags===5||referredFlags===6){throw new Jbig2Error('invalid referred-to flags');}segmentHeader.retainBits=retainBits;var referredToSegmentNumberSize=segmentHeader.number<=256?1:segmentHeader.number<=65536?2:4;var referredTo=[];var i,ii;for(i=0;i>>24&0xFF;searchPattern[3]=genericRegionInfo.height>>16&0xFF;searchPattern[4]=genericRegionInfo.height>>8&0xFF;searchPattern[5]=genericRegionInfo.height&0xFF;for(i=position,ii=data.length;i>2&3;dictionary.huffmanDWSelector=dictionaryFlags>>4&3;dictionary.bitmapSizeSelector=dictionaryFlags>>6&1;dictionary.aggregationInstancesSelector=dictionaryFlags>>7&1;dictionary.bitmapCodingContextUsed=!!(dictionaryFlags&256);dictionary.bitmapCodingContextRetained=!!(dictionaryFlags&512);dictionary.template=dictionaryFlags>>10&3;dictionary.refinementTemplate=dictionaryFlags>>12&1;position+=2;if(!dictionary.huffman){atLength=dictionary.template===0?4:1;at=[];for(i=0;i>2&3;textRegion.stripSize=1<>4&3;textRegion.transposed=!!(textRegionSegmentFlags&64);textRegion.combinationOperator=textRegionSegmentFlags>>7&3;textRegion.defaultPixelValue=textRegionSegmentFlags>>9&1;textRegion.dsOffset=textRegionSegmentFlags<<17>>27;textRegion.refinementTemplate=textRegionSegmentFlags>>15&1;if(textRegion.huffman){var textRegionHuffmanFlags=(0,_util.readUint16)(data,position);position+=2;textRegion.huffmanFS=textRegionHuffmanFlags&3;textRegion.huffmanDS=textRegionHuffmanFlags>>2&3;textRegion.huffmanDT=textRegionHuffmanFlags>>4&3;textRegion.huffmanRefinementDW=textRegionHuffmanFlags>>6&3;textRegion.huffmanRefinementDH=textRegionHuffmanFlags>>8&3;textRegion.huffmanRefinementDX=textRegionHuffmanFlags>>10&3;textRegion.huffmanRefinementDY=textRegionHuffmanFlags>>12&3;textRegion.huffmanRefinementSizeSelector=!!(textRegionHuffmanFlags&0x4000)}if(textRegion.refinement&&!textRegion.refinementTemplate){at=[];for(i=0;i<2;i++){at.push({x:(0,_util.readInt8)(data,position),y:(0,_util.readInt8)(data,position+1)});position+=2}textRegion.refinementAt=at}textRegion.numberOfSymbolInstances=(0,_util.readUint32)(data,position);position+=4;args=[textRegion,header.referredTo,data,position,end];break;case 16:var patternDictionary={};var patternDictionaryFlags=data[position++];patternDictionary.mmr=!!(patternDictionaryFlags&1);patternDictionary.template=patternDictionaryFlags>>1&3;patternDictionary.patternWidth=data[position++];patternDictionary.patternHeight=data[position++];patternDictionary.maxPatternIndex=(0,_util.readUint32)(data,position);position+=4;args=[patternDictionary,header.number,data,position,end];break;case 22:case 23:var halftoneRegion={};halftoneRegion.info=readRegionSegmentInformation(data,position);position+=RegionSegmentInformationFieldLength;var halftoneRegionFlags=data[position++];halftoneRegion.mmr=!!(halftoneRegionFlags&1);halftoneRegion.template=halftoneRegionFlags>>1&3;halftoneRegion.enableSkip=!!(halftoneRegionFlags&8);halftoneRegion.combinationOperator=halftoneRegionFlags>>4&7;halftoneRegion.defaultPixelValue=halftoneRegionFlags>>7&1;halftoneRegion.gridWidth=(0,_util.readUint32)(data,position);position+=4;halftoneRegion.gridHeight=(0,_util.readUint32)(data,position);position+=4;halftoneRegion.gridOffsetX=(0,_util.readUint32)(data,position)&0xFFFFFFFF;position+=4;halftoneRegion.gridOffsetY=(0,_util.readUint32)(data,position)&0xFFFFFFFF;position+=4;halftoneRegion.gridVectorX=(0,_util.readUint16)(data,position);position+=2;halftoneRegion.gridVectorY=(0,_util.readUint16)(data,position);position+=2;args=[halftoneRegion,header.referredTo,data,position,end];break;case 38:case 39:var genericRegion={};genericRegion.info=readRegionSegmentInformation(data,position);position+=RegionSegmentInformationFieldLength;var genericRegionSegmentFlags=data[position++];genericRegion.mmr=!!(genericRegionSegmentFlags&1);genericRegion.template=genericRegionSegmentFlags>>1&3;genericRegion.prediction=!!(genericRegionSegmentFlags&8);if(!genericRegion.mmr){atLength=genericRegion.template===0?4:1;at=[];for(i=0;i>2&1;pageInfo.combinationOperator=pageSegmentFlags>>3&3;pageInfo.requiresBuffer=!!(pageSegmentFlags&32);pageInfo.combinationOperatorOverride=!!(pageSegmentFlags&64);args=[pageInfo];break;case 49:break;case 50:break;case 51:break;case 53:args=[header.number,data,position,end];break;case 62:break;default:throw new Jbig2Error("segment type ".concat(header.typeName,"(").concat(header.type,")")+' is not implemented');}var callbackName='on'+header.typeName;if(callbackName in visitor){visitor[callbackName].apply(visitor,args)}}function processSegments(segments,visitor){for(var i=0,ii=segments.length;i>=1}}return{imgData:imgData,width:width,height:height}}function SimpleSegmentVisitor(){}SimpleSegmentVisitor.prototype={onPageInformation:function SimpleSegmentVisitor_onPageInformation(info){this.currentPageInfo=info;var rowSize=info.width+7>>3;var buffer=new Uint8ClampedArray(rowSize*info.height);if(info.defaultPixelValue){for(var i=0,ii=buffer.length;i>3;var combinationOperator=pageInfo.combinationOperatorOverride?regionInfo.combinationOperator:pageInfo.combinationOperator;var buffer=this.buffer;var mask0=128>>(regionInfo.x&7);var offset0=regionInfo.y*rowSize+(regionInfo.x>>3);var i,j,mask,offset;switch(combinationOperator){case 0:for(i=0;i>=1;if(!mask){mask=128;offset++}}offset0+=rowSize}break;case 2:for(i=0;i>=1;if(!mask){mask=128;offset++}}offset0+=rowSize}break;default:throw new Jbig2Error("operator ".concat(combinationOperator," is not supported"));}},onImmediateGenericRegion:function SimpleSegmentVisitor_onImmediateGenericRegion(region,data,start,end){var regionInfo=region.info;var decodingContext=new DecodingContext(data,start,end);var bitmap=decodeBitmap(region.mmr,regionInfo.width,regionInfo.height,region.template,region.prediction,null,region.at,decodingContext);this.drawBitmap(regionInfo,bitmap)},onImmediateLosslessGenericRegion:function SimpleSegmentVisitor_onImmediateLosslessGenericRegion(){this.onImmediateGenericRegion.apply(this,arguments)},onSymbolDictionary:function SimpleSegmentVisitor_onSymbolDictionary(dictionary,currentSegment,referredSegments,data,start,end){var huffmanTables,huffmanInput;if(dictionary.huffman){huffmanTables=getSymbolDictionaryHuffmanTables(dictionary,referredSegments,this.customTables);huffmanInput=new Reader(data,start,end)}var symbols=this.symbols;if(!symbols){this.symbols=symbols={}}var inputSymbols=[];for(var i=0,ii=referredSegments.length;i>shift&1;if(shift<=0){this.children[bit]=new HuffmanTreeNode(line)}else{var node=this.children[bit];if(!node){this.children[bit]=node=new HuffmanTreeNode(null)}node.buildTree(line,shift-1)}},decodeNode:function decodeNode(reader){if(this.isLeaf){if(this.isOOB){return null}var htOffset=reader.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-htOffset:htOffset)}var node=this.children[reader.readBit()];if(!node){throw new Jbig2Error('invalid Huffman data');}return node.decodeNode(reader)}};function HuffmanTable(lines,prefixCodesDone){if(!prefixCodesDone){this.assignPrefixCodes(lines)}this.rootNode=new HuffmanTreeNode(null);var i,ii=lines.length,line;for(i=0;i0){this.rootNode.buildTree(line,line.prefixLength-1)}}}HuffmanTable.prototype={decode:function decode(reader){return this.rootNode.decodeNode(reader)},assignPrefixCodes:function assignPrefixCodes(lines){var linesLength=lines.length,prefixLengthMax=0,i;for(i=0;i>1&7)+1;var rangeSizeBits=(flags>>4&7)+1;var lines=[];var prefixLength,rangeLength,currentRangeLow=lowestValue;do{prefixLength=reader.readBits(prefixSizeBits);rangeLength=reader.readBits(rangeSizeBits);lines.push(new HuffmanLine([currentRangeLow,prefixLength,rangeLength,0]));currentRangeLow+=1<=this.end){throw new Jbig2Error('end of data while reading bit');}this.currentByte=this.data[this.position++];this.shift=7}var bit=this.currentByte>>this.shift&1;this.shift--;return bit},readBits:function readBits(numBits){var result=0,i;for(i=numBits-1;i>=0;i--){result|=this.readBit()<=this.end){return-1}return this.data[this.position++]}};function getCustomHuffmanTable(index,referredTo,customTables){var currentIndex=0,i,ii=referredTo.length,table;for(i=0;i=32){var repeatedLength=void 0,numberOfRepeats=void 0,j=void 0;switch(codeLength){case 32:if(i===0){throw new Jbig2Error('no previous value in symbol ID table');}numberOfRepeats=reader.readBits(2)+3;repeatedLength=codes[i-1].prefixLength;break;case 33:numberOfRepeats=reader.readBits(3)+3;repeatedLength=0;break;case 34:numberOfRepeats=reader.readBits(7)+11;repeatedLength=0;break;default:throw new Jbig2Error('invalid code length in symbol ID table');}for(j=0;j>shift&1;shift--}}if(endOfBlock&&!eof){var lookForEOFLimit=5;for(var i=0;i>9&0x7F;this.clow=this.clow<<7&0xFFFF;this.ct-=7;this.a=0x8000}_createClass(ArithmeticDecoder,[{key:"byteIn",value:function byteIn(){var data=this.data;var bp=this.bp;if(data[bp]===0xFF){if(data[bp+1]>0x8F){this.clow+=0xFF00;this.ct=8}else{bp++;this.clow+=data[bp]<<9;this.ct=7;this.bp=bp}}else{bp++;this.clow+=bp0xFFFF){this.chigh+=this.clow>>16;this.clow&=0xFFFF}}},{key:"readBit",value:function readBit(contexts,pos){var cx_index=contexts[pos]>>1,cx_mps=contexts[pos]&1;var qeTableIcx=QeTable[cx_index];var qeIcx=qeTableIcx.qe;var d;var a=this.a-qeIcx;if(this.chigh>15&1;this.clow=this.clow<<1&0xFFFF;this.ct--}while((a&0x8000)===0);this.a=a;contexts[pos]=cx_index<<1|cx_mps;return d}}]);return ArithmeticDecoder}();exports.ArithmeticDecoder=ArithmeticDecoder}),(function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.JpegStream=void 0;var _util=__w_pdfjs_require__(5);var _stream=__w_pdfjs_require__(158);var _primitives=__w_pdfjs_require__(151);var _jpg=__w_pdfjs_require__(165);var JpegStream=function JpegStreamClosure(){function JpegStream(stream,maybeLength,dict,params){var ch;while((ch=stream.getByte())!==-1){if(ch===0xFF){stream.skip(-1);break}}this.stream=stream;this.maybeLength=maybeLength;this.dict=dict;this.params=params;_stream.DecodeStream.call(this,maybeLength)}JpegStream.prototype=Object.create(_stream.DecodeStream.prototype);Object.defineProperty(JpegStream.prototype,'bytes',{get:function JpegStream_bytes(){return(0,_util.shadow)(this,'bytes',this.stream.getBytes(this.maybeLength))},configurable:true});JpegStream.prototype.ensureBuffer=function(requested){};JpegStream.prototype.readBlock=function(){if(this.eof){return}var jpegOptions={decodeTransform:undefined,colorTransform:undefined};var decodeArr=this.dict.getArray('Decode','D');if(this.forceRGB&&Array.isArray(decodeArr)){var bitsPerComponent=this.dict.get('BitsPerComponent')||8;var decodeArrLength=decodeArr.length;var transform=new Int32Array(decodeArrLength);var transformNeeded=false;var maxValue=(1<0&&arguments[0]!==undefined?arguments[0]:false;return(0,_util.createObjectURL)(this.bytes,'image/jpeg',forceDataSchema)};return JpegStream}();exports.JpegStream=JpegStream}),(function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.JpegImage=void 0;var _util=__w_pdfjs_require__(5);function _typeof(obj){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 JpegError=function JpegErrorClosure(){function JpegError(msg){this.message='JPEG error: '+msg}JpegError.prototype=new Error();JpegError.prototype.name='JpegError';JpegError.constructor=JpegError;return JpegError}();var DNLMarkerError=function DNLMarkerErrorClosure(){function DNLMarkerError(message,scanLines){this.message=message;this.scanLines=scanLines}DNLMarkerError.prototype=new Error();DNLMarkerError.prototype.name='DNLMarkerError';DNLMarkerError.constructor=DNLMarkerError;return DNLMarkerError}();var EOIMarkerError=function EOIMarkerErrorClosure(){function EOIMarkerError(message){this.message=message}EOIMarkerError.prototype=new Error();EOIMarkerError.prototype.name='EOIMarkerError';EOIMarkerError.constructor=EOIMarkerError;return EOIMarkerError}();var JpegImage=function JpegImageClosure(){var dctZigZag=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);var dctCos1=4017;var dctSin1=799;var dctCos3=3406;var dctSin3=2276;var dctCos6=1567;var dctSin6=3784;var dctSqrt2=5793;var dctSqrt1d2=2896;function JpegImage(){var _ref=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},_ref$decodeTransform=_ref.decodeTransform,decodeTransform=_ref$decodeTransform===void 0?null:_ref$decodeTransform,_ref$colorTransform=_ref.colorTransform,colorTransform=_ref$colorTransform===void 0?-1:_ref$colorTransform;this._decodeTransform=decodeTransform;this._colorTransform=colorTransform}function buildHuffmanTable(codeLengths,values){var k=0,code=[],i,j,length=16;while(length>0&&!codeLengths[length-1]){length--}code.push({children:[],index:0});var p=code[0],q;for(i=0;i0){p=code.pop()}p.index++;code.push(p);while(code.length<=i){code.push(q={children:[],index:0});p.children[p.index]=q.children;p=q}k++}if(i+19&&arguments[9]!==undefined?arguments[9]:false;var mcusPerLine=frame.mcusPerLine;var progressive=frame.progressive;var startOffset=offset,bitsData=0,bitsCount=0;function readBit(){if(bitsCount>0){bitsCount--;return bitsData>>bitsCount&1}bitsData=data[offset++];if(bitsData===0xFF){var nextByte=data[offset++];if(nextByte){if(nextByte===0xDC&&parseDNLMarker){offset+=2;var scanLines=data[offset++]<<8|data[offset++];if(scanLines>0&&scanLines!==frame.scanLines){throw new DNLMarkerError('Found DNL marker (0xFFDC) while parsing scan data',scanLines);}}else if(nextByte===0xD9){throw new EOIMarkerError('Found EOI marker (0xFFD9) while parsing scan data');}throw new JpegError("unexpected marker ".concat((bitsData<<8|nextByte).toString(16)));}}bitsCount=7;return bitsData>>>7}function decodeHuffman(tree){var node=tree;while(true){node=node[readBit()];if(typeof node==='number'){return node}if(_typeof(node)!=='object'){throw new JpegError('invalid huffman sequence');}}}function receive(length){var n=0;while(length>0){n=n<<1|readBit();length--}return n}function receiveAndExtend(length){if(length===1){return readBit()===1?1:-1}var n=receive(length);if(n>=1<>4;if(s===0){if(r<15){break}k+=16;continue}k+=r;var z=dctZigZag[k];component.blockData[offset+z]=receiveAndExtend(s);k++}}function decodeDCFirst(component,offset){var t=decodeHuffman(component.huffmanTableDC);var diff=t===0?0:receiveAndExtend(t)<0){eobrun--;return}var k=spectralStart,e=spectralEnd;while(k<=e){var rs=decodeHuffman(component.huffmanTableAC);var s=rs&15,r=rs>>4;if(s===0){if(r<15){eobrun=receive(r)+(1<>4;if(s===0){if(r<15){eobrun=receive(r)+(1<=0xFFD0&&marker<=0xFFD7){offset+=2}else{break}}fileMarker=findNextFileMarker(data,offset);if(fileMarker&&fileMarker.invalid){(0,_util.warn)('decodeScan - unexpected Scan data, current marker is: '+fileMarker.invalid);offset=fileMarker.offset}return offset-startOffset}function quantizeAndInverse(component,blockBufferOffset,p){var qt=component.quantizationTable,blockData=component.blockData;var v0,v1,v2,v3,v4,v5,v6,v7;var p0,p1,p2,p3,p4,p5,p6,p7;var t;if(!qt){throw new JpegError('missing required Quantization Table.');}for(var row=0;row<64;row+=8){p0=blockData[blockBufferOffset+row];p1=blockData[blockBufferOffset+row+1];p2=blockData[blockBufferOffset+row+2];p3=blockData[blockBufferOffset+row+3];p4=blockData[blockBufferOffset+row+4];p5=blockData[blockBufferOffset+row+5];p6=blockData[blockBufferOffset+row+6];p7=blockData[blockBufferOffset+row+7];p0*=qt[row];if((p1|p2|p3|p4|p5|p6|p7)===0){t=dctSqrt2*p0+512>>10;p[row]=t;p[row+1]=t;p[row+2]=t;p[row+3]=t;p[row+4]=t;p[row+5]=t;p[row+6]=t;p[row+7]=t;continue}p1*=qt[row+1];p2*=qt[row+2];p3*=qt[row+3];p4*=qt[row+4];p5*=qt[row+5];p6*=qt[row+6];p7*=qt[row+7];v0=dctSqrt2*p0+128>>8;v1=dctSqrt2*p4+128>>8;v2=p2;v3=p6;v4=dctSqrt1d2*(p1-p7)+128>>8;v7=dctSqrt1d2*(p1+p7)+128>>8;v5=p3<<4;v6=p5<<4;v0=v0+v1+1>>1;v1=v0-v1;t=v2*dctSin6+v3*dctCos6+128>>8;v2=v2*dctCos6-v3*dctSin6+128>>8;v3=t;v4=v4+v6+1>>1;v6=v4-v6;v7=v7+v5+1>>1;v5=v7-v5;v0=v0+v3+1>>1;v3=v0-v3;v1=v1+v2+1>>1;v2=v1-v2;t=v4*dctSin3+v7*dctCos3+2048>>12;v4=v4*dctCos3-v7*dctSin3+2048>>12;v7=t;t=v5*dctSin1+v6*dctCos1+2048>>12;v5=v5*dctCos1-v6*dctSin1+2048>>12;v6=t;p[row]=v0+v7;p[row+7]=v0-v7;p[row+1]=v1+v6;p[row+6]=v1-v6;p[row+2]=v2+v5;p[row+5]=v2-v5;p[row+3]=v3+v4;p[row+4]=v3-v4}for(var col=0;col<8;++col){p0=p[col];p1=p[col+8];p2=p[col+16];p3=p[col+24];p4=p[col+32];p5=p[col+40];p6=p[col+48];p7=p[col+56];if((p1|p2|p3|p4|p5|p6|p7)===0){t=dctSqrt2*p0+8192>>14;t=t<-2040?0:t>=2024?255:t+2056>>4;blockData[blockBufferOffset+col]=t;blockData[blockBufferOffset+col+8]=t;blockData[blockBufferOffset+col+16]=t;blockData[blockBufferOffset+col+24]=t;blockData[blockBufferOffset+col+32]=t;blockData[blockBufferOffset+col+40]=t;blockData[blockBufferOffset+col+48]=t;blockData[blockBufferOffset+col+56]=t;continue}v0=dctSqrt2*p0+2048>>12;v1=dctSqrt2*p4+2048>>12;v2=p2;v3=p6;v4=dctSqrt1d2*(p1-p7)+2048>>12;v7=dctSqrt1d2*(p1+p7)+2048>>12;v5=p3;v6=p5;v0=(v0+v1+1>>1)+4112;v1=v0-v1;t=v2*dctSin6+v3*dctCos6+2048>>12;v2=v2*dctCos6-v3*dctSin6+2048>>12;v3=t;v4=v4+v6+1>>1;v6=v4-v6;v7=v7+v5+1>>1;v5=v7-v5;v0=v0+v3+1>>1;v3=v0-v3;v1=v1+v2+1>>1;v2=v1-v2;t=v4*dctSin3+v7*dctCos3+2048>>12;v4=v4*dctCos3-v7*dctSin3+2048>>12;v7=t;t=v5*dctSin1+v6*dctCos1+2048>>12;v5=v5*dctCos1-v6*dctSin1+2048>>12;v6=t;p0=v0+v7;p7=v0-v7;p1=v1+v6;p6=v1-v6;p2=v2+v5;p5=v2-v5;p3=v3+v4;p4=v3-v4;p0=p0<16?0:p0>=4080?255:p0>>4;p1=p1<16?0:p1>=4080?255:p1>>4;p2=p2<16?0:p2>=4080?255:p2>>4;p3=p3<16?0:p3>=4080?255:p3>>4;p4=p4<16?0:p4>=4080?255:p4>>4;p5=p5<16?0:p5>=4080?255:p5>>4;p6=p6<16?0:p6>=4080?255:p6>>4;p7=p7<16?0:p7>=4080?255:p7>>4;blockData[blockBufferOffset+col]=p0;blockData[blockBufferOffset+col+8]=p1;blockData[blockBufferOffset+col+16]=p2;blockData[blockBufferOffset+col+24]=p3;blockData[blockBufferOffset+col+32]=p4;blockData[blockBufferOffset+col+40]=p5;blockData[blockBufferOffset+col+48]=p6;blockData[blockBufferOffset+col+56]=p7}}function buildComponentData(frame,component){var blocksPerLine=component.blocksPerLine;var blocksPerColumn=component.blocksPerColumn;var computationBuffer=new Int16Array(64);for(var blockRow=0;blockRow2&&arguments[2]!==undefined?arguments[2]:currentPos;function peekUint16(pos){return data[pos]<<8|data[pos+1]}var maxPos=data.length-1;var newPos=startPos=maxPos){return null}var currentMarker=peekUint16(currentPos);if(currentMarker>=0xFFC0&¤tMarker<=0xFFFE){return{invalid:null,marker:currentMarker,offset:currentPos}}var newMarker=peekUint16(newPos);while(!(newMarker>=0xFFC0&&newMarker<=0xFFFE)){if(++newPos>=maxPos){return null}newMarker=peekUint16(newPos)}return{invalid:currentMarker.toString(16),marker:newMarker,offset:newPos}}JpegImage.prototype={parse:function parse(data){var _ref2=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},_ref2$dnlScanLines=_ref2.dnlScanLines,dnlScanLines=_ref2$dnlScanLines===void 0?null:_ref2$dnlScanLines;function readUint16(){var value=data[offset]<<8|data[offset+1];offset+=2;return value}function readDataBlock(){var length=readUint16();var endOffset=offset+length-2;var fileMarker=findNextFileMarker(data,endOffset,offset);if(fileMarker&&fileMarker.invalid){(0,_util.warn)('readDataBlock - incorrect length, current marker is: '+fileMarker.invalid);endOffset=fileMarker.offset}var array=data.subarray(offset,endOffset);offset+=array.length;return array}function prepareComponents(frame){var mcusPerLine=Math.ceil(frame.samplesPerLine/8/frame.maxH);var mcusPerColumn=Math.ceil(frame.scanLines/8/frame.maxV);for(var i=0;i>4===0){for(j=0;j<64;j++){z=dctZigZag[j];tableData[z]=data[offset++]}}else if(quantizationTableSpec>>4===1){for(j=0;j<64;j++){z=dctZigZag[j];tableData[z]=readUint16()}}else{throw new JpegError('DQT - invalid table spec');}quantizationTables[quantizationTableSpec&15]=tableData}break;case 0xFFC0:case 0xFFC1:case 0xFFC2:if(frame){throw new JpegError('Only single frame JPEGs supported');}readUint16();frame={};frame.extended=fileMarker===0xFFC1;frame.progressive=fileMarker===0xFFC2;frame.precision=data[offset++];var sofScanLines=readUint16();frame.scanLines=dnlScanLines||sofScanLines;frame.samplesPerLine=readUint16();frame.components=[];frame.componentIds={};var componentsCount=data[offset++],componentId;var maxH=0,maxV=0;for(i=0;i>4;var v=data[offset+1]&15;if(maxH>4===0?huffmanTablesDC:huffmanTablesAC)[huffmanTableSpec&15]=buildHuffmanTable(codeLengths,huffmanValues)}break;case 0xFFDD:readUint16();resetInterval=readUint16();break;case 0xFFDA:var parseDNLMarker=++numSOSMarkers===1&&!dnlScanLines;readUint16();var selectorsCount=data[offset++];var components=[],component;for(i=0;i>4];component.huffmanTableAC=huffmanTablesAC[tableSpec&15];components.push(component)}var spectralStart=data[offset++];var spectralEnd=data[offset++];var successiveApproximation=data[offset++];try{var processed=decodeScan(data,offset,frame,components,resetInterval,spectralStart,spectralEnd,successiveApproximation>>4,successiveApproximation&15,parseDNLMarker);offset+=processed}catch(ex){if(ex instanceof DNLMarkerError){(0,_util.warn)("".concat(ex.message," -- attempting to re-parse the JPEG image."));return this.parse(data,{dnlScanLines:ex.scanLines})}else if(ex instanceof EOIMarkerError){(0,_util.warn)("".concat(ex.message," -- ignoring the rest of the image data."));break markerLoop}throw ex;}break;case 0xFFDC:offset+=4;break;case 0xFFFF:if(data[offset]!==0xFF){offset--}break;default:if(data[offset-3]===0xFF&&data[offset-2]>=0xC0&&data[offset-2]<=0xFE){offset-=3;break}var nextFileMarker=findNextFileMarker(data,offset-2);if(nextFileMarker&&nextFileMarker.invalid){(0,_util.warn)('JpegImage.parse - unexpected data, current marker is: '+nextFileMarker.invalid);offset=nextFileMarker.offset;break}throw new JpegError('unknown marker '+fileMarker.toString(16));}fileMarker=readUint16()}this.width=frame.samplesPerLine;this.height=frame.scanLines;this.jfif=jfif;this.adobe=adobe;this.components=[];for(i=0;i2&&arguments[2]!==undefined?arguments[2]:false;var scaleX=this.width/width,scaleY=this.height/height;var component,componentScaleX,componentScaleY,blocksPerScanline;var x,y,i,j,k;var index;var offset=0;var output;var numComponents=this.components.length;var dataLength=width*height*numComponents;var data=new Uint8ClampedArray(dataLength);var xScaleBlockOffset=new Uint32Array(width);var mask3LSB=0xfffffff8;for(i=0;i>8)+transform[k+1]}}}return data},get _isColorConversionNeeded(){if(this.adobe){return!!this.adobe.transformCode}if(this.numComponents===3){if(this._colorTransform===0){return false}return true}if(this._colorTransform===1){return true}return false},_convertYccToRgb:function convertYccToRgb(data){var Y,Cb,Cr;for(var i=0,length=data.length;i4){throw new JpegError('Unsupported color mode');}var data=this._getLinearizedBlockData(width,height,isSourcePDF);if(this.numComponents===1&&forceRGB){var dataLength=data.length;var rgbData=new Uint8ClampedArray(dataLength*3);var offset=0;for(var i=0;i>24&0xFF,tbox>>16&0xFF,tbox>>8&0xFF,tbox&0xFF);(0,_util.warn)('Unsupported header type '+tbox+' ('+headerType+')');break}if(jumpDataLength){position+=dataLength}}},parseImageProperties:function JpxImage_parseImageProperties(stream){var newByte=stream.getByte();while(newByte>=0){var oldByte=newByte;newByte=stream.getByte();var code=oldByte<<8|newByte;if(code===0xFF51){stream.skip(4);var Xsiz=stream.getInt32()>>>0;var Ysiz=stream.getInt32()>>>0;var XOsiz=stream.getInt32()>>>0;var YOsiz=stream.getInt32()>>>0;stream.skip(16);var Csiz=stream.getUint16();this.width=Xsiz-XOsiz;this.height=Ysiz-YOsiz;this.componentsCount=Csiz;this.bitsPerComponent=8;return}}throw new JpxError('No size marker found in JPX stream');},parseCodestream:function JpxImage_parseCodestream(data,start,end){var context={};var doNotRecover=false;try{var position=start;while(position+1>5;spqcds=[];while(j>3;spqcd.mu=0}else{spqcd.epsilon=data[j]>>3;spqcd.mu=(data[j]&0x7)<<8|data[j+1];j+=2}spqcds.push(spqcd)}qcd.SPqcds=spqcds;if(context.mainHeader){context.QCD=qcd}else{context.currentTile.QCD=qcd;context.currentTile.QCC=[]}break;case 0xFF5D:length=(0,_util.readUint16)(data,position);var qcc={};j=position+2;var cqcc;if(context.SIZ.Csiz<257){cqcc=data[j++]}else{cqcc=(0,_util.readUint16)(data,j);j+=2}sqcd=data[j++];switch(sqcd&0x1F){case 0:spqcdSize=8;scalarExpounded=true;break;case 1:spqcdSize=16;scalarExpounded=false;break;case 2:spqcdSize=16;scalarExpounded=true;break;default:throw new Error('Invalid SQcd value '+sqcd);}qcc.noQuantization=spqcdSize===8;qcc.scalarExpounded=scalarExpounded;qcc.guardBits=sqcd>>5;spqcds=[];while(j>3;spqcd.mu=0}else{spqcd.epsilon=data[j]>>3;spqcd.mu=(data[j]&0x7)<<8|data[j+1];j+=2}spqcds.push(spqcd)}qcc.SPqcds=spqcds;if(context.mainHeader){context.QCC[cqcc]=qcc}else{context.currentTile.QCC[cqcc]=qcc}break;case 0xFF52:length=(0,_util.readUint16)(data,position);var cod={};j=position+2;var scod=data[j++];cod.entropyCoderWithCustomPrecincts=!!(scod&1);cod.sopMarkerUsed=!!(scod&2);cod.ephMarkerUsed=!!(scod&4);cod.progressionOrder=data[j++];cod.layersCount=(0,_util.readUint16)(data,j);j+=2;cod.multipleComponentTransform=data[j++];cod.decompositionLevelsCount=data[j++];cod.xcb=(data[j++]&0xF)+2;cod.ycb=(data[j++]&0xF)+2;var blockStyle=data[j++];cod.selectiveArithmeticCodingBypass=!!(blockStyle&1);cod.resetContextProbabilities=!!(blockStyle&2);cod.terminationOnEachCodingPass=!!(blockStyle&4);cod.verticallyStripe=!!(blockStyle&8);cod.predictableTermination=!!(blockStyle&16);cod.segmentationSymbolUsed=!!(blockStyle&32);cod.reversibleTransformation=data[j++];if(cod.entropyCoderWithCustomPrecincts){var precinctsSizes=[];while(j>4})}cod.precinctsSizes=precinctsSizes}var unsupported=[];if(cod.selectiveArithmeticCodingBypass){unsupported.push('selectiveArithmeticCodingBypass')}if(cod.resetContextProbabilities){unsupported.push('resetContextProbabilities')}if(cod.terminationOnEachCodingPass){unsupported.push('terminationOnEachCodingPass')}if(cod.verticallyStripe){unsupported.push('verticallyStripe')}if(cod.predictableTermination){unsupported.push('predictableTermination')}if(unsupported.length>0){doNotRecover=true;throw new Error('Unsupported COD options ('+unsupported.join(', ')+')');}if(context.mainHeader){context.COD=cod}else{context.currentTile.COD=cod;context.currentTile.COC=[]}break;case 0xFF90:length=(0,_util.readUint16)(data,position);tile={};tile.index=(0,_util.readUint16)(data,position+2);tile.length=(0,_util.readUint32)(data,position+4);tile.dataEnd=tile.length+position-2;tile.partIndex=data[position+8];tile.partsCount=data[position+9];context.mainHeader=false;if(tile.partIndex===0){tile.COD=context.COD;tile.COC=context.COC.slice(0);tile.QCD=context.QCD;tile.QCC=context.QCC.slice(0)}context.currentTile=tile;break;case 0xFF93:tile=context.currentTile;if(tile.partIndex===0){initializeTile(context,tile.index);buildPackets(context)}length=tile.dataEnd-position;parseTilePackets(context,data,position,length);break;case 0xFF55:case 0xFF57:case 0xFF58:case 0xFF64:length=(0,_util.readUint16)(data,position);break;case 0xFF53:throw new Error('Codestream code 0xFF53 (COC) is not implemented');default:throw new Error('Unknown codestream code: '+code.toString(16));}position+=length}}catch(e){if(doNotRecover||this.failOnCorruptedImage){throw new JpxError(e.message);}else{(0,_util.warn)('JPX: Trying to recover from: '+e.message)}}this.tiles=transformComponents(context);this.width=context.SIZ.Xsiz-context.SIZ.XOsiz;this.height=context.SIZ.Ysiz-context.SIZ.YOsiz;this.componentsCount=context.SIZ.Csiz}};function calculateComponentDimensions(component,siz){component.x0=Math.ceil(siz.XOsiz/component.XRsiz);component.x1=Math.ceil(siz.Xsiz/component.XRsiz);component.y0=Math.ceil(siz.YOsiz/component.YRsiz);component.y1=Math.ceil(siz.Ysiz/component.YRsiz);component.width=component.x1-component.x0;component.height=component.y1-component.y0}function calculateTileGrids(context,components){var siz=context.SIZ;var tile,tiles=[];var numXtiles=Math.ceil((siz.Xsiz-siz.XTOsiz)/siz.XTsiz);var numYtiles=Math.ceil((siz.Ysiz-siz.YTOsiz)/siz.YTsiz);for(var q=0;q0?Math.min(codOrCoc.xcb,result.PPx-1):Math.min(codOrCoc.xcb,result.PPx);result.ycb_=r>0?Math.min(codOrCoc.ycb,result.PPy-1):Math.min(codOrCoc.ycb,result.PPy);return result}function buildPrecincts(context,resolution,dimensions){var precinctWidth=1<resolution.trx0?Math.ceil(resolution.trx1/precinctWidth)-Math.floor(resolution.trx0/precinctWidth):0;var numprecinctshigh=resolution.try1>resolution.try0?Math.ceil(resolution.try1/precinctHeight)-Math.floor(resolution.try0/precinctHeight):0;var numprecincts=numprecinctswide*numprecinctshigh;resolution.precinctParameters={precinctWidth:precinctWidth,precinctHeight:precinctHeight,numprecinctswide:numprecinctswide,numprecinctshigh:numprecinctshigh,numprecincts:numprecincts,precinctWidthInSubband:precinctWidthInSubband,precinctHeightInSubband:precinctHeightInSubband}}function buildCodeblocks(context,subband,dimensions){var xcb_=dimensions.xcb_;var ycb_=dimensions.ycb_;var codeblockWidth=1<>xcb_;var cby0=subband.tby0>>ycb_;var cbx1=subband.tbx1+codeblockWidth-1>>xcb_;var cby1=subband.tby1+codeblockHeight-1>>ycb_;var precinctParameters=subband.resolution.precinctParameters;var codeblocks=[];var precincts=[];var i,j,codeblock,precinctNumber;for(j=cby0;jprecinct.cbxMax){precinct.cbxMax=i}if(jprecinct.cbyMax){precinct.cbyMax=j}}else{precincts[precinctNumber]=precinct={cbxMin:i,cbyMin:j,cbxMax:i,cbyMax:j}}codeblock.precinct=precinct}}subband.codeblockParameters={codeblockWidth:xcb_,codeblockHeight:ycb_,numcodeblockwide:cbx1-cbx0+1,numcodeblockhigh:cby1-cby0+1};subband.codeblocks=codeblocks;subband.precincts=precincts}function createPacket(resolution,precinctNumber,layerNumber){var precinctCodeblocks=[];var subbands=resolution.subbands;for(var i=0,ii=subbands.length;icomponent.codingStyleParameters.decompositionLevelsCount){continue}var resolution=component.resolutions[r];var numprecincts=resolution.precinctParameters.numprecincts;for(;kcomponent.codingStyleParameters.decompositionLevelsCount){continue}var resolution=component.resolutions[r];var numprecincts=resolution.precinctParameters.numprecincts;for(;kcomponent.codingStyleParameters.decompositionLevelsCount){continue}var resolution=component.resolutions[r];var numprecincts=resolution.precinctParameters.numprecincts;if(p>=numprecincts){continue}for(;l=0;--r){var resolution=component.resolutions[r];var widthCurrentResolution=scale*resolution.precinctParameters.precinctWidth;var heightCurrentResolution=scale*resolution.precinctParameters.precinctHeight;minWidthCurrentComponent=Math.min(minWidthCurrentComponent,widthCurrentResolution);minHeightCurrentComponent=Math.min(minHeightCurrentComponent,heightCurrentResolution);maxNumWideCurrentComponent=Math.max(maxNumWideCurrentComponent,resolution.precinctParameters.numprecinctswide);maxNumHighCurrentComponent=Math.max(maxNumHighCurrentComponent,resolution.precinctParameters.numprecinctshigh);sizePerResolution[r]={width:widthCurrentResolution,height:heightCurrentResolution};scale<<=1}minWidth=Math.min(minWidth,minWidthCurrentComponent);minHeight=Math.min(minHeight,minHeightCurrentComponent);maxNumWide=Math.max(maxNumWide,maxNumWideCurrentComponent);maxNumHigh=Math.max(maxNumHigh,maxNumHighCurrentComponent);sizePerComponent[c]={resolutions:sizePerResolution,minWidth:minWidthCurrentComponent,minHeight:minHeightCurrentComponent,maxNumWide:maxNumWideCurrentComponent,maxNumHigh:maxNumHighCurrentComponent}}return{components:sizePerComponent,minWidth:minWidth,minHeight:minHeight,maxNumWide:maxNumWide,maxNumHigh:maxNumHigh}}function buildPackets(context){var siz=context.SIZ;var tileIndex=context.currentTile.index;var tile=context.tiles[tileIndex];var componentsCount=siz.Csiz;for(var c=0;c>>bufferSize&(1<0){var packetItem=queue.shift();codeblock=packetItem.codeblock;if(codeblock['data']===undefined){codeblock.data=[]}codeblock.data.push({data:data,start:offset+position,end:offset+position+packetItem.dataLength,codingpasses:packetItem.codingpasses});position+=packetItem.dataLength}}return position}function copyCoefficients(coefficients,levelWidth,levelHeight,subband,delta,mb,reversible,segmentationSymbolUsed){var x0=subband.tbx0;var y0=subband.tby0;var width=subband.tbx1-subband.tbx0;var codeblocks=subband.codeblocks;var right=subband.type.charAt(0)==='H'?1:0;var bottom=subband.type.charAt(1)==='H'?levelWidth:0;for(var i=0,ii=codeblocks.length;i=mb){coefficients[pos]=n}else{coefficients[pos]=n*(1<0?1-i:0)}else{mu=spqcds[b].mu;epsilon=spqcds[b].epsilon;b++}var subband=resolution.subbands[j];var gainLog2=SubbandsGainLog2[subband.type];var delta=reversible?1:Math.pow(2,precision+gainLog2-epsilon)*(1+mu/2048);var mb=guardBits+epsilon-1;copyCoefficients(coefficients,width,height,subband,delta,mb,reversible,segmentationSymbolUsed)}subbandCoefficients.push({width:width,height:height,items:coefficients})}var result=transform.calculate(subbandCoefficients,component.tcx0,component.tcy0);return{left:component.tcx0,top:component.tcy0,width:result.width,height:result.height,items:result.items}}function transformComponents(context){var siz=context.SIZ;var components=context.components;var componentsCount=siz.Csiz;var resultImages=[];for(var i=0,ii=context.tiles.length;i>shift;out[pos++]=y0-0.34413*y1-0.71414*y2>>shift;out[pos++]=y0+1.772*y1>>shift}}else{for(j=0;j>2);out[pos++]=g+y2>>shift;out[pos++]=g>>shift;out[pos++]=g+y1>>shift}}if(fourComponents){for(j=0,pos=3;j>shift}}}else{for(c=0;c>shift;pos+=componentsCount}}}resultImages.push(result)}return resultImages}function initializeTile(context,tileIndex){var siz=context.SIZ;var componentsCount=siz.Csiz;var tile=context.tiles[tileIndex];for(var c=0;c>=1;j>>=1;currentLevel++}currentLevel--;level=this.levels[currentLevel];level.items[level.index]=value;this.currentLevel=currentLevel;delete this.value},incrementValue:function TagTree_incrementValue(){var level=this.levels[this.currentLevel];level.items[level.index]++},nextLevel:function TagTree_nextLevel(){var currentLevel=this.currentLevel;var level=this.levels[currentLevel];var value=level.items[level.index];currentLevel--;if(currentLevel<0){this.value=value;return false}this.currentLevel=currentLevel;level=this.levels[currentLevel];level.items[level.index]=value;return true}};return TagTree}();var InclusionTree=function InclusionTreeClosure(){function InclusionTree(width,height,defaultValue){var levelsLength=(0,_util.log2)(Math.max(width,height))+1;this.levels=[];for(var i=0;istopValue){this.currentLevel=currentLevel;this.propagateValues();return false}i>>=1;j>>=1;currentLevel++}this.currentLevel=currentLevel-1;return true},incrementValue:function InclusionTree_incrementValue(stopValue){var level=this.levels[this.currentLevel];level.items[level.index]=stopValue+1;this.propagateValues()},propagateValues:function InclusionTree_propagateValues(){var levelIndex=this.currentLevel;var level=this.levels[levelIndex];var currentValue=level.items[level.index];while(--levelIndex>=0){level=this.levels[levelIndex];level.items[level.index]=currentValue}},nextLevel:function InclusionTree_nextLevel(){var currentLevel=this.currentLevel;var level=this.levels[currentLevel];var value=level.items[level.index];level.items[level.index]=0xFF;currentLevel--;if(currentLevel<0){return false}this.currentLevel=currentLevel;level=this.levels[currentLevel];level.items[level.index]=value;return true}};return InclusionTree}();var BitModel=function BitModelClosure(){var UNIFORM_CONTEXT=17;var RUNLENGTH_CONTEXT=18;var LLAndLHContextsLabel=new Uint8Array([0,5,8,0,3,7,8,0,4,7,8,0,0,0,0,0,1,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8]);var HLContextLabel=new Uint8Array([0,3,4,0,5,7,7,0,8,8,8,0,0,0,0,0,1,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8]);var HHContextLabel=new Uint8Array([0,1,2,0,1,2,2,0,2,2,2,0,0,0,0,0,3,4,5,0,4,5,5,0,5,5,5,0,0,0,0,0,6,7,7,0,7,7,7,0,7,7,7,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8]);function BitModel(width,height,subband,zeroBitPlanes,mb){this.width=width;this.height=height;this.contextLabelTable=subband==='HH'?HHContextLabel:subband==='HL'?HLContextLabel:LLAndLHContextsLabel;var coefficientCount=width*height;this.neighborsSignificance=new Uint8Array(coefficientCount);this.coefficentsSign=new Uint8Array(coefficientCount);this.coefficentsMagnitude=mb>14?new Uint32Array(coefficientCount):mb>6?new Uint16Array(coefficientCount):new Uint8Array(coefficientCount);this.processingFlags=new Uint8Array(coefficientCount);var bitsDecoded=new Uint8Array(coefficientCount);if(zeroBitPlanes!==0){for(var i=0;i0;var right=column+10){i=index-width;if(left){neighborsSignificance[i-1]+=0x10}if(right){neighborsSignificance[i+1]+=0x10}neighborsSignificance[i]+=0x04}if(row+1=height){break}processingFlags[index]&=processedInverseMask;if(coefficentsMagnitude[index]||!neighborsSignificance[index]){continue}var contextLabel=labels[neighborsSignificance[index]];var decision=decoder.readBit(contexts,contextLabel);if(decision){var sign=this.decodeSignBit(i,j,index);coefficentsSign[index]=sign;coefficentsMagnitude[index]=1;this.setNeighborsSignificance(i,j,index);processingFlags[index]|=firstMagnitudeBitMask}bitsDecoded[index]++;processingFlags[index]|=processedMask}}}},decodeSignBit:function BitModel_decodeSignBit(row,column,index){var width=this.width,height=this.height;var coefficentsMagnitude=this.coefficentsMagnitude;var coefficentsSign=this.coefficentsSign;var contribution,sign0,sign1,significance1;var contextLabel,decoded;significance1=column>0&&coefficentsMagnitude[index-1]!==0;if(column+10&&coefficentsMagnitude[index-width]!==0;if(row+1=0){contextLabel=9+contribution;decoded=this.decoder.readBit(this.contexts,contextLabel)}else{contextLabel=9-contribution;decoded=this.decoder.readBit(this.contexts,contextLabel)^1}return decoded},runMagnitudeRefinementPass:function BitModel_runMagnitudeRefinementPass(){var decoder=this.decoder;var width=this.width,height=this.height;var coefficentsMagnitude=this.coefficentsMagnitude;var neighborsSignificance=this.neighborsSignificance;var contexts=this.contexts;var bitsDecoded=this.bitsDecoded;var processingFlags=this.processingFlags;var processedMask=1;var firstMagnitudeBitMask=2;var length=width*height;var width4=width*4;for(var index0=0,indexNext;index0>1;offset=offset|0;var j,n,current,next;var alpha=-1.586134342059924;var beta=-0.052980118572961;var gamma=0.882911075530934;var delta=0.443506852043971;var K=1.230174104914001;var K_=1/K;j=offset-3;for(n=len+4;n--;j+=2){x[j]*=K_}j=offset-2;current=delta*x[j-1];for(n=len+3;n--;j+=2){next=delta*x[j+1];x[j]=K*x[j]-current-next;if(n--){j+=2;current=delta*x[j+1];x[j]=K*x[j]-current-next}else{break}}j=offset-1;current=gamma*x[j-1];for(n=len+2;n--;j+=2){next=gamma*x[j+1];x[j]-=current+next;if(n--){j+=2;current=gamma*x[j+1];x[j]-=current+next}else{break}}j=offset;current=beta*x[j-1];for(n=len+1;n--;j+=2){next=beta*x[j+1];x[j]-=current+next;if(n--){j+=2;current=beta*x[j+1];x[j]-=current+next}else{break}}if(len!==0){j=offset+1;current=alpha*x[j-1];for(n=len;n--;j+=2){next=alpha*x[j+1];x[j]-=current+next;if(n--){j+=2;current=alpha*x[j+1];x[j]-=current+next}else{break}}}};return IrreversibleTransform}();var ReversibleTransform=function ReversibleTransformClosure(){function ReversibleTransform(){Transform.call(this)}ReversibleTransform.prototype=Object.create(Transform.prototype);ReversibleTransform.prototype.filter=function reversibleTransformFilter(x,offset,length){var len=length>>1;offset=offset|0;var j,n;for(j=offset,n=len+1;n--;j+=2){x[j]-=x[j-1]+x[j+1]+2>>2}for(j=offset+1,n=len;n--;j+=2){x[j]+=x[j-1]+x[j+1]>>1}};return ReversibleTransform}();return JpxImage}();exports.JpxImage=JpxImage}),(function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.calculateSHA512=exports.calculateSHA384=exports.calculateSHA256=exports.calculateMD5=exports.PDF20=exports.PDF17=exports.CipherTransformFactory=exports.ARCFourCipher=exports.AES256Cipher=exports.AES128Cipher=void 0;var _util=__w_pdfjs_require__(5);var _primitives=__w_pdfjs_require__(151);var _stream=__w_pdfjs_require__(158);function _typeof(obj){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 _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 _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}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 _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>5&0xFF;padded[i++]=length>>13&0xFF;padded[i++]=length>>21&0xFF;padded[i++]=length>>>29&0xFF;padded[i++]=0;padded[i++]=0;padded[i++]=0;var w=new Int32Array(16);for(i=0;i>>32-rotate)|0;a=tmp}h0=h0+a|0;h1=h1+b|0;h2=h2+c|0;h3=h3+d|0}return new Uint8Array([h0&0xFF,h0>>8&0xFF,h0>>16&0xFF,h0>>>24&0xFF,h1&0xFF,h1>>8&0xFF,h1>>16&0xFF,h1>>>24&0xFF,h2&0xFF,h2>>8&0xFF,h2>>16&0xFF,h2>>>24&0xFF,h3&0xFF,h3>>8&0xFF,h3>>16&0xFF,h3>>>24&0xFF])}return hash}();exports.calculateMD5=calculateMD5;var Word64=function Word64Closure(){function Word64(highInteger,lowInteger){this.high=highInteger|0;this.low=lowInteger|0}Word64.prototype={and:function Word64_and(word){this.high&=word.high;this.low&=word.low},xor:function Word64_xor(word){this.high^=word.high;this.low^=word.low},or:function Word64_or(word){this.high|=word.high;this.low|=word.low},shiftRight:function Word64_shiftRight(places){if(places>=32){this.low=this.high>>>places-32|0;this.high=0}else{this.low=this.low>>>places|this.high<<32-places;this.high=this.high>>>places|0}},shiftLeft:function Word64_shiftLeft(places){if(places>=32){this.high=this.low<>>32-places;this.low=this.low<>>places|high<<32-places;this.high=high>>>places|low<<32-places},not:function Word64_not(){this.high=~this.high;this.low=~this.low},add:function Word64_add(word){var lowAdd=(this.low>>>0)+(word.low>>>0);var highAdd=(this.high>>>0)+(word.high>>>0);if(lowAdd>0xFFFFFFFF){highAdd+=1}this.low=lowAdd|0;this.high=highAdd|0},copyTo:function Word64_copyTo(bytes,offset){bytes[offset]=this.high>>>24&0xFF;bytes[offset+1]=this.high>>16&0xFF;bytes[offset+2]=this.high>>8&0xFF;bytes[offset+3]=this.high&0xFF;bytes[offset+4]=this.low>>>24&0xFF;bytes[offset+5]=this.low>>16&0xFF;bytes[offset+6]=this.low>>8&0xFF;bytes[offset+7]=this.low&0xFF},assign:function Word64_assign(word){this.high=word.high;this.low=word.low}};return Word64}();var calculateSHA256=function calculateSHA256Closure(){function rotr(x,n){return x>>>n|x<<32-n}function ch(x,y,z){return x&y^~x&z}function maj(x,y,z){return x&y^x&z^y&z}function sigma(x){return rotr(x,2)^rotr(x,13)^rotr(x,22)}function sigmaPrime(x){return rotr(x,6)^rotr(x,11)^rotr(x,25)}function littleSigma(x){return rotr(x,7)^rotr(x,18)^x>>>3}function littleSigmaPrime(x){return rotr(x,17)^rotr(x,19)^x>>>10}var k=[0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0x0fc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x06ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2];function hash(data,offset,length){var h0=0x6a09e667,h1=0xbb67ae85,h2=0x3c6ef372,h3=0xa54ff53a,h4=0x510e527f,h5=0x9b05688c,h6=0x1f83d9ab,h7=0x5be0cd19;var paddedLength=Math.ceil((length+9)/64)*64;var padded=new Uint8Array(paddedLength);var i,j,n;for(i=0;i>>29&0xFF;padded[i++]=length>>21&0xFF;padded[i++]=length>>13&0xFF;padded[i++]=length>>5&0xFF;padded[i++]=length<<3&0xFF;var w=new Uint32Array(64);for(i=0;i>24&0xFF,h0>>16&0xFF,h0>>8&0xFF,h0&0xFF,h1>>24&0xFF,h1>>16&0xFF,h1>>8&0xFF,h1&0xFF,h2>>24&0xFF,h2>>16&0xFF,h2>>8&0xFF,h2&0xFF,h3>>24&0xFF,h3>>16&0xFF,h3>>8&0xFF,h3&0xFF,h4>>24&0xFF,h4>>16&0xFF,h4>>8&0xFF,h4&0xFF,h5>>24&0xFF,h5>>16&0xFF,h5>>8&0xFF,h5&0xFF,h6>>24&0xFF,h6>>16&0xFF,h6>>8&0xFF,h6&0xFF,h7>>24&0xFF,h7>>16&0xFF,h7>>8&0xFF,h7&0xFF])}return hash}();exports.calculateSHA256=calculateSHA256;var calculateSHA512=function calculateSHA512Closure(){function ch(result,x,y,z,tmp){result.assign(x);result.and(y);tmp.assign(x);tmp.not();tmp.and(z);result.xor(tmp)}function maj(result,x,y,z,tmp){result.assign(x);result.and(y);tmp.assign(x);tmp.and(z);result.xor(tmp);tmp.assign(y);tmp.and(z);result.xor(tmp)}function sigma(result,x,tmp){result.assign(x);result.rotateRight(28);tmp.assign(x);tmp.rotateRight(34);result.xor(tmp);tmp.assign(x);tmp.rotateRight(39);result.xor(tmp)}function sigmaPrime(result,x,tmp){result.assign(x);result.rotateRight(14);tmp.assign(x);tmp.rotateRight(18);result.xor(tmp);tmp.assign(x);tmp.rotateRight(41);result.xor(tmp)}function littleSigma(result,x,tmp){result.assign(x);result.rotateRight(1);tmp.assign(x);tmp.rotateRight(8);result.xor(tmp);tmp.assign(x);tmp.shiftRight(7);result.xor(tmp)}function littleSigmaPrime(result,x,tmp){result.assign(x);result.rotateRight(19);tmp.assign(x);tmp.rotateRight(61);result.xor(tmp);tmp.assign(x);tmp.shiftRight(6);result.xor(tmp)}var k=[new Word64(0x428a2f98,0xd728ae22),new Word64(0x71374491,0x23ef65cd),new Word64(0xb5c0fbcf,0xec4d3b2f),new Word64(0xe9b5dba5,0x8189dbbc),new Word64(0x3956c25b,0xf348b538),new Word64(0x59f111f1,0xb605d019),new Word64(0x923f82a4,0xaf194f9b),new Word64(0xab1c5ed5,0xda6d8118),new Word64(0xd807aa98,0xa3030242),new Word64(0x12835b01,0x45706fbe),new Word64(0x243185be,0x4ee4b28c),new Word64(0x550c7dc3,0xd5ffb4e2),new Word64(0x72be5d74,0xf27b896f),new Word64(0x80deb1fe,0x3b1696b1),new Word64(0x9bdc06a7,0x25c71235),new Word64(0xc19bf174,0xcf692694),new Word64(0xe49b69c1,0x9ef14ad2),new Word64(0xefbe4786,0x384f25e3),new Word64(0x0fc19dc6,0x8b8cd5b5),new Word64(0x240ca1cc,0x77ac9c65),new Word64(0x2de92c6f,0x592b0275),new Word64(0x4a7484aa,0x6ea6e483),new Word64(0x5cb0a9dc,0xbd41fbd4),new Word64(0x76f988da,0x831153b5),new Word64(0x983e5152,0xee66dfab),new Word64(0xa831c66d,0x2db43210),new Word64(0xb00327c8,0x98fb213f),new Word64(0xbf597fc7,0xbeef0ee4),new Word64(0xc6e00bf3,0x3da88fc2),new Word64(0xd5a79147,0x930aa725),new Word64(0x06ca6351,0xe003826f),new Word64(0x14292967,0x0a0e6e70),new Word64(0x27b70a85,0x46d22ffc),new Word64(0x2e1b2138,0x5c26c926),new Word64(0x4d2c6dfc,0x5ac42aed),new Word64(0x53380d13,0x9d95b3df),new Word64(0x650a7354,0x8baf63de),new Word64(0x766a0abb,0x3c77b2a8),new Word64(0x81c2c92e,0x47edaee6),new Word64(0x92722c85,0x1482353b),new Word64(0xa2bfe8a1,0x4cf10364),new Word64(0xa81a664b,0xbc423001),new Word64(0xc24b8b70,0xd0f89791),new Word64(0xc76c51a3,0x0654be30),new Word64(0xd192e819,0xd6ef5218),new Word64(0xd6990624,0x5565a910),new Word64(0xf40e3585,0x5771202a),new Word64(0x106aa070,0x32bbd1b8),new Word64(0x19a4c116,0xb8d2d0c8),new Word64(0x1e376c08,0x5141ab53),new Word64(0x2748774c,0xdf8eeb99),new Word64(0x34b0bcb5,0xe19b48a8),new Word64(0x391c0cb3,0xc5c95a63),new Word64(0x4ed8aa4a,0xe3418acb),new Word64(0x5b9cca4f,0x7763e373),new Word64(0x682e6ff3,0xd6b2b8a3),new Word64(0x748f82ee,0x5defb2fc),new Word64(0x78a5636f,0x43172f60),new Word64(0x84c87814,0xa1f0ab72),new Word64(0x8cc70208,0x1a6439ec),new Word64(0x90befffa,0x23631e28),new Word64(0xa4506ceb,0xde82bde9),new Word64(0xbef9a3f7,0xb2c67915),new Word64(0xc67178f2,0xe372532b),new Word64(0xca273ece,0xea26619c),new Word64(0xd186b8c7,0x21c0c207),new Word64(0xeada7dd6,0xcde0eb1e),new Word64(0xf57d4f7f,0xee6ed178),new Word64(0x06f067aa,0x72176fba),new Word64(0x0a637dc5,0xa2c898a6),new Word64(0x113f9804,0xbef90dae),new Word64(0x1b710b35,0x131c471b),new Word64(0x28db77f5,0x23047d84),new Word64(0x32caab7b,0x40c72493),new Word64(0x3c9ebe0a,0x15c9bebc),new Word64(0x431d67c4,0x9c100d4c),new Word64(0x4cc5d4be,0xcb3e42b6),new Word64(0x597f299c,0xfc657e2a),new Word64(0x5fcb6fab,0x3ad6faec),new Word64(0x6c44198c,0x4a475817)];function hash(data,offset,length,mode384){mode384=!!mode384;var h0,h1,h2,h3,h4,h5,h6,h7;if(!mode384){h0=new Word64(0x6a09e667,0xf3bcc908);h1=new Word64(0xbb67ae85,0x84caa73b);h2=new Word64(0x3c6ef372,0xfe94f82b);h3=new Word64(0xa54ff53a,0x5f1d36f1);h4=new Word64(0x510e527f,0xade682d1);h5=new Word64(0x9b05688c,0x2b3e6c1f);h6=new Word64(0x1f83d9ab,0xfb41bd6b);h7=new Word64(0x5be0cd19,0x137e2179)}else{h0=new Word64(0xcbbb9d5d,0xc1059ed8);h1=new Word64(0x629a292a,0x367cd507);h2=new Word64(0x9159015a,0x3070dd17);h3=new Word64(0x152fecd8,0xf70e5939);h4=new Word64(0x67332667,0xffc00b31);h5=new Word64(0x8eb44a87,0x68581511);h6=new Word64(0xdb0c2e0d,0x64f98fa7);h7=new Word64(0x47b5481d,0xbefa4fa4)}var paddedLength=Math.ceil((length+17)/128)*128;var padded=new Uint8Array(paddedLength);var i,j,n;for(i=0;i>>29&0xFF;padded[i++]=length>>21&0xFF;padded[i++]=length>>13&0xFF;padded[i++]=length>>5&0xFF;padded[i++]=length<<3&0xFF;var w=new Array(80);for(i=0;i<80;i++){w[i]=new Word64(0,0)}var a=new Word64(0,0),b=new Word64(0,0),c=new Word64(0,0);var d=new Word64(0,0),e=new Word64(0,0),f=new Word64(0,0);var g=new Word64(0,0),h=new Word64(0,0);var t1=new Word64(0,0),t2=new Word64(0,0);var tmp1=new Word64(0,0),tmp2=new Word64(0,0),tmp3;for(i=0;i=1;--i){t=state[13];state[13]=state[9];state[9]=state[5];state[5]=state[1];state[1]=t;t=state[14];u=state[10];state[14]=state[6];state[10]=state[2];state[6]=t;state[2]=u;t=state[15];u=state[11];v=state[7];state[15]=state[3];state[11]=t;state[7]=u;state[3]=v;for(var _j=0;_j<16;++_j){state[_j]=this._inv_s[state[_j]]}for(var _j2=0,_k=i*16;_j2<16;++_j2,++_k){state[_j2]^=key[_k]}for(var _j3=0;_j3<16;_j3+=4){var s0=this._mix[state[_j3]];var s1=this._mix[state[_j3+1]];var s2=this._mix[state[_j3+2]];var s3=this._mix[state[_j3+3]];t=s0^s1>>>8^s1<<24^s2>>>16^s2<<16^s3>>>24^s3<<8;state[_j3]=t>>>24&0xFF;state[_j3+1]=t>>16&0xFF;state[_j3+2]=t>>8&0xFF;state[_j3+3]=t&0xFF}}t=state[13];state[13]=state[9];state[9]=state[5];state[5]=state[1];state[1]=t;t=state[14];u=state[10];state[14]=state[6];state[10]=state[2];state[6]=t;state[2]=u;t=state[15];u=state[11];v=state[7];state[15]=state[3];state[11]=t;state[7]=u;state[3]=v;for(var _j4=0;_j4<16;++_j4){state[_j4]=this._inv_s[state[_j4]];state[_j4]^=key[_j4]}return state}},{key:"_encrypt",value:function _encrypt(input,key){var s=this._s;var t,u,v;var state=new Uint8Array(16);state.set(input);for(var j=0;j<16;++j){state[j]^=key[j]}for(var i=1;i=ii;--_i){if(lastBlock[_i]!==psLen){psLen=0;break}}outputLength-=psLen;result[result.length-1]=lastBlock.subarray(0,16-psLen)}}var output=new Uint8Array(outputLength);for(var _i2=0,_j10=0,_ii=result.length;_i2<_ii;++_i2,_j10+=16){output.set(result[_i2],_j10)}return output}},{key:"decryptBlock",value:function decryptBlock(data,finalize){var iv=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;var sourceLength=data.length;var buffer=this.buffer,bufferLength=this.bufferPosition;if(iv){this.iv=iv}else{for(var i=0;bufferLength<16&&i=256){r=(r^0x1b)&0xFF}}for(var n=0;n<4;++n){result[j]=t1^=result[j-32];j++;result[j]=t2^=result[j-32];j++;result[j]=t3^=result[j-32];j++;result[j]=t4^=result[j-32];j++}}return result}}]);return AES256Cipher}(AESBaseCipher);exports.AES256Cipher=AES256Cipher;var PDF17=function PDF17Closure(){function compareByteArrays(array1,array2){if(array1.length!==array2.length){return false}for(var i=0;ii-32){var arrayLength=password.length+k.length+userBytes.length;var k1=new Uint8Array(arrayLength*64);var array=concatArrays(password,k);array=concatArrays(array,userBytes);for(var j=0,pos=0;j<64;j++,pos+=arrayLength){k1.set(array,pos)}var cipher=new AES128Cipher(k.subarray(0,16));e=cipher.encrypt(k1,k.subarray(16,32));var remainder=0;for(var z=0;z<16;z++){remainder*=256%3;remainder%=3;remainder+=(e[z]>>>0)%3;remainder%=3}if(remainder===0){k=calculateSHA256(e,0,e.length)}else if(remainder===1){k=calculateSHA384(e,0,e.length)}else if(remainder===2){k=calculateSHA512(e,0,e.length)}i++}return k.subarray(0,32)}function PDF20(){}function compareByteArrays(array1,array2){if(array1.length!==array2.length){return false}for(var i=0;i>8&0xFF;hashData[i++]=flags>>16&0xFF;hashData[i++]=flags>>>24&0xFF;for(j=0,n=fileId.length;j=4&&!encryptMetadata){hashData[i++]=0xFF;hashData[i++]=0xFF;hashData[i++]=0xFF;hashData[i++]=0xFF}var hash=calculateMD5(hashData,0,i);var keyLengthInBytes=keyLength>>3;if(revision>=3){for(j=0;j<50;++j){hash=calculateMD5(hash,0,keyLengthInBytes)}}var encryptionKey=hash.subarray(0,keyLengthInBytes);var cipher,checkData;if(revision>=3){for(i=0;i<32;++i){hashData[i]=defaultPasswordBytes[i]}for(j=0,n=fileId.length;j>3;if(revision>=3){for(j=0;j<50;++j){hash=calculateMD5(hash,0,hash.length)}}var cipher,userPassword;if(revision>=3){userPassword=ownerPassword;var derivedKey=new Uint8Array(keyLengthInBytes),k;for(j=19;j>=0;j--){for(k=0;k=4){var cf=dict.get('CF');if((0,_primitives.isDict)(cf)){cf.suppressEncryption=true}this.cf=cf;this.stmf=dict.get('StmF')||identityName;this.strf=dict.get('StrF')||identityName;this.eff=dict.get('EFF')||this.stmf}}function buildObjectKey(num,gen,encryptionKey,isAes){var key=new Uint8Array(encryptionKey.length+9),i,n;for(i=0,n=encryptionKey.length;i>8&0xFF;key[i++]=num>>16&0xFF;key[i++]=gen&0xFF;key[i++]=gen>>8&0xFF;if(isAes){key[i++]=0x73;key[i++]=0x41;key[i++]=0x6C;key[i++]=0x54}var hash=calculateMD5(key,0,i);return hash.subarray(0,Math.min(encryptionKey.length+5,16))}function buildCipherConstructor(cf,name,num,gen,key){if(!(0,_primitives.isName)(name)){throw new _util.FormatError('Invalid crypt filter name.');}var cryptFilter=cf.get(name.name);var cfm;if(cryptFilter!==null&&cryptFilter!==undefined){cfm=cryptFilter.get('CFM')}if(!cfm||cfm.name==='None'){return function cipherTransformFactoryBuildCipherConstructorNone(){return new NullCipher()}}if(cfm.name==='V2'){return function cipherTransformFactoryBuildCipherConstructorV2(){return new ARCFourCipher(buildObjectKey(num,gen,key,false))}}if(cfm.name==='AESV2'){return function cipherTransformFactoryBuildCipherConstructorAESV2(){return new AES128Cipher(buildObjectKey(num,gen,key,true))}}if(cfm.name==='AESV3'){return function cipherTransformFactoryBuildCipherConstructorAESV3(){return new AES256Cipher(key)}}throw new _util.FormatError('Unknown crypto method');}CipherTransformFactory.prototype={createCipherTransform:function CipherTransformFactory_createCipherTransform(num,gen){if(this.algorithm===4||this.algorithm===5){return new CipherTransform(buildCipherConstructor(this.cf,this.stmf,num,gen,this.encryptionKey),buildCipherConstructor(this.cf,this.strf,num,gen,this.encryptionKey))}var key=buildObjectKey(num,gen,this.encryptionKey,false);var cipherConstructor=function buildCipherCipherConstructor(){return new ARCFourCipher(key)};return new CipherTransform(cipherConstructor,cipherConstructor)}};return CipherTransformFactory}();exports.CipherTransformFactory=CipherTransformFactory}),(function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.ColorSpace=void 0;var _util=__w_pdfjs_require__(5);var _primitives=__w_pdfjs_require__(151);function _typeof(obj){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 _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 _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}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 _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;inumComponentColors&&this.name!=='DeviceGray'&&this.name!=='DeviceRGB'){var allColors=bpc<=8?new Uint8Array(numComponentColors):new Uint16Array(numComponentColors);for(var i=0;i2&&arguments[2]!==undefined?arguments[2]:null;var pdfFunctionFactory=arguments.length>3?arguments[3]:undefined;cs=xref.fetchIfRef(cs);if((0,_primitives.isName)(cs)){switch(cs.name){case'DeviceGray':case'G':return'DeviceGrayCS';case'DeviceRGB':case'RGB':return'DeviceRgbCS';case'DeviceCMYK':case'CMYK':return'DeviceCmykCS';case'Pattern':return['PatternCS',null];default:if((0,_primitives.isDict)(res)){var colorSpaces=res.get('ColorSpace');if((0,_primitives.isDict)(colorSpaces)){var resCS=colorSpaces.get(cs.name);if(resCS){if((0,_primitives.isName)(resCS)){return this.parseToIR(resCS,xref,res,pdfFunctionFactory)}cs=resCS;break}}}throw new _util.FormatError("unrecognized colorspace ".concat(cs.name));}}if(Array.isArray(cs)){var mode=xref.fetchIfRef(cs[0]).name;var numComps,params,alt,whitePoint,blackPoint,gamma;switch(mode){case'DeviceGray':case'G':return'DeviceGrayCS';case'DeviceRGB':case'RGB':return'DeviceRgbCS';case'DeviceCMYK':case'CMYK':return'DeviceCmykCS';case'CalGray':params=xref.fetchIfRef(cs[1]);whitePoint=params.getArray('WhitePoint');blackPoint=params.getArray('BlackPoint');gamma=params.get('Gamma');return['CalGrayCS',whitePoint,blackPoint,gamma];case'CalRGB':params=xref.fetchIfRef(cs[1]);whitePoint=params.getArray('WhitePoint');blackPoint=params.getArray('BlackPoint');gamma=params.getArray('Gamma');var matrix=params.getArray('Matrix');return['CalRGBCS',whitePoint,blackPoint,gamma,matrix];case'ICCBased':var stream=xref.fetchIfRef(cs[1]);var dict=stream.dict;numComps=dict.get('N');alt=dict.get('Alternate');if(alt){var altIR=this.parseToIR(alt,xref,res,pdfFunctionFactory);var altCS=this.fromIR(altIR,pdfFunctionFactory);if(altCS.numComps===numComps){return altIR}(0,_util.warn)('ICCBased color space: Ignoring incorrect /Alternate entry.')}if(numComps===1){return'DeviceGrayCS'}else if(numComps===3){return'DeviceRgbCS'}else if(numComps===4){return'DeviceCmykCS'}break;case'Pattern':var basePatternCS=cs[1]||null;if(basePatternCS){basePatternCS=this.parseToIR(basePatternCS,xref,res,pdfFunctionFactory)}return['PatternCS',basePatternCS];case'Indexed':case'I':var baseIndexedCS=this.parseToIR(cs[1],xref,res,pdfFunctionFactory);var hiVal=xref.fetchIfRef(cs[2])+1;var lookup=xref.fetchIfRef(cs[3]);if((0,_primitives.isStream)(lookup)){lookup=lookup.getBytes()}return['IndexedCS',baseIndexedCS,hiVal,lookup];case'Separation':case'DeviceN':var name=xref.fetchIfRef(cs[1]);numComps=Array.isArray(name)?name.length:1;alt=this.parseToIR(cs[2],xref,res,pdfFunctionFactory);var tintFn=pdfFunctionFactory.create(xref.fetchIfRef(cs[3]));return['AlternateCS',numComps,alt,tintFn];case'Lab':params=xref.fetchIfRef(cs[1]);whitePoint=params.getArray('WhitePoint');blackPoint=params.getArray('BlackPoint');var range=params.getArray('Range');return['LabCS',whitePoint,blackPoint,range];default:throw new _util.FormatError("unimplemented color space object \"".concat(mode,"\""));}}throw new _util.FormatError("unrecognized color space object: \"".concat(cs,"\""));}},{key:"isDefaultDecode",value:function isDefaultDecode(decode,numComps){if(!Array.isArray(decode)){return true}if(numComps*2!==decode.length){(0,_util.warn)('The decode map is not the correct length');return true}for(var i=0,ii=decode.length;i8.0){return Math.pow((L+16)/116,3)}return L*DECODE_L_CONSTANT}function compensateBlackPoint(sourceBlackPoint,XYZ_Flat,result){if(sourceBlackPoint[0]===0&&sourceBlackPoint[1]===0&&sourceBlackPoint[2]===0){result[0]=XYZ_Flat[0];result[1]=XYZ_Flat[1];result[2]=XYZ_Flat[2];return}var zeroDecodeL=decodeL(0);var X_DST=zeroDecodeL;var X_SRC=decodeL(sourceBlackPoint[0]);var Y_DST=zeroDecodeL;var Y_SRC=decodeL(sourceBlackPoint[1]);var Z_DST=zeroDecodeL;var Z_SRC=decodeL(sourceBlackPoint[2]);var X_Scale=(1-X_DST)/(1-X_SRC);var X_Offset=1-X_Scale;var Y_Scale=(1-Y_DST)/(1-Y_SRC);var Y_Offset=1-Y_Scale;var Z_Scale=(1-Z_DST)/(1-Z_SRC);var Z_Offset=1-Z_Scale;result[0]=XYZ_Flat[0]*X_Scale+X_Offset;result[1]=XYZ_Flat[1]*Y_Scale+Y_Offset;result[2]=XYZ_Flat[2]*Z_Scale+Z_Offset}function normalizeWhitePointToFlat(sourceWhitePoint,XYZ_In,result){if(sourceWhitePoint[0]===1&&sourceWhitePoint[2]===1){result[0]=XYZ_In[0];result[1]=XYZ_In[1];result[2]=XYZ_In[2];return}var LMS=result;matrixProduct(BRADFORD_SCALE_MATRIX,XYZ_In,LMS);var LMS_Flat=tempNormalizeMatrix;convertToFlat(sourceWhitePoint,LMS,LMS_Flat);matrixProduct(BRADFORD_SCALE_INVERSE_MATRIX,LMS_Flat,result)}function normalizeWhitePointToD65(sourceWhitePoint,XYZ_In,result){var LMS=result;matrixProduct(BRADFORD_SCALE_MATRIX,XYZ_In,LMS);var LMS_D65=tempNormalizeMatrix;convertToD65(sourceWhitePoint,LMS,LMS_D65);matrixProduct(BRADFORD_SCALE_INVERSE_MATRIX,LMS_D65,result)}function convertToRgb(cs,src,srcOffset,dest,destOffset,scale){var A=adjustToRange(0,1,src[srcOffset]*scale);var B=adjustToRange(0,1,src[srcOffset+1]*scale);var C=adjustToRange(0,1,src[srcOffset+2]*scale);var AGR=Math.pow(A,cs.GR);var BGG=Math.pow(B,cs.GG);var CGB=Math.pow(C,cs.GB);var X=cs.MXA*AGR+cs.MXB*BGG+cs.MXC*CGB;var Y=cs.MYA*AGR+cs.MYB*BGG+cs.MYC*CGB;var Z=cs.MZA*AGR+cs.MZB*BGG+cs.MZC*CGB;var XYZ=tempConvertMatrix1;XYZ[0]=X;XYZ[1]=Y;XYZ[2]=Z;var XYZ_Flat=tempConvertMatrix2;normalizeWhitePointToFlat(cs.whitePoint,XYZ,XYZ_Flat);var XYZ_Black=tempConvertMatrix1;compensateBlackPoint(cs.blackPoint,XYZ_Flat,XYZ_Black);var XYZ_D65=tempConvertMatrix2;normalizeWhitePointToD65(FLAT_WHITEPOINT_MATRIX,XYZ_Black,XYZ_D65);var SRGB=tempConvertMatrix1;matrixProduct(SRGB_D65_XYZ_TO_RGB_MATRIX,XYZ_D65,SRGB);dest[destOffset]=sRGBTransferFunction(SRGB[0])*255;dest[destOffset+1]=sRGBTransferFunction(SRGB[1])*255;dest[destOffset+2]=sRGBTransferFunction(SRGB[2])*255}var CalRGBCS=function(_ColorSpace8){_inherits(CalRGBCS,_ColorSpace8);function CalRGBCS(whitePoint,blackPoint,gamma,matrix){var _this5;_classCallCheck(this,CalRGBCS);_this5=_possibleConstructorReturn(this,_getPrototypeOf(CalRGBCS).call(this,'CalRGB',3));if(!whitePoint){throw new _util.FormatError('WhitePoint missing - required for color space CalRGB');}blackPoint=blackPoint||new Float32Array(3);gamma=gamma||new Float32Array([1,1,1]);matrix=matrix||new Float32Array([1,0,0,0,1,0,0,0,1]);var XW=whitePoint[0];var YW=whitePoint[1];var ZW=whitePoint[2];_this5.whitePoint=whitePoint;var XB=blackPoint[0];var YB=blackPoint[1];var ZB=blackPoint[2];_this5.blackPoint=blackPoint;_this5.GR=gamma[0];_this5.GG=gamma[1];_this5.GB=gamma[2];_this5.MXA=matrix[0];_this5.MYA=matrix[1];_this5.MZA=matrix[2];_this5.MXB=matrix[3];_this5.MYB=matrix[4];_this5.MZB=matrix[5];_this5.MXC=matrix[6];_this5.MYC=matrix[7];_this5.MZC=matrix[8];if(XW<0||ZW<0||YW!==1){throw new _util.FormatError("Invalid WhitePoint components for ".concat(_this5.name)+', no fallback available');}if(XB<0||YB<0||ZB<0){(0,_util.info)("Invalid BlackPoint for ".concat(_this5.name," [").concat(XB,", ").concat(YB,", ").concat(ZB,"], ")+'falling back to default.');_this5.blackPoint=new Float32Array(3)}if(_this5.GR<0||_this5.GG<0||_this5.GB<0){(0,_util.info)("Invalid Gamma [".concat(_this5.GR,", ").concat(_this5.GG,", ").concat(_this5.GB,"] for ")+"".concat(_this5.name,", falling back to default."));_this5.GR=_this5.GG=_this5.GB=1}return _this5}_createClass(CalRGBCS,[{key:"getRgbItem",value:function getRgbItem(src,srcOffset,dest,destOffset){convertToRgb(this,src,srcOffset,dest,destOffset,1)}},{key:"getRgbBuffer",value:function getRgbBuffer(src,srcOffset,count,dest,destOffset,bits,alpha01){var scale=1/((1<=6/29){result=x*x*x}else{result=108/841*(x-4/29)}return result}function decode(value,high1,low2,high2){return low2+value*(high2-low2)/high1}function convertToRgb(cs,src,srcOffset,maxVal,dest,destOffset){var Ls=src[srcOffset];var as=src[srcOffset+1];var bs=src[srcOffset+2];if(maxVal!==false){Ls=decode(Ls,maxVal,0,100);as=decode(as,maxVal,cs.amin,cs.amax);bs=decode(bs,maxVal,cs.bmin,cs.bmax)}as=as>cs.amax?cs.amax:ascs.bmax?cs.bmax:bs_this6.amax||_this6.bmin>_this6.bmax){(0,_util.info)('Invalid Range, falling back to defaults');_this6.amin=-100;_this6.amax=100;_this6.bmin=-100;_this6.bmax=100}return _this6}_createClass(LabCS,[{key:"getRgbItem",value:function getRgbItem(src,srcOffset,dest,destOffset){convertToRgb(this,src,srcOffset,false,dest,destOffset)}},{key:"getRgbBuffer",value:function getRgbBuffer(src,srcOffset,count,dest,destOffset,bits,alpha01){var maxVal=(1<0?flags:0}},{key:"hasFlag",value:function hasFlag(flag){return this._hasFlag(this.flags,flag)}},{key:"setRectangle",value:function setRectangle(rectangle){if(Array.isArray(rectangle)&&rectangle.length===4){this.rectangle=_util.Util.normalizeRect(rectangle)}else{this.rectangle=[0,0,0,0]}}},{key:"setColor",value:function setColor(color){var rgbColor=new Uint8ClampedArray(3);if(!Array.isArray(color)){this.color=rgbColor;return}switch(color.length){case 0:this.color=null;break;case 1:_colorspace.ColorSpace.singletons.gray.getRgbItem(color,0,rgbColor,0);this.color=rgbColor;break;case 3:_colorspace.ColorSpace.singletons.rgb.getRgbItem(color,0,rgbColor,0);this.color=rgbColor;break;case 4:_colorspace.ColorSpace.singletons.cmyk.getRgbItem(color,0,rgbColor,0);this.color=rgbColor;break;default:this.color=rgbColor;break}}},{key:"setBorderStyle",value:function setBorderStyle(borderStyle){this.borderStyle=new AnnotationBorderStyle();if(!(0,_primitives.isDict)(borderStyle)){return}if(borderStyle.has('BS')){var dict=borderStyle.get('BS');var dictType=dict.get('Type');if(!dictType||(0,_primitives.isName)(dictType,'Border')){this.borderStyle.setWidth(dict.get('W'),this.rectangle);this.borderStyle.setStyle(dict.get('S'));this.borderStyle.setDashArray(dict.getArray('D'))}}else if(borderStyle.has('Border')){var array=borderStyle.getArray('Border');if(Array.isArray(array)&&array.length>=3){this.borderStyle.setHorizontalCornerRadius(array[0]);this.borderStyle.setVerticalCornerRadius(array[1]);this.borderStyle.setWidth(array[2],this.rectangle);if(array.length===4){this.borderStyle.setDashArray(array[3])}}}else{this.borderStyle.setWidth(0)}}},{key:"setAppearance",value:function setAppearance(dict){this.appearance=null;var appearanceStates=dict.get('AP');if(!(0,_primitives.isDict)(appearanceStates)){return}var normalAppearanceState=appearanceStates.get('N');if((0,_primitives.isStream)(normalAppearanceState)){this.appearance=normalAppearanceState;return}if(!(0,_primitives.isDict)(normalAppearanceState)){return}var as=dict.get('AS');if(!(0,_primitives.isName)(as)||!normalAppearanceState.has(as.name)){return}this.appearance=normalAppearanceState.get(as.name)}},{key:"loadResources",value:function loadResources(keys){return this.appearance.dict.getAsync('Resources').then(function(resources){if(!resources){return undefined}var objectLoader=new _obj.ObjectLoader(resources,keys,resources.xref);return objectLoader.load().then(function(){return resources})})}},{key:"getOperatorList",value:function getOperatorList(evaluator,task,renderForms){var _this=this;if(!this.appearance){return Promise.resolve(new _operator_list.OperatorList())}var data=this.data;var appearanceDict=this.appearance.dict;var resourcesPromise=this.loadResources(['ExtGState','ColorSpace','Pattern','Shading','XObject','Font']);var bbox=appearanceDict.getArray('BBox')||[0,0,1,1];var matrix=appearanceDict.getArray('Matrix')||[1,0,0,1,0,0];var transform=getTransformMatrix(data.rect,bbox,matrix);return resourcesPromise.then(function(resources){var opList=new _operator_list.OperatorList();opList.addOp(_util.OPS.beginAnnotation,[data.rect,transform,matrix]);return evaluator.getOperatorList({stream:_this.appearance,task:task,resources:resources,operatorList:opList}).then(function(){opList.addOp(_util.OPS.endAnnotation,[]);_this.appearance.reset();return opList})})}},{key:"viewable",get:function get(){if(this.flags===0){return true}return this._isViewable(this.flags)}},{key:"printable",get:function get(){if(this.flags===0){return false}return this._isPrintable(this.flags)}}]);return Annotation}();exports.Annotation=Annotation;var AnnotationBorderStyle=function(){function AnnotationBorderStyle(){_classCallCheck(this,AnnotationBorderStyle);this.width=1;this.style=_util.AnnotationBorderStyleType.SOLID;this.dashArray=[3];this.horizontalCornerRadius=0;this.verticalCornerRadius=0}_createClass(AnnotationBorderStyle,[{key:"setWidth",value:function setWidth(width){var rect=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[0,0,0,0];if((0,_primitives.isName)(width)){this.width=0;return}if(Number.isInteger(width)){if(width>0){var maxWidth=(rect[2]-rect[0])/2;var maxHeight=(rect[3]-rect[1])/2;if(maxWidth>0&&maxHeight>0&&(width>maxWidth||width>maxHeight)){(0,_util.warn)("AnnotationBorderStyle.setWidth - ignoring width: ".concat(width));width=1}}this.width=width}}},{key:"setStyle",value:function setStyle(style){if(!(0,_primitives.isName)(style)){return}switch(style.name){case'S':this.style=_util.AnnotationBorderStyleType.SOLID;break;case'D':this.style=_util.AnnotationBorderStyleType.DASHED;break;case'B':this.style=_util.AnnotationBorderStyleType.BEVELED;break;case'I':this.style=_util.AnnotationBorderStyleType.INSET;break;case'U':this.style=_util.AnnotationBorderStyleType.UNDERLINE;break;default:break}}},{key:"setDashArray",value:function setDashArray(dashArray){if(Array.isArray(dashArray)&&dashArray.length>0){var isValid=true;var allZeros=true;for(var i=0,len=dashArray.length;i=0;if(!validNumber){isValid=false;break}else if(element>0){allZeros=false}}if(isValid&&!allZeros){this.dashArray=dashArray}else{this.width=0}}else if(dashArray){this.width=0}}},{key:"setHorizontalCornerRadius",value:function setHorizontalCornerRadius(radius){if(Number.isInteger(radius)){this.horizontalCornerRadius=radius}}},{key:"setVerticalCornerRadius",value:function setVerticalCornerRadius(radius){if(Number.isInteger(radius)){this.verticalCornerRadius=radius}}}]);return AnnotationBorderStyle}();exports.AnnotationBorderStyle=AnnotationBorderStyle;var MarkupAnnotation=function(_Annotation){_inherits(MarkupAnnotation,_Annotation);function MarkupAnnotation(parameters){var _this2;_classCallCheck(this,MarkupAnnotation);_this2=_possibleConstructorReturn(this,_getPrototypeOf(MarkupAnnotation).call(this,parameters));var dict=parameters.dict;if(!dict.has('C')){_this2.data.color=null}_this2.setCreationDate(dict.get('CreationDate'));_this2.data.creationDate=_this2.creationDate;_this2.data.hasPopup=dict.has('Popup');_this2.data.title=(0,_util.stringToPDFString)(dict.get('T')||'');return _this2}_createClass(MarkupAnnotation,[{key:"setCreationDate",value:function setCreationDate(creationDate){this.creationDate=(0,_util.isString)(creationDate)?creationDate:null}}]);return MarkupAnnotation}(Annotation);exports.MarkupAnnotation=MarkupAnnotation;var WidgetAnnotation=function(_Annotation2){_inherits(WidgetAnnotation,_Annotation2);function WidgetAnnotation(params){var _this3;_classCallCheck(this,WidgetAnnotation);_this3=_possibleConstructorReturn(this,_getPrototypeOf(WidgetAnnotation).call(this,params));var dict=params.dict;var data=_this3.data;data.annotationType=_util.AnnotationType.WIDGET;data.fieldName=_this3._constructFieldName(dict);data.fieldValue=(0,_core_utils.getInheritableProperty)({dict:dict,key:'V',getArray:true});data.alternativeText=(0,_util.stringToPDFString)(dict.get('TU')||'');data.defaultAppearance=(0,_core_utils.getInheritableProperty)({dict:dict,key:'DA'})||'';var fieldType=(0,_core_utils.getInheritableProperty)({dict:dict,key:'FT'});data.fieldType=(0,_primitives.isName)(fieldType)?fieldType.name:null;_this3.fieldResources=(0,_core_utils.getInheritableProperty)({dict:dict,key:'DR'})||_primitives.Dict.empty;data.fieldFlags=(0,_core_utils.getInheritableProperty)({dict:dict,key:'Ff'});if(!Number.isInteger(data.fieldFlags)||data.fieldFlags<0){data.fieldFlags=0}data.readOnly=_this3.hasFieldFlag(_util.AnnotationFieldFlag.READONLY);return _this3}_createClass(WidgetAnnotation,[{key:"_constructFieldName",value:function _constructFieldName(dict){if(!dict.has('T')&&!dict.has('Parent')){(0,_util.warn)('Unknown field name, falling back to empty field name.');return''}if(!dict.has('Parent')){return(0,_util.stringToPDFString)(dict.get('T'))}var fieldName=[];if(dict.has('T')){fieldName.unshift((0,_util.stringToPDFString)(dict.get('T')))}var loopDict=dict;while(loopDict.has('Parent')){loopDict=loopDict.get('Parent');if(!(0,_primitives.isDict)(loopDict)){break}if(loopDict.has('T')){fieldName.unshift((0,_util.stringToPDFString)(loopDict.get('T')))}}return fieldName.join('.')}},{key:"hasFieldFlag",value:function hasFieldFlag(flag){return!!(this.data.fieldFlags&flag)}},{key:"getOperatorList",value:function getOperatorList(evaluator,task,renderForms){if(renderForms){return Promise.resolve(new _operator_list.OperatorList())}return _get(_getPrototypeOf(WidgetAnnotation.prototype),"getOperatorList",this).call(this,evaluator,task,renderForms)}}]);return WidgetAnnotation}(Annotation);var TextWidgetAnnotation=function(_WidgetAnnotation){_inherits(TextWidgetAnnotation,_WidgetAnnotation);function TextWidgetAnnotation(params){var _this4;_classCallCheck(this,TextWidgetAnnotation);_this4=_possibleConstructorReturn(this,_getPrototypeOf(TextWidgetAnnotation).call(this,params));var dict=params.dict;_this4.data.fieldValue=(0,_util.stringToPDFString)(_this4.data.fieldValue||'');var alignment=(0,_core_utils.getInheritableProperty)({dict:dict,key:'Q'});if(!Number.isInteger(alignment)||alignment<0||alignment>2){alignment=null}_this4.data.textAlignment=alignment;var maximumLength=(0,_core_utils.getInheritableProperty)({dict:dict,key:'MaxLen'});if(!Number.isInteger(maximumLength)||maximumLength<0){maximumLength=null}_this4.data.maxLen=maximumLength;_this4.data.multiLine=_this4.hasFieldFlag(_util.AnnotationFieldFlag.MULTILINE);_this4.data.comb=_this4.hasFieldFlag(_util.AnnotationFieldFlag.COMB)&&!_this4.hasFieldFlag(_util.AnnotationFieldFlag.MULTILINE)&&!_this4.hasFieldFlag(_util.AnnotationFieldFlag.PASSWORD)&&!_this4.hasFieldFlag(_util.AnnotationFieldFlag.FILESELECT)&&_this4.data.maxLen!==null;return _this4}_createClass(TextWidgetAnnotation,[{key:"getOperatorList",value:function getOperatorList(evaluator,task,renderForms){if(renderForms||this.appearance){return _get(_getPrototypeOf(TextWidgetAnnotation.prototype),"getOperatorList",this).call(this,evaluator,task,renderForms)}var operatorList=new _operator_list.OperatorList();if(!this.data.defaultAppearance){return Promise.resolve(operatorList)}var stream=new _stream.Stream((0,_util.stringToBytes)(this.data.defaultAppearance));return evaluator.getOperatorList({stream:stream,task:task,resources:this.fieldResources,operatorList:operatorList}).then(function(){return operatorList})}}]);return TextWidgetAnnotation}(WidgetAnnotation);var ButtonWidgetAnnotation=function(_WidgetAnnotation2){_inherits(ButtonWidgetAnnotation,_WidgetAnnotation2);function ButtonWidgetAnnotation(params){var _this5;_classCallCheck(this,ButtonWidgetAnnotation);_this5=_possibleConstructorReturn(this,_getPrototypeOf(ButtonWidgetAnnotation).call(this,params));_this5.data.checkBox=!_this5.hasFieldFlag(_util.AnnotationFieldFlag.RADIO)&&!_this5.hasFieldFlag(_util.AnnotationFieldFlag.PUSHBUTTON);_this5.data.radioButton=_this5.hasFieldFlag(_util.AnnotationFieldFlag.RADIO)&&!_this5.hasFieldFlag(_util.AnnotationFieldFlag.PUSHBUTTON);_this5.data.pushButton=_this5.hasFieldFlag(_util.AnnotationFieldFlag.PUSHBUTTON);if(_this5.data.checkBox){_this5._processCheckBox(params)}else if(_this5.data.radioButton){_this5._processRadioButton(params)}else if(_this5.data.pushButton){_this5._processPushButton(params)}else{(0,_util.warn)('Invalid field flags for button widget annotation')}return _this5}_createClass(ButtonWidgetAnnotation,[{key:"_processCheckBox",value:function _processCheckBox(params){if((0,_primitives.isName)(this.data.fieldValue)){this.data.fieldValue=this.data.fieldValue.name}var customAppearance=params.dict.get('AP');if(!(0,_primitives.isDict)(customAppearance)){return}var exportValueOptionsDict=customAppearance.get('D');if(!(0,_primitives.isDict)(exportValueOptionsDict)){return}var exportValues=exportValueOptionsDict.getKeys();var hasCorrectOptionCount=exportValues.length===2;if(!hasCorrectOptionCount){return}this.data.exportValue=exportValues[0]==='Off'?exportValues[1]:exportValues[0]}},{key:"_processRadioButton",value:function _processRadioButton(params){this.data.fieldValue=this.data.buttonValue=null;var fieldParent=params.dict.get('Parent');if((0,_primitives.isDict)(fieldParent)&&fieldParent.has('V')){var fieldParentValue=fieldParent.get('V');if((0,_primitives.isName)(fieldParentValue)){this.data.fieldValue=fieldParentValue.name}}var appearanceStates=params.dict.get('AP');if(!(0,_primitives.isDict)(appearanceStates)){return}var normalAppearanceState=appearanceStates.get('N');if(!(0,_primitives.isDict)(normalAppearanceState)){return}var keys=normalAppearanceState.getKeys();for(var i=0,ii=keys.length;iMAX_WIDTH){maxX=Math.max(maxX,currentX);currentY+=maxLineHeight+2*IMAGE_PADDING;currentX=0;maxLineHeight=0}map.push({transform:transform,x:currentX,y:currentY,w:img.width,h:img.height});currentX+=img.width+2*IMAGE_PADDING;maxLineHeight=Math.max(maxLineHeight,img.height)}var imgWidth=Math.max(maxX,currentX)+IMAGE_PADDING;var imgHeight=currentY+maxLineHeight+IMAGE_PADDING;var imgData=new Uint8ClampedArray(imgWidth*imgHeight*4);var imgRowSize=imgWidth<<2;for(q=0;q=0){data[offset-4]=data[offset];data[offset-3]=data[offset+1];data[offset-2]=data[offset+2];data[offset-1]=data[offset+3];data[offset+rowSize]=data[offset+rowSize-4];data[offset+rowSize+1]=data[offset+rowSize-3];data[offset+rowSize+2]=data[offset+rowSize-2];data[offset+rowSize+3]=data[offset+rowSize-1];offset-=imgRowSize}}fnArray.splice(iFirstSave,count*4,_util.OPS.paintInlineImageXObjectGroup);argsArray.splice(iFirstSave,count*4,[{width:imgWidth,height:imgHeight,kind:_util.ImageKind.RGBA_32BPP,data:imgData},map]);return iFirstSave+1});addState(InitialState,[_util.OPS.save,_util.OPS.transform,_util.OPS.paintImageMaskXObject,_util.OPS.restore],null,function iterateImageMaskGroup(context,i){var fnArray=context.fnArray;var iFirstSave=context.iCurr-3;var pos=(i-iFirstSave)%4;switch(pos){case 0:return fnArray[i]===_util.OPS.save;case 1:return fnArray[i]===_util.OPS.transform;case 2:return fnArray[i]===_util.OPS.paintImageMaskXObject;case 3:return fnArray[i]===_util.OPS.restore}throw new Error("iterateImageMaskGroup - invalid pos: ".concat(pos));},function foundImageMaskGroup(context,i){var MIN_IMAGES_IN_MASKS_BLOCK=10;var MAX_IMAGES_IN_MASKS_BLOCK=100;var MAX_SAME_IMAGES_IN_MASKS_BLOCK=1000;var fnArray=context.fnArray,argsArray=context.argsArray;var curr=context.iCurr;var iFirstSave=curr-3;var iFirstTransform=curr-2;var iFirstPIMXO=curr-1;var count=Math.floor((i-iFirstSave)/4);count=handlePaintSolidColorImageMask(iFirstSave,count,fnArray,argsArray);if(count=4&&fnArray[iFirstBeginText-4]===fnArray[iFirstSetFont]&&fnArray[iFirstBeginText-3]===fnArray[iFirstSetTextMatrix]&&fnArray[iFirstBeginText-2]===fnArray[iFirstShowText]&&fnArray[iFirstBeginText-1]===fnArray[iFirstEndText]&&argsArray[iFirstBeginText-4][0]===firstSetFontArg0&&argsArray[iFirstBeginText-4][1]===firstSetFontArg1){count++;iFirst-=5}var iEndText=iFirst+4;for(var q=1;q=ii){break}}state=(state||InitialState)[fnArray[i]];if(!state||Array.isArray(state)){i++;continue}context.iCurr=i;i++;if(state.checkFn&&!(0,state.checkFn)(context)){state=null;continue}match=state;state=null}this.state=state;this.match=match;this.lastProcessed=i},push:function push(fn,args){this.queue.fnArray.push(fn);this.queue.argsArray.push(args);this._optimize()},flush:function flush(){while(this.match){var length=this.queue.fnArray.length;this.lastProcessed=(0,this.match.processFn)(this.context,length);this.match=null;this.state=null;this._optimize()}},reset:function reset(){this.state=null;this.match=null;this.lastProcessed=0}};return QueueOptimizer}();var NullOptimizer=function NullOptimizerClosure(){function NullOptimizer(queue){this.queue=queue}NullOptimizer.prototype={push:function push(fn,args){this.queue.fnArray.push(fn);this.queue.argsArray.push(args)},flush:function flush(){},reset:function reset(){}};return NullOptimizer}();var OperatorList=function OperatorListClosure(){var CHUNK_SIZE=1000;var CHUNK_SIZE_ABOUT=CHUNK_SIZE-5;function OperatorList(intent,messageHandler,pageIndex){this.messageHandler=messageHandler;this.fnArray=[];this.argsArray=[];if(messageHandler&&intent!=='oplist'){this.optimizer=new QueueOptimizer(this)}else{this.optimizer=new NullOptimizer(this)}this.dependencies=Object.create(null);this._totalLength=0;this.pageIndex=pageIndex;this.intent=intent;this.weight=0}OperatorList.prototype={get length(){return this.argsArray.length},get totalLength(){return this._totalLength+this.length},addOp:function addOp(fn,args){this.optimizer.push(fn,args);this.weight++;if(this.messageHandler){if(this.weight>=CHUNK_SIZE){this.flush()}else if(this.weight>=CHUNK_SIZE_ABOUT&&(fn===_util.OPS.restore||fn===_util.OPS.endText)){this.flush()}}},addDependency:function addDependency(dependency){if(dependency in this.dependencies){return}this.dependencies[dependency]=true;this.addOp(_util.OPS.dependency,[dependency])},addDependencies:function addDependencies(dependencies){for(var key in dependencies){this.addDependency(key)}},addOpList:function addOpList(opList){Object.assign(this.dependencies,opList.dependencies);for(var i=0,ii=opList.length;i0&&arguments[0]!==undefined?arguments[0]:false;this.optimizer.flush();var length=this.length;this._totalLength+=length;this.messageHandler.send('RenderPageChunk',{operatorList:{fnArray:this.fnArray,argsArray:this.argsArray,lastChunk:lastChunk,length:length},pageIndex:this.pageIndex,intent:this.intent},this._transfers);this.dependencies=Object.create(null);this.fnArray.length=0;this.argsArray.length=0;this.weight=0;this.optimizer.reset()}};return OperatorList}();exports.OperatorList=OperatorList}),(function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.PartialEvaluator=void 0;var _regenerator=_interopRequireDefault(__w_pdfjs_require__(2));var _util=__w_pdfjs_require__(5);var _cmap=__w_pdfjs_require__(173);var _primitives=__w_pdfjs_require__(151);var _fonts=__w_pdfjs_require__(174);var _encodings=__w_pdfjs_require__(177);var _unicode=__w_pdfjs_require__(180);var _standard_fonts=__w_pdfjs_require__(179);var _pattern=__w_pdfjs_require__(183);var _parser=__w_pdfjs_require__(157);var _bidi=__w_pdfjs_require__(184);var _colorspace=__w_pdfjs_require__(169);var _stream=__w_pdfjs_require__(158);var _glyphlist=__w_pdfjs_require__(178);var _core_utils=__w_pdfjs_require__(154);var _metrics=__w_pdfjs_require__(185);var _function=__w_pdfjs_require__(186);var _jpeg_stream=__w_pdfjs_require__(164);var _murmurhash=__w_pdfjs_require__(188);var _image_utils=__w_pdfjs_require__(189);var _operator_list=__w_pdfjs_require__(171);var _image=__w_pdfjs_require__(190);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 PartialEvaluator=function PartialEvaluatorClosure(){var DefaultPartialEvaluatorOptions={forceDataSchema:false,maxImageSize:-1,disableFontFace:false,nativeImageDecoderSupport:_util.NativeImageDecoding.DECODE,ignoreErrors:false,isEvalSupported:true};function PartialEvaluator(_ref){var _this=this;var xref=_ref.xref,handler=_ref.handler,pageIndex=_ref.pageIndex,idFactory=_ref.idFactory,fontCache=_ref.fontCache,builtInCMapCache=_ref.builtInCMapCache,_ref$options=_ref.options,options=_ref$options===void 0?null:_ref$options,pdfFunctionFactory=_ref.pdfFunctionFactory;this.xref=xref;this.handler=handler;this.pageIndex=pageIndex;this.idFactory=idFactory;this.fontCache=fontCache;this.builtInCMapCache=builtInCMapCache;this.options=options||DefaultPartialEvaluatorOptions;this.pdfFunctionFactory=pdfFunctionFactory;this.parsingType3Font=false;this.fetchBuiltInCMap=function(){var _ref2=_asyncToGenerator(_regenerator["default"].mark(function _callee(name){var data;return _regenerator["default"].wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:if(!_this.builtInCMapCache.has(name)){_context.next=2;break}return _context.abrupt("return",_this.builtInCMapCache.get(name));case 2:_context.next=4;return _this.handler.sendWithPromise('FetchBuiltInCMap',{name:name});case 4:data=_context.sent;if(data.compressionType!==_util.CMapCompressionType.NONE){_this.builtInCMapCache.set(name,data)}return _context.abrupt("return",data);case 7:case"end":return _context.stop()}}},_callee)}));return function(_x){return _ref2.apply(this,arguments)}}()}var TIME_SLOT_DURATION_MS=20;var CHECK_TIME_EVERY=100;function TimeSlotManager(){this.reset()}TimeSlotManager.prototype={check:function TimeSlotManager_check(){if(++this.checked0&&arguments[0]!==undefined?arguments[0]:DefaultPartialEvaluatorOptions;var newEvaluator=Object.create(this);newEvaluator.options=newOptions;return newEvaluator},hasBlendModes:function PartialEvaluator_hasBlendModes(resources){if(!(0,_primitives.isDict)(resources)){return false}var processed=Object.create(null);if(resources.objId){processed[resources.objId]=true}var nodes=[resources],xref=this.xref;while(nodes.length){var key,i,ii;var node=nodes.shift();var graphicStates=node.get('ExtGState');if((0,_primitives.isDict)(graphicStates)){var graphicStatesKeys=graphicStates.getKeys();for(i=0,ii=graphicStatesKeys.length;imaxImageSize)){_context2.next=11;break}(0,_util.warn)('Image exceeded maximum allowed size and was removed.');return _context2.abrupt("return",undefined);case 11:imageMask=dict.get('ImageMask','IM')||false;if(!imageMask){_context2.next=24;break}width=dict.get('Width','W');height=dict.get('Height','H');bitStrideLength=width+7>>3;imgArray=image.getBytes(bitStrideLength*height,true);decode=dict.getArray('Decode','D');imgData=_image.PDFImage.createMask({imgArray:imgArray,width:width,height:height,imageIsFromDecodeStream:image instanceof _stream.DecodeStream,inverseDecode:!!decode&&decode[0]>0});imgData.cached=!!cacheKey;args=[imgData];operatorList.addOp(_util.OPS.paintImageMaskXObject,args);if(cacheKey){imageCache[cacheKey]={fn:_util.OPS.paintImageMaskXObject,args:args}}return _context2.abrupt("return",undefined);case 24:softMask=dict.get('SMask','SM')||false;mask=dict.get('Mask')||false;SMALL_IMAGE_DIMENSIONS=200;if(!(isInline&&!softMask&&!mask&&!(image instanceof _jpeg_stream.JpegStream)&&w+h0){operatorList.addOp(_util.OPS.setGState,[gStateObj])}})},loadFont:function PartialEvaluator_loadFont(fontName,font,resources){var _this6=this;function errorFont(){return Promise.resolve(new TranslatedFont('g_font_error',new _fonts.ErrorFont('Font '+fontName+' is not available'),font))}var fontRef,xref=this.xref;if(font){if(!(0,_primitives.isRef)(font)){throw new Error('The "font" object should be a reference.');}fontRef=font}else{var fontRes=resources.get('Font');if(fontRes){fontRef=fontRes.getRaw(fontName)}else{(0,_util.warn)('fontRes not available');return errorFont()}}if(!fontRef){(0,_util.warn)('fontRef not available');return errorFont()}if(this.fontCache.has(fontRef)){return this.fontCache.get(fontRef)}font=xref.fetchIfRef(fontRef);if(!(0,_primitives.isDict)(font)){return errorFont()}if(font.translated){return font.translated}var fontCapability=(0,_util.createPromiseCapability)();var preEvaluatedFont=this.preEvaluateFont(font);var descriptor=preEvaluatedFont.descriptor,hash=preEvaluatedFont.hash;var fontRefIsRef=(0,_primitives.isRef)(fontRef),fontID;if(fontRefIsRef){fontID=fontRef.toString()}if(hash&&(0,_primitives.isDict)(descriptor)){if(!descriptor.fontAliases){descriptor.fontAliases=Object.create(null)}var fontAliases=descriptor.fontAliases;if(fontAliases[hash]){var aliasFontRef=fontAliases[hash].aliasRef;if(fontRefIsRef&&aliasFontRef&&this.fontCache.has(aliasFontRef)){this.fontCache.putAlias(fontRef,aliasFontRef);return this.fontCache.get(fontRef)}}else{fontAliases[hash]={fontID:_fonts.Font.getFontID()}}if(fontRefIsRef){fontAliases[hash].aliasRef=fontRef}fontID=fontAliases[hash].fontID}if(fontRefIsRef){this.fontCache.put(fontRef,fontCapability.promise)}else{if(!fontID){fontID=this.idFactory.createObjId()}this.fontCache.put("id_".concat(fontID),fontCapability.promise)}(0,_util.assert)(fontID,'The "fontID" must be defined.');font.loadedName="".concat(this.idFactory.getDocId(),"_f").concat(fontID);font.translated=fontCapability.promise;var translatedPromise;try{translatedPromise=this.translateFont(preEvaluatedFont)}catch(e){translatedPromise=Promise.reject(e)}translatedPromise.then(function(translatedFont){if(translatedFont.fontType!==undefined){var xrefFontStats=xref.stats.fontTypes;xrefFontStats[translatedFont.fontType]=true}fontCapability.resolve(new TranslatedFont(font.loadedName,translatedFont,font))})["catch"](function(reason){_this6.handler.send('UnsupportedFeature',{featureId:_util.UNSUPPORTED_FEATURES.font});try{var fontFile3=descriptor&&descriptor.get('FontFile3');var subtype=fontFile3&&fontFile3.get('Subtype');var fontType=(0,_fonts.getFontType)(preEvaluatedFont.type,subtype&&subtype.name);var xrefFontStats=xref.stats.fontTypes;xrefFontStats[fontType]=true}catch(ex){}fontCapability.resolve(new TranslatedFont(font.loadedName,new _fonts.ErrorFont(reason instanceof Error?reason.message:reason),font))});return fontCapability.promise},buildPath:function buildPath(operatorList,fn,args){var parsingText=arguments.length>3&&arguments[3]!==undefined?arguments[3]:false;var lastIndex=operatorList.length-1;if(!args){args=[]}if(lastIndex<0||operatorList.fnArray[lastIndex]!==_util.OPS.constructPath){if(parsingText){(0,_util.warn)("Encountered path operator \"".concat(fn,"\" inside of a text object."));operatorList.addOp(_util.OPS.save,null)}operatorList.addOp(_util.OPS.constructPath,[[fn],args]);if(parsingText){operatorList.addOp(_util.OPS.restore,null)}}else{var opArgs=operatorList.argsArray[lastIndex];opArgs[0].push(fn);Array.prototype.push.apply(opArgs[1],args)}},handleColorN:function(){var _handleColorN=_asyncToGenerator(_regenerator["default"].mark(function _callee3(operatorList,fn,args,cs,patterns,resources,task){var patternName,pattern,dict,typeNum,color,shading,matrix;return _regenerator["default"].wrap(function _callee3$(_context3){while(1){switch(_context3.prev=_context3.next){case 0:patternName=args[args.length-1];if(!((0,_primitives.isName)(patternName)&&(pattern=patterns.get(patternName.name)))){_context3.next=16;break}dict=(0,_primitives.isStream)(pattern)?pattern.dict:pattern;typeNum=dict.get('PatternType');if(!(typeNum===TILING_PATTERN)){_context3.next=9;break}color=cs.base?cs.base.getRgb(args,0):null;return _context3.abrupt("return",this.handleTilingType(fn,color,resources,pattern,dict,operatorList,task));case 9:if(!(typeNum===SHADING_PATTERN)){_context3.next=15;break}shading=dict.get('Shading');matrix=dict.getArray('Matrix');pattern=_pattern.Pattern.parseShading(shading,matrix,this.xref,resources,this.handler,this.pdfFunctionFactory);operatorList.addOp(fn,pattern.getIR());return _context3.abrupt("return",undefined);case 15:throw new _util.FormatError("Unknown PatternType: ".concat(typeNum));case 16:throw new _util.FormatError("Unknown PatternName: ".concat(patternName));case 17:case"end":return _context3.stop()}}},_callee3,this)}));function handleColorN(_x3,_x4,_x5,_x6,_x7,_x8,_x9){return _handleColorN.apply(this,arguments)}return handleColorN}(),getOperatorList:function getOperatorList(_ref4){var _this7=this;var stream=_ref4.stream,task=_ref4.task,resources=_ref4.resources,operatorList=_ref4.operatorList,_ref4$initialState=_ref4.initialState,initialState=_ref4$initialState===void 0?null:_ref4$initialState;resources=resources||_primitives.Dict.empty;initialState=initialState||new EvalState();if(!operatorList){throw new Error('getOperatorList: missing "operatorList" parameter');}var self=this;var xref=this.xref;var parsingText=false;var imageCache=Object.create(null);var xobjs=resources.get('XObject')||_primitives.Dict.empty;var patterns=resources.get('Pattern')||_primitives.Dict.empty;var stateManager=new StateManager(initialState);var preprocessor=new EvaluatorPreprocessor(stream,xref,stateManager);var timeSlotManager=new TimeSlotManager();function closePendingRestoreOPS(argument){for(var i=0,ii=preprocessor.savedStatesDepth;i0){tsm[3]*=glyphHeight*textState.fontMatrix[3]}}var trm=_util.Util.transform(textState.ctm,_util.Util.transform(textState.textMatrix,tsm));textContentItem.transform=trm;if(!font.vertical){textContentItem.width=0;textContentItem.height=Math.sqrt(trm[2]*trm[2]+trm[3]*trm[3]);textContentItem.vertical=false}else{textContentItem.width=Math.sqrt(trm[0]*trm[0]+trm[1]*trm[1]);textContentItem.height=0;textContentItem.vertical=true}var a=textState.textLineMatrix[0];var b=textState.textLineMatrix[1];var scaleLineX=Math.sqrt(a*a+b*b);a=textState.ctm[0];b=textState.ctm[1];var scaleCtmX=Math.sqrt(a*a+b*b);textContentItem.textAdvanceScale=scaleCtmX*scaleLineX;textContentItem.lastAdvanceWidth=0;textContentItem.lastAdvanceHeight=0;var spaceWidth=font.spaceWidth/1000*textState.fontSize;if(spaceWidth){textContentItem.spaceWidth=spaceWidth;textContentItem.fakeSpaceMin=spaceWidth*SPACE_FACTOR;textContentItem.fakeMultiSpaceMin=spaceWidth*MULTI_SPACE_FACTOR;textContentItem.fakeMultiSpaceMax=spaceWidth*MULTI_SPACE_FACTOR_MAX;textContentItem.textRunBreakAllowed=!font.isMonospace}else{textContentItem.spaceWidth=0;textContentItem.fakeSpaceMin=Infinity;textContentItem.fakeMultiSpaceMin=Infinity;textContentItem.fakeMultiSpaceMax=0;textContentItem.textRunBreakAllowed=false}textContentItem.initialized=true;return textContentItem}function replaceWhitespace(str){var i=0,ii=str.length,code;while(i=0x20&&code<=0x7F){i++}return i0){addFakeSpaces(wordSpacing,textChunk.str)}}var tx=0;var ty=0;if(!font.vertical){var w0=glyphWidth*textState.fontMatrix[0];tx=(w0*textState.fontSize+charSpacing)*textState.textHScale;width+=tx}else{var w1=glyphWidth*textState.fontMatrix[0];ty=w1*textState.fontSize+charSpacing;height+=ty}textState.translateTextMatrix(tx,ty);textChunk.str.push(glyphUnicode)}if(!font.vertical){textChunk.lastAdvanceWidth=width;textChunk.width+=width}else{textChunk.lastAdvanceHeight=height;textChunk.height+=Math.abs(height)}return textChunk}function addFakeSpaces(width,strBuf){if(width0){strBuf.push(' ')}}function flushTextContentItem(){if(!textContentItem.initialized){return}if(!textContentItem.vertical){textContentItem.width*=textContentItem.textAdvanceScale}else{textContentItem.height*=textContentItem.textAdvanceScale}textContent.items.push(runBidiTransform(textContentItem));textContentItem.initialized=false;textContentItem.str.length=0}function enqueueChunk(){var length=textContent.items.length;if(length>0){sink.enqueue(textContent,length);textContent.items=[];textContent.styles=Object.create(null)}}var timeSlotManager=new TimeSlotManager();return new Promise(function promiseBody(resolve,reject){var next=function next(promise){enqueueChunk();Promise.all([promise,sink.ready]).then(function(){try{promiseBody(resolve,reject)}catch(ex){reject(ex)}},reject)};task.ensureNotTerminated();timeSlotManager.reset();var stop,operation={},args=[];while(!(stop=timeSlotManager.check())){args.length=0;operation.args=args;if(!preprocessor.read(operation)){break}textState=stateManager.state;var fn=operation.fn;args=operation.args;var advance,diff;switch(fn|0){case _util.OPS.setFont:var fontNameArg=args[0].name,fontSizeArg=args[1];if(textState.font&&fontNameArg===textState.fontName&&fontSizeArg===textState.fontSize){break}flushTextContentItem();textState.fontName=fontNameArg;textState.fontSize=fontSizeArg;next(handleSetFont(fontNameArg,null));return;case _util.OPS.setTextRise:flushTextContentItem();textState.textRise=args[0];break;case _util.OPS.setHScale:flushTextContentItem();textState.textHScale=args[0]/100;break;case _util.OPS.setLeading:flushTextContentItem();textState.leading=args[0];break;case _util.OPS.moveText:var isSameTextLine=!textState.font?false:(textState.font.vertical?args[0]:args[1])===0;advance=args[0]-args[1];if(combineTextItems&&isSameTextLine&&textContentItem.initialized&&advance>0&&advance<=textContentItem.fakeMultiSpaceMax){textState.translateTextLineMatrix(args[0],args[1]);textContentItem.width+=args[0]-textContentItem.lastAdvanceWidth;textContentItem.height+=args[1]-textContentItem.lastAdvanceHeight;diff=args[0]-textContentItem.lastAdvanceWidth-(args[1]-textContentItem.lastAdvanceHeight);addFakeSpaces(diff,textContentItem.str);break}flushTextContentItem();textState.translateTextLineMatrix(args[0],args[1]);textState.textMatrix=textState.textLineMatrix.slice();break;case _util.OPS.setLeadingMoveText:flushTextContentItem();textState.leading=-args[1];textState.translateTextLineMatrix(args[0],args[1]);textState.textMatrix=textState.textLineMatrix.slice();break;case _util.OPS.nextLine:flushTextContentItem();textState.carriageReturn();break;case _util.OPS.setTextMatrix:advance=textState.calcTextLineMatrixAdvance(args[0],args[1],args[2],args[3],args[4],args[5]);if(combineTextItems&&advance!==null&&textContentItem.initialized&&advance.value>0&&advance.value<=textContentItem.fakeMultiSpaceMax){textState.translateTextLineMatrix(advance.width,advance.height);textContentItem.width+=advance.width-textContentItem.lastAdvanceWidth;textContentItem.height+=advance.height-textContentItem.lastAdvanceHeight;diff=advance.width-textContentItem.lastAdvanceWidth-(advance.height-textContentItem.lastAdvanceHeight);addFakeSpaces(diff,textContentItem.str);break}flushTextContentItem();textState.setTextMatrix(args[0],args[1],args[2],args[3],args[4],args[5]);textState.setTextLineMatrix(args[0],args[1],args[2],args[3],args[4],args[5]);break;case _util.OPS.setCharSpacing:textState.charSpacing=args[0];break;case _util.OPS.setWordSpacing:textState.wordSpacing=args[0];break;case _util.OPS.beginText:flushTextContentItem();textState.textMatrix=_util.IDENTITY_MATRIX.slice();textState.textLineMatrix=_util.IDENTITY_MATRIX.slice();break;case _util.OPS.showSpacedText:var items=args[0];var offset;for(var j=0,jj=items.length;jtextContentItem.fakeMultiSpaceMax;if(!breakTextRun){textContentItem.height+=offset}}else{advance=-advance;offset=advance*textState.textHScale;textState.translateTextMatrix(offset,0);breakTextRun=textContentItem.textRunBreakAllowed&&advance>textContentItem.fakeMultiSpaceMax;if(!breakTextRun){textContentItem.width+=offset}}if(breakTextRun){flushTextContentItem()}else if(advance>0){addFakeSpaces(advance,textContentItem.str)}}}break;case _util.OPS.showText:buildTextContentItem(args[0]);break;case _util.OPS.nextLineShowText:flushTextContentItem();textState.carriageReturn();buildTextContentItem(args[0]);break;case _util.OPS.nextLineSetSpacingShowText:flushTextContentItem();textState.wordSpacing=args[0];textState.charSpacing=args[1];textState.carriageReturn();buildTextContentItem(args[2]);break;case _util.OPS.paintXObject:flushTextContentItem();if(!xobjs){xobjs=resources.get('XObject')||_primitives.Dict.empty}var name=args[0].name;if(name&&skipEmptyXObjs[name]!==undefined){break}next(new Promise(function(resolveXObject,rejectXObject){if(!name){throw new _util.FormatError('XObject must be referred to by name.');}var xobj=xobjs.get(name);if(!xobj){resolveXObject();return}if(!(0,_primitives.isStream)(xobj)){throw new _util.FormatError('XObject should be a stream');}var type=xobj.dict.get('Subtype');if(!(0,_primitives.isName)(type)){throw new _util.FormatError('XObject should have a Name subtype');}if(type.name!=='Form'){skipEmptyXObjs[name]=true;resolveXObject();return}var currentState=stateManager.state.clone();var xObjStateManager=new StateManager(currentState);var matrix=xobj.dict.getArray('Matrix');if(Array.isArray(matrix)&&matrix.length===6){xObjStateManager.transform(matrix)}enqueueChunk();var sinkWrapper={enqueueInvoked:false,enqueue:function enqueue(chunk,size){this.enqueueInvoked=true;sink.enqueue(chunk,size)},get desiredSize(){return sink.desiredSize},get ready(){return sink.ready}};self.getTextContent({stream:xobj,task:task,resources:xobj.dict.get('Resources')||resources,stateManager:xObjStateManager,normalizeWhitespace:normalizeWhitespace,combineTextItems:combineTextItems,sink:sinkWrapper,seenStyles:seenStyles}).then(function(){if(!sinkWrapper.enqueueInvoked){skipEmptyXObjs[name]=true}resolveXObject()},rejectXObject)})["catch"](function(reason){if(reason instanceof _util.AbortException){return}if(self.options.ignoreErrors){(0,_util.warn)("getTextContent - ignoring XObject: \"".concat(reason,"\"."));return}throw reason;}));return;case _util.OPS.setGState:flushTextContentItem();var dictName=args[0];var extGState=resources.get('ExtGState');if(!(0,_primitives.isDict)(extGState)||!(0,_primitives.isName)(dictName)){break}var gState=extGState.get(dictName.name);if(!(0,_primitives.isDict)(gState)){break}var gStateFont=gState.get('Font');if(gStateFont){textState.fontName=null;textState.fontSize=gStateFont[1];next(handleSetFont(null,gStateFont[0]));return}break}if(textContent.items.length>=sink.desiredSize){stop=true;break}}if(stop){next(deferred);return}flushTextContentItem();enqueueChunk();resolve()})["catch"](function(reason){if(reason instanceof _util.AbortException){return}if(_this8.options.ignoreErrors){(0,_util.warn)("getTextContent - ignoring errors during \"".concat(task.name,"\" ")+"task: \"".concat(reason,"\"."));flushTextContentItem();enqueueChunk();return}throw reason;})},extractDataStructures:function PartialEvaluator_extractDataStructures(dict,baseDict,properties){var _this9=this;var xref=this.xref,cidToGidBytes;var toUnicode=dict.get('ToUnicode')||baseDict.get('ToUnicode');var toUnicodePromise=toUnicode?this.readToUnicode(toUnicode):Promise.resolve(undefined);if(properties.composite){var cidSystemInfo=dict.get('CIDSystemInfo');if((0,_primitives.isDict)(cidSystemInfo)){properties.cidSystemInfo={registry:(0,_util.stringToPDFString)(cidSystemInfo.get('Registry')),ordering:(0,_util.stringToPDFString)(cidSystemInfo.get('Ordering')),supplement:cidSystemInfo.get('Supplement')}}var cidToGidMap=dict.get('CIDToGIDMap');if((0,_primitives.isStream)(cidToGidMap)){cidToGidBytes=cidToGidMap.getBytes()}}var differences=[];var baseEncodingName=null;var encoding;if(dict.has('Encoding')){encoding=dict.get('Encoding');if((0,_primitives.isDict)(encoding)){baseEncodingName=encoding.get('BaseEncoding');baseEncodingName=(0,_primitives.isName)(baseEncodingName)?baseEncodingName.name:null;if(encoding.has('Differences')){var diffEncoding=encoding.get('Differences');var index=0;for(var j=0,jj=diffEncoding.length;j0;properties.dict=dict;return toUnicodePromise.then(function(toUnicode){properties.toUnicode=toUnicode;return _this9.buildToUnicode(properties)}).then(function(toUnicode){properties.toUnicode=toUnicode;if(cidToGidBytes){properties.cidToGidMap=_this9.readCidToGidMap(cidToGidBytes,toUnicode)}return properties})},_buildSimpleFontToUnicode:function _buildSimpleFontToUnicode(properties){(0,_util.assert)(!properties.composite,'Must be a simple font.');var toUnicode=[],charcode,glyphName;var encoding=properties.defaultEncoding.slice();var baseEncodingName=properties.baseEncodingName;var differences=properties.differences;for(charcode in differences){glyphName=differences[charcode];if(glyphName==='.notdef'){continue}encoding[charcode]=glyphName}var glyphsUnicodeMap=(0,_glyphlist.getGlyphsUnicode)();for(charcode in encoding){glyphName=encoding[charcode];if(glyphName===''){continue}else if(glyphsUnicodeMap[glyphName]===undefined){var code=0;switch(glyphName[0]){case'G':if(glyphName.length===3){code=parseInt(glyphName.substring(1),16)}break;case'g':if(glyphName.length===5){code=parseInt(glyphName.substring(1),16)}break;case'C':case'c':if(glyphName.length>=3){code=+glyphName.substring(1)}break;default:var unicode=(0,_unicode.getUnicodeForGlyph)(glyphName,glyphsUnicodeMap);if(unicode!==-1){code=unicode}}if(code){if(baseEncodingName&&code===+charcode){var baseEncoding=(0,_encodings.getEncoding)(baseEncodingName);if(baseEncoding&&(glyphName=baseEncoding[charcode])){toUnicode[charcode]=String.fromCharCode(glyphsUnicodeMap[glyphName]);continue}}toUnicode[charcode]=String.fromCodePoint(code)}continue}toUnicode[charcode]=String.fromCharCode(glyphsUnicodeMap[glyphName])}return new _fonts.ToUnicodeMap(toUnicode)},buildToUnicode:function buildToUnicode(properties){properties.hasIncludedToUnicodeMap=!!properties.toUnicode&&properties.toUnicode.length>0;if(properties.hasIncludedToUnicodeMap){if(!properties.composite&&properties.hasEncoding){properties.fallbackToUnicode=this._buildSimpleFontToUnicode(properties)}return Promise.resolve(properties.toUnicode)}if(!properties.composite){return Promise.resolve(this._buildSimpleFontToUnicode(properties))}if(properties.composite&&(properties.cMap.builtInCMap&&!(properties.cMap instanceof _cmap.IdentityCMap)||properties.cidSystemInfo.registry==='Adobe'&&(properties.cidSystemInfo.ordering==='GB1'||properties.cidSystemInfo.ordering==='CNS1'||properties.cidSystemInfo.ordering==='Japan1'||properties.cidSystemInfo.ordering==='Korea1'))){var registry=properties.cidSystemInfo.registry;var ordering=properties.cidSystemInfo.ordering;var ucs2CMapName=_primitives.Name.get(registry+'-'+ordering+'-UCS2');return _cmap.CMapFactory.create({encoding:ucs2CMapName,fetchBuiltInCMap:this.fetchBuiltInCMap,useCMap:null}).then(function(ucs2CMap){var cMap=properties.cMap;var toUnicode=[];cMap.forEach(function(charcode,cid){if(cid>0xffff){throw new _util.FormatError('Max size of CID is 65,535');}var ucs2=ucs2CMap.lookup(cid);if(ucs2){toUnicode[charcode]=String.fromCharCode((ucs2.charCodeAt(0)<<8)+ucs2.charCodeAt(1))}});return new _fonts.ToUnicodeMap(toUnicode)})}return Promise.resolve(new _fonts.IdentityToUnicodeMap(properties.firstChar,properties.lastChar))},readToUnicode:function PartialEvaluator_readToUnicode(toUnicode){var cmapObj=toUnicode;if((0,_primitives.isName)(cmapObj)){return _cmap.CMapFactory.create({encoding:cmapObj,fetchBuiltInCMap:this.fetchBuiltInCMap,useCMap:null}).then(function(cmap){if(cmap instanceof _cmap.IdentityCMap){return new _fonts.IdentityToUnicodeMap(0,0xFFFF)}return new _fonts.ToUnicodeMap(cmap.getMap())})}else if((0,_primitives.isStream)(cmapObj)){return _cmap.CMapFactory.create({encoding:cmapObj,fetchBuiltInCMap:this.fetchBuiltInCMap,useCMap:null}).then(function(cmap){if(cmap instanceof _cmap.IdentityCMap){return new _fonts.IdentityToUnicodeMap(0,0xFFFF)}var map=new Array(cmap.length);cmap.forEach(function(charCode,token){var str=[];for(var k=0;k>1;if(glyphID===0&&!toUnicode.has(code)){continue}result[code]=glyphID}return result},extractWidths:function PartialEvaluator_extractWidths(dict,descriptor,properties){var xref=this.xref;var glyphsWidths=[];var defaultWidth=0;var glyphsVMetrics=[];var defaultVMetrics;var i,ii,j,jj,start,code,widths;if(properties.composite){defaultWidth=dict.has('DW')?dict.get('DW'):1000;widths=dict.get('W');if(widths){for(i=0,ii=widths.length;inumArgs){nonProcessedArgs.push(args.shift());argsLength--}while(argsLength=_util.OPS.moveTo&&fn<=_util.OPS.endPath&&++this._numInvalidPathOPS>MAX_INVALID_PATH_OPS){throw new _util.FormatError("Invalid ".concat(partialMsg));}(0,_util.warn)("Skipping ".concat(partialMsg));if(args!==null){args.length=0}continue}}else if(argsLength>numArgs){(0,_util.info)("Command ".concat(cmd,": expected [0, ").concat(numArgs,"] args, ")+"but received ".concat(argsLength," args."))}this.preprocessCommand(fn,args);operation.fn=fn;operation.args=args;return true}if((0,_primitives.isEOF)(obj)){return false}if(obj!==null){if(args===null){args=[]}args.push(obj);if(args.length>33){throw new _util.FormatError('Too many arguments');}}}},preprocessCommand:function EvaluatorPreprocessor_preprocessCommand(fn,args){switch(fn|0){case _util.OPS.save:this.stateManager.save();break;case _util.OPS.restore:this.stateManager.restore();break;case _util.OPS.transform:this.stateManager.transform(args);break}}};return EvaluatorPreprocessor}()}),(function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.CMapFactory=exports.IdentityCMap=exports.CMap=void 0;var _util=__w_pdfjs_require__(5);var _primitives=__w_pdfjs_require__(151);var _parser=__w_pdfjs_require__(157);var _core_utils=__w_pdfjs_require__(154);var _stream=__w_pdfjs_require__(158);function _typeof(obj){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 _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 _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}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 _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;i0&&arguments[0]!==undefined?arguments[0]:false;_classCallCheck(this,CMap);this.codespaceRanges=[[],[],[],[]];this.numCodespaceRanges=0;this._map=[];this.name='';this.vertical=false;this.useCMap=null;this.builtInCMap=builtInCMap}_createClass(CMap,[{key:"addCodespaceRange",value:function addCodespaceRange(n,low,high){this.codespaceRanges[n-1].push(low,high);this.numCodespaceRanges++}},{key:"mapCidRange",value:function mapCidRange(low,high,dstLow){while(low<=high){this._map[low++]=dstLow++}}},{key:"mapBfRange",value:function mapBfRange(low,high,dstLow){var lastByte=dstLow.length-1;while(low<=high){this._map[low++]=dstLow;dstLow=dstLow.substring(0,lastByte)+String.fromCharCode(dstLow.charCodeAt(lastByte)+1)}}},{key:"mapBfRangeToArray",value:function mapBfRangeToArray(low,high,array){var i=0,ii=array.length;while(low<=high&&i>>0;var codespaceRange=codespaceRanges[n];for(var k=0,kk=codespaceRange.length;k=low&&c<=high){out.charcode=c;out.length=n+1;return}}}out.charcode=0;out.length=1}},{key:"length",get:function get(){return this._map.length}},{key:"isIdentityCMap",get:function get(){if(!(this.name==='Identity-H'||this.name==='Identity-V')){return false}if(this._map.length!==0x10000){return false}for(var i=0;i<0x10000;i++){if(this._map[i]!==i){return false}}return true}}]);return CMap}();exports.CMap=CMap;var IdentityCMap=function(_CMap){_inherits(IdentityCMap,_CMap);function IdentityCMap(vertical,n){var _this;_classCallCheck(this,IdentityCMap);_this=_possibleConstructorReturn(this,_getPrototypeOf(IdentityCMap).call(this));_this.vertical=vertical;_this.addCodespaceRange(n,0,0xffff);return _this}_createClass(IdentityCMap,[{key:"mapCidRange",value:function mapCidRange(low,high,dstLow){(0,_util.unreachable)('should not call mapCidRange')}},{key:"mapBfRange",value:function mapBfRange(low,high,dstLow){(0,_util.unreachable)('should not call mapBfRange')}},{key:"mapBfRangeToArray",value:function mapBfRangeToArray(low,high,array){(0,_util.unreachable)('should not call mapBfRangeToArray')}},{key:"mapOne",value:function mapOne(src,dst){(0,_util.unreachable)('should not call mapCidOne')}},{key:"lookup",value:function lookup(code){return Number.isInteger(code)&&code<=0xffff?code:undefined}},{key:"contains",value:function contains(code){return Number.isInteger(code)&&code<=0xffff}},{key:"forEach",value:function forEach(callback){for(var i=0;i<=0xffff;i++){callback(i,i)}}},{key:"charCodeOf",value:function charCodeOf(value){return Number.isInteger(value)&&value<=0xffff?value:-1}},{key:"getMap",value:function getMap(){var map=new Array(0x10000);for(var i=0;i<=0xffff;i++){map[i]=i}return map}},{key:"length",get:function get(){return 0x10000}},{key:"isIdentityCMap",get:function get(){(0,_util.unreachable)('should not access .isIdentityCMap')}}]);return IdentityCMap}(CMap);exports.IdentityCMap=IdentityCMap;var BinaryCMapReader=function BinaryCMapReaderClosure(){function hexToInt(a,size){var n=0;for(var i=0;i<=size;i++){n=n<<8|a[i]}return n>>>0}function hexToStr(a,size){if(size===1){return String.fromCharCode(a[0],a[1])}if(size===3){return String.fromCharCode(a[0],a[1],a[2],a[3])}return String.fromCharCode.apply(null,a.subarray(0,size+1))}function addHex(a,b,size){var c=0;for(var i=size;i>=0;i--){c+=a[i]+b[i];a[i]=c&255;c>>=8}}function incHex(a,size){var c=1;for(var i=size;i>=0&&c>0;i--){c+=a[i];a[i]=c&255;c>>=8}}var MAX_NUM_SIZE=16;var MAX_ENCODED_NUM_SIZE=19;function BinaryCMapStream(data){this.buffer=data;this.pos=0;this.end=data.length;this.tmpBuf=new Uint8Array(MAX_ENCODED_NUM_SIZE)}BinaryCMapStream.prototype={readByte:function readByte(){if(this.pos>=this.end){return-1}return this.buffer[this.pos++]},readNumber:function readNumber(){var n=0;var last;do{var b=this.readByte();if(b<0){throw new _util.FormatError('unexpected EOF in bcmap');}last=!(b&0x80);n=n<<7|b&0x7F}while(!last);return n},readSigned:function readSigned(){var n=this.readNumber();return n&1?~(n>>>1):n>>>1},readHex:function readHex(num,size){num.set(this.buffer.subarray(this.pos,this.pos+size+1));this.pos+=size+1},readHexNumber:function readHexNumber(num,size){var last;var stack=this.tmpBuf,sp=0;do{var b=this.readByte();if(b<0){throw new _util.FormatError('unexpected EOF in bcmap');}last=!(b&0x80);stack[sp++]=b&0x7F}while(!last);var i=size,buffer=0,bufferSize=0;while(i>=0){while(bufferSize<8&&stack.length>0){buffer=stack[--sp]<>=8;bufferSize-=8}},readHexSigned:function readHexSigned(num,size){this.readHexNumber(num,size);var sign=num[size]&1?255:0;var c=0;for(var i=0;i<=size;i++){c=(c&1)<<8|num[i];num[i]=c>>1^sign}},readString:function readString(){var len=this.readNumber();var s='';for(var i=0;i=0){var type=b>>5;if(type===7){switch(b&0x1F){case 0:stream.readString();break;case 1:useCMap=stream.readString();break}continue}var sequence=!!(b&0x10);var dataSize=b&15;if(dataSize+1>MAX_NUM_SIZE){throw new Error('processBinaryCMap: Invalid dataSize.');}var ucs2DataSize=1;var subitemsCount=stream.readNumber();var i;switch(type){case 0:stream.readHex(start,dataSize);stream.readHexNumber(end,dataSize);addHex(end,start,dataSize);cMap.addCodespaceRange(dataSize+1,hexToInt(start,dataSize),hexToInt(end,dataSize));for(i=1;i>>0}function expectString(obj){if(!(0,_util.isString)(obj)){throw new _util.FormatError('Malformed CMap: expected string.');}}function expectInt(obj){if(!Number.isInteger(obj)){throw new _util.FormatError('Malformed CMap: expected int.');}}function parseBfChar(cMap,lexer){while(true){var obj=lexer.getObj();if((0,_primitives.isEOF)(obj)){break}if((0,_primitives.isCmd)(obj,'endbfchar')){return}expectString(obj);var src=strToInt(obj);obj=lexer.getObj();expectString(obj);var dst=obj;cMap.mapOne(src,dst)}}function parseBfRange(cMap,lexer){while(true){var obj=lexer.getObj();if((0,_primitives.isEOF)(obj)){break}if((0,_primitives.isCmd)(obj,'endbfrange')){return}expectString(obj);var low=strToInt(obj);obj=lexer.getObj();expectString(obj);var high=strToInt(obj);obj=lexer.getObj();if(Number.isInteger(obj)||(0,_util.isString)(obj)){var dstLow=Number.isInteger(obj)?String.fromCharCode(obj):obj;cMap.mapBfRange(low,high,dstLow)}else if((0,_primitives.isCmd)(obj,'[')){obj=lexer.getObj();var array=[];while(!(0,_primitives.isCmd)(obj,']')&&!(0,_primitives.isEOF)(obj)){array.push(obj);obj=lexer.getObj()}cMap.mapBfRangeToArray(low,high,array)}else{break}}throw new _util.FormatError('Invalid bf range.');}function parseCidChar(cMap,lexer){while(true){var obj=lexer.getObj();if((0,_primitives.isEOF)(obj)){break}if((0,_primitives.isCmd)(obj,'endcidchar')){return}expectString(obj);var src=strToInt(obj);obj=lexer.getObj();expectInt(obj);var dst=obj;cMap.mapOne(src,dst)}}function parseCidRange(cMap,lexer){while(true){var obj=lexer.getObj();if((0,_primitives.isEOF)(obj)){break}if((0,_primitives.isCmd)(obj,'endcidrange')){return}expectString(obj);var low=strToInt(obj);obj=lexer.getObj();expectString(obj);var high=strToInt(obj);obj=lexer.getObj();expectInt(obj);var dstLow=obj;cMap.mapCidRange(low,high,dstLow)}}function parseCodespaceRange(cMap,lexer){while(true){var obj=lexer.getObj();if((0,_primitives.isEOF)(obj)){break}if((0,_primitives.isCmd)(obj,'endcodespacerange')){return}if(!(0,_util.isString)(obj)){break}var low=strToInt(obj);obj=lexer.getObj();if(!(0,_util.isString)(obj)){break}var high=strToInt(obj);cMap.addCodespaceRange(obj.length,low,high)}throw new _util.FormatError('Invalid codespace range.');}function parseWMode(cMap,lexer){var obj=lexer.getObj();if(Number.isInteger(obj)){cMap.vertical=!!obj}}function parseCMapName(cMap,lexer){var obj=lexer.getObj();if((0,_primitives.isName)(obj)&&(0,_util.isString)(obj.name)){cMap.name=obj.name}}function parseCMap(cMap,lexer,fetchBuiltInCMap,useCMap){var previous;var embeddedUseCMap;objLoop:while(true){try{var obj=lexer.getObj();if((0,_primitives.isEOF)(obj)){break}else if((0,_primitives.isName)(obj)){if(obj.name==='WMode'){parseWMode(cMap,lexer)}else if(obj.name==='CMapName'){parseCMapName(cMap,lexer)}previous=obj}else if((0,_primitives.isCmd)(obj)){switch(obj.cmd){case'endcmap':break objLoop;case'usecmap':if((0,_primitives.isName)(previous)){embeddedUseCMap=previous.name}break;case'begincodespacerange':parseCodespaceRange(cMap,lexer);break;case'beginbfchar':parseBfChar(cMap,lexer);break;case'begincidchar':parseCidChar(cMap,lexer);break;case'beginbfrange':parseBfRange(cMap,lexer);break;case'begincidrange':parseCidRange(cMap,lexer);break}}}catch(ex){if(ex instanceof _core_utils.MissingDataException){throw ex;}(0,_util.warn)('Invalid cMap data: '+ex);continue}}if(!useCMap&&embeddedUseCMap){useCMap=embeddedUseCMap}if(useCMap){return extendCMap(cMap,fetchBuiltInCMap,useCMap)}return Promise.resolve(cMap)}function extendCMap(cMap,fetchBuiltInCMap,useCMap){return createBuiltInCMap(useCMap,fetchBuiltInCMap).then(function(newCMap){cMap.useCMap=newCMap;if(cMap.numCodespaceRanges===0){var useCodespaceRanges=cMap.useCMap.codespaceRanges;for(var i=0;i0&&arguments[0]!==undefined?arguments[0]:[];this._map=cmap}ToUnicodeMap.prototype={get length(){return this._map.length},forEach:function forEach(callback){for(var charCode in this._map){callback(charCode,this._map[charCode].charCodeAt(0))}},has:function has(i){return this._map[i]!==undefined},get:function get(i){return this._map[i]},charCodeOf:function charCodeOf(value){var map=this._map;if(map.length<=0x10000){return map.indexOf(value)}for(var charCode in map){if(map[charCode]===value){return charCode|0}}return-1},amend:function amend(map){for(var charCode in map){this._map[charCode]=map[charCode]}}};return ToUnicodeMap}();exports.ToUnicodeMap=ToUnicodeMap;var IdentityToUnicodeMap=function IdentityToUnicodeMapClosure(){function IdentityToUnicodeMap(firstChar,lastChar){this.firstChar=firstChar;this.lastChar=lastChar}IdentityToUnicodeMap.prototype={get length(){return this.lastChar+1-this.firstChar},forEach:function forEach(callback){for(var i=this.firstChar,ii=this.lastChar;i<=ii;i++){callback(i,i)}},has:function has(i){return this.firstChar<=i&&i<=this.lastChar},get:function get(i){if(this.firstChar<=i&&i<=this.lastChar){return String.fromCharCode(i)}return undefined},charCodeOf:function charCodeOf(v){return Number.isInteger(v)&&v>=this.firstChar&&v<=this.lastChar?v:-1},amend:function amend(map){(0,_util.unreachable)('Should not call amend()')}};return IdentityToUnicodeMap}();exports.IdentityToUnicodeMap=IdentityToUnicodeMap;var OpenTypeFileBuilder=function OpenTypeFileBuilderClosure(){function writeInt16(dest,offset,num){dest[offset]=num>>8&0xFF;dest[offset+1]=num&0xFF}function writeInt32(dest,offset,num){dest[offset]=num>>24&0xFF;dest[offset+1]=num>>16&0xFF;dest[offset+2]=num>>8&0xFF;dest[offset+3]=num&0xFF}function writeData(dest,offset,data){var i,ii;if(data instanceof Uint8Array){dest.set(data,offset)}else if(typeof data==='string'){for(i=0,ii=data.length;imaxPower2){maxPower2<<=1;log2++}var searchRange=maxPower2*entrySize;return{range:searchRange,entry:log2,rangeShift:entrySize*entriesCount-searchRange}};var OTF_HEADER_SIZE=12;var OTF_TABLE_ENTRY_SIZE=16;OpenTypeFileBuilder.prototype={toArray:function OpenTypeFileBuilder_toArray(){var sfnt=this.sfnt;var tables=this.tables;var tablesNames=Object.keys(tables);tablesNames.sort();var numTables=tablesNames.length;var i,j,jj,table,tableName;var offset=OTF_HEADER_SIZE+numTables*OTF_TABLE_ENTRY_SIZE;var tableOffsets=[offset];for(i=0;i>>0;offset+=paddedLength;tableOffsets.push(offset)}var file=new Uint8Array(offset);for(i=0;i>>0}writeInt32(file,offset+4,checksum);writeInt32(file,offset+8,tableOffsets[i]);writeInt32(file,offset+12,tables[tableName].length);offset+=OTF_TABLE_ENTRY_SIZE}return file},addTable:function OpenTypeFileBuilder_addTable(tag,data){if(tag in this.tables){throw new Error('Table '+tag+' already exists');}this.tables[tag]=data}};return OpenTypeFileBuilder}();var Font=function FontClosure(){function Font(name,file,properties){var charCode;this.name=name;this.loadedName=properties.loadedName;this.isType3Font=properties.isType3Font;this.sizes=[];this.missingFile=false;this.glyphCache=Object.create(null);this.isSerifFont=!!(properties.flags&FontFlags.Serif);this.isSymbolicFont=!!(properties.flags&FontFlags.Symbolic);this.isMonospace=!!(properties.flags&FontFlags.FixedPitch);var type=properties.type;var subtype=properties.subtype;this.type=type;this.subtype=subtype;this.fallbackName=this.isMonospace?'monospace':this.isSerifFont?'serif':'sans-serif';this.differences=properties.differences;this.widths=properties.widths;this.defaultWidth=properties.defaultWidth;this.composite=properties.composite;this.wideChars=properties.wideChars;this.cMap=properties.cMap;this.ascent=properties.ascent/PDF_GLYPH_SPACE_UNITS;this.descent=properties.descent/PDF_GLYPH_SPACE_UNITS;this.fontMatrix=properties.fontMatrix;this.bbox=properties.bbox;this.defaultEncoding=properties.defaultEncoding;this.toUnicode=properties.toUnicode;this.fallbackToUnicode=properties.fallbackToUnicode||new ToUnicodeMap();this.toFontChar=[];if(properties.type==='Type3'){for(charCode=0;charCode<256;charCode++){this.toFontChar[charCode]=this.differences[charCode]||properties.defaultEncoding[charCode]}this.fontType=_util.FontType.TYPE3;return}this.cidEncoding=properties.cidEncoding;this.vertical=properties.vertical;if(this.vertical){this.vmetrics=properties.vmetrics;this.defaultVMetrics=properties.defaultVMetrics}if(!file||file.isEmpty){if(file){(0,_util.warn)('Font file is empty in "'+name+'" ('+this.loadedName+')')}this.fallbackToSystemFont();return}var _getFontFileType=getFontFileType(file,properties);var _getFontFileType2=_slicedToArray(_getFontFileType,2);type=_getFontFileType2[0];subtype=_getFontFileType2[1];if(type!==this.type||subtype!==this.subtype){(0,_util.info)('Inconsistent font file Type/SubType, expected: '+"".concat(this.type,"/").concat(this.subtype," but found: ").concat(type,"/").concat(subtype,"."))}try{var data;switch(type){case'MMType1':(0,_util.info)('MMType1 font ('+name+'), falling back to Type1.');case'Type1':case'CIDFontType0':this.mimetype='font/opentype';var cff=subtype==='Type1C'||subtype==='CIDFontType0C'?new CFFFont(file,properties):new Type1Font(name,file,properties);adjustWidths(properties);data=this.convert(name,cff,properties);break;case'OpenType':case'TrueType':case'CIDFontType2':this.mimetype='font/opentype';data=this.checkAndRepair(name,file,properties);if(this.isOpenType){adjustWidths(properties);type='OpenType'}break;default:throw new _util.FormatError("Font ".concat(type," is not supported"));}}catch(e){(0,_util.warn)(e);this.fallbackToSystemFont();return}this.data=data;this.fontType=getFontType(type,subtype);this.fontMatrix=properties.fontMatrix;this.widths=properties.widths;this.defaultWidth=properties.defaultWidth;this.toUnicode=properties.toUnicode;this.encoding=properties.baseEncoding;this.seacMap=properties.seacMap}Font.getFontID=function(){var ID=1;return function Font_getFontID(){return String(ID++)}}();function int16(b0,b1){return(b0<<8)+b1}function writeSignedInt16(bytes,index,value){bytes[index+1]=value;bytes[index]=value>>>8}function signedInt16(b0,b1){var value=(b0<<8)+b1;return value&1<<15?value-0x10000:value}function int32(b0,b1,b2,b3){return(b0<<24)+(b1<<16)+(b2<<8)+b3}function string16(value){return String.fromCharCode(value>>8&0xff,value&0xff)}function safeString16(value){value=value>0x7FFF?0x7FFF:value<-0x8000?-0x8000:value;return String.fromCharCode(value>>8&0xff,value&0xff)}function isTrueTypeFile(file){var header=file.peekBytes(4);return(0,_util.readUint32)(header,0)===0x00010000||(0,_util.bytesToString)(header)==='true'}function isTrueTypeCollectionFile(file){var header=file.peekBytes(4);return(0,_util.bytesToString)(header)==='ttcf'}function isOpenTypeFile(file){var header=file.peekBytes(4);return(0,_util.bytesToString)(header)==='OTTO'}function isType1File(file){var header=file.peekBytes(2);if(header[0]===0x25&&header[1]===0x21){return true}if(header[0]===0x80&&header[1]===0x01){return true}return false}function isCFFFile(file){var header=file.peekBytes(4);if(header[0]>=1&&header[3]>=1&&header[3]<=4){return true}return false}function getFontFileType(file,_ref){var type=_ref.type,subtype=_ref.subtype,composite=_ref.composite;var fileType,fileSubtype;if(isTrueTypeFile(file)||isTrueTypeCollectionFile(file)){if(composite){fileType='CIDFontType2'}else{fileType='TrueType'}}else if(isOpenTypeFile(file)){if(composite){fileType='CIDFontType2'}else{fileType='OpenType'}}else if(isType1File(file)){if(composite){fileType='CIDFontType0'}else{fileType=type==='MMType1'?'MMType1':'Type1'}}else if(isCFFFile(file)){if(composite){fileType='CIDFontType0';fileSubtype='CIDFontType0C'}else{fileType=type==='MMType1'?'MMType1':'Type1';fileSubtype='Type1C'}}else{(0,_util.warn)('getFontFileType: Unable to detect correct font file Type/Subtype.');fileType=type;fileSubtype=subtype}return[fileType,fileSubtype]}function buildToFontChar(encoding,glyphsUnicodeMap,differences){var toFontChar=[],unicode;for(var i=0,ii=encoding.length;iprivateUseOffetEnd){privateUseAreaIndex++;if(privateUseAreaIndex>=PRIVATE_USE_AREAS.length){(0,_util.warn)('Ran out of space in font private use area.');break}nextAvailableFontCharCode=PRIVATE_USE_AREAS[privateUseAreaIndex][0];privateUseOffetEnd=PRIVATE_USE_AREAS[privateUseAreaIndex][1]}var fontCharCode=nextAvailableFontCharCode++;if(glyphId===0){glyphId=newGlyphZeroId}newMap[fontCharCode]=glyphId;toFontChar[originalCharCode]=fontCharCode}return{toFontChar:toFontChar,charCodeToGlyphId:newMap,nextAvailableFontCharCode:nextAvailableFontCharCode}}function getRanges(glyphs,numGlyphs){var codes=[];for(var charCode in glyphs){if(glyphs[charCode]>=numGlyphs){continue}codes.push({fontCharCode:charCode|0,glyphId:glyphs[charCode]})}if(codes.length===0){codes.push({fontCharCode:0,glyphId:0})}codes.sort(function fontGetRangesSort(a,b){return a.fontCharCode-b.fontCharCode});var ranges=[];var length=codes.length;for(var n=0;n0xFFFF?2:1;var cmap='\x00\x00'+string16(numTables)+'\x00\x03\x00\x01'+(0,_util.string32)(4+numTables*8);var i,ii,j,jj;for(i=ranges.length-1;i>=0;--i){if(ranges[i][0]<=0xFFFF){break}}var bmpLength=i+1;if(ranges[i][0]<0xFFFF&&ranges[i][1]===0xFFFF){ranges[i][1]=0xFFFE}var trailingRangesCount=ranges[i][1]<0xFFFF?1:0;var segCount=bmpLength+trailingRangesCount;var searchParams=OpenTypeFileBuilder.getSearchParams(segCount,2);var startCount='';var endCount='';var idDeltas='';var idRangeOffsets='';var glyphsIds='';var bias=0;var range,start,end,codes;for(i=0,ii=bmpLength;i0){endCount+='\xFF\xFF';startCount+='\xFF\xFF';idDeltas+='\x00\x01';idRangeOffsets+='\x00\x00'}var format314='\x00\x00'+string16(2*segCount)+string16(searchParams.range)+string16(searchParams.entry)+string16(searchParams.rangeShift)+endCount+'\x00\x00'+startCount+idDeltas+idRangeOffsets+glyphsIds;var format31012='';var header31012='';if(numTables>1){cmap+='\x00\x03\x00\x0A'+(0,_util.string32)(4+numTables*8+4+format314.length);format31012='';for(i=0,ii=ranges.length;ilastChar){return false}stream.getBytes(6);var usWinAscent=stream.getUint16();if(usWinAscent===0){return false}os2.data[8]=os2.data[9]=0;return true}function createOS2Table(properties,charstrings,override){override=override||{unitsPerEm:0,yMax:0,yMin:0,ascent:0,descent:0};var ulUnicodeRange1=0;var ulUnicodeRange2=0;var ulUnicodeRange3=0;var ulUnicodeRange4=0;var firstCharIndex=null;var lastCharIndex=0;if(charstrings){for(var code in charstrings){code|=0;if(firstCharIndex>code||!firstCharIndex){firstCharIndex=code}if(lastCharIndex 123 are reserved for internal usage');}}if(lastCharIndex>0xFFFF){lastCharIndex=0xFFFF}}else{firstCharIndex=0;lastCharIndex=255}var bbox=properties.bbox||[0,0,0,0];var unitsPerEm=override.unitsPerEm||1/(properties.fontMatrix||_util.FONT_IDENTITY_MATRIX)[0];var scale=properties.ascentScaled?1.0:unitsPerEm/PDF_GLYPH_SPACE_UNITS;var typoAscent=override.ascent||Math.round(scale*(properties.ascent||bbox[3]));var typoDescent=override.descent||Math.round(scale*(properties.descent||bbox[1]));if(typoDescent>0&&properties.descent>0&&bbox[1]<0){typoDescent=-typoDescent}var winAscent=override.yMax||typoAscent;var winDescent=-override.yMin||-typoDescent;return'\x00\x03\x02\x24\x01\xF4\x00\x05\x00\x00\x02\x8A\x02\xBB\x00\x00\x00\x8C\x02\x8A\x02\xBB\x00\x00\x01\xDF\x00\x31\x01\x02\x00\x00\x00\x00\x06'+String.fromCharCode(properties.fixedPitch?0x09:0x00)+'\x00\x00\x00\x00\x00\x00'+(0,_util.string32)(ulUnicodeRange1)+(0,_util.string32)(ulUnicodeRange2)+(0,_util.string32)(ulUnicodeRange3)+(0,_util.string32)(ulUnicodeRange4)+'\x2A\x32\x31\x2A'+string16(properties.italicAngle?1:0)+string16(firstCharIndex||properties.firstChar)+string16(lastCharIndex||properties.lastChar)+string16(typoAscent)+string16(typoDescent)+'\x00\x64'+string16(winAscent)+string16(winDescent)+'\x00\x00\x00\x00\x00\x00\x00\x00'+string16(properties.xHeight)+string16(properties.capHeight)+string16(0)+string16(firstCharIndex||properties.firstChar)+'\x00\x03'}function createPostTable(properties){var angle=Math.floor(properties.italicAngle*Math.pow(2,16));return'\x00\x03\x00\x00'+(0,_util.string32)(angle)+'\x00\x00\x00\x00'+(0,_util.string32)(properties.fixedPitch)+'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'}function createNameTable(name,proto){if(!proto){proto=[[],[]]}var strings=[proto[0][0]||'Original licence',proto[0][1]||name,proto[0][2]||'Unknown',proto[0][3]||'uniqueID',proto[0][4]||name,proto[0][5]||'Version 0.11',proto[0][6]||'',proto[0][7]||'Unknown',proto[0][8]||'Unknown',proto[0][9]||'Unknown'];var stringsUnicode=[];var i,ii,j,jj,str;for(i=0,ii=strings.length;i0;if(isStandardFont&&type==='CIDFontType2'&&this.cidEncoding.startsWith('Identity-')){var GlyphMapForStandardFonts=(0,_standard_fonts.getGlyphMapForStandardFonts)();var map=[];for(charCode in GlyphMapForStandardFonts){map[+charCode]=GlyphMapForStandardFonts[charCode]}if(/Arial-?Black/i.test(name)){var SupplementalGlyphMapForArialBlack=(0,_standard_fonts.getSupplementalGlyphMapForArialBlack)();for(charCode in SupplementalGlyphMapForArialBlack){map[+charCode]=SupplementalGlyphMapForArialBlack[charCode]}}else if(/Calibri/i.test(name)){var SupplementalGlyphMapForCalibri=(0,_standard_fonts.getSupplementalGlyphMapForCalibri)();for(charCode in SupplementalGlyphMapForCalibri){map[+charCode]=SupplementalGlyphMapForCalibri[charCode]}}var isIdentityUnicode=this.toUnicode instanceof IdentityToUnicodeMap;if(!isIdentityUnicode){this.toUnicode.forEach(function(charCode,unicodeCharCode){map[+charCode]=unicodeCharCode})}this.toFontChar=map;this.toUnicode=new ToUnicodeMap(map)}else if(/Symbol/i.test(fontName)){this.toFontChar=buildToFontChar(_encodings.SymbolSetEncoding,(0,_glyphlist.getGlyphsUnicode)(),this.differences)}else if(/Dingbats/i.test(fontName)){if(/Wingdings/i.test(name)){(0,_util.warn)('Non-embedded Wingdings font, falling back to ZapfDingbats.')}this.toFontChar=buildToFontChar(_encodings.ZapfDingbatsEncoding,(0,_glyphlist.getDingbatsGlyphsUnicode)(),this.differences)}else if(isStandardFont){this.toFontChar=buildToFontChar(this.defaultEncoding,(0,_glyphlist.getGlyphsUnicode)(),this.differences)}else{var glyphsUnicodeMap=(0,_glyphlist.getGlyphsUnicode)();this.toUnicode.forEach(function(charCode,unicodeCharCode){if(!_this.composite){var glyphName=_this.differences[charCode]||_this.defaultEncoding[charCode];unicode=(0,_unicode.getUnicodeForGlyph)(glyphName,glyphsUnicodeMap);if(unicode!==-1){unicodeCharCode=unicode}}_this.toFontChar[charCode]=unicodeCharCode})}this.loadedName=fontName.split('-')[0];this.fontType=getFontType(type,subtype)},checkAndRepair:function Font_checkAndRepair(name,font,properties){var VALID_TABLES=['OS/2','cmap','head','hhea','hmtx','maxp','name','post','loca','glyf','fpgm','prep','cvt ','CFF '];function readTables(file,numTables){var tables=Object.create(null);tables['OS/2']=null;tables['cmap']=null;tables['head']=null;tables['hhea']=null;tables['hmtx']=null;tables['maxp']=null;tables['name']=null;tables['post']=null;for(var i=0;i>>0;var offset=file.getInt32()>>>0;var length=file.getInt32()>>>0;var previousPosition=file.pos;file.pos=file.start?file.start:0;file.skip(offset);var data=file.getBytes(length);file.pos=previousPosition;if(tag==='head'){data[8]=data[9]=data[10]=data[11]=0;data[17]|=0x20}return{tag:tag,checksum:checksum,length:length,offset:offset,data:data}}function readOpenTypeHeader(ttf){return{version:(0,_util.bytesToString)(ttf.getBytes(4)),numTables:ttf.getUint16(),searchRange:ttf.getUint16(),entrySelector:ttf.getUint16(),rangeShift:ttf.getUint16()}}function readTrueTypeCollectionHeader(ttc){var ttcTag=(0,_util.bytesToString)(ttc.getBytes(4));(0,_util.assert)(ttcTag==='ttcf','Must be a TrueType Collection font.');var majorVersion=ttc.getUint16();var minorVersion=ttc.getUint16();var numFonts=ttc.getInt32()>>>0;var offsetTable=[];for(var i=0;i>>0)}var header={ttcTag:ttcTag,majorVersion:majorVersion,minorVersion:minorVersion,numFonts:numFonts,offsetTable:offsetTable};switch(majorVersion){case 1:return header;case 2:header.dsigTag=ttc.getInt32()>>>0;header.dsigLength=ttc.getInt32()>>>0;header.dsigOffset=ttc.getInt32()>>>0;return header}throw new _util.FormatError("Invalid TrueType Collection majorVersion: ".concat(majorVersion,"."));}function readTrueTypeCollectionData(ttc,fontName){var _readTrueTypeCollecti=readTrueTypeCollectionHeader(ttc),numFonts=_readTrueTypeCollecti.numFonts,offsetTable=_readTrueTypeCollecti.offsetTable;for(var i=0;i>>0;var useTable=false;if(potentialTable&&potentialTable.platformId===platformId&&potentialTable.encodingId===encodingId){continue}if(platformId===0&&encodingId===0){useTable=true}else if(platformId===1&&encodingId===0){useTable=true}else if(platformId===3&&encodingId===1&&(hasEncoding||!potentialTable)){useTable=true;if(!isSymbolicFont){canBreak=true}}else if(isSymbolicFont&&platformId===3&&encodingId===0){useTable=true;canBreak=true}if(useTable){potentialTable={platformId:platformId,encodingId:encodingId,offset:offset}}if(canBreak){break}}if(potentialTable){font.pos=start+potentialTable.offset}if(!potentialTable||font.peekByte()===-1){(0,_util.warn)('Could not find a preferred cmap table.');return{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:false}}var format=font.getUint16();font.getUint16();font.getUint16();var hasShortCmap=false;var mappings=[];var j,glyphId;if(format===0){for(j=0;j<256;j++){var index=font.getByte();if(!index){continue}mappings.push({charCode:j,glyphId:index})}hasShortCmap=true}else if(format===4){var segCount=font.getUint16()>>1;font.getBytes(6);var segIndex,segments=[];for(segIndex=0;segIndex>1)-(segCount-segIndex);segment.offsetIndex=offsetIndex;offsetsCount=Math.max(offsetsCount,offsetIndex+segment.end-segment.start+1)}var offsets=[];for(j=0;jnumGlyphs){(0,_util.info)('The numOfMetrics ('+numOfMetrics+') should not be greater than the numGlyphs ('+numGlyphs+')');numOfMetrics=numGlyphs;header.data[34]=(numOfMetrics&0xff00)>>8;header.data[35]=numOfMetrics&0x00ff}var numOfSidebearings=numGlyphs-numOfMetrics;var numMissing=numOfSidebearings-(metrics.length-numOfMetrics*4>>1);if(numMissing>0){var entries=new Uint8Array(metrics.length+numMissing*2);entries.set(metrics.data);if(dupFirstEntry){entries[metrics.length]=metrics.data[2];entries[metrics.length+1]=metrics.data[3]}metrics.data=entries}}function sanitizeGlyph(source,sourceStart,sourceEnd,dest,destStart,hintsValid){var glyphProfile={length:0,sizeOfInstructions:0};if(sourceEnd-sourceStart<=12){return glyphProfile}var glyf=source.subarray(sourceStart,sourceEnd);var contoursCount=signedInt16(glyf[0],glyf[1]);if(contoursCount<0){contoursCount=-1;writeSignedInt16(glyf,0,contoursCount);dest.set(glyf,destStart);glyphProfile.length=glyf.length;return glyphProfile}var i,j=10,flagsCount=0;for(i=0;iglyf.length){return glyphProfile}if(!hintsValid&&instructionsLength>0){dest.set(glyf.subarray(0,instructionsStart),destStart);dest.set([0,0],destStart+instructionsStart);dest.set(glyf.subarray(instructionsEnd,glyphDataLength),destStart+instructionsStart+2);glyphDataLength-=instructionsLength;if(glyf.length-glyphDataLength>3){glyphDataLength=glyphDataLength+3&~3}glyphProfile.length=glyphDataLength;return glyphProfile}if(glyf.length-glyphDataLength>3){glyphDataLength=glyphDataLength+3&~3;dest.set(glyf.subarray(0,glyphDataLength),destStart);glyphProfile.length=glyphDataLength;return glyphProfile}dest.set(glyf,destStart);glyphProfile.length=glyf.length;return glyphProfile}function sanitizeHead(head,numGlyphs,locaLength){var data=head.data;var version=int32(data[0],data[1],data[2],data[3]);if(version>>16!==1){(0,_util.info)('Attempting to fix invalid version in head table: '+version);data[0]=0;data[1]=1;data[2]=0;data[3]=0}var indexToLocFormat=int16(data[50],data[51]);if(indexToLocFormat<0||indexToLocFormat>1){(0,_util.info)('Attempting to fix invalid indexToLocFormat in head table: '+indexToLocFormat);var numGlyphsPlusOne=numGlyphs+1;if(locaLength===numGlyphsPlusOne<<1){data[50]=0;data[51]=0}else if(locaLength===numGlyphsPlusOne<<2){data[50]=0;data[51]=1}else{throw new _util.FormatError('Could not fix indexToLocFormat: '+indexToLocFormat);}}}function sanitizeGlyphLocations(loca,glyf,numGlyphs,isGlyphLocationsLong,hintsValid,dupFirstEntry,maxSizeOfInstructions){var itemSize,itemDecode,itemEncode;if(isGlyphLocationsLong){itemSize=4;itemDecode=function fontItemDecodeLong(data,offset){return data[offset]<<24|data[offset+1]<<16|data[offset+2]<<8|data[offset+3]};itemEncode=function fontItemEncodeLong(data,offset,value){data[offset]=value>>>24&0xFF;data[offset+1]=value>>16&0xFF;data[offset+2]=value>>8&0xFF;data[offset+3]=value&0xFF}}else{itemSize=2;itemDecode=function fontItemDecode(data,offset){return data[offset]<<9|data[offset+1]<<1};itemEncode=function fontItemEncode(data,offset,value){data[offset]=value>>9&0xFF;data[offset+1]=value>>1&0xFF}}var numGlyphsOut=dupFirstEntry?numGlyphs+1:numGlyphs;var locaData=loca.data;var locaDataSize=itemSize*(1+numGlyphsOut);locaData=new Uint8Array(locaDataSize);locaData.set(loca.data.subarray(0,locaDataSize));loca.data=locaData;var oldGlyfData=glyf.data;var oldGlyfDataLength=oldGlyfData.length;var newGlyfData=new Uint8Array(oldGlyfDataLength);var startOffset=itemDecode(locaData,0);var writeOffset=0;var missingGlyphs=Object.create(null);itemEncode(locaData,0,writeOffset);var i,j;for(i=0,j=itemSize;ioldGlyfDataLength&&(oldGlyfDataLength+3&~3)===endOffset){endOffset=oldGlyfDataLength}if(endOffset>oldGlyfDataLength){startOffset=endOffset}var glyphProfile=sanitizeGlyph(oldGlyfData,startOffset,endOffset,newGlyfData,writeOffset,hintsValid);var newLength=glyphProfile.length;if(newLength===0){missingGlyphs[i]=true}if(glyphProfile.sizeOfInstructions>maxSizeOfInstructions){maxSizeOfInstructions=glyphProfile.sizeOfInstructions}writeOffset+=newLength;itemEncode(locaData,j,writeOffset);startOffset=endOffset}if(writeOffset===0){var simpleGlyph=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(i=0,j=itemSize;ifirstEntryLength+writeOffset){glyf.data=newGlyfData.subarray(0,firstEntryLength+writeOffset)}else{glyf.data=new Uint8Array(firstEntryLength+writeOffset);glyf.data.set(newGlyfData.subarray(0,writeOffset))}glyf.data.set(newGlyfData.subarray(0,firstEntryLength),writeOffset);itemEncode(loca.data,locaData.length-itemSize,writeOffset+firstEntryLength)}else{glyf.data=newGlyfData.subarray(0,writeOffset)}return{missingGlyphs:missingGlyphs,maxSizeOfInstructions:maxSizeOfInstructions}}function readPostScriptTable(post,properties,maxpNumGlyphs){var start=(font.start?font.start:0)+post.offset;font.pos=start;var length=post.length,end=start+length;var version=font.getInt32();font.getBytes(28);var glyphNames;var valid=true;var i;switch(version){case 0x00010000:glyphNames=MacStandardGlyphOrdering;break;case 0x00020000:var numGlyphs=font.getUint16();if(numGlyphs!==maxpNumGlyphs){valid=false;break}var glyphNameIndexes=[];for(i=0;i=32768){valid=false;break}glyphNameIndexes.push(index)}if(!valid){break}var customNames=[];var strBuf=[];while(font.posend){continue}font.pos=pos;var nameIndex=record.name;if(record.encoding){var str='';for(var j=0,jj=record.length;j0){i+=offset-1}}}if(!inFDEF&&!inELSE){var stackDelta=op<=0x8E?TTOpsStackDeltas[op]:op>=0xC0&&op<=0xDF?-1:op>=0xE0?-2:0;if(op>=0x71&&op<=0x75){n=stack.pop();if(!isNaN(n)){stackDelta=-n*2}}while(stackDelta<0&&stack.length>0){stack.pop();stackDelta++}while(stackDelta>0){stack.push(NaN);stackDelta--}}}ttContext.tooComplexToFollowFunctions=tooComplexToFollowFunctions;var content=[data];if(i>data.length){content.push(new Uint8Array(i-data.length))}if(lastDeff>lastEndf){(0,_util.warn)('TT: complementing a missing function tail');content.push(new Uint8Array([0x22,0x2D]))}foldTTTable(table,content)}function checkInvalidFunctions(ttContext,maxFunctionDefs){if(ttContext.tooComplexToFollowFunctions){return}if(ttContext.functionsDefined.length>maxFunctionDefs){(0,_util.warn)('TT: more functions defined than expected');ttContext.hintsValid=false;return}for(var j=0,jj=ttContext.functionsUsed.length;jmaxFunctionDefs){(0,_util.warn)('TT: invalid function id: '+j);ttContext.hintsValid=false;return}if(ttContext.functionsUsed[j]&&!ttContext.functionsDefined[j]){(0,_util.warn)('TT: undefined function: '+j);ttContext.hintsValid=false;return}}}function foldTTTable(table,content){if(content.length>1){var newLength=0;var j,jj;for(j=0,jj=content.length;j0||!(properties.cMap instanceof _cmap.IdentityCMap));if(header.version==='OTTO'&&!isComposite||!tables['head']||!tables['hhea']||!tables['maxp']||!tables['post']){cffFile=new _stream.Stream(tables['CFF '].data);cff=new CFFFont(cffFile,properties);adjustWidths(properties);return this.convert(name,cff,properties)}delete tables['glyf'];delete tables['loca'];delete tables['fpgm'];delete tables['prep'];delete tables['cvt '];this.isOpenType=true}else{if(!tables['loca']){throw new _util.FormatError('Required "loca" table is not found');}if(!tables['glyf']){(0,_util.warn)('Required "glyf" table is not found -- trying to recover.');tables['glyf']={tag:'glyf',data:new Uint8Array(0)}}this.isOpenType=false}if(!tables['maxp']){throw new _util.FormatError('Required "maxp" table is not found');}font.pos=(font.start||0)+tables['maxp'].offset;var version=font.getInt32();var numGlyphs=font.getUint16();var numGlyphsOut=numGlyphs+1;var dupFirstEntry=true;if(numGlyphsOut>0xFFFF){dupFirstEntry=false;numGlyphsOut=numGlyphs;(0,_util.warn)('Not enough space in glyfs to duplicate first glyph.')}var maxFunctionDefs=0;var maxSizeOfInstructions=0;if(version>=0x00010000&&tables['maxp'].length>=22){font.pos+=8;var maxZones=font.getUint16();if(maxZones>2){tables['maxp'].data[14]=0;tables['maxp'].data[15]=2}font.pos+=4;maxFunctionDefs=font.getUint16();font.pos+=4;maxSizeOfInstructions=font.getUint16()}tables['maxp'].data[4]=numGlyphsOut>>8;tables['maxp'].data[5]=numGlyphsOut&255;var hintsValid=sanitizeTTPrograms(tables['fpgm'],tables['prep'],tables['cvt '],maxFunctionDefs);if(!hintsValid){delete tables['fpgm'];delete tables['prep'];delete tables['cvt ']}sanitizeMetrics(font,tables['hhea'],tables['hmtx'],numGlyphsOut,dupFirstEntry);if(!tables['head']){throw new _util.FormatError('Required "head" table is not found');}sanitizeHead(tables['head'],numGlyphs,isTrueType?tables['loca'].length:0);var missingGlyphs=Object.create(null);if(isTrueType){var isGlyphLocationsLong=int16(tables['head'].data[50],tables['head'].data[51]);var glyphsInfo=sanitizeGlyphLocations(tables['loca'],tables['glyf'],numGlyphs,isGlyphLocationsLong,hintsValid,dupFirstEntry,maxSizeOfInstructions);missingGlyphs=glyphsInfo.missingGlyphs;if(version>=0x00010000&&tables['maxp'].length>=22){tables['maxp'].data[26]=glyphsInfo.maxSizeOfInstructions>>8;tables['maxp'].data[27]=glyphsInfo.maxSizeOfInstructions&255}}if(!tables['hhea']){throw new _util.FormatError('Required "hhea" table is not found');}if(tables['hhea'].data[10]===0&&tables['hhea'].data[11]===0){tables['hhea'].data[10]=0xFF;tables['hhea'].data[11]=0xFF}var metricsOverride={unitsPerEm:int16(tables['head'].data[18],tables['head'].data[19]),yMax:int16(tables['head'].data[42],tables['head'].data[43]),yMin:signedInt16(tables['head'].data[38],tables['head'].data[39]),ascent:int16(tables['hhea'].data[4],tables['hhea'].data[5]),descent:signedInt16(tables['hhea'].data[6],tables['hhea'].data[7])};this.ascent=metricsOverride.ascent/metricsOverride.unitsPerEm;this.descent=metricsOverride.descent/metricsOverride.unitsPerEm;if(tables['post']){readPostScriptTable(tables['post'],properties,numGlyphs)}tables['post']={tag:'post',data:createPostTable(properties)};var charCodeToGlyphId=[],charCode;function hasGlyph(glyphId){return!missingGlyphs[glyphId]}if(properties.composite){var cidToGidMap=properties.cidToGidMap||[];var isCidToGidMapEmpty=cidToGidMap.length===0;properties.cMap.forEach(function(charCode,cid){if(cid>0xffff){throw new _util.FormatError('Max size of CID is 65,535');}var glyphId=-1;if(isCidToGidMapEmpty){glyphId=cid}else if(cidToGidMap[cid]!==undefined){glyphId=cidToGidMap[cid]}if(glyphId>=0&&glyphId0&&hasGlyph(glyphId)){charCodeToGlyphId[charCode]=glyphId}}}}else if(cmapPlatformId===0&&cmapEncodingId===0){for(var _i2=0;_i2=0xF000&&charCode<=0xF0FF){charCode&=0xFF}charCodeToGlyphId[charCode]=cmapMappings[_i3].glyphId}}}if(charCodeToGlyphId.length===0){charCodeToGlyphId[0]=0}var glyphZeroId=numGlyphsOut-1;if(!dupFirstEntry){glyphZeroId=0}var newMapping=adjustMapping(charCodeToGlyphId,hasGlyph,glyphZeroId);this.toFontChar=newMapping.toFontChar;tables['cmap']={tag:'cmap',data:createCmapTable(newMapping.charCodeToGlyphId,numGlyphsOut)};if(!tables['OS/2']||!validateOS2Table(tables['OS/2'])){tables['OS/2']={tag:'OS/2',data:createOS2Table(properties,newMapping.charCodeToGlyphId,metricsOverride)}}if(!isTrueType){try{cffFile=new _stream.Stream(tables['CFF '].data);var parser=new _cff_parser.CFFParser(cffFile,properties,SEAC_ANALYSIS_ENABLED);cff=parser.parse();cff.duplicateFirstGlyph();var compiler=new _cff_parser.CFFCompiler(cff);tables['CFF '].data=compiler.compile()}catch(e){(0,_util.warn)('Failed to compile font '+properties.loadedName)}}if(!tables['name']){tables['name']={tag:'name',data:createNameTable(this.name)}}else{var namePrototype=readNameTable(tables['name']);tables['name'].data=createNameTable(name,namePrototype)}var builder=new OpenTypeFileBuilder(header.version);for(var tableTag in tables){builder.addTable(tableTag,tables[tableTag].data)}return builder.toArray()},convert:function Font_convert(fontName,font,properties){properties.fixedPitch=false;if(properties.builtInEncoding){adjustToUnicode(properties,properties.builtInEncoding)}var glyphZeroId=1;if(font instanceof CFFFont){glyphZeroId=font.numGlyphs-1}var mapping=font.getGlyphMapping(properties);var newMapping=adjustMapping(mapping,font.hasGlyphId.bind(font),glyphZeroId);this.toFontChar=newMapping.toFontChar;var numGlyphs=font.numGlyphs;function getCharCodes(charCodeToGlyphId,glyphId){var charCodes=null;for(var charCode in charCodeToGlyphId){if(glyphId===charCodeToGlyphId[charCode]){if(!charCodes){charCodes=[]}charCodes.push(charCode|0)}}return charCodes}function createCharCode(charCodeToGlyphId,glyphId){for(var charCode in charCodeToGlyphId){if(glyphId===charCodeToGlyphId[charCode]){return charCode|0}}newMapping.charCodeToGlyphId[newMapping.nextAvailableFontCharCode]=glyphId;return newMapping.nextAvailableFontCharCode++}var seacs=font.seacs;if(SEAC_ANALYSIS_ENABLED&&seacs&&seacs.length){var matrix=properties.fontMatrix||_util.FONT_IDENTITY_MATRIX;var charset=font.getCharset();var seacMap=Object.create(null);for(var glyphId in seacs){glyphId|=0;var seac=seacs[glyphId];var baseGlyphName=_encodings.StandardEncoding[seac[2]];var accentGlyphName=_encodings.StandardEncoding[seac[3]];var baseGlyphId=charset.indexOf(baseGlyphName);var accentGlyphId=charset.indexOf(accentGlyphName);if(baseGlyphId<0||accentGlyphId<0){continue}var accentOffset={x:seac[0]*matrix[0]+seac[1]*matrix[2]+matrix[4],y:seac[0]*matrix[1]+seac[1]*matrix[3]+matrix[5]};var charCodes=getCharCodes(mapping,glyphId);if(!charCodes){continue}for(var i=0,ii=charCodes.length;i=0){charCodeToGlyphId[charCode]=glyphId}else{charCodeToGlyphId[charCode]=0}}}else if(isSymbolicFont){for(charCode in builtInEncoding){charCodeToGlyphId[charCode]=builtInEncoding[charCode]}}else{baseEncoding=_encodings.StandardEncoding;for(charCode=0;charCode=0){charCodeToGlyphId[charCode]=glyphId}else{charCodeToGlyphId[charCode]=0}}}var differences=properties.differences,glyphsUnicodeMap;if(differences){for(charCode in differences){var glyphName=differences[charCode];glyphId=glyphNames.indexOf(glyphName);if(glyphId===-1){if(!glyphsUnicodeMap){glyphsUnicodeMap=(0,_glyphlist.getGlyphsUnicode)()}var standardGlyphName=recoverGlyphName(glyphName,glyphsUnicodeMap);if(standardGlyphName!==glyphName){glyphId=glyphNames.indexOf(standardGlyphName)}}if(glyphId>=0){charCodeToGlyphId[charCode]=glyphId}else{charCodeToGlyphId[charCode]=0}}}return charCodeToGlyphId}var Type1Font=function Type1FontClosure(){function findBlock(streamBytes,signature,startIndex){var streamBytesLength=streamBytes.length;var signatureLength=signature.length;var scanLength=streamBytesLength-signatureLength;var i=startIndex,j,found=false;while(i=signatureLength){i+=j;while(i=0){builtInEncoding[charCode]=glyphId}}}return type1FontGlyphMapping(properties,builtInEncoding,glyphNames)},hasGlyphId:function Type1Font_hasGlyphID(id){if(id<0||id>=this.numGlyphs){return false}if(id===0){return true}var glyph=this.charstrings[id-1];return glyph.charstring.length>0},getSeacs:function Type1Font_getSeacs(charstrings){var i,ii;var seacMap=[];for(i=0,ii=charstrings.length;i0;j--){value[j]-=value[j-1]}}privateDict.setByName(field,value)}cff.topDict.privateDict=privateDict;var subrIndex=new _cff_parser.CFFIndex();for(i=0,ii=subrs.length;i=bytesLength){throw new _util.FormatError('Invalid CFF header');}if(offset!==0){(0,_util.info)('cff data is shifted');bytes=bytes.subarray(offset);this.bytes=bytes}var major=bytes[0];var minor=bytes[1];var hdrSize=bytes[2];var offSize=bytes[3];var header=new CFFHeader(major,minor,hdrSize,offSize);return{obj:header,endPos:hdrSize}},parseDict:function CFFParser_parseDict(dict){var pos=0;function parseOperand(){var value=dict[pos++];if(value===30){return parseFloatOperand()}else if(value===28){value=dict[pos++];value=(value<<24|dict[pos++]<<16)>>16;return value}else if(value===29){value=dict[pos++];value=value<<8|dict[pos++];value=value<<8|dict[pos++];value=value<<8|dict[pos++];return value}else if(value>=32&&value<=246){return value-139}else if(value>=247&&value<=250){return(value-247)*256+dict[pos++]+108}else if(value>=251&&value<=254){return-((value-251)*256)-dict[pos++]-108}(0,_util.warn)('CFFParser_parseDict: "'+value+'" is a reserved command.');return NaN}function parseFloatOperand(){var str='';var eof=15;var lookup=['0','1','2','3','4','5','6','7','8','9','.','E','E-',null,'-'];var length=dict.length;while(pos>4;var b2=b&15;if(b1===eof){break}str+=lookup[b1];if(b2===eof){break}str+=lookup[b2]}return parseFloat(str)}var operands=[];var entries=[];pos=0;var end=dict.length;while(posMAX_SUBR_NESTING){return false}var stackSize=state.stackSize;var stack=state.stack;var length=data.length;for(var j=0;j>16;j+=2;stackSize++}else if(value===14){if(stackSize>=4){stackSize-=4;if(this.seacAnalysisEnabled){state.seac=stack.slice(stackSize,stackSize+4);return false}}validationCommand=CharstringValidationData[value]}else if(value>=32&&value<=246){stack[stackSize]=value-139;stackSize++}else if(value>=247&&value<=254){stack[stackSize]=value<251?(value-247<<8)+data[j]+108:-(value-251<<8)-data[j]-108;j++;stackSize++}else if(value===255){stack[stackSize]=(data[j]<<24|data[j+1]<<16|data[j+2]<<8|data[j+3])/65536;j+=4;stackSize++}else if(value===19||value===20){state.hints+=stackSize>>1;j+=state.hints+7>>3;stackSize%=2;validationCommand=CharstringValidationData[value]}else if(value===10||value===29){var subrsIndex;if(value===10){subrsIndex=localSubrIndex}else{subrsIndex=globalSubrIndex}if(!subrsIndex){validationCommand=CharstringValidationData[value];(0,_util.warn)('Missing subrsIndex for '+validationCommand.id);return false}var bias=32768;if(subrsIndex.count<1240){bias=107}else if(subrsIndex.count<33900){bias=1131}var subrNumber=stack[--stackSize]+bias;if(subrNumber<0||subrNumber>=subrsIndex.count||isNaN(subrNumber)){validationCommand=CharstringValidationData[value];(0,_util.warn)('Out of bounds subrIndex for '+validationCommand.id);return false}state.stackSize=stackSize;state.callDepth++;var valid=this.parseCharString(state,subrsIndex.get(subrNumber),localSubrIndex,globalSubrIndex);if(!valid){return false}state.callDepth--;stackSize=state.stackSize;continue}else if(value===11){state.stackSize=stackSize;return true}else{validationCommand=CharstringValidationData[value]}if(validationCommand){if(validationCommand.stem){state.hints+=stackSize>>1;if(value===3||value===23){state.hasVStems=true}else if(state.hasVStems&&(value===1||value===18)){(0,_util.warn)('CFF stem hints are in wrong order');data[j-1]=value===1?3:23}}if('min'in validationCommand){if(!state.undefStack&&stackSize=2&&validationCommand.stem){stackSize%=2}else if(stackSize>1){(0,_util.warn)('Found too many parameters for stack-clearing command')}if(stackSize>0&&stack[stackSize-1]>=0){state.width=stack[stackSize-1]}}if('stackDelta'in validationCommand){if('stackFn'in validationCommand){validationCommand.stackFn(stack,stackSize)}stackSize+=validationCommand.stackDelta}else if(validationCommand.stackClearing){stackSize=0}else if(validationCommand.resetStack){stackSize=0;state.undefStack=false}else if(validationCommand.undefStack){stackSize=0;state.undefStack=true;state.firstStackClearing=false}}}state.stackSize=stackSize;return true},parseCharStrings:function parseCharStrings(_ref){var charStrings=_ref.charStrings,localSubrIndex=_ref.localSubrIndex,globalSubrIndex=_ref.globalSubrIndex,fdSelect=_ref.fdSelect,fdArray=_ref.fdArray,privateDict=_ref.privateDict;var seacs=[];var widths=[];var count=charStrings.count;for(var i=0;i=fdArray.length){(0,_util.warn)('Invalid fd index for glyph index.');valid=false}if(valid){privateDictToUse=fdArray[fdIndex].privateDict;localSubrToUse=privateDictToUse.subrsIndex}}else if(localSubrIndex){localSubrToUse=localSubrIndex}if(valid){valid=this.parseCharString(state,charstring,localSubrToUse,globalSubrIndex)}if(state.width!==null){var nominalWidth=privateDictToUse.getByName('nominalWidthX');widths[i]=nominalWidth+state.width}else{var defaultWidth=privateDictToUse.getByName('defaultWidthX');widths[i]=defaultWidth}if(state.seac!==null){seacs[i]=state.seac}if(!valid){charStrings.set(i,new Uint8Array([14]))}}return{charStrings:charStrings,seacs:seacs,widths:widths}},emptyPrivateDictionary:function CFFParser_emptyPrivateDictionary(parentDict){var privateDict=this.createDict(CFFPrivateDict,[],parentDict.strings);parentDict.setByKey(18,[0,0]);parentDict.privateDict=privateDict},parsePrivateDict:function CFFParser_parsePrivateDict(parentDict){if(!parentDict.hasName('Private')){this.emptyPrivateDictionary(parentDict);return}var privateOffset=parentDict.getByName('Private');if(!Array.isArray(privateOffset)||privateOffset.length!==2){parentDict.removeByName('Private');return}var size=privateOffset[0];var offset=privateOffset[1];if(size===0||offset>=this.bytes.length){this.emptyPrivateDictionary(parentDict);return}var privateDictEnd=offset+size;var dictData=this.bytes.subarray(offset,privateDictEnd);var dict=this.parseDict(dictData);var privateDict=this.createDict(CFFPrivateDict,dict,parentDict.strings);parentDict.privateDict=privateDict;if(!privateDict.getByName('Subrs')){return}var subrsOffset=privateDict.getByName('Subrs');var relativeOffset=offset+subrsOffset;if(subrsOffset===0||relativeOffset>=this.bytes.length){this.emptyPrivateDictionary(parentDict);return}var subrsIndex=this.parseIndex(relativeOffset);privateDict.subrsIndex=subrsIndex.obj},parseCharsets:function CFFParser_parseCharsets(pos,length,strings,cid){if(pos===0){return new CFFCharset(true,CFFCharsetPredefinedTypes.ISO_ADOBE,_charsets.ISOAdobeCharset)}else if(pos===1){return new CFFCharset(true,CFFCharsetPredefinedTypes.EXPERT,_charsets.ExpertCharset)}else if(pos===2){return new CFFCharset(true,CFFCharsetPredefinedTypes.EXPERT_SUBSET,_charsets.ExpertSubsetCharset)}var bytes=this.bytes;var start=pos;var format=bytes[pos++];var charset=['.notdef'];var id,count,i;length-=1;switch(format){case 0:for(i=0;i=65535){(0,_util.warn)('Not enough space in charstrings to duplicate first glyph.');return}var glyphZero=this.charStrings.get(0);this.charStrings.add(glyphZero);if(this.isCIDFont){this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0])}},hasGlyphId:function CFF_hasGlyphID(id){if(id<0||id>=this.charStrings.count){return false}var glyph=this.charStrings.get(id);return glyph.length>0}};return CFF}();exports.CFF=CFF;var CFFHeader=function CFFHeaderClosure(){function CFFHeader(major,minor,hdrSize,offSize){this.major=major;this.minor=minor;this.hdrSize=hdrSize;this.offSize=offSize}return CFFHeader}();exports.CFFHeader=CFFHeader;var CFFStrings=function CFFStringsClosure(){function CFFStrings(){this.strings=[]}CFFStrings.prototype={get:function CFFStrings_get(index){if(index>=0&&index<=NUM_STANDARD_CFF_STRINGS-1){return CFFStandardStrings[index]}if(index-NUM_STANDARD_CFF_STRINGS<=this.strings.length){return this.strings[index-NUM_STANDARD_CFF_STRINGS]}return CFFStandardStrings[0]},getSID:function CFFStrings_getSID(str){var index=CFFStandardStrings.indexOf(str);if(index!==-1){return index}index=this.strings.indexOf(str);if(index!==-1){return index+NUM_STANDARD_CFF_STRINGS}return-1},add:function CFFStrings_add(value){this.strings.push(value)},get count(){return this.strings.length}};return CFFStrings}();exports.CFFStrings=CFFStrings;var CFFIndex=function CFFIndexClosure(){function CFFIndex(){this.objects=[];this.length=0}CFFIndex.prototype={add:function CFFIndex_add(data){this.length+=data.length;this.objects.push(data)},set:function CFFIndex_set(index,data){this.length+=data.length-this.objects[index].length;this.objects[index]=data},get:function CFFIndex_get(index){return this.objects[index]},get count(){return this.objects.length}};return CFFIndex}();exports.CFFIndex=CFFIndex;var CFFDict=function CFFDictClosure(){function CFFDict(tables,strings){this.keyToNameMap=tables.keyToNameMap;this.nameToKeyMap=tables.nameToKeyMap;this.defaults=tables.defaults;this.types=tables.types;this.opcodes=tables.opcodes;this.order=tables.order;this.strings=strings;this.values=Object.create(null)}CFFDict.prototype={setByKey:function CFFDict_setByKey(key,value){if(!(key in this.keyToNameMap)){return false}var valueLength=value.length;if(valueLength===0){return true}for(var i=0;i=this.fdSelect.length){return-1}return this.fdSelect[glyphIndex]}};return CFFFDSelect}();exports.CFFFDSelect=CFFFDSelect;var CFFOffsetTracker=function CFFOffsetTrackerClosure(){function CFFOffsetTracker(){this.offsets=Object.create(null)}CFFOffsetTracker.prototype={isTracking:function CFFOffsetTracker_isTracking(key){return key in this.offsets},track:function CFFOffsetTracker_track(key,location){if(key in this.offsets){throw new _util.FormatError("Already tracking location of ".concat(key));}this.offsets[key]=location},offset:function CFFOffsetTracker_offset(value){for(var key in this.offsets){this.offsets[key]+=value}},setEntryLocation:function CFFOffsetTracker_setEntryLocation(key,values,output){if(!(key in this.offsets)){throw new _util.FormatError("Not tracking location of ".concat(key));}var data=output.data;var dataOffset=this.offsets[key];var size=5;for(var i=0,ii=values.length;i>24&0xFF;data[offset2]=value>>16&0xFF;data[offset3]=value>>8&0xFF;data[offset4]=value&0xFF}}};return CFFOffsetTracker}();var CFFCompiler=function CFFCompilerClosure(){function CFFCompiler(cff){this.cff=cff}CFFCompiler.prototype={compile:function CFFCompiler_compile(){var cff=this.cff;var output={data:[],length:0,add:function CFFCompiler_add(data){this.data=this.data.concat(data);this.length=this.data.length}};var header=this.compileHeader(cff.header);output.add(header);var nameIndex=this.compileNameIndex(cff.names);output.add(nameIndex);if(cff.isCIDFont){if(cff.topDict.hasName('FontMatrix')){var base=cff.topDict.getByName('FontMatrix');cff.topDict.removeByName('FontMatrix');for(var i=0,ii=cff.fdArray.length;i=-107&&value<=107){code=[value+139]}else if(value>=108&&value<=1131){value=value-108;code=[(value>>8)+247,value&0xFF]}else if(value>=-1131&&value<=-108){value=-value-108;code=[(value>>8)+251,value&0xFF]}else if(value>=-32768&&value<=32767){code=[0x1c,value>>8&0xFF,value&0xFF]}else{code=[0x1d,value>>24&0xFF,value>>16&0xFF,value>>8&0xFF,value&0xFF]}return code},compileHeader:function CFFCompiler_compileHeader(header){return[header.major,header.minor,header.hdrSize,header.offSize]},compileNameIndex:function CFFCompiler_compileNameIndex(names){var nameIndex=new CFFIndex();for(var i=0,ii=names.length;i'~'||_char==='['||_char===']'||_char==='('||_char===')'||_char==='{'||_char==='}'||_char==='<'||_char==='>'||_char==='/'||_char==='%'){_char='_'}sanitizedName[j]=_char}sanitizedName=sanitizedName.join('');if(sanitizedName===''){sanitizedName='Bad_Font_Name'}nameIndex.add((0,_util.stringToBytes)(sanitizedName))}return this.compileIndex(nameIndex)},compileTopDicts:function CFFCompiler_compileTopDicts(dicts,length,removeCidKeys){var fontDictTrackers=[];var fdArrayIndex=new CFFIndex();for(var i=0,ii=dicts.length;i>8&0xFF,numGlyphsLessNotDef&0xFF])}else{var length=1+numGlyphsLessNotDef*2;out=new Uint8Array(length);out[0]=0;var charsetIndex=0;var numCharsets=charset.charset.length;var warned=false;for(var i=1;i>8&0xFF;out[i+1]=sid&0xFF}}return this.compileTypedArray(out)},compileEncoding:function CFFCompiler_compileEncoding(encoding){return this.compileTypedArray(encoding.raw)},compileFDSelect:function CFFCompiler_compileFDSelect(fdSelect){var format=fdSelect.format;var out,i;switch(format){case 0:out=new Uint8Array(1+fdSelect.fdSelect.length);out[0]=format;for(i=0;i>8&0xFF,start&0xFF,lastFD];for(i=1;i>8&0xFF,i&0xFF,currentFD);lastFD=currentFD}}var numRanges=(ranges.length-3)/3;ranges[1]=numRanges>>8&0xFF;ranges[2]=numRanges&0xFF;ranges.push(i>>8&0xFF,i&0xFF);out=new Uint8Array(ranges);break}return this.compileTypedArray(out)},compileTypedArray:function CFFCompiler_compileTypedArray(data){var out=[];for(var i=0,ii=data.length;i>8&0xFF,count&0xff];var lastOffset=1,i;for(i=0;i>8&0xFF,relativeOffset&0xFF)}else if(offsetSize===3){data.push(relativeOffset>>16&0xFF,relativeOffset>>8&0xFF,relativeOffset&0xFF)}else{data.push(relativeOffset>>>24&0xFF,relativeOffset>>16&0xFF,relativeOffset>>8&0xFF,relativeOffset&0xFF)}if(objects[i]){relativeOffset+=objects[i].length}}for(i=0;i=0xFFF0&&code<=0xFFFF){return 0}else if(code>=0xF600&&code<=0xF8FF){return getSpecialPUASymbols()[code]||code}else if(code===0x00AD){return 0x002D}return code}function getUnicodeForGlyph(name,glyphsUnicodeMap){var unicode=glyphsUnicodeMap[name];if(unicode!==undefined){return unicode}if(!name){return-1}if(name[0]==='u'){var nameLen=name.length,hexStr;if(nameLen===7&&name[1]==='n'&&name[2]==='i'){hexStr=name.substring(3)}else if(nameLen>=5&&nameLen<=7){hexStr=name.substring(1)}else{return-1}if(hexStr===hexStr.toUpperCase()){unicode=parseInt(hexStr,16);if(unicode>=0){return unicode}}}return-1}var UnicodeRanges=[{'begin':0x0000,'end':0x007F},{'begin':0x0080,'end':0x00FF},{'begin':0x0100,'end':0x017F},{'begin':0x0180,'end':0x024F},{'begin':0x0250,'end':0x02AF},{'begin':0x02B0,'end':0x02FF},{'begin':0x0300,'end':0x036F},{'begin':0x0370,'end':0x03FF},{'begin':0x2C80,'end':0x2CFF},{'begin':0x0400,'end':0x04FF},{'begin':0x0530,'end':0x058F},{'begin':0x0590,'end':0x05FF},{'begin':0xA500,'end':0xA63F},{'begin':0x0600,'end':0x06FF},{'begin':0x07C0,'end':0x07FF},{'begin':0x0900,'end':0x097F},{'begin':0x0980,'end':0x09FF},{'begin':0x0A00,'end':0x0A7F},{'begin':0x0A80,'end':0x0AFF},{'begin':0x0B00,'end':0x0B7F},{'begin':0x0B80,'end':0x0BFF},{'begin':0x0C00,'end':0x0C7F},{'begin':0x0C80,'end':0x0CFF},{'begin':0x0D00,'end':0x0D7F},{'begin':0x0E00,'end':0x0E7F},{'begin':0x0E80,'end':0x0EFF},{'begin':0x10A0,'end':0x10FF},{'begin':0x1B00,'end':0x1B7F},{'begin':0x1100,'end':0x11FF},{'begin':0x1E00,'end':0x1EFF},{'begin':0x1F00,'end':0x1FFF},{'begin':0x2000,'end':0x206F},{'begin':0x2070,'end':0x209F},{'begin':0x20A0,'end':0x20CF},{'begin':0x20D0,'end':0x20FF},{'begin':0x2100,'end':0x214F},{'begin':0x2150,'end':0x218F},{'begin':0x2190,'end':0x21FF},{'begin':0x2200,'end':0x22FF},{'begin':0x2300,'end':0x23FF},{'begin':0x2400,'end':0x243F},{'begin':0x2440,'end':0x245F},{'begin':0x2460,'end':0x24FF},{'begin':0x2500,'end':0x257F},{'begin':0x2580,'end':0x259F},{'begin':0x25A0,'end':0x25FF},{'begin':0x2600,'end':0x26FF},{'begin':0x2700,'end':0x27BF},{'begin':0x3000,'end':0x303F},{'begin':0x3040,'end':0x309F},{'begin':0x30A0,'end':0x30FF},{'begin':0x3100,'end':0x312F},{'begin':0x3130,'end':0x318F},{'begin':0xA840,'end':0xA87F},{'begin':0x3200,'end':0x32FF},{'begin':0x3300,'end':0x33FF},{'begin':0xAC00,'end':0xD7AF},{'begin':0xD800,'end':0xDFFF},{'begin':0x10900,'end':0x1091F},{'begin':0x4E00,'end':0x9FFF},{'begin':0xE000,'end':0xF8FF},{'begin':0x31C0,'end':0x31EF},{'begin':0xFB00,'end':0xFB4F},{'begin':0xFB50,'end':0xFDFF},{'begin':0xFE20,'end':0xFE2F},{'begin':0xFE10,'end':0xFE1F},{'begin':0xFE50,'end':0xFE6F},{'begin':0xFE70,'end':0xFEFF},{'begin':0xFF00,'end':0xFFEF},{'begin':0xFFF0,'end':0xFFFF},{'begin':0x0F00,'end':0x0FFF},{'begin':0x0700,'end':0x074F},{'begin':0x0780,'end':0x07BF},{'begin':0x0D80,'end':0x0DFF},{'begin':0x1000,'end':0x109F},{'begin':0x1200,'end':0x137F},{'begin':0x13A0,'end':0x13FF},{'begin':0x1400,'end':0x167F},{'begin':0x1680,'end':0x169F},{'begin':0x16A0,'end':0x16FF},{'begin':0x1780,'end':0x17FF},{'begin':0x1800,'end':0x18AF},{'begin':0x2800,'end':0x28FF},{'begin':0xA000,'end':0xA48F},{'begin':0x1700,'end':0x171F},{'begin':0x10300,'end':0x1032F},{'begin':0x10330,'end':0x1034F},{'begin':0x10400,'end':0x1044F},{'begin':0x1D000,'end':0x1D0FF},{'begin':0x1D400,'end':0x1D7FF},{'begin':0xFF000,'end':0xFFFFD},{'begin':0xFE00,'end':0xFE0F},{'begin':0xE0000,'end':0xE007F},{'begin':0x1900,'end':0x194F},{'begin':0x1950,'end':0x197F},{'begin':0x1980,'end':0x19DF},{'begin':0x1A00,'end':0x1A1F},{'begin':0x2C00,'end':0x2C5F},{'begin':0x2D30,'end':0x2D7F},{'begin':0x4DC0,'end':0x4DFF},{'begin':0xA800,'end':0xA82F},{'begin':0x10000,'end':0x1007F},{'begin':0x10140,'end':0x1018F},{'begin':0x10380,'end':0x1039F},{'begin':0x103A0,'end':0x103DF},{'begin':0x10450,'end':0x1047F},{'begin':0x10480,'end':0x104AF},{'begin':0x10800,'end':0x1083F},{'begin':0x10A00,'end':0x10A5F},{'begin':0x1D300,'end':0x1D35F},{'begin':0x12000,'end':0x123FF},{'begin':0x1D360,'end':0x1D37F},{'begin':0x1B80,'end':0x1BBF},{'begin':0x1C00,'end':0x1C4F},{'begin':0x1C50,'end':0x1C7F},{'begin':0xA880,'end':0xA8DF},{'begin':0xA900,'end':0xA92F},{'begin':0xA930,'end':0xA95F},{'begin':0xAA00,'end':0xAA5F},{'begin':0x10190,'end':0x101CF},{'begin':0x101D0,'end':0x101FF},{'begin':0x102A0,'end':0x102DF},{'begin':0x1F030,'end':0x1F09F}];function getUnicodeRangeFor(value){for(var i=0,ii=UnicodeRanges.length;i=range.begin&&value=range.begin&&value=range.begin&&value=0;ii--){s+=chars[ii]}return s}exports.mapSpecialUnicodeValues=mapSpecialUnicodeValues;exports.reverseIfRtl=reverseIfRtl;exports.getUnicodeRangeFor=getUnicodeRangeFor;exports.getNormalizedUnicodes=getNormalizedUnicodes;exports.getUnicodeForGlyph=getUnicodeForGlyph}),(function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.FontRendererFactory=void 0;var _util=__w_pdfjs_require__(5);var _cff_parser=__w_pdfjs_require__(175);var _glyphlist=__w_pdfjs_require__(178);var _encodings=__w_pdfjs_require__(177);var _stream=__w_pdfjs_require__(158);function _typeof(obj){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 _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 _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o)};return _getPrototypeOf(o)}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 _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>1;p=start+offset+14;ranges=[];for(i=0;i>1;if(code>16;var flags;var x=0,y=0;i+=10;if(numberOfContours<0){do{flags=code[i]<<8|code[i+1];var glyphIndex=code[i+2]<<8|code[i+3];i+=4;var arg1,arg2;if(flags&0x01){arg1=(code[i]<<24|code[i+1]<<16)>>16;arg2=(code[i+2]<<24|code[i+3]<<16)>>16;i+=4}else{arg1=code[i++];arg2=code[i++]}if(flags&0x02){x=arg1;y=arg2}else{x=0;y=0}var scaleX=1,scaleY=1,scale01=0,scale10=0;if(flags&0x08){scaleX=scaleY=(code[i]<<24|code[i+1]<<16)/1073741824;i+=2}else if(flags&0x40){scaleX=(code[i]<<24|code[i+1]<<16)/1073741824;scaleY=(code[i+2]<<24|code[i+3]<<16)/1073741824;i+=4}else if(flags&0x80){scaleX=(code[i]<<24|code[i+1]<<16)/1073741824;scale01=(code[i+2]<<24|code[i+3]<<16)/1073741824;scale10=(code[i+4]<<24|code[i+5]<<16)/1073741824;scaleY=(code[i+6]<<24|code[i+7]<<16)/1073741824;i+=8}var subglyph=font.glyphs[glyphIndex];if(subglyph){cmds.push({cmd:'save'});cmds.push({cmd:'transform',args:[scaleX,scale01,scale10,scaleY,x,y]});compileGlyf(subglyph,cmds,font);cmds.push({cmd:'restore'})}}while(flags&0x20)}else{var endPtsOfContours=[];var j,jj;for(j=0;j0){points.push({flags:flags})}}for(j=0;j>16;i+=2;break;case 0x02:x-=code[i++];break;case 0x12:x+=code[i++];break}points[j].x=x}for(j=0;j>16;i+=2;break;case 0x04:y-=code[i++];break;case 0x24:y+=code[i++];break}points[j].y=y}var startPoint=0;for(i=0;i>1;stackClean=true;break;case 3:stems+=stack.length>>1;stackClean=true;break;case 4:y+=stack.pop();moveTo(x,y);stackClean=true;break;case 5:while(stack.length>0){x+=stack.shift();y+=stack.shift();lineTo(x,y)}break;case 6:while(stack.length>0){x+=stack.shift();lineTo(x,y);if(stack.length===0){break}y+=stack.shift();lineTo(x,y)}break;case 7:while(stack.length>0){y+=stack.shift();lineTo(x,y);if(stack.length===0){break}x+=stack.shift();lineTo(x,y)}break;case 8:while(stack.length>0){xa=x+stack.shift();ya=y+stack.shift();xb=xa+stack.shift();yb=ya+stack.shift();x=xb+stack.shift();y=yb+stack.shift();bezierCurveTo(xa,ya,xb,yb,x,y)}break;case 10:n=stack.pop();subrCode=null;if(font.isCFFCIDFont){var fdIndex=font.fdSelect.getFDIndex(glyphId);if(fdIndex>=0&&fdIndexMath.abs(y-y0)){x+=stack.shift()}else{y+=stack.shift()}bezierCurveTo(xa,ya,xb,yb,x,y);break;default:throw new _util.FormatError("unknown operator: 12 ".concat(v));}break;case 14:if(stack.length>=4){var achar=stack.pop();var bchar=stack.pop();y=stack.pop();x=stack.pop();cmds.push({cmd:'save'});cmds.push({cmd:'translate',args:[x,y]});var cmap=lookupCmap(font.cmap,String.fromCharCode(font.glyphNameMap[_encodings.StandardEncoding[achar]]));compileCharString(font.glyphs[cmap.glyphId],cmds,font,cmap.glyphId);cmds.push({cmd:'restore'});cmap=lookupCmap(font.cmap,String.fromCharCode(font.glyphNameMap[_encodings.StandardEncoding[bchar]]));compileCharString(font.glyphs[cmap.glyphId],cmds,font,cmap.glyphId)}return;case 18:stems+=stack.length>>1;stackClean=true;break;case 19:stems+=stack.length>>1;i+=stems+7>>3;stackClean=true;break;case 20:stems+=stack.length>>1;i+=stems+7>>3;stackClean=true;break;case 21:y+=stack.pop();x+=stack.pop();moveTo(x,y);stackClean=true;break;case 22:x+=stack.pop();moveTo(x,y);stackClean=true;break;case 23:stems+=stack.length>>1;stackClean=true;break;case 24:while(stack.length>2){xa=x+stack.shift();ya=y+stack.shift();xb=xa+stack.shift();yb=ya+stack.shift();x=xb+stack.shift();y=yb+stack.shift();bezierCurveTo(xa,ya,xb,yb,x,y)}x+=stack.shift();y+=stack.shift();lineTo(x,y);break;case 25:while(stack.length>6){x+=stack.shift();y+=stack.shift();lineTo(x,y)}xa=x+stack.shift();ya=y+stack.shift();xb=xa+stack.shift();yb=ya+stack.shift();x=xb+stack.shift();y=yb+stack.shift();bezierCurveTo(xa,ya,xb,yb,x,y);break;case 26:if(stack.length%2){x+=stack.shift()}while(stack.length>0){xa=x;ya=y+stack.shift();xb=xa+stack.shift();yb=ya+stack.shift();x=xb;y=yb+stack.shift();bezierCurveTo(xa,ya,xb,yb,x,y)}break;case 27:if(stack.length%2){y+=stack.shift()}while(stack.length>0){xa=x+stack.shift();ya=y;xb=xa+stack.shift();yb=ya+stack.shift();x=xb+stack.shift();y=yb;bezierCurveTo(xa,ya,xb,yb,x,y)}break;case 28:stack.push((code[i]<<24|code[i+1]<<16)>>16);i+=2;break;case 29:n=stack.pop()+font.gsubrsBias;subrCode=font.gsubrs[n];if(subrCode){parse(subrCode)}break;case 30:while(stack.length>0){xa=x;ya=y+stack.shift();xb=xa+stack.shift();yb=ya+stack.shift();x=xb+stack.shift();y=yb+(stack.length===1?stack.shift():0);bezierCurveTo(xa,ya,xb,yb,x,y);if(stack.length===0){break}xa=x+stack.shift();ya=y;xb=xa+stack.shift();yb=ya+stack.shift();y=yb+stack.shift();x=xb+(stack.length===1?stack.shift():0);bezierCurveTo(xa,ya,xb,yb,x,y)}break;case 31:while(stack.length>0){xa=x+stack.shift();ya=y;xb=xa+stack.shift();yb=ya+stack.shift();y=yb+stack.shift();x=xb+(stack.length===1?stack.shift():0);bezierCurveTo(xa,ya,xb,yb,x,y);if(stack.length===0){break}xa=x;ya=y+stack.shift();xb=xa+stack.shift();yb=ya+stack.shift();x=xb+stack.shift();y=yb+(stack.length===1?stack.shift():0);bezierCurveTo(xa,ya,xb,yb,x,y)}break;default:if(v<32){throw new _util.FormatError("unknown operator: ".concat(v));}if(v<247){stack.push(v-139)}else if(v<251){stack.push((v-247)*256+code[i++]+108)}else if(v<255){stack.push(-(v-251)*256-code[i++]-108)}else{stack.push((code[i]<<24|code[i+1]<<16|code[i+2]<<8|code[i+3])/65536);i+=4}break}if(stackClean){stack.length=0}}}parse(code)}var NOOP=[];var CompiledFont=function(){function CompiledFont(fontMatrix){_classCallCheck(this,CompiledFont);if(this.constructor===CompiledFont){(0,_util.unreachable)('Cannot initialize CompiledFont.')}this.fontMatrix=fontMatrix;this.compiledGlyphs=Object.create(null);this.compiledCharCodeToGlyphId=Object.create(null)}_createClass(CompiledFont,[{key:"getPathJs",value:function getPathJs(unicode){var cmap=lookupCmap(this.cmap,unicode);var fn=this.compiledGlyphs[cmap.glyphId];if(!fn){fn=this.compileGlyph(this.glyphs[cmap.glyphId],cmap.glyphId);this.compiledGlyphs[cmap.glyphId]=fn}if(this.compiledCharCodeToGlyphId[cmap.charCode]===undefined){this.compiledCharCodeToGlyphId[cmap.charCode]=cmap.glyphId}return fn}},{key:"compileGlyph",value:function compileGlyph(code,glyphId){if(!code||code.length===0||code[0]===14){return NOOP}var fontMatrix=this.fontMatrix;if(this.isCFFCIDFont){var fdIndex=this.fdSelect.getFDIndex(glyphId);if(fdIndex>=0&&fdIndexstackLength){return true}var start=stackLength-howManyArgs;for(var i=start;i>8&0xff,value&0xff)}else{value=65536*value|0;this.output.push(255,value>>24&0xFF,value>>16&0xFF,value>>8&0xFF,value&0xFF)}}this.output.push.apply(this.output,command);if(keepStack){this.stack.splice(start,howManyArgs)}else{this.stack.length=0}return false}};return Type1CharString}();var Type1Parser=function Type1ParserClosure(){var EEXEC_ENCRYPT_KEY=55665;var CHAR_STRS_ENCRYPT_KEY=4330;function isHexDigit(code){return code>=48&&code<=57||code>=65&&code<=70||code>=97&&code<=102}function decrypt(data,key,discardNumber){if(discardNumber>=data.length){return new Uint8Array(0)}var r=key|0,c1=52845,c2=22719,i,j;for(i=0;i>8;r=(value+r)*c1+c2&(1<<16)-1}return decrypted}function decryptAscii(data,key,discardNumber){var r=key|0,c1=52845,c2=22719;var count=data.length,maybeLength=count>>>1;var decrypted=new Uint8Array(maybeLength);var i,j;for(i=0,j=0;i>8;r=(value+r)*c1+c2&(1<<16)-1}}return Array.prototype.slice.call(decrypted,discardNumber,j)}function isSpecial(c){return c===0x2F||c===0x5B||c===0x5D||c===0x7B||c===0x7D||c===0x28||c===0x29}function Type1Parser(stream,encrypted,seacAnalysisEnabled){if(encrypted){var data=stream.getBytes();var isBinary=!(isHexDigit(data[0])&&isHexDigit(data[1])&&isHexDigit(data[2])&&isHexDigit(data[3]));stream=new _stream.Stream(isBinary?decrypt(data,EEXEC_ENCRYPT_KEY,4):decryptAscii(data,EEXEC_ENCRYPT_KEY,4))}this.seacAnalysisEnabled=!!seacAnalysisEnabled;this.stream=stream;this.nextChar()}Type1Parser.prototype={readNumberArray:function Type1Parser_readNumberArray(){this.getToken();var array=[];while(true){var token=this.getToken();if(token===null||token===']'||token==='}'){break}array.push(parseFloat(token||0))}return array},readNumber:function Type1Parser_readNumber(){var token=this.getToken();return parseFloat(token||0)},readInt:function Type1Parser_readInt(){var token=this.getToken();return parseInt(token||0,10)|0},readBoolean:function Type1Parser_readBoolean(){var token=this.getToken();return token==='true'?1:0},nextChar:function Type1_nextChar(){return this.currentChar=this.stream.getByte()},getToken:function Type1Parser_getToken(){var comment=false;var ch=this.currentChar;while(true){if(ch===-1){return null}if(comment){if(ch===0x0A||ch===0x0D){comment=false}}else if(ch===0x25){comment=true}else if(!(0,_util.isSpace)(ch)){break}ch=this.nextChar()}if(isSpecial(ch)){this.nextChar();return String.fromCharCode(ch)}var token='';do{token+=String.fromCharCode(ch);ch=this.nextChar()}while(ch>=0&&!(0,_util.isSpace)(ch)&&!isSpecial(ch));return token},readCharStrings:function Type1Parser_readCharStrings(bytes,lenIV){if(lenIV===-1){return bytes}return decrypt(bytes,CHAR_STRS_ENCRYPT_KEY,lenIV)},extractFontProgram:function Type1Parser_extractFontProgram(){var stream=this.stream;var subrs=[],charstrings=[];var privateData=Object.create(null);privateData['lenIV']=4;var program={subrs:[],charstrings:[],properties:{'privateData':privateData}};var token,length,data,lenIV,encoded;while((token=this.getToken())!==null){if(token!=='/'){continue}token=this.getToken();switch(token){case'CharStrings':this.getToken();this.getToken();this.getToken();this.getToken();while(true){token=this.getToken();if(token===null||token==='end'){break}if(token!=='/'){continue}var glyph=this.getToken();length=this.readInt();this.getToken();data=length>0?stream.getBytes(length):new Uint8Array(0);lenIV=program.properties.privateData['lenIV'];encoded=this.readCharStrings(data,lenIV);this.nextChar();token=this.getToken();if(token==='noaccess'){this.getToken()}charstrings.push({glyph:glyph,encoded:encoded})}break;case'Subrs':this.readInt();this.getToken();while(this.getToken()==='dup'){var index=this.readInt();length=this.readInt();this.getToken();data=length>0?stream.getBytes(length):new Uint8Array(0);lenIV=program.properties.privateData['lenIV'];encoded=this.readCharStrings(data,lenIV);this.nextChar();token=this.getToken();if(token==='noaccess'){this.getToken()}subrs[index]=encoded}break;case'BlueValues':case'OtherBlues':case'FamilyBlues':case'FamilyOtherBlues':var blueArray=this.readNumberArray();if(blueArray.length>0&&blueArray.length%2===0&&HINTING_ENABLED){program.properties.privateData[token]=blueArray}break;case'StemSnapH':case'StemSnapV':program.properties.privateData[token]=this.readNumberArray();break;case'StdHW':case'StdVW':program.properties.privateData[token]=this.readNumberArray()[0];break;case'BlueShift':case'lenIV':case'BlueFuzz':case'BlueScale':case'LanguageGroup':case'ExpansionFactor':program.properties.privateData[token]=this.readNumber();break;case'ForceBold':program.properties.privateData[token]=this.readBoolean();break}}for(var i=0;i=t1||step<=0){(0,_util.info)('Bad shading domain.');return}var color=new Float32Array(cs.numComps),ratio=new Float32Array(1);var rgbColor;for(var i=t0;i<=t1;i+=step){ratio[0]=i;fn(ratio,0,color,0);rgbColor=cs.getRgb(color,0);var cssColor=_util.Util.makeCssRgb(rgbColor[0],rgbColor[1],rgbColor[2]);colorStops.push([(i-t0)/diff,cssColor])}var background='transparent';if(dict.has('Background')){rgbColor=cs.getRgb(dict.get('Background'),0);background=_util.Util.makeCssRgb(rgbColor[0],rgbColor[1],rgbColor[2])}if(!extendStart){colorStops.unshift([0,background]);colorStops[1][0]+=Shadings.SMALL_NUMBER}if(!extendEnd){colorStops[colorStops.length-1][0]-=Shadings.SMALL_NUMBER;colorStops.push([1,background])}this.colorStops=colorStops}RadialAxial.prototype={getIR:function RadialAxial_getIR(){var coordsArr=this.coordsArr;var shadingType=this.shadingType;var type,p0,p1,r0,r1;if(shadingType===ShadingType.AXIAL){p0=[coordsArr[0],coordsArr[1]];p1=[coordsArr[2],coordsArr[3]];r0=null;r1=null;type='axial'}else if(shadingType===ShadingType.RADIAL){p0=[coordsArr[0],coordsArr[1]];p1=[coordsArr[3],coordsArr[4]];r0=coordsArr[2];r1=coordsArr[5];type='radial'}else{(0,_util.unreachable)("getPattern type unknown: ".concat(shadingType))}var matrix=this.matrix;if(matrix){p0=_util.Util.applyTransform(p0,matrix);p1=_util.Util.applyTransform(p1,matrix);if(shadingType===ShadingType.RADIAL){var scale=_util.Util.singularValueDecompose2dScale(matrix);r0*=scale[0];r1*=scale[1]}}return['RadialAxial',type,this.colorStops,p0,p1,r0,r1]}};return RadialAxial}();Shadings.Mesh=function MeshClosure(){function MeshStreamReader(stream,context){this.stream=stream;this.context=context;this.buffer=0;this.bufferLength=0;var numComps=context.numComps;this.tmpCompsBuf=new Float32Array(numComps);var csNumComps=context.colorSpace.numComps;this.tmpCsCompsBuf=context.colorFn?new Float32Array(csNumComps):this.tmpCompsBuf}MeshStreamReader.prototype={get hasData(){if(this.stream.end){return this.stream.pos0){return true}var nextByte=this.stream.getByte();if(nextByte<0){return false}this.buffer=nextByte;this.bufferLength=8;return true},readBits:function MeshStreamReader_readBits(n){var buffer=this.buffer;var bufferLength=this.bufferLength;if(n===32){if(bufferLength===0){return(this.stream.getByte()<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte())>>>0}buffer=buffer<<24|this.stream.getByte()<<16|this.stream.getByte()<<8|this.stream.getByte();var nextByte=this.stream.getByte();this.buffer=nextByte&(1<>bufferLength)>>>0}if(n===8&&bufferLength===0){return this.stream.getByte()}while(bufferLength>bufferLength},align:function MeshStreamReader_align(){this.buffer=0;this.bufferLength=0},readFlag:function MeshStreamReader_readFlag(){return this.readBits(this.context.bitsPerFlag)},readCoordinate:function MeshStreamReader_readCoordinate(){var bitsPerCoordinate=this.context.bitsPerCoordinate;var xi=this.readBits(bitsPerCoordinate);var yi=this.readBits(bitsPerCoordinate);var decode=this.context.decode;var scale=bitsPerCoordinate<32?1/((1<x?x:minX;minY=minY>y?y:minY;maxX=maxX=0;--j){if(types[j]!=='ET'){break}types[j]='EN'}for(j=i+1;j0){before=types[i-1]}var after=eor;if(end+1level&&isOdd(level)){lowestOddLevel=level}}for(level=highestLevel;level>=lowestOddLevel;--level){var start=-1;for(i=0,ii=levels.length;i=0){reverseValues(chars,start,i);start=-1}}else if(start<0){start=i}}if(start>=0){reverseValues(chars,start,levels.length)}}for(i=0,ii=chars.length;i'){chars[i]=''}}return createBidiText(chars.join(''),isLTR)}}),(function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.getMetrics=void 0;var _core_utils=__w_pdfjs_require__(154);var getMetrics=(0,_core_utils.getLookupTableFactory)(function(t){t['Courier']=600;t['Courier-Bold']=600;t['Courier-BoldOblique']=600;t['Courier-Oblique']=600;t['Helvetica']=(0,_core_utils.getLookupTableFactory)(function(t){t['space']=278;t['exclam']=278;t['quotedbl']=355;t['numbersign']=556;t['dollar']=556;t['percent']=889;t['ampersand']=667;t['quoteright']=222;t['parenleft']=333;t['parenright']=333;t['asterisk']=389;t['plus']=584;t['comma']=278;t['hyphen']=333;t['period']=278;t['slash']=278;t['zero']=556;t['one']=556;t['two']=556;t['three']=556;t['four']=556;t['five']=556;t['six']=556;t['seven']=556;t['eight']=556;t['nine']=556;t['colon']=278;t['semicolon']=278;t['less']=584;t['equal']=584;t['greater']=584;t['question']=556;t['at']=1015;t['A']=667;t['B']=667;t['C']=722;t['D']=722;t['E']=667;t['F']=611;t['G']=778;t['H']=722;t['I']=278;t['J']=500;t['K']=667;t['L']=556;t['M']=833;t['N']=722;t['O']=778;t['P']=667;t['Q']=778;t['R']=722;t['S']=667;t['T']=611;t['U']=722;t['V']=667;t['W']=944;t['X']=667;t['Y']=667;t['Z']=611;t['bracketleft']=278;t['backslash']=278;t['bracketright']=278;t['asciicircum']=469;t['underscore']=556;t['quoteleft']=222;t['a']=556;t['b']=556;t['c']=500;t['d']=556;t['e']=556;t['f']=278;t['g']=556;t['h']=556;t['i']=222;t['j']=222;t['k']=500;t['l']=222;t['m']=833;t['n']=556;t['o']=556;t['p']=556;t['q']=556;t['r']=333;t['s']=500;t['t']=278;t['u']=556;t['v']=500;t['w']=722;t['x']=500;t['y']=500;t['z']=500;t['braceleft']=334;t['bar']=260;t['braceright']=334;t['asciitilde']=584;t['exclamdown']=333;t['cent']=556;t['sterling']=556;t['fraction']=167;t['yen']=556;t['florin']=556;t['section']=556;t['currency']=556;t['quotesingle']=191;t['quotedblleft']=333;t['guillemotleft']=556;t['guilsinglleft']=333;t['guilsinglright']=333;t['fi']=500;t['fl']=500;t['endash']=556;t['dagger']=556;t['daggerdbl']=556;t['periodcentered']=278;t['paragraph']=537;t['bullet']=350;t['quotesinglbase']=222;t['quotedblbase']=333;t['quotedblright']=333;t['guillemotright']=556;t['ellipsis']=1000;t['perthousand']=1000;t['questiondown']=611;t['grave']=333;t['acute']=333;t['circumflex']=333;t['tilde']=333;t['macron']=333;t['breve']=333;t['dotaccent']=333;t['dieresis']=333;t['ring']=333;t['cedilla']=333;t['hungarumlaut']=333;t['ogonek']=333;t['caron']=333;t['emdash']=1000;t['AE']=1000;t['ordfeminine']=370;t['Lslash']=556;t['Oslash']=778;t['OE']=1000;t['ordmasculine']=365;t['ae']=889;t['dotlessi']=278;t['lslash']=222;t['oslash']=611;t['oe']=944;t['germandbls']=611;t['Idieresis']=278;t['eacute']=556;t['abreve']=556;t['uhungarumlaut']=556;t['ecaron']=556;t['Ydieresis']=667;t['divide']=584;t['Yacute']=667;t['Acircumflex']=667;t['aacute']=556;t['Ucircumflex']=722;t['yacute']=500;t['scommaaccent']=500;t['ecircumflex']=556;t['Uring']=722;t['Udieresis']=722;t['aogonek']=556;t['Uacute']=722;t['uogonek']=556;t['Edieresis']=667;t['Dcroat']=722;t['commaaccent']=250;t['copyright']=737;t['Emacron']=667;t['ccaron']=500;t['aring']=556;t['Ncommaaccent']=722;t['lacute']=222;t['agrave']=556;t['Tcommaaccent']=611;t['Cacute']=722;t['atilde']=556;t['Edotaccent']=667;t['scaron']=500;t['scedilla']=500;t['iacute']=278;t['lozenge']=471;t['Rcaron']=722;t['Gcommaaccent']=778;t['ucircumflex']=556;t['acircumflex']=556;t['Amacron']=667;t['rcaron']=333;t['ccedilla']=500;t['Zdotaccent']=611;t['Thorn']=667;t['Omacron']=778;t['Racute']=722;t['Sacute']=667;t['dcaron']=643;t['Umacron']=722;t['uring']=556;t['threesuperior']=333;t['Ograve']=778;t['Agrave']=667;t['Abreve']=667;t['multiply']=584;t['uacute']=556;t['Tcaron']=611;t['partialdiff']=476;t['ydieresis']=500;t['Nacute']=722;t['icircumflex']=278;t['Ecircumflex']=667;t['adieresis']=556;t['edieresis']=556;t['cacute']=500;t['nacute']=556;t['umacron']=556;t['Ncaron']=722;t['Iacute']=278;t['plusminus']=584;t['brokenbar']=260;t['registered']=737;t['Gbreve']=778;t['Idotaccent']=278;t['summation']=600;t['Egrave']=667;t['racute']=333;t['omacron']=556;t['Zacute']=611;t['Zcaron']=611;t['greaterequal']=549;t['Eth']=722;t['Ccedilla']=722;t['lcommaaccent']=222;t['tcaron']=317;t['eogonek']=556;t['Uogonek']=722;t['Aacute']=667;t['Adieresis']=667;t['egrave']=556;t['zacute']=500;t['iogonek']=222;t['Oacute']=778;t['oacute']=556;t['amacron']=556;t['sacute']=500;t['idieresis']=278;t['Ocircumflex']=778;t['Ugrave']=722;t['Delta']=612;t['thorn']=556;t['twosuperior']=333;t['Odieresis']=778;t['mu']=556;t['igrave']=278;t['ohungarumlaut']=556;t['Eogonek']=667;t['dcroat']=556;t['threequarters']=834;t['Scedilla']=667;t['lcaron']=299;t['Kcommaaccent']=667;t['Lacute']=556;t['trademark']=1000;t['edotaccent']=556;t['Igrave']=278;t['Imacron']=278;t['Lcaron']=556;t['onehalf']=834;t['lessequal']=549;t['ocircumflex']=556;t['ntilde']=556;t['Uhungarumlaut']=722;t['Eacute']=667;t['emacron']=556;t['gbreve']=556;t['onequarter']=834;t['Scaron']=667;t['Scommaaccent']=667;t['Ohungarumlaut']=778;t['degree']=400;t['ograve']=556;t['Ccaron']=722;t['ugrave']=556;t['radical']=453;t['Dcaron']=722;t['rcommaaccent']=333;t['Ntilde']=722;t['otilde']=556;t['Rcommaaccent']=722;t['Lcommaaccent']=556;t['Atilde']=667;t['Aogonek']=667;t['Aring']=667;t['Otilde']=778;t['zdotaccent']=500;t['Ecaron']=667;t['Iogonek']=278;t['kcommaaccent']=500;t['minus']=584;t['Icircumflex']=278;t['ncaron']=556;t['tcommaaccent']=278;t['logicalnot']=584;t['odieresis']=556;t['udieresis']=556;t['notequal']=549;t['gcommaaccent']=556;t['eth']=556;t['zcaron']=500;t['ncommaaccent']=556;t['onesuperior']=333;t['imacron']=278;t['Euro']=556});t['Helvetica-Bold']=(0,_core_utils.getLookupTableFactory)(function(t){t['space']=278;t['exclam']=333;t['quotedbl']=474;t['numbersign']=556;t['dollar']=556;t['percent']=889;t['ampersand']=722;t['quoteright']=278;t['parenleft']=333;t['parenright']=333;t['asterisk']=389;t['plus']=584;t['comma']=278;t['hyphen']=333;t['period']=278;t['slash']=278;t['zero']=556;t['one']=556;t['two']=556;t['three']=556;t['four']=556;t['five']=556;t['six']=556;t['seven']=556;t['eight']=556;t['nine']=556;t['colon']=333;t['semicolon']=333;t['less']=584;t['equal']=584;t['greater']=584;t['question']=611;t['at']=975;t['A']=722;t['B']=722;t['C']=722;t['D']=722;t['E']=667;t['F']=611;t['G']=778;t['H']=722;t['I']=278;t['J']=556;t['K']=722;t['L']=611;t['M']=833;t['N']=722;t['O']=778;t['P']=667;t['Q']=778;t['R']=722;t['S']=667;t['T']=611;t['U']=722;t['V']=667;t['W']=944;t['X']=667;t['Y']=667;t['Z']=611;t['bracketleft']=333;t['backslash']=278;t['bracketright']=333;t['asciicircum']=584;t['underscore']=556;t['quoteleft']=278;t['a']=556;t['b']=611;t['c']=556;t['d']=611;t['e']=556;t['f']=333;t['g']=611;t['h']=611;t['i']=278;t['j']=278;t['k']=556;t['l']=278;t['m']=889;t['n']=611;t['o']=611;t['p']=611;t['q']=611;t['r']=389;t['s']=556;t['t']=333;t['u']=611;t['v']=556;t['w']=778;t['x']=556;t['y']=556;t['z']=500;t['braceleft']=389;t['bar']=280;t['braceright']=389;t['asciitilde']=584;t['exclamdown']=333;t['cent']=556;t['sterling']=556;t['fraction']=167;t['yen']=556;t['florin']=556;t['section']=556;t['currency']=556;t['quotesingle']=238;t['quotedblleft']=500;t['guillemotleft']=556;t['guilsinglleft']=333;t['guilsinglright']=333;t['fi']=611;t['fl']=611;t['endash']=556;t['dagger']=556;t['daggerdbl']=556;t['periodcentered']=278;t['paragraph']=556;t['bullet']=350;t['quotesinglbase']=278;t['quotedblbase']=500;t['quotedblright']=500;t['guillemotright']=556;t['ellipsis']=1000;t['perthousand']=1000;t['questiondown']=611;t['grave']=333;t['acute']=333;t['circumflex']=333;t['tilde']=333;t['macron']=333;t['breve']=333;t['dotaccent']=333;t['dieresis']=333;t['ring']=333;t['cedilla']=333;t['hungarumlaut']=333;t['ogonek']=333;t['caron']=333;t['emdash']=1000;t['AE']=1000;t['ordfeminine']=370;t['Lslash']=611;t['Oslash']=778;t['OE']=1000;t['ordmasculine']=365;t['ae']=889;t['dotlessi']=278;t['lslash']=278;t['oslash']=611;t['oe']=944;t['germandbls']=611;t['Idieresis']=278;t['eacute']=556;t['abreve']=556;t['uhungarumlaut']=611;t['ecaron']=556;t['Ydieresis']=667;t['divide']=584;t['Yacute']=667;t['Acircumflex']=722;t['aacute']=556;t['Ucircumflex']=722;t['yacute']=556;t['scommaaccent']=556;t['ecircumflex']=556;t['Uring']=722;t['Udieresis']=722;t['aogonek']=556;t['Uacute']=722;t['uogonek']=611;t['Edieresis']=667;t['Dcroat']=722;t['commaaccent']=250;t['copyright']=737;t['Emacron']=667;t['ccaron']=556;t['aring']=556;t['Ncommaaccent']=722;t['lacute']=278;t['agrave']=556;t['Tcommaaccent']=611;t['Cacute']=722;t['atilde']=556;t['Edotaccent']=667;t['scaron']=556;t['scedilla']=556;t['iacute']=278;t['lozenge']=494;t['Rcaron']=722;t['Gcommaaccent']=778;t['ucircumflex']=611;t['acircumflex']=556;t['Amacron']=722;t['rcaron']=389;t['ccedilla']=556;t['Zdotaccent']=611;t['Thorn']=667;t['Omacron']=778;t['Racute']=722;t['Sacute']=667;t['dcaron']=743;t['Umacron']=722;t['uring']=611;t['threesuperior']=333;t['Ograve']=778;t['Agrave']=722;t['Abreve']=722;t['multiply']=584;t['uacute']=611;t['Tcaron']=611;t['partialdiff']=494;t['ydieresis']=556;t['Nacute']=722;t['icircumflex']=278;t['Ecircumflex']=667;t['adieresis']=556;t['edieresis']=556;t['cacute']=556;t['nacute']=611;t['umacron']=611;t['Ncaron']=722;t['Iacute']=278;t['plusminus']=584;t['brokenbar']=280;t['registered']=737;t['Gbreve']=778;t['Idotaccent']=278;t['summation']=600;t['Egrave']=667;t['racute']=389;t['omacron']=611;t['Zacute']=611;t['Zcaron']=611;t['greaterequal']=549;t['Eth']=722;t['Ccedilla']=722;t['lcommaaccent']=278;t['tcaron']=389;t['eogonek']=556;t['Uogonek']=722;t['Aacute']=722;t['Adieresis']=722;t['egrave']=556;t['zacute']=500;t['iogonek']=278;t['Oacute']=778;t['oacute']=611;t['amacron']=556;t['sacute']=556;t['idieresis']=278;t['Ocircumflex']=778;t['Ugrave']=722;t['Delta']=612;t['thorn']=611;t['twosuperior']=333;t['Odieresis']=778;t['mu']=611;t['igrave']=278;t['ohungarumlaut']=611;t['Eogonek']=667;t['dcroat']=611;t['threequarters']=834;t['Scedilla']=667;t['lcaron']=400;t['Kcommaaccent']=722;t['Lacute']=611;t['trademark']=1000;t['edotaccent']=556;t['Igrave']=278;t['Imacron']=278;t['Lcaron']=611;t['onehalf']=834;t['lessequal']=549;t['ocircumflex']=611;t['ntilde']=611;t['Uhungarumlaut']=722;t['Eacute']=667;t['emacron']=556;t['gbreve']=611;t['onequarter']=834;t['Scaron']=667;t['Scommaaccent']=667;t['Ohungarumlaut']=778;t['degree']=400;t['ograve']=611;t['Ccaron']=722;t['ugrave']=611;t['radical']=549;t['Dcaron']=722;t['rcommaaccent']=389;t['Ntilde']=722;t['otilde']=611;t['Rcommaaccent']=722;t['Lcommaaccent']=611;t['Atilde']=722;t['Aogonek']=722;t['Aring']=722;t['Otilde']=778;t['zdotaccent']=500;t['Ecaron']=667;t['Iogonek']=278;t['kcommaaccent']=556;t['minus']=584;t['Icircumflex']=278;t['ncaron']=611;t['tcommaaccent']=333;t['logicalnot']=584;t['odieresis']=611;t['udieresis']=611;t['notequal']=549;t['gcommaaccent']=611;t['eth']=611;t['zcaron']=500;t['ncommaaccent']=611;t['onesuperior']=333;t['imacron']=278;t['Euro']=556});t['Helvetica-BoldOblique']=(0,_core_utils.getLookupTableFactory)(function(t){t['space']=278;t['exclam']=333;t['quotedbl']=474;t['numbersign']=556;t['dollar']=556;t['percent']=889;t['ampersand']=722;t['quoteright']=278;t['parenleft']=333;t['parenright']=333;t['asterisk']=389;t['plus']=584;t['comma']=278;t['hyphen']=333;t['period']=278;t['slash']=278;t['zero']=556;t['one']=556;t['two']=556;t['three']=556;t['four']=556;t['five']=556;t['six']=556;t['seven']=556;t['eight']=556;t['nine']=556;t['colon']=333;t['semicolon']=333;t['less']=584;t['equal']=584;t['greater']=584;t['question']=611;t['at']=975;t['A']=722;t['B']=722;t['C']=722;t['D']=722;t['E']=667;t['F']=611;t['G']=778;t['H']=722;t['I']=278;t['J']=556;t['K']=722;t['L']=611;t['M']=833;t['N']=722;t['O']=778;t['P']=667;t['Q']=778;t['R']=722;t['S']=667;t['T']=611;t['U']=722;t['V']=667;t['W']=944;t['X']=667;t['Y']=667;t['Z']=611;t['bracketleft']=333;t['backslash']=278;t['bracketright']=333;t['asciicircum']=584;t['underscore']=556;t['quoteleft']=278;t['a']=556;t['b']=611;t['c']=556;t['d']=611;t['e']=556;t['f']=333;t['g']=611;t['h']=611;t['i']=278;t['j']=278;t['k']=556;t['l']=278;t['m']=889;t['n']=611;t['o']=611;t['p']=611;t['q']=611;t['r']=389;t['s']=556;t['t']=333;t['u']=611;t['v']=556;t['w']=778;t['x']=556;t['y']=556;t['z']=500;t['braceleft']=389;t['bar']=280;t['braceright']=389;t['asciitilde']=584;t['exclamdown']=333;t['cent']=556;t['sterling']=556;t['fraction']=167;t['yen']=556;t['florin']=556;t['section']=556;t['currency']=556;t['quotesingle']=238;t['quotedblleft']=500;t['guillemotleft']=556;t['guilsinglleft']=333;t['guilsinglright']=333;t['fi']=611;t['fl']=611;t['endash']=556;t['dagger']=556;t['daggerdbl']=556;t['periodcentered']=278;t['paragraph']=556;t['bullet']=350;t['quotesinglbase']=278;t['quotedblbase']=500;t['quotedblright']=500;t['guillemotright']=556;t['ellipsis']=1000;t['perthousand']=1000;t['questiondown']=611;t['grave']=333;t['acute']=333;t['circumflex']=333;t['tilde']=333;t['macron']=333;t['breve']=333;t['dotaccent']=333;t['dieresis']=333;t['ring']=333;t['cedilla']=333;t['hungarumlaut']=333;t['ogonek']=333;t['caron']=333;t['emdash']=1000;t['AE']=1000;t['ordfeminine']=370;t['Lslash']=611;t['Oslash']=778;t['OE']=1000;t['ordmasculine']=365;t['ae']=889;t['dotlessi']=278;t['lslash']=278;t['oslash']=611;t['oe']=944;t['germandbls']=611;t['Idieresis']=278;t['eacute']=556;t['abreve']=556;t['uhungarumlaut']=611;t['ecaron']=556;t['Ydieresis']=667;t['divide']=584;t['Yacute']=667;t['Acircumflex']=722;t['aacute']=556;t['Ucircumflex']=722;t['yacute']=556;t['scommaaccent']=556;t['ecircumflex']=556;t['Uring']=722;t['Udieresis']=722;t['aogonek']=556;t['Uacute']=722;t['uogonek']=611;t['Edieresis']=667;t['Dcroat']=722;t['commaaccent']=250;t['copyright']=737;t['Emacron']=667;t['ccaron']=556;t['aring']=556;t['Ncommaaccent']=722;t['lacute']=278;t['agrave']=556;t['Tcommaaccent']=611;t['Cacute']=722;t['atilde']=556;t['Edotaccent']=667;t['scaron']=556;t['scedilla']=556;t['iacute']=278;t['lozenge']=494;t['Rcaron']=722;t['Gcommaaccent']=778;t['ucircumflex']=611;t['acircumflex']=556;t['Amacron']=722;t['rcaron']=389;t['ccedilla']=556;t['Zdotaccent']=611;t['Thorn']=667;t['Omacron']=778;t['Racute']=722;t['Sacute']=667;t['dcaron']=743;t['Umacron']=722;t['uring']=611;t['threesuperior']=333;t['Ograve']=778;t['Agrave']=722;t['Abreve']=722;t['multiply']=584;t['uacute']=611;t['Tcaron']=611;t['partialdiff']=494;t['ydieresis']=556;t['Nacute']=722;t['icircumflex']=278;t['Ecircumflex']=667;t['adieresis']=556;t['edieresis']=556;t['cacute']=556;t['nacute']=611;t['umacron']=611;t['Ncaron']=722;t['Iacute']=278;t['plusminus']=584;t['brokenbar']=280;t['registered']=737;t['Gbreve']=778;t['Idotaccent']=278;t['summation']=600;t['Egrave']=667;t['racute']=389;t['omacron']=611;t['Zacute']=611;t['Zcaron']=611;t['greaterequal']=549;t['Eth']=722;t['Ccedilla']=722;t['lcommaaccent']=278;t['tcaron']=389;t['eogonek']=556;t['Uogonek']=722;t['Aacute']=722;t['Adieresis']=722;t['egrave']=556;t['zacute']=500;t['iogonek']=278;t['Oacute']=778;t['oacute']=611;t['amacron']=556;t['sacute']=556;t['idieresis']=278;t['Ocircumflex']=778;t['Ugrave']=722;t['Delta']=612;t['thorn']=611;t['twosuperior']=333;t['Odieresis']=778;t['mu']=611;t['igrave']=278;t['ohungarumlaut']=611;t['Eogonek']=667;t['dcroat']=611;t['threequarters']=834;t['Scedilla']=667;t['lcaron']=400;t['Kcommaaccent']=722;t['Lacute']=611;t['trademark']=1000;t['edotaccent']=556;t['Igrave']=278;t['Imacron']=278;t['Lcaron']=611;t['onehalf']=834;t['lessequal']=549;t['ocircumflex']=611;t['ntilde']=611;t['Uhungarumlaut']=722;t['Eacute']=667;t['emacron']=556;t['gbreve']=611;t['onequarter']=834;t['Scaron']=667;t['Scommaaccent']=667;t['Ohungarumlaut']=778;t['degree']=400;t['ograve']=611;t['Ccaron']=722;t['ugrave']=611;t['radical']=549;t['Dcaron']=722;t['rcommaaccent']=389;t['Ntilde']=722;t['otilde']=611;t['Rcommaaccent']=722;t['Lcommaaccent']=611;t['Atilde']=722;t['Aogonek']=722;t['Aring']=722;t['Otilde']=778;t['zdotaccent']=500;t['Ecaron']=667;t['Iogonek']=278;t['kcommaaccent']=556;t['minus']=584;t['Icircumflex']=278;t['ncaron']=611;t['tcommaaccent']=333;t['logicalnot']=584;t['odieresis']=611;t['udieresis']=611;t['notequal']=549;t['gcommaaccent']=611;t['eth']=611;t['zcaron']=500;t['ncommaaccent']=611;t['onesuperior']=333;t['imacron']=278;t['Euro']=556});t['Helvetica-Oblique']=(0,_core_utils.getLookupTableFactory)(function(t){t['space']=278;t['exclam']=278;t['quotedbl']=355;t['numbersign']=556;t['dollar']=556;t['percent']=889;t['ampersand']=667;t['quoteright']=222;t['parenleft']=333;t['parenright']=333;t['asterisk']=389;t['plus']=584;t['comma']=278;t['hyphen']=333;t['period']=278;t['slash']=278;t['zero']=556;t['one']=556;t['two']=556;t['three']=556;t['four']=556;t['five']=556;t['six']=556;t['seven']=556;t['eight']=556;t['nine']=556;t['colon']=278;t['semicolon']=278;t['less']=584;t['equal']=584;t['greater']=584;t['question']=556;t['at']=1015;t['A']=667;t['B']=667;t['C']=722;t['D']=722;t['E']=667;t['F']=611;t['G']=778;t['H']=722;t['I']=278;t['J']=500;t['K']=667;t['L']=556;t['M']=833;t['N']=722;t['O']=778;t['P']=667;t['Q']=778;t['R']=722;t['S']=667;t['T']=611;t['U']=722;t['V']=667;t['W']=944;t['X']=667;t['Y']=667;t['Z']=611;t['bracketleft']=278;t['backslash']=278;t['bracketright']=278;t['asciicircum']=469;t['underscore']=556;t['quoteleft']=222;t['a']=556;t['b']=556;t['c']=500;t['d']=556;t['e']=556;t['f']=278;t['g']=556;t['h']=556;t['i']=222;t['j']=222;t['k']=500;t['l']=222;t['m']=833;t['n']=556;t['o']=556;t['p']=556;t['q']=556;t['r']=333;t['s']=500;t['t']=278;t['u']=556;t['v']=500;t['w']=722;t['x']=500;t['y']=500;t['z']=500;t['braceleft']=334;t['bar']=260;t['braceright']=334;t['asciitilde']=584;t['exclamdown']=333;t['cent']=556;t['sterling']=556;t['fraction']=167;t['yen']=556;t['florin']=556;t['section']=556;t['currency']=556;t['quotesingle']=191;t['quotedblleft']=333;t['guillemotleft']=556;t['guilsinglleft']=333;t['guilsinglright']=333;t['fi']=500;t['fl']=500;t['endash']=556;t['dagger']=556;t['daggerdbl']=556;t['periodcentered']=278;t['paragraph']=537;t['bullet']=350;t['quotesinglbase']=222;t['quotedblbase']=333;t['quotedblright']=333;t['guillemotright']=556;t['ellipsis']=1000;t['perthousand']=1000;t['questiondown']=611;t['grave']=333;t['acute']=333;t['circumflex']=333;t['tilde']=333;t['macron']=333;t['breve']=333;t['dotaccent']=333;t['dieresis']=333;t['ring']=333;t['cedilla']=333;t['hungarumlaut']=333;t['ogonek']=333;t['caron']=333;t['emdash']=1000;t['AE']=1000;t['ordfeminine']=370;t['Lslash']=556;t['Oslash']=778;t['OE']=1000;t['ordmasculine']=365;t['ae']=889;t['dotlessi']=278;t['lslash']=222;t['oslash']=611;t['oe']=944;t['germandbls']=611;t['Idieresis']=278;t['eacute']=556;t['abreve']=556;t['uhungarumlaut']=556;t['ecaron']=556;t['Ydieresis']=667;t['divide']=584;t['Yacute']=667;t['Acircumflex']=667;t['aacute']=556;t['Ucircumflex']=722;t['yacute']=500;t['scommaaccent']=500;t['ecircumflex']=556;t['Uring']=722;t['Udieresis']=722;t['aogonek']=556;t['Uacute']=722;t['uogonek']=556;t['Edieresis']=667;t['Dcroat']=722;t['commaaccent']=250;t['copyright']=737;t['Emacron']=667;t['ccaron']=500;t['aring']=556;t['Ncommaaccent']=722;t['lacute']=222;t['agrave']=556;t['Tcommaaccent']=611;t['Cacute']=722;t['atilde']=556;t['Edotaccent']=667;t['scaron']=500;t['scedilla']=500;t['iacute']=278;t['lozenge']=471;t['Rcaron']=722;t['Gcommaaccent']=778;t['ucircumflex']=556;t['acircumflex']=556;t['Amacron']=667;t['rcaron']=333;t['ccedilla']=500;t['Zdotaccent']=611;t['Thorn']=667;t['Omacron']=778;t['Racute']=722;t['Sacute']=667;t['dcaron']=643;t['Umacron']=722;t['uring']=556;t['threesuperior']=333;t['Ograve']=778;t['Agrave']=667;t['Abreve']=667;t['multiply']=584;t['uacute']=556;t['Tcaron']=611;t['partialdiff']=476;t['ydieresis']=500;t['Nacute']=722;t['icircumflex']=278;t['Ecircumflex']=667;t['adieresis']=556;t['edieresis']=556;t['cacute']=500;t['nacute']=556;t['umacron']=556;t['Ncaron']=722;t['Iacute']=278;t['plusminus']=584;t['brokenbar']=260;t['registered']=737;t['Gbreve']=778;t['Idotaccent']=278;t['summation']=600;t['Egrave']=667;t['racute']=333;t['omacron']=556;t['Zacute']=611;t['Zcaron']=611;t['greaterequal']=549;t['Eth']=722;t['Ccedilla']=722;t['lcommaaccent']=222;t['tcaron']=317;t['eogonek']=556;t['Uogonek']=722;t['Aacute']=667;t['Adieresis']=667;t['egrave']=556;t['zacute']=500;t['iogonek']=222;t['Oacute']=778;t['oacute']=556;t['amacron']=556;t['sacute']=500;t['idieresis']=278;t['Ocircumflex']=778;t['Ugrave']=722;t['Delta']=612;t['thorn']=556;t['twosuperior']=333;t['Odieresis']=778;t['mu']=556;t['igrave']=278;t['ohungarumlaut']=556;t['Eogonek']=667;t['dcroat']=556;t['threequarters']=834;t['Scedilla']=667;t['lcaron']=299;t['Kcommaaccent']=667;t['Lacute']=556;t['trademark']=1000;t['edotaccent']=556;t['Igrave']=278;t['Imacron']=278;t['Lcaron']=556;t['onehalf']=834;t['lessequal']=549;t['ocircumflex']=556;t['ntilde']=556;t['Uhungarumlaut']=722;t['Eacute']=667;t['emacron']=556;t['gbreve']=556;t['onequarter']=834;t['Scaron']=667;t['Scommaaccent']=667;t['Ohungarumlaut']=778;t['degree']=400;t['ograve']=556;t['Ccaron']=722;t['ugrave']=556;t['radical']=453;t['Dcaron']=722;t['rcommaaccent']=333;t['Ntilde']=722;t['otilde']=556;t['Rcommaaccent']=722;t['Lcommaaccent']=556;t['Atilde']=667;t['Aogonek']=667;t['Aring']=667;t['Otilde']=778;t['zdotaccent']=500;t['Ecaron']=667;t['Iogonek']=278;t['kcommaaccent']=500;t['minus']=584;t['Icircumflex']=278;t['ncaron']=556;t['tcommaaccent']=278;t['logicalnot']=584;t['odieresis']=556;t['udieresis']=556;t['notequal']=549;t['gcommaaccent']=556;t['eth']=556;t['zcaron']=500;t['ncommaaccent']=556;t['onesuperior']=333;t['imacron']=278;t['Euro']=556});t['Symbol']=(0,_core_utils.getLookupTableFactory)(function(t){t['space']=250;t['exclam']=333;t['universal']=713;t['numbersign']=500;t['existential']=549;t['percent']=833;t['ampersand']=778;t['suchthat']=439;t['parenleft']=333;t['parenright']=333;t['asteriskmath']=500;t['plus']=549;t['comma']=250;t['minus']=549;t['period']=250;t['slash']=278;t['zero']=500;t['one']=500;t['two']=500;t['three']=500;t['four']=500;t['five']=500;t['six']=500;t['seven']=500;t['eight']=500;t['nine']=500;t['colon']=278;t['semicolon']=278;t['less']=549;t['equal']=549;t['greater']=549;t['question']=444;t['congruent']=549;t['Alpha']=722;t['Beta']=667;t['Chi']=722;t['Delta']=612;t['Epsilon']=611;t['Phi']=763;t['Gamma']=603;t['Eta']=722;t['Iota']=333;t['theta1']=631;t['Kappa']=722;t['Lambda']=686;t['Mu']=889;t['Nu']=722;t['Omicron']=722;t['Pi']=768;t['Theta']=741;t['Rho']=556;t['Sigma']=592;t['Tau']=611;t['Upsilon']=690;t['sigma1']=439;t['Omega']=768;t['Xi']=645;t['Psi']=795;t['Zeta']=611;t['bracketleft']=333;t['therefore']=863;t['bracketright']=333;t['perpendicular']=658;t['underscore']=500;t['radicalex']=500;t['alpha']=631;t['beta']=549;t['chi']=549;t['delta']=494;t['epsilon']=439;t['phi']=521;t['gamma']=411;t['eta']=603;t['iota']=329;t['phi1']=603;t['kappa']=549;t['lambda']=549;t['mu']=576;t['nu']=521;t['omicron']=549;t['pi']=549;t['theta']=521;t['rho']=549;t['sigma']=603;t['tau']=439;t['upsilon']=576;t['omega1']=713;t['omega']=686;t['xi']=493;t['psi']=686;t['zeta']=494;t['braceleft']=480;t['bar']=200;t['braceright']=480;t['similar']=549;t['Euro']=750;t['Upsilon1']=620;t['minute']=247;t['lessequal']=549;t['fraction']=167;t['infinity']=713;t['florin']=500;t['club']=753;t['diamond']=753;t['heart']=753;t['spade']=753;t['arrowboth']=1042;t['arrowleft']=987;t['arrowup']=603;t['arrowright']=987;t['arrowdown']=603;t['degree']=400;t['plusminus']=549;t['second']=411;t['greaterequal']=549;t['multiply']=549;t['proportional']=713;t['partialdiff']=494;t['bullet']=460;t['divide']=549;t['notequal']=549;t['equivalence']=549;t['approxequal']=549;t['ellipsis']=1000;t['arrowvertex']=603;t['arrowhorizex']=1000;t['carriagereturn']=658;t['aleph']=823;t['Ifraktur']=686;t['Rfraktur']=795;t['weierstrass']=987;t['circlemultiply']=768;t['circleplus']=768;t['emptyset']=823;t['intersection']=768;t['union']=768;t['propersuperset']=713;t['reflexsuperset']=713;t['notsubset']=713;t['propersubset']=713;t['reflexsubset']=713;t['element']=713;t['notelement']=713;t['angle']=768;t['gradient']=713;t['registerserif']=790;t['copyrightserif']=790;t['trademarkserif']=890;t['product']=823;t['radical']=549;t['dotmath']=250;t['logicalnot']=713;t['logicaland']=603;t['logicalor']=603;t['arrowdblboth']=1042;t['arrowdblleft']=987;t['arrowdblup']=603;t['arrowdblright']=987;t['arrowdbldown']=603;t['lozenge']=494;t['angleleft']=329;t['registersans']=790;t['copyrightsans']=790;t['trademarksans']=786;t['summation']=713;t['parenlefttp']=384;t['parenleftex']=384;t['parenleftbt']=384;t['bracketlefttp']=384;t['bracketleftex']=384;t['bracketleftbt']=384;t['bracelefttp']=494;t['braceleftmid']=494;t['braceleftbt']=494;t['braceex']=494;t['angleright']=329;t['integral']=274;t['integraltp']=686;t['integralex']=686;t['integralbt']=686;t['parenrighttp']=384;t['parenrightex']=384;t['parenrightbt']=384;t['bracketrighttp']=384;t['bracketrightex']=384;t['bracketrightbt']=384;t['bracerighttp']=494;t['bracerightmid']=494;t['bracerightbt']=494;t['apple']=790});t['Times-Roman']=(0,_core_utils.getLookupTableFactory)(function(t){t['space']=250;t['exclam']=333;t['quotedbl']=408;t['numbersign']=500;t['dollar']=500;t['percent']=833;t['ampersand']=778;t['quoteright']=333;t['parenleft']=333;t['parenright']=333;t['asterisk']=500;t['plus']=564;t['comma']=250;t['hyphen']=333;t['period']=250;t['slash']=278;t['zero']=500;t['one']=500;t['two']=500;t['three']=500;t['four']=500;t['five']=500;t['six']=500;t['seven']=500;t['eight']=500;t['nine']=500;t['colon']=278;t['semicolon']=278;t['less']=564;t['equal']=564;t['greater']=564;t['question']=444;t['at']=921;t['A']=722;t['B']=667;t['C']=667;t['D']=722;t['E']=611;t['F']=556;t['G']=722;t['H']=722;t['I']=333;t['J']=389;t['K']=722;t['L']=611;t['M']=889;t['N']=722;t['O']=722;t['P']=556;t['Q']=722;t['R']=667;t['S']=556;t['T']=611;t['U']=722;t['V']=722;t['W']=944;t['X']=722;t['Y']=722;t['Z']=611;t['bracketleft']=333;t['backslash']=278;t['bracketright']=333;t['asciicircum']=469;t['underscore']=500;t['quoteleft']=333;t['a']=444;t['b']=500;t['c']=444;t['d']=500;t['e']=444;t['f']=333;t['g']=500;t['h']=500;t['i']=278;t['j']=278;t['k']=500;t['l']=278;t['m']=778;t['n']=500;t['o']=500;t['p']=500;t['q']=500;t['r']=333;t['s']=389;t['t']=278;t['u']=500;t['v']=500;t['w']=722;t['x']=500;t['y']=500;t['z']=444;t['braceleft']=480;t['bar']=200;t['braceright']=480;t['asciitilde']=541;t['exclamdown']=333;t['cent']=500;t['sterling']=500;t['fraction']=167;t['yen']=500;t['florin']=500;t['section']=500;t['currency']=500;t['quotesingle']=180;t['quotedblleft']=444;t['guillemotleft']=500;t['guilsinglleft']=333;t['guilsinglright']=333;t['fi']=556;t['fl']=556;t['endash']=500;t['dagger']=500;t['daggerdbl']=500;t['periodcentered']=250;t['paragraph']=453;t['bullet']=350;t['quotesinglbase']=333;t['quotedblbase']=444;t['quotedblright']=444;t['guillemotright']=500;t['ellipsis']=1000;t['perthousand']=1000;t['questiondown']=444;t['grave']=333;t['acute']=333;t['circumflex']=333;t['tilde']=333;t['macron']=333;t['breve']=333;t['dotaccent']=333;t['dieresis']=333;t['ring']=333;t['cedilla']=333;t['hungarumlaut']=333;t['ogonek']=333;t['caron']=333;t['emdash']=1000;t['AE']=889;t['ordfeminine']=276;t['Lslash']=611;t['Oslash']=722;t['OE']=889;t['ordmasculine']=310;t['ae']=667;t['dotlessi']=278;t['lslash']=278;t['oslash']=500;t['oe']=722;t['germandbls']=500;t['Idieresis']=333;t['eacute']=444;t['abreve']=444;t['uhungarumlaut']=500;t['ecaron']=444;t['Ydieresis']=722;t['divide']=564;t['Yacute']=722;t['Acircumflex']=722;t['aacute']=444;t['Ucircumflex']=722;t['yacute']=500;t['scommaaccent']=389;t['ecircumflex']=444;t['Uring']=722;t['Udieresis']=722;t['aogonek']=444;t['Uacute']=722;t['uogonek']=500;t['Edieresis']=611;t['Dcroat']=722;t['commaaccent']=250;t['copyright']=760;t['Emacron']=611;t['ccaron']=444;t['aring']=444;t['Ncommaaccent']=722;t['lacute']=278;t['agrave']=444;t['Tcommaaccent']=611;t['Cacute']=667;t['atilde']=444;t['Edotaccent']=611;t['scaron']=389;t['scedilla']=389;t['iacute']=278;t['lozenge']=471;t['Rcaron']=667;t['Gcommaaccent']=722;t['ucircumflex']=500;t['acircumflex']=444;t['Amacron']=722;t['rcaron']=333;t['ccedilla']=444;t['Zdotaccent']=611;t['Thorn']=556;t['Omacron']=722;t['Racute']=667;t['Sacute']=556;t['dcaron']=588;t['Umacron']=722;t['uring']=500;t['threesuperior']=300;t['Ograve']=722;t['Agrave']=722;t['Abreve']=722;t['multiply']=564;t['uacute']=500;t['Tcaron']=611;t['partialdiff']=476;t['ydieresis']=500;t['Nacute']=722;t['icircumflex']=278;t['Ecircumflex']=611;t['adieresis']=444;t['edieresis']=444;t['cacute']=444;t['nacute']=500;t['umacron']=500;t['Ncaron']=722;t['Iacute']=333;t['plusminus']=564;t['brokenbar']=200;t['registered']=760;t['Gbreve']=722;t['Idotaccent']=333;t['summation']=600;t['Egrave']=611;t['racute']=333;t['omacron']=500;t['Zacute']=611;t['Zcaron']=611;t['greaterequal']=549;t['Eth']=722;t['Ccedilla']=667;t['lcommaaccent']=278;t['tcaron']=326;t['eogonek']=444;t['Uogonek']=722;t['Aacute']=722;t['Adieresis']=722;t['egrave']=444;t['zacute']=444;t['iogonek']=278;t['Oacute']=722;t['oacute']=500;t['amacron']=444;t['sacute']=389;t['idieresis']=278;t['Ocircumflex']=722;t['Ugrave']=722;t['Delta']=612;t['thorn']=500;t['twosuperior']=300;t['Odieresis']=722;t['mu']=500;t['igrave']=278;t['ohungarumlaut']=500;t['Eogonek']=611;t['dcroat']=500;t['threequarters']=750;t['Scedilla']=556;t['lcaron']=344;t['Kcommaaccent']=722;t['Lacute']=611;t['trademark']=980;t['edotaccent']=444;t['Igrave']=333;t['Imacron']=333;t['Lcaron']=611;t['onehalf']=750;t['lessequal']=549;t['ocircumflex']=500;t['ntilde']=500;t['Uhungarumlaut']=722;t['Eacute']=611;t['emacron']=444;t['gbreve']=500;t['onequarter']=750;t['Scaron']=556;t['Scommaaccent']=556;t['Ohungarumlaut']=722;t['degree']=400;t['ograve']=500;t['Ccaron']=667;t['ugrave']=500;t['radical']=453;t['Dcaron']=722;t['rcommaaccent']=333;t['Ntilde']=722;t['otilde']=500;t['Rcommaaccent']=667;t['Lcommaaccent']=611;t['Atilde']=722;t['Aogonek']=722;t['Aring']=722;t['Otilde']=722;t['zdotaccent']=444;t['Ecaron']=611;t['Iogonek']=333;t['kcommaaccent']=500;t['minus']=564;t['Icircumflex']=333;t['ncaron']=500;t['tcommaaccent']=278;t['logicalnot']=564;t['odieresis']=500;t['udieresis']=500;t['notequal']=549;t['gcommaaccent']=500;t['eth']=500;t['zcaron']=444;t['ncommaaccent']=500;t['onesuperior']=300;t['imacron']=278;t['Euro']=500});t['Times-Bold']=(0,_core_utils.getLookupTableFactory)(function(t){t['space']=250;t['exclam']=333;t['quotedbl']=555;t['numbersign']=500;t['dollar']=500;t['percent']=1000;t['ampersand']=833;t['quoteright']=333;t['parenleft']=333;t['parenright']=333;t['asterisk']=500;t['plus']=570;t['comma']=250;t['hyphen']=333;t['period']=250;t['slash']=278;t['zero']=500;t['one']=500;t['two']=500;t['three']=500;t['four']=500;t['five']=500;t['six']=500;t['seven']=500;t['eight']=500;t['nine']=500;t['colon']=333;t['semicolon']=333;t['less']=570;t['equal']=570;t['greater']=570;t['question']=500;t['at']=930;t['A']=722;t['B']=667;t['C']=722;t['D']=722;t['E']=667;t['F']=611;t['G']=778;t['H']=778;t['I']=389;t['J']=500;t['K']=778;t['L']=667;t['M']=944;t['N']=722;t['O']=778;t['P']=611;t['Q']=778;t['R']=722;t['S']=556;t['T']=667;t['U']=722;t['V']=722;t['W']=1000;t['X']=722;t['Y']=722;t['Z']=667;t['bracketleft']=333;t['backslash']=278;t['bracketright']=333;t['asciicircum']=581;t['underscore']=500;t['quoteleft']=333;t['a']=500;t['b']=556;t['c']=444;t['d']=556;t['e']=444;t['f']=333;t['g']=500;t['h']=556;t['i']=278;t['j']=333;t['k']=556;t['l']=278;t['m']=833;t['n']=556;t['o']=500;t['p']=556;t['q']=556;t['r']=444;t['s']=389;t['t']=333;t['u']=556;t['v']=500;t['w']=722;t['x']=500;t['y']=500;t['z']=444;t['braceleft']=394;t['bar']=220;t['braceright']=394;t['asciitilde']=520;t['exclamdown']=333;t['cent']=500;t['sterling']=500;t['fraction']=167;t['yen']=500;t['florin']=500;t['section']=500;t['currency']=500;t['quotesingle']=278;t['quotedblleft']=500;t['guillemotleft']=500;t['guilsinglleft']=333;t['guilsinglright']=333;t['fi']=556;t['fl']=556;t['endash']=500;t['dagger']=500;t['daggerdbl']=500;t['periodcentered']=250;t['paragraph']=540;t['bullet']=350;t['quotesinglbase']=333;t['quotedblbase']=500;t['quotedblright']=500;t['guillemotright']=500;t['ellipsis']=1000;t['perthousand']=1000;t['questiondown']=500;t['grave']=333;t['acute']=333;t['circumflex']=333;t['tilde']=333;t['macron']=333;t['breve']=333;t['dotaccent']=333;t['dieresis']=333;t['ring']=333;t['cedilla']=333;t['hungarumlaut']=333;t['ogonek']=333;t['caron']=333;t['emdash']=1000;t['AE']=1000;t['ordfeminine']=300;t['Lslash']=667;t['Oslash']=778;t['OE']=1000;t['ordmasculine']=330;t['ae']=722;t['dotlessi']=278;t['lslash']=278;t['oslash']=500;t['oe']=722;t['germandbls']=556;t['Idieresis']=389;t['eacute']=444;t['abreve']=500;t['uhungarumlaut']=556;t['ecaron']=444;t['Ydieresis']=722;t['divide']=570;t['Yacute']=722;t['Acircumflex']=722;t['aacute']=500;t['Ucircumflex']=722;t['yacute']=500;t['scommaaccent']=389;t['ecircumflex']=444;t['Uring']=722;t['Udieresis']=722;t['aogonek']=500;t['Uacute']=722;t['uogonek']=556;t['Edieresis']=667;t['Dcroat']=722;t['commaaccent']=250;t['copyright']=747;t['Emacron']=667;t['ccaron']=444;t['aring']=500;t['Ncommaaccent']=722;t['lacute']=278;t['agrave']=500;t['Tcommaaccent']=667;t['Cacute']=722;t['atilde']=500;t['Edotaccent']=667;t['scaron']=389;t['scedilla']=389;t['iacute']=278;t['lozenge']=494;t['Rcaron']=722;t['Gcommaaccent']=778;t['ucircumflex']=556;t['acircumflex']=500;t['Amacron']=722;t['rcaron']=444;t['ccedilla']=444;t['Zdotaccent']=667;t['Thorn']=611;t['Omacron']=778;t['Racute']=722;t['Sacute']=556;t['dcaron']=672;t['Umacron']=722;t['uring']=556;t['threesuperior']=300;t['Ograve']=778;t['Agrave']=722;t['Abreve']=722;t['multiply']=570;t['uacute']=556;t['Tcaron']=667;t['partialdiff']=494;t['ydieresis']=500;t['Nacute']=722;t['icircumflex']=278;t['Ecircumflex']=667;t['adieresis']=500;t['edieresis']=444;t['cacute']=444;t['nacute']=556;t['umacron']=556;t['Ncaron']=722;t['Iacute']=389;t['plusminus']=570;t['brokenbar']=220;t['registered']=747;t['Gbreve']=778;t['Idotaccent']=389;t['summation']=600;t['Egrave']=667;t['racute']=444;t['omacron']=500;t['Zacute']=667;t['Zcaron']=667;t['greaterequal']=549;t['Eth']=722;t['Ccedilla']=722;t['lcommaaccent']=278;t['tcaron']=416;t['eogonek']=444;t['Uogonek']=722;t['Aacute']=722;t['Adieresis']=722;t['egrave']=444;t['zacute']=444;t['iogonek']=278;t['Oacute']=778;t['oacute']=500;t['amacron']=500;t['sacute']=389;t['idieresis']=278;t['Ocircumflex']=778;t['Ugrave']=722;t['Delta']=612;t['thorn']=556;t['twosuperior']=300;t['Odieresis']=778;t['mu']=556;t['igrave']=278;t['ohungarumlaut']=500;t['Eogonek']=667;t['dcroat']=556;t['threequarters']=750;t['Scedilla']=556;t['lcaron']=394;t['Kcommaaccent']=778;t['Lacute']=667;t['trademark']=1000;t['edotaccent']=444;t['Igrave']=389;t['Imacron']=389;t['Lcaron']=667;t['onehalf']=750;t['lessequal']=549;t['ocircumflex']=500;t['ntilde']=556;t['Uhungarumlaut']=722;t['Eacute']=667;t['emacron']=444;t['gbreve']=500;t['onequarter']=750;t['Scaron']=556;t['Scommaaccent']=556;t['Ohungarumlaut']=778;t['degree']=400;t['ograve']=500;t['Ccaron']=722;t['ugrave']=556;t['radical']=549;t['Dcaron']=722;t['rcommaaccent']=444;t['Ntilde']=722;t['otilde']=500;t['Rcommaaccent']=722;t['Lcommaaccent']=667;t['Atilde']=722;t['Aogonek']=722;t['Aring']=722;t['Otilde']=778;t['zdotaccent']=444;t['Ecaron']=667;t['Iogonek']=389;t['kcommaaccent']=556;t['minus']=570;t['Icircumflex']=389;t['ncaron']=556;t['tcommaaccent']=333;t['logicalnot']=570;t['odieresis']=500;t['udieresis']=556;t['notequal']=549;t['gcommaaccent']=500;t['eth']=500;t['zcaron']=444;t['ncommaaccent']=556;t['onesuperior']=300;t['imacron']=278;t['Euro']=500});t['Times-BoldItalic']=(0,_core_utils.getLookupTableFactory)(function(t){t['space']=250;t['exclam']=389;t['quotedbl']=555;t['numbersign']=500;t['dollar']=500;t['percent']=833;t['ampersand']=778;t['quoteright']=333;t['parenleft']=333;t['parenright']=333;t['asterisk']=500;t['plus']=570;t['comma']=250;t['hyphen']=333;t['period']=250;t['slash']=278;t['zero']=500;t['one']=500;t['two']=500;t['three']=500;t['four']=500;t['five']=500;t['six']=500;t['seven']=500;t['eight']=500;t['nine']=500;t['colon']=333;t['semicolon']=333;t['less']=570;t['equal']=570;t['greater']=570;t['question']=500;t['at']=832;t['A']=667;t['B']=667;t['C']=667;t['D']=722;t['E']=667;t['F']=667;t['G']=722;t['H']=778;t['I']=389;t['J']=500;t['K']=667;t['L']=611;t['M']=889;t['N']=722;t['O']=722;t['P']=611;t['Q']=722;t['R']=667;t['S']=556;t['T']=611;t['U']=722;t['V']=667;t['W']=889;t['X']=667;t['Y']=611;t['Z']=611;t['bracketleft']=333;t['backslash']=278;t['bracketright']=333;t['asciicircum']=570;t['underscore']=500;t['quoteleft']=333;t['a']=500;t['b']=500;t['c']=444;t['d']=500;t['e']=444;t['f']=333;t['g']=500;t['h']=556;t['i']=278;t['j']=278;t['k']=500;t['l']=278;t['m']=778;t['n']=556;t['o']=500;t['p']=500;t['q']=500;t['r']=389;t['s']=389;t['t']=278;t['u']=556;t['v']=444;t['w']=667;t['x']=500;t['y']=444;t['z']=389;t['braceleft']=348;t['bar']=220;t['braceright']=348;t['asciitilde']=570;t['exclamdown']=389;t['cent']=500;t['sterling']=500;t['fraction']=167;t['yen']=500;t['florin']=500;t['section']=500;t['currency']=500;t['quotesingle']=278;t['quotedblleft']=500;t['guillemotleft']=500;t['guilsinglleft']=333;t['guilsinglright']=333;t['fi']=556;t['fl']=556;t['endash']=500;t['dagger']=500;t['daggerdbl']=500;t['periodcentered']=250;t['paragraph']=500;t['bullet']=350;t['quotesinglbase']=333;t['quotedblbase']=500;t['quotedblright']=500;t['guillemotright']=500;t['ellipsis']=1000;t['perthousand']=1000;t['questiondown']=500;t['grave']=333;t['acute']=333;t['circumflex']=333;t['tilde']=333;t['macron']=333;t['breve']=333;t['dotaccent']=333;t['dieresis']=333;t['ring']=333;t['cedilla']=333;t['hungarumlaut']=333;t['ogonek']=333;t['caron']=333;t['emdash']=1000;t['AE']=944;t['ordfeminine']=266;t['Lslash']=611;t['Oslash']=722;t['OE']=944;t['ordmasculine']=300;t['ae']=722;t['dotlessi']=278;t['lslash']=278;t['oslash']=500;t['oe']=722;t['germandbls']=500;t['Idieresis']=389;t['eacute']=444;t['abreve']=500;t['uhungarumlaut']=556;t['ecaron']=444;t['Ydieresis']=611;t['divide']=570;t['Yacute']=611;t['Acircumflex']=667;t['aacute']=500;t['Ucircumflex']=722;t['yacute']=444;t['scommaaccent']=389;t['ecircumflex']=444;t['Uring']=722;t['Udieresis']=722;t['aogonek']=500;t['Uacute']=722;t['uogonek']=556;t['Edieresis']=667;t['Dcroat']=722;t['commaaccent']=250;t['copyright']=747;t['Emacron']=667;t['ccaron']=444;t['aring']=500;t['Ncommaaccent']=722;t['lacute']=278;t['agrave']=500;t['Tcommaaccent']=611;t['Cacute']=667;t['atilde']=500;t['Edotaccent']=667;t['scaron']=389;t['scedilla']=389;t['iacute']=278;t['lozenge']=494;t['Rcaron']=667;t['Gcommaaccent']=722;t['ucircumflex']=556;t['acircumflex']=500;t['Amacron']=667;t['rcaron']=389;t['ccedilla']=444;t['Zdotaccent']=611;t['Thorn']=611;t['Omacron']=722;t['Racute']=667;t['Sacute']=556;t['dcaron']=608;t['Umacron']=722;t['uring']=556;t['threesuperior']=300;t['Ograve']=722;t['Agrave']=667;t['Abreve']=667;t['multiply']=570;t['uacute']=556;t['Tcaron']=611;t['partialdiff']=494;t['ydieresis']=444;t['Nacute']=722;t['icircumflex']=278;t['Ecircumflex']=667;t['adieresis']=500;t['edieresis']=444;t['cacute']=444;t['nacute']=556;t['umacron']=556;t['Ncaron']=722;t['Iacute']=389;t['plusminus']=570;t['brokenbar']=220;t['registered']=747;t['Gbreve']=722;t['Idotaccent']=389;t['summation']=600;t['Egrave']=667;t['racute']=389;t['omacron']=500;t['Zacute']=611;t['Zcaron']=611;t['greaterequal']=549;t['Eth']=722;t['Ccedilla']=667;t['lcommaaccent']=278;t['tcaron']=366;t['eogonek']=444;t['Uogonek']=722;t['Aacute']=667;t['Adieresis']=667;t['egrave']=444;t['zacute']=389;t['iogonek']=278;t['Oacute']=722;t['oacute']=500;t['amacron']=500;t['sacute']=389;t['idieresis']=278;t['Ocircumflex']=722;t['Ugrave']=722;t['Delta']=612;t['thorn']=500;t['twosuperior']=300;t['Odieresis']=722;t['mu']=576;t['igrave']=278;t['ohungarumlaut']=500;t['Eogonek']=667;t['dcroat']=500;t['threequarters']=750;t['Scedilla']=556;t['lcaron']=382;t['Kcommaaccent']=667;t['Lacute']=611;t['trademark']=1000;t['edotaccent']=444;t['Igrave']=389;t['Imacron']=389;t['Lcaron']=611;t['onehalf']=750;t['lessequal']=549;t['ocircumflex']=500;t['ntilde']=556;t['Uhungarumlaut']=722;t['Eacute']=667;t['emacron']=444;t['gbreve']=500;t['onequarter']=750;t['Scaron']=556;t['Scommaaccent']=556;t['Ohungarumlaut']=722;t['degree']=400;t['ograve']=500;t['Ccaron']=667;t['ugrave']=556;t['radical']=549;t['Dcaron']=722;t['rcommaaccent']=389;t['Ntilde']=722;t['otilde']=500;t['Rcommaaccent']=667;t['Lcommaaccent']=611;t['Atilde']=667;t['Aogonek']=667;t['Aring']=667;t['Otilde']=722;t['zdotaccent']=389;t['Ecaron']=667;t['Iogonek']=389;t['kcommaaccent']=500;t['minus']=606;t['Icircumflex']=389;t['ncaron']=556;t['tcommaaccent']=278;t['logicalnot']=606;t['odieresis']=500;t['udieresis']=556;t['notequal']=549;t['gcommaaccent']=500;t['eth']=500;t['zcaron']=389;t['ncommaaccent']=556;t['onesuperior']=300;t['imacron']=278;t['Euro']=500});t['Times-Italic']=(0,_core_utils.getLookupTableFactory)(function(t){t['space']=250;t['exclam']=333;t['quotedbl']=420;t['numbersign']=500;t['dollar']=500;t['percent']=833;t['ampersand']=778;t['quoteright']=333;t['parenleft']=333;t['parenright']=333;t['asterisk']=500;t['plus']=675;t['comma']=250;t['hyphen']=333;t['period']=250;t['slash']=278;t['zero']=500;t['one']=500;t['two']=500;t['three']=500;t['four']=500;t['five']=500;t['six']=500;t['seven']=500;t['eight']=500;t['nine']=500;t['colon']=333;t['semicolon']=333;t['less']=675;t['equal']=675;t['greater']=675;t['question']=500;t['at']=920;t['A']=611;t['B']=611;t['C']=667;t['D']=722;t['E']=611;t['F']=611;t['G']=722;t['H']=722;t['I']=333;t['J']=444;t['K']=667;t['L']=556;t['M']=833;t['N']=667;t['O']=722;t['P']=611;t['Q']=722;t['R']=611;t['S']=500;t['T']=556;t['U']=722;t['V']=611;t['W']=833;t['X']=611;t['Y']=556;t['Z']=556;t['bracketleft']=389;t['backslash']=278;t['bracketright']=389;t['asciicircum']=422;t['underscore']=500;t['quoteleft']=333;t['a']=500;t['b']=500;t['c']=444;t['d']=500;t['e']=444;t['f']=278;t['g']=500;t['h']=500;t['i']=278;t['j']=278;t['k']=444;t['l']=278;t['m']=722;t['n']=500;t['o']=500;t['p']=500;t['q']=500;t['r']=389;t['s']=389;t['t']=278;t['u']=500;t['v']=444;t['w']=667;t['x']=444;t['y']=444;t['z']=389;t['braceleft']=400;t['bar']=275;t['braceright']=400;t['asciitilde']=541;t['exclamdown']=389;t['cent']=500;t['sterling']=500;t['fraction']=167;t['yen']=500;t['florin']=500;t['section']=500;t['currency']=500;t['quotesingle']=214;t['quotedblleft']=556;t['guillemotleft']=500;t['guilsinglleft']=333;t['guilsinglright']=333;t['fi']=500;t['fl']=500;t['endash']=500;t['dagger']=500;t['daggerdbl']=500;t['periodcentered']=250;t['paragraph']=523;t['bullet']=350;t['quotesinglbase']=333;t['quotedblbase']=556;t['quotedblright']=556;t['guillemotright']=500;t['ellipsis']=889;t['perthousand']=1000;t['questiondown']=500;t['grave']=333;t['acute']=333;t['circumflex']=333;t['tilde']=333;t['macron']=333;t['breve']=333;t['dotaccent']=333;t['dieresis']=333;t['ring']=333;t['cedilla']=333;t['hungarumlaut']=333;t['ogonek']=333;t['caron']=333;t['emdash']=889;t['AE']=889;t['ordfeminine']=276;t['Lslash']=556;t['Oslash']=722;t['OE']=944;t['ordmasculine']=310;t['ae']=667;t['dotlessi']=278;t['lslash']=278;t['oslash']=500;t['oe']=667;t['germandbls']=500;t['Idieresis']=333;t['eacute']=444;t['abreve']=500;t['uhungarumlaut']=500;t['ecaron']=444;t['Ydieresis']=556;t['divide']=675;t['Yacute']=556;t['Acircumflex']=611;t['aacute']=500;t['Ucircumflex']=722;t['yacute']=444;t['scommaaccent']=389;t['ecircumflex']=444;t['Uring']=722;t['Udieresis']=722;t['aogonek']=500;t['Uacute']=722;t['uogonek']=500;t['Edieresis']=611;t['Dcroat']=722;t['commaaccent']=250;t['copyright']=760;t['Emacron']=611;t['ccaron']=444;t['aring']=500;t['Ncommaaccent']=667;t['lacute']=278;t['agrave']=500;t['Tcommaaccent']=556;t['Cacute']=667;t['atilde']=500;t['Edotaccent']=611;t['scaron']=389;t['scedilla']=389;t['iacute']=278;t['lozenge']=471;t['Rcaron']=611;t['Gcommaaccent']=722;t['ucircumflex']=500;t['acircumflex']=500;t['Amacron']=611;t['rcaron']=389;t['ccedilla']=444;t['Zdotaccent']=556;t['Thorn']=611;t['Omacron']=722;t['Racute']=611;t['Sacute']=500;t['dcaron']=544;t['Umacron']=722;t['uring']=500;t['threesuperior']=300;t['Ograve']=722;t['Agrave']=611;t['Abreve']=611;t['multiply']=675;t['uacute']=500;t['Tcaron']=556;t['partialdiff']=476;t['ydieresis']=444;t['Nacute']=667;t['icircumflex']=278;t['Ecircumflex']=611;t['adieresis']=500;t['edieresis']=444;t['cacute']=444;t['nacute']=500;t['umacron']=500;t['Ncaron']=667;t['Iacute']=333;t['plusminus']=675;t['brokenbar']=275;t['registered']=760;t['Gbreve']=722;t['Idotaccent']=333;t['summation']=600;t['Egrave']=611;t['racute']=389;t['omacron']=500;t['Zacute']=556;t['Zcaron']=556;t['greaterequal']=549;t['Eth']=722;t['Ccedilla']=667;t['lcommaaccent']=278;t['tcaron']=300;t['eogonek']=444;t['Uogonek']=722;t['Aacute']=611;t['Adieresis']=611;t['egrave']=444;t['zacute']=389;t['iogonek']=278;t['Oacute']=722;t['oacute']=500;t['amacron']=500;t['sacute']=389;t['idieresis']=278;t['Ocircumflex']=722;t['Ugrave']=722;t['Delta']=612;t['thorn']=500;t['twosuperior']=300;t['Odieresis']=722;t['mu']=500;t['igrave']=278;t['ohungarumlaut']=500;t['Eogonek']=611;t['dcroat']=500;t['threequarters']=750;t['Scedilla']=500;t['lcaron']=300;t['Kcommaaccent']=667;t['Lacute']=556;t['trademark']=980;t['edotaccent']=444;t['Igrave']=333;t['Imacron']=333;t['Lcaron']=611;t['onehalf']=750;t['lessequal']=549;t['ocircumflex']=500;t['ntilde']=500;t['Uhungarumlaut']=722;t['Eacute']=611;t['emacron']=444;t['gbreve']=500;t['onequarter']=750;t['Scaron']=500;t['Scommaaccent']=500;t['Ohungarumlaut']=722;t['degree']=400;t['ograve']=500;t['Ccaron']=667;t['ugrave']=500;t['radical']=453;t['Dcaron']=722;t['rcommaaccent']=389;t['Ntilde']=667;t['otilde']=500;t['Rcommaaccent']=611;t['Lcommaaccent']=556;t['Atilde']=611;t['Aogonek']=611;t['Aring']=611;t['Otilde']=722;t['zdotaccent']=389;t['Ecaron']=611;t['Iogonek']=333;t['kcommaaccent']=444;t['minus']=675;t['Icircumflex']=333;t['ncaron']=500;t['tcommaaccent']=278;t['logicalnot']=675;t['odieresis']=500;t['udieresis']=500;t['notequal']=549;t['gcommaaccent']=500;t['eth']=500;t['zcaron']=389;t['ncommaaccent']=500;t['onesuperior']=300;t['imacron']=278;t['Euro']=500});t['ZapfDingbats']=(0,_core_utils.getLookupTableFactory)(function(t){t['space']=278;t['a1']=974;t['a2']=961;t['a202']=974;t['a3']=980;t['a4']=719;t['a5']=789;t['a119']=790;t['a118']=791;t['a117']=690;t['a11']=960;t['a12']=939;t['a13']=549;t['a14']=855;t['a15']=911;t['a16']=933;t['a105']=911;t['a17']=945;t['a18']=974;t['a19']=755;t['a20']=846;t['a21']=762;t['a22']=761;t['a23']=571;t['a24']=677;t['a25']=763;t['a26']=760;t['a27']=759;t['a28']=754;t['a6']=494;t['a7']=552;t['a8']=537;t['a9']=577;t['a10']=692;t['a29']=786;t['a30']=788;t['a31']=788;t['a32']=790;t['a33']=793;t['a34']=794;t['a35']=816;t['a36']=823;t['a37']=789;t['a38']=841;t['a39']=823;t['a40']=833;t['a41']=816;t['a42']=831;t['a43']=923;t['a44']=744;t['a45']=723;t['a46']=749;t['a47']=790;t['a48']=792;t['a49']=695;t['a50']=776;t['a51']=768;t['a52']=792;t['a53']=759;t['a54']=707;t['a55']=708;t['a56']=682;t['a57']=701;t['a58']=826;t['a59']=815;t['a60']=789;t['a61']=789;t['a62']=707;t['a63']=687;t['a64']=696;t['a65']=689;t['a66']=786;t['a67']=787;t['a68']=713;t['a69']=791;t['a70']=785;t['a71']=791;t['a72']=873;t['a73']=761;t['a74']=762;t['a203']=762;t['a75']=759;t['a204']=759;t['a76']=892;t['a77']=892;t['a78']=788;t['a79']=784;t['a81']=438;t['a82']=138;t['a83']=277;t['a84']=415;t['a97']=392;t['a98']=392;t['a99']=668;t['a100']=668;t['a89']=390;t['a90']=390;t['a93']=317;t['a94']=317;t['a91']=276;t['a92']=276;t['a205']=509;t['a85']=509;t['a206']=410;t['a86']=410;t['a87']=234;t['a88']=234;t['a95']=334;t['a96']=334;t['a101']=732;t['a102']=544;t['a103']=544;t['a104']=910;t['a106']=667;t['a107']=760;t['a108']=760;t['a112']=776;t['a111']=595;t['a110']=694;t['a109']=626;t['a120']=788;t['a121']=788;t['a122']=788;t['a123']=788;t['a124']=788;t['a125']=788;t['a126']=788;t['a127']=788;t['a128']=788;t['a129']=788;t['a130']=788;t['a131']=788;t['a132']=788;t['a133']=788;t['a134']=788;t['a135']=788;t['a136']=788;t['a137']=788;t['a138']=788;t['a139']=788;t['a140']=788;t['a141']=788;t['a142']=788;t['a143']=788;t['a144']=788;t['a145']=788;t['a146']=788;t['a147']=788;t['a148']=788;t['a149']=788;t['a150']=788;t['a151']=788;t['a152']=788;t['a153']=788;t['a154']=788;t['a155']=788;t['a156']=788;t['a157']=788;t['a158']=788;t['a159']=788;t['a160']=894;t['a161']=838;t['a163']=1016;t['a164']=458;t['a196']=748;t['a165']=924;t['a192']=748;t['a166']=918;t['a167']=927;t['a168']=928;t['a169']=928;t['a170']=834;t['a171']=873;t['a172']=828;t['a173']=924;t['a162']=924;t['a174']=917;t['a175']=930;t['a176']=931;t['a177']=463;t['a178']=883;t['a179']=836;t['a193']=836;t['a180']=867;t['a199']=867;t['a181']=696;t['a200']=696;t['a182']=874;t['a201']=874;t['a183']=760;t['a184']=946;t['a197']=771;t['a185']=865;t['a194']=771;t['a198']=888;t['a186']=967;t['a195']=888;t['a187']=831;t['a188']=873;t['a189']=927;t['a190']=970;t['a191']=918})});exports.getMetrics=getMetrics}),(function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.isPDFFunction=isPDFFunction;exports.PostScriptCompiler=exports.PostScriptEvaluator=exports.PDFFunctionFactory=void 0;var _util=__w_pdfjs_require__(5);var _primitives=__w_pdfjs_require__(151);var _ps_parser=__w_pdfjs_require__(187);function _typeof(obj){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>codeSize)*sampleMul;codeBuf&=(1<max){v=max}else if(v0){dmin=bounds[i-1]}var dmax=domain[1];if(i>1;var numInputs=domain.length>>1;var evaluator=new PostScriptEvaluator(code);var cache=Object.create(null);var MAX_CACHE_SIZE=2048*4;var cache_available=MAX_CACHE_SIZE;var tmpBuf=new Float32Array(numInputs);return function constructPostScriptFromIRResult(src,srcOffset,dest,destOffset){var i,value;var key='';var input=tmpBuf;for(i=0;ibound){value=bound}}output[i]=value}if(cache_available>0){cache_available--;cache[key]=output}dest.set(output,destOffset)}}}}();function isPDFFunction(v){var fnDict;if(_typeof(v)!=='object'){return false}else if((0,_primitives.isDict)(v)){fnDict=v}else if((0,_primitives.isStream)(v)){fnDict=v.dict}else{return false}return fnDict.has('FunctionType')}var PostScriptStack=function PostScriptStackClosure(){var MAX_STACK_SIZE=100;function PostScriptStack(initialStack){this.stack=!initialStack?[]:Array.prototype.slice.call(initialStack,0)}PostScriptStack.prototype={push:function PostScriptStack_push(value){if(this.stack.length>=MAX_STACK_SIZE){throw new Error('PostScript function stack overflow.');}this.stack.push(value)},pop:function PostScriptStack_pop(){if(this.stack.length<=0){throw new Error('PostScript function stack underflow.');}return this.stack.pop()},copy:function PostScriptStack_copy(n){if(this.stack.length+n>=MAX_STACK_SIZE){throw new Error('PostScript function stack overflow.');}var stack=this.stack;for(var i=stack.length-n,j=n-1;j>=0;j--,i++){stack.push(stack[i])}},index:function PostScriptStack_index(n){this.push(this.stack[this.stack.length-n-1])},roll:function PostScriptStack_roll(n,p){var stack=this.stack;var l=stack.length-n;var r=stack.length-1,c=l+(p-Math.floor(p/n)*n),i,j,t;for(i=l,j=r;i0){stack.push(a<>b)}break;case'ceiling':a=stack.pop();stack.push(Math.ceil(a));break;case'copy':a=stack.pop();stack.copy(a);break;case'cos':a=stack.pop();stack.push(Math.cos(a));break;case'cvi':a=stack.pop()|0;stack.push(a);break;case'cvr':break;case'div':b=stack.pop();a=stack.pop();stack.push(a/b);break;case'dup':stack.copy(1);break;case'eq':b=stack.pop();a=stack.pop();stack.push(a===b);break;case'exch':stack.roll(2,1);break;case'exp':b=stack.pop();a=stack.pop();stack.push(Math.pow(a,b));break;case'false':stack.push(false);break;case'floor':a=stack.pop();stack.push(Math.floor(a));break;case'ge':b=stack.pop();a=stack.pop();stack.push(a>=b);break;case'gt':b=stack.pop();a=stack.pop();stack.push(a>b);break;case'idiv':b=stack.pop();a=stack.pop();stack.push(a/b|0);break;case'index':a=stack.pop();stack.index(a);break;case'le':b=stack.pop();a=stack.pop();stack.push(a<=b);break;case'ln':a=stack.pop();stack.push(Math.log(a));break;case'log':a=stack.pop();stack.push(Math.log(a)/Math.LN10);break;case'lt':b=stack.pop();a=stack.pop();stack.push(a=max){return new AstLiteral(max)}else if(num1.max<=max){return num1}return new AstMin(num1,max)}function PostScriptCompiler(){}PostScriptCompiler.prototype={compile:function PostScriptCompiler_compile(code,domain,range){var stack=[];var i,ii;var instructions=[];var inputSize=domain.length>>1,outputSize=range.length>>1;var lastRegister=0;var n,j;var num1,num2,ast1,ast2,tmpVar,item;for(i=0;iexpr.min){out.unshift('Math.max(',min,', ');out.push(')')}if(max=0&&(ch>=0x41&&ch<=0x5A||ch>=0x61&&ch<=0x7A)){strBuf.push(String.fromCharCode(ch))}var str=strBuf.join('');switch(str.toLowerCase()){case'if':return PostScriptToken.IF;case'ifelse':return PostScriptToken.IFELSE;default:return PostScriptToken.getOperator(str)}}},{key:"getNumber",value:function getNumber(){var ch=this.currentChar;var strBuf=this.strBuf;strBuf.length=0;strBuf[0]=String.fromCharCode(ch);while((ch=this.nextChar())>=0){if(ch>=0x30&&ch<=0x39||ch===0x2D||ch===0x2E){strBuf.push(String.fromCharCode(ch))}else{break}}var value=parseFloat(strBuf.join(''));if(isNaN(value)){throw new _util.FormatError("Invalid floating point number: ".concat(value));}return value}}]);return PostScriptLexer}();exports.PostScriptLexer=PostScriptLexer}),(function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.MurmurHash3_64=void 0;var _util=__w_pdfjs_require__(5);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>>8;data[length++]=code&0xff}}}else if((0,_util.isArrayBuffer)(input)){data=input;length=data.byteLength}else{throw new Error('Wrong data format in MurmurHash3_64_update. Input must be a string or array.');}var blockCounts=length>>2;var tailLength=length-blockCounts*4;var dataUint32=new Uint32Array(data.buffer,0,blockCounts);var k1=0,k2=0;var h1=this.h1,h2=this.h2;var C1=0xcc9e2d51,C2=0x1b873593;var C1_LOW=C1&MASK_LOW,C2_LOW=C2&MASK_LOW;for(var _i=0;_i>>17;k1=k1*C2&MASK_HIGH|k1*C2_LOW&MASK_LOW;h1^=k1;h1=h1<<13|h1>>>19;h1=h1*5+0xe6546b64}else{k2=dataUint32[_i];k2=k2*C1&MASK_HIGH|k2*C1_LOW&MASK_LOW;k2=k2<<15|k2>>>17;k2=k2*C2&MASK_HIGH|k2*C2_LOW&MASK_LOW;h2^=k2;h2=h2<<13|h2>>>19;h2=h2*5+0xe6546b64}}k1=0;switch(tailLength){case 3:k1^=data[blockCounts*4+2]<<16;case 2:k1^=data[blockCounts*4+1]<<8;case 1:k1^=data[blockCounts*4];k1=k1*C1&MASK_HIGH|k1*C1_LOW&MASK_LOW;k1=k1<<15|k1>>>17;k1=k1*C2&MASK_HIGH|k1*C2_LOW&MASK_LOW;if(blockCounts&1){h1^=k1}else{h2^=k1}}this.h1=h1;this.h2=h2}},{key:"hexdigest",value:function hexdigest(){var h1=this.h1,h2=this.h2;h1^=h2>>>1;h1=h1*0xed558ccd&MASK_HIGH|h1*0x8ccd&MASK_LOW;h2=h2*0xff51afd7&MASK_HIGH|((h2<<16|h1>>>16)*0xafd7ed55&MASK_HIGH)>>>16;h1^=h2>>>1;h1=h1*0x1a85ec53&MASK_HIGH|h1*0xec53&MASK_LOW;h2=h2*0xc4ceb9fe&MASK_HIGH|((h2<<16|h1>>>16)*0xb9fe1a85&MASK_HIGH)>>>16;h1^=h2>>>1;var hex1=(h1>>>0).toString(16),hex2=(h2>>>0).toString(16);return hex1.padStart(8,'0')+hex2.padStart(8,'0')}}]);return MurmurHash3_64}();exports.MurmurHash3_64=MurmurHash3_64}),(function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.NativeImageDecoder=void 0;var _colorspace=__w_pdfjs_require__(169);var _jpeg_stream=__w_pdfjs_require__(164);var _stream=__w_pdfjs_require__(158);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;imax?max:value}function resizeImageMask(src,bpc,w1,h1,w2,h2){var length=w2*h2;var dest=bpc<=8?new Uint8Array(length):bpc<=16?new Uint16Array(length):new Uint32Array(length);var xRatio=w1/w2;var yRatio=h1/h2;var i,j,py,newIndex=0,oldIndex;var xScaled=new Uint16Array(w2);var w1Scanline=w1;for(i=0;i0&&Number.isInteger(image.height)&&image.height>0&&(image.width!==width||image.height!==height)){(0,_util.warn)('PDFImage - using the Width/Height of the image data, rather than the image dictionary.');width=image.width;height=image.height}if(width<1||height<1){throw new _util.FormatError("Invalid image width: ".concat(width," or ")+"height: ".concat(height));}this.width=width;this.height=height;this.interpolate=dict.get('Interpolate','I')||false;this.imageMask=dict.get('ImageMask','IM')||false;this.matte=dict.get('Matte')||false;var bitsPerComponent=image.bitsPerComponent;if(!bitsPerComponent){bitsPerComponent=dict.get('BitsPerComponent','BPC');if(!bitsPerComponent){if(this.imageMask){bitsPerComponent=1}else{throw new _util.FormatError("Bits per component missing in image: ".concat(this.imageMask));}}}this.bpc=bitsPerComponent;if(!this.imageMask){var colorSpace=dict.get('ColorSpace','CS');if(!colorSpace){(0,_util.info)('JPX images (which do not require color spaces)');switch(image.numComps){case 1:colorSpace=_primitives.Name.get('DeviceGray');break;case 3:colorSpace=_primitives.Name.get('DeviceRGB');break;case 4:colorSpace=_primitives.Name.get('DeviceCMYK');break;default:throw new Error("JPX images with ".concat(image.numComps," ")+'color components not supported.');}}var resources=isInline?res:null;this.colorSpace=_colorspace.ColorSpace.parse(colorSpace,xref,resources,pdfFunctionFactory);this.numComps=this.colorSpace.numComps}this.decode=dict.getArray('Decode','D');this.needsDecode=false;if(this.decode&&(this.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode,bitsPerComponent)||isMask&&!_colorspace.ColorSpace.isDefaultDecode(this.decode,1))){this.needsDecode=true;var max=(1<>3)*height;var actualLength=imgArray.byteLength;var haveFullData=computedLength===actualLength;var data,i;if(imageIsFromDecodeStream&&(!inverseDecode||haveFullData)){data=imgArray}else if(!inverseDecode){data=new Uint8ClampedArray(actualLength);data.set(imgArray)}else{data=new Uint8ClampedArray(computedLength);data.set(imgArray);for(i=actualLength;i>7&1;output[i+1]=buf>>6&1;output[i+2]=buf>>5&1;output[i+3]=buf>>4&1;output[i+4]=buf>>3&1;output[i+5]=buf>>2&1;output[i+6]=buf>>1&1;output[i+7]=buf&1;i+=8}if(i>=1}}}}else{var bits=0;buf=0;for(i=0,ii=length;i>remainingBits;output[i]=value<0?0:value>max?max:value;buf=buf&(1<mask[maskOffset+1]){opacity=255;break}}alphaBuf[i]=opacity}}else{throw new _util.FormatError('Unknown mask format.');}}if(alphaBuf){for(i=0,j=3,ii=width*actualHeight;i0&&arguments[0]!==undefined?arguments[0]:false;var drawWidth=this.drawWidth;var drawHeight=this.drawHeight;var imgData={width:drawWidth,height:drawHeight,kind:0,data:null};var numComps=this.numComps;var originalWidth=this.width;var originalHeight=this.height;var bpc=this.bpc;var rowBytes=originalWidth*numComps*bpc+7>>3;var imgArray;if(!forceRGBA){var kind;if(this.colorSpace.name==='DeviceGray'&&bpc===1){kind=_util.ImageKind.GRAYSCALE_1BPP}else if(this.colorSpace.name==='DeviceRGB'&&bpc===8&&!this.needsDecode){kind=_util.ImageKind.RGB_24BPP}if(kind&&!this.smask&&!this.mask&&drawWidth===originalWidth&&drawHeight===originalHeight){imgData.kind=kind;imgArray=this.getImageBytes(originalHeight*rowBytes);if(this.image instanceof _stream.DecodeStream){imgData.data=imgArray}else{var newArray=new Uint8ClampedArray(imgArray.length);newArray.set(imgArray);imgData.data=newArray}if(this.needsDecode){(0,_util.assert)(kind===_util.ImageKind.GRAYSCALE_1BPP,'PDFImage.createImageData: The image must be grayscale.');var buffer=imgData.data;for(var i=0,ii=buffer.length;i>3;var imgArray=this.getImageBytes(height*rowBytes);var comps=this.getComponents(imgArray);var i,length;if(bpc===1){length=width*height;if(this.needsDecode){for(i=0;i3&&arguments[3]!==undefined?arguments[3]:false;this.image.reset();this.image.drawWidth=drawWidth||this.width;this.image.drawHeight=drawHeight||this.height;this.image.forceRGB=!!forceRGB;return this.image.getBytes(length,true)}};return PDFImage}();exports.PDFImage=PDFImage}),(function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.MessageHandler=MessageHandler;var _regenerator=_interopRequireDefault(__w_pdfjs_require__(2));var _util=__w_pdfjs_require__(5);function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{"default":obj}}function _typeof(obj){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 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 resolveCall(_x,_x2){return _resolveCall.apply(this,arguments)}function _resolveCall(){_resolveCall=_asyncToGenerator(_regenerator["default"].mark(function _callee(fn,args){var thisArg,_args=arguments;return _regenerator["default"].wrap(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:thisArg=_args.length>2&&_args[2]!==undefined?_args[2]:null;if(fn){_context.next=3;break}return _context.abrupt("return",undefined);case 3:return _context.abrupt("return",fn.apply(thisArg,args));case 4:case"end":return _context.stop()}}},_callee)}));return _resolveCall.apply(this,arguments)}function wrapReason(reason){if(_typeof(reason)!=='object'){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);default:return new _util.UnknownErrorException(reason.message,reason.details)}}function makeReasonSerializable(reason){if(!(reason instanceof Error)||reason instanceof _util.AbortException||reason instanceof _util.MissingPDFException||reason instanceof _util.UnexpectedResponseException||reason instanceof _util.UnknownErrorException){return reason}return new _util.UnknownErrorException(reason.message,reason.toString())}function resolveOrReject(capability,success,reason){if(success){capability.resolve()}else{capability.reject(reason)}}function finalize(promise){return Promise.resolve(promise)["catch"](function(){})}function MessageHandler(sourceName,targetName,comObj){var _this=this;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);var callbacksCapabilities=this.callbacksCapabilities=Object.create(null);var ah=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)}else if(data.isReply){var callbackId=data.callbackId;if(data.callbackId in callbacksCapabilities){var callback=callbacksCapabilities[callbackId];delete callbacksCapabilities[callbackId];if('error'in data){callback.reject(wrapReason(data.error))}else{callback.resolve(data.data)}}else{throw new Error("Cannot resolve callback ".concat(callbackId));}}else if(data.action in ah){var action=ah[data.action];if(data.callbackId){var _sourceName=_this.sourceName;var _targetName=data.sourceName;Promise.resolve().then(function(){return action[0].call(action[1],data.data)}).then(function(result){comObj.postMessage({sourceName:_sourceName,targetName:_targetName,isReply:true,callbackId:data.callbackId,data:result})},function(reason){comObj.postMessage({sourceName:_sourceName,targetName:_targetName,isReply:true,callbackId:data.callbackId,error:makeReasonSerializable(reason)})})}else if(data.streamId){_this._createStreamSink(data)}else{action[0].call(action[1],data.data)}}else{throw new Error("Unknown action from worker: ".concat(data.action));}};comObj.addEventListener('message',this._onComObjOnMessage)}MessageHandler.prototype={on:function on(actionName,handler,scope){var ah=this.actionHandler;if(ah[actionName]){throw new Error("There is already an actionName called \"".concat(actionName,"\""));}ah[actionName]=[handler,scope]},send:function send(actionName,data,transfers){var message={sourceName:this.sourceName,targetName:this.targetName,action:actionName,data:data};this.postMessage(message,transfers)},sendWithPromise:function sendWithPromise(actionName,data,transfers){var callbackId=this.callbackId++;var message={sourceName:this.sourceName,targetName:this.targetName,action:actionName,data:data,callbackId:callbackId};var capability=(0,_util.createPromiseCapability)();this.callbacksCapabilities[callbackId]=capability;try{this.postMessage(message,transfers)}catch(e){capability.reject(e)}return capability.promise},sendWithStream:function sendWithStream(actionName,data,queueingStrategy,transfers){var _this2=this;var streamId=this.streamId++;var sourceName=this.sourceName;var targetName=this.targetName;return new _util.ReadableStream({start:function start(controller){var startCapability=(0,_util.createPromiseCapability)();_this2.streamControllers[streamId]={controller:controller,startCall:startCapability,isClosed:false};_this2.postMessage({sourceName:sourceName,targetName:targetName,action:actionName,streamId:streamId,data:data,desiredSize:controller.desiredSize});return startCapability.promise},pull:function pull(controller){var pullCapability=(0,_util.createPromiseCapability)();_this2.streamControllers[streamId].pullCall=pullCapability;_this2.postMessage({sourceName:sourceName,targetName:targetName,stream:'pull',streamId:streamId,desiredSize:controller.desiredSize});return pullCapability.promise},cancel:function cancel(reason){var cancelCapability=(0,_util.createPromiseCapability)();_this2.streamControllers[streamId].cancelCall=cancelCapability;_this2.streamControllers[streamId].isClosed=true;_this2.postMessage({sourceName:sourceName,targetName:targetName,stream:'cancel',reason:reason,streamId:streamId});return cancelCapability.promise}},queueingStrategy)},_createStreamSink:function _createStreamSink(data){var _this3=this;var self=this;var action=this.actionHandler[data.action];var streamId=data.streamId;var desiredSize=data.desiredSize;var sourceName=this.sourceName;var targetName=data.sourceName;var capability=(0,_util.createPromiseCapability)();var sendStreamRequest=function sendStreamRequest(_ref){var stream=_ref.stream,chunk=_ref.chunk,transfers=_ref.transfers,success=_ref.success,reason=_ref.reason;_this3.postMessage({sourceName:sourceName,targetName:targetName,stream:stream,streamId:streamId,chunk:chunk,success:success,reason:reason},transfers)};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}sendStreamRequest({stream:'enqueue',chunk:chunk,transfers:transfers})},close:function close(){if(this.isCancelled){return}this.isCancelled=true;sendStreamRequest({stream:'close'});delete self.streamSinks[streamId]},error:function error(reason){if(this.isCancelled){return}this.isCancelled=true;sendStreamRequest({stream:'error',reason:reason})},sinkCapability:capability,onPull:null,onCancel:null,isCancelled:false,desiredSize:desiredSize,ready:null};streamSink.sinkCapability.resolve();streamSink.ready=streamSink.sinkCapability.promise;this.streamSinks[streamId]=streamSink;resolveCall(action[0],[data.data,streamSink],action[1]).then(function(){sendStreamRequest({stream:'start_complete',success:true})},function(reason){sendStreamRequest({stream:'start_complete',success:false,reason:reason})})},_processStreamMessage:function _processStreamMessage(data){var _this4=this;var sourceName=this.sourceName;var targetName=data.sourceName;var streamId=data.streamId;var sendStreamResponse=function sendStreamResponse(_ref2){var stream=_ref2.stream,success=_ref2.success,reason=_ref2.reason;_this4.comObj.postMessage({sourceName:sourceName,targetName:targetName,stream:stream,success:success,streamId:streamId,reason:reason})};var deleteStreamController=function deleteStreamController(){Promise.all([_this4.streamControllers[data.streamId].startCall,_this4.streamControllers[data.streamId].pullCall,_this4.streamControllers[data.streamId].cancelCall].map(function(capability){return capability&&finalize(capability.promise)})).then(function(){delete _this4.streamControllers[data.streamId]})};switch(data.stream){case'start_complete':resolveOrReject(this.streamControllers[data.streamId].startCall,data.success,wrapReason(data.reason));break;case'pull_complete':resolveOrReject(this.streamControllers[data.streamId].pullCall,data.success,wrapReason(data.reason));break;case'pull':if(!this.streamSinks[data.streamId]){sendStreamResponse({stream:'pull_complete',success:true});break}if(this.streamSinks[data.streamId].desiredSize<=0&&data.desiredSize>0){this.streamSinks[data.streamId].sinkCapability.resolve()}this.streamSinks[data.streamId].desiredSize=data.desiredSize;resolveCall(this.streamSinks[data.streamId].onPull).then(function(){sendStreamResponse({stream:'pull_complete',success:true})},function(reason){sendStreamResponse({stream:'pull_complete',success:false,reason:reason})});break;case'enqueue':(0,_util.assert)(this.streamControllers[data.streamId],'enqueue should have stream controller');if(!this.streamControllers[data.streamId].isClosed){this.streamControllers[data.streamId].controller.enqueue(data.chunk)}break;case'close':(0,_util.assert)(this.streamControllers[data.streamId],'close should have stream controller');if(this.streamControllers[data.streamId].isClosed){break}this.streamControllers[data.streamId].isClosed=true;this.streamControllers[data.streamId].controller.close();deleteStreamController();break;case'error':(0,_util.assert)(this.streamControllers[data.streamId],'error should have stream controller');this.streamControllers[data.streamId].controller.error(wrapReason(data.reason));deleteStreamController();break;case'cancel_complete':resolveOrReject(this.streamControllers[data.streamId].cancelCall,data.success,wrapReason(data.reason));deleteStreamController();break;case'cancel':if(!this.streamSinks[data.streamId]){break}resolveCall(this.streamSinks[data.streamId].onCancel,[wrapReason(data.reason)]).then(function(){sendStreamResponse({stream:'cancel_complete',success:true})},function(reason){sendStreamResponse({stream:'cancel_complete',success:false,reason:reason})});this.streamSinks[data.streamId].sinkCapability.reject(wrapReason(data.reason));this.streamSinks[data.streamId].isCancelled=true;delete this.streamSinks[data.streamId];break;default:throw new Error('Unexpected stream case');}},postMessage:function postMessage(message,transfers){if(transfers&&this.postMessageTransfers){this.comObj.postMessage(message,transfers)}else{this.comObj.postMessage(message)}},destroy:function destroy(){this.comObj.removeEventListener('message',this._onComObjOnMessage)}}}),(function(module,exports,__w_pdfjs_require__){"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.PDFWorkerStream=void 0;var _regenerator=_interopRequireDefault(__w_pdfjs_require__(2));var _util=__w_pdfjs_require__(5);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