UNPKG

react-typescript-pdf-reader-built

Version:
1 lines 781 kB
webpackJsonp([0],{"./node_modules/pdfjs-dist/build/pdf.worker.js":function(e,r,t){(function(t,a){(function t(a,i){if(true)e.exports=i();else if(typeof define==="function"&&define.amd)define("pdfjs-dist/build/pdf.worker",[],i);else if(typeof r==="object")r["pdfjs-dist/build/pdf.worker"]=i();else a["pdfjs-dist/build/pdf.worker"]=a.pdfjsDistBuildPdfWorker=i()})(this,function(){return function(e){var r={};function t(a){if(r[a]){return r[a].exports}var i=r[a]={i:a,l:false,exports:{}};e[a].call(i.exports,i,i.exports,t);i.l=true;return i.exports}t.m=e;t.c=r;t.d=function(e,r,a){if(!t.o(e,r)){Object.defineProperty(e,r,{configurable:false,enumerable:true,get:a})}};t.n=function(e){var r=e&&e.__esModule?function r(){return e["default"]}:function r(){return e};t.d(r,"a",r);return r};t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)};t.p="";return t(t.s=71)}([function(e,r,a){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.unreachable=r.warn=r.utf8StringToString=r.stringToUTF8String=r.stringToPDFString=r.stringToBytes=r.string32=r.shadow=r.setVerbosityLevel=r.ReadableStream=r.removeNullCharacters=r.readUint32=r.readUint16=r.readInt8=r.log2=r.loadJpegStream=r.isEvalSupported=r.isLittleEndian=r.createValidAbsoluteUrl=r.isSameOrigin=r.isNodeJS=r.isSpace=r.isString=r.isNum=r.isEmptyObj=r.isBool=r.isArrayBuffer=r.info=r.getVerbosityLevel=r.getLookupTableFactory=r.deprecated=r.createObjectURL=r.createPromiseCapability=r.createBlob=r.bytesToString=r.assert=r.arraysToBytes=r.arrayByteLength=r.FormatError=r.XRefParseException=r.Util=r.UnknownErrorException=r.UnexpectedResponseException=r.TextRenderingMode=r.StreamType=r.StatTimer=r.PasswordResponses=r.PasswordException=r.PageViewport=r.NotImplementedException=r.NativeImageDecoding=r.MissingPDFException=r.MissingDataException=r.MessageHandler=r.InvalidPDFException=r.AbortException=r.CMapCompressionType=r.ImageKind=r.FontType=r.AnnotationType=r.AnnotationFlag=r.AnnotationFieldFlag=r.AnnotationBorderStyleType=r.UNSUPPORTED_FEATURES=r.VERBOSITY_LEVELS=r.OPS=r.IDENTITY_MATRIX=r.FONT_IDENTITY_MATRIX=undefined;var i=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};a(73);var n=a(121);var o=[.001,0,0,.001,0,0];var s={NONE:"none",DECODE:"decode",DISPLAY:"display"};var l={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};var c={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};var u={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};var f={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};var h={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};var d={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};var g={UNKNOWN:0,FLATE:1,LZW:2,DCT:3,JPX:4,JBIG:5,A85:6,AHX:7,CCF:8,RL:9};var v={UNKNOWN:0,TYPE1:1,TYPE1C:2,CIDFONTTYPE0:3,CIDFONTTYPE0C:4,TRUETYPE:5,CIDFONTTYPE2:6,TYPE3:7,OPENTYPE:8,TYPE0:9,MMTYPE1:10};var m={errors:0,warnings:1,infos:5};var p={NONE:0,BINARY:1,STREAM:2};var b={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};var y=m.warnings;function w(e){y=e}function k(){return y}function S(e){if(y>=m.infos){console.log("Info: "+e)}}function C(e){if(y>=m.warnings){console.log("Warning: "+e)}}function x(e){console.log("Deprecated API usage: "+e)}function A(e){throw new Error(e)}function _(e,r){if(!e){A(r)}}var P={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"};function I(e,r){try{var t=new URL(e);if(!t.origin||t.origin==="null"){return false}}catch(e){return false}var a=new URL(r,t);return t.origin===a.origin}function O(e){if(!e){return false}switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return true;default:return false}}function T(e,r){if(!e){return null}try{var t=r?new URL(e,r):new URL(e);if(O(t)){return t}}catch(e){}return null}function E(e,r,t){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:false});return t}function F(e){var r;return function(){if(e){r=Object.create(null);e(r);e=null}return r}}var R={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var B=function e(){function r(e,r){this.name="PasswordException";this.message=e;this.code=r}r.prototype=new Error;r.constructor=r;return r}();var M=function e(){function r(e,r){this.name="UnknownErrorException";this.message=e;this.details=r}r.prototype=new Error;r.constructor=r;return r}();var D=function e(){function r(e){this.name="InvalidPDFException";this.message=e}r.prototype=new Error;r.constructor=r;return r}();var N=function e(){function r(e){this.name="MissingPDFException";this.message=e}r.prototype=new Error;r.constructor=r;return r}();var L=function e(){function r(e,r){this.name="UnexpectedResponseException";this.message=e;this.status=r}r.prototype=new Error;r.constructor=r;return r}();var j=function e(){function r(e){this.message=e}r.prototype=new Error;r.prototype.name="NotImplementedException";r.constructor=r;return r}();var U=function e(){function r(e,r){this.begin=e;this.end=r;this.message="Missing data ["+e+", "+r+")"}r.prototype=new Error;r.prototype.name="MissingDataException";r.constructor=r;return r}();var q=function e(){function r(e){this.message=e}r.prototype=new Error;r.prototype.name="XRefParseException";r.constructor=r;return r}();var z=function e(){function r(e){this.message=e}r.prototype=new Error;r.prototype.name="FormatError";r.constructor=r;return r}();var H=function e(){function r(e){this.name="AbortException";this.message=e}r.prototype=new Error;r.constructor=r;return r}();var G=/\x00/g;function W(e){if(typeof e!=="string"){C("The argument for removeNullCharacters must be a string.");return e}return e.replace(G,"")}function X(e){_(e!==null&&(typeof e==="undefined"?"undefined":i(e))==="object"&&e.length!==undefined,"Invalid argument for bytesToString");var r=e.length;var t=8192;if(r<t){return String.fromCharCode.apply(null,e)}var a=[];for(var n=0;n<r;n+=t){var o=Math.min(n+t,r);var s=e.subarray(n,o);a.push(String.fromCharCode.apply(null,s))}return a.join("")}function V(e){_(typeof e==="string","Invalid argument for stringToBytes");var r=e.length;var t=new Uint8Array(r);for(var a=0;a<r;++a){t[a]=e.charCodeAt(a)&255}return t}function Y(e){if(e.length!==undefined){return e.length}_(e.byteLength!==undefined);return e.byteLength}function K(e){if(e.length===1&&e[0]instanceof Uint8Array){return e[0]}var r=0;var t,a=e.length;var i,n;for(t=0;t<a;t++){i=e[t];n=Y(i);r+=n}var o=0;var s=new Uint8Array(r);for(t=0;t<a;t++){i=e[t];if(!(i instanceof Uint8Array)){if(typeof i==="string"){i=V(i)}else{i=new Uint8Array(i)}}n=i.byteLength;s.set(i,o);o+=n}return s}function J(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,e&255)}function Z(e){var r=1,t=0;while(e>r){r<<=1;t++}return t}function Q(e,r){return e[r]<<24>>24}function $(e,r){return e[r]<<8|e[r+1]}function ee(e,r){return(e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3])>>>0}function re(){var e=new Uint8Array(4);e[0]=1;var r=new Uint32Array(e.buffer,0,1);return r[0]===1}function te(){try{new Function("");return true}catch(e){return false}}var ae=[1,0,0,1,0,0];var ie=function e(){function r(){}var t=["rgb(",0,",",0,",",0,")"];r.makeCssRgb=function e(r,a,i){t[1]=r;t[3]=a;t[5]=i;return t.join("")};r.transform=function e(r,t){return[r[0]*t[0]+r[2]*t[1],r[1]*t[0]+r[3]*t[1],r[0]*t[2]+r[2]*t[3],r[1]*t[2]+r[3]*t[3],r[0]*t[4]+r[2]*t[5]+r[4],r[1]*t[4]+r[3]*t[5]+r[5]]};r.applyTransform=function e(r,t){var a=r[0]*t[0]+r[1]*t[2]+t[4];var i=r[0]*t[1]+r[1]*t[3]+t[5];return[a,i]};r.applyInverseTransform=function e(r,t){var a=t[0]*t[3]-t[1]*t[2];var i=(r[0]*t[3]-r[1]*t[2]+t[2]*t[5]-t[4]*t[3])/a;var n=(-r[0]*t[1]+r[1]*t[0]+t[4]*t[1]-t[5]*t[0])/a;return[i,n]};r.getAxialAlignedBoundingBox=function e(t,a){var i=r.applyTransform(t,a);var n=r.applyTransform(t.slice(2,4),a);var o=r.applyTransform([t[0],t[3]],a);var s=r.applyTransform([t[2],t[1]],a);return[Math.min(i[0],n[0],o[0],s[0]),Math.min(i[1],n[1],o[1],s[1]),Math.max(i[0],n[0],o[0],s[0]),Math.max(i[1],n[1],o[1],s[1])]};r.inverseTransform=function e(r){var t=r[0]*r[3]-r[1]*r[2];return[r[3]/t,-r[1]/t,-r[2]/t,r[0]/t,(r[2]*r[5]-r[4]*r[3])/t,(r[4]*r[1]-r[5]*r[0])/t]};r.apply3dTransform=function e(r,t){return[r[0]*t[0]+r[1]*t[1]+r[2]*t[2],r[3]*t[0]+r[4]*t[1]+r[5]*t[2],r[6]*t[0]+r[7]*t[1]+r[8]*t[2]]};r.singularValueDecompose2dScale=function e(r){var t=[r[0],r[2],r[1],r[3]];var a=r[0]*t[0]+r[1]*t[2];var i=r[0]*t[1]+r[1]*t[3];var n=r[2]*t[0]+r[3]*t[2];var o=r[2]*t[1]+r[3]*t[3];var s=(a+o)/2;var l=Math.sqrt((a+o)*(a+o)-4*(a*o-n*i))/2;var c=s+l||1;var u=s-l||1;return[Math.sqrt(c),Math.sqrt(u)]};r.normalizeRect=function e(r){var t=r.slice(0);if(r[0]>r[2]){t[0]=r[2];t[2]=r[0]}if(r[1]>r[3]){t[1]=r[3];t[3]=r[1]}return t};r.intersect=function e(t,a){function i(e,r){return e-r}var n=[t[0],t[2],a[0],a[2]].sort(i),o=[t[1],t[3],a[1],a[3]].sort(i),s=[];t=r.normalizeRect(t);a=r.normalizeRect(a);if(n[0]===t[0]&&n[1]===a[0]||n[0]===a[0]&&n[1]===t[0]){s[0]=n[1];s[2]=n[2]}else{return false}if(o[0]===t[1]&&o[1]===a[1]||o[0]===a[1]&&o[1]===t[1]){s[1]=o[1];s[3]=o[2]}else{return false}return s};var a=["","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"];r.toRoman=function e(r,t){_(Number.isInteger(r)&&r>0,"The number should be a positive integer.");var i,n=[];while(r>=1e3){r-=1e3;n.push("M")}i=r/100|0;r%=100;n.push(a[i]);i=r/10|0;r%=10;n.push(a[10+i]);n.push(a[20+r]);var o=n.join("");return t?o.toLowerCase():o};r.appendToArray=function e(r,t){Array.prototype.push.apply(r,t)};r.prependToArray=function e(r,t){Array.prototype.unshift.apply(r,t)};r.extendObj=function e(r,t){for(var a in t){r[a]=t[a]}};r.getInheritableProperty=function e(r,t,a){while(r&&!r.has(t)){r=r.get("Parent")}if(!r){return null}return a?r.getArray(t):r.get(t)};r.inherit=function e(r,t,a){r.prototype=Object.create(t.prototype);r.prototype.constructor=r;for(var i in a){r.prototype[i]=a[i]}};r.loadScript=function e(r,t){var a=document.createElement("script");var i=false;a.setAttribute("src",r);if(t){a.onload=function(){if(!i){t()}i=true}}document.getElementsByTagName("head")[0].appendChild(a)};return r}();var ne=function e(){function r(e,r,t,a,i,n){this.viewBox=e;this.scale=r;this.rotation=t;this.offsetX=a;this.offsetY=i;var o=(e[2]+e[0])/2;var s=(e[3]+e[1])/2;var l,c,u,f;t=t%360;t=t<0?t+360:t;switch(t){case 180:l=-1;c=0;u=0;f=1;break;case 90:l=0;c=1;u=1;f=0;break;case 270:l=0;c=-1;u=-1;f=0;break;default:l=1;c=0;u=0;f=-1;break}if(n){u=-u;f=-f}var h,d;var g,v;if(l===0){h=Math.abs(s-e[1])*r+a;d=Math.abs(o-e[0])*r+i;g=Math.abs(e[3]-e[1])*r;v=Math.abs(e[2]-e[0])*r}else{h=Math.abs(o-e[0])*r+a;d=Math.abs(s-e[1])*r+i;g=Math.abs(e[2]-e[0])*r;v=Math.abs(e[3]-e[1])*r}this.transform=[l*r,c*r,u*r,f*r,h-l*r*o-u*r*s,d-c*r*o-f*r*s];this.width=g;this.height=v;this.fontScale=r}r.prototype={clone:function e(t){t=t||{};var a="scale"in t?t.scale:this.scale;var i="rotation"in t?t.rotation:this.rotation;return new r(this.viewBox.slice(),a,i,this.offsetX,this.offsetY,t.dontFlip)},convertToViewportPoint:function e(r,t){return ie.applyTransform([r,t],this.transform)},convertToViewportRectangle:function e(r){var t=ie.applyTransform([r[0],r[1]],this.transform);var a=ie.applyTransform([r[2],r[3]],this.transform);return[t[0],t[1],a[0],a[1]]},convertToPdfPoint:function e(r,t){return ie.applyInverseTransform([r,t],this.transform)}};return r}();var oe=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function se(e){var r,t=e.length,a=[];if(e[0]==="\xfe"&&e[1]==="\xff"){for(r=2;r<t;r+=2){a.push(String.fromCharCode(e.charCodeAt(r)<<8|e.charCodeAt(r+1)))}}else{for(r=0;r<t;++r){var i=oe[e.charCodeAt(r)];a.push(i?String.fromCharCode(i):e.charAt(r))}}return a.join("")}function le(e){return decodeURIComponent(escape(e))}function ce(e){return unescape(encodeURIComponent(e))}function ue(e){for(var r in e){return false}return true}function fe(e){return typeof e==="boolean"}function he(e){return typeof e==="number"}function de(e){return typeof e==="string"}function ge(e){return(typeof e==="undefined"?"undefined":i(e))==="object"&&e!==null&&e.byteLength!==undefined}function ve(e){return e===32||e===9||e===13||e===10}function me(){return(typeof t==="undefined"?"undefined":i(t))==="object"&&t+""==="[object process]"}function pe(){var e={};e.promise=new Promise(function(r,t){e.resolve=r;e.reject=t});return e}var be=function e(){function r(e,r,t){while(e.length<t){e+=r}return e}function t(){this.started=Object.create(null);this.times=[];this.enabled=true}t.prototype={time:function e(r){if(!this.enabled){return}if(r in this.started){C("Timer is already running for "+r)}this.started[r]=Date.now()},timeEnd:function e(r){if(!this.enabled){return}if(!(r in this.started)){C("Timer has not been started for "+r)}this.times.push({name:r,start:this.started[r],end:Date.now()});delete this.started[r]},toString:function e(){var t,a;var i=this.times;var n="";var o=0;for(t=0,a=i.length;t<a;++t){var s=i[t]["name"];if(s.length>o){o=s.length}}for(t=0,a=i.length;t<a;++t){var l=i[t];var c=l.end-l.start;n+=r(l["name"]," ",o)+" "+c+"ms\n"}return n}};return t}();var ye=function e(r,t){if(typeof Blob!=="undefined"){return new Blob([r],{type:t})}throw new Error('The "Blob" constructor is not supported.')};var we=function e(){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function e(t,a){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:false;if(!i&&URL.createObjectURL){var n=ye(t,a);return URL.createObjectURL(n)}var o="data:"+a+";base64,";for(var s=0,l=t.length;s<l;s+=3){var c=t[s]&255;var u=t[s+1]&255;var f=t[s+2]&255;var h=c>>2,d=(c&3)<<4|u>>4;var g=s+1<l?(u&15)<<2|f>>6:64;var v=s+2<l?f&63:64;o+=r[h]+r[d]+r[g]+r[v]}return o}}();function ke(e,r){var t=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;if(!e){return Promise.resolve(undefined)}return new Promise(function(a,i){a(e.apply(t,r))})}function Se(e){if((typeof e==="undefined"?"undefined":i(e))!=="object"){return e}switch(e.name){case"AbortException":return new H(e.message);case"MissingPDFException":return new N(e.message);case"UnexpectedResponseException":return new L(e.message,e.status);default:return new M(e.message,e.details)}}function Ce(e){if(!(e instanceof Error)||e instanceof H||e instanceof N||e instanceof L||e instanceof M){return e}return new M(e.message,e.toString())}function xe(e,r,t){if(r){e.resolve()}else{e.reject(t)}}function Ae(e){return Promise.resolve(e).catch(function(){})}function _e(e,r,t){var a=this;this.sourceName=e;this.targetName=r;this.comObj=t;this.callbackId=1;this.streamId=1;this.postMessageTransfers=true;this.streamSinks=Object.create(null);this.streamControllers=Object.create(null);var i=this.callbacksCapabilities=Object.create(null);var n=this.actionHandler=Object.create(null);this._onComObjOnMessage=function(e){var r=e.data;if(r.targetName!==a.sourceName){return}if(r.stream){a._processStreamMessage(r)}else if(r.isReply){var o=r.callbackId;if(r.callbackId in i){var s=i[o];delete i[o];if("error"in r){s.reject(Se(r.error))}else{s.resolve(r.data)}}else{throw new Error("Cannot resolve callback "+o)}}else if(r.action in n){var l=n[r.action];if(r.callbackId){var c=a.sourceName;var u=r.sourceName;Promise.resolve().then(function(){return l[0].call(l[1],r.data)}).then(function(e){t.postMessage({sourceName:c,targetName:u,isReply:true,callbackId:r.callbackId,data:e})},function(e){t.postMessage({sourceName:c,targetName:u,isReply:true,callbackId:r.callbackId,error:Ce(e)})})}else if(r.streamId){a._createStreamSink(r)}else{l[0].call(l[1],r.data)}}else{throw new Error("Unknown action from worker: "+r.action)}};t.addEventListener("message",this._onComObjOnMessage)}_e.prototype={on:function e(r,t,a){var i=this.actionHandler;if(i[r]){throw new Error('There is already an actionName called "'+r+'"')}i[r]=[t,a]},send:function e(r,t,a){var i={sourceName:this.sourceName,targetName:this.targetName,action:r,data:t};this.postMessage(i,a)},sendWithPromise:function e(r,t,a){var i=this.callbackId++;var n={sourceName:this.sourceName,targetName:this.targetName,action:r,data:t,callbackId:i};var o=pe();this.callbacksCapabilities[i]=o;try{this.postMessage(n,a)}catch(e){o.reject(e)}return o.promise},sendWithStream:function e(r,t,a,i){var o=this;var s=this.streamId++;var l=this.sourceName;var c=this.targetName;return new n.ReadableStream({start:function e(a){var i=pe();o.streamControllers[s]={controller:a,startCall:i,isClosed:false};o.postMessage({sourceName:l,targetName:c,action:r,streamId:s,data:t,desiredSize:a.desiredSize});return i.promise},pull:function e(r){var t=pe();o.streamControllers[s].pullCall=t;o.postMessage({sourceName:l,targetName:c,stream:"pull",streamId:s,desiredSize:r.desiredSize});return t.promise},cancel:function e(r){var t=pe();o.streamControllers[s].cancelCall=t;o.streamControllers[s].isClosed=true;o.postMessage({sourceName:l,targetName:c,stream:"cancel",reason:r,streamId:s});return t.promise}},a)},_createStreamSink:function e(r){var t=this;var a=this;var i=this.actionHandler[r.action];var n=r.streamId;var o=r.desiredSize;var s=this.sourceName;var l=r.sourceName;var c=pe();var u=function e(r){var a=r.stream,i=r.chunk,o=r.transfers,c=r.success,u=r.reason;t.postMessage({sourceName:s,targetName:l,stream:a,streamId:n,chunk:i,success:c,reason:u},o)};var f={enqueue:function e(r){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;var a=arguments[2];if(this.isCancelled){return}var i=this.desiredSize;this.desiredSize-=t;if(i>0&&this.desiredSize<=0){this.sinkCapability=pe();this.ready=this.sinkCapability.promise}u({stream:"enqueue",chunk:r,transfers:a})},close:function e(){if(this.isCancelled){return}this.isCancelled=true;u({stream:"close"});delete a.streamSinks[n]},error:function e(r){if(this.isCancelled){return}this.isCancelled=true;u({stream:"error",reason:r})},sinkCapability:c,onPull:null,onCancel:null,isCancelled:false,desiredSize:o,ready:null};f.sinkCapability.resolve();f.ready=f.sinkCapability.promise;this.streamSinks[n]=f;ke(i[0],[r.data,f],i[1]).then(function(){u({stream:"start_complete",success:true})},function(e){u({stream:"start_complete",success:false,reason:e})})},_processStreamMessage:function e(r){var t=this;var a=this.sourceName;var i=r.sourceName;var n=r.streamId;var o=function e(r){var o=r.stream,s=r.success,l=r.reason;t.comObj.postMessage({sourceName:a,targetName:i,stream:o,success:s,streamId:n,reason:l})};var s=function e(){Promise.all([t.streamControllers[r.streamId].startCall,t.streamControllers[r.streamId].pullCall,t.streamControllers[r.streamId].cancelCall].map(function(e){return e&&Ae(e.promise)})).then(function(){delete t.streamControllers[r.streamId]})};switch(r.stream){case"start_complete":xe(this.streamControllers[r.streamId].startCall,r.success,Se(r.reason));break;case"pull_complete":xe(this.streamControllers[r.streamId].pullCall,r.success,Se(r.reason));break;case"pull":if(!this.streamSinks[r.streamId]){o({stream:"pull_complete",success:true});break}if(this.streamSinks[r.streamId].desiredSize<=0&&r.desiredSize>0){this.streamSinks[r.streamId].sinkCapability.resolve()}this.streamSinks[r.streamId].desiredSize=r.desiredSize;ke(this.streamSinks[r.streamId].onPull).then(function(){o({stream:"pull_complete",success:true})},function(e){o({stream:"pull_complete",success:false,reason:e})});break;case"enqueue":_(this.streamControllers[r.streamId],"enqueue should have stream controller");if(!this.streamControllers[r.streamId].isClosed){this.streamControllers[r.streamId].controller.enqueue(r.chunk)}break;case"close":_(this.streamControllers[r.streamId],"close should have stream controller");if(this.streamControllers[r.streamId].isClosed){break}this.streamControllers[r.streamId].isClosed=true;this.streamControllers[r.streamId].controller.close();s();break;case"error":_(this.streamControllers[r.streamId],"error should have stream controller");this.streamControllers[r.streamId].controller.error(Se(r.reason));s();break;case"cancel_complete":xe(this.streamControllers[r.streamId].cancelCall,r.success,Se(r.reason));s();break;case"cancel":if(!this.streamSinks[r.streamId]){break}ke(this.streamSinks[r.streamId].onCancel,[Se(r.reason)]).then(function(){o({stream:"cancel_complete",success:true})},function(e){o({stream:"cancel_complete",success:false,reason:e})});this.streamSinks[r.streamId].sinkCapability.reject(Se(r.reason));this.streamSinks[r.streamId].isCancelled=true;delete this.streamSinks[r.streamId];break;default:throw new Error("Unexpected stream case")}},postMessage:function e(r,t){if(t&&this.postMessageTransfers){this.comObj.postMessage(r,t)}else{this.comObj.postMessage(r)}},destroy:function e(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}};function Pe(e,r,t){var a=new Image;a.onload=function r(){t.resolve(e,a)};a.onerror=function r(){t.resolve(e,null);C("Error during JPEG image loading")};a.src=r}r.FONT_IDENTITY_MATRIX=o;r.IDENTITY_MATRIX=ae;r.OPS=b;r.VERBOSITY_LEVELS=m;r.UNSUPPORTED_FEATURES=P;r.AnnotationBorderStyleType=d;r.AnnotationFieldFlag=h;r.AnnotationFlag=f;r.AnnotationType=u;r.FontType=v;r.ImageKind=c;r.CMapCompressionType=p;r.AbortException=H;r.InvalidPDFException=D;r.MessageHandler=_e;r.MissingDataException=U;r.MissingPDFException=N;r.NativeImageDecoding=s;r.NotImplementedException=j;r.PageViewport=ne;r.PasswordException=B;r.PasswordResponses=R;r.StatTimer=be;r.StreamType=g;r.TextRenderingMode=l;r.UnexpectedResponseException=L;r.UnknownErrorException=M;r.Util=ie;r.XRefParseException=q;r.FormatError=z;r.arrayByteLength=Y;r.arraysToBytes=K;r.assert=_;r.bytesToString=X;r.createBlob=ye;r.createPromiseCapability=pe;r.createObjectURL=we;r.deprecated=x;r.getLookupTableFactory=F;r.getVerbosityLevel=k;r.info=S;r.isArrayBuffer=ge;r.isBool=fe;r.isEmptyObj=ue;r.isNum=he;r.isString=de;r.isSpace=ve;r.isNodeJS=me;r.isSameOrigin=I;r.createValidAbsoluteUrl=T;r.isLittleEndian=re;r.isEvalSupported=te;r.loadJpegStream=Pe;r.log2=Z;r.readInt8=Q;r.readUint16=$;r.readUint32=ee;r.removeNullCharacters=W;r.ReadableStream=n.ReadableStream;r.setVerbosityLevel=w;r.shadow=E;r.string32=J;r.stringToBytes=V;r.stringToPDFString=se;r.stringToUTF8String=le;r.utf8StringToString=ce;r.warn=C;r.unreachable=A},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});var a=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var i={};var n=function e(){function r(e){this.name=e}r.prototype={};var t=Object.create(null);r.get=function e(a){var i=t[a];return i?i:t[a]=new r(a)};return r}();var o=function e(){function r(e){this.cmd=e}r.prototype={};var t=Object.create(null);r.get=function e(a){var i=t[a];return i?i:t[a]=new r(a)};return r}();var s=function e(){var r=function e(){return r};function t(e){this._map=Object.create(null);this.xref=e;this.objId=null;this.suppressEncryption=false;this.__nonSerializable__=r}t.prototype={assignXref:function e(r){this.xref=r},get:function e(r,t,a){var i;var n=this.xref,o=this.suppressEncryption;if(typeof(i=this._map[r])!=="undefined"||r in this._map||typeof t==="undefined"){return n?n.fetchIfRef(i,o):i}if(typeof(i=this._map[t])!=="undefined"||t in this._map||typeof a==="undefined"){return n?n.fetchIfRef(i,o):i}i=this._map[a]||null;return n?n.fetchIfRef(i,o):i},getAsync:function e(r,t,a){var i;var n=this.xref,o=this.suppressEncryption;if(typeof(i=this._map[r])!=="undefined"||r in this._map||typeof t==="undefined"){if(n){return n.fetchIfRefAsync(i,o)}return Promise.resolve(i)}if(typeof(i=this._map[t])!=="undefined"||t in this._map||typeof a==="undefined"){if(n){return n.fetchIfRefAsync(i,o)}return Promise.resolve(i)}i=this._map[a]||null;if(n){return n.fetchIfRefAsync(i,o)}return Promise.resolve(i)},getArray:function e(r,t,a){var i=this.get(r,t,a);var n=this.xref,o=this.suppressEncryption;if(!Array.isArray(i)||!n){return i}i=i.slice();for(var s=0,l=i.length;s<l;s++){if(!v(i[s])){continue}i[s]=n.fetch(i[s],o)}return i},getRaw:function e(r){return this._map[r]},getKeys:function e(){return Object.keys(this._map)},set:function e(r,t){this._map[r]=t},has:function e(r){return r in this._map},forEach:function e(r){for(var t in this._map){r(t,this.get(t))}}};t.empty=new t(null);t.merge=function(e,r){var a=new t(e);for(var i=0,n=r.length;i<n;i++){var o=r[i];if(!g(o)){continue}for(var s in o._map){if(a._map[s]!==undefined){continue}a._map[s]=o._map[s]}}return a};return t}();var l=function e(){function r(e,r){this.num=e;this.gen=r}r.prototype={toString:function e(){var r=this.num+"R";if(this.gen!==0){r+=this.gen}return r}};return r}();var c=function e(){function r(){this.dict=Object.create(null)}r.prototype={has:function e(r){return r.toString()in this.dict},put:function e(r){this.dict[r.toString()]=true},remove:function e(r){delete this.dict[r.toString()]}};return r}();var u=function e(){function r(){this.dict=Object.create(null)}r.prototype={get:function e(r){return this.dict[r.toString()]},has:function e(r){return r.toString()in this.dict},put:function e(r,t){this.dict[r.toString()]=t},putAlias:function e(r,t){this.dict[r.toString()]=this.get(t)},forEach:function e(r,t){for(var a in this.dict){r.call(t,this.dict[a])}},clear:function e(){this.dict=Object.create(null)}};return r}();function f(e){return e===i}function h(e,r){return e instanceof n&&(r===undefined||e.name===r)}function d(e,r){return e instanceof o&&(r===undefined||e.cmd===r)}function g(e,r){return e instanceof s&&(r===undefined||h(e.get("Type"),r))}function v(e){return e instanceof l}function m(e,r){return e.num===r.num&&e.gen===r.gen}function p(e){return(typeof e==="undefined"?"undefined":a(e))==="object"&&e!==null&&e.getBytes!==undefined}r.EOF=i;r.Cmd=o;r.Dict=s;r.Name=n;r.Ref=l;r.RefSet=c;r.RefSetCache=u;r.isEOF=f;r.isCmd=d;r.isDict=g;r.isName=h;r.isRef=v;r.isRefsEqual=m;r.isStream=p},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.LZWStream=r.StringStream=r.StreamsSequenceStream=r.Stream=r.RunLengthStream=r.PredictorStream=r.NullStream=r.FlateStream=r.DecodeStream=r.DecryptStream=r.AsciiHexStream=r.Ascii85Stream=undefined;var a=t(0);var i=t(1);var n=function e(){function r(e,r,t,a){this.bytes=e instanceof Uint8Array?e:new Uint8Array(e);this.start=r||0;this.pos=this.start;this.end=r+t||this.bytes.length;this.dict=a}r.prototype={get length(){return this.end-this.start},get isEmpty(){return this.length===0},getByte:function e(){if(this.pos>=this.end){return-1}return this.bytes[this.pos++]},getUint16:function e(){var r=this.getByte();var t=this.getByte();if(r===-1||t===-1){return-1}return(r<<8)+t},getInt32:function e(){var r=this.getByte();var t=this.getByte();var a=this.getByte();var i=this.getByte();return(r<<24)+(t<<16)+(a<<8)+i},getBytes:function e(r){var t=this.bytes;var a=this.pos;var i=this.end;if(!r){return t.subarray(a,i)}var n=a+r;if(n>i){n=i}this.pos=n;return t.subarray(a,n)},peekByte:function e(){var r=this.getByte();this.pos--;return r},peekBytes:function e(r){var t=this.getBytes(r);this.pos-=t.length;return t},skip:function e(r){if(!r){r=1}this.pos+=r},reset:function e(){this.pos=this.start},moveStart:function e(){this.start=this.pos},makeSubStream:function e(t,a,i){return new r(this.bytes.buffer,t,a,i)}};return r}();var o=function e(){function r(e){var r=(0,a.stringToBytes)(e);n.call(this,r)}r.prototype=n.prototype;return r}();var s=function e(){var r=new Uint8Array(0);function t(e){this.pos=0;this.bufferLength=0;this.eof=false;this.buffer=r;this.minBufferLength=512;if(e){while(this.minBufferLength<e){this.minBufferLength*=2}}}t.prototype={get isEmpty(){while(!this.eof&&this.bufferLength===0){this.readBlock()}return this.bufferLength===0},ensureBuffer:function e(r){var t=this.buffer;if(r<=t.byteLength){return t}var a=this.minBufferLength;while(a<r){a*=2}var i=new Uint8Array(a);i.set(t);return this.buffer=i},getByte:function e(){var r=this.pos;while(this.bufferLength<=r){if(this.eof){return-1}this.readBlock()}return this.buffer[this.pos++]},getUint16:function e(){var r=this.getByte();var t=this.getByte();if(r===-1||t===-1){return-1}return(r<<8)+t},getInt32:function e(){var r=this.getByte();var t=this.getByte();var a=this.getByte();var i=this.getByte();return(r<<24)+(t<<16)+(a<<8)+i},getBytes:function e(r){var t,a=this.pos;if(r){this.ensureBuffer(a+r);t=a+r;while(!this.eof&&this.bufferLength<t){this.readBlock()}var i=this.bufferLength;if(t>i){t=i}}else{while(!this.eof){this.readBlock()}t=this.bufferLength}this.pos=t;return this.buffer.subarray(a,t)},peekByte:function e(){var r=this.getByte();this.pos--;return r},peekBytes:function e(r){var t=this.getBytes(r);this.pos-=t.length;return t},makeSubStream:function e(r,t,a){var i=r+t;while(this.bufferLength<=i&&!this.eof){this.readBlock()}return new n(this.buffer,r,t,a)},skip:function e(r){if(!r){r=1}this.pos+=r},reset:function e(){this.pos=0},getBaseStreams:function e(){if(this.str&&this.str.getBaseStreams){return this.str.getBaseStreams()}return[]}};return t}();var l=function e(){function r(e){this.streams=e;s.call(this,null)}r.prototype=Object.create(s.prototype);r.prototype.readBlock=function e(){var r=this.streams;if(r.length===0){this.eof=true;return}var t=r.shift();var a=t.getBytes();var i=this.bufferLength;var n=i+a.length;var o=this.ensureBuffer(n);o.set(a,i);this.bufferLength=n};r.prototype.getBaseStreams=function e(){var r=[];for(var t=0,i=this.streams.length;t<i;t++){var n=this.streams[t];if(n.getBaseStreams){a.Util.appendToArray(r,n.getBaseStreams())}}return r};return r}();var c=function e(){var r=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);var t=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]);var i=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]);var n=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9];var o=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];function l(e,r){this.str=e;this.dict=e.dict;var t=e.getByte();var i=e.getByte();if(t===-1||i===-1){throw new a.FormatError("Invalid header in flate stream: "+t+", "+i)}if((t&15)!==8){throw new a.FormatError("Unknown compression method in flate stream: "+t+", "+i)}if(((t<<8)+i)%31!==0){throw new a.FormatError("Bad FCHECK in flate stream: "+t+", "+i)}if(i&32){throw new a.FormatError("FDICT bit set in flate stream: "+t+", "+i)}this.codeSize=0;this.codeBuf=0;s.call(this,r)}l.prototype=Object.create(s.prototype);l.prototype.getBits=function e(r){var t=this.str;var i=this.codeSize;var n=this.codeBuf;var o;while(i<r){if((o=t.getByte())===-1){throw new a.FormatError("Bad encoding in flate stream")}n|=o<<i;i+=8}o=n&(1<<r)-1;this.codeBuf=n>>r;this.codeSize=i-=r;return o};l.prototype.getCode=function e(r){var t=this.str;var i=r[0];var n=r[1];var o=this.codeSize;var s=this.codeBuf;var l;while(o<n){if((l=t.getByte())===-1){break}s|=l<<o;o+=8}var c=i[s&(1<<n)-1];var u=c>>16;var f=c&65535;if(u<1||o<u){throw new a.FormatError("Bad encoding in flate stream")}this.codeBuf=s>>u;this.codeSize=o-u;return f};l.prototype.generateHuffmanTable=function e(r){var t=r.length;var a=0;var i;for(i=0;i<t;++i){if(r[i]>a){a=r[i]}}var n=1<<a;var o=new Int32Array(n);for(var s=1,l=0,c=2;s<=a;++s,l<<=1,c<<=1){for(var u=0;u<t;++u){if(r[u]===s){var f=0;var h=l;for(i=0;i<s;++i){f=f<<1|h&1;h>>=1}for(i=f;i<n;i+=c){o[i]=s<<16|u}++l}}}return[o,a]};l.prototype.readBlock=function e(){var s,l;var c=this.str;var u=this.getBits(3);if(u&1){this.eof=true}u>>=1;if(u===0){var f;if((f=c.getByte())===-1){throw new a.FormatError("Bad block header in flate stream")}var h=f;if((f=c.getByte())===-1){throw new a.FormatError("Bad block header in flate stream")}h|=f<<8;if((f=c.getByte())===-1){throw new a.FormatError("Bad block header in flate stream")}var d=f;if((f=c.getByte())===-1){throw new a.FormatError("Bad block header in flate stream")}d|=f<<8;if(d!==(~h&65535)&&(h!==0||d!==0)){throw new a.FormatError("Bad uncompressed block length in flate stream")}this.codeBuf=0;this.codeSize=0;var g=this.bufferLength;s=this.ensureBuffer(g+h);var v=g+h;this.bufferLength=v;if(h===0){if(c.peekByte()===-1){this.eof=true}}else{for(var m=g;m<v;++m){if((f=c.getByte())===-1){this.eof=true;break}s[m]=f}}return}var p;var b;if(u===1){p=n;b=o}else if(u===2){var y=this.getBits(5)+257;var w=this.getBits(5)+1;var k=this.getBits(4)+4;var S=new Uint8Array(r.length);var C;for(C=0;C<k;++C){S[r[C]]=this.getBits(3)}var x=this.generateHuffmanTable(S);l=0;C=0;var A=y+w;var _=new Uint8Array(A);var P,I,O;while(C<A){var T=this.getCode(x);if(T===16){P=2;I=3;O=l}else if(T===17){P=3;I=3;O=l=0}else if(T===18){P=7;I=11;O=l=0}else{_[C++]=l=T;continue}var E=this.getBits(P)+I;while(E-- >0){_[C++]=O}}p=this.generateHuffmanTable(_.subarray(0,y));b=this.generateHuffmanTable(_.subarray(y,A))}else{throw new a.FormatError("Unknown block type in flate stream")}s=this.buffer;var F=s?s.length:0;var R=this.bufferLength;while(true){var B=this.getCode(p);if(B<256){if(R+1>=F){s=this.ensureBuffer(R+1);F=s.length}s[R++]=B;continue}if(B===256){this.bufferLength=R;return}B-=257;B=t[B];var M=B>>16;if(M>0){M=this.getBits(M)}l=(B&65535)+M;B=this.getCode(b);B=i[B];M=B>>16;if(M>0){M=this.getBits(M)}var D=(B&65535)+M;if(R+l>=F){s=this.ensureBuffer(R+l);F=s.length}for(var N=0;N<l;++N,++R){s[R]=s[R-D]}}};return l}();var u=function e(){function r(e,r,t){if(!(0,i.isDict)(t)){return e}var n=this.predictor=t.get("Predictor")||1;if(n<=1){return e}if(n!==2&&(n<10||n>15)){throw new a.FormatError("Unsupported predictor: "+n)}if(n===2){this.readBlock=this.readBlockTiff}else{this.readBlock=this.readBlockPng}this.str=e;this.dict=e.dict;var o=this.colors=t.get("Colors")||1;var l=this.bits=t.get("BitsPerComponent")||8;var c=this.columns=t.get("Columns")||1;this.pixBytes=o*l+7>>3;this.rowBytes=c*o*l+7>>3;s.call(this,r);return this}r.prototype=Object.create(s.prototype);r.prototype.readBlockTiff=function e(){var r=this.rowBytes;var t=this.bufferLength;var a=this.ensureBuffer(t+r);var i=this.bits;var n=this.colors;var o=this.str.getBytes(r);this.eof=!o.length;if(this.eof){return}var s=0,l=0;var c=0,u=0;var f=t;var h;if(i===1&&n===1){for(h=0;h<r;++h){var d=o[h]^s;d^=d>>1;d^=d>>2;d^=d>>4;s=(d&1)<<7;a[f++]=d}}else if(i===8){for(h=0;h<n;++h){a[f++]=o[h]}for(;h<r;++h){a[f]=a[f-n]+o[h];f++}}else if(i===16){var g=n*2;for(h=0;h<g;++h){a[f++]=o[h]}for(;h<r;h+=2){var v=((o[h]&255)<<8)+(o[h+1]&255)+((a[f-g]&255)<<8)+(a[f-g+1]&255);a[f++]=v>>8&255;a[f++]=v&255}}else{var m=new Uint8Array(n+1);var p=(1<<i)-1;var b=0,y=t;var w=this.columns;for(h=0;h<w;++h){for(var k=0;k<n;++k){if(c<i){s=s<<8|o[b++]&255;c+=8}m[k]=m[k]+(s>>c-i)&p;c-=i;l=l<<i|m[k];u+=i;if(u>=8){a[y++]=l>>u-8&255;u-=8}}}if(u>0){a[y++]=(l<<8-u)+(s&(1<<8-u)-1)}}this.bufferLength+=r};r.prototype.readBlockPng=function e(){var r=this.rowBytes;var t=this.pixBytes;var i=this.str.getByte();var n=this.str.getBytes(r);this.eof=!n.length;if(this.eof){return}var o=this.bufferLength;var s=this.ensureBuffer(o+r);var l=s.subarray(o-r,o);if(l.length===0){l=new Uint8Array(r)}var c,u=o,f,h;switch(i){case 0:for(c=0;c<r;++c){s[u++]=n[c]}break;case 1:for(c=0;c<t;++c){s[u++]=n[c]}for(;c<r;++c){s[u]=s[u-t]+n[c]&255;u++}break;case 2:for(c=0;c<r;++c){s[u++]=l[c]+n[c]&255}break;case 3:for(c=0;c<t;++c){s[u++]=(l[c]>>1)+n[c]}for(;c<r;++c){s[u]=(l[c]+s[u-t]>>1)+n[c]&255;u++}break;case 4:for(c=0;c<t;++c){f=l[c];h=n[c];s[u++]=f+h}for(;c<r;++c){f=l[c];var d=l[c-t];var g=s[u-t];var v=g+f-d;var m=v-g;if(m<0){m=-m}var p=v-f;if(p<0){p=-p}var b=v-d;if(b<0){b=-b}h=n[c];if(m<=p&&m<=b){s[u++]=g+h}else if(p<=b){s[u++]=f+h}else{s[u++]=d+h}}break;default:throw new a.FormatError("Unsupported predictor: "+i)}this.bufferLength+=r};return r}();var f=function e(){function r(e,r,t){this.str=e;this.dict=e.dict;this.decrypt=t;this.nextChunk=null;this.initialized=false;s.call(this,r)}var t=512;r.prototype=Object.create(s.prototype);r.prototype.readBlock=function e(){var r;if(this.initialized){r=this.nextChunk}else{r=this.str.getBytes(t);this.initialized=true}if(!r||r.length===0){this.eof=true;return}this.nextChunk=this.str.getBytes(t);var a=this.nextChunk&&this.nextChunk.length>0;var i=this.decrypt;r=i(r,!a);var n=this.bufferLength;var o,s=r.length;var l=this.ensureBuffer(n+s);for(o=0;o<s;o++){l[n++]=r[o]}this.bufferLength=n};return r}();var h=function e(){function r(e,r){this.str=e;this.dict=e.dict;this.input=new Uint8Array(5);if(r){r=.8*r}s.call(this,r)}r.prototype=Object.create(s.prototype);r.prototype.readBlock=function e(){var r=126;var t=122;var i=-1;var n=this.str;var o=n.getByte();while((0,a.isSpace)(o)){o=n.getByte()}if(o===i||o===r){this.eof=true;return}var s=this.bufferLength,l;var c;if(o===t){l=this.ensureBuffer(s+4);for(c=0;c<4;++c){l[s+c]=0}this.bufferLength+=4}else{var u=this.input;u[0]=o;for(c=1;c<5;++c){o=n.getByte();while((0,a.isSpace)(o)){o=n.getByte()}u[c]=o;if(o===i||o===r){break}}l=this.ensureBuffer(s+c-1);this.bufferLength+=c-1;if(c<5){for(;c<5;++c){u[c]=33+84}this.eof=true}var f=0;for(c=0;c<5;++c){f=f*85+(u[c]-33)}for(c=3;c>=0;--c){l[s+c]=f&255;f>>=8}}};return r}();var d=function e(){function r(e,r){this.str=e;this.dict=e.dict;this.firstDigit=-1;if(r){r=.5*r}s.call(this,r)}r.prototype=Object.create(s.prototype);r.prototype.readBlock=function e(){var r=8e3;var t=this.str.getBytes(r);if(!t.length){this.eof=true;return}var a=t.length+1>>1;var i=this.ensureBuffer(this.bufferLength+a);var n=this.bufferLength;var o=this.firstDigit;for(var s=0,l=t.length;s<l;s++){var c=t[s],u;if(c>=48&&c<=57){u=c&15}else if(c>=65&&c<=70||c>=97&&c<=102){u=(c&15)+9}else if(c===62){this.eof=true;break}else{continue}if(o<0){o=u}else{i[n++]=o<<4|u;o=-1}}if(o>=0&&this.eof){i[n++]=o<<4;o=-1}this.firstDigit=o;this.bufferLength=n};return r}();var g=function e(){function r(e,r){this.str=e;this.dict=e.dict;s.call(this,r)}r.prototype=Object.create(s.prototype);r.prototype.readBlock=function e(){var r=this.str.getBytes(2);if(!r||r.length<2||r[0]===128){this.eof=true;return}var t;var a=this.bufferLength;var i=r[0];if(i<128){t=this.ensureBuffer(a+i+1);t[a++]=r[1];if(i>0){var n=this.str.getBytes(i);t.set(n,a);a+=i}}else{i=257-i;var o=r[1];t=this.ensureBuffer(a+i+1);for(var s=0;s<i;s++){t[a++]=o}}this.bufferLength=a};return r}();var v=function e(){function r(e,r,t){this.str=e;this.dict=e.dict;this.cachedData=0;this.bitsCached=0;var a=4096;var i={earlyChange:t,codeLength:9,nextCode:258,dictionaryValues:new Uint8Array(a),dictionaryLengths:new Uint16Array(a),dictionaryPrevCodes:new Uint16Array(a),currentSequence:new Uint8Array(a),currentSequenceLength:0};for(var n=0;n<256;++n){i.dictionaryValues[n]=n;i.dictionaryLengths[n]=1}this.lzwState=i;s.call(this,r)}r.prototype=Object.create(s.prototype);r.prototype.readBits=function e(r){var t=this.bitsCached;var a=this.cachedData;while(t<r){var i=this.str.getByte();if(i===-1){this.eof=true;return null}a=a<<8|i;t+=8}this.bitsCached=t-=r;this.cachedData=a;this.lastCode=null;return a>>>t&(1<<r)-1};r.prototype.readBlock=function e(){var r=512;var t=r*2,a=r;var i,n,o;var s=this.lzwState;if(!s){return}var l=s.earlyChange;var c=s.nextCode;var u=s.dictionaryValues;var f=s.dictionaryLengths;var h=s.dictionaryPrevCodes;var d=s.codeLength;var g=s.prevCode;var v=s.currentSequence;var m=s.currentSequenceLength;var p=0;var b=this.bufferLength;var y=this.ensureBuffer(this.bufferLength+t);for(i=0;i<r;i++){var w=this.readBits(d);var k=m>0;if(w<256){v[0]=w;m=1}else if(w>=258){if(w<c){m=f[w];for(n=m-1,o=w;n>=0;n--){v[n]=u[o];o=h[o]}}else{v[m++]=v[0]}}else if(w===256){d=9;c=258;m=0;continue}else{this.eof=true;delete this.lzwState;break}if(k){h[c]=g;f[c]=f[g]+1;u[c]=v[0];c++;d=c+l&c+l-1?d:Math.min(Math.log(c+l)/.6931471805599453+1,12)|0}g=w;p+=m;if(t<p){do{t+=a}while(t<p);y=this.ensureBuffer(this.bufferLength+t)}for(n=0;n<m;n++){y[b++]=v[n]}}s.nextCode=c;s.codeLength=d;s.prevCode=g;s.currentSequenceLength=m;this.bufferLength=b};return r}();var m=function e(){function r(){n.call(this,new Uint8Array(0))}r.prototype=n.prototype;return r}();r.Ascii85Stream=h;r.AsciiHexStream=d;r.DecryptStream=f;r.DecodeStream=s;r.FlateStream=c;r.NullStream=m;r.PredictorStream=u;r.RunLengthStream=g;r.Stream=n;r.StreamsSequenceStream=l;r.StringStream=o;r.LZWStream=v},function(e,r,t){"use strict";var a=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=function(e){return(typeof e==="undefined"?"undefined":a(e))==="object"?e!==null:typeof e==="function"}},function(e,r,t){"use strict";var a=t(47)("wks");var i=t(22);var n=t(5).Symbol;var o=typeof n=="function";var s=e.exports=function(e){return a[e]||(a[e]=o&&n[e]||(o?n:i)("Symbol."+e))};s.store=a},function(e,r,t){"use strict";var a=e.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();if(typeof __g=="number")__g=a},function(e,r,t){"use strict";var a=t(5);var i=t(7);var n=t(12);var o=t(10);var s=t(11);var l="prototype";var c=function e(r,t,c){var u=r&e.F;var f=r&e.G;var h=r&e.S;var d=r&e.P;var g=r&e.B;var v=f?a:h?a[t]||(a[t]={}):(a[t]||{})[l];var m=f?i:i[t]||(i[t]={});var p=m[l]||(m[l]={});var b,y,w,k;if(f)c=t;for(b in c){y=!u&&v&&v[b]!==undefined;w=(y?v:c)[b];k=g&&y?s(w,a):d&&typeof w=="function"?s(Function.call,w):w;if(v)o(v,b,w,r&e.U);if(m[b]!=w)n(m,b,k);if(d&&p[b]!=w)p[b]=w}};a.core=i;c.F=1;c.G=2;c.S=4;c.P=8;c.B=16;c.W=32;c.U=64;c.R=128;e.exports=c},function(e,r,t){"use strict";var a=e.exports={version:"2.5.1"};if(typeof __e=="number")__e=a},function(e,r,t){"use strict";var a=t(3);e.exports=function(e){if(!a(e))throw TypeError(e+" is not an object!");return e}},function(e,r,t){"use strict";var a={}.hasOwnProperty;e.exports=function(e,r){return a.call(e,r)}},function(e,r,t){"use strict";var a=t(5);var i=t(12);var n=t(9);var o=t(22)("src");var s="toString";var l=Function[s];var c=(""+l).split(s);t(7).inspectSource=function(e){return l.call(e)};(e.exports=function(e,r,t,s){var l=typeof t=="function";if(l)n(t,"name")||i(t,"name",r);if(e[r]===t)return;if(l)n(t,o)||i(t,o,e[r]?""+e[r]:c.join(String(r)));if(e===a){e[r]=t}else if(!s){delete e[r];i(e,r,t)}else if(e[r]){e[r]=t}else{i(e,r,t)}})(Function.prototype,s,function e(){return typeof this=="function"&&this[o]||l.call(this)})},function(e,r,t){"use strict";var a=t(16);e.exports=function(e,r,t){a(e);if(r===undefined)return e;switch(t){case 1:return function(t){return e.call(r,t)};case 2:return function(t,a){return e.call(r,t,a)};case 3:return function(t,a,i){return e.call(r,t,a,i)}}return function(){return e.apply(r,arguments)}}},function(e,r,t){"use strict";var a=t(15);var i=t(28);e.exports=t(13)?function(e,r,t){return a.f(e,r,i(1,t))}:function(e,r,t){e[r]=t;return e}},function(e,r,t){"use strict";e.exports=!t(14)(function(){return Object.defineProperty({},"a",{get:function e(){return 7}}).a!=7})},function(e,r,t){"use strict";e.exports=function(e){try{return!!e()}catch(e){return true}}},function(e,r,t){"use strict";var a=t(8);var i=t(44);var n=t(45);var o=Object.defineProperty;r.f=t(13)?Object.defineProperty:function e(r,t,s){a(r);t=n(t,true);a(s);if(i)try{return o(r,t,s)}catch(e){}if("get"in s||"set"in s)throw TypeError("Accessors not supported!");if("value"in s)r[t]=s.value;return r}},function(e,r,t){"use strict";e.exports=function(e){if(typeof e!="function")throw TypeError(e+" is not a function!");return e}},function(e,r,t){"use strict";var a=t(29);var i=t(30);e.exports=function(e){return a(i(e))}},functi