!function(e,t){"object"==typeofexports&&"object"==typeofmodule?module.exports=t():"function"==typeofdefine&&define.amd?define("pdfjs-dist/build/pdf",[],t):"object"==typeofexports?exports["pdfjs-dist/build/pdf"]=t():e["pdfjs-dist/build/pdf"]=e.pdfjsDistBuildPdf=t()}(this,function(){returnfunction(e){functiont(n){if(r[n])returnr[n].exports;vari=r[n]={i:n,l:!1,exports:{}};returne[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}varr={};returnt.m=e,t.c=r,t.i=function(e){returne},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){varr=e&&e.__esModule?function(){returne.default}:function(){returne};returnt.d(r,"a",r),r},t.o=function(e,t){returnObject.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=86)}([function(e,t,r){"use strict";functionn(e){se=e}functioni(){returnse}functiona(e){se>=ie.infos&&console.log("Info: "+e)}functiono(e){se>=ie.warnings&&console.log("Warning: "+e)}functions(e){console.log("Deprecated API usage: "+e)}functionl(e){thrownewError(e)}functionu(e,t){e||l(t)}functionc(e,t){try{varr=newURL(e);if(!r.origin||"null"===r.origin)return!1}catch(e){return!1}varn=newURL(t,r);returnr.origin===n.origin}functionh(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}functiond(e,t){if(!e)returnnull;try{varr=t?newURL(e,t):newURL(e);if(h(r))returnr}catch(e){}returnnull}functionf(e,t,r){returnObject.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}functionp(e){vart;returnfunction(){returne&&(t=Object.create(null),e(t),e=null),t}}functionm(e){return"string"!=typeofe?(o("The argument for removeNullCharacters must be a string."),e):e.replace(ye,"")}functiong(e){u(null!==e&&"object"===(void0===e?"undefined":X(e))&&void0!==e.length,"Invalid argument for bytesToString");vart=e.length;if(t<8192)returnString.fromCharCode.apply(null,e);for(varr=[],n=0;n<t;n+=8192){vari=Math.min(n+8192,t),a=e.subarray(n,i);r.push(String.fromCharCode.apply(null,a))}returnr.join("")}functionv(e){u("string"==typeofe,"Invalid argument for stringToBytes");for(vart=e.length,r=newUint8Array(t),n=0;n<t;++n)r[n]=255&e.charCodeAt(n);returnr}functionb(e){returnvoid0!==e.length?e.length:(u(void0!==e.byteLength),e.byteLength)}function_(e){if(1===e.length&&e[0]instanceofUint8Array)returne[0];vart,r,n,i=0,a=e.length;for(t=0;t<a;t++)r=e[t],n=b(r),i+=n;varo=0,s=newUint8Array(i);for(t=0;t<a;t++)r=e[t],rinstanceofUint8Array||(r="string"==typeofr?v(r):newUint8Array(r)),n=r.byteLength,s.set(r,o),o+=n;returns}functiony(e){returnString.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}functionA(e){for(vart=1,r=0;e>t;)t<<=1,r++;returnr}functionS(e,t){returne[t]<<24>>24}functionw(e,t){returne[t]<<8|e[t+1]}functionP(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}functionC(){vare=newUint8Array(4);returne[0]=1,1===newUint32Array(e.buffer,0,1)[0]}functionR(){try{returnnewFunction(""),!0}catch(e){return!1}}functionx(e){vart,r=e.length,n=[];if("þ"===e[0]&&"ÿ"===e[1])for(t=2;t<r;t+=2)n.push(String.fromCharCode(e.charCodeAt(t)<<8|e.charCodeAt(t+1)));elsefor(t=0;t<r;++t){vari=Pe[e.charCodeAt(t)];n.push(i?String.fromCharCode(i):e.charAt(t))}returnn.join("")}functionk(e){returndecodeURIComponent(escape(e))}functionT(e){returnunescape(encodeURIComponent(e))}functionE(e){for(vartine)return!1;return!0}functionO(e){return"boolean"==typeofe}functionI(e){return"number"==typeofe&&(0|e)===e}functionL(e){return"number"==typeofe}functionj(e){return"string"==typeofe}functionD(e){returneinstanceofArray}functionF(e){return"object"===(void0===e?"undefined":X(e))&&null!==e&&void0!==e.byteLength}functionN(e){return32===e||9===e||13===e||10===e}functionM(){return"object"===("undefined"==typeofprocess?"undefined":X(process))&&process+""=="[object process]"}functionq(){vare={};returne.promise=newPromise(function(t,r){e.resolve=t,e.reject=r}),e}functionU(e,t){varr=arguments.length>2&&void0!==arguments[2]?a
e._readyCapability.resolve()})},destroy:function(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),o.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}},n.fromPort=function(e){returno.has(e)?o.get(e):newn(null,e)},n}(),j=function(){functione(e,t,r,n){this.messageHandler=e,this.loadingTask=t,this.commonObjs=newD,this.fontLoader=newd.FontLoader(t.docId),this.CMapReaderFactory=newn({baseUrl:(0,h.getDefaultSetting)("cMapUrl"),isCompressed:(0,h.getDefaultSetting)("cMapPacked")}),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=r,this._fullReader=null,this._lastProgress=null,this.pageCache=[],this.pagePromises=[],this.downloadInfoCapability=(0,c.createPromiseCapability)(),this.setupMessageHandler()}returne.prototype={destroy:function(){vare=this;if(this.destroyCapability)returnthis.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=(0,c.createPromiseCapability)(),this._passwordCapability&&this._passwordCapability.reject(newError("Worker was destroyed during onPassword callback"));vart=[];this.pageCache.forEach(function(e){e&&t.push(e._destroy())}),this.pageCache=[],this.pagePromises=[];varr=this.messageHandler.sendWithPromise("Terminate",null);returnt.push(r),Promise.all(t).then(function(){e.fontLoader.clear(),e._networkStream&&e._networkStream.cancelAllRequests(),e.messageHandler&&(e.messageHandler.destroy(),e.messageHandler=null),e.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise},setupMessageHandler:function(){vare=this.messageHandler,t=this.loadingTask;e.on("GetReader",function(e,t){varr=this;(0,c.assert)(this._networkStream),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=function(e){r._lastProgress={loaded:e.loaded,total:e.total}},t.onPull=function(){r._fullReader.read().then(function(e){varr=e.value;if(e.done)returnvoidt.close();(0,c.assert)((0,c.isArrayBuffer)(r)),t.enqueue(newUint8Array(r),1,[r])}).catch(function(e){t.error(e)})},t.onCancel=function(e){r._fullReader.cancel(e)}},this),e.on("ReaderHeadersReady",function(e){vart=this,r=(0,c.createPromiseCapability)(),n=this._fullReader;returnn.headersReady.then(function(){if(!n.isStreamingSupported||!n.isRangeSupported){if(t._lastProgress){vare=t.loadingTask;e.onProgress&&e.onProgress(t._lastProgress)}n.onProgress=function(e){varr=t.loadingTask;r.onProgress&&r.onProgress({loaded:e.loaded,total:e.total})}}r.resolve({isStreamingSupported:n.isStreamingSupported,isRangeSupported:n.isRangeSupported,contentLength:n.contentLength})},r.reject),r.promise},this),e.on("GetRangeReader",function(e,t){(0,c.assert)(this._networkStream);varr=this._networkStream.getRangeReader(e.begin,e.end);t.onPull=function(){r.read().then(function(e){varr=e.value;if(e.done)returnvoidt.close();(0,c.assert)((0,c.isArrayBuffer)(r)),t.enqueue(newUint8Array(r),1,[r])}).catch(function(e){t.error(e)})},t.onCancel=function(e){r.cancel(e)}},this),e.on("GetDoc",function(e){vart=e.pdfInfo;this.numPages=e.pdfInfo.numPages;varr=this.loadingTask,n=newE(t,this,r);this.pdfDocument=n,r._capability.resolve(n)},this),e.on("PasswordRequest",function(e){varr=this;if(this._passwordCapability=(0,c.createPromiseCapability)(),t.onPassword){varn=function(e){r._passwordCapability.resolve({password:e})};t.onPassword(n,e.code)}elsethis._passwordCapability.reject(newc.PasswordException(e.message,e.code));returnthis._passwordCapability.promise},this),e.on("PasswordException",function(e){t._capability.reject(newc.PasswordException(e.message,e.code))},this),e.on("InvalidPDF",function(e){this.loadingTask._capability.reject(newc.InvalidPDFException(e.message))},this),e.on("MissingPDF",function(e){this.loadingTask._capability.reject(newc.MissingPDFException(e.message))},this),e.on("UnexpectedResponse",function(e){this.loadingTask._capability.reject(newc.UnexpectedResponseException(e.message,e.status))},this),e.on("UnknownError",function(e){this.loadingTask._c
;if(!(200===a&&206===r.expectedStatus)&&a!==r.expectedStatus)returnvoid(r.onError&&r.onError(n.status));this.loadedRequests[e]=!0;varo=i(n);if(206===a){vars=n.getResponseHeader("Content-Range"),l=/bytes (\d+)-(\d+)\/(\d+)/.exec(s),u=parseInt(l[1],10);r.onDone({begin:u,chunk:o})}elser.onProgressiveData?r.onDone(null):o?r.onDone({begin:0,chunk:o}):r.onError&&r.onError(n.status)}}},hasPendingRequests:function(){for(vareinthis.pendingRequests)return!0;return!1},getRequestXhr:function(e){returnthis.pendingRequests[e].xhr},isStreamingRequest:function(e){return!!this.pendingRequests[e].onProgressiveData},isPendingRequest:function(e){returneinthis.pendingRequests},isLoadedRequest:function(e){returneinthis.loadedRequests},abortAllRequests:function(){for(vareinthis.pendingRequests)this.abortRequest(0|e)},abortRequest:function(e){vart=this.pendingRequests[e].xhr;deletethis.pendingRequests[e],t.abort()}},a.prototype={_onRangeRequestReaderClosed:function(e){vart=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)},getFullReader:function(){return(0,l.assert)(!this._fullRequestReader),this._fullRequestReader=newo(this._manager,this._options),this._fullRequestReader},getRangeReader:function(e,t){varr=news(this._manager,e,t);returnr.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r},cancelAllRequests:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach(function(t){t.cancel(e)})}},o.prototype={_onHeadersReceived:function(){vare=this._fullRequestId,t=this._manager.getRequestXhr(e),r=(0,h.validateRangeRequestCapabilities)({getResponseHeader:function(e){returnt.getResponseHeader(e)},isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),n=r.allowRangeRequests,i=r.suggestedLength;this._contentLength=i||this._contentLength,n&&(this._isRangeSupported=!0);vara=this._manager;a.isStreamingRequest(e)?this._isStreamingSupported=!0:this._isRangeSupported&&a.abortRequest(e),this._headersReceivedCapability.resolve()},_onProgressiveData:function(e){if(this._requests.length>0){this._requests.shift().resolve({value:e,done:!1})}elsethis._cachedChunks.push(e)},_onDone:function(e){e&&this._onProgressiveData(e.chunk),this._done=!0,this._cachedChunks.length>0||(this._requests.forEach(function(e){e.resolve({value:void0,done:!0})}),this._requests=[])},_onError:function(e){vart,r=this._url;t=404===e||0===e&&/^file:/.test(r)?newl.MissingPDFException('Missing PDF "'+r+'".'):newl.UnexpectedResponseException("Unexpected server response ("+e+') while retrieving PDF "'+r+'".',e),this._storedError=t,this._headersReceivedCapability.reject(t),this._requests.forEach(function(e){e.reject(t)}),this._requests=[],this._cachedChunks=[]},_onProgress:function(e){this.onProgress&&this.onProgress({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})},getisRangeSupported(){returnthis._isRangeSupported},getisStreamingSupported(){returnthis._isStreamingSupported},getcontentLength(){returnthis._contentLength},getheadersReady(){returnthis._headersReceivedCapability.promise},read:function(){if(this._storedError)returnPromise.reject(this._storedError);if(this._cachedChunks.length>0){vare=this._cachedChunks.shift();returnPromise.resolve({value:e,done:!1})}if(this._done)returnPromise.resolve({value:void0,done:!0});vart=(0,l.createPromiseCapability)();returnthis._requests.push(t),t.promise},cancel:function(e){this._done=!0,this._headersReceivedCapability.reject(e),this._requests.forEach(function(e){e.resolve({value:void0,done:!0})}),this._requests=[],this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}},s.prototype={_close:function(){this.onClosed&&this.onClosed(this)},_onDone:function(e){vart=e.chunk;if(this._requests.length>0){this._requests.shift().resolve({value:t,done:!1})}elsethis._queuedChunk=t;this._done=!0,this._requests.forEach(function(e){e.resolve({value:void0,done:
o("_queue"ine&&"_queueTotalSize"ine,"Spec-level failure: ResetQueue should only be used on containers with [[queue]] and [[queueTotalSize]]."),e._queue=[],e._queueTotalSize=0}},function(e,t,r){functionn(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}functioni(e){returnnewtt(e)}functiona(e){returnnewet(e)}functiono(e){return!!Fe(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}functions(e){returnMe(!0===o(e),"IsReadableStreamDisturbed should only be used on known readable streams"),e._disturbed}functionl(e){returnMe(!0===o(e),"IsReadableStreamLocked should only be used on known readable streams"),void0!==e._reader}functionu(e,t){Me(!0===o(e)),Me("boolean"==typeoft);varr=a(e),n={closedOrErrored:!1,canceled1:!1,canceled2:!1,reason1:void0,reason2:void0};n.promise=newPromise(function(e){n._resolve=e});vari=c();i._reader=r,i._teeState=n,i._cloneForBranch2=t;vars=h();s._stream=e,s._teeState=n;varl=d();l._stream=e,l._teeState=n;varu=Object.create(Object.prototype);De(u,"pull",i),De(u,"cancel",s);varf=new$e(u),p=Object.create(Object.prototype);De(p,"pull",i),De(p,"cancel",l);varm=new$e(p);returni._branch1=f._readableStreamController,i._branch2=m._readableStreamController,r._closedPromise.catch(function(e){!0!==n.closedOrErrored&&(F(i._branch1,e),F(i._branch2,e),n.closedOrErrored=!0)}),[f,m]}functionc(){functione(){vart=e._reader,r=e._branch1,n=e._branch2,i=e._teeState;returnE(t).then(function(e){Me(Fe(e));vart=e.value,a=e.done;if(Me("boolean"==typeofa),!0===a&&!1===i.closedOrErrored&&(!1===i.canceled1&&j(r),!1===i.canceled2&&j(n),i.closedOrErrored=!0),!0!==i.closedOrErrored){varo=t,s=t;!1===i.canceled1&&D(r,o),!1===i.canceled2&&D(n,s)}})}returne}functionh(){functione(t){varr=e._stream,n=e._teeState;if(n.canceled1=!0,n.reason1=t,!0===n.canceled2){vari=je([n.reason1,n.reason2]),a=m(r,i);n._resolve(a)}returnn.promise}returne}functiond(){functione(t){varr=e._stream,n=e._teeState;if(n.canceled2=!0,n.reason2=t,!0===n.canceled1){vari=je([n.reason1,n.reason2]),a=m(r,i);n._resolve(a)}returnn.promise}returne}functionf(e){returnMe(!0===P(e._reader)),Me("readable"===e._state||"closed"===e._state),newPromise(function(t,r){varn={_resolve:t,_reject:r};e._reader._readIntoRequests.push(n)})}functionp(e){returnMe(!0===C(e._reader)),Me("readable"===e._state),newPromise(function(t,r){varn={_resolve:t,_reject:r};e._reader._readRequests.push(n)})}functionm(e,t){returne._disturbed=!0,"closed"===e._state?Promise.resolve(void0):"errored"===e._state?Promise.reject(e._storedError):(g(e),e._readableStreamController.__cancelSteps(t).then(function(){}))}functiong(e){Me("readable"===e._state),e._state="closed";vart=e._reader;if(void0!==t){if(!0===C(t)){for(varr=0;r<t._readRequests.length;r++){(0,t._readRequests[r]._resolve)(Re(void0,!0))}t._readRequests=[]}ve(t)}}functionv(e,t){Me(!0===o(e),"stream must be ReadableStream"),Me("readable"===e._state,"state must be readable"),e._state="errored",e._storedError=t;varr=e._reader;if(void0!==r){if(!0===C(r)){for(varn=0;n<r._readRequests.length;n++){r._readRequests[n]._reject(t)}r._readRequests=[]}else{Me(P(r),"reader must be ReadableStreamBYOBReader");for(vari=0;i<r._readIntoRequests.length;i++){r._readIntoRequests[i]._reject(t)}r._readIntoRequests=[]}me(r,t),r._closedPromise.catch(function(){})}}functionb(e,t,r){varn=e._reader;Me(n._readIntoRequests.length>0),n._readIntoRequests.shift()._resolve(Re(t,r))}function_(e,t,r){varn=e._reader;Me(n._readRequests.length>0),n._readRequests.shift()._resolve(Re(t,r))}functiony(e){returne._reader._readIntoRequests.length}functionA(e){returne._reader._readRequests.length}functionS(e){vart=e._reader;returnvoid0!==t&&!1!==P(t)}functionw(e){vart=e._reader;returnvoid0!==t&&!1!==C(t)}functionP(e){return!!Fe(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}functionC(e){return!!Fe(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}functionR(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?de(e):"
y(void0!==e._backpressureChangePromise,"_backpressureChangePromise should have been initialized"),h(e,!1),e._backpressureChangePromise}},{key:"cancel",value:function(){vare=this._transformStream;e._readableClosed=!0,u(e,newTypeError("Readable side canceled"))}}]),e}(),N=function(){functione(t){if(n(this,e),!1===m(t))thrownewTypeError("TransformStreamDefaultController can only be constructed with a TransformStream instance");if(void0!==t._transformStreamController)thrownewTypeError("TransformStreamDefaultController instances can only be created by the TransformStream constructor");this._controlledTransformStream=t}returnb(e,[{key:"enqueue",value:function(e){if(!1===p(this))throwg("enqueue");a(this._controlledTransformStream,e)}},{key:"close",value:function(){if(!1===p(this))throwg("close");i(this._controlledTransformStream)}},{key:"error",value:function(e){if(!1===p(this))throwg("error");o(this._controlledTransformStream,e)}},{key:"desiredSize",get:function(){if(!1===p(this))throwg("desiredSize");vare=this._controlledTransformStream,t=e._readableController;returnO(t)}}]),e}(),M=function(){functione(){vart=arguments.length>0&&void0!==arguments[0]?arguments[0]:{};n(this,e),this._transformer=t;varr=t.readableStrategy,i=t.writableStrategy;this._transforming=!1,this._errored=!1,this._storedError=void0,this._writableController=void0,this._readableController=void0,this._transformStreamController=void0,this._writableDone=!1,this._readableClosed=!1,this._backpressure=void0,this._backpressureChangePromise=void0,this._backpressureChangePromise_resolve=void0,this._transformStreamController=newN(this);vara=void0,o=newPromise(function(e){a=e}),s=newF(this,o);this._readable=newx(s,r);varl=newD(this,o);this._writable=newL(l,i),y(void0!==this._writableController),y(void0!==this._readableController),h(this,O(this._readableController)<=0);varu=this,c=S(t,"start",[u._transformStreamController]);a(c),o.catch(function(e){!1===u._errored&&(u._errored=!0,u._storedError=e)})}returnb(e,[{key:"readable",get:function(){if(!1===m(this))throwv("readable");returnthis._readable}},{key:"writable",get:function(){if(!1===m(this))throwv("writable");returnthis._writable}}]),e}();e.exports={TransformStream:M}},function(e,t,r){e.exports=r(5)}]))},function(e,t,r){"use strict";r(81),e.exports=r(16).Uint8ClampedArray},function(e,t,r){"use strict";varn=r(1)("unscopables"),i=Array.prototype;void0==i[n]&&r(4)(i,n,{}),e.exports=function(e){i[n][e]=!0}},function(e,t,r){"use strict";varn=r(12),i=r(19),a=r(6);e.exports=[].copyWithin||function(e,t){varr=n(this),o=a(r.length),s=i(e,o),l=i(t,o),u=arguments.length>2?arguments[2]:void0,c=Math.min((void0===u?o:i(u,o))-l,o-s),h=1;for(l<s&&s<l+c&&(h=-1,l+=c-1,s+=c-1);c-->0;)linr?r[s]=r[l]:deleter[s],s+=h,l+=h;returnr}},function(e,t,r){"use strict";varn=r(22),i=r(42),a=r(12),o=r(6),s=r(63);e.exports=function(e,t){varr=1==e,l=2==e,u=3==e,c=4==e,h=6==e,d=5==e||h,f=t||s;returnfunction(t,s,p){for(varm,g,v=a(t),b=i(v),_=n(s,p,3),y=o(b.length),A=0,S=r?f(t,y):l?f(t,0):void0;y>A;A++)if((d||Ainb)&&(m=b[A],g=_(m,A,v),e))if(r)S[A]=g;elseif(g)switch(e){case3:return!0;case5:returnm;case6:returnA;case2:S.push(m)}elseif(c)return!1;returnh?-1:u||c?c:S}}},function(e,t,r){"use strict";varn=r(9),i=r(66),a=r(1)("species");e.exports=function(e){vart;returni(e)&&(t=e.constructor,"function"!=typeoft||t!==Array&&!i(t.prototype)||(t=void0),n(t)&&null===(t=t[a])&&(t=void0)),void0===t?Array:t}},function(e,t,r){"use strict";varn=r(62);e.exports=function(e,t){returnnew(n(e))(t)}},function(e,t,r){"use strict";varn=r(2).document;e.exports=n&&n.documentElement},function(e,t,r){"use strict";varn=r(10),i=r(1)("iterator"),a=Array.prototype;e.exports=function(e){returnvoid0!==e&&(n.Array===e||a[i]===e)}},function(e,t,r){"use strict";varn=r(21);e.exports=Array.isArray||function(e){return"Array"==n(e)}},function(e,t,r){"use strict";varn=r(43),i=r(18),a=r(26),o={};r(4)(o,r(1)("iterator"),function(){returnthis}),e.exports=function(e,t,r){e.prototype=n(o,{next:i(1,r)}),a(e,t+"Itera
this.current.y=this.current.lineY=0},endText:function(){vare=this.pendingTextPaths,t=this.ctx;if(void0===e)returnvoidt.beginPath();t.save(),t.beginPath();for(varr=0;r<e.length;r++){varn=e[r];t.setTransform.apply(t,n.transform),t.translate(n.x,n.y),n.addToPath(t,n.fontSize)}t.restore(),t.clip(),t.beginPath(),deletethis.pendingTextPaths},setCharSpacing:function(e){this.current.charSpacing=e},setWordSpacing:function(e){this.current.wordSpacing=e},setHScale:function(e){this.current.textHScale=e/100},setLeading:function(e){this.current.leading=-e},setFont:function(e,t){varr=this.commonObjs.get(e),n=this.current;if(!r)thrownewError("Can't find font for "+e);if(n.fontMatrix=r.fontMatrix?r.fontMatrix:a.FONT_IDENTITY_MATRIX,0!==n.fontMatrix[0]&&0!==n.fontMatrix[3]||(0,a.warn)("Invalid font matrix for font "+e),t<0?(t=-t,n.fontDirection=-1):n.fontDirection=1,this.current.font=r,this.current.fontSize=t,!r.isType3Font){vari=r.loadedName||"sans-serif",o=r.black?"900":r.bold?"bold":"normal",s=r.italic?"italic":"normal",l='"'+i+'", '+r.fallbackName,u=t<16?16:t>100?100:t;this.current.fontSizeScale=t/u;varc=s+" "+o+" "+u+"px "+l;this.ctx.font=c}},setTextRenderingMode:function(e){this.current.textRenderingMode=e},setTextRise:function(e){this.current.textRise=e},moveText:function(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t},setLeadingMoveText:function(e,t){this.setLeading(-t),this.moveText(e,t)},setTextMatrix:function(e,t,r,n,i,a){this.current.textMatrix=[e,t,r,n,i,a],this.current.textMatrixScale=Math.sqrt(e*e+t*t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},nextLine:function(){this.moveText(0,this.current.leading)},paintChar:function(e,t,r){varn,i=this.ctx,o=this.current,s=o.font,l=o.textRenderingMode,u=o.fontSize/o.fontSizeScale,c=l&a.TextRenderingMode.FILL_STROKE_MASK,h=!!(l&a.TextRenderingMode.ADD_TO_PATH_FLAG);if((s.disableFontFace||h)&&(n=s.getPathGenerator(this.commonObjs,e)),s.disableFontFace?(i.save(),i.translate(t,r),i.beginPath(),n(i,u),c!==a.TextRenderingMode.FILL&&c!==a.TextRenderingMode.FILL_STROKE||i.fill(),c!==a.TextRenderingMode.STROKE&&c!==a.TextRenderingMode.FILL_STROKE||i.stroke(),i.restore()):(c!==a.TextRenderingMode.FILL&&c!==a.TextRenderingMode.FILL_STROKE||i.fillText(e,t,r),c!==a.TextRenderingMode.STROKE&&c!==a.TextRenderingMode.FILL_STROKE||i.strokeText(e,t,r)),h){(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:i.mozCurrentTransform,x:t,y:r,fontSize:u,addToPath:n})}},getisFontSubpixelAAEnabled(){vare=this.canvasFactory.create(10,10).context;e.scale(1.5,1),e.fillText("I",0,10);for(vart=e.getImageData(0,0,10,10).data,r=!1,n=3;n<t.length;n+=4)if(t[n]>0&&t[n]<255){r=!0;break}return(0,a.shadow)(this,"isFontSubpixelAAEnabled",r)},showText:function(e){vart=this.current,r=t.font;if(r.isType3Font)returnthis.showType3Text(e);varn=t.fontSize;if(0!==n){vari=this.ctx,o=t.fontSizeScale,s=t.charSpacing,l=t.wordSpacing,u=t.fontDirection,c=t.textHScale*u,h=e.length,d=r.vertical,f=d?1:-1,p=r.defaultVMetrics,m=n*t.fontMatrix[0],g=t.textRenderingMode===a.TextRenderingMode.FILL&&!r.disableFontFace;i.save(),i.transform.apply(i,t.textMatrix),i.translate(t.x,t.y+t.textRise),t.patternFill&&(i.fillStyle=t.fillColor.getPattern(i,this)),u>0?i.scale(c,-1):i.scale(c,1);varv=t.lineWidth,b=t.textMatrixScale;if(0===b||0===v){var_=t.textRenderingMode&a.TextRenderingMode.FILL_STROKE_MASK;_!==a.TextRenderingMode.STROKE&&_!==a.TextRenderingMode.FILL_STROKE||(this.cachedGetSinglePixelWidth=null,v=.65*this.getSinglePixelWidth())}elsev/=b;1!==o&&(i.scale(o,o),v/=o),i.lineWidth=v;vary,A=0;for(y=0;y<h;++y){varS=e[y];if((0,a.isNum)(S))A+=f*S*n/1e3;else{varw,P,C,R,x=!1,k=(S.isSpace?l:0)+s,T=S.fontChar,E=S.accent,O=S.width;if(d){varI,L,j;I=S.vmetric||p,L=S.vmetric?I[1]:.5*O,L=-L*m,j=I[2]*m,O=I?-I[0]:O,w=L/o,P=(A+j)/o}elsew=A/o,P=0;if(r.remeasure&&O>0){varD=1e3*i.measureText(T).width/n*o;if(O<D&&this.isFontSubpixelAAEnabled){varF=O/D;x=!0,i.save(),i.scale(F,1),w/=F}elseO!==D&&(w+=(O-D)/2e3*n/o)}(S.isInFont||r.missingFile)&&(g&&!E?i.fillText(T,w,P
;if("number"==typeofr)for(i=[],a=0;a<r;++a)i[a]=0;elseif("slice"inr)i=r.slice(0);elsefor(i=[],a=0,o=r.length;a<o;++a)i[a]=r[a];returni.subarray=e,i.buffer=i,i.byteLength=i.length,i.set=t,"object"===(void0===r?"undefined":n(r))&&r.buffer&&(i.buffer=r.buffer),i}if("undefined"==typeofUint8ClampedArray&&(i.Uint8ClampedArray=r(58)),"undefined"!=typeofUint8Array)returnvoid0===Uint8Array.prototype.subarray&&(Uint8Array.prototype.subarray=function(e,t){returnnewUint8Array(this.slice(e,t))},Float32Array.prototype.subarray=function(e,t){returnnewFloat32Array(this.slice(e,t))}),void("undefined"==typeofFloat64Array&&(i.Float64Array=Float32Array));a.prototype=Object.create(null);varu=0;i.Uint8Array=l,i.Int8Array=l,i.Int32Array=l,i.Uint16Array=l,i.Float32Array=l,i.Float64Array=l,i.Uint32Array=function(){if(3===arguments.length){if(0!==arguments[1])thrownewError("offset !== 0 is not supported");returnnewa(arguments[0],arguments[2])}returnl.apply(this,arguments)}}(),function(){if(g&&window.CanvasPixelArray){vare=window.CanvasPixelArray.prototype;"buffer"ine||(Object.defineProperty(e,"buffer",{get:function(){returnthis},enumerable:!1,configurable:!0}),Object.defineProperty(e,"byteLength",{get:function(){returnthis.length},enumerable:!1,configurable:!0}))}}(),function(){i.URL||(i.URL=i.webkitURL)}(),function(){if(void0!==Object.defineProperty){vare=!0;try{g&&Object.defineProperty(newImage,"id",{value:"test"});vart=function(){};t.prototype={getid(){}},Object.defineProperty(newt,"id",{value:"",configurable:!0,enumerable:!0,writable:!1})}catch(t){e=!1}if(e)return}Object.defineProperty=function(e,t,r){deletee[t],"get"inr&&e.__defineGetter__(t,r.get),"set"inr&&e.__defineSetter__(t,r.set),"value"inr&&(e.__defineSetter__(t,function(e){returnthis.__defineGetter__(t,function(){returne}),e}),e[t]=r.value)}}(),function(){if("undefined"!=typeofXMLHttpRequest){vare=XMLHttpRequest.prototype,t=newXMLHttpRequest;if("overrideMimeType"int||Object.defineProperty(e,"overrideMimeType",{value:function(e){}}),!("responseType"int)){if(Object.defineProperty(e,"responseType",{get:function(){returnthis._responseType||"text"},set:function(e){"text"!==e&&"arraybuffer"!==e||(this._responseType=e,"arraybuffer"===e&&"function"==typeofthis.overrideMimeType&&this.overrideMimeType("text/plain; charset=x-user-defined"))}}),"undefined"!=typeofVBArray)returnvoidObject.defineProperty(e,"response",{get:function(){return"arraybuffer"===this.responseType?newUint8Array(newVBArray(this.responseBody).toArray()):this.responseText}});Object.defineProperty(e,"response",{get:function(){if("arraybuffer"!==this.responseType)returnthis.responseText;vare,t=this.responseText,r=t.length,n=newUint8Array(r);for(e=0;e<r;++e)n[e]=255&t.charCodeAt(e);returnn.buffer}})}}}(),function(){if(!("btoa"ini)){vare="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.btoa=function(t){varr,n,i="";for(r=0,n=t.length;r<n;r+=3){vara=255&t.charCodeAt(r),o=255&t.charCodeAt(r+1),s=255&t.charCodeAt(r+2),l=a>>2,u=(3&a)<<4|o>>4,c=r+1<n?(15&o)<<2|s>>6:64,h=r+2<n?63&s:64;i+=e.charAt(l)+e.charAt(u)+e.charAt(c)+e.charAt(h)}returni}}}(),function(){if(!("atob"ini)){i.atob=function(e){if(e=e.replace(/=+$/,""),e.length%4==1)thrownewError("bad atob input");for(vart,r,n=0,i=0,a="";r=e.charAt(i++);~r&&(t=n%4?64*t+r:r,n++%4)?a+=String.fromCharCode(255&t>>(-2*n&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);returna}}}(),function(){void0===Function.prototype.bind&&(Function.prototype.bind=function(e){vart=this,r=Array.prototype.slice.call(arguments,1);returnfunction(){varn=r.concat(Array.prototype.slice.call(arguments));returnt.apply(e,n)}})}(),function(){if(g){"dataset"indocument.createElement("div")||Object.defineProperty(HTMLElement.prototype,"dataset",{get:function(){if(this._dataset)returnthis._dataset;for(vare={},t=0,r=this.attributes.length;t<r;t++){varn=this.attributes[t];if("data-"===n.name.substring(0,5)){e[n.name.substring(5).replace(/\-([a-z])/g,function(e,t){returnt.toUpperCase()})]=n.valu