UNPKG

@xysfe/actui

Version:

A fantastic mobile ui lib implement by Vue

1 lines 427 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Pdfjs=t():e.Pdfjs=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="../es",t(t.s=2174)}({0:function(e,t){var r=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=r)},1:function(e,t,r){var n=r(31)("wks"),i=r(24),o=r(0).Symbol,a="function"==typeof o;(e.exports=function(e){return n[e]||(n[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=n},10:function(e,t,r){var n=r(4),i=r(41),o=r(38),a=Object.defineProperty;t.f=r(3)?Object.defineProperty:function(e,t,r){if(n(e),t=o(t,!0),n(r),i)try{return a(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},100:function(e,t,r){"use strict";var n=r(9),i=r(2),o=r(0),a=r(64),s=r(67);n(n.P+n.R,"Promise",{finally:function(e){var t=a(this,i.Promise||o.Promise),r="function"==typeof e;return this.then(r?function(r){return s(t,e()).then(function(){return r})}:e,r?function(r){return s(t,e()).then(function(){throw r})}:e)}})},101:function(e,t,r){"use strict";var n=r(9),i=r(44),o=r(66);n(n.S,"Promise",{try:function(e){var t=i.f(this),r=o(e);return(r.e?t.reject:t.resolve)(r.v),t.promise}})},11:function(e,t){e.exports={}},12:function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},13:function(e,t,r){var n=r(34),i=r(15);e.exports=function(e){return n(i(e))}},14:function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},15:function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},16:function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},17:function(e,t,r){var n=r(19);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},18:function(e,t){e.exports=!0},19:function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},2:function(e,t){var r=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=r)},20:function(e,t,r){var n=r(31)("keys"),i=r(24);e.exports=function(e){return n[e]||(n[e]=i(e))}},2174:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(262),i=r.n(n),o=r(263),a=r.n(o),s=r(71),u=r.n(s),c=r(630),l=r.n(c),f=r(2175),h=(r.n(f),r(2181));r.n(h);f.GlobalWorkerOptions.workerSrc=window.__global_cdn__+"/js/pdf/pdf.worker.es5.js";var d={INITED:1,DRAWING:2,RENDERING:3,RENDERED:4,DESTROYED:5},p=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l()(this,e),this.scale=t.scale,this.viewport=t.viewport,this.container=t.container,this.brandColor=t.brandColor,this.pdfPage=null,this.state=d.INITED,this.canvas=null,this.canvasWrapper=null,this.index=t.index,this.pdfDoc=t.pdfDoc;var r=document.createElement("div");r.className="pdf-act-page",this.pageWidth=Math.floor(this.viewport.width/this.scale),this.pageHeight=Math.floor(this.viewport.height/this.scale),this.div=r,this.container.appendChild(r)}return e.prototype.setLoading=function(){var e=document.createElement("span");e.className="pdf-act-loading",this.div.appendChild(e)},e.prototype.hideLoading=function(){var e=this.div.firstElementChild;e&&(e.style.visibility="hidden")},e.prototype.draw=function(){if([d.INITED].includes(this.state)){if(this.state=d.DRAWING,!this.canvasWrapper){var e=document.createElement("div");this.canvasWrapper=e,e.style.cssText="width:"+this.pageWidth+";height:"+this.pageHeight,e.className="pdf-act-page-wrapper"}if(!this.canvas){var t=document.createElement("canvas");this.canvas=t;var r=t.getContext("2d",{alpha:!1}),n=Math.min(window.devicePixelRatio||2,3),i=this.pageWidth*n,o=this.pageHeight*n;if(i>2048||o>2048){var a=Math.min(2048/i,2048/o);t.width=i*a,t.height=o*a}else t.width=i,t.height=o;t.style.cssText="height:"+this.pageHeight+"px;width:"+this.pageWidth+"px",this.renderContext={canvasContext:r,viewport:this.viewport,transform:[n/this.scale,0,0,n/this.scale,0,0],enableWebGL:!0,renderInteractiveForms:!1}}}},e.prototype.render=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.state!==d.DRAWING)return u.a.resolve();this.state=d.RENDERING;var r=this.pdfPage.render(this.renderContext).promise,n=new u.a(function(e,t){setTimeout(function(){return t(new Error("渲染超时"))},6e3)});return this.renderTask={promise:u.a.race([r,n]),cancel:function(){e.renderTask&&e.renderTask._internalRenderTask&&e.renderTask._internalRenderTask.cancel()}},this.renderTask.promise.then(function(){return e.state===d.DESTROYED?u.a.reject("Page destroyed"):(e.state=d.RENDERED,e.renderTask=null,e.createImageFromCanvas())}).catch(function(r){return console.log("渲染失败 (尝试 "+(t+1)+"/3):",r),t<2?(console.log("重新尝试渲染页面 "+(e.index+1)+"..."),new u.a(function(r){setTimeout(function(){r(e.render(t+1))},500*(t+1))})):(e.cleanupCanvas(),u.a.reject(new Error("页面 "+(e.index+1)+" 渲染失败,已达到最大重试次数")))})},e.prototype.createImageFromCanvas=function(){function e(){return t.apply(this,arguments)}var t=a()(i.a.mark(function e(){var t,r=this;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=document.createElement("img"),t.style.cssText="width:"+this.pageWidth+"px;height:"+this.pageHeight+"px",t.onload=function(){if(r.div.style.cssText="width:"+r.pageWidth+"px;height:"+r.pageHeight+"px;",r.canvasWrapper.appendChild(t),r.div.appendChild(r.canvasWrapper),r.pdfDoc){var e=r.pdfDoc,n=e.renderedPages,i=e.curLoadEnd,o=e.maxConcurrentRenders;n.includes(r.index)||r.pdfDoc.renderedPages.push(r.index);for(var a=!0,s=i-(o-1);s<=i;s++)if(!n.includes(s)){a=!1;break}a&&r.pdfDoc.loadNextBatch(),r.pdfDoc.refreshScroll()}},t.src=this.canvas.toDataURL("image/jpeg",.9),this.cleanupCanvas();case 5:case"end":return e.stop()}},e,this)}));return e}(),e.prototype.cleanupCanvas=function(){if(this.canvas){this.canvas.getContext("2d").clearRect(0,0,this.canvas.width,this.canvas.height),this.canvas.width=0,this.canvas.height=0,this.canvas=null}},e.prototype.destroy=function(){if(this.renderTask&&(this.renderTask.cancel(),this.renderTask=null),this.cleanupCanvas(),this.canvasWrapper){var e=this.canvasWrapper.querySelector("img");e&&e.src.startsWith("blob:")&&URL.revokeObjectURL(e.src),this.canvasWrapper=null}this.pdfPage&&(this.pdfPage.cleanup(),this.pdfPage=null),this.div&&this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.state=d.DESTROYED},e.prototype.setPdfPage=function(e){this.pdfPage=e},e}(),v=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l()(this,e),this.url=t.url||"",this.container=t.container||null,this.brandColor=t.brandColor||"#8c7fee",this.pdfLoadingTask=null,this.pdfDocument=null,this.numPages=0,this.pageHeight=0,this.pageArr=[],this.startNum=0,this.renderQueue=[],this.isRendering=!1,this.maxConcurrentRenders=1,this.isDestroyed=!1,this.curLoadEnd=0,this.renderedPages=[],this.scollRef=null,this.inited=!1}return e.prototype.init=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return this.isDestroyed?null:(this.url=t.url||this.url,this.container=t.container||this.container,this.brandColor=t.brandColor||this.brandColor,this.scollRef=t.scollRef,this.pdfLoadingTask=Object(f.getDocument)({url:this.url,cMapPacked:!0,cMapUrl:window.__global_cdn__+"/js/pdf/cmaps/",maxImageSize:10485760}),this.pdfLoadingTask.promise.then(function(t){return e.pdfDocument=t,e.numPages=t.numPages,e.inited=!0,e.initPage()}).catch(function(e){return console.warn("PDF 加载失败:",e),u.a.reject(e)}))}catch(e){return console.warn(e),u.a.reject(e)}},e.prototype.initPage=function(){function e(){return t.apply(this,arguments)}var t=a()(i.a.mark(function e(){return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isDestroyed){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,this.setPdfPages(this.startNum,this.maxConcurrentRenders-1);case 4:return this.render(this.startNum,this.maxConcurrentRenders-1),e.abrupt("return",u.a.resolve({render:this.render.bind(this),totalPages:this.numPages}));case 6:case"end":return e.stop()}},e,this)}));return e}(),e.prototype.loadNextBatch=function(){function e(){return t.apply(this,arguments)}var t=a()(i.a.mark(function e(){var t,r;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isRendering){e.next=2;break}return e.abrupt("return");case 2:if(t=this.curLoadEnd+1,r=Math.min(this.numPages-1,t+this.maxConcurrentRenders-1),!(t>r)){e.next=6;break}return e.abrupt("return");case 6:return e.next=8,this.setPdfPages(t,r);case 8:this.render(t,r);case 9:case"end":return e.stop()}},e,this)}));return e}(),e.prototype.setPdfPages=function(){function e(e,r){return t.apply(this,arguments)}var t=a()(i.a.mark(function e(t,r){var n,o,a,s,u,c,l;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.curLoadEnd=r,n=this.container.offsetWidth,o=this.pageHeight||0,a=t;case 4:if(!(a<=r)){e.next=23;break}return e.prev=5,e.next=8,this.pdfDocument.getPage(a+1);case 8:s=e.sent,u=s.getViewport({scale:1}),c=u.width/n,o=Math.max(Math.floor(u.height/c),o),l=new p({scale:c,viewport:u,container:this.container,brandColor:this.brandColor,index:a,pdfDoc:this}),l.setPdfPage(s),this.pageArr[a]=l,e.next=20;break;case 17:e.prev=17,e.t0=e.catch(5),console.warn("页面 "+(a+1)+" 初始化失败:",e.t0);case 20:a++,e.next=4;break;case 23:this.pageHeight=o,r<this.numPages-1&&0!==r?this.setBottomLoading():this.hideBottomLoading();case 25:case"end":return e.stop()}},e,this,[[5,17]])}));return e}(),e.prototype.render=function(){function e(e,r){return t.apply(this,arguments)}var t=a()(i.a.mark(function e(t,r){var n,o;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.renderedPages.includes(r)){e.next=2;break}return e.abrupt("return");case 2:if(!this.isDestroyed){e.next=4;break}return e.abrupt("return");case 4:for(this.renderQueue=[],n=Math.min(r,this.numPages-1),o=t;o<=n;o++)o>=0&&o<this.numPages&&this.pageArr[o]&&this.renderQueue.push(this.pageArr[o]);return e.next=9,this.processRenderQueue();case 9:case"end":return e.stop()}},e,this)}));return e}(),e.prototype.processRenderQueue=function(){function e(){return t.apply(this,arguments)}var t=a()(i.a.mark(function e(){var t,r,n,o=this;return i.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isRendering&&0!==this.renderQueue.length){e.next=2;break}return e.abrupt("return");case 2:this.isRendering=!0,t=[],e.prev=4;case 5:if(!(this.renderQueue.length>0||t.length>0)){e.next=18;break}r=function(){var e=o.renderQueue.shift();if(![d.INITED].includes(e.state))return"continue";if(e.draw(),e.state!==d.DRAWING)return"continue";var r={pageView:e,promise:e.render().then(function(){console.log("页面 "+(e.index+1)+" 渲染完成")}).catch(function(t){console.warn("页面 "+(e.index+1)+" 渲染失败:",t)}).finally(function(){var e=t.indexOf(r);e>-1&&t.splice(e,1)})};t.push(r)};case 7:if(!(t.length<this.maxConcurrentRenders&&this.renderQueue.length>0)){e.next=13;break}if("continue"!==(n=r())){e.next=11;break}return e.abrupt("continue",7);case 11:e.next=7;break;case 13:if(!(t.length>0)){e.next=16;break}return e.next=16,u.a.race(t.map(function(e){return e.promise}));case 16:e.next=5;break;case 18:e.next=23;break;case 20:e.prev=20,e.t0=e.catch(4),console.error("渲染队列处理失败:",e.t0);case 23:return e.prev=23,this.isRendering=!1,e.finish(23);case 26:case"end":return e.stop()}},e,this,[[4,20,23,26]])}));return e}(),e.prototype.refreshScroll=function(){this.scollRef&&this.scollRef.refresh()},e.prototype.setBottomLoading=function(){this.hideBottomLoading();var e=document.createElement("div");e.innerHTML='<div class="loading-wrap">\n <div class="loading-cont-cir" style="color: '+this.brandColor+'"></div>\n </div>',e.id="pdf-bottom-loading",this.container.appendChild(e)},e.prototype.hideBottomLoading=function(){var e=document.getElementById("pdf-bottom-loading");e&&e.remove()},e.prototype.destroy=function(){this.isDestroyed=!0,this.isRendering=!1,this.renderQueue=[],this.pageArr.forEach(function(e){e&&e.destroy()}),this.pageArr=[],this.pdfDocument&&(this.pdfDocument.destroy(),this.pdfDocument=null),this.pdfLoadingTask&&(this.pdfLoadingTask.destroy(),this.pdfLoadingTask=null),this.container&&(this.container.innerHTML=""),console.log("PDF 实例已销毁")},e}();t.default=v},2175:function(module,exports,__webpack_require__){(function(Buffer,process,global){!function(e,t){module.exports=t()}(0,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var i in e)t.d(n,i,function(t){return e[t]}.bind(null,i));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLinkAttributes",{enumerable:!0,get:function(){return n.addLinkAttributes}}),Object.defineProperty(t,"getFilenameFromUrl",{enumerable:!0,get:function(){return n.getFilenameFromUrl}}),Object.defineProperty(t,"LinkTarget",{enumerable:!0,get:function(){return n.LinkTarget}}),Object.defineProperty(t,"loadScript",{enumerable:!0,get:function(){return n.loadScript}}),Object.defineProperty(t,"PDFDateString",{enumerable:!0,get:function(){return n.PDFDateString}}),Object.defineProperty(t,"RenderingCancelledException",{enumerable:!0,get:function(){return n.RenderingCancelledException}}),Object.defineProperty(t,"build",{enumerable:!0,get:function(){return i.build}}),Object.defineProperty(t,"getDocument",{enumerable:!0,get:function(){return i.getDocument}}),Object.defineProperty(t,"LoopbackPort",{enumerable:!0,get:function(){return i.LoopbackPort}}),Object.defineProperty(t,"PDFDataRangeTransport",{enumerable:!0,get:function(){return i.PDFDataRangeTransport}}),Object.defineProperty(t,"PDFWorker",{enumerable:!0,get:function(){return i.PDFWorker}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return i.version}}),Object.defineProperty(t,"CMapCompressionType",{enumerable:!0,get:function(){return o.CMapCompressionType}}),Object.defineProperty(t,"createObjectURL",{enumerable:!0,get:function(){return o.createObjectURL}}),Object.defineProperty(t,"createPromiseCapability",{enumerable:!0,get:function(){return o.createPromiseCapability}}),Object.defineProperty(t,"createValidAbsoluteUrl",{enumerable:!0,get:function(){return o.createValidAbsoluteUrl}}),Object.defineProperty(t,"InvalidPDFException",{enumerable:!0,get:function(){return o.InvalidPDFException}}),Object.defineProperty(t,"MissingPDFException",{enumerable:!0,get:function(){return o.MissingPDFException}}),Object.defineProperty(t,"OPS",{enumerable:!0,get:function(){return o.OPS}}),Object.defineProperty(t,"PasswordResponses",{enumerable:!0,get:function(){return o.PasswordResponses}}),Object.defineProperty(t,"PermissionFlag",{enumerable:!0,get:function(){return o.PermissionFlag}}),Object.defineProperty(t,"removeNullCharacters",{enumerable:!0,get:function(){return o.removeNullCharacters}}),Object.defineProperty(t,"shadow",{enumerable:!0,get:function(){return o.shadow}}),Object.defineProperty(t,"UnexpectedResponseException",{enumerable:!0,get:function(){return o.UnexpectedResponseException}}),Object.defineProperty(t,"UNSUPPORTED_FEATURES",{enumerable:!0,get:function(){return o.UNSUPPORTED_FEATURES}}),Object.defineProperty(t,"Util",{enumerable:!0,get:function(){return o.Util}}),Object.defineProperty(t,"VerbosityLevel",{enumerable:!0,get:function(){return o.VerbosityLevel}}),Object.defineProperty(t,"AnnotationLayer",{enumerable:!0,get:function(){return a.AnnotationLayer}}),Object.defineProperty(t,"apiCompatibilityParams",{enumerable:!0,get:function(){return s.apiCompatibilityParams}}),Object.defineProperty(t,"GlobalWorkerOptions",{enumerable:!0,get:function(){return u.GlobalWorkerOptions}}),Object.defineProperty(t,"renderTextLayer",{enumerable:!0,get:function(){return c.renderTextLayer}}),Object.defineProperty(t,"SVGGraphics",{enumerable:!0,get:function(){return l.SVGGraphics}});var n=r(1),i=r(198),o=r(5),a=r(209),s=r(200),u=r(203),c=r(210),l=r(211);if(r(7).isNodeJS){var f=r(212).PDFNodeStream;(0,i.setPDFNetworkStreamFactory)(function(e){return new f(e)})}else{var h,d=r(215).PDFNetworkStream;(0,n.isFetchSupported)()&&(h=r(216).PDFFetchStream),(0,i.setPDFNetworkStreamFactory)(function(e){return h&&(0,n.isValidFetchUrl)(e.url)?new h(e):new d(e)})}},function(e,t,r){"use strict";function n(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=i(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw a}}}}function i(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e){"@babel/helpers - typeof";return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=h();return function(){var r,n=d(e);if(t){var i=d(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return l(this,r)}}function l(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?f(e):t}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e,t,r,n,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function v(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){function o(e){p(s,n,i,o,a,"next",e)}function a(e){p(s,n,i,o,a,"throw",e)}var s=e.apply(t,r);o(void 0)})}}function y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function m(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),e}function b(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.url,n=t.target,i=t.rel,o=t.enabled,a=void 0===o||o;(0,R.assert)(r&&"string"==typeof r,'addLinkAttributes: A valid "url" parameter must provided.');var s=(0,R.removeNullCharacters)(r);a?e.href=e.title=s:(e.href="",e.title="Disabled: ".concat(s),e.onclick=function(){return!1});var u="";switch(n){case I.NONE:break;case I.SELF:u="_self";break;case I.BLANK:u="_blank";break;case I.PARENT:u="_parent";break;case I.TOP:u="_top"}e.target=u,e.rel="string"==typeof i?i:C}function _(e){var t=e.indexOf("#"),r=e.indexOf("?"),n=Math.min(t>0?t:e.length,r>0?r:e.length);return e.substring(e.lastIndexOf("/",n)+1,n)}function A(){return"undefined"!=typeof fetch&&"undefined"!=typeof Response&&"body"in Response.prototype&&"undefined"!=typeof ReadableStream}function w(e,t){try{var r=t?new URL(e,t):new URL(e),n=r.protocol;return"http:"===n||"https:"===n}catch(e){return!1}}function S(e){return new Promise(function(t,r){var n=document.createElement("script");n.src=e,n.onload=t,n.onerror=function(){r(new Error("Cannot load script at: ".concat(n.src)))},(document.head||document.documentElement).appendChild(n)})}function k(e){console.log("Deprecated API usage: "+e)}Object.defineProperty(t,"__esModule",{value:!0}),t.addLinkAttributes=b,t.getFilenameFromUrl=_,t.isFetchSupported=A,t.isValidFetchUrl=w,t.loadScript=S,t.deprecated=k,t.PDFDateString=t.StatTimer=t.DOMSVGFactory=t.DOMCMapReaderFactory=t.DOMCanvasFactory=t.DEFAULT_LINK_REL=t.LinkTarget=t.RenderingCancelledException=t.PageViewport=void 0;var x=function(e){return e&&e.__esModule?e:{default:e}}(r(2)),R=r(5),C="noopener noreferrer nofollow";t.DEFAULT_LINK_REL=C;var P="http://www.w3.org/2000/svg",T=function(){function e(){y(this,e)}return m(e,[{key:"create",value:function(e,t){if(e<=0||t<=0)throw new Error("Invalid canvas size");var r=document.createElement("canvas"),n=r.getContext("2d");return r.width=e,r.height=t,{canvas:r,context:n}}},{key:"reset",value:function(e,t,r){if(!e.canvas)throw new Error("Canvas is not specified");if(t<=0||r<=0)throw new Error("Invalid canvas size");e.canvas.width=t,e.canvas.height=r}},{key:"destroy",value:function(e){if(!e.canvas)throw new Error("Canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}}]),e}();t.DOMCanvasFactory=T;var E=function(){function e(t){var r=t.baseUrl,n=void 0===r?null:r,i=t.isCompressed,o=void 0!==i&&i;y(this,e),this.baseUrl=n,this.isCompressed=o}return m(e,[{key:"fetch",value:function(e){function t(t){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){var e=v(x.default.mark(function e(t){var r,n,i,o=this;return x.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.name,this.baseUrl){e.next=3;break}throw new Error('The CMap "baseUrl" parameter must be specified, ensure that the "cMapUrl" and "cMapPacked" API parameters are provided.');case 3:if(r){e.next=5;break}throw new Error("CMap name must be specified.");case 5:if(n=this.baseUrl+r+(this.isCompressed?".bcmap":""),i=this.isCompressed?R.CMapCompressionType.BINARY:R.CMapCompressionType.NONE,!A()||!w(n,document.baseURI)){e.next=9;break}return e.abrupt("return",fetch(n).then(function(){var e=v(x.default.mark(function e(t){var r;return x.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.ok){e.next=2;break}throw new Error(t.statusText);case 2:if(!o.isCompressed){e.next=10;break}return e.t0=Uint8Array,e.next=6,t.arrayBuffer();case 6:e.t1=e.sent,r=new e.t0(e.t1),e.next=15;break;case 10:return e.t2=R.stringToBytes,e.next=13,t.text();case 13:e.t3=e.sent,r=(0,e.t2)(e.t3);case 15:return e.abrupt("return",{cMapData:r,compressionType:i});case 16:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}()).catch(function(e){throw new Error("Unable to load ".concat(o.isCompressed?"binary ":"")+"CMap at: ".concat(n))}));case 9:return e.abrupt("return",new Promise(function(e,t){var r=new XMLHttpRequest;r.open("GET",n,!0),o.isCompressed&&(r.responseType="arraybuffer"),r.onreadystatechange=function(){if(r.readyState===XMLHttpRequest.DONE){if(200===r.status||0===r.status){var n;if(o.isCompressed&&r.response?n=new Uint8Array(r.response):!o.isCompressed&&r.responseText&&(n=(0,R.stringToBytes)(r.responseText)),n)return void e({cMapData:n,compressionType:i})}t(new Error(r.statusText))}},r.send(null)}).catch(function(e){throw new Error("Unable to load ".concat(o.isCompressed?"binary ":"")+"CMap at: ".concat(n))}));case 10:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}())}]),e}();t.DOMCMapReaderFactory=E;var O=function(){function e(){y(this,e)}return m(e,[{key:"create",value:function(e,t){(0,R.assert)(e>0&&t>0,"Invalid SVG dimensions");var r=document.createElementNS(P,"svg:svg");return r.setAttribute("version","1.1"),r.setAttribute("width",e+"px"),r.setAttribute("height",t+"px"),r.setAttribute("preserveAspectRatio","none"),r.setAttribute("viewBox","0 0 "+e+" "+t),r}},{key:"createElement",value:function(e){return(0,R.assert)("string"==typeof e,"Invalid SVG element type"),document.createElementNS(P,e)}}]),e}();t.DOMSVGFactory=O;var L=function(){function e(t){var r=t.viewBox,n=t.scale,i=t.rotation,o=t.offsetX,a=void 0===o?0:o,s=t.offsetY,u=void 0===s?0:s,c=t.dontFlip,l=void 0!==c&&c;y(this,e),this.viewBox=r,this.scale=n,this.rotation=i,this.offsetX=a,this.offsetY=u;var f,h,d,p,v=(r[2]+r[0])/2,g=(r[3]+r[1])/2;switch(i%=360,i=i<0?i+360:i){case 180:f=-1,h=0,d=0,p=1;break;case 90:f=0,h=1,d=1,p=0;break;case 270:f=0,h=-1,d=-1,p=0;break;case 0:f=1,h=0,d=0,p=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}l&&(d=-d,p=-p);var m,b,_,A;0===f?(m=Math.abs(g-r[1])*n+a,b=Math.abs(v-r[0])*n+u,_=Math.abs(r[3]-r[1])*n,A=Math.abs(r[2]-r[0])*n):(m=Math.abs(v-r[0])*n+a,b=Math.abs(g-r[1])*n+u,_=Math.abs(r[2]-r[0])*n,A=Math.abs(r[3]-r[1])*n),this.transform=[f*n,h*n,d*n,p*n,m-f*n*v-d*n*g,b-h*n*v-p*n*g],this.width=_,this.height=A}return m(e,[{key:"clone",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.scale,n=void 0===r?this.scale:r,i=t.rotation,o=void 0===i?this.rotation:i,a=t.offsetX,s=void 0===a?this.offsetX:a,u=t.offsetY,c=void 0===u?this.offsetY:u,l=t.dontFlip,f=void 0!==l&&l;return new e({viewBox:this.viewBox.slice(),scale:n,rotation:o,offsetX:s,offsetY:c,dontFlip:f})}},{key:"convertToViewportPoint",value:function(e,t){return R.Util.applyTransform([e,t],this.transform)}},{key:"convertToViewportRectangle",value:function(e){var t=R.Util.applyTransform([e[0],e[1]],this.transform),r=R.Util.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],r[0],r[1]]}},{key:"convertToPdfPoint",value:function(e,t){return R.Util.applyInverseTransform([e,t],this.transform)}}]),e}();t.PageViewport=L;var F=function(e){function t(e,n){var i;return y(this,t),i=r.call(this,e),i.type=n,i}s(t,e);var r=c(t);return t}(R.BaseException);t.RenderingCancelledException=F;var I={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4};t.LinkTarget=I;var M=function(){function e(){y(this,e),this.started=Object.create(null),this.times=[]}return m(e,[{key:"time",value:function(e){e in this.started&&(0,R.warn)("Timer is already running for ".concat(e)),this.started[e]=Date.now()}},{key:"timeEnd",value:function(e){e in this.started||(0,R.warn)("Timer has not been started for ".concat(e)),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e]}},{key:"toString",value:function(){var e,t=[],r=0,i=n(this.times);try{for(i.s();!(e=i.n()).done;){var o=e.value,a=o.name;a.length>r&&(r=a.length)}}catch(e){i.e(e)}finally{i.f()}var s,u=n(this.times);try{for(u.s();!(s=u.n()).done;){var c=s.value,l=c.end-c.start;t.push("".concat(c.name.padEnd(r)," ").concat(l,"ms\n"))}}catch(e){u.e(e)}finally{u.f()}return t.join("")}}]),e}();t.StatTimer=M;var j,D=function(){function e(){y(this,e)}return m(e,null,[{key:"toDateObject",value:function(e){if(!e||!(0,R.isString)(e))return null;j||(j=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?"));var t=j.exec(e);if(!t)return null;var r=parseInt(t[1],10),n=parseInt(t[2],10);n=n>=1&&n<=12?n-1:0;var i=parseInt(t[3],10);i=i>=1&&i<=31?i:1;var o=parseInt(t[4],10);o=o>=0&&o<=23?o:0;var a=parseInt(t[5],10);a=a>=0&&a<=59?a:0;var s=parseInt(t[6],10);s=s>=0&&s<=59?s:0;var u=t[7]||"Z",c=parseInt(t[8],10);c=c>=0&&c<=23?c:0;var l=parseInt(t[9],10)||0;return l=l>=0&&l<=59?l:0,"-"===u?(o+=c,a+=l):"+"===u&&(o-=c,a-=l),new Date(Date.UTC(r,n,i,o,a,s))}}]),e}();t.PDFDateString=D},function(e,t,r){"use strict";e.exports=r(3)},function(e,t,r){"use strict";(function(e){function t(e){"@babel/helpers - typeof";return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r=function(e){function r(e,t,r,n){var o=t&&t.prototype instanceof i?t:i,a=Object.create(o.prototype),s=new d(n||[]);return a._invoke=c(e,r,s),a}function n(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function i(){}function o(){}function a(){}function s(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function u(e,r){function i(o,a,s,u){var c=n(e[o],e,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"===t(f)&&m.call(f,"__await")?r.resolve(f.__await).then(function(e){i("next",e,s,u)},function(e){i("throw",e,s,u)}):r.resolve(f).then(function(e){l.value=e,s(l)},function(e){return i("throw",e,s,u)})}u(c.arg)}function o(e,t){function n(){return new r(function(r,n){i(e,t,r,n)})}return a=a?a.then(n,n):n()}var a;this._invoke=o}function c(e,t,r){var i=S;return function(o,a){if(i===x)throw new Error("Generator is already running");if(i===R){if("throw"===o)throw a;return v()}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=l(s,r);if(u){if(u===C)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===S)throw i=R,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=x;var c=n(e,t,r);if("normal"===c.type){if(i=r.done?R:k,c.arg===C)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=R,r.method="throw",r.arg=c.arg)}}}function l(e,t){var r=e.iterator[t.method];if(r===y){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=y,l(e,t),"throw"===t.method))return C;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return C}var i=n(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,C;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=y),t.delegate=null,C):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,C)}function f(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function h(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function d(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(f,this),this.reset(!0)}function p(e){if(e){var t=e[_];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(m.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=y,t.done=!0,t};return n.next=n}}return{next:v}}function v(){return{value:y,done:!0}}var y,g=Object.prototype,m=g.hasOwnProperty,b="function"==typeof Symbol?Symbol:{},_=b.iterator||"@@iterator",A=b.asyncIterator||"@@asyncIterator",w=b.toStringTag||"@@toStringTag";e.wrap=r;var S="suspendedStart",k="suspendedYield",x="executing",R="completed",C={},P={};P[_]=function(){return this};var T=Object.getPrototypeOf,E=T&&T(T(p([])));E&&E!==g&&m.call(E,_)&&(P=E);var O=a.prototype=i.prototype=Object.create(P);return o.prototype=O.constructor=a,a.constructor=o,a[w]=o.displayName="GeneratorFunction",e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===o||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,a):(e.__proto__=a,w in e||(e[w]="GeneratorFunction")),e.prototype=Object.create(O),e},e.awrap=function(e){return{__await:e}},s(u.prototype),u.prototype[A]=function(){return this},e.AsyncIterator=u,e.async=function(t,n,i,o,a){void 0===a&&(a=Promise);var s=new u(r(t,n,i,o),a);return e.isGeneratorFunction(n)?s:s.next().then(function(e){return e.done?e.value:s.next()})},s(O),O[w]="Generator",O[_]=function(){return this},O.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=p,d.prototype={constructor:d,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=y,this.done=!1,this.delegate=null,this.method="next",this.arg=y,this.tryEntries.forEach(h),!e)for(var t in this)"t"===t.charAt(0)&&m.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=y)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){function t(t,n){return o.type="throw",o.arg=e,r.next=t,n&&(r.method="next",r.arg=y),!!n}if(this.done)throw e;for(var r=this,n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=m.call(i,"catchLoc"),s=m.call(i,"finallyLoc");if(a&&s){if(this.prev<i.catchLoc)return t(i.catchLoc,!0);if(this.prev<i.finallyLoc)return t(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return t(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return t(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&m.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,C):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),C},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),h(r),C}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;h(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:p(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=y),C}},e}("object"===t(e)?e.exports:{});try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}}).call(this,r(4)(e))},function(e,t,r){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){"use strict";function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function o(e){"@babel/helpers - typeof";return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=h();return function(){var r,n=d(e);if(t){var i=d(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return l(this,r)}}function l(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?f(e):t}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function p(e){Number.isInteger(e)&&(ue=e)}function v(){return ue}function y(e){ue>=ne.INFOS&&console.log("Info: ".concat(e))}function g(e){ue>=ne.WARNINGS&&console.log("Warning: ".concat(e))}function m(e){throw new Error(e)}function b(e,t){e||m(t)}function _(e,t){var r;try{if(r=new URL(e),!r.origin||"null"===r.origin)return!1}catch(e){return!1}var n=new URL(t,r);return r.origin===n.origin}function A(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function w(e,t){if(!e)return null;try{var r=t?new URL(e,t):new URL(e);if(A(r))return r}catch(e){}return null}function S(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}function k(e){return"string"!=typeof e?(g("The argument for removeNullCharacters must be a string."),e):e.replace(ge,"")}function x(e){b(null!==e&&"object"===o(e)&&void 0!==e.length,"Invalid argument for bytesToString");var t=e.length;if(t<8192)return String.fromCharCode.apply(null,e);for(var r=[],n=0;n<t;n+=8192){var i=Math.min(n+8192,t),a=e.subarray(n,i);r.push(String.fromCharCode.apply(null,a))}return r.join("")}function R(e){b("string"==typeof e,"Invalid argument for stringToBytes");for(var t=e.length,r=new Uint8Array(t),n=0;n<t;++n)r[n]=255&e.charCodeAt(n);return r}function C(e){return void 0!==e.length?e.length:(b(void 0!==e.byteLength,"arrayByteLength - invalid argument."),e.byteLength)}function P(e){var t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];for(var r=0,n=0;n<t;n++)r+=C(e[n]);for(var i=0,o=new Uint8Array(r),a=0;a<t;a++){var s=e[a];s instanceof Uint8Array||(s="string"==typeof s?R(s):new Uint8Array(s));var u=s.byteLength;o.set(s,i),i+=u}return o}function T(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function E(){var e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]}function O(){try{return new Function(""),!0}catch(e){return!1}}function L(e){var t=e.length,r=[];if("þ"===e[0]&&"ÿ"===e[1])for(var n=2;n<t;n+=2)r.push(String.fromCharCode(e.charCodeAt(n)<<8|e.charCodeAt(n+1)));else if("ÿ"===e[0]&&"þ"===e[1])for(var i=2;i<t;i+=2)r.push(String.fromCharCode(e.charCodeAt(i+1)<<8|e.charCodeAt(i)));else for(var o=0;o<t;++o){var a=we[e.charCodeAt(o)];r.push(a?String.fromCharCode(a):e.charAt(o))}return r.join("")}function F(e){return decodeURIComponent(escape(e))}function I(e){return unescape(encodeURIComponent(e))}function M(e){for(var t in e)return!1;return!0}function j(e){return"boolean"==typeof e}function D(e){return"number"==typeof e}function N(e){return"string"==typeof e}function U(e){return"object"===o(e)&&null!==e&&void 0!==e.byteLength}function q(e,t){return e.length===t.length&&e.every(function(e,r){return e===t[r]})}function W(){var e=Object.create(null),t=!1;return Object.defineProperty(e,"settled",{get:function(){return t}}),e.promise=new Promise(function(r,n){e.resolve=function(e){t=!0,r(e)},e.reject=function(e){t=!0,n(e)}}),e}Object.defineProperty(t,"__esModule",{value:!0}),t.arrayByteLength=C,t.arraysToBytes=P,t.assert=b,t.bytesToString=x,t.createPromiseCapability=W,t.getVerbosityLevel=v,t.info=y,t.isArrayBuffer=U,t.isArrayEqual=q,t.isBool=j,t.isEmptyObj=M,t.isNum=D,t.isString=N,t.isSameOrigin=_,t.createValidAbsoluteUrl=w,t.removeNullCharacters=k,t.setVerbosityLevel=p,t.shadow=S,t.string32=T,t.stringToBytes=R,t.stringToPDFString=L,t.stringToUTF8String=F,t.utf8StringToString=I,t.warn=g,t.unreachable=m,t.IsEvalSupportedCached=t.IsLittleEndianCached=t.createObjectURL=t.FormatError=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.StreamType=t.PermissionFlag=t.PasswordResponses=t.PasswordException=t.MissingPDFException=t.InvalidPDFException=t.AbortException=t.CMapCompressionType=t.ImageKind=t.FontType=t.AnnotationType=t.AnnotationStateModelType=t.AnnotationReviewState=t.AnnotationReplyType=t.AnnotationMarkedState=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.UNSUPPORTED_FEATURES=t.VerbosityLevel=t.OPS=t.IDENTITY_MATRIX=t.FONT_IDENTITY_MATRIX=t.BaseException=void 0,r(6);var B=[1,0,0,1,0,0];t.IDENTITY_MATRIX=B;var G=[.001,0,0,.001,0,0];t.FONT_IDENTITY_MATRIX=G;var z={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048};t.PermissionFlag=z;var H={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};t.TextRenderingMode=H;var Y={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};t.ImageKind=Y;var X={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};t.AnnotationType=X;var V={MARKED:"Marked",REVIEW:"Review"};t.AnnotationStateModelType=V;var Q={MARKED:"Marked",UNMARKED:"Unmarked"};t.AnnotationMarkedState=Q;var K={ACCEPTED:"Accepted",REJECTED:"Rejected",CANCELLED:"Cancelled",COMPLETED:"Completed",NONE:"None"};t.AnnotationReviewState=K;var J={GROUP:"Group",REPLY:"R"};t.AnnotationReplyType=J;var Z={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};t.AnnotationFlag=Z;var $={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864};t.AnnotationFieldFlag=$;var ee={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};t.AnnotationBorderStyleType=ee;var te={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"};t.StreamType=te;var re={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"};t.FontType=re;var ne={ERRORS:0,WARNINGS:1,INFOS:5};t.VerbosityLevel=ne;var ie={NONE:0,BINARY:1,STREAM:2};t.CMapCompressionType=ie;var oe={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};t.OPS=oe;var ae={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font",errorTilingPattern:"errorTilingPattern",errorExtGState:"errorExtGState",errorXObject:"errorXObject",errorFontLoadType3:"errorFontLoadType3",errorFontState:"errorFontState",errorFontMissing:"errorFontMissing",errorFontTranslate:"errorFontTranslate",errorColorSpace:"errorColorSpace",errorOperatorList:"errorOperatorList",errorFontToUnicode:"errorFontToUnicode",errorFontLoadNative:"errorFontLoadNative",errorFontGetPath:"errorFontGetPath"};t.UNSUPPORTED_FEATURES=ae;var se={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};t.PasswordResponses=se;var ue=ne.WARNINGS,ce=function(){function e(t){this.constructor===e&&m("Cannot initialize BaseException."),this.message=t,this.name=this.constructor.name}return e.prototype=new Error,e.constructor=e,e}();t.BaseException=ce;var le=function(e){function t(e,n){var i;return a(this,t),i=r.call(this,e),i.code=n,i}s(t,e);var r=c(t);return t}(ce);t.PasswordException=le;var fe=function(e){function t(e,n){var i;return a(this,t),i=r.call(this,e),i.details=n,i}s(t,e);var r=c(t);return t}(ce);t.UnknownErrorException=fe;var he=function(e){function t(){return a(this,t),r.apply(this,arguments)}s(t,e);var r=c(t);return t}(ce);t.InvalidPDFException=he;var de=function(e){function t(){return a(this,t),r.apply(this,arguments)}s(t,e);var r=c(t);return t}(ce);t.MissingPDFException=de;var pe=function(e){function t(e,n){var i;return a(this,t),i=r.call(this,e),i.status=n,i}s(t,e);var r=c(t);return t}(ce);t.UnexpectedResponseException=pe;var ve=function(e){function t(){return a(this,t),r.apply(this,arguments)}s(t,e);var r=c(t);return t}(ce);t.FormatError=ve;var ye=function(e){function t(){return a(this,t),r.apply(this,arguments)}s(t,e);var r=c(t);return t}(ce);t.AbortException=ye;var ge=/\x00/g,me={get value(){return S(this,"value",E())}};t.IsLittleEndianCached=me;var be={get value(){return S(this,"value",O())}};t.IsEvalSupportedCached=be;var _e=["rgb(",0,",",0,",",0,")"],Ae=function(){function e(){a(this,e)}return i(e,null,[{key:"makeCssRgb",value:function(e,t,r){return _e[1]=e,_e[3]=t,_e[5]=r,_e.join("")}},{key:"transform",value:function(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}},{key:"applyTransform",value:function(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}},{key:"applyInverseTransform",value:function(e,t){var r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]}},{key:"getAxialAlignedBoundingBox",value:function(t,r){var n=e.applyTransform(t,r),i=e.applyTransform(t.slice(2,4),r),o=e.applyTransform([t[0],t[3]],r),a=e.applyTransform([t[2],t[1]],r);return[Math.min(n[0],i[0],o[0],a[0]),Math.min(n[1],i[1],o[1],a[1]),Math.max(n[0],i[0],o[0],a[0]),Math.max(n[1],i[1],o[1],a[1])]}},{key:"inverseTransform",value:function(e){var t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}},{key:"apply3dTransform",value:function(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]]}},{key:"singularValueDecompose2dScale",value:function(e){var t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],n=e[0]*t[1]+e[1]*t[3],i=e[2]*t[0]+e[3]*t[2],o=e[2]*t[1]+e[3]*t[3],a=(r+o)/2,s=Math.sqrt((r+o)*(r+o)-4*(r*o-i*n))/2,u=a+s||1,c=a-s||1;return[Math.sqrt(u),Math.sqrt(c)]}},{key:"normalizeRect",value:function(e){var t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}},{key:"intersect",value:function(t,r){function n(e,t){return e-t}var i=[t[0],t[2],r[0],r[2]].sort(n),o=[t[1],t[3],r[1],r[3]].sort(n),a=[];return t=e.normalizeRect(t),r=e.normalizeRect(r),i[0]===t[0]&&i[1]===r[0]||i[0]===r[0]&&i[1]===t[0]?(a[0]=i[1],a[2]=i[2],o[0]===t[1]&&o[1]===r[1]||o[0]===r[1]&&o[1]===t[1]?(a[1]=o[1],a[3]=o[2],a):null):null}}]),e}();t.Util=Ae;var we=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,