UNPKG

kara-module-file-view

Version:

kara module file view

1 lines 777 kB
(window["webpackJsonpkara_module_file_view"]=window["webpackJsonpkara_module_file_view"]||[]).push([[0],{156:function(e,r,t){(function(r,t,a){(function r(t,a){if(true)e.exports=a();else{}})(typeof self!=="undefined"?self: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=73)}([function(e,r,t){"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.isEvalSupported=r.isLittleEndian=r.createValidAbsoluteUrl=r.isSameOrigin=r.isSpace=r.isString=r.isNum=r.isEmptyObj=r.isBool=r.isArrayBuffer=r.info=r.getVerbosityLevel=r.getLookupTableFactory=r.getInheritableProperty=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.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.VerbosityLevel=r.OPS=r.IDENTITY_MATRIX=r.FONT_IDENTITY_MATRIX=undefined;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};t(75);var i=t(130);var n=[.001,0,0,.001,0,0];var s={NONE:"none",DECODE:"decode",DISPLAY:"display"};var o={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 l={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3};var c={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 u={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512};var f={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 h={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5};var d={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 g={ERRORS:0,WARNINGS:1,INFOS:5};var m={NONE:0,BINARY:1,STREAM:2};var p={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 b=g.WARNINGS;function y(e){if(Number.isInteger(e)){b=e}}function w(){return b}function k(e){if(b>=g.INFOS){console.log("Info: "+e)}}function S(e){if(b>=g.WARNINGS){console.log("Warning: "+e)}}function C(e){console.log("Deprecated API usage: "+e)}function x(e){throw new Error(e)}function A(e,r){if(!e){x(r)}}var _={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 P(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(P(t)){return t}}catch(e){}return null}function O(e,r,t){Object.defineProperty(e,r,{value:t,enumerable:true,configurable:true,writable:false});return t}function E(e){var r;return function(){if(e){r=Object.create(null);e(r);e=null}return r}}var F={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};var R=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 B=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 M=function e(){function r(e){this.name="InvalidPDFException";this.message=e}r.prototype=new Error;r.constructor=r;return r}();var D=function e(){function r(e){this.name="MissingPDFException";this.message=e}r.prototype=new Error;r.constructor=r;return r}();var N=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 L=function e(){function r(e){this.message=e}r.prototype=new Error;r.prototype.name="NotImplementedException";r.constructor=r;return r}();var q=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 U=function e(){function r(e){this.message=e}r.prototype=new Error;r.prototype.name="XRefParseException";r.constructor=r;return r}();var j=function e(){function r(e){this.message=e}r.prototype=new Error;r.prototype.name="FormatError";r.constructor=r;return r}();var z=function e(){function r(e){this.name="AbortException";this.message=e}r.prototype=new Error;r.constructor=r;return r}();var H=/\x00/g;function G(e){if(typeof e!=="string"){S("The argument for removeNullCharacters must be a string.");return e}return e.replace(H,"")}function W(e){A(e!==null&&(typeof e==="undefined"?"undefined":a(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 i=[];for(var n=0;n<r;n+=t){var s=Math.min(n+t,r);var o=e.subarray(n,s);i.push(String.fromCharCode.apply(null,o))}return i.join("")}function X(e){A(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 V(e){if(e.length!==undefined){return e.length}A(e.byteLength!==undefined);return e.byteLength}function Y(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=V(i);r+=n}var s=0;var o=new Uint8Array(r);for(t=0;t<a;t++){i=e[t];if(!(i instanceof Uint8Array)){if(typeof i==="string"){i=X(i)}else{i=new Uint8Array(i)}}n=i.byteLength;o.set(i,s);s+=n}return o}function K(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,e&255)}function J(e){if(e<=0){return 0}return Math.ceil(Math.log2(e))}function Z(e,r){return e[r]<<24>>24}function Q(e,r){return e[r]<<8|e[r+1]}function $(e,r){return(e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3])>>>0}function ee(){var e=new Uint8Array(4);e[0]=1;var r=new Uint32Array(e.buffer,0,1);return r[0]===1}function re(){try{new Function("");return true}catch(e){return false}}function te(e){var r=e.dict,t=e.key,a=e.getArray,i=a===undefined?false:a,n=e.stopWhenFound,s=n===undefined?true:n;var o=100;var l=0;var c=void 0;while(r){var u=i?r.getArray(t):r.get(t);if(u!==undefined){if(s){return u}if(!c){c=[]}c.push(u)}if(++l>o){S('getInheritableProperty: maximum loop count exceeded for "'+t+'"');break}r=r.get("Parent")}return c}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 s=r.applyTransform([t[0],t[3]],a);var o=r.applyTransform([t[2],t[1]],a);return[Math.min(i[0],n[0],s[0],o[0]),Math.min(i[1],n[1],s[1],o[1]),Math.max(i[0],n[0],s[0],o[0]),Math.max(i[1],n[1],s[1],o[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 s=r[2]*t[1]+r[3]*t[3];var o=(a+s)/2;var l=Math.sqrt((a+s)*(a+s)-4*(a*s-n*i))/2;var c=o+l||1;var u=o-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),s=[t[1],t[3],a[1],a[3]].sort(i),o=[];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]){o[0]=n[1];o[2]=n[2]}else{return false}if(s[0]===t[1]&&s[1]===a[1]||s[0]===a[1]&&s[1]===t[1]){o[1]=s[1];o[3]=s[2]}else{return false}return o};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){A(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 s=n.join("");return t?s.toLowerCase():s};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.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 s=(e[2]+e[0])/2;var o=(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 v,g;if(l===0){h=Math.abs(o-e[1])*r+a;d=Math.abs(s-e[0])*r+i;v=Math.abs(e[3]-e[1])*r;g=Math.abs(e[2]-e[0])*r}else{h=Math.abs(s-e[0])*r+a;d=Math.abs(o-e[1])*r+i;v=Math.abs(e[2]-e[0])*r;g=Math.abs(e[3]-e[1])*r}this.transform=[l*r,c*r,u*r,f*r,h-l*r*s-u*r*o,d-c*r*s-f*r*o];this.width=v;this.height=g;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 se=[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 oe(e){var r,t=e.length,a=[];if(e[0]==="þ"&&e[1]==="ÿ"){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=se[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 ve(e){return(typeof e==="undefined"?"undefined":a(e))==="object"&&e!==null&&e.byteLength!==undefined}function ge(e){return e===32||e===9||e===13||e===10}function me(){var e={};e.promise=new Promise(function(r,t){e.resolve=r;e.reject=t});return e}var pe=function e(r,t){if(typeof Blob!=="undefined"){return new Blob([r],{type:t})}throw new Error('The "Blob" constructor is not supported.')};var be=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=pe(t,a);return URL.createObjectURL(n)}var s="data:"+a+";base64,";for(var o=0,l=t.length;o<l;o+=3){var c=t[o]&255;var u=t[o+1]&255;var f=t[o+2]&255;var h=c>>2,d=(c&3)<<4|u>>4;var v=o+1<l?(u&15)<<2|f>>6:64;var g=o+2<l?f&63:64;s+=r[h]+r[d]+r[v]+r[g]}return s}}();function ye(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 we(e){if((typeof e==="undefined"?"undefined":a(e))!=="object"){return e}switch(e.name){case"AbortException":return new z(e.message);case"MissingPDFException":return new D(e.message);case"UnexpectedResponseException":return new N(e.message,e.status);default:return new B(e.message,e.details)}}function ke(e){if(!(e instanceof Error)||e instanceof z||e instanceof D||e instanceof N||e instanceof B){return e}return new B(e.message,e.toString())}function Se(e,r,t){if(r){e.resolve()}else{e.reject(t)}}function Ce(e){return Promise.resolve(e).catch(function(){})}function xe(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 s=r.callbackId;if(r.callbackId in i){var o=i[s];delete i[s];if("error"in r){o.reject(we(r.error))}else{o.resolve(r.data)}}else{throw new Error("Cannot resolve callback "+s)}}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:ke(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)}xe.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 s=me();this.callbacksCapabilities[i]=s;try{this.postMessage(n,a)}catch(e){s.reject(e)}return s.promise},sendWithStream:function e(r,t,a,n){var s=this;var o=this.streamId++;var l=this.sourceName;var c=this.targetName;return new i.ReadableStream({start:function e(a){var i=me();s.streamControllers[o]={controller:a,startCall:i,isClosed:false};s.postMessage({sourceName:l,targetName:c,action:r,streamId:o,data:t,desiredSize:a.desiredSize});return i.promise},pull:function e(r){var t=me();s.streamControllers[o].pullCall=t;s.postMessage({sourceName:l,targetName:c,stream:"pull",streamId:o,desiredSize:r.desiredSize});return t.promise},cancel:function e(r){var t=me();s.streamControllers[o].cancelCall=t;s.streamControllers[o].isClosed=true;s.postMessage({sourceName:l,targetName:c,stream:"cancel",reason:r,streamId:o});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 s=r.desiredSize;var o=this.sourceName;var l=r.sourceName;var c=me();var u=function e(r){var a=r.stream,i=r.chunk,s=r.transfers,c=r.success,u=r.reason;t.postMessage({sourceName:o,targetName:l,stream:a,streamId:n,chunk:i,success:c,reason:u},s)};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=me();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:s,ready:null};f.sinkCapability.resolve();f.ready=f.sinkCapability.promise;this.streamSinks[n]=f;ye(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 s=function e(r){var s=r.stream,o=r.success,l=r.reason;t.comObj.postMessage({sourceName:a,targetName:i,stream:s,success:o,streamId:n,reason:l})};var o=function e(){Promise.all([t.streamControllers[r.streamId].startCall,t.streamControllers[r.streamId].pullCall,t.streamControllers[r.streamId].cancelCall].map(function(e){return e&&Ce(e.promise)})).then(function(){delete t.streamControllers[r.streamId]})};switch(r.stream){case"start_complete":Se(this.streamControllers[r.streamId].startCall,r.success,we(r.reason));break;case"pull_complete":Se(this.streamControllers[r.streamId].pullCall,r.success,we(r.reason));break;case"pull":if(!this.streamSinks[r.streamId]){s({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;ye(this.streamSinks[r.streamId].onPull).then(function(){s({stream:"pull_complete",success:true})},function(e){s({stream:"pull_complete",success:false,reason:e})});break;case"enqueue":A(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":A(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();o();break;case"error":A(this.streamControllers[r.streamId],"error should have stream controller");this.streamControllers[r.streamId].controller.error(we(r.reason));o();break;case"cancel_complete":Se(this.streamControllers[r.streamId].cancelCall,r.success,we(r.reason));o();break;case"cancel":if(!this.streamSinks[r.streamId]){break}ye(this.streamSinks[r.streamId].onCancel,[we(r.reason)]).then(function(){s({stream:"cancel_complete",success:true})},function(e){s({stream:"cancel_complete",success:false,reason:e})});this.streamSinks[r.streamId].sinkCapability.reject(we(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)}};r.FONT_IDENTITY_MATRIX=n;r.IDENTITY_MATRIX=ae;r.OPS=p;r.VerbosityLevel=g;r.UNSUPPORTED_FEATURES=_;r.AnnotationBorderStyleType=h;r.AnnotationFieldFlag=f;r.AnnotationFlag=u;r.AnnotationType=c;r.FontType=v;r.ImageKind=l;r.CMapCompressionType=m;r.AbortException=z;r.InvalidPDFException=M;r.MessageHandler=xe;r.MissingDataException=q;r.MissingPDFException=D;r.NativeImageDecoding=s;r.NotImplementedException=L;r.PageViewport=ne;r.PasswordException=R;r.PasswordResponses=F;r.StreamType=d;r.TextRenderingMode=o;r.UnexpectedResponseException=N;r.UnknownErrorException=B;r.Util=ie;r.XRefParseException=U;r.FormatError=j;r.arrayByteLength=V;r.arraysToBytes=Y;r.assert=A;r.bytesToString=W;r.createBlob=pe;r.createPromiseCapability=me;r.createObjectURL=be;r.deprecated=C;r.getInheritableProperty=te;r.getLookupTableFactory=E;r.getVerbosityLevel=w;r.info=k;r.isArrayBuffer=ve;r.isBool=fe;r.isEmptyObj=ue;r.isNum=he;r.isString=de;r.isSpace=ge;r.isSameOrigin=I;r.createValidAbsoluteUrl=T;r.isLittleEndian=ee;r.isEvalSupported=re;r.log2=J;r.readInt8=Z;r.readUint16=Q;r.readUint32=$;r.removeNullCharacters=G;r.ReadableStream=i.ReadableStream;r.setVerbosityLevel=y;r.shadow=O;r.string32=K;r.stringToBytes=X;r.stringToPDFString=oe;r.stringToUTF8String=le;r.utf8StringToString=ce;r.warn=S;r.unreachable=x},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 s=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 o=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,s=this.suppressEncryption;if(typeof(i=this._map[r])!=="undefined"||r in this._map||typeof t==="undefined"){return n?n.fetchIfRef(i,s):i}if(typeof(i=this._map[t])!=="undefined"||t in this._map||typeof a==="undefined"){return n?n.fetchIfRef(i,s):i}i=this._map[a]||null;return n?n.fetchIfRef(i,s):i},getAsync:function e(r,t,a){var i;var n=this.xref,s=this.suppressEncryption;if(typeof(i=this._map[r])!=="undefined"||r in this._map||typeof t==="undefined"){if(n){return n.fetchIfRefAsync(i,s)}return Promise.resolve(i)}if(typeof(i=this._map[t])!=="undefined"||t in this._map||typeof a==="undefined"){if(n){return n.fetchIfRefAsync(i,s)}return Promise.resolve(i)}i=this._map[a]||null;if(n){return n.fetchIfRefAsync(i,s)}return Promise.resolve(i)},getArray:function e(r,t,a){var i=this.get(r,t,a);var n=this.xref,s=this.suppressEncryption;if(!Array.isArray(i)||!n){return i}i=i.slice();for(var o=0,l=i.length;o<l;o++){if(!g(i[o])){continue}i[o]=n.fetch(i[o],s)}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 s=r[i];if(!v(s)){continue}for(var o in s._map){if(a._map[o]!==undefined){continue}a._map[o]=s._map[o]}}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 s&&(r===undefined||e.cmd===r)}function v(e,r){return e instanceof o&&(r===undefined||h(e.get("Type"),r))}function g(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=s;r.Dict=o;r.Name=n;r.Ref=l;r.RefSet=c;r.RefSetCache=u;r.isEOF=f;r.isCmd=d;r.isDict=v;r.isName=h;r.isRef=g;r.isRefsEqual=m;r.isStream=p},function(e,r,t){"use strict";var a=t(47)("wks");var i=t(22);var n=t(6).Symbol;var s=typeof n=="function";var o=e.exports=function(e){return a[e]||(a[e]=s&&n[e]||(s?n:i)("Symbol."+e))};o.store=a},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";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 s=function e(){function r(e){var r=(0,a.stringToBytes)(e);n.call(this,r)}r.prototype=n.prototype;return r}();var o=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;o.call(this,null)}r.prototype=Object.create(o.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 s=this.ensureBuffer(n);s.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 s=[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;o.call(this,r)}l.prototype=Object.create(o.prototype);l.prototype.getBits=function e(r){var t=this.str;var i=this.codeSize;var n=this.codeBuf;var s;while(i<r){if((s=t.getByte())===-1){throw new a.FormatError("Bad encoding in flate stream")}n|=s<<i;i+=8}s=n&(1<<r)-1;this.codeBuf=n>>r;this.codeSize=i-=r;return s};l.prototype.getCode=function e(r){var t=this.str;var i=r[0];var n=r[1];var s=this.codeSize;var o=this.codeBuf;var l;while(s<n){if((l=t.getByte())===-1){break}o|=l<<s;s+=8}var c=i[o&(1<<n)-1];var u=c>>16;var f=c&65535;if(u<1||s<u){throw new a.FormatError("Bad encoding in flate stream")}this.codeBuf=o>>u;this.codeSize=s-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 s=new Int32Array(n);for(var o=1,l=0,c=2;o<=a;++o,l<<=1,c<<=1){for(var u=0;u<t;++u){if(r[u]===o){var f=0;var h=l;for(i=0;i<o;++i){f=f<<1|h&1;h>>=1}for(i=f;i<n;i+=c){s[i]=o<<16|u}++l}}}return[s,a]};l.prototype.readBlock=function e(){var o,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 v=this.bufferLength;o=this.ensureBuffer(v+h);var g=v+h;this.bufferLength=g;if(h===0){if(c.peekByte()===-1){this.eof=true}}else{for(var m=v;m<g;++m){if((f=c.getByte())===-1){this.eof=true;break}o[m]=f}}return}var p;var b;if(u===1){p=n;b=s}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 I,P,T;while(C<A){var O=this.getCode(x);if(O===16){I=2;P=3;T=l}else if(O===17){I=3;P=3;T=l=0}else if(O===18){I=7;P=11;T=l=0}else{_[C++]=l=O;continue}var E=this.getBits(I)+P;while(E-- >0){_[C++]=T}}p=this.generateHuffmanTable(_.subarray(0,y));b=this.generateHuffmanTable(_.subarray(y,A))}else{throw new a.FormatError("Unknown block type in flate stream")}o=this.buffer;var F=o?o.length:0;var R=this.bufferLength;while(true){var B=this.getCode(p);if(B<256){if(R+1>=F){o=this.ensureBuffer(R+1);F=o.length}o[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){o=this.ensureBuffer(R+l);F=o.length}for(var N=0;N<l;++N,++R){o[R]=o[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 s=this.colors=t.get("Colors")||1;var l=this.bits=t.get("BitsPerComponent")||8;var c=this.columns=t.get("Columns")||1;this.pixBytes=s*l+7>>3;this.rowBytes=c*s*l+7>>3;o.call(this,r);return this}r.prototype=Object.create(o.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 s=this.str.getBytes(r);this.eof=!s.length;if(this.eof){return}var o=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=s[h]^o;d^=d>>1;d^=d>>2;d^=d>>4;o=(d&1)<<7;a[f++]=d}}else if(i===8){for(h=0;h<n;++h){a[f++]=s[h]}for(;h<r;++h){a[f]=a[f-n]+s[h];f++}}else if(i===16){var v=n*2;for(h=0;h<v;++h){a[f++]=s[h]}for(;h<r;h+=2){var g=((s[h]&255)<<8)+(s[h+1]&255)+((a[f-v]&255)<<8)+(a[f-v+1]&255);a[f++]=g>>8&255;a[f++]=g&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){o=o<<8|s[b++]&255;c+=8}m[k]=m[k]+(o>>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)+(o&(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 s=this.bufferLength;var o=this.ensureBuffer(s+r);var l=o.subarray(s-r,s);if(l.length===0){l=new Uint8Array(r)}var c,u=s,f,h;switch(i){case 0:for(c=0;c<r;++c){o[u++]=n[c]}break;case 1:for(c=0;c<t;++c){o[u++]=n[c]}for(;c<r;++c){o[u]=o[u-t]+n[c]&255;u++}break;case 2:for(c=0;c<r;++c){o[u++]=l[c]+n[c]&255}break;case 3:for(c=0;c<t;++c){o[u++]=(l[c]>>1)+n[c]}for(;c<r;++c){o[u]=(l[c]+o[u-t]>>1)+n[c]&255;u++}break;case 4:for(c=0;c<t;++c){f=l[c];h=n[c];o[u++]=f+h}for(;c<r;++c){f=l[c];var d=l[c-t];var v=o[u-t];var g=v+f-d;var m=g-v;if(m<0){m=-m}var p=g-f;if(p<0){p=-p}var b=g-d;if(b<0){b=-b}h=n[c];if(m<=p&&m<=b){o[u++]=v+h}else if(p<=b){o[u++]=f+h}else{o[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;o.call(this,r)}var t=512;r.prototype=Object.create(o.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 s,o=r.length;var l=this.ensureBuffer(n+o);for(s=0;s<o;s++){l[n++]=r[s]}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}o.call(this,r)}r.prototype=Object.create(o.prototype);r.prototype.readBlock=function e(){var r=126;var t=122;var i=-1;var n=this.str;var s=n.getByte();while((0,a.isSpace)(s)){s=n.getByte()}if(s===i||s===r){this.eof=true;return}var o=this.bufferLength,l;var c;if(s===t){l=this.ensureBuffer(o+4);for(c=0;c<4;++c){l[o+c]=0}this.bufferLength+=4}else{var u=this.input;u[0]=s;for(c=1;c<5;++c){s=n.getByte();while((0,a.isSpace)(s)){s=n.getByte()}u[c]=s;if(s===i||s===r){break}}l=this.ensureBuffer(o+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[o+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}o.call(this,r)}r.prototype=Object.create(o.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 s=this.firstDigit;for(var o=0,l=t.length;o<l;o++){var c=t[o],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(s<0){s=u}else{i[n++]=s<<4|u;s=-1}}if(s>=0&&this.eof){i[n++]=s<<4;s=-1}this.firstDigit=s;this.bufferLength=n};return r}();var v=function e(){function r(e,r){this.str=e;this.dict=e.dict;o.call(this,r)}r.prototype=Object.create(o.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 s=r[1];t=this.ensureBuffer(a+i+1);for(var o=0;o<i;o++){t[a++]=s}}this.bufferLength=a};return r}();var g=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;o.call(this,r)}r.prototype=Object.create(o.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,s;var o=this.lzwState;if(!o){return}var l=o.earlyChange;var c=o.nextCode;var u=o.dictionaryValues;var f=o.dictionaryLengths;var h=o.dictionaryPrevCodes;var d=o.codeLength;var v=o.prevCode;var g=o.currentSequence;var m=o.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){g[0]=w;m=1}else if(w>=258){if(w<c){m=f[w];for(n=m-1,s=w;n>=0;n--){g[n]=u[s];s=h[s]}}else{g[m++]=g[0]}}else if(w===256){d=9;c=258;m=0;continue}else{this.eof=true;delete this.lzwState;break}if(k){h[c]=v;f[c]=f[v]+1;u[c]=g[0];c++;d=c+l&c+l-1?d:Math.min(Math.log(c+l)/.6931471805599453+1,12)|0}v=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++]=g[n]}}o.nextCode=c;o.codeLength=d;o.prevCode=v;o.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=o;r.FlateStream=c;r.NullStream=m;r.PredictorStream=u;r.RunLengthStream=v;r.Stream=n;r.StreamsSequenceStream=l;r.StringStream=s;r.LZWStream=g},function(e,r,t){"use strict";var a=t(6);var i=t(7);var n=t(12);var s=t(9);var o=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 v=r&e.B;var g=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&&g&&g[b]!==undefined;w=(y?g:c)[b];k=v&&y?o(w,a):d&&typeof w=="function"?o(Function.call,w):w;if(g)s(g,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=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=e.exports={version:"2.5.5"};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=t(6);var i=t(12);var n=t(10);var s=t(22)("src");var o="toString";var l=Function[o];var c=(""+l).split(o);t(7).inspectSource=function(e){return l.call(e)};(e.exports=function(e,r,t,o){var l=typeof t=="function";if(l)n(t,"name")||i(t,"name",r);if(e[r]===t)return;if(l)n(t,s)||i(t,s,e[r]?""+e[r]:c.join(String(r)));if(e===a){e[r]=t}else if(!o){delete e[r];i(e,r,t)}else if(e[r]){e[r]=t}else{i(e,r,t)}})(Function.prototype,o,function e(){return typeof this=="function"&&this[s]||l.call(this)})},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(17);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(16);var i=t(29);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={}.toString;e.exports=function(e){return a.call(e).slice(8,-1)}},function(e,r,t){"use strict";var a=t(8);var i=t(45);var n=t(46);var s=Object.defineProperty;r.f=t(13)?Object.defineProperty:function e(r,t,o){a(r);t=n(t,true);a(o);if(i)try{return s(r,t,o)}catch(e){}if("get"in o||"set"in o)throw TypeError("Accessors not supported!");if("value"in o)r[t]=o.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(30);var i=t(23);e.exports=function(e){return a(i(e))}},function(e,r,t){"use strict";e.exports={}},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:true});r.ColorSpace=undefined;var a=t(0);var i=t(1);var n=function e(){function r(e,r,t,a,i,n,s,o){var l=3;s=s!==1?0:s;var c=t/i;var u=a/n;var f,h,d,v=0,g;var m=new Uint16Array(i);var p=t*l;for(f=0;f<i;f++){m[f]=Math.floor(f*c)*l}for(f=0;f<n;f++){d=Math.floor(f*u)*p;for(h=0;h<i;h++){g=d+m[h];o[v++]=e[g++];o[v++]=e[g++];o[v++]=e[g++];v+=s}}}function t(){(0,a.unreachable)("should not call ColorSpace constructor")}t.prototype={getRgb:function e(r,t){var a=new Uint8Array(3);this.getRgbItem(r,t,a,0);return a},getRgbItem:function e(r,t,i,n){(0,a.unreachable)("Should not call ColorSpace.getRgbItem")},getRgbBuffer:function e(r,t,i,n,s,o,l){(0,a.unreachable)("Should not call ColorSpace.getRgbBuffer")},getOutputLength:function e(r,t