UNPKG

@grapecity/gcpdfviewer

Version:
2 lines 1.37 MB
/*! For license information please see gcpdfviewer.worker.js.LICENSE.txt */ (()=>{var e={60096:(e,t,r)=>{"use strict";r.r(t),r.d(t,{WorkerMessageHandler:()=>$k});var n={_h:{"!PRODUCTION || TESTING":!1,"!PRODUCTION || GENERIC":!1,MOZCENTRAL:!1,TESTING:!1,GENERIC:!0,"GENERIC || CHROME":!0,PRODUCTION:!0,SKIP_BABEL:!0,BUNDLE_VERSION:"2.10.377",BUNDLE_BUILD:"2.10.377"},eval:function(e){return this._h[e]},test:function(e){return e=e.toString(),this._h[e]}};function a(e){if(Array.isArray(e))return e}function i(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function s(e,t){if(e){if("string"==typeof e)return o(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}function c(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(e,t){return a(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,i,o,s=[],c=!0,u=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,a=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}(e,t)||s(e,t)||c()}function l(e,t,r,n,a,i,o){try{var s=e[i](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,a)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var i=e.apply(t,r);function o(e){l(i,n,a,o,s,"next",e)}function s(e){l(i,n,a,o,s,"throw",e)}o(void 0)}))}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e){return d="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},d(e)}function p(e){var t=function(e){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,p(n.key),n)}}function m(e,t,r){return t&&g(e.prototype,t),r&&g(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var v=r(72325),y=r.n(v);function b(e){return function(e){if(Array.isArray(e))return o(e)}(e)||i(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){if(t&&("object"==d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function S(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&x(e,t)}var C=!("object"!==("undefined"==typeof process?"undefined":d(process))||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type);function A(e,t,r){return t=k(t),w(e,I()?Reflect.construct(t,r||[],k(e).constructor):t.apply(e,r))}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(I=function(){return!!e})()}"undefined"!=typeof PDFJSDev&&PDFJSDev.test("SKIP_BABEL")||"undefined"!=typeof globalThis&&globalThis._pdfjsCompatibilityChecked||("undefined"!=typeof globalThis&&globalThis.Math===Math||(globalThis=r(70611)),globalThis._pdfjsCompatibilityChecked=!0,!globalThis.btoa&&C&&(globalThis.btoa=function(e){return Buffer.from(e,"binary").toString("base64")}),!globalThis.atob&&C&&(globalThis.atob=function(e){return Buffer.from(e,"base64").toString("binary")}),!globalThis.DOMMatrix&&C&&(globalThis.DOMMatrix=r(43117)),Object.fromEntries||r(98748),"undefined"!=typeof PDFJSDev&&PDFJSDev.test("IMAGE_DECODERS")||globalThis.Promise.allSettled||(globalThis.Promise=r(20575)),"undefined"!=typeof PDFJSDev&&PDFJSDev.test("IMAGE_DECODERS")||"undefined"!=typeof PDFJSDev&&PDFJSDev.test("CHROME")||!globalThis.ReadableStream&&C&&(globalThis.ReadableStream=r(63780).ReadableStream));var _=[1,0,0,1,0,0],T=[.001,0,0,.001,0,0],E={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},P=27,O=8192,M=65536,B={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},R={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},F={O:"PageOpen",C:"PageClose"},N={UNKNOWN:"UNKNOWN",FLATE:"FLATE",LZW:"LZW",DCT:"DCT",JPX:"JPX",JBIG:"JBIG",A85:"A85",AHX:"AHX",CCF:"CCF",RLX:"RLX"},D={UNKNOWN:"UNKNOWN",TYPE1:"TYPE1",TYPE1STANDARD:"TYPE1STANDARD",TYPE1C:"TYPE1C",CIDFONTTYPE0:"CIDFONTTYPE0",CIDFONTTYPE0C:"CIDFONTTYPE0C",TRUETYPE:"TRUETYPE",CIDFONTTYPE2:"CIDFONTTYPE2",TYPE3:"TYPE3",OPENTYPE:"OPENTYPE",TYPE0:"TYPE0",MMTYPE1:"MMTYPE1"},L=10,U=11,j=12,q=37,H=44,z=58,W=59,G=70,V=71,X="errorOperatorList",K=1;function Y(){return K}function J(e){K>=5&&console.log("Info: ".concat(e))}function Z(e){K>=1&&console.log("Warning: ".concat(e))}function Q(e){throw new Error(e)}function $(e,t){e||Q(t)}function ee(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e)return null;try{if(r&&"string"==typeof e){if(r.addDefaultProtocol&&e.startsWith("www.")){var n=e.match(/\./g);n&&n.length>=2&&(e="http://".concat(e))}if(r.tryConvertEncoding)try{e=Se(e)}catch(e){}}var a=t?new URL(e,t):new URL(e);if(function(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(a))return a}catch(e){}return null}function te(e,t,r){return("undefined"==typeof PDFJSDev||PDFJSDev.test("!PRODUCTION || TESTING"))&&$(t in e,'shadow: Property "'.concat(t&&t.toString(),'" not found in object.')),Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r}var re=function(){function e(t,r){this.constructor===e&&Q("Cannot initialize BaseException."),this.message=t,this.name=r}return e.prototype=new Error,e.constructor=e,e}(),ne=function(e){function t(e,r){var n;return f(this,t),(n=A(this,t,[e,"PasswordException"])).code=r,n}return S(t,e),m(t)}(re),ae=function(e){function t(e,r){var n;return f(this,t),(n=A(this,t,[e,"UnknownErrorException"])).details=r,n}return S(t,e),m(t)}(re),ie=function(e){function t(e){return f(this,t),A(this,t,[e,"InvalidPDFException"])}return S(t,e),m(t)}(re),oe=function(e){function t(e){return f(this,t),A(this,t,[e,"MissingPDFException"])}return S(t,e),m(t)}(re),se=function(e){function t(e,r){var n;return f(this,t),(n=A(this,t,[e,"UnexpectedResponseException"])).status=r,n}return S(t,e),m(t)}(re),ce=function(e){function t(e){return f(this,t),A(this,t,[e,"FormatError"])}return S(t,e),m(t)}(re),ue=function(e){function t(e){return f(this,t),A(this,t,[e,"AbortException"])}return S(t,e),m(t)}(re);function le(e){"object"===d(e)&&null!==e&&void 0!==e.length||Q("Invalid argument for bytesToString");var t=e.length,r=8192;if(t<r)return String.fromCharCode.apply(null,e);for(var n=[],a=0;a<t;a+=r){var i=Math.min(a+r,t),o=e.subarray(a,i);n.push(String.fromCharCode.apply(null,o))}return n.join("")}function he(e){"string"!=typeof e&&Q("Invalid argument for stringToBytes");for(var t=e.length,r=new Uint8Array(t),n=0;n<t;++n)r[n]=255&e.charCodeAt(n);return r}function fe(e){return void 0!==e.length?e.length:void 0!==e.byteLength?e.byteLength:void Q("Invalid argument for arrayByteLength")}function de(e){var t=e.length;if(1===t&&e[0]instanceof Uint8Array)return e[0];for(var r=0,n=0;n<t;n++)r+=fe(e[n]);for(var a=0,i=new Uint8Array(r),o=0;o<t;o++){var s=e[o];s instanceof Uint8Array||(s="string"==typeof s?he(s):new Uint8Array(s));var c=s.byteLength;i.set(s,a),a+=c}return i}function pe(e){return("undefined"==typeof PDFJSDev||PDFJSDev.test("!PRODUCTION || TESTING"))&&$("number"==typeof e&&Math.abs(e)<Math.pow(2,32),'string32: Unexpected input "'.concat(e,'".')),String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function ge(e){return Object.keys(e).length}var me={get value(){return te(this,"value",function(){try{return new Function(""),!0}catch(e){return!1}}())}},ve=b(Array(256).keys()).map((function(e){return e.toString(16).padStart(2,"0")})),ye=function(){function e(){f(this,e)}return m(e,null,[{key:"makeHexColor",value:function(e,t,r){return"#".concat(ve[e]).concat(ve[t]).concat(ve[r])}},{key:"scaleMinMax",value:function(e,t){var r;e[0]?(e[0]<0&&(r=t[0],t[0]=t[1],t[1]=r),t[0]*=e[0],t[1]*=e[0],e[3]<0&&(r=t[2],t[2]=t[3],t[3]=r),t[2]*=e[3],t[3]*=e[3]):(r=t[0],t[0]=t[2],t[2]=r,r=t[1],t[1]=t[3],t[3]=r,e[1]<0&&(r=t[2],t[2]=t[3],t[3]=r),t[2]*=e[1],t[3]*=e[1],e[2]<0&&(r=t[0],t[0]=t[1],t[1]=r),t[0]*=e[2],t[1]*=e[2]),t[0]+=e[4],t[1]+=e[4],t[2]+=e[5],t[3]+=e[5]}},{key:"transform",value:function(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}},{key:"applyTransform",value:function(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]}},{key:"applyInverseTransform",value:function(e,t){var r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]}},{key:"getAxialAlignedBoundingBox",value:function(t,r){var n=e.applyTransform(t,r),a=e.applyTransform(t.slice(2,4),r),i=e.applyTransform([t[0],t[3]],r),o=e.applyTransform([t[2],t[1]],r);return[Math.min(n[0],a[0],i[0],o[0]),Math.min(n[1],a[1],i[1],o[1]),Math.max(n[0],a[0],i[0],o[0]),Math.max(n[1],a[1],i[1],o[1])]}},{key:"inverseTransform",value:function(e){var t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}},{key:"apply3dTransform",value:function(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]]}},{key:"singularValueDecompose2dScale",value:function(e){var t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],n=e[0]*t[1]+e[1]*t[3],a=e[2]*t[0]+e[3]*t[2],i=e[2]*t[1]+e[3]*t[3],o=(r+i)/2,s=Math.sqrt(Math.pow(r+i,2)-4*(r*i-a*n))/2,c=o+s||1,u=o-s||1;return[Math.sqrt(c),Math.sqrt(u)]}},{key:"normalizeRect",value:function(e){var t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t}},{key:"intersect",value:function(e,t){var r=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),n=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(r>n)return null;var a=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),i=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return a>i?null:[r,a,n,i]}},{key:"bezierBoundingBox",value:function(e,t,r,n,a,i,o,s){for(var c,u,l,h,f,d,p,g,m=[],v=[[],[]],y=0;y<2;++y)if(0===y?(u=6*e-12*r+6*a,c=-3*e+9*r-9*a+3*o,l=3*r-3*e):(u=6*t-12*n+6*i,c=-3*t+9*n-9*i+3*s,l=3*n-3*t),Math.abs(c)<1e-12){if(Math.abs(u)<1e-12)continue;0<(h=-l/u)&&h<1&&m.push(h)}else p=u*u-4*l*c,g=Math.sqrt(p),p<0||(0<(f=(-u+g)/(2*c))&&f<1&&m.push(f),0<(d=(-u-g)/(2*c))&&d<1&&m.push(d));for(var w,k=m.length,x=k;k--;)w=1-(h=m[k]),v[0][k]=w*w*w*e+3*w*w*h*r+3*w*h*h*a+h*h*h*o,v[1][k]=w*w*w*t+3*w*w*h*n+3*w*h*h*i+h*h*h*s;return v[0][x]=e,v[1][x]=t,v[0][x+1]=o,v[1][x+1]=s,v[0].length=v[1].length=x+2,[Math.min.apply(Math,b(v[0])),Math.min.apply(Math,b(v[1])),Math.max.apply(Math,b(v[0])),Math.max.apply(Math,b(v[1]))]}}])}(),be=[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 we(e){var t;if(e[0]>="ï"&&("þ"===e[0]&&"ÿ"===e[1]?t="utf-16be":"ÿ"===e[0]&&"þ"===e[1]?t="utf-16le":"ï"===e[0]&&"»"===e[1]&&"¿"===e[2]&&(t="utf-8"),t))try{var r=new TextDecoder(t,{fatal:!0}),n=he(e);return r.decode(n)}catch(e){Z('stringToPDFString: "'.concat(e,'".'))}for(var a=[],i=0,o=e.length;i<o;i++){var s=be[e.charCodeAt(i)];a.push(s?String.fromCharCode(s):e.charAt(i))}return a.join("")}function ke(e){return e.replace(/([()\\\n\r])/g,(function(e){return"\n"===e?"\\n":"\r"===e?"\\r":"\\".concat(e)}))}function xe(e){for(var t=["þÿ"],r=0,n=e.length;r<n;r++){var a=e.charCodeAt(r);t.push(String.fromCharCode(a>>8&255),String.fromCharCode(255&a))}return t.join("")}function Se(e){return decodeURIComponent(escape(e))}function Ce(e){return unescape(encodeURIComponent(e))}function Ae(e){return"boolean"==typeof e}function Ie(e){return"number"==typeof e}function _e(e){return"string"==typeof e}function Te(e){return"object"===d(e)&&null!==e&&void 0!==e.byteLength}function Ee(e,t){if(e.length!==t.length)return!1;for(var r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}function Pe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")].join("")}function Oe(){var e=Object.create(null),t=!1;return Object.defineProperty(e,"settled",{get:function(){return t}}),e.promise=new Promise((function(r,n){e.resolve=function(e){t=!0,r(e)},e.reject=function(e){t=!0,n(e)}})),e}var Me=function(){return m((function e(){f(this,e),this.constructor===e&&Q("Cannot initialize BaseStream.")}),[{key:"length",get:function(){Q("Abstract getter `length` accessed")}},{key:"isEmpty",get:function(){Q("Abstract getter `isEmpty` accessed")}},{key:"isDataLoaded",get:function(){return te(this,"isDataLoaded",!0)}},{key:"getByte",value:function(){Q("Abstract method `getByte` called")}},{key:"getBytes",value:function(e){Q("Abstract method `getBytes` called")}},{key:"peekByte",value:function(){var e=this.getByte();return-1!==e&&this.pos--,e}},{key:"peekBytes",value:function(e){var t=this.getBytes(e);return this.pos-=t.length,t}},{key:"getUint16",value:function(){var e=this.getByte(),t=this.getByte();return-1===e||-1===t?-1:(e<<8)+t}},{key:"getInt32",value:function(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()}},{key:"getByteRange",value:function(e,t){Q("Abstract method `getByteRange` called")}},{key:"getString",value:function(e){return le(this.getBytes(e))}},{key:"skip",value:function(e){this.pos+=e||1}},{key:"reset",value:function(){Q("Abstract method `reset` called")}},{key:"moveStart",value:function(){Q("Abstract method `moveStart` called")}},{key:"makeSubStream",value:function(e,t){Q("Abstract method `makeSubStream` called")}},{key:"getBaseStreams",value:function(){return null}}])}();function Be(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Re(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Re(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function Re(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var Fe,Ne,De,Le=Symbol("CIRCULAR_REF"),Ue=Symbol("EOF"),je=(Fe=Object.create(null),function(){function e(t){f(this,e),this.name=t}return m(e,null,[{key:"get",value:function(t){return Fe[t]||(Fe[t]=new e(t))}},{key:"_clearCache",value:function(){Fe=Object.create(null)}}])}()),qe=(Ne=Object.create(null),function(){function e(t){f(this,e),this.cmd=t}return m(e,null,[{key:"get",value:function(t){return Ne[t]||(Ne[t]=new e(t))}},{key:"_clearCache",value:function(){Ne=Object.create(null)}}])}()),He=function(){return He},ze=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;f(this,e),this._map=Object.create(null),this.xref=t,this.objId=null,this.suppressEncryption=!1,this.__nonSerializable__=He}return m(e,[{key:"assignXref",value:function(e){this.xref=e}},{key:"size",get:function(){return Object.keys(this._map).length}},{key:"get",value:function(e,t,r){var n=this._map[e];return void 0===n&&void 0!==t&&(("undefined"==typeof PDFJSDev||PDFJSDev.test("!PRODUCTION || TESTING"))&&t.length<e.length&&Q("Dict.get: Expected keys to be ordered by length."),void 0===(n=this._map[t])&&void 0!==r&&(("undefined"==typeof PDFJSDev||PDFJSDev.test("!PRODUCTION || TESTING"))&&r.length<t.length&&Q("Dict.get: Expected keys to be ordered by length."),n=this._map[r])),n instanceof We&&this.xref?this.xref.fetch(n,this.suppressEncryption):n}},{key:"getAsync",value:(t=h(y().mark((function e(t,r,n){var a;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===(a=this._map[t])&&void 0!==r&&(("undefined"==typeof PDFJSDev||PDFJSDev.test("!PRODUCTION || TESTING"))&&r.length<t.length&&Q("Dict.getAsync: Expected keys to be ordered by length."),void 0===(a=this._map[r])&&void 0!==n&&(("undefined"==typeof PDFJSDev||PDFJSDev.test("!PRODUCTION || TESTING"))&&n.length<r.length&&Q("Dict.getAsync: Expected keys to be ordered by length."),a=this._map[n])),!(a instanceof We&&this.xref)){e.next=4;break}return e.abrupt("return",this.xref.fetchAsync(a,this.suppressEncryption));case 4:return e.abrupt("return",a);case 5:case"end":return e.stop()}}),e,this)}))),function(e,r,n){return t.apply(this,arguments)})},{key:"getArray",value:function(e,t,r){var n=this._map[e];if(void 0===n&&void 0!==t&&(("undefined"==typeof PDFJSDev||PDFJSDev.test("!PRODUCTION || TESTING"))&&t.length<e.length&&Q("Dict.getArray: Expected keys to be ordered by length."),void 0===(n=this._map[t])&&void 0!==r&&(("undefined"==typeof PDFJSDev||PDFJSDev.test("!PRODUCTION || TESTING"))&&r.length<t.length&&Q("Dict.getArray: Expected keys to be ordered by length."),n=this._map[r])),n instanceof We&&this.xref&&(n=this.xref.fetch(n,this.suppressEncryption)),Array.isArray(n))for(var a=0,i=(n=n.slice()).length;a<i;a++)n[a]instanceof We&&this.xref&&(n[a]=this.xref.fetch(n[a],this.suppressEncryption));return n}},{key:"getRaw",value:function(e){return this._map[e]}},{key:"getKeys",value:function(){return Object.keys(this._map)}},{key:"getRawValues",value:function(){return Object.values(this._map)}},{key:"set",value:function(e,t){"undefined"!=typeof PDFJSDev&&!PDFJSDev.test("!PRODUCTION || TESTING")||void 0!==t||Q('Dict.set: The "value" cannot be undefined.'),this._map[e]=t}},{key:"has",value:function(e){return void 0!==this._map[e]}},{key:"forEach",value:function(e){for(var t in this._map)e(t,this.get(t))}}],[{key:"empty",get:function(){var t=new e(null);return t.set=function(e,t){Q("Should not call `set` on the empty dictionary.")},te(this,"empty",t)}},{key:"merge",value:function(t){var r,n=t.xref,a=t.dictArray,i=t.mergeSubDicts,o=void 0!==i&&i,s=new e(n),c=new Map,l=Be(a);try{for(l.s();!(r=l.n()).done;){var h=r.value;if(h instanceof e)for(var f=0,d=Object.entries(h._map);f<d.length;f++){var p=u(d[f],2),g=p[0],m=p[1],v=c.get(g);if(void 0===v)v=[],c.set(g,v);else if(!(o&&m instanceof e))continue;v.push(m)}}}catch(e){l.e(e)}finally{l.f()}var y,b=Be(c);try{for(b.s();!(y=b.n()).done;){var w=u(y.value,2),k=w[0],x=w[1];if(1!==x.length&&x[0]instanceof e){var S,C=new e(n),A=Be(x);try{for(A.s();!(S=A.n()).done;)for(var I=S.value,_=0,T=Object.entries(I._map);_<T.length;_++){var E=u(T[_],2),P=E[0],O=E[1];void 0===C._map[P]&&(C._map[P]=O)}}catch(e){A.e(e)}finally{A.f()}C.size>0&&(s._map[k]=C)}else s._map[k]=x[0]}}catch(e){b.e(e)}finally{b.f()}return c.clear(),s.size>0?s:e.empty}}]);var t}(),We=(De=Object.create(null),function(){function e(t,r){f(this,e),this.num=t,this.gen=r}return m(e,[{key:"toString",value:function(){return 0===this.gen?"".concat(this.num,"R"):"".concat(this.num,"R").concat(this.gen)}}],[{key:"get",value:function(t,r){var n=0===r?"".concat(t,"R"):"".concat(t,"R").concat(r);return De[n]||(De[n]=new e(t,r))}},{key:"_clearCache",value:function(){De=Object.create(null)}}])}()),Ge=function(){return m((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;f(this,e),"undefined"!=typeof PDFJSDev&&!PDFJSDev.test("!PRODUCTION || TESTING")||!t||t instanceof e||Q('RefSet: Invalid "parent" value.'),this._set=new Set(t&&t._set)}),[{key:"has",value:function(e){return this._set.has(e.toString())}},{key:"put",value:function(e){this._set.add(e.toString())}},{key:"remove",value:function(e){this._set.delete(e.toString())}},{key:"forEach",value:function(e){var t,r=Be(this._set.values());try{for(r.s();!(t=r.n()).done;)e(t.value)}catch(e){r.e(e)}finally{r.f()}}},{key:Symbol.iterator,value:function(){return this._set.values()}},{key:"clear",value:function(){this._set.clear()}}])}(),Ve=function(){return m((function e(){f(this,e),this._map=new Map}),[{key:"size",get:function(){return this._map.size}},{key:"get",value:function(e){return this._map.get(e.toString())}},{key:"has",value:function(e){return this._map.has(e.toString())}},{key:"put",value:function(e,t){this._map.set(e.toString(),t)}},{key:"putAlias",value:function(e,t){this._map.set(e.toString(),this.get(t))}},{key:"forEach",value:function(e){var t,r=Be(this._map.values());try{for(r.s();!(t=r.n()).done;)e(t.value)}catch(e){r.e(e)}finally{r.f()}}},{key:Symbol.iterator,value:function(){return this._map.values()}},{key:"clear",value:function(){this._map.clear()}}])}();function Xe(e,t){return e instanceof je&&(void 0===t||e.name===t)}function Ke(e,t){return e instanceof qe&&(void 0===t||e.cmd===t)}function Ye(e,t){return e instanceof ze&&(void 0===t||Xe(e.get("Type"),t))}function Je(e){return e instanceof We}function Ze(e,t){return("undefined"==typeof PDFJSDev||PDFJSDev.test("!PRODUCTION || TESTING"))&&$(e instanceof We&&t instanceof We,"isRefsEqual: Both parameters should be `Ref`s."),e.num===t.num&&e.gen===t.gen}function Qe(e){return e instanceof Me}function $e(){qe._clearCache(),je._clearCache(),We._clearCache()}function et(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return tt(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function rt(e,t,r){return t=k(t),w(e,nt()?Reflect.construct(t,r||[],k(e).constructor):t.apply(e,r))}function nt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(nt=function(){return!!e})()}function at(e){var t;return function(){return e&&(t=Object.create(null),e(t),e=null),t}}function it(e){var t;return function(){if(e){var r=e();e=null,t=Object.create(null);for(var n=0,a=r.length;n<a;n+=2)t[r[n]]=r[n+1];r=null}return t}}var ot=function(e){function t(e,r){var n;return f(this,t),(n=rt(this,t,["Missing data [".concat(e,", ").concat(r,")"),"MissingDataException"])).begin=e,n.end=r,n}return S(t,e),m(t)}(re),st=function(e){function t(e){return f(this,t),rt(this,t,[e,"ParserEOFException"])}return S(t,e),m(t)}(re),ct=function(e){function t(e){return f(this,t),rt(this,t,[e,"XRefEntryException"])}return S(t,e),m(t)}(re),ut=function(e){function t(e){return f(this,t),rt(this,t,[e,"XRefParseException"])}return S(t,e),m(t)}(re),lt=function(){return m((function e(t){f(this,e),this._handler=t,this._streamTypes=new Set,this._fontTypes=new Set}),[{key:"_send",value:function(){var e,t=Object.create(null),r=Object.create(null),n=et(this._streamTypes);try{for(n.s();!(e=n.n()).done;)t[e.value]=!0}catch(e){n.e(e)}finally{n.f()}var a,i=et(this._fontTypes);try{for(i.s();!(a=i.n()).done;)r[a.value]=!0}catch(e){i.e(e)}finally{i.f()}this._handler.send("DocStats",{streamTypes:t,fontTypes:r})}},{key:"addStreamType",value:function(e){("undefined"==typeof PDFJSDev||PDFJSDev.test("!PRODUCTION || TESTING"))&&$(N[e]===e,'addStreamType: Invalid "type" value.'),this._streamTypes.has(e)||(this._streamTypes.add(e),this._send())}},{key:"addFontType",value:function(e){("undefined"==typeof PDFJSDev||PDFJSDev.test("!PRODUCTION || TESTING"))&&$(D[e]===e,'addFontType: Invalid "type" value.'),this._fontTypes.has(e)||(this._fontTypes.add(e),this._send())}}])}();function ht(e){for(var t,r=e.dict,n=e.key,a=e.getArray,i=void 0!==a&&a,o=e.stopWhenFound,s=void 0===o||o,c=new Ge;r instanceof ze&&(!r.objId||!c.has(r.objId));){r.objId&&c.put(r.objId);var u=i?r.getArray(n):r.get(n);if(void 0!==u){if(s)return u;t||(t=[]),t.push(u)}r=r.get("Parent")}return t}var ft=["","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"];function dt(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];$(Number.isInteger(e)&&e>0,"The number should be a positive integer.");for(var r,n=[];e>=1e3;)e-=1e3,n.push("M");r=e/100|0,e%=100,n.push(ft[r]),r=e/10|0,e%=10,n.push(ft[10+r]),n.push(ft[20+e]);var a=n.join("");return t?a.toLowerCase():a}function pt(e){return e<=0?0:Math.ceil(Math.log2(e))}function gt(e,t){return e[t]<<24>>24}function mt(e,t){return e[t]<<8|e[t+1]}function vt(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function yt(e){return 32===e||9===e||13===e||10===e}function bt(e){var t=/(.+)\[(\d+)\]$/;return e.split(".").map((function(e){var r=e.match(t);return r?{name:r[1],pos:parseInt(r[2],10)}:{name:e,pos:0}}))}function wt(e){for(var t=[],r=0,n=0,a=e.length;n<a;n++){var i=e.charCodeAt(n);(i<33||i>126||35===i||40===i||41===i||60===i||62===i||91===i||93===i||123===i||125===i||47===i||37===i)&&(r<n&&t.push(e.substring(r,n)),t.push("#".concat(i.toString(16))),r=n+1)}return 0===t.length?e:(r<e.length&&t.push(e.substring(r,e.length)),t.join(""))}function kt(e,t,r,n){if(e){var a=null;if(Je(e)){if(n.has(e))return;a=e,n.put(a),e=t.fetch(e)}if(Array.isArray(e)){var i,o=et(e);try{for(o.s();!(i=o.n()).done;)kt(i.value,t,r,n)}catch(e){o.e(e)}finally{o.f()}}else if(e instanceof ze){if(Xe(e.get("S"),"JavaScript")&&e.has("JS")){var s,c=e.get("JS");(s=we(s=Qe(c)?c.getString():c))&&r.push(s)}kt(e.getRaw("Next"),t,r,n)}a&&n.remove(a)}}function xt(e,t,r){var n=Object.create(null),a=ht({dict:t,key:"AA",stopWhenFound:!1});if(a)for(var i=a.length-1;i>=0;i--){var o=a[i];if(o instanceof ze){var s,c=et(o.getKeys());try{for(c.s();!(s=c.n()).done;){var u=s.value,l=r[u];if(l){var h=o.getRaw(u),f=new Ge,d=[];kt(h,e,d,f),d.length>0&&(n[l]=d)}}}catch(e){c.e(e)}finally{c.f()}}}if(t.has("A")){var p=[];kt(t.get("A"),e,p,new Ge),p.length>0&&(n.Action=p)}return ge(n)>0?n:null}var St={60:"&lt;",62:"&gt;",38:"&amp;",34:"&quot;",39:"&apos;"};function Ct(e){for(var t=[],r=0,n=0,a=e.length;n<a;n++){var i=e.codePointAt(n);if(32<=i&&i<=126){var o=St[i];o&&(r<n&&t.push(e.substring(r,n)),t.push(o),r=n+1)}else r<n&&t.push(e.substring(r,n)),t.push("&#x".concat(i.toString(16).toUpperCase(),";")),i>55295&&(i<57344||i>65533)&&n++,r=n+1}return 0===t.length?e:(r<e.length&&t.push(e.substring(r,e.length)),t.join(""))}function At(e){var t=new Set(["100","200","300","400","500","600","700","800","900","1000","normal","bold","bolder","lighter"]),r=e.fontFamily,n=e.fontWeight,a=e.italicAngle;if(/^".*"$/.test(r)){if(/[^\\]"/.test(r.slice(1,r.length-1)))return Z('XFA - FontFamily contains some unescaped ": '.concat(r,".")),!1}else if(/^'.*'$/.test(r)){if(/[^\\]'/.test(r.slice(1,r.length-1)))return Z("XFA - FontFamily contains some unescaped ': ".concat(r,".")),!1}else{var i,o=et(r.split(/[ \t]+/));try{for(o.s();!(i=o.n()).done;){var s=i.value;if(/^(\d|(-(\d|-)))/.test(s)||!/^[\w-\\]+$/.test(s))return Z("XFA - FontFamily contains some invalid <custom-ident>: ".concat(r,".")),!1}}catch(e){o.e(e)}finally{o.f()}}var c=n?n.toString():"";e.fontWeight=t.has(c)?c:"400";var u=parseFloat(a);return e.italicAngle=isNaN(u)||u<-90||u>90?"14":a.toString(),!0}function It(e){var t=new RegExp("^\\s*("+["app.launchURL","window.open","xfa.host.gotoURL"].join("|").split(".").join("\\.")+")\\((?:'|\")([^'\"]*)(?:'|\")(?:,\\s*(\\w+)\\)|\\))","i").exec(e);if(t&&t[2]){var r=t[2],n=!1;return"true"===t[3]&&"app.launchURL"===t[1]&&(n=!0),{url:r,newWindow:n}}return null}function _t(e,t,r){return t=k(t),w(e,Tt()?Reflect.construct(t,r||[],k(e).constructor):t.apply(e,r))}function Tt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Tt=function(){return!!e})()}var Et=function(e){function t(e,r,n,a){var i;return f(this,t),(i=_t(this,t)).bytes=e instanceof Uint8Array?e:new Uint8Array(e),i.start=r||0,i.pos=i.start,i.end=r+n||i.bytes.length,i.dict=a,i}return S(t,e),m(t,[{key:"length",get:function(){return this.end-this.start}},{key:"isEmpty",get:function(){return 0===this.length}},{key:"getByte",value:function(){return this.pos>=this.end?-1:this.bytes[this.pos++]}},{key:"getBytes",value:function(e){var t=this.bytes,r=this.pos,n=this.end;if(!e)return t.subarray(r,n);var a=r+e;return a>n&&(a=n),this.pos=a,t.subarray(r,a)}},{key:"getByteRange",value:function(e,t){return e<0&&(e=0),t>this.end&&(t=this.end),this.bytes.subarray(e,t)}},{key:"reset",value:function(){this.pos=this.start}},{key:"moveStart",value:function(){this.start=this.pos}},{key:"makeSubStream",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return new t(this.bytes.buffer,e,r,n)}}])}(Me),Pt=function(e){function t(e){return f(this,t),_t(this,t,[he(e)])}return S(t,e),m(t)}(Et),Ot=function(e){function t(){return f(this,t),_t(this,t,[new Uint8Array(0)])}return S(t,e),m(t)}(Et);function Mt(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Bt(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Bt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function Bt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Rt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Rt=function(){return!!e})()}var Ft=function(e){function t(e,r,n){var a,i,o,s;return f(this,t),i=this,o=t,s=[new Uint8Array(e),0,e,null],o=k(o),(a=w(i,Rt()?Reflect.construct(o,s||[],k(i).constructor):o.apply(i,s))).chunkSize=r,a._loadedChunks=new Set,a.numChunks=Math.ceil(e/r),a.manager=n,a.progressiveDataLength=0,a.lastSuccessfulEnsureByteChunk=-1,a}return S(t,e),m(t,[{key:"getMissingChunks",value:function(){for(var e=[],t=0,r=this.numChunks;t<r;++t)this._loadedChunks.has(t)||e.push(t);return e}},{key:"numChunksLoaded",get:function(){return this._loadedChunks.size}},{key:"isDataLoaded",get:function(){return this.numChunksLoaded===this.numChunks}},{key:"onReceiveData",value:function(e,t){var r=this.chunkSize;if(e%r!=0)throw new Error("Bad begin offset: ".concat(e));var n=e+t.byteLength;if(n%r!=0&&n!==this.bytes.length)throw new Error("Bad end offset: ".concat(n));this.bytes.set(new Uint8Array(t),e);for(var a=Math.floor(e/r),i=Math.floor((n-1)/r)+1,o=a;o<i;++o)this._loadedChunks.add(o)}},{key:"onReceiveProgressiveData",value:function(e){var t=this.progressiveDataLength,r=Math.floor(t/this.chunkSize);this.bytes.set(new Uint8Array(e),t),t+=e.byteLength,this.progressiveDataLength=t;for(var n=t>=this.end?this.numChunks:Math.floor(t/this.chunkSize),a=r;a<n;++a)this._loadedChunks.add(a)}},{key:"ensureByte",value:function(e){if(!(e<this.progressiveDataLength)){var t=Math.floor(e/this.chunkSize);if(!(t>this.numChunks)&&t!==this.lastSuccessfulEnsureByteChunk){if(!this._loadedChunks.has(t))throw new ot(e,e+1);this.lastSuccessfulEnsureByteChunk=t}}}},{key:"ensureRange",value:function(e,t){if(!(e>=t||t<=this.progressiveDataLength)){var r=Math.floor(e/this.chunkSize);if(!(r>this.numChunks))for(var n=Math.min(Math.floor((t-1)/this.chunkSize)+1,this.numChunks),a=r;a<n;++a)if(!this._loadedChunks.has(a))throw new ot(e,t)}}},{key:"nextEmptyChunk",value:function(e){for(var t=this.numChunks,r=0;r<t;++r){var n=(e+r)%t;if(!this._loadedChunks.has(n))return n}return null}},{key:"hasChunk",value:function(e){return this._loadedChunks.has(e)}},{key:"getByte",value:function(){var e=this.pos;return e>=this.end?-1:(e>=this.progressiveDataLength&&this.ensureByte(e),this.bytes[this.pos++])}},{key:"getBytes",value:function(e){var t=this.bytes,r=this.pos,n=this.end;if(!e)return n>this.progressiveDataLength&&this.ensureRange(r,n),t.subarray(r,n);var a=r+e;return a>n&&(a=n),a>this.progressiveDataLength&&this.ensureRange(r,a),this.pos=a,t.subarray(r,a)}},{key:"getByteRange",value:function(e,t){return e<0&&(e=0),t>this.end&&(t=this.end),t>this.progressiveDataLength&&this.ensureRange(e,t),this.bytes.subarray(e,t)}},{key:"makeSubStream",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;function n(){}t?e+t>this.progressiveDataLength&&this.ensureRange(e,e+t):e>=this.progressiveDataLength&&this.ensureByte(e),n.prototype=Object.create(this),n.prototype.getMissingChunks=function(){for(var e=this.chunkSize,t=Math.floor(this.start/e),r=Math.floor((this.end-1)/e)+1,n=[],a=t;a<r;++a)this._loadedChunks.has(a)||n.push(a);return n},Object.defineProperty(n.prototype,"isDataLoaded",{get:function(){return this.numChunksLoaded===this.numChunks||0===this.getMissingChunks().length},configurable:!0});var a=new n;return a.pos=a.start=e,a.end=e+t||this.end,a.dict=r,a}},{key:"getBaseStreams",value:function(){return[this]}}])}(Et),Nt=function(){return m((function e(t,r){f(this,e),this.length=r.length,this.chunkSize=r.rangeChunkSize,this.stream=new Ft(this.length,this.chunkSize,this),this.pdfNetworkStream=t,this.disableAutoFetch=r.disableAutoFetch,this.msgHandler=r.msgHandler,this.currRequestId=0,this._chunksNeededByRequest=new Map,this._requestsByChunk=new Map,this._promisesByRequest=new Map,this.progressiveDataLength=0,this.aborted=!1,this._loadedStreamCapability=Oe()}),[{key:"onLoadedStream",value:function(){return this._loadedStreamCapability.promise}},{key:"sendRequest",value:function(e,t){var r=this,n=this.pdfNetworkStream.getRangeReader(e,t);n.isStreamingSupported||(n.onProgress=this.onProgress.bind(this));var a=[],i=0;return new Promise((function(e,t){var o=function(s){try{if(!s.done){var c=s.value;return a.push(c),i+=fe(c),n.isStreamingSupported&&r.onProgress({loaded:i}),void n.read().then(o,t)}var u=de(a);a=null,e(u)}catch(e){t(e)}};n.read().then(o,t)})).then((function(t){r.aborted||r.onReceiveData({chunk:t,begin:e})}))}},{key:"requestAllChunks",value:function(){var e=this.stream.getMissingChunks();return this._requestChunks(e),this._loadedStreamCapability.promise}},{key:"_requestChunks",value:function(e){var t=this,r=this.currRequestId++,n=new Set;this._chunksNeededByRequest.set(r,n);var a,i=Mt(e);try{for(i.s();!(a=i.n()).done;){var o=a.value;this.stream.hasChunk(o)||n.add(o)}}catch(e){i.e(e)}finally{i.f()}if(0===n.size)return Promise.resolve();var s=Oe();this._promisesByRequest.set(r,s);var c,u=[],l=Mt(n);try{for(l.s();!(c=l.n()).done;){var h=c.value,f=this._requestsByChunk.get(h);f||(f=[],this._requestsByChunk.set(h,f),u.push(h)),f.push(r)}}catch(e){l.e(e)}finally{l.f()}if(u.length>0){var d,p=Mt(this.groupChunks(u));try{for(p.s();!(d=p.n()).done;){var g=d.value,m=g.beginChunk*this.chunkSize,v=Math.min(g.endChunk*this.chunkSize,this.length);this.sendRequest(m,v).catch(s.reject)}}catch(e){p.e(e)}finally{p.f()}}return s.promise.catch((function(e){if(!t.aborted)throw e}))}},{key:"getStream",value:function(){return this.stream}},{key:"requestRange",value:function(e,t){t=Math.min(t,this.length);for(var r=this.getBeginChunk(e),n=this.getEndChunk(t),a=[],i=r;i<n;++i)a.push(i);return this._requestChunks(a)}},{key:"requestRanges",value:function(){var e,t=[],r=Mt(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]);try{for(r.s();!(e=r.n()).done;)for(var n=e.value,a=this.getBeginChunk(n.begin),i=this.getEndChunk(n.end),o=a;o<i;++o)t.includes(o)||t.push(o)}catch(e){r.e(e)}finally{r.f()}return t.sort((function(e,t){return e-t})),this._requestChunks(t)}},{key:"groupChunks",value:function(e){for(var t=[],r=-1,n=-1,a=0,i=e.length;a<i;++a){var o=e[a];r<0&&(r=o),n>=0&&n+1!==o&&(t.push({beginChunk:r,endChunk:n+1}),r=o),a+1===e.length&&t.push({beginChunk:r,endChunk:o+1}),n=o}return t}},{key:"onProgress",value:function(e){this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize+e.loaded,total:this.length})}},{key:"onReceiveData",value:function(e){var t=e.chunk,r=void 0===e.begin,n=r?this.progressiveDataLength:e.begin,a=n+t.byteLength,i=Math.floor(n/this.chunkSize),o=a<this.length?Math.floor(a/this.chunkSize):Math.ceil(a/this.chunkSize);r?(this.stream.onReceiveProgressiveData(t),this.progressiveDataLength=a):this.stream.onReceiveData(n,t),this.stream.isDataLoaded&&this._loadedStreamCapability.resolve(this.stream);for(var s=[],c=i;c<o;++c){var u=this._requestsByChunk.get(c);if(u){this._requestsByChunk.delete(c);var l,h=Mt(u);try{for(h.s();!(l=h.n()).done;){var f=l.value,d=this._chunksNeededByRequest.get(f);d.has(c)&&d.delete(c),d.size>0||s.push(f)}}catch(e){h.e(e)}finally{h.f()}}}if(!this.disableAutoFetch&&0===this._requestsByChunk.size){var p;if(1===this.stream.numChunksLoaded){var g=this.stream.numChunks-1;this.stream.hasChunk(g)||(p=g)}else p=this.stream.nextEmptyChunk(o);Number.isInteger(p)&&this._requestChunks([p])}for(var m=0,v=s;m<v.length;m++){var y=v[m],b=this._promisesByRequest.get(y);this._promisesByRequest.delete(y),b.resolve()}this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize,total:this.length})}},{key:"onError",value:function(e){this._loadedStreamCapability.reject(e)}},{key:"getBeginChunk",value:function(e){return Math.floor(e/this.chunkSize)}},{key:"getEndChunk",value:function(e){return Math.floor((e-1)/this.chunkSize)+1}},{key:"abort",value:function(e){this.aborted=!0,this.pdfNetworkStream&&this.pdfNetworkStream.cancelAllRequests(e);var t,r=Mt(this._promisesByRequest.values());try{for(r.s();!(t=r.n()).done;)t.value.reject(e)}catch(e){r.e(e)}finally{r.f()}}}])}(),Dt=[1.3877,1,1,1,.97801,.92482,.89552,.91133,.81988,.97566,.98152,.93548,.93548,1.2798,.85284,.92794,1,.96134,1.54657,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.82845,.82845,.85284,.85284,.85284,.75859,.92138,.83908,.7762,.73293,.87289,.73133,.7514,.81921,.87356,.95958,.59526,.75727,.69225,1.04924,.9121,.86943,.79795,.88198,.77958,.70864,.81055,.90399,.88653,.96017,.82577,.77892,.78257,.97507,1.54657,.97507,.85284,.89552,.90176,.88762,.8785,.75241,.8785,.90518,.95015,.77618,.8785,.88401,.91916,.86304,.88401,.91488,.8785,.8801,.8785,.8785,.91343,.7173,1.04106,.8785,.85075,.95794,.82616,.85162,.79492,.88331,1.69808,.88331,.85284,.97801,.89552,.91133,.89552,.91133,1.7801,.89552,1.24487,1.13254,1.12401,.96839,.85284,.68787,.70645,.85592,.90747,1.01466,1.0088,.90323,1,1.07463,1,.91056,.75806,1.19118,.96839,.78864,.82845,.84133,.75859,.83908,.83908,.83908,.83908,.83908,.83908,.77539,.73293,.73133,.73133,.73133,.73133,.95958,.95958,.95958,.95958,.88506,.9121,.86943,.86943,.86943,.86943,.86943,.85284,.87508,.90399,.90399,.90399,.90399,.77892,.79795,.90807,.88762,.88762,.88762,.88762,.88762,.88762,.8715,.75241,.90518,.90518,.90518,.90518,.88401,.88401,.88401,.88401,.8785,.8785,.8801,.8801,.8801,.8801,.8801,.90747,.89049,.8785,.8785,.8785,.8785,.85162,.8785,.85162,.83908,.88762,.83908,.88762,.83908,.88762,.73293,.75241,.73293,.75241,.73293,.75241,.73293,.75241,.87289,.83016,.88506,.93125,.73133,.90518,.73133,.90518,.73133,.90518,.73133,.90518,.73133,.90518,.81921,.77618,.81921,.77618,.81921,.77618,1,1,.87356,.8785,.91075,.89608,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.76229,.90167,.59526,.91916,1,1,.86304,.69225,.88401,1,1,.70424,.79468,.91926,.88175,.70823,.94903,.9121,.8785,1,1,.9121,.8785,.87802,.88656,.8785,.86943,.8801,.86943,.8801,.86943,.8801,.87402,.89291,.77958,.91343,1,1,.77958,.91343,.70864,.7173,.70864,.7173,.70864,.7173,.70864,.7173,1,1,.81055,.75841,.81055,1.06452,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.96017,.95794,.77892,.85162,.77892,.78257,.79492,.78257,.79492,.78257,.79492,.9297,.56892,.83908,.88762,.77539,.8715,.87508,.89049,1,1,.81055,1.04106,1.20528,1.20528,1,1.15543,.70674,.98387,.94721,1.33431,1.45894,.95161,1.06303,.83908,.80352,.57184,.6965,.56289,.82001,.56029,.81235,1.02988,.83908,.7762,.68156,.80367,.73133,.78257,.87356,.86943,.95958,.75727,.89019,1.04924,.9121,.7648,.86943,.87356,.79795,.78275,.81055,.77892,.9762,.82577,.99819,.84896,.95958,.77892,.96108,1.01407,.89049,1.02988,.94211,.96108,.8936,.84021,.87842,.96399,.79109,.89049,1.00813,1.02988,.86077,.87445,.92099,.84723,.86513,.8801,.75638,.85714,.78216,.79586,.87965,.94211,.97747,.78287,.97926,.84971,1.02988,.94211,.8801,.94211,.84971,.73133,1,1,1,1,1,1,1,1,1,1,1,1,.90264,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.90518,1,1,1,1,1,1,1,1,1,1,1,1,.90548,1,1,1,1,1,1,.96017,.95794,.96017,.95794,.96017,.95794,.77892,.85162,1,1,.89552,.90527,1,.90363,.92794,.92794,.92794,.92794,.87012,.87012,.87012,.89552,.89552,1.42259,.71143,1.06152,1,1,1.03372,1.03372,.97171,1.4956,2.2807,.93835,.83406,.91133,.84107,.91133,1,1,1,.72021,1,1.23108,.83489,.88525,.88525,.81499,.90527,1.81055,.90527,1.81055,1.31006,1.53711,.94434,1.08696,1,.95018,.77192,.85284,.90747,1.17534,.69825,.9716,1.37077,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.08004,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,.90727,.90727,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Lt={lineHeight:1.2207,lineGap:.2207},Ut=[1.3877,1,1,1,.97801,.92482,.89552,.91133,.81988,.97566,.98152,.93548,.93548,1.2798,.85284,.92794,1,.96134,1.56239,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.82845,.82845,.85284,.85284,.85284,.75859,.92138,.83908,.7762,.71805,.87289,.73133,.7514,.81921,.87356,.95958,.59526,.75727,.69225,1.04924,.90872,.85938,.79795,.87068,.77958,.69766,.81055,.90399,.88653,.96068,.82577,.77892,.78257,.97507,1.529,.97507,.85284,.89552,.90176,.94908,.86411,.74012,.86411,.88323,.95015,.86411,.86331,.88401,.91916,.86304,.88401,.9039,.86331,.86331,.86411,.86411,.90464,.70852,1.04106,.86331,.84372,.95794,.82616,.84548,.79492,.88331,1.69808,.88331,.85284,.97801,.89552,.91133,.89552,.91133,1.7801,.89552,1.24487,1.13254,1.19129,.96839,.85284,.68787,.70645,.85592,.90747,1.01466,1.0088,.90323,1,1.07463,1,.91056,.75806,1.19118,.96839,.78864,.82845,.84133,.75859,.83908,.83908,.83908,.83908,.83908,.83908,.77539,.71805,.73133,.73133,.73133,.73133,.95958,.95958,.95958,.95958,.88506,.90872,.85938,.85938,.85938,.85938,.85938,.85284,.87068,.90399,.90399,.90399,.90399,.77892,.79795,.90807,.94908,.94908,.94908,.94908,.94908,.94908,.85887,.74012,.88323,.88323,.88323,.88323,.88401,.88401,.88401,.88401,.8785,.86331,.86331,.86331,.86331,.86331,.86331,.90747,.89049,.86331,.86331,.86331,.86331,.84548,.86411,.84548,.83908,.94908,.83908,.94908,.83908,.94908,.71805,.74012,.71805,.74012,.71805,.74012,.71805,.74012,.87289,.79538,.88506,.92726,.73133,.88323,.73133,.88323,.73133,.88323,.73133,.88323,.73133,.88323,.81921,.86411,.81921,.86411,.81921,.86411,1,1,.87356,.86331,.91075,.8777,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.76467,.90167,.59526,.91916,1,1,.86304,.69225,.88401,1,1,.70424,.77312,.91926,.88175,.70823,.94903,.90872,.86331,1,1,.90872,.86331,.86906,.88116,.86331,.85938,.86331,.85938,.86331,.85938,.86331,.87402,.86549,.77958,.90464,1,1,.77958,.90464,.69766,.70852,.69766,.70852,.69766,.70852,.69766,.70852,1,1,.81055,.75841,.81055,1.06452,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.96068,.95794,.77892,.84548,.77892,.78257,.79492,.78257,.79492,.78257,.79492,.9297,.56892,.83908,.94908,.77539,.85887,.87068,.89049,1,1,.81055,1.04106,1.20528,1.20528,1,1.15543,.70088,.98387,.94721,1.33431,1.45894,.95161,1.48387,.83908,.80352,.57118,.6965,.56347,.79179,.55853,.80346,1.02988,.83908,.7762,.67174,.86036,.73133,.78257,.87356,.86441,.95958,.75727,.89019,1.04924,.90872,.74889,.85938,.87891,.79795,.7957,.81055,.77892,.97447,.82577,.97466,.87179,.95958,.77892,.94252,.95612,.8753,1.02988,.92733,.94252,.87411,.84021,.8728,.95612,.74081,.8753,1.02189,1.02988,.84814,.87445,.91822,.84723,.85668,.86331,.81344,.87581,.76422,.82046,.96057,.92733,.99375,.78022,.95452,.86015,1.02988,.92733,.86331,.92733,.86015,.73133,1,1,1,1,1,1,1,1,1,1,1,1,.90631,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.88323,1,1,1,1,1,1,1,1,1,1,1,1,.85174,1,1,1,1,1,1,.96068,.95794,.96068,.95794,.96068,.95794,.77892,.84548,1,1,.89552,.90527,1,.90363,.92794,.92794,.92794,.89807,.87012,.87012,.87012,.89552,.89552,1.42259,.71094,1.06152,1,1,1.03372,1.03372,.97171,1.4956,2.2807,.92972,.83406,.91133,.83326,.91133,1,1,1,.72021,1,1.23108,.83489,.88525,.88525,.81499,.90616,1.81055,.90527,1.81055,1.3107,1.53711,.94434,1.08696,1,.95018,.77192,.85284,.90747,1.17534,.69825,.9716,1.37077,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.08004,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,.90727,.90727,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],jt={lineHeight:1.2207,lineGap:.2207},qt=[1.3877,1,1,1,1.17223,1.1293,.89552,.91133,.80395,1.02269,1.15601,.91056,.91056,1.2798,.85284,.89807,1,.90861,1.39543,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.96309,.96309,.85284,.85284,.85284,.83319,.88071,.8675,.81552,.72346,.85193,.73206,.7522,.81105,.86275,.90685,.6377,.77892,.75593,1.02638,.89249,.84118,.77452,.85374,.75186,.67789,.79776,.88844,.85066,.94309,.77818,.7306,.76659,1.10369,1.38313,1.10369,1.06139,.89552,.8739,.9245,.9245,.83203,.9245,.85865,1.09842,.9245,.9245,1.03297,1.07692,.90918,1.03297,.94959,.9245,.92274,.9245,.9245,1.02933,.77832,1.20562,.9245,.8916,.98986,.86621,.89453,.79004,.94152,1.77256,.94152,.85284,.97801,.89552,.91133,.89552,.91133,1.91729,.89552,1.17889,1.13254,1.16359,.92098,.85284,.68787,.71353,.84737,.90747,1.0088,1.0044,.87683,1,1.09091,1,.92229,.739,1.15642,.92098,.76288,.80504,.80972,.75859,.8675,.8675,.8675,.8675,.8675,.8675,.76318,.72346,.73206,.73206,.73206,.73206,.90685,.90685,.90685,.90685,.86477,.89249,.84118,.84118,.84118,.84118,.84118,.85284,.84557,.88844,.88844,.88844,.88844,.7306,.77452,.86331,.9245,.9245,.9245,.9245,.9245,.9245,.84843,.83203,.85865,.85865,.85865,.85865,.82601,.82601,.82601,.82601,.94469,.9245,.92274,.92274,.92274,.92274,.92274,.90747,.86651,.9245,.9245,.9245,.9245,.89453,.9245,.89453,.8675,.9245,.8675,.9245,.8675,.9245,.72346,.83203,.72346,.83203,.72346,.83203,.72346,.83203,.85193,.8875,.86477,.99034,.73206,.85865,.73206,.85865,.73206,.85865,.73206,.85865,.73206,.85865,.81105,.9245,.81105,.9245,.81105,.9245,1,1,.8627