!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf",[],t):"object"==typeof exports?exports["pdfjs-dist/build/pdf"]=t():e["pdfjs-dist/build/pdf"]=e.pdfjsDistBuildPdf=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=86)}([function(e,t,r){"use strict";function n(e){se=e}function i(){return se}function a(e){se>=ie.infos&&console.log("Info: "+e)}function o(e){se>=ie.warnings&&console.log("Warning: "+e)}function s(e){console.log("Deprecated API usage: "+e)}function l(e){throw new Error(e)}function u(e,t){e||l(t)}function c(e,t){try{var r=new URL(e);if(!r.origin||"null"===r.origin)return!1}catch(e){return!1}var n=new URL(t,r);return r.origin===n.origin}function h(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function d(e,t){if(!e)return null;try{var r=t?new URL(e,t):new URL(e);if(h(r))return r}catch(e){}return null}function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}function p(e){var t;return function(){return e&&(t=Object.create(null),e(t),e=null),t}}function m(e){return"string"!=typeof e?(o("The argument for removeNullCharacters must be a string."),e):e.replace(ye,"")}function g(e){u(null!==e&&"object"===(void 0===e?"undefined":X(e))&&void 0!==e.length,"Invalid argument for bytesToString");var t=e.length;if(t<8192)return String.fromCharCode.apply(null,e);for(var r=[],n=0;n>24&255,e>>16&255,e>>8&255,255&e)}function A(e){for(var t=1,r=0;e>t;)t<<=1,r++;return r}function S(e,t){return e[t]<<24>>24}function w(e,t){return e[t]<<8|e[t+1]}function P(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function C(){var e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]}function R(){try{return new Function(""),!0}catch(e){return!1}}function x(e){var t,r=e.length,n=[];if("þ"===e[0]&&"ÿ"===e[1])for(t=2;t2&&void 0!==arguments[2]?arguments[2]:null;return e?new Promise(function(n,i){n(e.apply(r,t))}):Promise.resolve(void 0)}function W(e){if("object"!==(void 0===e?"undefined":X(e)))return e;switch(e.name){case"AbortException":return new _e(e.message);case"MissingPDFException":return new fe(e.message);case"UnexpectedResponseException":return new pe(e.message,e.status);default:return new he(e.message,e.details)}}function B(e,t,r){t?e.resolve():e.reject(r)}function z(e){return Promise.resolve(e).catch(function(){})}function G(e,t,r){var n=this;this.sourceName=e,this.targetName=t,this.comObj=r,this.callbackId=1,this.streamId=1,this.postMessageTransfers=!0,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null);var i=this.callbacksCapabilities=Object.create(null),a=this.actionHandler=Object.create(null);this._onComObjOnMessage=function(e){var t=e.data;if(t.targetName===n.sourceName)if(t.stream)n._processStreamMessage(t);else if(t.isReply){var o=t.callbackId;if(!(t.callbackId in i))throw new Error("Cannot resolve callback "+o);var s=i[o];delete i[o],"error"in t?s.reject(W(t.error)):s.resolve(t.data)}else{if(!(t.action in a))throw new Error("Unknown action from worker: "+t.action);var l=a[t.action];if(t.callbackId){var u=n.sourceName,c=t.sourceName;Promise.resolve().then(function(){return l[0].call(l[1],t.data)}).then(function(e){r.postMessage({sourceName:u,targetName:c,isReply:!0,callbackId:t.callbackId,data:e})},function(e){e instanceof Error&&(e+=""),r.postMessage({sourceName:u,targetName:c,isReply:!0,callbackId:t.callbackId,error:e})})}else t.streamId?n._createStreamSink(t):l[0].call(l[1],t.data)}},r.addEventListener("message",this._onComObjOnMessage)}function H(e,t,r){var n=new Image;n.onload=function(){r.resolve(e,n)},n.onerror=function(){r.resolve(e,null),o("Error during JPEG image loading")},n.src=t}Object.defineProperty(t,"__esModule",{value:!0}),t.unreachable=t.warn=t.utf8StringToString=t.stringToUTF8String=t.stringToPDFString=t.stringToBytes=t.string32=t.shadow=t.setVerbosityLevel=t.ReadableStream=t.removeNullCharacters=t.readUint32=t.readUint16=t.readInt8=t.log2=t.loadJpegStream=t.isEvalSupported=t.isLittleEndian=t.createValidAbsoluteUrl=t.isSameOrigin=t.isNodeJS=t.isSpace=t.isString=t.isNum=t.isInt=t.isEmptyObj=t.isBool=t.isArrayBuffer=t.isArray=t.info=t.getVerbosityLevel=t.getLookupTableFactory=t.deprecated=t.createObjectURL=t.createPromiseCapability=t.createBlob=t.bytesToString=t.assert=t.arraysToBytes=t.arrayByteLength=t.FormatError=t.XRefParseException=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.StreamType=t.StatTimer=t.PasswordResponses=t.PasswordException=t.PageViewport=t.NotImplementedException=t.NativeImageDecoding=t.MissingPDFException=t.MissingDataException=t.MessageHandler=t.InvalidPDFException=t.AbortException=t.CMapCompressionType=t.ImageKind=t.FontType=t.AnnotationType=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.UNSUPPORTED_FEATURES=t.VERBOSITY_LEVELS=t.OPS=t.IDENTITY_MATRIX=t.FONT_IDENTITY_MATRIX=void 0;var X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};r(87);var Y=r(88),V=[.001,0,0,.001,0,0],J={NONE:"none",DECODE:"decode",DISPLAY:"display"},Q={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},K={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},Z={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},$={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},ee={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},te={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},re={UNKNOWN:0,FLATE:1,LZW:2,DCT:3,JPX:4,JBIG:5,A85:6,AHX:7,CCF:8,RL:9},ne={UNKNOWN:0,TYPE1:1,TYPE1C:2,CIDFONTTYPE0:3,CIDFONTTYPE0C:4,TRUETYPE:5,CIDFONTTYPE2:6,TYPE3:7,OPENTYPE:8,TYPE0:9,MMTYPE1:10},ie={errors:0,warnings:1,infos:5},ae={NONE:0,BINARY:1,STREAM:2},oe={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},se=ie.warnings,le={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"},ue={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},ce=function(){function e(e,t){this.name="PasswordException",this.message=e,this.code=t}return e.prototype=new Error,e.constructor=e,e}(),he=function(){function e(e,t){this.name="UnknownErrorException",this.message=e,this.details=t}return e.prototype=new Error,e.constructor=e,e}(),de=function(){function e(e){this.name="InvalidPDFException",this.message=e}return e.prototype=new Error,e.constructor=e,e}(),fe=function(){function e(e){this.name="MissingPDFException",this.message=e}return e.prototype=new Error,e.constructor=e,e}(),pe=function(){function e(e,t){this.name="UnexpectedResponseException",this.message=e,this.status=t}return e.prototype=new Error,e.constructor=e,e}(),me=function(){function e(e){this.message=e}return e.prototype=new Error,e.prototype.name="NotImplementedException",e.constructor=e,e}(),ge=function(){function e(e,t){this.begin=e,this.end=t,this.message="Missing data ["+e+", "+t+")"}return e.prototype=new Error,e.prototype.name="MissingDataException",e.constructor=e,e}(),ve=function(){function e(e){this.message=e}return e.prototype=new Error,e.prototype.name="XRefParseException",e.constructor=e,e}(),be=function(){function e(e){this.message=e}return e.prototype=new Error,e.prototype.name="FormatError",e.constructor=e,e}(),_e=function(){function e(e){this.name="AbortException",this.message=e}return e.prototype=new Error,e.constructor=e,e}(),ye=/\x00/g,Ae=[1,0,0,1,0,0],Se=function(){function e(){}var t=["rgb(",0,",",0,",",0,")"];e.makeCssRgb=function(e,r,n){return t[1]=e,t[3]=r,t[5]=n,t.join("")},e.transform=function(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]},e.applyTransform=function(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]},e.applyInverseTransform=function(e,t){var r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]},e.getAxialAlignedBoundingBox=function(t,r){var n=e.applyTransform(t,r),i=e.applyTransform(t.slice(2,4),r),a=e.applyTransform([t[0],t[3]],r),o=e.applyTransform([t[2],t[1]],r);return[Math.min(n[0],i[0],a[0],o[0]),Math.min(n[1],i[1],a[1],o[1]),Math.max(n[0],i[0],a[0],o[0]),Math.max(n[1],i[1],a[1],o[1])]},e.inverseTransform=function(e){var t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]},e.apply3dTransform=function(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]]},e.singularValueDecompose2dScale=function(e){var t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],n=e[0]*t[1]+e[1]*t[3],i=e[2]*t[0]+e[3]*t[2],a=e[2]*t[1]+e[3]*t[3],o=(r+a)/2,s=Math.sqrt((r+a)*(r+a)-4*(r*a-i*n))/2,l=o+s||1,u=o-s||1;return[Math.sqrt(l),Math.sqrt(u)]},e.normalizeRect=function(e){var t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t},e.intersect=function(t,r){function n(e,t){return e-t}var i=[t[0],t[2],r[0],r[2]].sort(n),a=[t[1],t[3],r[1],r[3]].sort(n),o=[];return t=e.normalizeRect(t),r=e.normalizeRect(r),(i[0]===t[0]&&i[1]===r[0]||i[0]===r[0]&&i[1]===t[0])&&(o[0]=i[1],o[2]=i[2],(a[0]===t[1]&&a[1]===r[1]||a[0]===r[1]&&a[1]===t[1])&&(o[1]=a[1],o[3]=a[2],o))},e.sign=function(e){return e<0?-1:1};var r=["","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"];return e.toRoman=function(e,t){u(I(e)&&e>0,"The number should be a positive integer.");for(var n,i=[];e>=1e3;)e-=1e3,i.push("M");n=e/100|0,e%=100,i.push(r[n]),n=e/10|0,e%=10,i.push(r[10+n]),i.push(r[20+e]);var a=i.join("");return t?a.toLowerCase():a},e.appendToArray=function(e,t){Array.prototype.push.apply(e,t)},e.prependToArray=function(e,t){Array.prototype.unshift.apply(e,t)},e.extendObj=function(e,t){for(var r in t)e[r]=t[r]},e.getInheritableProperty=function(e,t,r){for(;e&&!e.has(t);)e=e.get("Parent");return e?r?e.getArray(t):e.get(t):null},e.inherit=function(e,t,r){e.prototype=Object.create(t.prototype),e.prototype.constructor=e;for(var n in r)e.prototype[n]=r[n]},e.loadScript=function(e,t){var r=document.createElement("script"),n=!1;r.setAttribute("src",e),t&&(r.onload=function(){n||t(),n=!0}),document.getElementsByTagName("head")[0].appendChild(r)},e}(),we=function(){function e(e,t,r,n,i,a){this.viewBox=e,this.scale=t,this.rotation=r,this.offsetX=n,this.offsetY=i;var o,s,l,u,c=(e[2]+e[0])/2,h=(e[3]+e[1])/2;switch(r%=360,r=r<0?r+360:r){case 180:o=-1,s=0,l=0,u=1;break;case 90:o=0,s=1,l=1,u=0;break;case 270:o=0,s=-1,l=-1,u=0;break;default:o=1,s=0,l=0,u=-1}a&&(l=-l,u=-u);var d,f,p,m;0===o?(d=Math.abs(h-e[1])*t+n,f=Math.abs(c-e[0])*t+i,p=Math.abs(e[3]-e[1])*t,m=Math.abs(e[2]-e[0])*t):(d=Math.abs(c-e[0])*t+n,f=Math.abs(h-e[1])*t+i,p=Math.abs(e[2]-e[0])*t,m=Math.abs(e[3]-e[1])*t),this.transform=[o*t,s*t,l*t,u*t,d-o*t*c-l*t*h,f-s*t*c-u*t*h],this.width=p,this.height=m,this.fontScale=t}return e.prototype={clone:function(t){t=t||{};var r="scale"in t?t.scale:this.scale,n="rotation"in t?t.rotation:this.rotation;return new e(this.viewBox.slice(),r,n,this.offsetX,this.offsetY,t.dontFlip)},convertToViewportPoint:function(e,t){return Se.applyTransform([e,t],this.transform)},convertToViewportRectangle:function(e){var t=Se.applyTransform([e[0],e[1]],this.transform),r=Se.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],r[0],r[1]]},convertToPdfPoint:function(e,t){return Se.applyInverseTransform([e,t],this.transform)}},e}(),Pe=[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],Ce=function(){function e(e,t,r){for(;e.lengtha&&(a=o.length)}for(t=0,r=n.length;t2&&void 0!==arguments[2]&&arguments[2])&&URL.createObjectURL){var n=Re(t,r);return URL.createObjectURL(n)}for(var i="data:"+r+";base64,",a=0,o=t.length;a>2]+e[(3&s)<<4|l>>4]+e[a+1>6:64]+e[a+21&&void 0!==arguments[1]?arguments[1]:1,r=arguments[2];if(!this.isCancelled){var n=this.desiredSize;this.desiredSize-=t,n>0&&this.desiredSize<=0&&(this.sinkCapability=q(),this.ready=this.sinkCapability.promise),u({stream:"enqueue",chunk:e,transfers:r})}},close:function(){this.isCancelled||(this.isCancelled=!0,u({stream:"close"}),delete r.streamSinks[i])},error:function(e){this.isCancelled||(this.isCancelled=!0,u({stream:"error",reason:e}))},sinkCapability:l,onPull:null,onCancel:null,isCancelled:!1,desiredSize:a,ready:null};c.sinkCapability.resolve(),c.ready=c.sinkCapability.promise,this.streamSinks[i]=c,U(n[0],[e.data,c],n[1]).then(function(){u({stream:"start_complete",success:!0})},function(e){u({stream:"start_complete",success:!1,reason:e})})},_processStreamMessage:function(e){var t=this,r=this.sourceName,n=e.sourceName,i=e.streamId,a=function(e){var a=e.stream,o=e.success,s=e.reason;t.comObj.postMessage({sourceName:r,targetName:n,stream:a,success:o,streamId:i,reason:s})},o=function(){Promise.all([t.streamControllers[e.streamId].startCall,t.streamControllers[e.streamId].pullCall,t.streamControllers[e.streamId].cancelCall].map(function(e){return e&&z(e.promise)})).then(function(){delete t.streamControllers[e.streamId]})};switch(e.stream){case"start_complete":B(this.streamControllers[e.streamId].startCall,e.success,W(e.reason));break;case"pull_complete":B(this.streamControllers[e.streamId].pullCall,e.success,W(e.reason));break;case"pull":if(!this.streamSinks[e.streamId]){a({stream:"pull_complete",success:!0});break}this.streamSinks[e.streamId].desiredSize<=0&&e.desiredSize>0&&this.streamSinks[e.streamId].sinkCapability.resolve(),this.streamSinks[e.streamId].desiredSize=e.desiredSize,U(this.streamSinks[e.streamId].onPull).then(function(){a({stream:"pull_complete",success:!0})},function(e){a({stream:"pull_complete",success:!1,reason:e})});break;case"enqueue":u(this.streamControllers[e.streamId],"enqueue should have stream controller"),this.streamControllers[e.streamId].isClosed||this.streamControllers[e.streamId].controller.enqueue(e.chunk);break;case"close":if(u(this.streamControllers[e.streamId],"close should have stream controller"),this.streamControllers[e.streamId].isClosed)break;this.streamControllers[e.streamId].isClosed=!0,this.streamControllers[e.streamId].controller.close(),o();break;case"error":u(this.streamControllers[e.streamId],"error should have stream controller"),this.streamControllers[e.streamId].controller.error(W(e.reason)),o();break;case"cancel_complete":B(this.streamControllers[e.streamId].cancelCall,e.success,W(e.reason)),o();break;case"cancel":if(!this.streamSinks[e.streamId])break;U(this.streamSinks[e.streamId].onCancel,[W(e.reason)]).then(function(){a({stream:"cancel_complete",success:!0})},function(e){a({stream:"cancel_complete",success:!1,reason:e})}),this.streamSinks[e.streamId].sinkCapability.reject(W(e.reason)),this.streamSinks[e.streamId].isCancelled=!0,delete this.streamSinks[e.streamId];break;default:throw new Error("Unexpected stream case")}},postMessage:function(e,t){t&&this.postMessageTransfers?this.comObj.postMessage(e,t):this.comObj.postMessage(e)},destroy:function(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}},t.FONT_IDENTITY_MATRIX=V,t.IDENTITY_MATRIX=Ae,t.OPS=oe,t.VERBOSITY_LEVELS=ie,t.UNSUPPORTED_FEATURES=le,t.AnnotationBorderStyleType=te,t.AnnotationFieldFlag=ee,t.AnnotationFlag=$,t.AnnotationType=Z,t.FontType=ne,t.ImageKind=K,t.CMapCompressionType=ae,t.AbortException=_e,t.InvalidPDFException=de,t.MessageHandler=G,t.MissingDataException=ge,t.MissingPDFException=fe,t.NativeImageDecoding=J,t.NotImplementedException=me,t.PageViewport=we,t.PasswordException=ce,t.PasswordResponses=ue,t.StatTimer=Ce,t.StreamType=re,t.TextRenderingMode=Q,t.UnexpectedResponseException=pe,t.UnknownErrorException=he,t.Util=Se,t.XRefParseException=ve,t.FormatError=be,t.arrayByteLength=b,t.arraysToBytes=_,t.assert=u,t.bytesToString=g,t.createBlob=Re,t.createPromiseCapability=q,t.createObjectURL=xe,t.deprecated=s,t.getLookupTableFactory=p,t.getVerbosityLevel=i,t.info=a,t.isArray=D,t.isArrayBuffer=F,t.isBool=O,t.isEmptyObj=E,t.isInt=I,t.isNum=L,t.isString=j,t.isSpace=N,t.isNodeJS=M,t.isSameOrigin=c,t.createValidAbsoluteUrl=d,t.isLittleEndian=C,t.isEvalSupported=R,t.loadJpegStream=H,t.log2=A,t.readInt8=S,t.readUint16=w,t.readUint32=P,t.removeNullCharacters=m,t.ReadableStream=Y.ReadableStream,t.setVerbosityLevel=n,t.shadow=f,t.string32=y,t.stringToBytes=v,t.stringToPDFString=x,t.stringToUTF8String=k,t.utf8StringToString=T,t.warn=o,t.unreachable=l},function(e,t,r){"use strict";var n=r(48)("wks"),i=r(13),a=r(2).Symbol,o="function"==typeof a;(e.exports=function(e){return n[e]||(n[e]=o&&a[e]||(o?a:i)("Symbol."+e))}).store=n},function(e,t,r){"use strict";var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,r){"use strict";e.exports=!r(17)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,r){"use strict";var n=r(8),i=r(18);e.exports=r(3)?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){"use strict";var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,r){"use strict";var n=r(11),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){var r=t&&t.url;if(e.href=e.title=r?(0,c.removeNullCharacters)(r):"",r){var n=t.target;void 0===n&&(n=o("externalLinkTarget")),e.target=_[n];var i=t.rel;void 0===i&&(i=o("externalLinkRel")),e.rel=i}}function a(e){var t=e.indexOf("#"),r=e.indexOf("?"),n=Math.min(t>0?t:e.length,r>0?r:e.length);return e.substring(e.lastIndexOf("/",n)+1,n)}function o(e){var t=d.default.PDFJS;switch(e){case"pdfBug":return!!t&&t.pdfBug;case"disableAutoFetch":return!!t&&t.disableAutoFetch;case"disableStream":return!!t&&t.disableStream;case"disableRange":return!!t&&t.disableRange;case"disableFontFace":return!!t&&t.disableFontFace;case"disableCreateObjectURL":return!!t&&t.disableCreateObjectURL;case"disableWebGL":return!t||t.disableWebGL;case"cMapUrl":return t?t.cMapUrl:null;case"cMapPacked":return!!t&&t.cMapPacked;case"postMessageTransfers":return!t||t.postMessageTransfers;case"workerPort":return t?t.workerPort:null;case"workerSrc":return t?t.workerSrc:null;case"disableWorker":return!!t&&t.disableWorker;case"maxImageSize":return t?t.maxImageSize:-1;case"imageResourcesPath":return t?t.imageResourcesPath:"";case"isEvalSupported":return!t||t.isEvalSupported;case"externalLinkTarget":if(!t)return b.NONE;switch(t.externalLinkTarget){case b.NONE:case b.SELF:case b.BLANK:case b.PARENT:case b.TOP:return t.externalLinkTarget}return(0,c.warn)("PDFJS.externalLinkTarget is invalid: "+t.externalLinkTarget),t.externalLinkTarget=b.NONE,b.NONE;case"externalLinkRel":return t?t.externalLinkRel:f;case"enableStats":return!(!t||!t.enableStats);case"pdfjsNext":return!(!t||!t.pdfjsNext);default:throw new Error("Unknown default setting: "+e)}}function s(){switch(o("externalLinkTarget")){case b.NONE:return!1;case b.SELF:case b.BLANK:case b.PARENT:case b.TOP:return!0}}function l(e,t){(0,c.deprecated)("isValidUrl(), please use createValidAbsoluteUrl() instead.");var r=t?"http://example.com":null;return null!==(0,c.createValidAbsoluteUrl)(e,r)}Object.defineProperty(t,"__esModule",{value:!0}),t.DOMCMapReaderFactory=t.DOMCanvasFactory=t.DEFAULT_LINK_REL=t.getDefaultSetting=t.LinkTarget=t.getFilenameFromUrl=t.isValidUrl=t.isExternalLinkTargetSet=t.addLinkAttributes=t.RenderingCancelledException=t.CustomStyle=void 0;var u=function(){function e(e,t){for(var r=0;r0?i:n)(e)}},function(e,t,r){"use strict";var n=r(38);e.exports=function(e){return Object(n(e))}},function(e,t,r){"use strict";var n=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},function(e,t,r){"use strict";e.exports="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:{}},function(e,t,r){"use strict";var n=r(9);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t,r){"use strict";var n=e.exports={version:"2.5.0"};"number"==typeof __e&&(__e=n)},function(e,t,r){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){"use strict";var n=r(11),i=Math.max,a=Math.min;e.exports=function(e,t){return e=n(e),e<0?i(e+t,0):a(e,t)}},function(e,t,r){"use strict";var n=r(42),i=r(38);e.exports=function(e){return n(i(e))}},function(e,t,r){"use strict";var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,r){"use strict";var n=r(33);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,r){"use strict" ;e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,r){"use strict";e.exports=!1},function(e,t,r){"use strict";var n=r(2),i=r(4),a=r(5),o=r(13)("src"),s=Function.toString,l=(""+s).split("toString");r(16).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,r,s){var u="function"==typeof r;u&&(a(r,"name")||i(r,"name",t)),e[t]!==r&&(u&&(a(r,o)||i(r,o,e[t]?""+e[t]:l.join(String(t)))),e===n?e[t]=r:s?e[t]?e[t]=r:i(e,t,r):(delete e[t],i(e,t,r)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[o]||s.call(this)})},function(e,t,r){"use strict";var n=r(8).f,i=r(5),a=r(1)("toStringTag");e.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,a)&&n(e,a,{configurable:!0,value:t})}},function(e,t,r){"use strict";var n=r(48)("keys"),i=r(13);e.exports=function(e){return n[e]||(n[e]=i(e))}},function(e,t,r){"use strict";var n=r(9);e.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,r){"use strict";function n(){}Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationLayer=void 0;var i=r(7),a=r(0);n.prototype={create:function(e){switch(e.data.annotationType){case a.AnnotationType.LINK:return new s(e);case a.AnnotationType.TEXT:return new l(e);case a.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new c(e);case"Btn":if(e.data.radioButton)return new d(e);if(e.data.checkBox)return new h(e);(0,a.warn)("Unimplemented button widget annotation: pushbutton");break;case"Ch":return new f(e)}return new u(e);case a.AnnotationType.POPUP:return new p(e);case a.AnnotationType.LINE:return new g(e);case a.AnnotationType.HIGHLIGHT:return new v(e);case a.AnnotationType.UNDERLINE:return new b(e);case a.AnnotationType.SQUIGGLY:return new _(e);case a.AnnotationType.STRIKEOUT:return new y(e);case a.AnnotationType.FILEATTACHMENT:return new A(e);default:return new o(e)}}};var o=function(){function e(e,t,r){this.isRenderable=t||!1,this.data=e.data,this.layer=e.layer,this.page=e.page,this.viewport=e.viewport,this.linkService=e.linkService,this.downloadManager=e.downloadManager,this.imageResourcesPath=e.imageResourcesPath,this.renderInteractiveForms=e.renderInteractiveForms,t&&(this.container=this._createContainer(r))}return e.prototype={_createContainer:function(e){var t=this.data,r=this.page,n=this.viewport,o=document.createElement("section"),s=t.rect[2]-t.rect[0],l=t.rect[3]-t.rect[1];o.setAttribute("data-annotation-id",t.id);var u=a.Util.normalizeRect([t.rect[0],r.view[3]-t.rect[1]+r.view[1],t.rect[2],r.view[3]-t.rect[3]+r.view[1]]);if(i.CustomStyle.setProp("transform",o,"matrix("+n.transform.join(",")+")"),i.CustomStyle.setProp("transformOrigin",o,-u[0]+"px "+-u[1]+"px"),!e&&t.borderStyle.width>0){o.style.borderWidth=t.borderStyle.width+"px",t.borderStyle.style!==a.AnnotationBorderStyleType.UNDERLINE&&(s-=2*t.borderStyle.width,l-=2*t.borderStyle.width);var c=t.borderStyle.horizontalCornerRadius,h=t.borderStyle.verticalCornerRadius;if(c>0||h>0){var d=c+"px / "+h+"px";i.CustomStyle.setProp("borderRadius",o,d)}switch(t.borderStyle.style){case a.AnnotationBorderStyleType.SOLID:o.style.borderStyle="solid";break;case a.AnnotationBorderStyleType.DASHED:o.style.borderStyle="dashed";break;case a.AnnotationBorderStyleType.BEVELED:(0,a.warn)("Unimplemented border style: beveled");break;case a.AnnotationBorderStyleType.INSET:(0,a.warn)("Unimplemented border style: inset");break;case a.AnnotationBorderStyleType.UNDERLINE:o.style.borderBottomStyle="solid"}t.color?o.style.borderColor=a.Util.makeCssRgb(0|t.color[0],0|t.color[1],0|t.color[2]):o.style.borderWidth=0}return o.style.left=u[0]+"px",o.style.top=u[1]+"px",o.style.width=s+"px",o.style.height=l+"px",o},_createPopup:function(e,t,r){t||(t=document.createElement("div"),t.style.height=e.style.height,t.style.width=e.style.width,e.appendChild(t));var n=new m({container:e,trigger:t,color:r.color,title:r.title,contents:r.contents,hideWrapper:!0}),i=n.render();i.style.left=e.style.width,e.appendChild(i)},render:function(){throw new Error("Abstract method AnnotationElement.render called")}},e}(),s=function(){function e(e){o.call(this,e,!0)}return a.Util.inherit(e,o,{render:function(){this.container.className="linkAnnotation";var e=document.createElement("a");return(0,i.addLinkAttributes)(e,{url:this.data.url,target:this.data.newWindow?i.LinkTarget.BLANK:void 0}),this.data.url||(this.data.action?this._bindNamedAction(e,this.data.action):this._bindLink(e,this.data.dest)),this.container.appendChild(e),this.container},_bindLink:function(e,t){var r=this;e.href=this.linkService.getDestinationHash(t),e.onclick=function(){return t&&r.linkService.navigateTo(t),!1},t&&(e.className="internalLink")},_bindNamedAction:function(e,t){var r=this;e.href=this.linkService.getAnchorUrl(""),e.onclick=function(){return r.linkService.executeNamedAction(t),!1},e.className="internalLink"}}),e}(),l=function(){function e(e){var t=!!(e.data.hasPopup||e.data.title||e.data.contents);o.call(this,e,t)}return a.Util.inherit(e,o,{render:function(){this.container.className="textAnnotation";var e=document.createElement("img");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.alt="[{{type}} Annotation]",e.dataset.l10nId="text_annotation_type",e.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup(this.container,e,this.data),this.container.appendChild(e),this.container}}),e}(),u=function(){function e(e,t){o.call(this,e,t)}return a.Util.inherit(e,o,{render:function(){return this.container}}),e}(),c=function(){function e(e){var t=e.renderInteractiveForms||!e.data.hasAppearance&&!!e.data.fieldValue;u.call(this,e,t)}var t=["left","center","right"];return a.Util.inherit(e,u,{render:function(){this.container.className="textWidgetAnnotation";var e=null;if(this.renderInteractiveForms){if(this.data.multiLine?(e=document.createElement("textarea"),e.textContent=this.data.fieldValue):(e=document.createElement("input"),e.type="text",e.setAttribute("value",this.data.fieldValue)),e.disabled=this.data.readOnly,null!==this.data.maxLen&&(e.maxLength=this.data.maxLen),this.data.comb){var r=this.data.rect[2]-this.data.rect[0],n=r/this.data.maxLen;e.classList.add("comb"),e.style.letterSpacing="calc("+n+"px - 1ch)"}}else{e=document.createElement("div"),e.textContent=this.data.fieldValue,e.style.verticalAlign="middle",e.style.display="table-cell";var i=null;this.data.fontRefName&&(i=this.page.commonObjs.getData(this.data.fontRefName)),this._setTextStyle(e,i)}return null!==this.data.textAlignment&&(e.style.textAlign=t[this.data.textAlignment]),this.container.appendChild(e),this.container},_setTextStyle:function(e,t){var r=e.style;if(r.fontSize=this.data.fontSize+"px",r.direction=this.data.fontDirection<0?"rtl":"ltr",t){r.fontWeight=t.black?t.bold?"900":"bold":t.bold?"bold":"normal",r.fontStyle=t.italic?"italic":"normal";var n=t.loadedName?'"'+t.loadedName+'", ':"",i=t.fallbackName||"Helvetica, sans-serif";r.fontFamily=n+i}}}),e}(),h=function(){function e(e){u.call(this,e,e.renderInteractiveForms)}return a.Util.inherit(e,u,{render:function(){this.container.className="buttonWidgetAnnotation checkBox";var e=document.createElement("input");return e.disabled=this.data.readOnly,e.type="checkbox",this.data.fieldValue&&"Off"!==this.data.fieldValue&&e.setAttribute("checked",!0),this.container.appendChild(e),this.container}}),e}(),d=function(){function e(e){u.call(this,e,e.renderInteractiveForms)}return a.Util.inherit(e,u,{render:function(){this.container.className="buttonWidgetAnnotation radioButton";var e=document.createElement("input");return e.disabled=this.data.readOnly,e.type="radio",e.name=this.data.fieldName,this.data.fieldValue===this.data.buttonValue&&e.setAttribute("checked",!0),this.container.appendChild(e),this.container}}),e}(),f=function(){function e(e){u.call(this,e,e.renderInteractiveForms)}return a.Util.inherit(e,u,{render:function(){this.container.className="choiceWidgetAnnotation";var e=document.createElement("select");e.disabled=this.data.readOnly,this.data.combo||(e.size=this.data.options.length,this.data.multiSelect&&(e.multiple=!0));for(var t=0,r=this.data.options.length;t=0&&i.setAttribute("selected",!0),e.appendChild(i)}return this.container.appendChild(e),this.container}}),e}(),p=function(){function e(e){var t=!(!e.data.title&&!e.data.contents);o.call(this,e,t)}var t=["Line"];return a.Util.inherit(e,o,{render:function(){if(this.container.className="popupAnnotation",t.indexOf(this.data.parentType)>=0)return this.container;var e='[data-annotation-id="'+this.data.parentId+'"]',r=this.layer.querySelector(e);if(!r)return this.container;var n=new m({container:this.container,trigger:r,color:this.data.color,title:this.data.title,contents:this.data.contents}),a=parseFloat(r.style.left),o=parseFloat(r.style.width);return i.CustomStyle.setProp("transformOrigin",this.container,-(a+o)+"px -"+r.style.top),this.container.style.left=a+o+"px",this.container.appendChild(n.render()),this.container}}),e}(),m=function(){function e(e){this.container=e.container,this.trigger=e.trigger,this.color=e.color,this.title=e.title,this.contents=e.contents,this.hideWrapper=e.hideWrapper||!1,this.pinned=!1}return e.prototype={render:function(){var e=document.createElement("div");e.className="popupWrapper",this.hideElement=this.hideWrapper?e:this.container,this.hideElement.setAttribute("hidden",!0);var t=document.createElement("div");t.className="popup";var r=this.color;if(r){var n=.7*(255-r[0])+r[0],i=.7*(255-r[1])+r[1],o=.7*(255-r[2])+r[2];t.style.backgroundColor=a.Util.makeCssRgb(0|n,0|i,0|o)}var s=this._formatContents(this.contents),l=document.createElement("h1");return l.textContent=this.title,this.trigger.addEventListener("click",this._toggle.bind(this)),this.trigger.addEventListener("mouseover",this._show.bind(this,!1)),this.trigger.addEventListener("mouseout",this._hide.bind(this,!1)),t.addEventListener("click",this._hide.bind(this,!0)),t.appendChild(l),t.appendChild(s),e.appendChild(t),e},_formatContents:function(e){for(var t=document.createElement("p"),r=e.split(/(?:\r\n?|\n)/),n=0,i=r.length;n1&&(0,c.deprecated)("getDocument is called with pdfDataRangeTransport, passwordCallback or progressCallback argument"),t&&(t instanceof T||(t=Object.create(t),t.length=e.length,t.initialData=e.initialData,t.abort||(t.abort=function(){})),e=Object.create(e),e.range=t),i.onPassword=r||null,i.onProgress=n||null;var a;if("string"==typeof e)a={url:e};else if((0,c.isArrayBuffer)(e))a={data:e};else if(e instanceof T)a={range:e};else{if("object"!==(void 0===e?"undefined":u(e)))throw new Error("Invalid parameter in getDocument, need either Uint8Array, string or a parameter object");if(!e.url&&!e.data&&!e.range)throw new Error("Invalid parameter object: need either .data, .range or .url");a=e}var s={},l=null,d=null,f=h.DOMCMapReaderFactory;for(var p in a)if("url"!==p||"undefined"==typeof window)if("range"!==p)if("worker"!==p)if("data"!==p||a[p]instanceof Uint8Array)"CMapReaderFactory"!==p?s[p]=a[p]:f=a[p];else{var m=a[p];if("string"==typeof m)s[p]=(0,c.stringToBytes)(m);else if("object"!==(void 0===m?"undefined":u(m))||null===m||isNaN(m.length)){if(!(0,c.isArrayBuffer)(m))throw new Error("Invalid PDF binary data: either typed array, string or array-like object is expected in the data property.");s[p]=new Uint8Array(m)}else s[p]=new Uint8Array(m)}else d=a[p];else l=a[p];else s[p]=new URL(a[p],window.location).href;if(s.rangeChunkSize=s.rangeChunkSize||b,s.ignoreErrors=!0!==s.stopAtErrors,void 0!==s.disableNativeImageDecoder&&(0,c.deprecated)("parameter disableNativeImageDecoder, use nativeImageDecoderSupport instead"),s.nativeImageDecoderSupport=s.nativeImageDecoderSupport||(!0===s.disableNativeImageDecoder?c.NativeImageDecoding.NONE:c.NativeImageDecoding.DECODE),s.nativeImageDecoderSupport!==c.NativeImageDecoding.DECODE&&s.nativeImageDecoderSupport!==c.NativeImageDecoding.NONE&&s.nativeImageDecoderSupport!==c.NativeImageDecoding.DISPLAY&&((0,c.warn)("Invalid parameter nativeImageDecoderSupport: need a state of enum {NativeImageDecoding}"),s.nativeImageDecoderSupport=c.NativeImageDecoding.DECODE),!d){var g=(0,h.getDefaultSetting)("workerPort");d=g?L.fromPort(g):new L,i._worker=d}var _=i.docId;return d.promise.then(function(){if(i.destroyed)throw new Error("Loading aborted");return o(d,s,l,_).then(function(e){if(i.destroyed)throw new Error("Loading aborted");var t=void 0;l?t=new v.PDFDataTransportStream(s,l):s.data||(t=new C({source:s,disableRange:(0,h.getDefaultSetting)("disableRange")}));var r=new c.MessageHandler(_,e,d.port);r.postMessageTransfers=d.postMessageTransfers;var n=new j(r,i,t,f);i._transport=n,r.send("Ready",null)})}).catch(i._capability.reject),i}function o(e,t,r,n){return e.destroyed?Promise.reject(new Error("Worker was destroyed")):(t.disableAutoFetch=(0,h.getDefaultSetting)("disableAutoFetch"),t.disableStream=(0,h.getDefaultSetting)("disableStream"),t.chunkedViewerLoading=!!r,r&&(t.length=r.length,t.initialData=r.initialData),e.messageHandler.sendWithPromise("GetDocRequest",{docId:n,source:{data:t.data,url:t.url,password:t.password,disableAutoFetch:t.disableAutoFetch,rangeChunkSize:t.rangeChunkSize,length:t.length},maxImageSize:(0,h.getDefaultSetting)("maxImageSize"),disableFontFace:(0,h.getDefaultSetting)("disableFontFace"),disableCreateObjectURL:(0,h.getDefaultSetting)("disableCreateObjectURL"),postMessageTransfers:(0,h.getDefaultSetting)("postMessageTransfers")&&!y,docBaseUrl:t.docBaseUrl,nativeImageDecoderSupport:t.nativeImageDecoderSupport,ignoreErrors:t.ignoreErrors}).then(function(t){if(e.destroyed)throw new Error("Worker was destroyed");return t}))}Object.defineProperty(t,"__esModule",{value:!0}),t.build=t.version=t._UnsupportedManager=t.setPDFNetworkStreamClass=t.PDFPageProxy=t.PDFDocumentProxy=t.PDFWorker=t.PDFDataRangeTransport=t.LoopbackPort=t.getDocument=void 0;var s,l=function(){function e(e,t){for(var r=0;r=0&&a.renderTasks.splice(n,1),t.cleanupAfterRender&&(t.pendingCleanup=!0),t._tryCleanup(),e?s.capability.reject(e):s.capability.resolve(),r.timeEnd("Rendering"),r.timeEnd("Overall")},s=new N(o,e,this.objs,this.commonObjs,a.operatorList,this.pageNumber,i);s.useRequestAnimationFrame="print"!==n,a.renderTasks||(a.renderTasks=[]),a.renderTasks.push(s);var l=s.task;return e.continueCallback&&((0,c.deprecated)("render is used with continueCallback parameter"),l.onContinue=e.continueCallback),a.displayReadyCapability.promise.then(function(e){if(t.pendingCleanup)return void o();r.time("Rendering"),s.initializeGraphics(e),s.operatorListChanged()}).catch(o),l},getOperatorList:function(){function e(){if(r.operatorList.lastChunk){r.opListReadCapability.resolve(r.operatorList);var e=r.renderTasks.indexOf(t);e>=0&&r.renderTasks.splice(e,1)}}this.intentStates.oplist||(this.intentStates.oplist=Object.create(null));var t,r=this.intentStates.oplist;return r.opListReadCapability||(t={},t.operatorListChanged=e,r.receivingOperatorList=!0,r.opListReadCapability=(0,c.createPromiseCapability)(),r.renderTasks=[],r.renderTasks.push(t),r.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this.transport.messageHandler.send("RenderPageRequest",{pageIndex:this.pageIndex,intent:"oplist"})),r.opListReadCapability.promise},streamTextContent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this.pageNumber-1,normalizeWhitespace:!0===e.normalizeWhitespace,combineTextItems:!0!==e.disableCombineTextItems},{highWaterMark:100,size:function(e){return e.items.length}})},getTextContent:function(e){e=e||{};var t=this.streamTextContent(e);return new Promise(function(e,r){function n(){i.read().then(function(t){var r=t.value;if(t.done)return void e(a);c.Util.extendObj(a.styles,r.styles),c.Util.appendToArray(a.items,r.items),n()},r)}var i=t.getReader(),a={items:[],styles:Object.create(null)};n()})},_destroy:function(){this.destroyed=!0,this.transport.pageCache[this.pageIndex]=null;var e=[];return Object.keys(this.intentStates).forEach(function(t){if("oplist"!==t){this.intentStates[t].renderTasks.forEach(function(t){var r=t.capability.promise.catch(function(){});e.push(r),t.cancel()})}},this),this.objs.clear(),this.annotationsPromise=null,this.pendingCleanup=!1,Promise.all(e)},destroy:function(){(0,c.deprecated)("page destroy method, use cleanup() instead"),this.cleanup()},cleanup:function(){this.pendingCleanup=!0,this._tryCleanup()},_tryCleanup:function(){this.pendingCleanup&&!Object.keys(this.intentStates).some(function(e){var t=this.intentStates[e];return 0!==t.renderTasks.length||t.receivingOperatorList},this)&&(Object.keys(this.intentStates).forEach(function(e){delete this.intentStates[e]},this),this.objs.clear(),this.annotationsPromise=null,this.pendingCleanup=!1)},_startRenderPage:function(e,t){var r=this.intentStates[t];r.displayReadyCapability&&r.displayReadyCapability.resolve(e)},_renderPageChunk:function(e,t){var r,n,i=this.intentStates[t];for(r=0,n=e.length;r=0;return n=e===a?e:o?new e.constructor(a,e.byteOffset,e.byteLength):new e.constructor(e),i.set(e,n),n}n=Array.isArray(e)?[]:{},i.set(e,n);for(var s in e){for(var l,h=e;!(l=Object.getOwnPropertyDescriptor(h,s));)h=Object.getPrototypeOf(h);void 0!==l.value&&"function"!=typeof l.value&&(n[s]=r(l.value))}return n}var n=this;if(!this._defer)return void this._listeners.forEach(function(t){t.call(this,{data:e})},this);var i=new WeakMap,a={data:r(e)};this._deferred.then(function(){n._listeners.forEach(function(e){e.call(this,a)},n)})}},{key:"addEventListener",value:function(e,t){this._listeners.push(t)}},{key:"removeEventListener",value:function(e,t){var r=this._listeners.indexOf(t);this._listeners.splice(r,1)}},{key:"terminate",value:function(){this._listeners=[]}}]),e}(),L=function(){function e(){if(void 0!==s)return s;if((0,h.getDefaultSetting)("workerSrc"))return(0,h.getDefaultSetting)("workerSrc");if(A)return A.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2");throw new Error("No PDFJS.workerSrc specified")}function t(){return a?a.promise:(a=(0,c.createPromiseCapability)(),(S||function(t){c.Util.loadScript(e(),function(){t(window.pdfjsDistBuildPdfWorker.WorkerMessageHandler)})})(a.resolve),a.promise)}function r(e){var t="importScripts('"+e+"');";return URL.createObjectURL(new Blob([t]))}function n(e,t){if(t&&o.has(t))throw new Error("Cannot use more than one PDFWorker per port");if(this.name=e,this.destroyed=!1,this.postMessageTransfers=!0,this._readyCapability=(0,c.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,t)return o.set(t,this),void this._initializeFromPort(t);this._initialize()}var i=0,a=void 0,o=new WeakMap;return n.prototype={get promise(){return this._readyCapability.promise},get port(){return this._port},get messageHandler(){return this._messageHandler},_initializeFromPort:function(e){this._port=e,this._messageHandler=new c.MessageHandler("main","worker",e),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve()},_initialize:function(){var t=this;if(!_&&!(0,h.getDefaultSetting)("disableWorker")&&"undefined"!=typeof Worker){var n=e();try{(0,c.isSameOrigin)(window.location.href,n)||(n=r(new URL(n,window.location).href));var i=new Worker(n),a=new c.MessageHandler("main","worker",i),o=function(){i.removeEventListener("error",s),a.destroy(),i.terminate(),t.destroyed?t._readyCapability.reject(new Error("Worker was destroyed")):t._setupFakeWorker()},s=function(){t._webWorker||o()};i.addEventListener("error",s),a.on("test",function(e){if(i.removeEventListener("error",s),t.destroyed)return void o();e&&e.supportTypedArray?(t._messageHandler=a,t._port=i,t._webWorker=i,e.supportTransfers||(t.postMessageTransfers=!1,y=!0),t._readyCapability.resolve(),a.send("configure",{verbosity:(0,c.getVerbosityLevel)()})):(t._setupFakeWorker(),a.destroy(),i.terminate())}),a.on("console_log",function(e){console.log.apply(console,e)}),a.on("console_error",function(e){console.error.apply(console,e)}),a.on("ready",function(e){if(i.removeEventListener("error",s),t.destroyed)return void o();try{l()}catch(e){t._setupFakeWorker()}});var l=function(){var e=(0,h.getDefaultSetting)("postMessageTransfers")&&!y,t=new Uint8Array([e?255:0]);try{a.send("test",t,[t.buffer])}catch(e){(0,c.info)("Cannot use postMessage transfers"),t[0]=0,a.send("test",t)}};return void l()}catch(e){(0,c.info)("The worker has been disabled.")}}this._setupFakeWorker()},_setupFakeWorker:function(){var e=this;_||(0,h.getDefaultSetting)("disableWorker")||((0,c.warn)("Setting up fake worker."),_=!0),t().then(function(t){if(e.destroyed)return void e._readyCapability.reject(new Error("Worker was destroyed"));var r=Uint8Array!==Float32Array,n=new I(r);e._port=n;var a="fake"+i++,o=new c.MessageHandler(a+"_worker",a,n);t.setup(o,n);var s=new c.MessageHandler(a,a+"_worker",n);e._messageHandler=s, e._readyCapability.resolve()})},destroy:function(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),o.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}},n.fromPort=function(e){return o.has(e)?o.get(e):new n(null,e)},n}(),j=function(){function e(e,t,r,n){this.messageHandler=e,this.loadingTask=t,this.commonObjs=new D,this.fontLoader=new d.FontLoader(t.docId),this.CMapReaderFactory=new n({baseUrl:(0,h.getDefaultSetting)("cMapUrl"),isCompressed:(0,h.getDefaultSetting)("cMapPacked")}),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=r,this._fullReader=null,this._lastProgress=null,this.pageCache=[],this.pagePromises=[],this.downloadInfoCapability=(0,c.createPromiseCapability)(),this.setupMessageHandler()}return e.prototype={destroy:function(){var e=this;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=(0,c.createPromiseCapability)(),this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));var t=[];this.pageCache.forEach(function(e){e&&t.push(e._destroy())}),this.pageCache=[],this.pagePromises=[];var r=this.messageHandler.sendWithPromise("Terminate",null);return t.push(r),Promise.all(t).then(function(){e.fontLoader.clear(),e._networkStream&&e._networkStream.cancelAllRequests(),e.messageHandler&&(e.messageHandler.destroy(),e.messageHandler=null),e.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise},setupMessageHandler:function(){var e=this.messageHandler,t=this.loadingTask;e.on("GetReader",function(e,t){var r=this;(0,c.assert)(this._networkStream),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=function(e){r._lastProgress={loaded:e.loaded,total:e.total}},t.onPull=function(){r._fullReader.read().then(function(e){var r=e.value;if(e.done)return void t.close();(0,c.assert)((0,c.isArrayBuffer)(r)),t.enqueue(new Uint8Array(r),1,[r])}).catch(function(e){t.error(e)})},t.onCancel=function(e){r._fullReader.cancel(e)}},this),e.on("ReaderHeadersReady",function(e){var t=this,r=(0,c.createPromiseCapability)(),n=this._fullReader;return n.headersReady.then(function(){if(!n.isStreamingSupported||!n.isRangeSupported){if(t._lastProgress){var e=t.loadingTask;e.onProgress&&e.onProgress(t._lastProgress)}n.onProgress=function(e){var r=t.loadingTask;r.onProgress&&r.onProgress({loaded:e.loaded,total:e.total})}}r.resolve({isStreamingSupported:n.isStreamingSupported,isRangeSupported:n.isRangeSupported,contentLength:n.contentLength})},r.reject),r.promise},this),e.on("GetRangeReader",function(e,t){(0,c.assert)(this._networkStream);var r=this._networkStream.getRangeReader(e.begin,e.end);t.onPull=function(){r.read().then(function(e){var r=e.value;if(e.done)return void t.close();(0,c.assert)((0,c.isArrayBuffer)(r)),t.enqueue(new Uint8Array(r),1,[r])}).catch(function(e){t.error(e)})},t.onCancel=function(e){r.cancel(e)}},this),e.on("GetDoc",function(e){var t=e.pdfInfo;this.numPages=e.pdfInfo.numPages;var r=this.loadingTask,n=new E(t,this,r);this.pdfDocument=n,r._capability.resolve(n)},this),e.on("PasswordRequest",function(e){var r=this;if(this._passwordCapability=(0,c.createPromiseCapability)(),t.onPassword){var n=function(e){r._passwordCapability.resolve({password:e})};t.onPassword(n,e.code)}else this._passwordCapability.reject(new c.PasswordException(e.message,e.code));return this._passwordCapability.promise},this),e.on("PasswordException",function(e){t._capability.reject(new c.PasswordException(e.message,e.code))},this),e.on("InvalidPDF",function(e){this.loadingTask._capability.reject(new c.InvalidPDFException(e.message))},this),e.on("MissingPDF",function(e){this.loadingTask._capability.reject(new c.MissingPDFException(e.message))},this),e.on("UnexpectedResponse",function(e){this.loadingTask._capability.reject(new c.UnexpectedResponseException(e.message,e.status))},this),e.on("UnknownError",function(e){this.loadingTask._capability.reject(new c.UnknownErrorException(e.message,e.details))},this),e.on("DataLoaded",function(e){this.downloadInfoCapability.resolve(e)},this),e.on("PDFManagerReady",function(e){},this),e.on("StartRenderPage",function(e){if(!this.destroyed){var t=this.pageCache[e.pageIndex];t.stats.timeEnd("Page Request"),t._startRenderPage(e.transparency,e.intent)}},this),e.on("RenderPageChunk",function(e){if(!this.destroyed){this.pageCache[e.pageIndex]._renderPageChunk(e.operatorList,e.intent)}},this),e.on("commonobj",function(e){var t=this;if(!this.destroyed){var r=e[0],n=e[1];if(!this.commonObjs.hasData(r))switch(n){case"Font":var i=e[2];if("error"in i){var a=i.error;(0,c.warn)("Error during font loading: "+a),this.commonObjs.resolve(r,a);break}var o=null;(0,h.getDefaultSetting)("pdfBug")&&m.default.FontInspector&&m.default.FontInspector.enabled&&(o={registerFont:function(e,t){m.default.FontInspector.fontAdded(e,t)}});var s=new d.FontFaceObject(i,{isEvalSuported:(0,h.getDefaultSetting)("isEvalSupported"),disableFontFace:(0,h.getDefaultSetting)("disableFontFace"),fontRegistry:o}),l=function(e){t.commonObjs.resolve(r,s)};this.fontLoader.bind([s],l);break;case"FontPath":this.commonObjs.resolve(r,e[2]);break;default:throw new Error("Got unknown common object type "+n)}}},this),e.on("obj",function(e){if(!this.destroyed){var t,r=e[0],n=e[1],i=e[2],a=this.pageCache[n];if(!a.objs.hasData(r))switch(i){case"JpegStream":t=e[3],(0,c.loadJpegStream)(r,t,a.objs);break;case"Image":t=e[3],a.objs.resolve(r,t);t&&"data"in t&&t.data.length>8e6&&(a.cleanupAfterRender=!0);break;default:throw new Error("Got unknown object type "+i)}}},this),e.on("DocProgress",function(e){if(!this.destroyed){var t=this.loadingTask;t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})}},this),e.on("PageError",function(e){if(!this.destroyed){var t=this.pageCache[e.pageNum-1],r=t.intentStates[e.intent];if(!r.displayReadyCapability)throw new Error(e.error);if(r.displayReadyCapability.reject(e.error),r.operatorList){r.operatorList.lastChunk=!0;for(var n=0;nthis.numPages)return Promise.reject(new Error("Invalid page request"));var n=e-1;if(n in this.pagePromises)return this.pagePromises[n];var i=this.messageHandler.sendWithPromise("GetPage",{pageIndex:n}).then(function(e){if(r.destroyed)throw new Error("Transport destroyed");var t=new O(n,e,r);return r.pageCache[n]=t,t});return this.pagePromises[n]=i,i},getPageIndex:function(e){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:e}).catch(function(e){return Promise.reject(new Error(e))})},getAnnotations:function(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})},getDestinations:function(){return this.messageHandler.sendWithPromise("GetDestinations",null)},getDestination:function(e){return this.messageHandler.sendWithPromise("GetDestination",{id:e})},getPageLabels:function(){return this.messageHandler.sendWithPromise("GetPageLabels",null)},getPageMode:function(){return this.messageHandler.sendWithPromise("GetPageMode",null)},getAttachments:function(){return this.messageHandler.sendWithPromise("GetAttachments",null)},getJavaScript:function(){return this.messageHandler.sendWithPromise("GetJavaScript",null)},getOutline:function(){return this.messageHandler.sendWithPromise("GetOutline",null)},getMetadata:function(){return this.messageHandler.sendWithPromise("GetMetadata",null).then(function(e){return{info:e[0],metadata:e[1]?new g.Metadata(e[1]):null}})},getStats:function(){return this.messageHandler.sendWithPromise("GetStats",null)},startCleanup:function(){var e=this;this.messageHandler.sendWithPromise("Cleanup",null).then(function(){for(var t=0,r=e.pageCache.length;t>>8^u[a]}return-1^n}function t(t,r,n,i){var a=i,o=r.length;n[a]=o>>24&255,n[a+1]=o>>16&255,n[a+2]=o>>8&255,n[a+3]=255&o,a+=4,n[a]=255&t.charCodeAt(0),n[a+1]=255&t.charCodeAt(1),n[a+2]=255&t.charCodeAt(2),n[a+3]=255&t.charCodeAt(3),a+=4,n.set(r,a),a+=r.length;var s=e(n,i+4,a);n[a]=s>>24&255,n[a+1]=s>>16&255,n[a+2]=s>>8&255,n[a+3]=255&s}function r(e,t,r){for(var n=1,i=0,a=t;a=8?e:new Buffer(e);var r=require("zlib").deflateSync(t,{level:9});return r instanceof Uint8Array?r:new Uint8Array(r)}catch(e){(0,n.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+e)}return a(e)}function a(e){var t=e.length,n=Math.ceil(t/65535),i=new Uint8Array(2+t+5*n+4),a=0;i[a++]=120,i[a++]=156;for(var o=0;t>65535;)i[a++]=0,i[a++]=255,i[a++]=255,i[a++]=0,i[a++]=0,i.set(e.subarray(o,o+65535),a),a+=65535,o+=65535,t-=65535;i[a++]=1,i[a++]=255&t,i[a++]=t>>8&255,i[a++]=255&~t,i[a++]=(65535&~t)>>8&255,i.set(e.subarray(o),a),a+=e.length-o;var s=r(e,0,e.length);return i[a++]=s>>24&255,i[a++]=s>>16&255,i[a++]=s>>8&255,i[a++]=255&s,i}function o(e,r,a){var o,u,c,h=e.width,d=e.height,f=e.data;switch(r){case n.ImageKind.GRAYSCALE_1BPP:u=0,o=1,c=h+7>>3;break;case n.ImageKind.RGB_24BPP:u=2,o=8,c=3*h;break;case n.ImageKind.RGBA_32BPP:u=6,o=8,c=4*h;break;default:throw new Error("invalid format")}var p,m,g=new Uint8Array((1+c)*d),v=0,b=0;for(p=0;p>24&255,h>>16&255,h>>8&255,255&h,d>>24&255,d>>16&255,d>>8&255,255&d,o,u,0,0,0]),y=i(g),A=s.length+3*l+_.length+y.length,S=new Uint8Array(A),w=0;return S.set(s,w),w+=s.length,t("IHDR",_,S,w),w+=l+_.length,t("IDATA",y,S,w),w+=l+y.length,t("IEND",new Uint8Array(0),S,w),(0,n.createObjectURL)(S,"image/png",a)}for(var s=new Uint8Array([137,80,78,71,13,10,26,10]),l=12,u=new Int32Array(256),c=0;c<256;c++){for(var h=c,d=0;d<8;d++)h=1&h?3988292384^h>>1&2147483647:h>>1&2147483647;u[c]=h}return function(e,t){return o(e,void 0===e.kind?n.ImageKind.GRAYSCALE_1BPP:e.kind,t)}}(),s=function(){function e(){this.fontSizeScale=1,this.fontWeight=a.fontWeight,this.fontSize=0,this.textMatrix=n.IDENTITY_MATRIX,this.fontMatrix=n.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=a.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}return e.prototype={clone:function(){return Object.create(this)},setCurrentPoint:function(e,t){this.x=e,this.y=t}},e}();t.SVGGraphics=i=function(){function e(e){for(var t=[],r=[],n=e.length,i=0;i1&&(c.vertical?s.canvasWidth=r.height*t._viewport.scale:s.canvasWidth=r.width*t._viewport.scale),t._textDivProperties.set(o,s),t._textContentStream&&t._layoutText(o),t._enhanceTextSelection){var g=1,v=0;0!==u&&(g=Math.cos(u),v=Math.sin(u));var b,_,y=(c.vertical?r.height:r.width)*t._viewport.scale,A=h;0!==u?(b=[g,v,-v,g,p,m],_=n.Util.getAxialAlignedBoundingBox([0,0,y,A],b)):_=[p,m,p+y,m+A],t._bounds.push({left:_[0],top:_[1],right:_[2],bottom:_[3],div:o,size:[y,A],m:b})}}function r(e){if(!e._canceled){var t=e._textDivs,r=e._capability,n=t.length;if(n>c)return e._renderingDone=!0,void r.resolve();if(!e._textContentStream)for(var i=0;i0&&(n=n?Math.min(a,n):a)}return n},v=1+Math.min(Math.abs(d),Math.abs(f));l.paddingLeft=g(m,32,16)/v,l.paddingTop=g(m,48,16)/v,l.paddingRight=g(m,0,16)/v,l.paddingBottom=g(m,16,16)/v,e._textDivProperties.set(s,l)}else l.paddingLeft=t[a].left-i[a].left,l.paddingTop=t[a].top-i[a].top,l.paddingRight=i[a].right-t[a].right,l.paddingBottom=i[a].bottom-t[a].bottom,e._textDivProperties.set(s,l)}}function o(e,t,r){var n=r.map(function(e,t){return{x1:e.left,y1:e.top,x2:e.right,y2:e.bottom,index:t,x1New:void 0,x2New:void 0}});s(e,n);var i=new Array(r.length);return n.forEach(function(e){var t=e.index;i[t]={left:e.x1New,top:0,right:e.x2New,bottom:0}}),r.map(function(t,r){var a=i[r],o=n[r];o.x1=t.top,o.y1=e-a.right,o.x2=t.bottom,o.y2=e-a.left,o.index=r,o.x1New=void 0,o.x2New=void 0}),s(t,n),n.forEach(function(e){var t=e.index;i[t].top=e.x1New,i[t].bottom=e.x2New}),i}function s(e,t){t.sort(function(e,t){return e.x1-t.x1||e.index-t.index});var r={x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0},n=[{start:-1/0,end:1/0,boundary:r}];t.forEach(function(e){for(var t=0;t=0&&n[r].start>=e.y2;)r--;var i,a,o,s,l=-1/0;for(o=t;o<=r;o++){i=n[o],a=i.boundary;var u;u=a.x2>e.x1?a.index>e.index?a.x1New:e.x1:void 0===a.x2New?(a.x2+e.x1)/2:a.x2New,u>l&&(l=u)}for(e.x1New=l,o=t;o<=r;o++)i=n[o],a=i.boundary,void 0===a.x2New?a.x2>e.x1?a.index>e.index&&(a.x2New=a.x2):a.x2New=l:a.x2New>l&&(a.x2New=Math.max(l,a.x2));var c=[],h=null;for(o=t;o<=r;o++){i=n[o],a=i.boundary;var d=a.x2>e.x2?a:e;h===d?c[c.length-1].end=i.end:(c.push({start:i.start,end:i.end,boundary:d}),h=d)}for(n[t].start=0&&n[s].start>=a.y1;s--)f=n[s].boundary===a;for(s=r+1;!f&&s0&&(r.scale=r.canvasWidth/o,s="scaleX("+r.scale+")"),0!==r.angle&&(s="rotate("+r.angle+"deg) "+s),""!==s&&(r.originalTransform=s,i.CustomStyle.setProp("transform",e,s)),this._textDivProperties.set(e,r),t.appendChild(e)}},_render:function(e){var t=this,i=(0,n.createPromiseCapability)(),a=Object.create(null),o=document.createElement("canvas");if(o.mozOpaque=!0,this._layoutTextCtx=o.getContext("2d",{alpha:!1}),this._textContent){var s=this._textContent.items,l=this._textContent.styles;this._processItems(s,l),i.resolve()}else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');this._reader=this._textContentStream.getReader(),function e(){t._reader.read().then(function(r){var o=r.value;if(r.done)return void i.resolve();n.Util.extendObj(a,o.styles),t._processItems(o.items,a),e()},i.reject)}()}i.promise.then(function(){a=null,e?t._renderTimer=setTimeout(function(){r(t),t._renderTimer=null},e):r(t)},this._capability.reject)},expandTextDivs:function(e){if(this._enhanceTextSelection&&this._renderingDone){null!==this._bounds&&(a(this),this._bounds=null);for(var t=0,r=this._textDivs.length;t1?arguments[1]:void 0,r),l=o>2?arguments[2]:void 0,u=void 0===l?r:i(l,r);u>s;)t[s++]=e;return t}},function(e,t,r){"use strict";var n=r(20),i=r(6),a=r(19);e.exports=function(e){return function(t,r,o){var s,l=n(t),u=i(l.length),c=a(o,u);if(e&&r!=r){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===r)return e||c||0;return!e&&-1}}},function(e,t,r){"use strict";var n=r(21),i=r(1)("toStringTag"),a="Arguments"==n(function(){return arguments}()),o=function(e,t){try{return e[t]}catch(e){}};e.exports=function(e){var t,r,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=o(t=Object(e),i))?r:a?n(t):"Object"==(s=n(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t,r){"use strict";e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,r){"use strict";var n=r(9),i=r(2).document,a=n(i)&&n(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,r){"use strict";var n=r(2),i=r(16),a=r(4),o=r(25),s=r(22),l=function e(t,r,l){var u,c,h,d,f=t&e.F,p=t&e.G,m=t&e.S,g=t&e.P,v=t&e.B,b=p?n:m?n[r]||(n[r]={}):(n[r]||{}).prototype,_=p?i:i[r]||(i[r]={}),y=_.prototype||(_.prototype={});p&&(l=r);for(u in l)c=!f&&b&&void 0!==b[u],h=(c?b:l)[u],d=v&&c?s(h,n):g&&"function"==typeof h?s(Function.call,h):h,b&&o(b,u,h,t&e.U),_[u]!=h&&a(_,u,d),g&&y[u]!=h&&(y[u]=h)};n.core=i,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,r){"use strict";e.exports=!r(3)&&!r(17)(function(){return 7!=Object.defineProperty(r(39)("div"),"a",{get:function(){return 7}}).a})},function(e,t,r){"use strict";var n=r(21);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t,r){"use strict";var n=r(15),i=r(71),a=r(23),o=r(27)("IE_PROTO"),s=function(){},l=function(){var e,t=r(39)("iframe"),n=a.length;for(t.style.display="none",r(64).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("